Structured Plan → TDD Build → Acceptance Criteria Verification loop for a GitHub issue. Run inside a worktree after /feature-start. Nothing ships without every acceptance criterion verified. Triggers on "build issue", "implement
Run this inside a worktree after /feature-start. Guides a structured
Plan → TDD Build → Acceptance Criteria Verification cycle. Nothing ships
without every acceptance criterion explicitly verified.
Usage: /build-feature 42
Every step maps back to the issue's acceptance criteria. Write the plan before touching source files. Write tests before writing implementation. Verify every acceptance criterion before declaring done.
gh issue view $ARGUMENTS
Before writing a plan, understand existing patterns:
/src/lib/ for existing utilities before writing new onesStructure the plan as:
Ask: "Does this plan look right? Any changes before I start building?" Wait for confirmation before writing any code.
Use Plan Mode for this step — stop and re-plan if the approach isn't working.
For each piece of logic:
# Confirm tests fail before implementation (expected)
npm test -- --testPathPattern=[test-file] 2>&1 | tail -20
any types — use unknown and narrow, or define proper typestry/catch swallowing errorsconsole.log/src/lib/ before writing new utilitiesAfter each logical chunk:
npm run typecheck 2>&1 | tail -20
npm run lint 2>&1 | tail -20
Fix errors immediately — never let them accumulate.
/verify
All checks must pass. Fix anything failing before proceeding.
Go through each criterion from the issue and confirm it is met:
Acceptance Criteria Audit:
✅ [Criterion 1] — verified by: [test name or observable behavior]
✅ [Criterion 2] — verified by: [test name or manual check]
⚠️ [Criterion 3] — UNMET: [what's missing]
If any criterion is unmet, do not proceed — address it first.
git add [specific files — never git add -A without reviewing]
git commit -m "feat([scope]): [what was built]
- [Key change 1]
- [Key change 2]
Refs #$ARGUMENTS"
The pre-commit hook runs lint-staged automatically.
git push
Check CI:
gh pr checks
Update the draft PR body with what was built and which acceptance criteria are met.
Report:
/human-test $ARGUMENTS for human validation, then /pr-prep $ARGUMENTS