| name | validate |
| description | Run the pre-merge Validation Pipeline on an Issue's worktree — intent-judge, then tests, then deterministic checks — each with a bounded fix-and-retry loop. Use for an Issue in validating/, and again at merge time for re-validation. |
Validate (the Validation Pipeline)
Runs in this order, fail fast so a wrong approach is caught before investing in test/lint
fixes (DESIGN.md §6).
Contract
- Input: an Issue and its worktree
.worktrees/<id>/ (branch issue/<id>).
- Used both in the
validating/ stage and again by Merge for re-validation against
current main.
Pipeline (in order)
- Intent-judge — spawn an independent subagent (NEVER the implementer). It compares
the diff (
git -C .worktrees/<id> diff main...issue/<id>) against the Plan if one
exists, else the issue.md description, checking BOTH directions:
- under-delivery — misses the intent;
- over-delivery — does more than the minimal thing / violates
# Out of scope.
Verdict: pass | revise | escalate.
- Tests —
cd app && npm test.
- Deterministic checks —
npm run typecheck, npm run lint, npm run format:check.
Failure handling (DESIGN.md §6, §9)
- Each check has a bounded fix-and-retry loop (max 3 attempts): on failure, have the
implementer subagent fix it in the worktree and re-run that check.
- A judge verdict of
revise feeds the fix loop. A verdict of escalate, or
exhausting any loop, ends in blocked.
- On
blocked: append the full failure context (which check, logs, diffs, what was
tried) into issue.md, so blocked/ is self-contained and actionable. There is no
separate transition log.
Verdict
result: pass | blocked
failedAt: judge | tests | typecheck | lint | format # when blocked
pass → caller routes to merge (auto-merge or needs-review/). blocked → /tick moves
the Issue to blocked/.