
Inspiration
AI coding agents are very good at building features that look finished. The screenshot looks right and the agent says "done". Then you refresh the page and your data is gone.
Kiro already does the hard first half: requirements with acceptance criteria before any code. But nothing answers the last question: did the code actually meet those criteria? "The AI says it works" isn't evidence. I wanted an honest referee between the spec and the agent, one that an agent can't talk its way past.
What it does
TrueSpec turns a Kiro spec into real browser checks, records evidence for every acceptance criterion, and hands that evidence to Kiro over MCP. A fix only counts when a later run actually passes.
🧪 See it in action
⚡ Is the spec actually proven?
Every acceptance criterion is checked in a real browser, live. The broken demo fails exactly 3 tests.
🔍 Evidence, not opinions
Failed step, expected vs actual, screenshots, trace and reproduction steps for every failure.
- Reads your spec. It imports Kiro
requirements.md(EARS acceptance criteria), Markdown or JSON, and auto-detects every.kiro/specs/*. Vague requirements like "should feel fast" are flagged as untestable, not quietly passed. - Proves each criterion, not just each test. Every test declares which acceptance criteria it covers. If the tests pass but a criterion has no test, the requirement shows as partially verified, never as a green check.
- Runs in real browsers. Declarative steps (no arbitrary JavaScript) run in Chromium, Firefox or WebKit through Playwright. That includes accessibility scans (axe-core), visual baselines with diff images, HTTP API checks, performance budgets, and drag gestures for canvas apps.
- Records evidence. Every failure gets:
- the failed step and expected vs actual;
- screenshots, with password fields masked;
- console errors, failed network requests and a Playwright trace;
- reproduction steps, and a note on what the test does not prove.
- Closes the loop with Kiro over MCP. Eight tools let Kiro run verification, fetch failure evidence (the screenshot arrives as an image), record repairs and re-run. A repair is marked verified only by a later passing run, never by the agent's own claim.
- Tests the tests.
truespec mutateplants small bugs in your app and reports which ones no test catches. It found missing boundary tests in our own demo. - AI-drafted tests that can't cheat. Claude or a free Gemini key can draft tests for untested criteria. Drafts are saved as skipped and never count as passes until a human reviews them.
- Fits your workflow.
- A dashboard with live progress, traceability, run comparison and an audit log.
- A CLI with CI exit codes, JUnit XML and GitHub step summaries.
- A self-contained HTML/PDF report you can send to anyone.
- Links to GitHub, GitLab and Bitbucket.
- Local-first and honest. No account. The server only listens on your own machine (127.0.0.1) and only opens folders you approve, with secrets redacted. Each run records the git commit it tested and a checksum that reveals any later edit to the report.

It's not tied to our demo: I pointed it at Halfsies, an unrelated canvas game, and it proved all 5 requirements with drag-gesture tests.
🎮 Works on any web app
We pointed TrueSpec at Halfsies, an unrelated canvas game. Drag-gesture tests proved all 5 of its requirements.
How I built it
The Frankenstein part: TrueSpec stitches together parts that were never meant to be one product:
- Kiro's spec format;
- Playwright browser automation, axe-core accessibility scanning and pixelmatch visual diffs;
- Zod schemas, a Fastify server with live updates and a React 19 + Tailwind dashboard;
- the Model Context Protocol (MCP), which feeds results back into the agent that wrote the code.
It's a TypeScript monorepo:
core: schema, spec parsers, path safety and storage;verification-engine: Playwright runner and evidence capture;report-generator;server;mcp-server: built on the official MCP SDK;cli;- the dashboard.
The example app is a dependency-free Student Assignment Dashboard with a clearly labelled, intentionally broken variant.
How I used Kiro
- Spec-driven development. The spec lives in
.kiro/specs/truespec-mvp/(requirements, design, tasks). Kiro generatedtasks.mdfrom our requirements and design. Its first draft referenced files that didn't exist; I checked it against the code, and Kiro corrected it. - Spec tasks. Kiro executed the property-based testing task with fast-check. Review found one property that could never fail; I rewrote it and checked it against a deliberately broken implementation.
- Hooks. A post-task hook re-ran the test suite after each task. File-save hooks type-check and test the package you're editing.
- Steering. Always-on steering docs carry our architecture, security and testing rules, plus file-matched coding and design-system rules.
- Custom agents. I added
verification-engineer,security-reviewerandux-revieweragents. - MCP: the core of the project. Kiro ran the full repair loop on the broken demo app, for about 0.74 credits:
- verify;
- fetch the failure evidence three times;
- fix
store.jsand record each repair; - re-verify, going from 8/11 to 11/11 passing.
TrueSpec then marked each repair verified because a later run passed.
To be transparent: much of the initial implementation was written with Claude Code before the Kiro work. The commit history shows which changes Kiro made.
Challenges I ran into
- Honest status rules. It's easy to accidentally count a skipped test as a pass, or call a requirement verified when only some of its tests ran. Run, requirement and criterion status follow explicit rules, and unit tests check that skipped and not-run results never become "passed". That rule applies to our own features too: AI-drafted tests stay skipped, and they keep their requirement from counting as verified until reviewed.
- Evidence an agent can actually use. Raw traces are far too big for an agent. I had to choose what goes into a failure: the failed step, expected vs actual, one screenshot and reproduction steps.
- Security for a local tool that drives browsers. It blocks DNS rebinding with Host and Origin checks, and blocks path traversal and symlink escapes. Credentials stay out of traces and screenshots, and nothing from a config or an MCP call can run arbitrary code.
- Race conditions. In one bug, the run-started event fired before the run existed, which hung the dashboard's Run button.
- Kiro credits. With 50 free credits I had to plan Kiro's work carefully and hit the rate limit along the way. Making the MCP loop efficient (about 0.74 credits for a full repair) became a design goal.
Accomplishments that we're proud of
- The full loop works for real.
- The broken example fails exactly the 3 expected tests, with evidence.
- Kiro fixed it over MCP.
#### 🤖 Kiro fixes it over MCP
Kiro runs verification, reads the evidence, fixes store.jsand re-runs: 8/11 → 11/11, about 0.74 credits. - The re-run shows the repairs verified by a later run.
- Criterion-level traceability. You can see which parts of a spec are proven and which aren't.
- TrueSpec checks itself in CI. On every push, our CI must pass the correct example and fail the broken one on exactly the expected tests.
- 138 unit and integration tests, including property-based tests.
- It works on an app I didn't build for it (Halfsies, a canvas game).
What I learned
- "Done" needs a definition an agent can't argue with. Acceptance criteria plus executed checks provide one.
- Agents fix bugs far better from concrete evidence (a screenshot, expected vs actual) than from "it doesn't work". Kiro's MCP fix took one pass.
- Spec-driven development makes verification possible at all: you can't prove "it works" without first writing down what "works" means.
What's next for TrueSpec
- A Kiro power / hook pack, so "verify on task completion" works in any Kiro project with one install.
- Suggested fixes from mutation-testing gaps: "no test catches this bug; here's a draft test".
- Team mode: shared signed verification records for pull requests.
Built With
- axe-core
- chromium
- claude
- fast-check
- fastify
- firefox
- gemini
- kiro
- model-context-protocol
- node.js
- pixelmatch
- playwright
- react
- tailwindcss
- typescript
- vite
- vitest
- webkit
- zod