Deep Dive: Spec-Driven Development
The spec is the contract an ADW run is measured against. Agents don't implement your intent — they implement the spec. So the quality of an ADW run is capped by the quality of its spec: a vague spec produces vague work; a spec that pulls in the right context, names the real files, and states how to verify itself produces work you can actually merge.
This deep dive is the "why and how" behind Module 3. It covers the methodology, where a spec gets its context, the anatomy of a proper spec, and how the spec drives the rest of the loop.
The one rule
/spec-create. Never hand-write a spec file./spec-create is the single entry point. It deduplicates against existing
specs and tasks, infers the target project, researches that project for
context, writes the spec in the house format, registers a digest task, and
uploads the spec to the shared store. Writing a spec file by hand (a raw
Write) skips every one of those steps — the spec ends up ungrounded,
unregistered, and invisible to the pipeline.
Where a spec gets its context
A good spec is mostly context the agent would otherwise have to guess.
/spec-create gathers that context up front, from distinct sources, so the
implementing agent starts grounded instead of inferring from whatever it happens
to read. Click each source to see what it contributes.

Click any step to see what happens and who's responsible.
How a spec is formulated — the phased flow
/spec-create runs an adaptive pipeline. Step through what actually happens
between your one-line description and a registered, grounded spec.

1. Load planning state (silent)
Quick mode vs deep mode
The pipeline scales to the input. Answer honestly and it tells you which path you're on.
Is your idea a clear, single-project change?
Anatomy of a proper spec
The house format exists so every spec carries the same load-bearing sections. Click each to see what belongs there — and why a missing section shows up later as a bad ADW run.

Click any step to see what happens and who's responsible.
Methodology, architecture & deployment belong in the spec
A proper spec doesn't just say what to build — it fixes the architecture and deployment decisions so the agent doesn't invent them. Real specs state the stack, the hosting/deploy model, the auth model, and the access/roles up front. For example, the Avalara reconciler's spec named its whole shape in one place:
Gen-2: OpenSpec + roadmap-as-code
Newer projects (starting with Avalara) formalize the spec into OpenSpec: a
change is a folder with proposal.md (Why / What Changes), design.md
(architecture decisions), and tasks.md (the deliverables) — plus a structured
roadmap.toml where each deliverable moves planned → implemented → validated → deployed, and a CI gate that refuses to mark anything "validated" without its
evidence. Same spirit as the .md spec, made machine-checkable.
How the spec drives the ADW loop
Once registered, the spec is what every downstream step is measured against. Put the flow in order:
Notice the spec appears at both ends: it seeds the plan, and it's the yardstick the maker-checker and the evidence gate judge against. A weak spec weakens every step after it — which is why formulation is where the leverage is.
Try it
Hands-on lab
- From
~/projects/wg-orchestration, run/spec-create "<a small, real change you understand>"and watch the phases: notice the dedup check and the project-research step. - Open the spec file it wrote under
specs/. Read the Project Context and Verification sections — would an agent that read only this spec know what to build and how to prove it? If not, that's the gap to tighten. - Compare a Gen-1
.mdspec with a Gen-2 OpenSpec change (e.g. Avalara'sopenspec/changes/.../proposal.md). Note whatdesign.mdandroadmap.tomladd. - Pick one section of your spec and make it more concrete — add a real file path, a specific command in Verification. That single edit is the highest-leverage thing you can do for the run.