How a phase is derived
Each task in a plan has a stable identity (a UUID stamped into the plan markdown). As commits land with that task’sTask: header, the hooks record
which commit played which role:
- a
test:commit → the task’s RED commit - a
feat:/fix:commit → the task’s GREEN commit - a
refactor:commit during an active review → the review-refactor commit
Starting a task
Work on a task begins by declaring it — before reading code, designing, or writing tests:in_progress and starts its RED clock. Without it,
the hooks can’t attribute commits to the task and the dashboard timeline
can’t follow the work. For tasks with nothing to test (docs, config,
templates), --phase green records that RED was deliberately skipped.
Who writes what
| Actor | Writes |
|---|---|
| You / your agent | plan markdown, code, commits, task start |
| commit-msg hook | validates headers and commit type against pipeline state |
| post-commit hook | attributes the commit to its task, advances the phase, starts reviews |
| review agents | verdicts and findings |
.git/tiny-brain/ and can be rebuilt from the commit
history in any clone — see the tracking model. The practical rule that keeps
the model sound: never hand-edit tracking state. If the state looks
wrong, the fix is finding the hook that should have written it.