Write spec
Input: work/<feature>/intent.md. Output: work/<feature>/spec.md from factory/templates/spec.md.
- Read
intent.md,CLAUDE.mdand the parts of the codebase the change will touch. A spec written without reading the code misses constraints; that is the most common failure. - Write user stories in priority order (P1, P2, P3). Each P1 story must be independently shippable and testable.
- Give every functional requirement a stable ID (
FR-001) and every success criterion one too (SC-001). Reviews and tests refer to these. - Flag inline, never silently resolve:
[NEEDS CLARIFICATION: ...]for any decision the intent doesn't settle[POLICY: privacy | security | legal | money | brand]wherever a rule applies, with the rule
- Write the design section only as deep as the plan needs: data changes, interfaces, states, error cases.
- List what is explicitly out of scope.
- Show the spec, resolve every
[NEEDS CLARIFICATION]with the human, then save. Committingspec.mdis the trigger for plan mode.