Spec Lifecycle

Spec Lifecycle#

Every feature lives under:

specs/<feature-name>/

The canonical state lives in spec.json.

Main Artifacts#

specs/<feature-name>/
├── spec.json
├── requirements.md
├── research.md
├── design.md
└── tasks/
    └── task-R*.md

Lifecycle#

  1. Create with /hapo:specs
  2. Refine requirements, research, design, and tasks
  3. Validate with /hapo:specs --validate <feature>
  4. Implement only when ready_for_implementation = true

Important Fields In spec.json#

  • status
  • current_phase
  • validation.status
  • task_files
  • task_registry
  • ready_for_implementation

Validation Gate#

Validation should ensure:

  • requirements match design
  • design matches tasks
  • tasks have completion criteria
  • tasks have verification and evidence
  • named contracts are explicit

If those are not aligned, implementation should stop.

Best Practice#

Do not treat the spec as disposable planning notes. In CafeKit, the spec is the runtime contract that hapo:develop, hapo:test, and hapo:sync all rely on.