A practitioner methodology for AI-native software engineering where specifications are the primary artifact and code is a generated side effect.
93
Quality
93%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Every one of these principles was learned by hitting the problem it prevents. They are listed in order of discovery, not importance — though the first few are the most fundamental.
Rewriting a spec and discarding a plan feels like rework. It is iteration. The spec is a few hundred words. Execution is files, tests, commits, reviews. Always invest in getting the spec right before executing.
The execution prompt should be: "Execute spec X." If you are adding context, caveats, or instructions, your spec has holes. Fix the spec, not the prompt.
The plan phase validates the spec against the current state of the codebase. Catch problems in the spec during planning, not during execution. Never skip straight to execution.
If the plan exposes ambiguity, missing requirements, or implicit assumptions, these are spec bugs. Update the spec, discard the plan, regenerate. The plan is disposable. The spec is the artifact.
If the agent encounters issues during execution, the solution is to debug and improve the specification, not manually fix outputs. Your cognitive budget is better spent on spec quality than on patching broken execution.
When execution produces wrong results, look at the spec first. Ambiguity, missing requirements, and implicit assumptions are spec bugs, not agent bugs. The agent that skipped plan approval and went straight to execution? That was a spec bug — the workflow document did not explicitly require plan approval before execution.
Never assume an agent knows a convention. If provenance files should be overwritten not appended, say so. If tools must return error strings not raise exceptions, say so. If a naming pattern exists in one part of the project, it must be documented for agents working in other parts.
If you know two sources of truth is wrong, fix it now. Do not defer to a "future spec." Having design tokens defined in both a JSON file and hardcoded in markdown is wrong on sight. Unify before executing.
Without explicit boundaries, agents expand scope. They update documentation you did not ask for, refactor code that was not in the spec, and add features that seemed related. Every spec needs an explicit "Out of Scope" section.
Plans will reduce verification checklists. Write: "Every check below is mandatory. Do not skip any." Include positive and negative tests. If the spec says 14 checks, the plan must have 14 checks.
Provenance files are generated as part of spec execution. They cost almost nothing and become invaluable as audit trails, case studies, and primary source material. The best documentation is a side effect of the process.
New layer: brief → spec → plan → execution. The brief captures human intent as bullet points. The spec is the precise, complete document an agent can execute. This distinction matters because the brief is where you think, the spec is where you hand off.
When reviewing a spec and you cannot tell whether it is good enough — execute two versions on different branches and compare the outputs. The spec is cheap. Execution is cheap. The delta between results tells you exactly what matters in the spec and what was noise. Do not theorise about spec quality — run the experiment.
Prompt 1: "create a plan." Prompt 2: a brief correction after plan review. Prompt 3: "execute." Total cognitive budget spent: reviewing the plan and writing a few sentences. If your execution takes more than three prompts, your spec has holes or your plan review is not catching enough.
Concrete bugs caught in sixty seconds of reading the plan, fixed with one sentence in the correction prompt. The step 6 decision gate is not ceremony; it is where you catch the bugs that would cost a whole re-execution to fix.
If execution cannot follow the spec exactly (environment constraints, missing tools, changed dependencies), log the deviation explicitly in the provenance file. Deviations are not failures — hidden deviations are.
Not everything can be automated. A verification checklist can confirm that a file exists, that LaTeX environments are defined, that CSS rules are present. But it cannot tell you whether the visual output looks right. The spec defines the structure; the human confirms the aesthetics. When visual tweaks are needed, they go back into the spec and are re-executed — the spec stays the source of truth even for intuitive judgements.
If the human is the entire loop — intent, creation, and validation — a spec adds ceremony, not value. Apply SDD to the slice that benefits from specification rigour. Ship the rest normally. The value is in knowing which part benefits, not in making everything a spec.
Each layer of specification, skill, and structured context makes the next layer faster. The first spec takes the longest. By the third, agents are producing working output on the first attempt. The investment in structured context pays back faster than expected because each artifact reduces the cognitive load for every subsequent task.
Install with Tessl CLI
npx tessl i kevin-ryan-io/spec-driven-development@1.1.0