Skill · pattern · spec-driven
Spec-driven work
Write the contract, failing test, or rubric first; the agent fills a shape you can verify. Use when the agent wanders, you can score the work, TDD with coding agents, or the user says spec-driven, failing test first, or 'don't let it improvise'.
GET /api/canon/skills/spec-driven?format=md
Done is a verifier, not a sentence. SWE-bench, TDD, and eval-opt are the same idea at different grains.
When
You can score the work. The agent would otherwise wander.
Do
- 01
Write the spec
Failing test, JSON schema, rubric, or OpenAPI contract — something that fails now.
- 02
Agent implements against it
Smallest diff. Run the verifier in the loop.
- 03
Refuse done without green
The harness does not take the model's word.
Don't
- Ask for a feature with no test and no rubric.
- Let the agent write tests that assert its own bugs.
Hard rules
- If you cannot score it, you do not have a product yet.
- Prefer tests you wrote or reviewed over tests the agent invented unsupervised.
Refuse
- No verifier in the loop — The agent writes code and declares victory. Tests, typecheck, and build are optional.
- Eval by demo — Architecture first, golden set never. Success is a recorded GIF.
Load with this
Load next
Trigger tests
Should fire
- “TDD with the coding agent”
- “Write the failing test first”
Should not
- “Exploratory research with no score”