Help us improve
Share bugs, ideas, or general feedback.
From codeharness
Initialize the codeharness harness in the current project — detect stack, configure enforcement, install dependencies, set up hooks.
npx claudepluginhub ivintik/private-claude-marketplace --plugin codeharnessHow this command is triggered — by the user, by Claude, or both
Slash command
/codeharness:harness-initThe summary Claude sees in its command listing — used to decide when to auto-load this command
# Harness Init Initialize codeharness in the current project. The CLI does the heavy lifting — your job is to run it and handle BMAD patches. ## Step 1: Run the CLI Run the canonical `codeharness` binary. The plugin's SessionStart hook version-locks the CLI on each session — if the installed `codeharness` version doesn't match this plugin's version, the hook upgrades it via `npm install -g codeharness@<version>` before the first command runs. Users can opt out with `CODEHARNESS_NO_AUTO_INSTALL=1`. The CLI handles: - Stack detection - Dependency installation (with smart fallbacks — do ...
/harness-initDiscovers project stack, selects features like context engineering and CI, defines conventions, generates enforceable HARNESS.md. Re-run to add features incrementally.
Share bugs, ideas, or general feedback.
Initialize codeharness in the current project. The CLI does the heavy lifting — your job is to run it and handle BMAD patches.
Run the canonical codeharness binary. The plugin's SessionStart hook
version-locks the CLI on each session — if the installed codeharness
version doesn't match this plugin's version, the hook upgrades it via
npm install -g codeharness@<version> before the first command runs.
Users can opt out with CODEHARNESS_NO_AUTO_INSTALL=1.
codeharness init --json
The CLI handles:
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 applies harness patches to _bmad/ automatically on every init — you
do NOT need to read templates/bmad-patches/ manually or inject markers by
hand. The CLI uses src/lib/patch-engine.ts with
<!-- CODEHARNESS-PATCH-START/END:{name} --> markers and is fully idempotent:
fresh apply on first run, in-place update on subsequent runs.
If _bmad/ does not exist in the project, install it before re-running init:
npx bmad-method install --yes --directory . --modules bmm --tools none
Use --tools none for OpenCode and other non-BMAD-native runtimes. Then
re-run npx --yes codeharness@latest init --json — the CLI will detect the
new _bmad/ tree and apply all harness patches on that run.
Parse the JSON output's bmad.patches_applied array. Each entry looks like:
{ "patchName": "docs-readme-generation", "applied": true, "updated": false }
applied: false with error: "File not found: …" means the BMAD install is
missing the target file (common with skeletal standalone installs). Fix the
BMAD install — do NOT edit _bmad/ files by hand.
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: {status — created, agents_md, claude_md, docs_scaffold details}
[OK] Enforcement: frontend:{ON|OFF} database:{ON|OFF} api:{ON|OFF} observability:ON
[OK] Config: .claude/codeharness.local.md
Next steps:
→ Run /codeharness:harness-docs to populate docs/ and write README.md
→ Run /codeharness:harness-run to start autonomous execution
The /codeharness:harness-docs recommendation is REQUIRED — docs/index.md
is only a placeholder until that skill runs a scan-driven documentation
pass. Skipping this step leaves _(To be generated)_ markers throughout
docs/ and means no README.md at the project root. Render each entry
from the JSON output's next_steps array as a bullet under "Next steps:".
.claude/codeharness.local.mdcodeharness --version