breachreaper
Skill0 starsChanged 32 days agoMITView on GitHub
Audit existing code for stock-detectable API-contract breaches.
In this repository33 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- authoritative-text-rulesSkill
- bug-to-contractSkill
- code-review-gateSkill
- codex-contract-test-reviewSkill
- codex-plan-reviewSkill
- codex-reviewSkill
- copilot-reviewSkill
- debtreaperSkill
- diff-rootSkill
- docreaperSkill
- done-checkSkill
- driftreaperSkill
- file-adrSkill
- file-issueSkill
- file-pubdocSkill
- file-pullreqSkill
- finding-to-auditSkill
- finding-triageSkill
- gate-miss-to-issueSkill
- gh-body-auditSkill
- gh-body-conventionsSkill
- implementSkill
- land-via-integration-branchSkill
- quality-listSkill
- read-issueSkill
- reimreSkill
- research-and-implementSkill
- researchSkill
- review-pipelineSkill
- review-telemetrySkill
- stage-commit-pushSkill
- todo-checkSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 53
Check whether the project has a documented architectural rule: layering, hexagonal direction, module DAG, public / internal split.
- Distinctive: line 54
If no rule is documented, this class is N/A — exit.
- Distinctive: line 55
If a rule exists, walk the import / dep graph and flag edges contradicting it.
- Very specific: line 60
Confirmed: import or pub crosses the rule.
- Distinctive: line 61
N/A: no rule documented for the project.
- Distinctive: line 88
Do NOT propose patches at callsites.
- Distinctive: line 92
Stock-auditable only: Every finding must be justifiable from current syntactic structure without intent input.
- Distinctive: line 93
Report, never fix: Do not edit production code.
≈ “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
breachreaper
Audit production code for stock-detectable API-contract breaches. Report findings only; do not edit production code. Resolutions (API redesign, trait extraction, dependency-direction repair, shared validator extraction) are architectural decisions left to the user.
Step 1 — Determine scope
- With argument: audit only the specified file, directory, or module.
- Without argument: audit the full workspace. Start with public API surfaces (
pub fn,pub struct,pub trait,pub enum, equivalent), then descend.
Step 2 — Run each class
Class A — Defensive-transformation replication
Structural shadow: the same defensive transformation (.to_order(), .normalize(), .canonicalize(), .coerce(), equivalent input-shaping calls) is invoked at N ≥ 2 callsites to repair producer output.
- Identify candidate transformation methods. Names matching
to_*,normalize*,canonicalize*,coerce*,as_*,into_*— transformations that take producer output and reshape it before use. - For each candidate,
rgthe symbol across non-test code. - Count callsites where the transformation is applied to a producer return value (not internal to the producer itself).
- Trigger: ≥ 2 such callsites with no producer-side change addressing the root cause.
Classification:
- Confirmed: ≥ 2 callsites, all on producer output, no producer-side enforcement.
- Suspected: ≥ 2 callsites but one is in a transitional context (deprecated path, test scaffolding).
- Not a breach: 1 callsite, or the transformation is the producer's own canonical exit point.
Class B — Parallel-implementation surface asymmetry
Structural shadow: two implementations are intentionally parallel (Dense / BlockSparse, sync / async, local / remote, eager / lazy), but their public function / method sets are asymmetric in a way not justified by inherent domain difference.
- Identify parallel-impl pairs. Heuristics:
- Sibling files / modules with parallel names (
dense.rs+block_sparse.rs). - Sibling types implementing the same trait, where both also expose impl-specific public methods.
- Naming conventions like
Foo+FooAsync,LocalX+RemoteX.
- Sibling files / modules with parallel names (
- For each pair, enumerate public function / method names. For Rust,
cargo public-apiper crate is the canonical source. - Strip parallel-axis prefixes / suffixes and compute the symmetric difference.
- Trigger: any function present on one side and missing on the other, where the missing side has no domain-level reason to lack it.
Classification:
- Confirmed: asymmetric surface forces consumers to reach expert-level internals on one side.
- Justified asymmetry: the missing function is meaningless for that impl (e.g.,
flush()on an immutable variant).
Class C — Architectural-boundary violation
Structural shadow: an import / use / #include / dep entry crosses a documented module boundary in the disallowed direction, or a pub (or equivalent) widens exposure beyond the rule.
- Check whether the project has a documented architectural rule: layering, hexagonal direction, module DAG, public / internal split. Look in
ARCHITECTURE.md,CLAUDE.md, top-level doc files,Cargo.tomlworkspace structure. - If no rule is documented, this class is N/A — exit.
- If a rule exists, walk the import / dep graph and flag edges contradicting it.
- Also flag
pubsymbols whose exposure widens past the rule.
Classification:
- Confirmed: import or
pubcrosses the rule. - N/A: no rule documented for the project.
Class D — Sibling-method guard asymmetry
Structural shadow: a public method has an input-validation guard (assert!, if !cond { return Err(...) }, equivalent) at entry, but a sibling method (same type, parallel signature, same constrained parameter shape) does not.
- Identify sibling-method clusters: methods on the same type whose signatures share constrained parameter shapes (size, count, rank, dimension, exponent, non-empty collection).
- For each cluster, check whether each method validates the shared constraint at entry.
- Trigger: ≥ 1 method validates, ≥ 1 sibling does not.
Classification:
- Confirmed: sibling asymmetry — at least one entry leaves the constraint unenforced.
- Justified asymmetry: the missing-guard method has a structurally different parameter contract (different invariant required).
Step 3 — Report
Group findings by class. For each finding, include:
- File:line of every callsite / symbol / edge.
- The structural shadow itself (callsite count, symmetric-difference set, import edge, sibling cluster).
- Resolution direction:
- Class A: producer-side API redesign (constrain the type, tighten the constructor, hide leaky variants behind enforcing constructors).
- Class B: trait extraction so the type system enforces symmetry.
- Class C: dependency-direction repair (move the dep, invert the interface, relocate the offending
pub). - Class D: shared validator extraction so siblings cannot diverge.
Do NOT propose patches at callsites.
Principles
- Stock-auditable only. Every finding must be justifiable from current syntactic structure without intent input. Findings requiring "this should be doing X" are out of scope — leave for manual review.
- Report, never fix. Do not edit production code.
- Structural shadow ≥ 2. N = 1 is a one-off, not a pattern. The proliferation IS the signal.
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.

