Produces exactly three files under docs/specs/<feature-slug>/: requirements.md (behavior and acceptance, EARS), design.md (normative technical contract: single source of truth for APIs, JSON payloads, HTTP status codes, and operational policies), tasks.md (ordered work and verification). MUST match the repository canonical example layout when docs/example/{requirements,design,tasks}.md exist—same section order and heading levels; do not invent top-level sections, rename stable headings, or rely on custom HTML id anchors for cross-links. Design states concrete values only: forbid "pick one", "either A or B", "before verification", and placeholder tables (e.g. "_e.g. 200_"). Cross-links use real Markdown headings so URL fragments match editor and GitHub slug rules. Use when the user asks for SDD, spec, PRD, Kiro-style feature specs, or separate requirements / design / tasks documents. Supports Requirements-First and Design-First workflows.
Generate a complete three-file spec for the described feature, replicating Kiro's spec workflow. Read references/EARS.md before writing any requirement. Read references/FORMATS.md before creating any file.
Layout source of truth
docs/example/requirements.md, docs/example/design.md, and docs/example/tasks.md, treat them as the canonical skeleton: same top-level sections, same heading levels (#, ##, ###, ####), and same patterns (tables vs lists) as in those files. Fill content for ; substitute a different outline (for example the shorter template in FORMATS alone).<feature-slug>Separation of concerns
requirements.md: What must hold and how we know (EARS acceptance criteria). Reference the design for specifics (design.md#heading-slug). Do not duplicate long normative tables (status codes, route matrices, JSON schemas) if they already live in design.md.design.md: How in closed, verifiable detail—routes, methods, request/response bodies, HTTP status integers, error shapes, queues, retries, DLQ, etc. This file is the single source of truth for those facts.tasks.md: Order of work plus verification steps that point to requirement ids and design headings; do not restate full contracts inline.Anchors and cross-links
#### 8.1 Routes table, etc.). Do not depend on <a id="...">** for Cursor/VS Code preview.Forbidden in normative design prose (anything a verifier would need as a single expected value)
_e.g._ in place of a committed value in a canonical table.Ask the user:
"Which workflow do you want to use?
- Requirements-First — you know the desired behavior; architecture will adapt to meet it.
- Design-First (High Level) — you have a system architecture in mind; requirements will be derived from it.
- Design-First (Low Level) — you have pseudocode, interfaces, or algorithms in mind; requirements will be derived from them."
Wait for explicit selection before proceeding.
Derive <feature-slug> from the feature name (lowercase, hyphens only).
All files go to docs/specs/<feature-slug>/.
Flow: Requirements → Design → Tasks
Ask clarifying questions if the feature description is ambiguous:
Generate docs/specs/<feature-slug>/requirements.md following
references/FORMATS.md and, when
present, the section order and headings of docs/example/requirements.md.
Requirements rules:
WHEN … THE SYSTEM SHALL … as the primary patternSTOP. Show the file and ask:
"Here is
requirements.md. Does this capture everything correctly? Let me know what to change before I move on to the design."
Wait for explicit approval ("looks good", "approved", "proceed", etc.) before continuing.
Generate docs/specs/<feature-slug>/design.md following
references/FORMATS.md and, when
present, the section order and headings of docs/example/design.md.
Every architectural decision must trace back to at least one requirement
number from requirements.md.
Normative contract: Any API, payload, status code, or policy a tester could assert MUST appear once, concretely, in this file (see Non-negotiables). No placeholder rows or deferred choices.
Include a Mermaid sequence diagram for the main flow (unless the canonical example omits it for this feature type—then match the example).
STOP. Show the file and ask:
"Here is
design.md. Does the architecture look right? Any changes before I generate the tasks?"
Wait for explicit approval before continuing.
Generate docs/specs/<feature-slug>/tasks.md following
references/FORMATS.md and, when
present, the section order and headings of docs/example/tasks.md.
Tasks rules:
design.md#heading-slug (and
requirements.md ids) instead of re-embedding full status or JSON specsSTOP. Show the file and ask:
"Here is
tasks.md. Ready to start implementing, or do you want to adjust anything?"
Flow: Design → Requirements → Tasks
Ask clarifying questions if needed:
Generate docs/specs/<feature-slug>/design.md following
references/FORMATS.md and, when present,
docs/example/design.md layout. Apply Non-negotiables: the design
must already contain committed technical values (no "TBD" tables).
Include all constraints and non-functional requirements explicitly.
STOP. Show the file and ask:
"Here is
design.md. Does the architecture match your intent? Iterate here before I derive the requirements from it."
Wait for explicit approval before continuing.
Derive requirements from the confirmed design.
Generate docs/specs/<feature-slug>/requirements.md following
references/FORMATS.md and, when
present, docs/example/requirements.md layout.
Requirements must be feasible given the confirmed architecture — do not add behaviors the design cannot support.
Write every acceptance criterion in EARS format (see references/EARS.md).
STOP. Show the file and ask:
"Here is
requirements.mdderived from your design. Does this reflect all the behaviors you expect? Any gaps before I generate the tasks?"
Wait for explicit approval before continuing.
Same as Workflow A, Phase 3.