What problem does it solve? You have a concrete list of failures — a red-team failure catalogue against a guardrail/classifier, or failing tests from a CI/CD run — and need the target fixed until every failure class is closed without breaking anything that already passed. Doing this by hand risks over-broad fixes, regressions, and untraceable changes. ## Core Features & Use Cases - Catalogue ingestion: tools/ingest.py normalizes red-team failures.jsonl, JUnit XML reports, or pytest node-id lists into one failure catalogue grouped by root-cause class. - Gated fix loop: each iteration patches one class, then tools/verify.py checks that the class closed and zero regressions appeared (oracle mode uses a frozen ground-truth oracle plus a benign holdout; tests mode re-runs the suite and reads the JUnit report); bad patches are reverted. - Pull-request handoff: kept fixes become one commit per class on a PR branch opened with gh pr create, degrading to git format-patch plus a PR_BODY.md when git or gh is unavailable. - Use Case: A red-team run found 5 bypass classes in your prompt guardrail. Point this loop at the failures file and the guardrail source; it normalizes inputs, broadens the policy, tightens over-broad rules, and opens a PR with each fix as a separate commit. ## Quick Start Ask the AI to run the blue-team loop on your failing tests or red-team failures file, naming the target source files it may edit, and let it iterate until every failure class is closed or the budget runs out.