PRD-tracked work
Fix-tracked work
The rules
Task:is matched by equality against the task description in the markdown (whitespace trimmed, escaped backticks tolerated). A reworded header fails to resolve and the commit is rejected — copy the description exactly as it appears in the feature or fix file.- One commit can close several tasks — give it one
Task:header per task. All of them are tracked against the same SHA. - Every stage carries the same headers — the
test:,feat:, andrefactor:commits of one task all reference it identically; the commit type is what distinguishes RED from GREEN from REFACTOR (see the loop). - Untracked work needs no headers —
chore:anduntracked:commits pass through the hook without them. Use them for maintenance that belongs to no plan, not to dodge tracking. - Write the why. The body is for the reasoning — the diff already says what changed.
Scopes
The parenthesised scope (feat(api):, test(signup):) is conventional-
commits style and yours to choose — the hooks key off the type and headers,
not the scope.