feature.yaml standard for writing plain-language specs.
Be sure to read our spec-driven development guide as well.
What is a feature spec?
A feature spec defines what your feature should do and what the acceptance criteria are. It easy to read and write, but is written in YAML format so that it is also machine-readable. Here is a minimal example:Basic Structure
As shown above, the feature spec has three main sections:feature: Metadata about the feature, such as its name, version, product and description.components: Functional requirements, organized into component groups.constraints: Cross-cutting or plumbing requirements (like performance, authorization, data privacy)
Cross-Referencing
If one requirement relates to another, you can reference it using its complete ID (known as the ACID) likemy-feature.COMPONENT.1-1.
Handling Deprecated Requirements
Instead of deleting requirements (which loses history), you should mark them with flags so the context is preserved for the future:Adding Notes
You can also attach context notes directly to requirements. There are two ways to add notes.That’s really all there is to it. This format balances simplicity and flexibility. You can be as precise or vague as you want, as long as your requirements are testable and acceptable. Writing in a .yaml rather has a few obvious benefits, like machine readability, consistency, and generation of predictable & stable IDs. If you want to quickly teach an LLM how to write a feature.yaml, we have formalized the official feature.yaml spec in a feature.yaml specification!
If you are looking for a detailed, formal specification of the
feature.yaml format, please see the feature.yaml spec (a spec-for-the-spec!)