When I began developing a tool for agents, designed to simplify the creation and management of specifications, I conducted research into the various types of specifications that exist. I identified 22 different forms, ranging from “living specs” to “implementation plans.” You can find them all in the table below.
Which specification formats should you choose for agent-based development? Clearly, “Formal Models” and “Contract Specs” are not universal solutions. They are best suited for highly specific, constrained scenarios.
The ideal way to maintain a final specification is within the source code itself. It is impractical to separate a vast number of technical details from the actual implementation. Source code describes these details far more effectively than any prose or specialized specification language.
Feature planning can begin with a proposal document (such as an RFC or PEP) and conclude with an “Implementation Plan.” This plan is essentially an “Issue-Tracker Item”, formatted in a way that is easily consumable by an agent. Tests and “Golden Files” (reference outputs) ensure that the implementation plan has been executed accurately and completely, covering both the “happy path” and various edge cases.
Bugs, as well as deferred ideas and features, are stored as backlog items, which, in practice, take the form of “Issue-Tracker Items”.
There are also documents and tools that define engineering practices, but that is a separate topic, I’ll save that for another time.
| # | Spec Forms | How it changes | What is current truth | Examples |
|---|---|---|---|---|
| 1 | Source code is spec | Regenerated from code on every build | Code (spec is a view) | OpenAPI generated from FastAPI/springdoc; rustdoc/Javadoc API reference; Tessl document –code |
| 2 | Tests | Updated deliberately when behaviour is meant to change | Past behaviour of the code | Characterization tests (Feathers); golden/snapshot files; recorded traffic |
| 3 | Issue-tracker item | Mutable forever, with a field-level changelog; workflow state machine; no freeze | The item while open; after “Done”, nobody maintains it, but nothing stops edits either | Jira epics/stories/bugs/sub-tasks; GitHub Issues; Linear |
| 4 | Disposable task spec | Thrown away | Code | Kiro; tickets/user stories with acceptance criteria |
| 5 | Change request with review record | Description editable before and after merge; review threads stay attached, marked outdated as the diff changes | Code that was merged | GitHub/GitLab PRs and MRs; Gerrit changes; Phabricator Differential |
| 6 | Proposal + separate living reference | Proposal frozen after decision; reference living | Reference / specification | Python PEPs/Rust RFCs + Reference |
| 7 | Living-until-done proposal | Updated through its lifecycle, then settles (often without a formal end) | The proposal, until implemented | Kubernetes KEPs; Google design docs; Amazon PR/FAQ |
| 8 | Delta spec merged into living spec | Delta frozen and archived; main spec mutated | Main spec | OpenSpec |
| 9 | Spec-as-source | Spec mutable; code regenerated | Spec | CodeSpeak; Tessl (SDD, Spec-Driven Development); MDD (Model-Driven Development); schema-first codegen at boundaries |
| 10 | Living draft + periodic snapshots | Living draft; frozen editions; defect reports attached to editions | Draft for implementers; edition for citation and conformance claims | ECMA-262 (draft + yearly ES20xx); WHATWG Review Drafts; ISO C/C++ (cplusplus/draft + C++20/23 editions + DRs) |
| 11 | Living standard | Edited continuously, no versions | The spec itself | WHATWG HTML |
| 12 | Archival + errata + Updates/Obsoletes | Frozen; corrections attached, never merged | Newest document in the obsoletes chain | IETF RFCs; HTTP: RFC 2616 → 7230–7235 → 9110–9112 |
| 13 | Decision record | Immutable; only status changes | Latest non-superseded record | ADRs (Nygard), MADR |
| 14 | Commit message | Immutable once merged (rewriting history is possible but rare) | Code; the message explains one change | Linux kernel’s submitting-patches rules; Conventional Commits; Gerrit Change-Id trailers |
| 15 | Reference implementation as spec | Whatever the implementation’s code does | The implementation | CPython (de facto semantics); Perl 5; Ruby MRI before ISO; Markdown.pl → CommonMark |
| 16 | Conformance test suite | Living; tests added as behaviour is clarified | The suite (implementers follow it when prose disagrees) | Test262; web-platform-tests; ruby/spec |
| 17 | Contract spec | Versioned, with compatibility rules | The schema | OpenAPI, Protobuf, JSON Schema, Avro + schema registry |
| 18 | Design by contract | Lives inside the code | Contracts in code, checked at runtime | Eiffel; pre/postconditions, debug_assert!-style invariants |
| 19 | Formal model (design-time formal model) | Written for a design; usually not maintained afterwards | Model at design time; code afterwards | TLA+, Alloy |
| 20 | Formal model (proof-linked spec) | Changes together with code; the build fails if they diverge | Spec and code, bound by proof | Dafny, SPARK Ada, seL4 (Isabelle), Fiat Cryptography |
| 21 | Executable spec | Living; CI forces it to stay true | The spec, verified by tests | Specification by Example book; Cucumber |
| 22 | Baselined requirements under change control | Living, but changed only via approved change requests; each approved state frozen as a baseline | Latest approved baseline | DO-178C, ISO 26262 programmes; IBM DOORS, Polarion |