agentleFS
ultimatileultimatile/development-skills/skills/breachreaper/SKILL.md

breachreaper

Skill0 starsChanged 32 days agoMITView on GitHub

Audit existing code for stock-detectable API-contract breaches.

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
  1. Very specific:

    Check whether the project has a documented architectural rule: layering, hexagonal direction, module DAG, public / internal split.

    line 53
  2. Distinctive:

    If no rule is documented, this class is N/A — exit.

    line 54
  3. Distinctive:

    If a rule exists, walk the import / dep graph and flag edges contradicting it.

    line 55
  4. Very specific:

    Confirmed: import or pub crosses the rule.

    line 60
  5. Distinctive:

    N/A: no rule documented for the project.

    line 61
  6. Distinctive:

    Do NOT propose patches at callsites.

    line 88
  7. Distinctive:

    Stock-auditable only: Every finding must be justifiable from current syntactic structure without intent input.

    line 92
  8. Distinctive:

    Report, never fix: Do not edit production code.

    line 93

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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.

  1. Identify candidate transformation methods. Names matching to_*, normalize*, canonicalize*, coerce*, as_*, into_* — transformations that take producer output and reshape it before use.
  2. For each candidate, rg the symbol across non-test code.
  3. Count callsites where the transformation is applied to a producer return value (not internal to the producer itself).
  4. 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.

  1. 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.
  2. For each pair, enumerate public function / method names. For Rust, cargo public-api per crate is the canonical source.
  3. Strip parallel-axis prefixes / suffixes and compute the symmetric difference.
  4. 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.

  1. 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.toml workspace structure.
  2. If no rule is documented, this class is N/A — exit.
  3. If a rule exists, walk the import / dep graph and flag edges contradicting it.
  4. Also flag pub symbols whose exposure widens past the rule.

Classification:

  • Confirmed: import or pub crosses 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.

  1. Identify sibling-method clusters: methods on the same type whose signatures share constrained parameter shapes (size, count, rank, dimension, exponent, non-empty collection).
  2. For each cluster, check whether each method validates the shared constraint at entry.
  3. 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.