ripwire-layers
Skill2.4k starsChanged 3 months agoApache-2.0View on GitHub
Architecture HEALTH and ENFORCEMENT — 'is this a dependency mess / does the UI reach into the database / enforce module boundaries in CI?': cycles, the godfile, propagation cost (how far a touch ripples), --arch rules with a baseline gate. Overview without gating → orient. One pass answers it.
Trending
More talk lately.thin dataabout the whole repository
Who's talking about redhat-et/ripwire
- A Hacker News story“ripwire: ripgrep of AI context (CLI+MCP) giving coding agents a map of any repo”Hacker News · Sep 7, 2026 · 19 points
- @icecodenew.bsky.social“#TIL github.com/redhat-et/ri... > Point it at any repository and your agent gets a ranked, deterministic …”Bluesky · Sep 6, 2026 · 3 likes
- A Hacker News story“The Ripgrep of AI Context”Hacker News · Sep 8, 2026 · 2 points
- @akanoa.bsky.social“On se débarrasse enfin du code! On descend à l'AST et bientôt plus bas. Ce n'est qu'une question de temps. …”Bluesky · Sep 8, 2026 · 1 likes
- @hn100.bsky.social“ripwire: ripgrep of AI context (CLI+MCP) giving coding agents a map of any repo Discussion”Bluesky · Sep 7, 2026 · 1 likes
The biggest 5 of 14 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 14
Talked about on GitHub, Bluesky and Hacker News (14 times).
On GitHub · 9
- Oct 3, 2026agent-skills.github.redhat-et.ripwire: 0.6.2 → 0.6.5 — sudosubin/agents.nix0 reactions
- Oct 1, 2026agent-skills.github.redhat-et.ripwire: init at 0.6.2 — sudosubin/agents.nix0 reactions
- Sep 29, 2026ripwire: 0.6.1 -> 0.6.5 — NixOS/nixpkgs0 reactions · 1 comment
- Sep 24, 2026docs(non-cc): screenshot-lead research batch 13 (plan 0008 row 20) — qte77/ai-agents-research0 reactions
- Sep 21, 2026feat(setup): the ripwire hint names the upstream repository, in setup and both installers (D178) — dimitritholen/tasqx0 reactions · 3 comments
4 more on GitHub
- Sep 20, 2026Candidate: ripwire, a repo map for coding agents — cinjoff/firehorse0 reactions
- Sep 19, 2026ripwire: 0.5.0 -> 0.6.1 — NixOS/nixpkgs0 reactions · 4 comments
- Sep 10, 2026Static analyzer flags prompt-injection example text inside fenced code blocks as CRITICAL — runkids/skillshare0 reactions · 2 comments
- Sep 7, 2026Qualify ripwire as local code-intelligence/context source candidate — TheHalfMoon/Golam0 reactions
On Bluesky · 3
- Sep 6, 2026#TIL github.com/redhat-et/ri... > Point it at any repository and your agent gets a ranked, deterministic call graph — what to touch, what… — @icecodenew.bsky.social3 likes and reposts · 1 reply
- Sep 8, 2026On se débarrasse enfin du code! On descend à l'AST et bientôt plus bas. Ce n'est qu'une question de temps. github.com/redhat-et/ri... — @akanoa.bsky.social1 likes and repost · 1 reply
- Sep 7, 2026ripwire: ripgrep of AI context (CLI+MCP) giving coding agents a map of any repo Discussion — @hn100.bsky.social1 likes and repost
On Hacker News · 2
- Sep 7, 2026ripwire: ripgrep of AI context (CLI+MCP) giving coding agents a map of any repo19 points · 14 comments
- Sep 8, 2026The Ripgrep of AI Context2 points
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- emitting-outputSkill
- ripwire-repo-mapSkill
- ripwire-before-you-buildSkill
- ripwire-change-checkSkill
- ripwire-find-bugSkill
- ripwire-fresh-eyesSkill
- ripwire-graph-querySkill
- ripwire-handoffSkill
- ripwire-mcpSkill
- ripwire-navigateSkill
- ripwire-opt-remarksSkill
- ripwire-orientSkill
- ripwire-perf-targetSkill
- ripwire-quality-barSkill
- ripwire-reuse-firstSkill
- ripwire-routerSkill
- ripwire-security-scanSkill
- ripwire-write-testsSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 27
Action: every violation is a concrete edge to either fix (remove the dependency) or explicitly allow (document why it's intentional) — …
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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
Layers with ripwire
Nearest neighbours: • You want the file→file dependency graph itself (not a health read) →
--depsis step 2 below, or go straight to it if you already know you want godfiles/cycles. • Reviewing YOUR OWN diff for coupling risk, not a repo-wide sweep → ripwire-change-check. • Unfamiliar subsystem, general risk sweep (not architecture-specific) → ripwire-fresh-eyes.
Trigger: you want a factual picture of architectural health before a large refactor, or you're reviewing whether the codebase is trending toward or away from clean layering.
<dir> = repo root. Every metric below has a NUMBER → THRESHOLD → ACTION — don't stop at reporting it.
Layering rules (if a rules file exists) —
ripwire <dir> --arch=rules.txtOutput:<arch>with violations listed by layer pair and file. Exit 2 = NEW violations found (CI gate). If no rules file exists yet, this step is the prompt to write one (grammar:layer NAME = substr…,deny FROM -> TO,allow FROM -> TO;#comments). Action: every violation is a concrete edge to either fix (remove the dependency) or explicitlyallow(document why it's intentional) — don't leave it silently baselined forever.Adopting rules on a codebase with existing debt — the baseline workflow:
ripwire <dir> --arch=rules.txt --baseline— accept every CURRENT violation as known debt: writes a.ripwire_arch_baselinesidecar in the CWD (commit it), exits 0.- From then on, plain
--arch=rules.txtsuppresses baselined violations and exits 2 only on NEW ones — the gate stops the bleeding without demanding an up-front cleanup. --arch=rules.txt --baseline-update— deliberately accept new debt by merging current violations into the sidecar (exit 0). Use sparingly, in its own reviewed commit.
--arch=rules.txtalso emits<metrics propagation_cost="X.XXX">— the DSM (design-structure-matrix) transitive-closure density: the fraction of the file-dep graph reachable from an average file (MacCormack; a validated coupling form, computed here as a directory-level estimate from name-based deps). Direction: lower is better — 0 means files are mostly isolated from each other's transitive reach, 1 means touching any file risks rippling through the whole tree. Action at a high reading (no fixed universal threshold — compare against this same repo's own history/other modules, or treat >0.3 as worth a look): a high propagation cost is a change-amplification TAX — every edit here is more likely to have knock-on effects. Don't just report the number; find which directories are driving it (the<m path=... ca= ce=>per-module rows) and formalize a boundary between them — alayer/denyrule inrules.txtthat would have caught the coupling.- Dependency health —
ripwire <dir> --deps --legend=compactOutput:<deps>with<health>metrics:acd(average component dependency) — lower is betternccd(normalized CCD) — < 0.25 is healthyshape— "horizontal" (layered, good) vs "vertical" (coupled, risk) Then<godfiles>ranked byafferent(dependents) — each godfile is an implicit layer boundary that hasn't been formalized.afferent/cycles are validated defect predictors;nccd(Lakos) and the--archMartin Ca/Ce/I/A/DI/A/D/zone=block are design heuristics — mechanistically plausible, widely implemented, but no independent outcome-based study has validated them. Trust the god-file/cycle read hardest; treat nccd/D as descriptive, not proof. Action: a file in the top-3 byafferentis doing double duty as a de-facto layer boundary with no rule enforcing it — that's the concrete next step, not just a note: add it as a namedlayerinrules.txtand write thedenyrules that keep new dependents out of its internals. A cycle in--reportis worse than a high-afferent file — break it before formalizing anything downstream of it.
- Module clustering —
ripwire <dir> --communities --legend=compactOutput:<communities modules="N">clusters with dominant directory and lead symbols.<bridge edges="N">shows where clusters are tightly coupled across module boundaries. High bridge counts between non-adjacent modules are the layering violations--archcatches. Action: a high bridge count between two clusters that AREN'T adjacent in your intended layering is the specific violation to gate — turn it into adeny FROM -> TOrule rather than leaving it as an observation; a high bridge count between clusters that ARE meant to talk to each other is fine and doesn't need a rule. - Mermaid diagram (optional, for visual review) —
ripwire <dir> --mermaidOutput: aflowchart LRMermaid snippet with module nodes and inter-module call counts. Paste at mermaid.live to render. Edges labeled with high counts are the hot coupling seams — same action as step 3: a heavy edge crossing an intended boundary becomes adenyrule.
Output
Health summary: shape=, nccd=, propagation_cost=, cycle count (from --report), top 3
god-files, and any --arch violations. Classify overall health: healthy / at-risk / needs
restructuring — and for anything "at-risk" or worse, name the specific boundary to formalize
(which layer, which deny rule) rather than stopping at the classification.
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.

