Spec-driven development creates and maintains natural language specifications as an integral, versioned component of software projects.
Specs are markdown files that define the functional requirements and validation strategy for a unit of software. Specs can describe a single file or many.
Specs add lightweight syntax to enable a broad array of tooling. The core elements are:
name, description, and targets list of the spec.[@test] links defining unit tests that verify functional requirements described in the spec.See Spec Format for more details.
A key element of spec-driven development is the initial requirement-gathering phase. When receiving a new task from a stakeholder, you MUST start with the following steps before beginning the implementation:
specs/ folderOnce the stakeholder confirms the accuracy of the specs, you may begin your implementation.
Once you complete the implemenation, perform the following review:
After generating or modifying code from specs, make sure implementation and tests remain synchronized:
targets and [@test] links accurate so reviewers can trace coverageSee Spec Verification for manual verification workflow.
Specs should be concise and scannable. They serve as technical documentation and requirements documents. Focus on capturing functional requirements, key user flows, and edge cases that must be supported in the final implementation.
See Spec Styleguide for more details.