Specs that stay true. Code that proves it.
temperspec takes a task from its acceptance criteria to tested code and a draft pull request, writing the specs the task needs on the way. What "done" means is fixed before any code is written, and the gate runs the proof itself.
This repository is built by running temperspec on its own issues. Its live checks and real-run results are kept in the package's live-checks plan.
Writing specs first is easy. Keeping them honest is the hard part.
Spec-driven development with coding agents promises reviewable intent before code. In practice, the agent that wrote the code also decides whether it matches the spec, and the specs pay for every change twice.
"Done" is decided after coding
The agent reports success, and the report is taken as proof. Nobody fixed beforehand which test proves which criterion.
Specs drift from code
Specs disagree with each other, miss behaviours, or describe the change instead of the system. Soon nobody trusts code because of a spec.
Docs cost too much
Versions, change logs and "who links to me" lists turn a two-spec change into ten edited files.
Every task gets the same ceremony
A one-line fix walks the same long path as a redesign, or a redesign gets the shortcut meant for a fix.
Rules for documents, a gate after every step, and proof fixed in the plan.
Proof before code
The plan ends with a proof table: for each acceptance criterion, the test file that will prove it and the command that runs it. The code gate runs those commands itself, whatever the step reported, and checks that a test carries the criterion's id and is not skipped.
A gate after every step
A model-free check first, then a read-only judge. A gate that finds the defect in an earlier step's output sends the run back there by itself. The engine commits after every step.
An independent reader
After the code step, a read-only reviewer is given the change, the task's criteria and the repository, and never the plan, the notes or any earlier judgement. A blocking finding sends the run back.
Specs without cascades
No version, date, status or change log in a spec. A link names an id, never a section number. An index is generated. A spec is edited only where a behaviour or criterion changes.
The right lane for the task
A small fix takes the quick lane, an ordinary change the standard one, and a large plan is expanded into phases. The engine's switch decides from measured facts, and a run never moves to a lighter lane.
A pull request that says what to read
Written with no model: the criteria, the behaviours that changed in each spec, the decisions and open questions, the deviations, and the assumptions to confirm.
From a task to a draft pull request.
Start with tempergraph run temperspec "<the task and its acceptance criteria>". Add "docs only" to stop after the specs. The way forward reads left to right; every dashed line is a trip back a gate can order.
tempergraph graph temperspec output. The quick lane takes a small fix that changes no spec straight from triage to code. Not shown: first-time repository setup, the short discovery visit, and every trip back. Brown boxes are model steps, grey dashed boxes are scripts, diamonds are gates.A fix doesn't pay for a redesign.
Triage proposes the lane. The code gate measures the change afterwards: a spec edited, a file the note does not name, more than two code files or more than 200 changed lines sends a quick-lane run back to triage, which then plans it. A run never moves to a lighter lane.
Between standard and full, the engine's complexity switch code_mode reads the facts the plan check recorded, not the plan's own word. You can name the arm yourself with --arm code_mode=single or phases.
| Lane | Path |
|---|---|
| quick | triage → code → regeneration no gap, at most 3 criteria, at most 2 code files beside their tests |
| standard | triage → discovery → plan → code → regeneration → independent review a change of ordinary size |
| full | triage → discovery → plan → expand → phase → code → regeneration → independent review a plan over a limit of the plan rule's complexity table |
| Criterion | Test file | Command |
|-----------|--------------------------------|----------------------------------|
| AC 1 | tests/test_session_expiry.py | python -m pytest tests/test_session_expiry.py |
| AC 2 | tests/test_session_expiry.py | python -m pytest tests/test_session_expiry.py |
| SES-AC3 | tests/test_token_storage.py | python -m pytest tests/test_token_storage.py |
The gate runs the proof. The step's word is not enough.
The code gate runs every command in the proof table itself and checks that a test in the named file carries the criterion and is not skipped. A command that fails is compared with the run's base commit: a failure that was already there ends the run in an escalation instead of burning retries.
The outcome gate applies the same rule to every criterion the run added or reworded in a spec. The illustration on the left is made up; the format is the plan rule's.
One batched pause, or none at all.
Triage sorts every gap into one the code, the documents or a public source can answer, and one only the owner can. For each owner decision it writes the question, two to four options, a default and the cost of a wrong default. The conversation setting says how much a run may ask.
never
No step stops to ask. Discovery closes each decision on its default, and the pull request lists every default under "Assumptions to confirm". For pipelines and overnight runs.
blocking (default)
One pause after the reading sessions, with one question per owner decision and per blocking question the reading could not answer. A run with neither pauses nowhere.
always
The same pause, plus a check of the reading of each findable gap. A reading answered "wrong" keeps the pause open until it is put right.
A pause holds at most 20 questions and has a deadline; after it, the run goes on with the answers given and the default of each open question. The answer skill walks the owner through them.
What its criteria are, and what 21 runs cost.
The workflow's good outcome is written down in outcome.json, criterion by criterion, each with its verifier. The run figures come from the same 21-run batch shown on the tempergraph page.
Where the spend went, by step
Each step's own sessions, retries and judges together; $404.24 in all. Source: stats/sessions/2026-11.jsonl on the stats branch.
Reading the numbers
Discovery, which reads the code and writes the specs, takes 42% of the spend. The code step holds 61% of session time for about 10% of the spend: it waits on the test suite. Judges, the whole independent grading layer, take 13%.
State of verification
- The model-free rungs of
author verifypass; the judge-seed rung graded every seed as expected, and two capped trial runs reached the outcome gate with verdictmet. - Real runs on this repository finished with every gate passed and pushed their branch.
- Opening the draft pull request at the end of a real run has not been shown yet.
- The quick lane's limits are first values, with no measured run behind them.
Install the package, write the task, start the run.
temperspec is a workflow package for the tempergraph engine. Install the engine first (quick start), then add temperspec from the same marketplace.
claude plugin install temperspec-tgraph@tempergraph
# check first, with no spend; then start
tempergraph run temperspec --check "Add session expiry. AC 1: ..."
tempergraph run temperspec "Add session expiry. AC 1: ..."
# work in its own worktree, so your checkout stays free
tempergraph run temperspec tasks/i42.md --worktree --worktree-base head| Skill | For your own session |
|---|---|
task | Get a task into shape, with numbered acceptance criteria, and start the run |
answer | Walk through a paused run's questions and resume it |
setup | Install or update the document rules, per repository or per machine |
extract | Write a spec for existing code that no spec describes |
groom | Bring old specs up to the rules without losing a requirement |
review | A second look at a plan, or at a finished change against its specs |
The rule files (spec, plan, decision, research, task-notes, documents, extraction) are installed into the repository the first time a run meets it, and the checks read the same formats. Everything else is in the package README; features it still wants are issues labelled area: temperspec.
Build your own workflow the same way.
temperspec uses tempergraph like any other package: through its API, its manifests and its settings. The engine names no workflow, so what temperspec needed became capabilities every workflow can use.