Initialize the codeharness harness in the current project — detect stack, configure enforcement, install dependencies, set up hooks.
From codeharnessnpx claudepluginhub ivintik/private-claude-marketplace --plugin codeharness/harness-initSet up a living harness for this project — discover the stack, define conventions, generate HARNESS.md with enforcement
/harness-initInitialize a long-running build project. Decomposes a high-level goal into a granular feature_list.json, sets up claude-progress.txt, creates an init.sh bootstrap script, and makes an initial git commit. Run once before your first /harness-run session.
Initialize codeharness in the current project. The CLI does the heavy lifting — your job is to run it and handle BMAD patches.
Run codeharness init and let it handle:
codeharness init --json
Parse the JSON output to understand what happened. The output includes status, stack, stacks, dependencies, docker, otlp, documentation, and workflow fields.
If the state file already exists (re-init), the CLI handles preservation of enforcement config and verification_log automatically.
--no-observability — skip OTLP instrumentation--observability-backend none — disable observability entirely--otel-endpoint <url> — use remote OTLP endpoint--force — overwrite existing workflow file--frontend --no-database --api — set enforcement flagsPass user preferences as CLI flags.
The CLI does NOT handle BMAD installation or patch application. This is your responsibility.
_bmad/ directory exists → preserve it, apply patches_bmad/ → run npx bmad-method install --yes --tools claude-codeRead each patch template from the codeharness plugin's templates/bmad-patches/ directory. Check if the patch marker already exists in the target file before applying.
Each patch is wrapped with markers:
<!-- CODEHARNESS-PATCH-START:{patch_name} -->
{patch content}
<!-- CODEHARNESS-PATCH-END:{patch_name} -->
If markers already exist, skip that patch. Patches are idempotent.
Read the version from codeharness --version for the report header. Output:
Harness Init — codeharness v{version}
[OK] Stack detected: {stack} ({indicator})
[OK] Docker: {running|missing}
[OK] Dependencies: {summary from CLI output}
[OK] BMAD: {installed|existing|standalone}
[OK] Documentation scaffold: {created|preserved}
[OK] Enforcement: frontend:{ON|OFF} database:{ON|OFF} api:{ON|OFF} observability:ON
[OK] Config: .claude/codeharness.local.md
→ Run /codeharness:harness-run to start autonomous execution.
codeharness init handles all deps.claude/codeharness.local.mdcodeharness --version