Spec-driven development

Spec-driven development that actually gets verified

Spec-driven development means writing down what the software must do — requirements, edge cases, and the rules the project will not break — before any code is written. It is an old idea that got useful again the moment coding agents arrived, because an agent will happily build the wrong thing very quickly.

The order is right. What is missing is the part that comes after.

With a coding agent, the spec is only half the job

A spec tells the agent what to build. Then the same agent writes the code, decides whether it met the spec, and tells you it is done. The thing being measured is also doing the measuring.

That holds up fine until the spec says something subtle — an error path, a rule about data that must never cross a boundary, a case nobody wrote a test for. Those are exactly the clauses an agent is most likely to report as satisfied and least likely to have satisfied. And they are the ones that matter, because they are the reason the spec was written down.

Reviewing every diff by hand puts the bottleneck back where it was. The answer is not to trust the agent more or read more diffs; it is to make the spec checkable by something other than the agent.

Keep the spec. Add the evidence.

Planwright holds the spec as structured acceptance criteria and then checks them against things the agent does not control.

Acceptance criteria that include the error cases
Written EARS-style where it helps: “IF the token is expired, THEN THE SYSTEM SHALL return 401.” The clause that is easiest to skip is the one that gets written down.
Invariants, approved by a human
Project-wide rules such as “audit records are never modified” or “no query reads across workspaces.” The agent proposes them from your context files; a person approves each one; every change that touches one has to pass its tests.
Every criterion linked to a real test
You can see which criteria are guarded by a test in your repo and which are not. An unguarded criterion is visible rather than assumed.
Results from your CI, not the agent's summary
The evidence comes from your own pipeline. When the agent and CI disagree, the reviewer sees both and decides.
Tests first, at the strictest level
Tests are written and locked before the code, and they have to fail first. A test that never failed proves nothing.
Signed approvals
Every acceptance is appended to a hash-chained, signed audit trail: who approved what, against which criteria, on which commit. It cannot be edited afterwards, including by us.

What Planwright does not do: it does not generate tasks from your spec and it does not run your code. Your agent does the breakdown and the work. Planwright states what must hold, and checks the evidence.

One objective, start to finish

This is the shape of a spec Planwright can actually check.

Expired tokens cannot read another workspace's objectives

Intent: A leaked or stale token must not become a cross-tenant read. This is the invariant an auditor asks about first.

Acceptance criteria, and the test guarding each

  • IF the token is expired, THEN THE SYSTEM SHALL return 401 and no objective data

    mcp/auth.test.ts › rejects an expired token · passed in CI

  • IF the token is valid but scoped to another workspace, THEN THE SYSTEM SHALL return 403

    mcp/auth.test.ts › refuses a token from a different workspace · passed in CI

  • A rejected request appends an audit record naming the token and the workspace it tried to reach

    audit/chain.test.ts › records refused cross-workspace reads · passed in CI

Invariant enforced: No query reads across workspaces

The agent cannot move this to done. It can request acceptance; a person rules on it, and that ruling is signed. Everything mechanical — did the tests run, did they pass, is each criterion covered — is answered before a human looks, so the human spends their attention on the judgment calls.

It works with the tools you already have

Planwright connects to Claude Code, Claude Desktop, Cursor, Codex and Amp over MCP. The agent reads its objectives and criteria from Planwright and checks its work back in; you keep whichever agent you already like.

If you already write specs with Spec Kit or Kiro, keep them. Their output works as a context file: Planwright reads it as the source for drafting acceptance criteria, then verifies against it. The gap being filled is downstream of the spec, not at it.

Try it on one objective

Connect your agent, write one objective with its acceptance criteria, and watch what comes back get checked. Free covers a single developer and one project.

Already have Claude Code?

claude mcp add planwright --transport http https://mcp.planwright.tools/mcp
Does this replace Spec Kit or Kiro?
No. They produce a spec; Planwright reads it as a context file and then checks that what came back satisfies it. If you already write specs with one of those, keep doing that — the gap this fills is downstream of the spec, not at it.
Does Planwright run my tests?
No. Your CI runs your tests, and Planwright reads the results as independent evidence. That separation is the point: if Planwright ran the tests and also judged them, it would be making the same mistake it exists to catch.
Does it write the spec for me?
It drafts acceptance criteria from whatever you bring — a transcript, a thread, a requirements doc — and you edit them. Drafting is cheap; deciding what finished means is the part worth your attention.