Spec
Fill in the spec template for one feature. The top half defines the feature's requirements (what to build and for whom). The bottom half defines how to build and prove it. The spec is the ticket.
Process
- Read the request and the existing code it touches. Read
ARCHITECTURE.mdandREQUIREMENTS.mdif the repository has them, but do not require them. - Answer what you can from the codebase first. Never ask the user a question the code already answers.
- Interview the user on unresolved decisions that change behavior, data, interfaces, or security. Ask one or two related questions at a time, each with your recommended answer, and resolve one branch before moving to the next. Skip re-asking decisions already settled in the conversation.
- Copy the template into the ticket, or into
docs/<feature-slug>/spec.mdif there is none. Fill every section, replace every bracketed placeholder, and delete the guidance comments. Write "None" where a section has nothing. - If
ARCHITECTURE.mdorREQUIREMENTS.mdexists, check the spec against them and ask the user to settle any disagreement. - Stop when another agent could build the feature without guessing a decision.
Template
Use references/spec.md.
Rules
- Write in plain, simplified technical English. Keep every section short, direct, and free of filler.
- Keep existing
AC-n,J-n,REQ-n, andINV-nIDs. Never reuse or renumber them. - Link to
ARCHITECTURE.mdorREQUIREMENTS.mdonly when they exist, instead of copying them. Do not invent external IDs when they do not exist. - Every journey has at least one acceptance row that proves it.
- Every spec has a diagram. Check that it agrees with the text.
- Describe interfaces, schemas, rules, and testing seams (what boundary to test at and what not to mock). Leave the code and file list to the agent that builds it.
- For code that does not exist yet, describe the check as a scenario and expected result.
- Take the author from the request, or else from
git config user.name. Set the date each time the spec changes. - Set the status to Approved only when a human approves the spec. After delivery, set it to Delivered and link the PR.
Return
Report the spec location, the main decision and its tradeoff, and any blocking question.