Agents and tools
Guardian
Reviews draft pull requests from autonomous coding sessions, tries to break them, and never merges.
When coding agents open pull requests overnight, someone has to read them first.
Guardian picks up each draft, runs the repository's checks, asks a fresh reviewer to try to break the change, fixes what it finds in its own worktree, and reviews again. Every transition is validated against a state machine. Merging stays a human decision.
- Status
- Internal tooling, not a product.
- Stack
- Bun, TypeScript, GitHub CLI
Why it exists
An author saying "tested" is a claim. Guardian wants evidence.
Tests can pass without the change, so a green check doesn't prove much on its own. Guardian's mutation check undoes the code and confirms the tests fail.
Try it
Step a pull request through review. Try an illegal move. This is an illustrative prototype built for this site with fictional data, not the product itself.
Review state machine · Illustrative prototype · fictional data
One run through it
Pick it up
A poll finds a pull request in scope and queues it.
Get a clean copy
Guardian fetches the head into its own worktree and classifies the risk. A conflict stops it there.
Run the checks
It runs the checks for the changed scope and reads CI for that exact commit.
Try to break it
A fresh, read-only reviewer returns findings and the attacks it tried, in a checked format.
Fix and re-review
Blocking findings go to a fixer that can't commit or push. Guardian inspects the diff itself, then everything gets reviewed again.
Verified, never merged
A clean review plus green CI on that commit makes it verified. The merge stays with a person.
What it does
A checked state machine
Queued, reviewing, needs fix, fixing, verified. Illegal transitions are rejected.
Adversarial review
A reviewer with no context from the author tries to break the change.
Isolated fixes
Fixes happen in Guardian's own worktree, then go back through review.
Evidence
Each run keeps what was checked, what failed and what changed.
Why it's built this way
Verdicts bind to one commit
New code can't inherit an old approval.
Errors never pass
Outages back off and then go to a person, so a failure can't be read as a success.
Judge the diff, not the report
Guardian reads what the fixer changed instead of what the fixer says it changed, which blocks weakened tests.
How it fits together
- 01A Bun daemon with the transition table in one module.
- 02GitHub CLI for pull request state.
In plain terms
- Draft pull request
- A proposed change marked as not ready.
- Adversarial review
- Reading a change to break it, rather than to confirm it.
- Mutation check
- Undoing the code to confirm the tests fail.
- State machine
- A fixed list of allowed status moves.