AI SDLC Kit
Guide

Spec Phase

How to prepare the three artefacts that gate the implementation of each epic.

What is the Spec phase?

The Spec phase happens once per epic. It is the gate between planning and implementation. Before any epic can be implemented, three artefacts must exist and be human-validated:

  1. epic-N.md β€” context, scope, and completion criteria for the epic
  2. PRD.md β€” functional and non-functional requirements specific to the epic
  3. spec-epic-N.md β€” the implementable technical specification for the epic

Golden rule: Without a human-validated spec-epic-N.md, implementation of epic N does not start.


The prompt: /epic-init <N>

/epic-init

The πŸ—οΈ Architect agent asks for the epic number, then reads doc-specs/epics.md, doc-specs/technical-spec.md, and doc-specs/CONTEXT.md to generate the three artefacts under doc-specs/<N>-epic/.

The agent pauses after each artefact and waits for your confirmation before generating the next one. This creates three discrete HITL checkpoints.


The three artefacts

epic-N.md

Provides context and boundaries for the epic:

SectionContents
Epic overviewWhat this epic achieves in the broader project
ScopeWhat is included and explicitly excluded
Technical dependenciesEpics that must be complete before this one starts
Completion criteriaObservable signals that the epic is done

βœ… HITL: Does this epic boundary make sense? Are dependencies accurate?


PRD.md (per-epic)

A scoped PRD for the epic β€” narrower than the project PRD:

SectionContents
Functional requirementsWhat must work
Non-functional requirementsPerformance, security, accessibility constraints
Acceptance criteriaTestable conditions that define "done"
Open questionsUnresolved items that could block implementation

βœ… HITL: Are all FRs and NFRs measurable? Are acceptance criteria testable?


spec-epic-N.md

The core implementable specification:

SectionContents
Technical contextArchitecture decisions that apply to this epic
Implementation scopeFiles, components, and modules affected
Affected filesExplicit list of files to create/modify/delete
Implementation strategyStep-by-step plan with no ambiguous decisions
Test strategyWhat to test and how
Technical acceptance criteriaChecklist the Implementer must complete
Risks and open questionsAnything that could block implementation

The spec also includes a checklist section that the πŸ› οΈ Implementer agent must mark complete before handing off to the πŸ”Ž Reviewer. Unchecked items block the review handoff.

βœ… HITL: Is the spec specific enough to implement without dangerous assumptions? Are risks documented?


Verification checklist

Before authorizing implementation, the human reviewer should confirm:

  • epic-N.md clearly bounds the scope β€” nothing ambiguous about what is in and out
  • PRD.md has testable acceptance criteria with no open contradictions
  • spec-epic-N.md names specific files, functions, and interfaces to create or modify
  • All open questions are either resolved or explicitly acceptable as deferred decisions
  • No architecture decision in the spec contradicts CONTEXT.md

After the Spec phase

With all three artefacts approved, move to the Epic phase to implement the epic.