RED — failing tests first
The task begins with tests that pin the behaviour and fail:test: commit the hook runs typecheck and lint but skips the test
suite — the new tests are supposed to fail. That’s the point of RED.
Work with no test surface (docs, config, templates) skips RED explicitly:
the task is started with --phase green, which records that the skip was a
decision, not an accident.
GREEN — minimum code to pass
The implementation lands as afeat: (or fix:) commit with the same
tracking headers. Now the hook runs the full battery — typecheck, lint,
and tests — before accepting the commit. In repos with adversarial review
enabled (enableAdversarial), an
adversarial review of the work starts the
moment it lands.
REFACTOR — review-driven, not vibes-driven
If the review verdict is needs-refactoring, the findings come back as concrete suggestions and the fixes land as arefactor: commit. The hooks
only accept a refactor: commit while a review is active — refactoring is
a response to findings, not an unprompted rewrite.
Commit types
| Type | Stage | Hook behaviour |
|---|---|---|
test: | RED | typecheck + lint, tests skipped |
feat: / fix: | GREEN | full battery, then adversarial review starts |
refactor: | REFACTOR | requires an active review |
spike: | — | timeboxed exploration, tracked with headers |
chore: / untracked: | — | untracked work, no headers needed |
PRD: / Feature: / Task: headers (or Fix: /
Task: for bug work). The Task: value is the task’s exact description —
that’s how a commit attaches to the plan. A tracked commit without its
headers is rejected.
The result: reading the history of any task tells the whole story — what was
pinned, what was built, what the reviewer objected to, and what changed in
response. How the stages are derived from commits is covered in
Phases.