From claude-harness
Autonomous TDD implementation in a worktree, followed by gate checks and a critic/review loop. Stops at checkpoint 2 for lead approval to merge.
How this command is triggered — by the user, by Claude, or both
Slash command
/claude-harness:implementFiles this command reads when invoked
The summary Claude sees in its command listing — used to decide when to auto-load this command
Autonomous TDD implementation in a worktree, followed by gate checks and a critic/review loop. Stops at checkpoint 2 for lead approval to merge. If `.tickets/_learnings.md` exists, load it via @.tickets/_learnings.md. If `.tickets/_conventions.md` exists, load it via @.tickets/_conventions.md. ## Ticket Resolution A ticket number argument is required. If none is provided, scan `.tickets/` for tickets with `status: solution`. If exactly one exists, use it. If multiple exist, list them and require the lead to specify one before continuing. --- ## Pre-flight 1. Read `problem.md`, `requir...
Autonomous TDD implementation in a worktree, followed by gate checks and a critic/review loop. Stops at checkpoint 2 for lead approval to merge.
If .tickets/_learnings.md exists, load it via @.tickets/_learnings.md.
If .tickets/_conventions.md exists, load it via @.tickets/_conventions.md.
A ticket number argument is required. If none is provided, scan .tickets/ for tickets with status: solution. If exactly one exists, use it. If multiple exist, list them and require the lead to specify one before continuing.
problem.md, requirements.md, and solution.md for the resolved ticket. If there are unresolved open questions that block implementation, raise them before proceeding.All main-repo git operations must complete before any subagent is spawned. Do not proceed to the TDD cycle until git setup is confirmed.
Create the branch:
git branch ticket/XXXX-<slug>
Create the worktree:
mkdir -p .worktrees
git worktree add .worktrees/XXXX-<slug> ticket/XXXX-<slug>
Confirm the worktree directory exists at .worktrees/XXXX-<slug>. If either git command failed (e.g. index lock contention), stop and report the error — do not attempt to continue with a broken worktree.
Update status.md to status: implementing.
For each item in the Implementation Order from solution.md:
Based on the Test Plan in solution.md, write the tests for the current requirement before writing any implementation code. Tests should:
Write the minimum implementation code needed to make the tests pass. Do not over-engineer. Do not add features not covered by the current tests.
If the code can be made clearer or more maintainable without changing behavior, do so now. Run tests after refactoring to confirm they still pass.
Repeat A → B → C for each requirement.
When all requirements have passing tests:
Run the full test suite and confirm everything passes.
Commit all work in the worktree:
git -C .worktrees/XXXX-<slug> add .
git -C .worktrees/XXXX-<slug> commit -m "feat: <short description>"
Confirm the commit succeeds and git status shows a clean tree before continuing.
Update status.md to status: review-ready.
Run /gate XXXX to execute lint, type-check, SAST, and the full pytest suite against the worktree. Results are written to .tickets/XXXX-<slug>/gate-findings.md. Address any failures, commit fixes, and re-run /gate XXXX until the report is clean. The critic should not see issues the gates can already catch.
UI smoke (conditional). If git -C .worktrees/XXXX-<slug> diff --name-only main | grep -E 'templates/|routes/|static/' is non-empty, start the dev server in the worktree, exercise the changed flow end-to-end in a browser, and capture a one-paragraph observation (URL hit, expected response, any errors) for the Checkpoint 2 summary. If you cannot run a browser, say so explicitly — do not silently skip.
Verify that all artifact files and the implementation exist and are non-empty before spawning the critic:
.tickets/XXXX-<slug>/problem.md.tickets/XXXX-<slug>/requirements.md.tickets/XXXX-<slug>/solution.md.tickets/XXXX-<slug>/gate-findings.md.worktrees/XXXX-<slug>/Spawn the critic subagent (subagent_type: critic) with this brief:
Phase: code Ticket: XXXX- Round: 1 (max 2)
Follow
@${CLAUDE_PLUGIN_ROOT}/context/critic-brief.md. Read.tickets/XXXX-<slug>/gate-findings.mdbefore reviewing — do not re-flag what the gates already covered. Focus on dimensions gates cannot cover: abstraction, naming, domain modeling, McGraw design-level flaws, panel-specific issues. Read all source and test files in.worktrees/XXXX-<slug>/before producing any finding.
For each finding from the critic:
.tickets/, and note it as deferred.If any fixes were made, commit again, then re-run /gate XXXX to confirm gates still pass:
git -C .worktrees/XXXX-<slug> add .
git -C .worktrees/XXXX-<slug> commit -m "fix: address review findings"
If the critic produced any Must-fix items in Round 1, spawn a second critic round (Round: 2) to review the fixes. Maximum 2 rounds.
Present a concise summary and wait for approval:
## Checkpoint 2: Ready to merge?
**Ticket**: XXXX — <title>
### Implementation summary
<2–3 bullets: what was built, test count, all passing>
### Review findings
- Must-fix: <count and what was fixed, or "none">
- Should-fix: <fixed items + any deferred ticket numbers, or "none">
- Suggestions: <brief list, or "none">
### Deferred tickets
<Ticket numbers and titles for any large should-fix items. Empty if none.>
---
Approve to merge? (yes / no / feedback)
Do not merge until the lead approves. Run /merge XXXX once approved.
Do not push unless the lead asks.
npx claudepluginhub bradleysmock/claude-harness --plugin claude-harness/implementImplements tasks from a Conductor track plan using strict TDD workflow (red-green-refactor). Auto-selects incomplete track if unspecified; accepts track-id, --task, --phase args.
/implementImplements features/code by activating specialist personas and MCP tools (Context7, Sequential, Magic, Playwright) for analysis, generation, security/QA validation, testing, and integration.
/implementImplements a feature from spec via structured workflow: understand requirements, create feature branch, design, code incrementally with tests, self-review, and PR. Outputs change summary.
/implementAutomates full Evaluate-Loop for a track: detects state, dispatches planner/evaluator/executor/fixer agents, loops on failures until complete. Optional track ID.
/implementStarts task execution loop for active feature: reads state, validates prereqs, commits specs via git, initializes .speckit-state.json, launches coordinator.
/implementStarts task execution loop for active spec: resolves/validates spec and tasks.md, parses iteration/recovery flags, initializes .ralph-state.json, runs tasks via coordinator until complete.