adversarial-review-gate
Skill0 starsChanged 5 months agoMITView on GitHub
Adversarial code review that tries to break a change instead of approving it, and only counts a finding when a failing test reproduces it, ending in a GATE PASS or GATE FAIL verdict. Use when reviewing a diff, pull request or freshly AI-generated code for race conditions, idempotency, partial-failure, boundary and security bugs, or when you need a review step that cannot rubber-stamp.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- go-steer/core-agenttheir own version, first seen Nov 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- go-steer/core-agent★ 9same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository5 other files it gives its agents.
- done-gateSkill
- launch-checkSkill
- proven-code-reviewSkill
- spec-trace-gateSkill
- verify-gateSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Scope the change: Use what the user names (PR, branch, commit range, files).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Adversarial review gate
Your job is to break the code, not to praise it. Start from "there is a bug until I prove otherwise". A finding without a reproducing test is a hypothesis, not a finding.
Procedure
- Scope the change. Use what the user names (PR, branch, commit range, files). Otherwise review the working-tree diff against the default branch. Read the spec, ticket or design notes if they exist: a violated requirement is the strongest finding.
- Build an attack list from
references/attack-surfaces.md, ranked by what the code does: money or shared state → concurrency, idempotency and atomicity first; parsers → boundaries and encoding; HTTP handlers → authorization, error mapping and input limits. - Attack, one hypothesis at a time. For each, write the smallest test that fails if and only
if the bug exists, in the project's own test framework and folder, then run it.
- The test fails → a finding. Record severity,
file:line, the exact input or interleaving that triggers it, and the test name. Leave the test failing; it is the evidence. - The test passes → record the attack as "attempted, held". Keep the test as a regression guard if it is cheap and deterministic.
- The test fails → a finding. Record severity,
- Do not fix the code in this step. The fix is a separate change by whoever owns the code; then this review runs again. A reviewer that fixes its own findings is grading its own work.
- Write the report with
assets/REVIEW-template.mdto the place the user prefers (defaultreviews/REVIEW-<NNN>.md).
Verdict
GATE: FAIL: at least one finding is reproduced by a failing test.GATE: PASS: you list every attack you attempted, each with the adversarial test you wrote, and all of them pass.
An empty review, a "looks good", or findings without tests are not valid outcomes. If you could not build a test for a suspicion (it needs infrastructure you do not have), list it under "Unverified hypotheses" with what would be needed to test it. It does not count towards the verdict either way.
Techniques that find real bugs
- Concurrency: real threads or processes released together by a barrier, a file-backed or real database (never an in-memory stand-in that serialises for you), one connection per worker. Better still, force the bad interleaving deterministically: hold the lock on one connection and set a near-zero lock timeout on the other. A storm only finds the bug when it gets lucky.
- Crash between two writes: make the second write raise an exception type that escapes the
code's cleanup handler (e.g. a
BaseExceptionsubclass in Python), drop the connection, reopen, and assert the invariant still holds. - Replay: send the same request twice, concurrently, and again after a restart.
- Property-based tests (Hypothesis, fast-check, jqwik, proptest) when the input space is large.
references/case-study.md shows a full red → fix → green cycle on a payments ledger.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

