Stop 7 of 7

Reference

Built for the second visit, not the first.

Commands

CommandWhenWhat it does
/harness-initOnce per projectScaffolds .harness/, installs the hooks, proposes initial features
/harness-continueStart of every sessionMode choice, smoke test, workflow planning — on top of the auto-injected orientation
/harness-issue-prepBefore implementingVerifies a spec until buildable, normalizes it, records proof of verification
/harness-issue-debugAfter something brokeLive repair session on a failed feature or a parked issue
/harness-doctorOn upgrade or odd failureReport-first health check; --fix applies the mechanical upgrade steps
/harness-improveAfter a bad runObservation-first improvement loop: one intervention, verified at the claim boundary
/harness-dashboardWatching a runOpens the live session view (the session must have opted in beforehand)
/plugin update vv-harnessPeriodicallyUpdates the plugin — remember to run /harness-doctor per project after

Test targets

.harness/init.sh smoke_test                  # fast compile/syntax check, <15s
.harness/init.sh focused_test <test_file>    # exactly one test file
.harness/init.sh full_test                   # complete suite with coverage
.harness/init.sh                             # ⚠ defaults to full_test

focused_test exits 3 and reports a skip when the file doesn't exist or the stack has no per-file runner — a skip, deliberately, rather than a fake green.

The feature object

Canonical definition: schemas/feature.schema.json, enforced by scripts/validate-features.py and wired into the test suite. Ten fields are required.

FieldRequiredMeaning
idyese.g. F001. Assigned by the lead, never reused
descriptionyesWhat the feature is. Editing it after a spec is attached invalidates spec.hash
priorityyesLower numbers claim first
statusyespending · in-progress · blocked · passing · failed
scopeyesDirectories and files this feature owns; pasted into agent prompts and enforced on Edit/Write
depends_onyesFeature ids that must reach passing first
assigned_toyesAgent name, "single-session", or null
test_fileyesThe test proving this feature. Must be non-null once status is passing
coverageyesPercentage on touched code, or a descriptive string where no tooling exists
notesyesFree-form: issue id, decisions, anything the other fields don't capture
correction_cyclesHow many correction rounds this took. ≥3 in a scope is a signal to upgrade the next implementer
scope_expansionsFiles added to scope after assignment. ≥3 means assign a broader initial scope next time
approaches_triedWhat was attempted before the passing approach
failure_reasonWhy it reached failed
discovered_viaId of the feature whose implementation revealed this one
specSpec-verification record. Absent or null means unverified — excluded from parallel batches
risk / require_plan_approvalElevation flags; escalate the review stage, not the implementer
coverage_targetOverrides the default coverage gate
qa_binding / proofDeclared at prep time; claim-matched evidence recorded at completion

Completion checklist

Before declaring any task complete:

  • All tests pass, including the new ones written via TDD
  • No uncommitted changes remain
  • Sub-agent and workflow-agent work validated against lead context
  • Documentation updated — existing docs only
  • context_summary.md updated with decisions, patterns, or gotchas
  • The user told what changed

And additionally, in a harness project:

  • features.json audited against the actual work — every touched feature has updated status, test_file, coverage; unmapped work gets a new entry with discovered_via
  • Non-obvious root causes and gotchas recorded in context_summary.md
  • Retrospective written under ## Meta-Session [DATE] — mandatory even for single-session work
  • .harness/mld/YYYY-MM-DD-<session-id>.md written — lead only, and not a substitute for the retrospective
  • claude-progress.txt has the session handoff
  • Task list is current — no stale in-progress or pending tasks

Ten things newcomers get wrong

BeliefCorrection
Installing the plugin sets up my repoIt does nothing to a repo until /harness-init runs
./.harness/init.sh runs the quick checkIts default is full_test. Pass smoke_test explicitly
The retrospective and MLD are the sameThe retrospective is read by future sessions; MLD is read by nothing, by guarantee
Elevated risk means a stronger implementerIt escalates the review. Executors stay on the execution tier
Fewer than 5 files ⇒ single-sessionTwo verified independent features beat single-session regardless of file count
Worktree isolation is always saferNot when agents share an interface — they need to see each other's changes
No Workflow tool means no parallel workFall back to worktree-isolated subagents with the same agent types
The hooks make cheating impossibleEdit/Write enforcement is exact; Bash enforcement is pattern-based and evadable
A green task gate means the suite passesIt means smoke plus that one feature's test file. The suite runs at commit and session end
Coverage is measured for meIt is self-reported and compared against a target; it skips where no tooling exists

Glossary

Lead

The orchestrating session. Owns features.json, context_summary.md, and claude-progress.txt; in workflow mode it never edits feature code.

Scope

The directories and files a feature owns. Enforced mechanically on Edit/Write, best-effort on Bash.

Orientation

The block the SessionStart hook injects before you type: feature status, next claimable, last handoff, Active Context, warnings.

Spec gate

Read-only agents proving a spec is testable and unambiguous before implementation. PASS / ASK / BLOCK.

Readiness stamp

Signed proof of spec verification posted to an issue, validated by hash and HMAC by an external consumer.

MLD

Mistakes / Learnings / Desires. A raw per-session log, written by the lead, read back into context by nothing.

Worker epoch

A period during which the model and coding agent are held constant. Material changes trigger a requalification pass.

SESSION_INCOMPLETE

Discipline gaps recorded at session end and surfaced at the next session start. Self-healing, not preventive.

What it costs to have loaded

Always-on overhead is CLAUDE.md at roughly 4.2K tokens. The rule files are not auto-loaded — they cost tokens only when the model reads them, following pointers in the orientation block: parallel-work.md about 4K, code-quality.md about 0.3K. That is down from roughly 14.7K always-on in v3.2.1. In a project without .harness/, the orientation hook stays silent and neither rule file is pointed to or read.

Read the source

Everything on this site came out of the plugin repository. When this guide and the repository disagree, the repository is right.

← Evidence Back to the start →