// levr gates
Quality gates for AI coding agents.
Less work for you, more work for your agents. Levr Gates are checks written before the work starts that an agent can’t argue its way past. Every piece of generated code is proven against the plan before it counts as done.
Free during preview · Works with Claude Code, Cursor, Codex and any MCP client
⏺ All 6 steps are implemented and the tests pass. Marking ENG-412 done.
⏺ levr - transition_issue (MCP)(ENG-412 → Done)
Refused. 3 required gates are failing.
- failno_stubssrc/billing/refund.ts: 2 TODO markers
- failunit_test_passrefund.test.ts: 3 skipped, 0 ran
- failspec_conformancepartial refunds not handled (plan step 4)
- passtypecheckexit 0
- passfile_existssrc/billing/refund.ts
⏺ You’re absolutely right. refund.ts still has two stubs and the test file never ran. Fixing.
// what is a quality gate?
A quality gate on every task, not just the branch.
A quality gate is a checkpoint work has to pass before it moves on: criteria agreed in advance that decide whether something is ready. Most teams know them from CI, where they guard a branch.
A Levr Gate is a quality gate attached to the task itself. It’s written before your agent starts, it runs against the work, and if a required gate fails, the task can’t move to Done. It’s your definition of done and your acceptance criteria, turned into checks that actually run.
ENG-412Partial refunds
Deliverable · To dogates written before any code · 6 required · 1 advisory
- presencefile_existssrc/billing/refund.tsrequired
- patternno_stubsno TODO / FIXME leftrequired
- executiontypecheckyarn typecheckrequired
- executionunit_test_passrefund.test.tsrequired
- executione2e_test_passrefund.e2e.tsrequired
- semanticspec_conformancepartial refunds, to the centrequired
- semanticedge_case_coveragealready-refunded, zero amountadvisory
// the ai software factory
Every factory needs quality control.
What is a software factory? It’s the machinery around your agents that turns their code into something you can ship: the plan going in, the agents doing the work, and the checks that decide what leaves the line. An AI coding agent stops at a diff. The factory is everything that makes that diff trustworthy.
The more autonomous the factory, the less a person reads each change. That only works if quality control is built into the line. Levr Gates are that station: work doesn’t leave until it passes, and nothing passes on the agent’s say-so.
- 1PlanThe task, its requirements, and the gates that prove them.
- 2BuildYour coding agent writes the code.
- 3Gatelevr gatesChecks run. Required gates must pass.
- 4DoneOnly with evidence. Otherwise, back to Build.
// top 10 benefits
Why teams put gates on agent work.
Without gates, the human is the gate. Here’s what changes when the checks are written first and the agent has to pass them.
- 1
You can trust that what you get is what you asked for
“Done” means the criteria you agreed at the start were met, with evidence attached: the actual commands, exit codes, output, and who ran each check. Not the agent’s word for it.
Once you trust the result, you stop re-checking it. Line-by-line review, re-testing and “did it really do that?” prompts move off your plate and onto the agent. Trust is what lets you hand off more.
- 2
The agent can’t call its own work done
Exit criteria are written before the work starts and enforced when the work moves to Done. If a required gate fails, Done is refused, and the refusal says exactly what to fix.
The agent has to show evidence against criteria it didn’t get to pick. The plan becomes something the agent follows, not just something it started from.
- 3
Agents run longer on their own, with less of you in the loop
Without gates, you are the gate: you read the diff, spot what’s missing, and prompt again. With gates, the agent runs verify, fix, re-verify by itself, because Done stays refused until the evidence exists. The refusal tells it what to work on next.
You set the criteria once and come back when the work actually passes. Fewer “one more prompt and it’ll be done” rounds.
zsh · your checkout$ levr gates run ENG-412
run test -f src/billing/refund.ts
passEXISTS
run grep -cE '(//|#) *(TODO|FIXME)' src/billing/refund.ts
fail2
run yarn typecheck
passexit 0
run yarn vitest run src/billing/refund.test.ts
failexit 0 · 3 skipped, 0 ran
…3 more
3 of 6 required gates failing · exit 1
- 4
Every piece of generated code is proven against the plan
Agents now write code faster than people can review it. Gates let the checking scale with the output.
Each claim in the plan is tied to the gates that check it, and each gate to its evidence. Follow any result back to the requirement it proves: requirement, gate, attempt, verdict. Requirements traceability, kept as you go.
- 5
It catches the shortest path to “looks done”
Left alone, AI coding agents take the shortest path to something that looks finished. They stub out the hard function, narrow a test until it passes, decide a requirement was optional, or quietly use a different approach than the plan agreed. Then they report that they’re done.
Gates catch these shortcuts before Done, not in review after it.
19%
slower: experienced open-source developers using AI tools, who believed afterwards they had been 20% faster.
66%
of developers named “AI solutions that are almost right, but not quite” as their biggest frustration.
Reward hacking
Models learn to game the tests they are graded by. OpenAI found that penalising it taught models to hide the intent rather than stop; Anthropic found it generalising into sabotage in agentic coding.
Baker et al. 2025 · MacDiarmid et al. 2025 (opens in new tab)
- 6
Six independent ways of checking, so one blind spot doesn’t sink you
Every gate uses one of six techniques, and each asks a different question. One claim is covered by several, so a gap in one is caught by another.
The six Levr Gate verification techniques Technique Question it answers Example gate types Presence Is the required thing there, or gone? file_exists · module_imports Pattern Does the code contain, or avoid, the expected text? no_stubs · file_not_contains Structure Is the code actually wired the way it should be? ast_pattern · symbol_referenced Execution Does it build, typecheck, and pass its tests? typecheck · e2e_test_pass Semantic Does it do what was meant? (AI judges plus hands-on checks) spec_conformance · guided State Has the system of record reached the required condition? control_plane Proof story
One of our own UI components passed all 8 of its text-search checks and still didn’t work. It had no text input, and its change handler was never called. Every check confirmed the right words were in the file, and they were. That’s Goodhart’s law: when a measure becomes a target, it stops being a good measure. The fix was more kinds of evidence, not more text searches.
- 7
Evidence, not claims, on a record that can’t be rewritten
Every check records the exact command, its exit code and its output. Levr decides pass or fail from those facts, not from what the runner reports. Re-runs add a new record and never overwrite the old one, so the fix loop stays visible: how many rounds it took, and what changed each round.
Each run is stamped with who did it: a human, an agent, or CI. The stamp comes from where the request came from, not from anything in it, so a report can’t pretend to be CI.
levr · ENG-412 · attempts- #114:02agent3 failingno_stubs · unit_test_pass · spec_conformance
- #214:09agent1 failingspec_conformance: rounding on partial refunds
- #314:16agentall pass6 of 6 required
- #414:21ciall passsame gates, run in CI
waived · edge_case_coverage (advisory)
sarah: “zero-amount refunds are blocked upstream, see ENG-398”
3 rounds to get from “done” to done
Done - 8
Readiness beyond the code
Some checks are real, but no command can run them. Has someone outside the team followed the support runbook? Was the rollback rehearsed? Is pricing approved?
Guided gates cover these. A person or an agent carries out the check and reports what they saw, and a bare “pass” with nothing observed is refused. A guided gate blocks Done exactly like a failing test, instead of sitting on a checklist nobody re-reads.
Hands-on checks in a web app? Levr Browser lets an agent do them in a real browser and attach what it saw.
- 9
You decide what blocks, and exceptions are honest
For each gate on each piece of work, you choose whether it’s required (blocks Done) or advisory (reports only). Keep the required set small enough to mean something.
Need to move ahead anyway? A waiver needs a written reason, is recorded with its author, and leaves the failing result readable. If a check changes after the work was verified, it’s flagged. Nothing is skipped silently.
- 10
Compliance evidence as a side effect of doing the work
Gates line up with the assurance standards teams already work under, including NIST SSDF and IR 8397, IEEE 1012, DO-178C traceability, ISO 29148 and SLSA. The decision record builds up as the work happens, not as a document someone assembles afterwards. Levr is aligned with these standards, not certified against them.
// we didn’t make this up
Read the code. Run the code. Keep the record.
That’s how NIST and IEEE already say software should be verified. Levr Gates work the same way.
NIST IR 8397 (opens in new tab)
Guidelines on Minimum Standards for Developer Verification of Software
Automated testing, static code scanning and code-based structural test cases.
Execution, Pattern and Structure gates.
NISTInteragency Report · referencedIR 8397NIST SP 800-218 (opens in new tab)
Secure Software Development Framework (SSDF) 1.1
PW.7: review and analyze the code. PW.8: test the executable code.
Structure and Semantic gates read it. Execution gates run it.
NISTSpecial Publication · referencedSP 800-218IEEE 1012-2024 (opens in new tab)
Standard for System, Software, and Hardware Verification and Validation
Plan verification and validation tasks for each stage of the work, and report the results.
Gates per task, written first. Every attempt kept.
IEEEStandard · referenced1012-2024
Aligned with these, not certified against them. The full mapping is in the docs (opens in new tab).
// and also
Familiar idea. New place to put it.
A model leaders already know
Stage-gate and release-gate processes are familiar from R&D and release management. Levr Gates bring the same idea down to every task an agent picks up, and add the facilitation and the record.
The Gates view
One page lists work by gate status, so you can spot “the code says it’s done but the gates don’t agree” while a plan is still running.
Uses the tools you already have
Lint, secret scanning, static security analysis, dependency audit and changed-line coverage run the tools your repo already uses.
More attention for the right questions
Gates confirm the work was built the way the plan said. That frees people to judge whether it was the right thing to build.
// faq
Quality gates, answered.
What is a quality gate?
A quality gate is a checkpoint that work has to pass before it moves on: a set of criteria, agreed in advance, that decides whether something is ready. In software, quality gates usually run in CI against a branch. A Levr Gate is a quality gate attached to the task itself, written before the work starts, and a failing required gate refuses Done.
What are Levr Gates?
Checks and tests attached to a task in Levr before your coding agent starts on it. “This file exists.” “No TODOs left.” “These tests run and pass.” “It does what the task says.” Required gates have to pass before the task can be closed, no matter what the agent says.
How is this different from a definition of done?
A definition of done is usually a checklist people agree on and then trust each other to follow. Acceptance criteria say what one task must do. Levr Gates turn both into checks that actually run, record their evidence, and block Done when they fail, so an AI coding agent can’t tick the box without doing the work.
How do Levr Gates compare with CI quality gates like SonarQube?
They work together. A CI quality gate guards a branch or a pull request. A Levr Gate guards a unit of work in the plan, and can use the same tools: lint, static analysis, coverage and your test suites. Run `levr gates run` in CI when you want the verdict to come from a run the agent can’t touch.
Where do the checks run? Does Levr see my code?
Checks and tests run in your checkout, on your machine or in CI, not on Levr’s servers. Levr receives the command, the exit code and the tail of the output, and decides pass or fail from those.
Can’t the agent just say the gate passed?
Not by saying so. It has to hand over the command it ran, the exit code and the output. No raw output is an error, and a test run where nothing ran is a fail.
Who writes the gates?
Usually your agent drafts them from the plan, and you review or edit them. Write them before the code. Once work has started, changing a gate takes a reason.
Which AI coding agents does it work with?
Anything that speaks MCP: Claude Code, Cursor, Codex CLI, Windsurf, Gemini CLI, VS Code, Zed and more. You can mix them on the same project.
Is Levr certified against NIST, IEEE or DO-178C?
No. Levr Gates are aligned with those standards and produce the kind of evidence they ask for, but Levr is not a certified implementation of any of them.
What does it cost?
Levr is free during the preview. No credit card.
// try it on one task
Done means proven.
Connect your agent and give it one real task with gates. See what it says when it can’t just say “done.”
Free during preview · No credit card
# connect Claude Code, Cursor, Codex… to Levr
$ npx @levr-one/cli@latest mcp add
# in Claude Code: add the plugin, then start on a task
> /plugin marketplace add BitModern/levr
> /plugin install levr@levr
> /levr:work ENG-412
# run a task’s gates yourself, or in CI
$ levr gates run ENG-412
