[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ER45TKAHPCG9WM3CGX7MEC":3,"skill-same:01M7ER45TKAHPCG9WM3CGX7MEC":54},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M7ER45TKAHPCG9WM3CGX7MEC","ripwire-fresh-eyes",null,"Maintenance risk in code you did NOT write — inheriting a module, a suspected god object, 'what's gnarly \u002F where's the rot \u002F safe to touch?': hotspots, dead code, clones, a function's real shape, bus factor, co-change. Naming the fix or judging YOUR new code → quality-bar. A single-lens question is a single call.","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Fripwire-fresh-eyes-ripwire\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: ripwire-fresh-eyes\ndescription: >\n  Maintenance risk in code you did NOT write — inheriting a module, a suspected god object, 'what's\n  gnarly \u002F where's the rot \u002F safe to touch?': hotspots, dead code, clones, a function's real shape,\n  bus factor, co-change. Naming the fix or judging YOUR new code → quality-bar. A single-lens question\n  is a single call.\nallowed-tools: Bash, Read\n---\n\n# Fresh-eyes risk review with ripwire\n\n> Routing:\n> • Any DIFF — your own, or an incoming PR you're reviewing — about to push or merge → **ripwire-change-check**.\n> • **You have the measurement and now need the FIX** — which refactor a measured shape calls for, its\n>   precondition, and the fix-then-prove loop → **ripwire-quality-bar**'s shape → refactor playbook.\n> • Architecture health (deps metrics, layering rules, modules) → **ripwire-layers**.\n> • Finding where a specific BUG lives → **ripwire-find-bug**.\n> • Not sure which skill? → **ripwire-router**.\n>\n> **Scope it to one unfamiliar subsystem** you're about to touch, instead of the whole tree, two ways:\n> point `\u003Cdir>` at the subdirectory (`ripwire src\u002Fnet --hotspots`), or keep the repo root and `--exclude` the\n> rest. `--dead-code=DIR` also scopes directly. This is how you turn the repo-wide sweep into a\n> \"what's-gnarly-in-code-I-didn't-write\" read of one module.\n\n`\u003Cdir>` = repo root. Add `--exclude=build --exclude=.git` (repeatable) to keep build artifacts out — they\notherwise show up as false clones and dead code. This composes descriptive passes into one snapshot; run the\nsections your question needs.\n\n**Inheriting this subsystem?** Check `ripwire \u003Cdir> --notes` first — a prior agent's pinned gotcha\n(`--note-add`'d trap, flake, or invariant) is the cheapest fact you can pick up before you start reading.\n\n## Core health passes\n\n1. **Maintenance hotspots** — `ripwire \u003Cdir> --hotspots`\n   ```\n   \u003Chotspots window=\"12mo\" ranked=\"33\">\u003Cf p=\".\u002Fsrc\u002Fmain.cpp\" churn=\"53\" ccx=\"1365\" score=\"72345\" top=\"main:1306\"\u002F> …\n   ```\n   `score = churn × ccx` (commits × Σ cognitive complexity). Top files = where developers keep working *and*\n   the code is hard — the highest-leverage places to improve. `top=` names the worst function.\n   **Recent regression, not an all-time read?** `--hotspots --since=\"2 weeks ago\"` (or `--since=HEAD~20`)\n   scopes churn to commits after that point; unresolvable\u002Fabsent `--since` degrades silently to all-history.\n   **On C-family\u002FC# code, discount a body carrying `ppalt=`:** its `cx=`\u002F`ccx=`\u002F`nest=`\u002F`loc=`\u002F`locals=` are\n   summed over EVERY `#else`\u002F`#ifdef` branch (deterministic, but an over-count vs any single build), so a\n   high score on a `ppalt=`-heavy function can be the preprocessor fan-out, not the logic — read `ppalt=`\n   before calling a row the worst in the file.\n\n1b. **What is BUILT but DARK here?** — `ripwire \u003Cdir> --flags` (`=SUBSTR` to narrow)\n   ```\n   \u003Cflags gates=\"98\" dark_gates=\"90\" compile=\"32\" cmake=\"9\" env=\"57\">\u003Cgate name=\"X_HARMONY_SFX\" kind=\"compile\"\n     default=\"0\" dark=\"1\" regions=\"7\" loc=\"45\" reads=\"8\" p=\"sound\u002FaudioWiringFlags.h\" l=\"47\"\u002F> …\n   ```\n   Inheriting a repo, the invisible half is the code that ships compiled OUT. This harvests all three gate\n   patterns — `#ifndef`\u002F`#define` header gates, CMake `option()`, `getenv()` reads — with each gate's\n   **default** and the size of the code it guards, dark first. Two things `--grep` cannot tell you: when a\n   name is BOTH a header gate defaulting to `0` and a CMake `option(... ON)`, the **CMake default wins**\n   (it is what the build passes) and the header appears as an `\u003Calso>` row — the contradiction a reader who\n   greps the header gets wrong; and a gate whose default IS another gate's name resolves through the alias\n   chain, so a master switch reports `\u003Caliases n=…>` instead of a misleading `loc=\"0\"`.\n   **Limits:** lexical, not preprocessed — this is the in-repo default, never the value *your* build used.\n   A gate needs a value (`#ifndef F` \u002F `#define F 0`); valueless pairs are include guards and are excluded.\n   A gate read as a value (`constexpr bool k = F != 0;` then `if constexpr`) honestly reports `regions=\"0\"`\n   here — **`--flip` below lifts exactly that limit.**\n\n1b-ii. **If I flip THIS one, what lights up?** — `ripwire \u003Cdir> --flags --flip=NAME`\n   ```\n   \u003Cflip gate=\"X_RRF_ALL\" kind=\"cmake\" default=\"ON\" dark=\"0\" family=\"12\" regions=\"0\" loc=\"0\" branches=\"43\"\n     bindings=\"11\" hosts=\"11\" downstream=\"95\" dependents=\"146\" tests=\"23\" untested=\"0\">\n     \u003Cmember name=\"X_RRF_ISLANDS\" via=\"alias\" branches=\"12\"\u002F> …\n     \u003Clights r=\"0\" b=\"43\">\u003Cb p=\"canyon\u002FsimLevel.cpp\" l=\"133\" gate=\"X_RRF_WIDTHWAVE\" via=\"kWidthWave\"\n       sym=\"buildStripTable\"\u002F> …\n   ```\n   A list of ~90 dark gates is a map, not a decision. This is the decision: for ONE gate, the code that\n   becomes live (`#if` regions **and** the `if constexpr` branch sites a value-style gate governs), the\n   **symbols** holding it, what those transitively call (`downstream` — what starts executing), who depends\n   on them (`dependents`), the **tests** that reach them, and `untested` — the hosts no test covers. That\n   last number is the honest answer to \"is it safe to flip?\".\n   Alias chains run **both ways**: flipping a master rolls up every child that `#define`s to it, flipping a\n   child lights only that child and names its `\u003Cparent>` plus the siblings the parent's flip would add.\n   `kind=\"cmake\"` also steers the *build graph* (an `if(NAME) target_sources(...)` can add whole files) —\n   those sites are listed as `\u003Cc>` rows and deliberately **not** followed. `kind=\"env\"` is `runtime=\"1\"`:\n   no delimited region, so the hosts are the symbols that consult the variable.\n   **Limits:** lexical and single-line, never preprocessed. A binding split across two lines is missed. The\n   value lane reads C-family source only and treats a file declaring its **own** constant of that name as\n   shadowing the gate's (C++ scoping) — but a *third* header's same-named constant, included rather than\n   redeclared, would still count. A lit site inside no indexed def (a guarded member field, a file-scope\n   `constexpr`, a test-macro body) counts into `filescope=` instead of a host. `--detail=N` lifts the row\n   caps. Report only — always exit 0; an unknown gate name refuses (exit 1) and names the near-misses.\n\n1c. **Can I TRUST this repo's docs?** — `ripwire \u003Cdir> --doc-drift` (`=SUBSTR` to narrow to one doc)\n   ```\n   \u003Cdoc-drift docs=\"129\" clean=\"110\" anchors=\"1995\" checked=\"716\" unchecked=\"1279\" drift=\"110\">\n     \u003Cdoc p=\"docs\u002FARCHITECTURE.md\" anchors=\"50\" checked=\"34\" drift=\"9\">\u003Ca k=\"file-line\" l=\"186\" c=\"80\"\n       why=\"line-moved\" ref=\"src\u002Fmain.cpp:317\" sym=\"isGitUrl\" got=\"communityPresentation\"\u002F> …\n   ```\n   Inheriting a repo, the design docs and audits are how you learn it — and the stale ones are how you learn\n   it *wrong*. Run this **before** you read them: it verifies the CHECKABLE anchors (`file:line` refs,\n   backticked symbol mentions, `= N` constants, `[N]` array extents) against the live index and reports only\n   what no longer holds, per doc. A doc with `drift=\"9\"` gets read with suspicion; the 110 clean ones do not.\n   `why=` names the cause — `missing-file`, `past-eof`, `line-moved` (with `got=` naming the symbol that now\n   occupies the line), `undefined`, `const-value`, `array-extent`.\n   **Limits:** anchors, not prose — `§Status` lines, dates and \"N of M done\" tallies are NOT checked, and it\n   says so rather than pretending. Every lane under-reports deliberately (a name is stale only if it occurs\n   nowhere in the code as a token; a number only if the corpus binds it uniquely in a declaration), and\n   `checked + unchecked = anchors` with each declined check named in an `\u003Cunchecked>` row. Exit is always 0:\n   drift is a report, not a gate.\n\n   **Want it to BECOME a gate?** — `ripwire \u003Cdir> --doc-drift --gateability`. The reason CI can't gate on\n   drift is usually a handful of UNDATED design docs: with no date the lexical lanes can't tell \"stale\" from\n   \"a record of what was true then\", so their rows stay unclassifiable. This lists exactly those docs and\n   what one annotation each would fix:\n   ```\n   \u003Cgateability docs=\"17\" projected_drift=\"0\">\n     \u003Cfix p=\"docs\u002FARCHITECTURE.md\" live=\"6\"\u002F> …\n   ```\n   `live=` is that doc's still-failing anchors; `projected_drift=` is the repo-wide drift you'd be left with\n   if every listed doc got one ISO date in its H1 or a front-matter self-date line. Treat it as an **upper\n   bound on the win, not a mandate** — dating a doc that is genuinely live hides real rot rather than\n   resolving it. Use it to turn \"CI stays non-gating forever\" into a finite to-do list.\n\n   **Add `--with-history` when the mention lane matters.** `undefined` only means \"defined nowhere here\",\n   which on a repo whose PLAN docs name unbuilt features is *expected*, not rot — measured on a 2900-file\n   repo, 243 of 325 `undefined` rows were names that had never existed there. `--with-history` makes one\n   `git log` pass over everything reachable from HEAD and splits the lane: `why=\"deleted\"` with `got=\"removed\n   in \u003Ccommit> (\u003Cdate>)\"` and `at=` the file (real rot, ~75% fewer rows but every true positive kept), versus\n   `\u003Cunchecked r=\"never-in-history\">` for names the repo never had. It is opt-in because the walk costs ~3 s\n   on that repo against a 0.64 s default; the result is memoized per (repo, HEAD sha), so every later\n   question on the same commit — including `--whereis --with-history` — is a cache load.\n\n1d. **Did a task in this plan just never get launched?** — `ripwire \u003Cdir> --plan-lint=FILE`. Where 1c\n   explicitly does NOT check `§Status` lines, dates or \"N of M done\" tallies, this is the narrow\n   structural check that closes that one gap — a wave-closer's job, mechanized. It is opt-in per FILE\n   (never a directory sweep) because the house PLAN dialect it recognizes is deliberately narrow: a task\n   card is exactly an H3 heading opening with a task id (`T5`, `T10`, `T7b`), a status ledger is exactly\n   one heading (any level) reading \"Status\" once a leading section mark is stripped. A file showing\n   neither an H3 card nor a ledger heading reports `dialect=\"0\"` and nothing further runs — most plans\n   are exactly that file, and this is not a failing lint for them.\n   ```\n   \u003Cplan-lint file=\"wave.md\" dialect=\"1\" cards=\"6\" ledger=\"1\" git=\"1\" stale_commits=\"20\" gating=\"1\">\n     \u003Ccard id=\"T5\" line=\"40\" status=\"missing\" why=\"unlaunched\" gating=\"1\"\u002F> …\n   ```\n   Once `dialect=\"1\"`: a card's status is satisfied EITHER by a glyph on the LAST non-blank line of its\n   own body OR by a `§Status` ledger line naming its id — folded by DIGITS, so a bare card `T7` is also\n   answered by a lettered ledger mention `T7a`\u002F`T7b` (the real house shape when a card's own body names\n   lettered sub-tasks and the ledger tracks each separately) — with the card's own body winning when it\n   has one. Unresolved is `status=\"missing\"`, with `why=` naming the exact shape: `unlaunched` (a ledger\n   exists and never names this id at all — the exact field failure this verb exists to catch: a card that\n   was planned but never started, silent until a human happened to notice), `unresolved` (the ledger names\n   it but no line carries a glyph), or `no-glyph` (this document carries no ledger at all, so the card's\n   own body was the only possible source). An hourglass line whose git-blamed commit sits more than\n   `stale_commits=` commits behind HEAD is `stale=\"1\"` (never claimed outside a git repo; blames whichever\n   line the status actually resolved to, marked `src=\"ledger\"` when that is the ledger and not the card);\n   a task id named in the ledger with no matching card (same digit fold) is a `ledger-orphan`; an owed\u002FOWED\n   mention with no check-mark or cross anywhere LATER in the SAME document is undischarged.\n   **Limits, stated up front:** never semantics — it does not judge whether a card's claims are true (that\n   stays 1c's job); single-document only (a successor plan's discharge of an owed item is invisible here);\n   substring matching on \"owed\"\u002F\"OWED\" with no disambiguation (a doc that merely quotes the word reads the\n   same as a real marker); a document that uses card headings as plain labels with NO status mechanism\n   anywhere (no ledger, no glyph on any card) still reads every card as `missing` — a known, disclosed gap,\n   not a guessed-at fix. Unlike `--doc-drift`'s always-0 report, this **gates**: exit 2 when `dialect=\"1\"`\n   and any row carries `gating=\"1\"`, exit 0 clean or `dialect=\"0\"`, exit 1 only when FILE could not be read.\n\n2. **Dead code** — `ripwire \u003Cdir> --dead-code[=DIR]`\n   `\u003Cdead-code count=\"N\" confidence=\"high\" evidence=\"internal-linkage+zero-callers\">\u003Cd n=\"orphan\" …\u002F>` —\n   source-defined free functions with explicit internal linkage and **in-degree 0** in the indexed call\n   graph. `--dead-code=DIR` scopes to a sub-tree. Methods, declarations, headers, and external-linkage entry\n   points are excluded, so `count=\"0\"` means \"no high-confidence candidates,\" not \"no dead code.\" Name-based\n   and tree-local — **verify before deleting**: confirm against the compiler's unused-symbol diagnostics or a\n   linker map; ripwire narrows the field, the toolchain proves it.\n\n3. **Duplicate bodies** — `ripwire \u003Cdir> --clones`\n   `\u003Cclones groups=\"N\" type3=\"M\">\u003Cgroup type=\"2\" tokens=\"161\" n=\"2\">\u003Cf n=\"line\" p=\"…:31\"\u002F>\u003Cf n=\"line\"\n   p=\"…:28\"\u002F>\u003C\u002Fgroup>`. `type=\"2\"` = exact\u002Frenamed (identifiers + literals normalized, so a renamed copy\n   still matches); `type=\"3\"` = a gapped NEAR-miss (similarity 0.80–1.0, an inserted\u002Fchanged statement) —\n   check `type=` before assuming two members are byte-identical. Larger `tokens=` = more dedup value; a fix\n   to one likely belongs in all. **Rule of Three:** extract on the *third* occurrence, not the second — a\n   little duplication beats the *wrong* abstraction.\n   A group carrying `idiom=\"…\"` (`threshold-ladder`, `switch-name-table`, `builder-chain`) plus\n   `demoted=\"1\"` is one the detector judged an IDIOM COLLISION, not shared logic: same shape, no shared\n   domain identifiers, different scopes — five unrelated bucketing ladders in five subsystems match each\n   other's token stream and consolidating them would be the wrong abstraction. Demoted groups still print\n   and still count; they stop *gating*. The idiom is named precisely so you can overrule it by reading the\n   bodies — treat it as the tool showing its work, not as a row it decided for you.\n\n4. **AST smells** — `ripwire \u003Cdir> --lint`\n   `\u003Clint findings=\"N\">\u003Crule name=\"magic-number\" count=\"82\"\u002F> …` then per-finding `\u003Cf rule= p= …>` with the\n   enclosing symbol. No-build, AST-only — a fast complement to clang-tidy, not a replacement. Skim the\n   per-rule counts for the dominant smell.\n\n   **Two rule prefixes are also family evidence.** `naming-*` (`naming-case`\u002F`naming-confusable`\u002F\n   `naming-predicate`\u002F`naming-series`\u002F`naming-setter`\u002F`naming-short`\u002F`naming-underscore`\u002F`naming-wordy`) is\n   exactly `--ensemble`'s\u002F`--quality-panel`'s `lexical` family; `atom-*` (`atom-assign-as-value`\u002F\n   `atom-comma-operator`\u002F`atom-embedded-crement`\u002F`atom-implicit-predicate`\u002F`atom-nested-ternary`\u002F\n   `atom-octal-literal`\u002F`atom-reversed-subscript`) is `confusion`. A `--lint` finding under either prefix\n   is the identical predicate the family join runs — reading it here just skips the join. **Not a moment to\n   reach for mid-task:** `--naming-calibration` scores both spellings of this repo's own historical renames\n   (old identifier vs. what it was renamed to) against the same `naming-*` predicates — it is how those\n   rules were validated, a maintainer calibration harness (`test\u002Fnamingcalibrationcheck.sh` pins the\n   per-rule floor) with a `pairs=` sample size and its own legend calling itself a **noisy proxy**, not a\n   verdict on any function you're looking at. It always exits 0.\n\n   **What rules exist, and are they even structurally possible on this corpus? — `ripwire \u003Cdir>\n   --lint-catalog`.** The full built-in registry: every rule's severity, category, one-line rationale, its\n   registered languages, and the release it shipped in — no corpus needed, so it answers \"what could `--lint`\n   ever find here\" before you run it. A plain `--lint` run then discloses the corpus-specific half:\n   `applicable=\"0\"` on a `\u003Crule>` row means none of that rule's registered languages are present at all (its\n   `count=\"0\"` is structural inertness, not a measurement — e.g. `magic-number` is C\u002FC++\u002FObjC-only and reports\n   `applicable=\"0\"` on a pure-Go tree), and the root's `inert_rules=N` tallies how many rows that is true for.\n   **Scoping a `--lint` run to one family — `--lint-select=PREFIX[,...]` \u002F `--lint-ignore=PREFIX[,...]`**\n   (comma-separated, `*` for \"every rule\"): `--lint-select=cache-` runs only the `cache-*` family, disclosing\n   `selected=\"K of N\"` on the root so a filtered zero is never confusable with an unfiltered one; an\n   unresolvable PREFIX refuses with a near-miss rather than silently matching nothing.\n\n   **The one naming lens that proposes a FIX, not just evidence — `ripwire \u003Cdir> --naming-consistency`.**\n   Every other pass on this page tells you WHAT is wrong; this one is the deliberate exception, and only for\n   one narrow reason: case-CONVENTION is Tier A (the research record's own tiering for \"propose a fix only\n   where the correct replacement is derivable from the corpus\" — see `ripwire-quality-bar`'s zoom-in table\n   for the other nine `--quality-delta` kinds, which stay evidence-only on purpose). It votes the corpus's\n   OWN dominant case style (camel\u002Fpascal\u002Fsnake\u002Fscreaming) per `(language, kind)` group — decided only past a\n   20-name sample floor AND 90% agreement, `UNAVAILABLE` with `why=` otherwise, never a guessed winner — and\n   every off-convention name in a decided group gets `propose=`: its own subtokens mechanically recombined\n   into that style. No dictionary, no synonym judgment — which is exactly why this is the one place a rename\n   suggestion is safe to make. **It is still only a suggestion**, not a safe-to-blind-apply rename: applying\n   one for real needs `--uses` to prove the complete reference set first. Exit 0 always, a lens like the rest\n   of this page — abbreviation inconsistency and synonym unification (the other two Tier-A categories) stay\n   unimplemented on purpose; both need a dictionary or a semantic judgment call this verb's design\n   deliberately avoids.\n\n   **Local-variable naming, opt-in and explicitly not the default — `ripwire \u003Cdir> --lint --naming-locals`.**\n   A `--lint` modifier, not a standalone verb (a no-op without `--lint`): runs `naming-short`\u002F`naming-wordy`\u002F\n   `naming-underscore`\u002F`naming-case` — the same tags, same predicates as the Symbol-scoped checks above —\n   against LOCAL variable names too, C\u002FC++ only, and only where the risk is real: inside a function that\n   already clears an existing size\u002Fcomplexity gate (`loc>80 OR nest>4 OR ccx>=15`) AND has `locals>=8`\n   (measured, not guessed: median 9 among this repo's own 377 gated functions). `naming-short` additionally\n   requires the local's own declaration depth `>=2` — a depth-1 `int n = argc;` never fires, a nested\n   `int x` two blocks deep can. This deliberately reverses `naminglens.h`'s own stated invariant (\"an\n   un-indexed loop local can never be flagged\") — read the WITHDRAWN note atop that file before trusting it.\n   **NOT enabled inside a plain `--lint` run and not a candidate for that yet**: the plan's own hard blocker\n   (a hand-curated fixture corpus AND a manual real-corpus audit for idiomatic-short-name skew — `i`\u002F`j`\u002F`k`\u002F\n   `buf`\u002F`tmp`\u002F`err`) has not run. Treat a `--naming-locals` finding as a candidate to eyeball, not a verdict,\n   until that audit lands.\n\n   **Your own rules** — `ripwire \u003Cdir> --lint-rules=DIR` loads YAML ast-grep-style rules from `DIR` and runs\n   them alongside (or instead of) the built-ins; findings share the same `\u003Cf rule= sev= p= …>message\u003C\u002Ff>`\n   shape. A malformed rule alerts to stderr and is skipped (sibling rules still load); zero loaded rules\n   exits 1. Writing a rule (the query grammar, the `inside`\u002F`not-inside`\u002F`not-matches` combinators, a worked\n   example) → **[`lint-rules.md`](lint-rules.md)**.\n\n5. **Ownership \u002F knowledge risk** — `ripwire \u003Cdir> --owners[=SYM]`\n   `\u003Cowners files=\"N\">\u003Cf p=\"…\" authors=\"1\" bf=\"1\" top=\"…@…\" share=\"1.00\"\u002F>` (recency-weighted, 6-month\n   half-life). `authors=` distinct authors; `share=` the top author's fraction of weighted commits;\n   **`bf=\"1\"` = one person holds >80% (bus-factor risk)**; `top=` = who to ask \u002F who should review.\n   `--owners=SYM` resolves to just that symbol's defining file — the \"who should review my change to\n   `buildGraph`\" answer. Measures *git authorship* (recency-biased), not who *should* own the code.\n   **Worst case:** a file that's BOTH a top hotspot (step 1) AND `bf=\"1\"` — gnarly code only one person\n   understands.\n\n   **Per-function readability** — `ripwire \u003Cdir> --readability`\n   `\u003Creadability functions=\"N\" shown=\"40\" capped=\"1\">\u003Cfn p=\"…:512\" n=\"buildGraph\" lines=\"1244\" toks=\"6753\"\n   ops=\"4359\" vocab=\"382\" vol=\"57923.4\" ent=\"6.26\" posnett=\"0.000\"\u002F>` — the Posnett\u002FHindle\u002FDevanbu (MSR 2011)\n   closed-form model, **least readable first**: `vol=` Halstead volume, `ent=` Shannon token entropy,\n   `lines=` the definition's line span, `posnett=` the fitted sigmoid. Complements step 1: `--hotspots` ranks\n   by complexity × *churn* (where pain has been paid), this ranks by how hard the text is to *read* right\n   now, with no git history needed. Two caveats it states in its own legend and you should carry: one\n   token-class table serves every language, so `vol=` is a cross-language approximation; and the formula was\n   fitted on snippets of 20 lines or fewer, so on a 1,000-line function `posnett=` saturates at `0.000` —\n   **read the ORDER of the rows, never the number as a grade.**\n\n   **Reachable non-local mutable state** — `ripwire \u003Cdir> --nonlocal-state`\n   `\u003Cfn p=\"src\u002Finfra\u002FprofilePmc.h:288\" n=\"ensure_global_init\" writes=\"2\" reads=\"3\" direct_writes=\"1\"\n   direct_reads=\"3\" cells_total=\"3\">\u003Ccell n=\"g_perf\" p=\"…:284\" dir=\"rw\" at=\"…:339\" at_dir=\"rw\"\u002F>…` — per\n   function, the globals \u002F file-scope statics \u002F function-local statics \u002F Python module globals it **or its\n   transitive callees** touch, **most writes first**, with reads and writes kept apart. `writes=`\u002F`reads=`\n   fold in the callee closure; `direct_*` is what this body does itself; each `\u003Ccell>` names the declaration\n   and either the use site here (`at=`, with `at_dir=` for what THIS body does) or the callee it came\n   through (`via=`). Answers a different \"is it safe to touch this?\" than `--impact`: `--impact` is who\n   calls you, this is what *state* you can perturb from here — the reason a change with a tiny caller set\n   still breaks something across the repo. **`const`\u002F`constexpr` declarations are not cells**, so a big\n   `writes=` is genuinely shared mutable state, not a table of constants. Three things to carry: it is\n   **unsound by construction** — no indirect calls, no pointer aliasing, no macro-named cells — so every\n   count is a `counts_floor=\"1\"` floor and a zero means *none found*; a local **shadowing** a cell's name\n   can be charged to the cell; and it covers **C++\u002FObjC\u002FPython only**, with every other indexed language\n   named in `unanalyzed_langs=` on the root, which is *not measured*, not *measured zero*.\n\n   **THE SINGLE COMMAND — `ripwire \u003Cdir> --quality-panel[=strict|default|lenient]`. When the question is\n   just \"where is the rot\", start HERE, not at step 1.** It is the whole panel in one ranked report: the four\n   families `--ensemble` joins, plus `colocation` (how much of what you must read to understand this function\n   lives outside its own file) and `state` (this function's OWN BODY touching non-local mutable state) — six\n   families, ranked by the count of distinct families and never by a composite.\n   `\u003Cs p=\".\u002Fsrc\u002Fgraph.h:462\" n=\"buildGraph\" fam=\"4\" of=\"6\" fired=\"structural,confusion,historical,colocation\"\n   uncounted=\"\" unavail=\"\" join=\"deep+untested\">\u003Ce f=\"structural\" counted=\"1\" why=\"ccx=724 loc=1244 nest=9\n   humps=30 deep=308 rrank=1\"\u002F>\u003Ce f=\"colocation\" counted=\"1\" why=\"crank=33\"\u002F>…`\n   Pick the preset by what you are doing, and note that a preset only **selects** families and **cuts** on the\n   count — it never weights: `lenient` (all six, 1 must agree) is a *reading order*, about a third of any tree;\n   `default` (all six, 2 must agree) is a review list; `strict` (the four families measured stable enough to\n   stand behind a gate, 2 must agree) is the only rung to point CI at. `historical` and `colocation` are\n   deliberately out of `strict` — each is a fixed-size worst-40 cut over a ranking whose population moves, so\n   both re-shuffle across commits on code that did not change. A row still SHOWS them, as `uncounted=` with\n   `counted=\"0\"`, so you can see what the preset set aside. Everything the `--ensemble` paragraph below says\n   about ordinal cuts and UNAVAILABLE applies here unchanged.\n\n   **Read the structural `why=` as a PROFILE — `nest=` alone is a max, and on a subsystem you did not write\n   that is exactly the wrong number to act on.** `nest=9` is one deepest line; it cannot tell a **tangled**\n   body from a long **blocked-sequential** one whose max is a single inner loop. The row carries the profile\n   beside it: **`humps=`** (how many maximal control-nesting regions reach the bar — CodeScene's \"bumpy\n   road\", EXACT) and **`deep=`** (how many **LINES** lie inside them — a FLOOR, `deep_floor=\"1\"`), against\n   the `loc=` already on the row. Both are **absent exactly when `nest \u003C` the bar** — not-deep, never a\n   hidden `0` — and **`deep` below `humps` is legal output, not a defect** (`deep` counts lines, `humps`\n   counts regions, and a one-line `if(c){x;}else{y;}` at the bar is two regions on one line). Two ratios do\n   the discriminating: **`deep\u002Floc`** separates tangled (high — depth is sustained) from blocked-sequential\n   (low — a dispatch table or a setup block), and **`deep\u002Fhumps`** separates one giant tangle (high — the\n   expensive fix) from many tiny touches (low — repeated missing abstractions, each its own cheap\n   extraction). `locals=` on the same row is the reader's working set — a FLOOR (`locals_floor=\"1\"`),\n   **C\u002FC++ only**, absent rather than `0` elsewhere. **`ev=` on the same row (essential complexity, McCabe:\n   absent\u002F`1` = single-entry\u002Fsingle-exit, extract-method applies mechanically; `2+` = a jump — see\n   `ev_why=`) — tells you whether the shape you are about to prescribe a fix for is a cheap lift or an\n   expensive rewrite before you commit to one.** **Which fix each shape calls for, and its precondition\n   → ripwire-quality-bar's shape → refactor playbook.**\n   **The numbers in the example rows on this page are ILLUSTRATIVE OF A SHAPE, not values to expect** — these\n   counters are under active calibration (an else-clause over-count fix in flight moves `humps=` down\n   substantially, and `ccx=`\u002F`nest=` with it, on else-heavy functions). Durable is what you do with the row:\n   `humps=1` vs many, the two ratios, and the semantics above. Read the row in front of you.\n\n   **`join=\"deep+untested\"`** is an annotation, not a seventh family: this row carries `deep=` *and* no\n   indexed test reaches it. It changes nothing — not `fam=`, not `of=`, not the ordering, not which rows\n   appear — and it is exactly the pair where a refactor is most wanted and least safe (**test first**,\n   → **ripwire-write-tests**). It is **suppressed on every row when `tested_scope=\"0\"`**, because on a corpus\n   whose tests were never crawled \"untested\" describes the crawl and not the code, so read `tested_scope=` on\n   the root before treating its absence as good news; `deep_untested=` counts them across the whole row set,\n   which the `limit=` window does not change.\n\n   **The `historical` family's unit is the FILE, not the symbol.** `churn=` and `hrank=` are file facts\n   inherited verbatim by every symbol in that file, so a symbol in a busy file collects this family without\n   any property of its own. On a subsystem read that is worth discounting explicitly: confirm at the symbol\n   (`git log -p \u003Cfile>`, or `--hotspots --since=`) before calling one function the churny one.\n\n   **Corroborated rot, four families only — `ripwire \u003Cdir> --ensemble`.** The narrower join, and the one\n   whose numbers are published; reach for it when you want exactly the calibrated four plus the per-file\n   rollup. One lens firing is an\n   opinion; the same function flagged by *several kinds of evidence at once* is a finding. `--ensemble` joins\n   four **orthogonal** families — `structural` (the shape: `ccx`\u002F`loc`\u002F`nest`\u002F`params` bars plus the\n   readability rank), `lexical` (the `naming-*` rules on the identifier text), `confusion` (the `atom-*`\n   rules on the syntactic construct), `historical` (git change frequency) — and ranks by the **count of\n   distinct families**:\n   `\u003Cs p=\".\u002Fsrc\u002Fgraph.h:462\" n=\"buildGraph\" fam=\"3\" of=\"4\" fired=\"structural,confusion,historical\"\n   unavail=\"\">\u003Ce f=\"structural\" why=\"ccx=724 loc=1244 nest=9 humps=30 deep=308 rrank=1\"\u002F>…` — plus a\n   per-file rollup whose `top_fam=` is the strongest single-symbol corroboration in that file. (The\n   `humps=`\u002F`deep=` profile and the per-FILE `historical` unit read exactly as in the panel above; this\n   verb has no `join=` annotation.)\n   **There is deliberately no composite score**: averaging correlated metrics re-weights one signal and calls\n   it three (the Maintainability-Index failure), so `fam=` is ordinal and every row carries the evidence\n   behind it — you never need a second command to see WHY. Two things to carry: `rrank=`\u002F`hrank=` are\n   **relative** cuts (the worst decile of *this* corpus, so something always fires), while the `ccx`\u002F`loc`\u002F\n   `nest`\u002F`params` bars are absolute and printed on the root; and a family that could not be measured is\n   named in `unavail=` with `of=` dropping to 3 — **UNAVAILABLE is not the same as clean**, so on a corpus\n   with no git history do not read the missing `historical` as \"nothing is churning\".\n\n   **How much is NOT in front of you — `ripwire \u003Cdir> --context-ratio`.** The other lenses ask how hard a\n   function is to read *once you have it open*; this one asks how much you must open *besides* it.\n   `\u003Cs p=\"src\u002Fmain.cpp:10177\" n=\"main\" sites=\"1050\" ents=\"131\" ents_out=\"85\" ent_ratio=\"0.649\" files=\"37\"\n   files_out=\"36\" rtok=\"165317\" rtok_out=\"61968\" read_ratio=\"0.375\" ext=\"141\" amb_names=\"19\"\u002F>` — `ents=` distinct\n   in-corpus definitions its reference sites resolve to, `ents_out=`\u002F`ent_ratio=` how many live outside its\n   own file, and `rtok=`\u002F`rtok_out=`\u002F`read_ratio=` the same split weighted by the **tokens a reader must\n   actually read**. Read the two ratios *together*: `main` above needs 65% of its entities from elsewhere but\n   only 37% of its reading volume, because the biggest things it touches are next door. A per-file rollup\n   follows the symbol rows and is a **union over the whole file** (includes and imports included), not the sum\n   of those rows. Three things to carry: it credits its own prior art — the fraction is Beck & Diehl's\n   per-class congruence (FSE 2011) flipped, and the refinement is the reader weighting plus the use of every\n   reference role, not just calls; resolution is **name-based**, so `amb_names=` names resolved to several\n   definitions and `ents=` is a floor; and `ext=` is dominated by locals and parameters, so it is **not** an\n   external-dependency count and never enters either ratio.\n\n   **Comments that say nothing — `ripwire \u003Cdir> --comment-coherence`.** Per function\u002Fmethod **with a doc\n   comment**, two content measures, most name-restating first: `\u003Cfn p=\"…:41\" n=\"computeTotal\" c_coeff=\"1.000\"\n   words=\"2\" restate=\"2\" cic=\"0.667\" c_terms=\"2\" i_terms=\"3\" shared=\"2\"\u002F>`. `c_coeff` (Steidl\u002FHummel\u002FJuergens,\n   ICPC 2013) is the fraction of the comment's words within Levenshtein distance 2 of a word in the name —\n   **HIGH is BAD**, it means the comment just restates the name (`\u002F\u002F compute total` above `computeTotal`\n   scores `c_coeff=\"1.000\"`), the opposite of the naive \"high coherence sounds good\" reading. `cic`\n   (Scalabrino, ICPC 2016\u002FJSEP 2018) is the Jaccard overlap between the comment's vocabulary and the method's\n   own identifier vocabulary (params, locals, callees, fields) — a different axis, expected to disagree with\n   `c_coeff`, so read both rather than either alone. **UNAVAILABLE, never a zero**, where no doc comment\n   exists at all (counted in `no_comment=` on the root) — this pass never guesses at an absent comment's\n   quality. Different question from `--doc-drift` above: doc-drift asks whether a *markdown* claim is still\n   *true*; this asks whether a *source doc-comment* carries *information* — neither checks the other's axis.\n\n## Hidden-coupling pass — \"a change here keeps breaking unrelated files\"\n\n6. **Behavioural coupling** — `ripwire \u003Cdir> --cochange`\n   Bare `--cochange` emits ONLY the *surprising* pairs — files that change together in git but share **no\n   static dependency** either way:\n   `\u003Ccochange pairs=\"N\" sub_windows=\"3\">\u003Cpair a=\"…\" b=\"…\" together=\"17\" deg=\"1.00\" conf_ab=\"1.00\"\n   conf_ba=\"0.34\" driver=\"a\" recur=\"3\" surprising=\"1\"\u002F>…`\n   (`together` = commits co-appearing, `deg` = fraction of the rarer file's commits). Pure behavioural\n   coupling — shared global state, parallel ownership, or an implicit protocol; statically-linked pairs are\n   filtered out as expected. For ONE file's full partner list, `--cochange=FILE`.\n\n   **Read `recur=` before you act on a row.** It is how many of the header's `sub_windows=` equal-commit-count\n   slices of the window the pair actually co-changed in. `recur=\"1\"` at any `together=` is a *single burst* —\n   a refactor sprint, a rename wave — not a standing coupling, and it is the biggest source of rows that look\n   alarming and are not. `ripwire \u003Cdir> --cochange --cochange-recur=2` drops them; the header then carries\n   `min_recur=` so the shorter list is explained rather than mysterious.\n\n   **`driver=` names the file to look at.** `conf_ab` is \"of a's commits, the fraction that also touched b\";\n   `conf_ba` is the reverse. `driver=\"a\"` means a is the one that never moves alone, so a is where the\n   implicit dependency lives. `deg=` is just the larger of the two, and `driver=` is omitted on a tie.\n\n   **`ripwire \u003Cdir> --cochange --cochange-groups`** collapses the violating pairs around the file each one\n   implicates: `\u003Cgroup core=\"…\" partners=\"3\">` says \"this file co-changes with three files it does not depend\n   on\" in one row instead of three. That is the row to act on — it names the fix target. The cover is greedy\n   (`cover=\"greedy\"`), so `groups=` is an upper bound on the minimum, not the minimum.\n\n7. **Structural coupling** — `ripwire \u003Cdir> --deps`\n   `\u003Cdeps>` with god-files ranked by `afferent` (dependents) and each file's `instab` (1 = leaf, 0 = core).\n   High-afferent, high-instability files are unstable hubs — every change there fans out. Cross with the\n   step-6 surprising partners: a clone group (step 3) that *also* co-changes is a maintenance coupling — a\n   fix must land in both copies.\n\n## Planning a refactor \u002F \"this class is a god object\"\n\nWhen the job is *\"I'm about to restructure this — where's the seam and what will it break?\"*, chain three\npasses into a refactor brief:\n\n1. **Find the high-complexity cluster** — `ripwire \u003Cdir> --communities` (cohesive call-graph modules) or\n   `ripwire \u003Cdir> --metrics --top-k=40` and read `ccx`\u002F`lcom4`. `lcom4>1` is a **god object by the numbers**\n   — N disjoint method clusters that want to be N types; the community\u002F`--zoom` view names the members that\n   belong together. Pick the cluster to break apart.\n2. **Its blast radius** — `ripwire \u003Cdir> --impact=SYM` on the cluster's lead symbol → `reaches=\"N\"` = every\n   caller a signature change would touch. Large `reaches=` → stage behind a shim, don't big-bang it.\n   `--affected=\u003Cfiles>` names the tests to keep green through the move.\n3. **Its co-change seams** — `ripwire \u003Cdir> --cochange=FILE` on the file you're splitting → files that\n   historically move with it. A `surprising=\"1\"` partner (no static dependency) is **hidden coupling the\n   refactor must preserve or explicitly cut** — fold it into the plan before you start.\n\n4. **Pick the fix from the SHAPE, not the score** — `ripwire \u003Cdir> --quality-panel` (or `--metrics`) on the\n   cluster, then read `humps=`\u002F`deep=`\u002F`locals=` as above: many shallow humps → extract each one (cheap); one\n   deep tangle → guard-clause inversion then state extraction (expensive); small-and-dense → read it first,\n   density is often the algorithm; `join=\"deep+untested\"` or high fan-in → **test before you touch it**. The\n   full shape → fix → precondition table, and the fix-then-prove loop that closes it\n   (`--quality-delta` → `--edit-check=SYM` → `--affected`), are in **ripwire-quality-bar**.\n\n→ **Refactor brief:** the cluster to split (with its `lcom4`\u002F`ccx` evidence and its nesting profile), the\nblast radius + test gate, the co-change partners to keep in sync, and the named fix each shape calls for. For\nCI-enforcing the boundary you extract → **ripwire-layers**.\n\n## Output\n\nA one-page health snapshot:\n- **Hotspots** — top 3 files by `score`, each with its worst function.\n- **Cleanup wins** — count of high-confidence dead-code candidates (all still marked *verify*) + the largest\n  clone group (biggest dedup payoff).\n- **Dominant smell** — the highest-count lint rule and where it clusters.\n- **Knowledge risk** — `bf=\"1\"` files, flagging any that are also hotspots.\n- **Hidden coupling** — top surprising co-change pairs + any that overlap a clone group.\n- **One-line verdict** — healthy \u002F has-debt \u002F needs-attention, with the single highest-priority item first.\n\nThis is the structural read — it doesn't run tests or a compiler. Pair with the build's warnings and test\nsuite; use **ripwire-change-check** for a specific diff rather than the whole repo.\n\n**Date the snapshot.** A health report is quoted back weeks later, long after the numbers moved. The\ngit-aware verbs stamp the commit they measured at — `--map-diff`\u002F`--doc-drift` carry `at=\"\u003Csha>[+dirty]\"`,\n`--stray-content` carries `head=\"\u003Csha>\"` — but most of this skill's passes (`--hotspots`, `--clones`,\n`--lint`, `--dead-code`, `--cochange`, `--owners`) carry **none**. Open the snapshot with the sha you ran\nat (`git rev-parse --short HEAD`) so a reader can tell a live finding from an archaeological one.\n","# Fresh-eyes risk review with ripwire\n\n> Routing:\n> • Any DIFF — your own, or an incoming PR you're reviewing — about to push or merge → **ripwire-change-check**.\n> • **You have the measurement and now need the FIX** — which refactor a measured shape calls for, its\n>   precondition, and the fix-then-prove loop → **ripwire-quality-bar**'s shape → refactor playbook.\n> • Architecture health (deps metrics, layering rules, modules) → **ripwire-layers**.\n> • Finding where a specific BUG lives → **ripwire-find-bug**.\n> • Not sure which skill? → **ripwire-router**.\n>\n> **Scope it to one unfamiliar subsystem** you're about to touch, instead of the whole tree, two ways:\n> point `\u003Cdir>` at the subdirectory (`ripwire src\u002Fnet --hotspots`), or keep the repo root and `--exclude` the\n> rest. `--dead-code=DIR` also scopes directly. This is how you turn the repo-wide sweep into a\n> \"what's-gnarly-in-code-I-didn't-write\" read of one module.\n\n`\u003Cdir>` = repo root. Add `--exclude=build --exclude=.git` (repeatable) to keep build artifacts out — they\notherwise show up as false clones and dead code. This composes descriptive passes into one snapshot; run the\nsections your question needs.\n\n**Inheriting this subsystem?** Check `ripwire \u003Cdir> --notes` first — a prior agent's pinned gotcha\n(`--note-add`'d trap, flake, or invariant) is the cheapest fact you can pick up before you start reading.\n\n## Core health passes\n\n1. **Maintenance hotspots** — `ripwire \u003Cdir> --hotspots`\n   ```\n   \u003Chotspots window=\"12mo\" ranked=\"33\">\u003Cf p=\".\u002Fsrc\u002Fmain.cpp\" churn=\"53\" ccx=\"1365\" score=\"72345\" top=\"main:1306\"\u002F> …\n   ```\n   `score = churn × ccx` (commits × Σ cognitive complexity). Top files = where developers keep working *and*\n   the code is hard — the highest-leverage places to improve. `top=` names the worst function.\n   **Recent regression, not an all-time read?** `--hotspots --since=\"2 weeks ago\"` (or `--since=HEAD~20`)\n   scopes churn to commits after that point; unresolvable\u002Fabsent `--since` degrades silently to all-history.\n   **On C-family\u002FC# code, discount a body carrying `ppalt=`:** its `cx=`\u002F`ccx=`\u002F`nest=`\u002F`loc=`\u002F`locals=` are\n   summed over EVERY `#else`\u002F`#ifdef` branch (deterministic, but an over-count vs any single build), so a\n   high score on a `ppalt=`-heavy function can be the preprocessor fan-out, not the logic — read `ppalt=`\n   before calling a row the worst in the file.\n\n1b. **What is BUILT but DARK here?** — `ripwire \u003Cdir> --flags` (`=SUBSTR` to narrow)\n   ```\n   \u003Cflags gates=\"98\" dark_gates=\"90\" compile=\"32\" cmake=\"9\" env=\"57\">\u003Cgate name=\"X_HARMONY_SFX\" kind=\"compile\"\n     default=\"0\" dark=\"1\" regions=\"7\" loc=\"45\" reads=\"8\" p=\"sound\u002FaudioWiringFlags.h\" l=\"47\"\u002F> …\n   ```\n   Inheriting a repo, the invisible half is the code that ships compiled OUT. This harvests all three gate\n   patterns — `#ifndef`\u002F`#define` header gates, CMake `option()`, `getenv()` reads — with each gate's\n   **default** and the size of the code it guards, dark first. Two things `--grep` cannot tell you: when a\n   name is BOTH a header gate defaulting to `0` and a CMake `option(... ON)`, the **CMake default wins**\n   (it is what the build passes) and the header appears as an `\u003Calso>` row — the contradiction a reader who\n   greps the header gets wrong; and a gate whose default IS another gate's name resolves through the alias\n   chain, so a master switch reports `\u003Caliases n=…>` instead of a misleading `loc=\"0\"`.\n   **Limits:** lexical, not preprocessed — this is the in-repo default, never the value *your* build used.\n   A gate needs a value (`#ifndef F` \u002F `#define F 0`); valueless pairs are include guards and are excluded.\n   A gate read as a value (`constexpr bool k = F != 0;` then `if constexpr`) honestly reports `regions=\"0\"`\n   here — **`--flip` below lifts exactly that limit.**\n\n1b-ii. **If I flip THIS one, what lights up?** — `ripwire \u003Cdir> --flags --flip=NAME`\n   ```\n   \u003Cflip gate=\"X_RRF_ALL\" kind=\"cmake\" default=\"ON\" dark=\"0\" family=\"12\" regions=\"0\" loc=\"0\" branches=\"43\"\n     bindings=\"11\" hosts=\"11\" downstream=\"95\" dependents=\"146\" tests=\"23\" untested=\"0\">\n     \u003Cmember name=\"X_RRF_ISLANDS\" via=\"alias\" branches=\"12\"\u002F> …\n     \u003Clights r=\"0\" b=\"43\">\u003Cb p=\"canyon\u002FsimLevel.cpp\" l=\"133\" gate=\"X_RRF_WIDTHWAVE\" via=\"kWidthWave\"\n       sym=\"buildStripTable\"\u002F> …\n   ```\n   A list of ~90 dark gates is a map, not a decision. This is the decision: for ONE gate, the code that\n   becomes live (`#if` regions **and** the `if constexpr` branch sites a value-style gate governs), the\n   **symbols** holding it, what those transitively call (`downstream` — what starts executing), who depends\n   on them (`dependents`), the **tests** that reach them, and `untested` — the hosts no test covers. That\n   last number is the honest answer to \"is it safe to flip?\".\n   Alias chains run **both ways**: flipping a master rolls up every child that `#define`s to it, flipping a\n   child lights only that child and names its `\u003Cparent>` plus the siblings the parent's flip would add.\n   `kind=\"cmake\"` also steers the *build graph* (an `if(NAME) target_sources(...)` can add whole files) —\n   those sites are listed as `\u003Cc>` rows and deliberately **not** followed. `kind=\"env\"` is `runtime=\"1\"`:\n   no delimited region, so the hosts are the symbols that consult the variable.\n   **Limits:** lexical and single-line, never preprocessed. A binding split across two lines is missed. The\n   value lane reads C-family source only and treats a file declaring its **own** constant of that name as\n   shadowing the gate's (C++ scoping) — but a *third* header's same-named constant, included rather than\n   redeclared, would still count. A lit site inside no indexed def (a guarded member field, a file-scope\n   `constexpr`, a test-macro body) counts into `filescope=` instead of a host. `--detail=N` lifts the row\n   caps. Report only — always exit 0; an unknown gate name refuses (exit 1) and names the near-misses.\n\n1c. **Can I TRUST this repo's docs?** — `ripwire \u003Cdir> --doc-drift` (`=SUBSTR` to narrow to one doc)\n   ```\n   \u003Cdoc-drift docs=\"129\" clean=\"110\" anchors=\"1995\" checked=\"716\" unchecked=\"1279\" drift=\"110\">\n     \u003Cdoc p=\"docs\u002FARCHITECTURE.md\" anchors=\"50\" checked=\"34\" drift=\"9\">\u003Ca k=\"file-line\" l=\"186\" c=\"80\"\n       why=\"line-moved\" ref=\"src\u002Fmain.cpp:317\" sym=\"isGitUrl\" got=\"communityPresentation\"\u002F> …\n   ```\n   Inheriting a repo, the design docs and audits are how you learn it — and the stale ones are how you learn\n   it *wrong*. Run this **before** you read them: it verifies the CHECKABLE anchors (`file:line` refs,\n   backticked symbol mentions, `= N` constants, `[N]` array extents) against the live index and reports only\n   what no longer holds, per doc. A doc with `drift=\"9\"` gets read with suspicion; the 110 clean ones do not.\n   `why=` names the cause — `missing-file`, `past-eof`, `line-moved` (with `got=` naming the symbol that now\n   occupies the line), `undefined`, `const-value`, `array-extent`.\n   **Limits:** anchors, not prose — `§Status` lines, dates and \"N of M done\" tallies are NOT checked, and it\n   says so rather than pretending. Every lane under-reports deliberately (a name is stale only if it occurs\n   nowhere in the code as a token; a number only if the corpus binds it uniquely in a declaration), and\n   `checked + unchecked = anchors` with each declined check named in an `\u003Cunchecked>` row. Exit is always 0:\n   drift is a report, not a gate.\n\n   **Want it to BECOME a gate?** — `ripwire \u003Cdir> --doc-drift --gateability`. The reason CI can't gate on\n   drift is usually a handful of UNDATED design docs: with no date the lexical lanes can't tell \"stale\" from\n   \"a record of what was true then\", so their rows stay unclassifiable. This lists exactly those docs and\n   what one annotation each would fix:\n   ```\n   \u003Cgateability docs=\"17\" projected_drift=\"0\">\n     \u003Cfix p=\"docs\u002FARCHITECTURE.md\" live=\"6\"\u002F> …\n   ```\n   `live=` is that doc's still-failing anchors; `projected_drift=` is the repo-wide drift you'd be left with\n   if every listed doc got one ISO date in its H1 or a front-matter self-date line. Treat it as an **upper\n   bound on the win, not a mandate** — dating a doc that is genuinely live hides real rot rather than\n   resolving it. Use it to turn \"CI stays non-gating forever\" into a finite to-do list.\n\n   **Add `--with-history` when the mention lane matters.** `undefined` only means \"defined nowhere here\",\n   which on a repo whose PLAN docs name unbuilt features is *expected*, not rot — measured on a 2900-file\n   repo, 243 of 325 `undefined` rows were names that had never existed there. `--with-history` makes one\n   `git log` pass over everything reachable from HEAD and splits the lane: `why=\"deleted\"` with `got=\"removed\n   in \u003Ccommit> (\u003Cdate>)\"` and `at=` the file (real rot, ~75% fewer rows but every true positive kept), versus\n   `\u003Cunchecked r=\"never-in-history\">` for names the repo never had. It is opt-in because the walk costs ~3 s\n   on that repo against a 0.64 s default; the result is memoized per (repo, HEAD sha), so every later\n   question on the same commit — including `--whereis --with-history` — is a cache load.\n\n1d. **Did a task in this plan just never get launched?** — `ripwire \u003Cdir> --plan-lint=FILE`. Where 1c\n   explicitly does NOT check `§Status` lines, dates or \"N of M done\" tallies, this is the narrow\n   structural check that closes that one gap — a wave-closer's job, mechanized. It is opt-in per FILE\n   (never a directory sweep) because the house PLAN dialect it recognizes is deliberately narrow: a task\n   card is exactly an H3 heading opening with a task id (`T5`, `T10`, `T7b`), a status ledger is exactly\n   one heading (any level) reading \"Status\" once a leading section mark is stripped. A file showing\n   neither an H3 card nor a ledger heading reports `dialect=\"0\"` and nothing further runs — most plans\n   are exactly that file, and this is not a failing lint for them.\n   ```\n   \u003Cplan-lint file=\"wave.md\" dialect=\"1\" cards=\"6\" ledger=\"1\" git=\"1\" stale_commits=\"20\" gating=\"1\">\n     \u003Ccard id=\"T5\" line=\"40\" status=\"missing\" why=\"unlaunched\" gating=\"1\"\u002F> …\n   ```\n   Once `dialect=\"1\"`: a card's status is satisfied EITHER by a glyph on the LAST non-blank line of its\n   own body OR by a `§Status` ledger line naming its id — folded by DIGITS, so a bare card `T7` is also\n   answered by a lettered ledger mention `T7a`\u002F`T7b` (the real house shape when a card's own body names\n   lettered sub-tasks and the ledger tracks each separately) — with the card's own body winning when it\n   has one. Unresolved is `status=\"missing\"`, with `why=` naming the exact shape: `unlaunched` (a ledger\n   exists and never names this id at all — the exact field failure this verb exists to catch: a card that\n   was planned but never started, silent until a human happened to notice), `unresolved` (the ledger names\n   it but no line carries a glyph), or `no-glyph` (this document carries no ledger at all, so the card's\n   own body was the only possible source). An hourglass line whose git-blamed commit sits more than\n   `stale_commits=` commits behind HEAD is `stale=\"1\"` (never claimed outside a git repo; blames whichever\n   line the status actually resolved to, marked `src=\"ledger\"` when that is the ledger and not the card);\n   a task id named in the ledger with no matching card (same digit fold) is a `ledger-orphan`; an owed\u002FOWED\n   mention with no check-mark or cross anywhere LATER in the SAME document is undischarged.\n   **Limits, stated up front:** never semantics — it does not judge whether a card's claims are true (that\n   stays 1c's job); single-document only (a successor plan's discharge of an owed item is invisible here);\n   substring matching on \"owed\"\u002F\"OWED\" with no disambiguation (a doc that merely quotes the word reads the\n   same as a real marker); a document that uses card headings as plain labels with NO status mechanism\n   anywhere (no ledger, no glyph on any card) still reads every card as `missing` — a known, disclosed gap,\n   not a guessed-at fix. Unlike `--doc-drift`'s always-0 report, this **gates**: exit 2 when `dialect=\"1\"`\n   and any row carries `gating=\"1\"`, exit 0 clean or `dialect=\"0\"`, exit 1 only when FILE could not be read.\n\n2. **Dead code** — `ripwire \u003Cdir> --dead-code[=DIR]`\n   `\u003Cdead-code count=\"N\" confidence=\"high\" evidence=\"internal-linkage+zero-callers\">\u003Cd n=\"orphan\" …\u002F>` —\n   source-defined free functions with explicit internal linkage and **in-degree 0** in the indexed call\n   graph. `--dead-code=DIR` scopes to a sub-tree. Methods, declarations, headers, and external-linkage entry\n   points are excluded, so `count=\"0\"` means \"no high-confidence candidates,\" not \"no dead code.\" Name-based\n   and tree-local — **verify before deleting**: confirm against the compiler's unused-symbol diagnostics or a\n   linker map; ripwire narrows the field, the toolchain proves it.\n\n3. **Duplicate bodies** — `ripwire \u003Cdir> --clones`\n   `\u003Cclones groups=\"N\" type3=\"M\">\u003Cgroup type=\"2\" tokens=\"161\" n=\"2\">\u003Cf n=\"line\" p=\"…:31\"\u002F>\u003Cf n=\"line\"\n   p=\"…:28\"\u002F>\u003C\u002Fgroup>`. `type=\"2\"` = exact\u002Frenamed (identifiers + literals normalized, so a renamed copy\n   still matches); `type=\"3\"` = a gapped NEAR-miss (similarity 0.80–1.0, an inserted\u002Fchanged statement) —\n   check `type=` before assuming two members are byte-identical. Larger `tokens=` = more dedup value; a fix\n   to one likely belongs in all. **Rule of Three:** extract on the *third* occurrence, not the second — a\n   little duplication beats the *wrong* abstraction.\n   A group carrying `idiom=\"…\"` (`threshold-ladder`, `switch-name-table`, `builder-chain`) plus\n   `demoted=\"1\"` is one the detector judged an IDIOM COLLISION, not shared logic: same shape, no shared\n   domain identifiers, different scopes — five unrelated bucketing ladders in five subsystems match each\n   other's token stream and consolidating them would be the wrong abstraction. Demoted groups still print\n   and still count; they stop *gating*. The idiom is named precisely so you can overrule it by reading the\n   bodies — treat it as the tool showing its work, not as a row it decided for you.\n\n4. **AST smells** — `ripwire \u003Cdir> --lint`\n   `\u003Clint findings=\"N\">\u003Crule name=\"magic-number\" count=\"82\"\u002F> …` then per-finding `\u003Cf rule= p= …>` with the\n   enclosing symbol. No-build, AST-only — a fast complement to clang-tidy, not a replacement. Skim the\n   per-rule counts for the dominant smell.\n\n   **Two rule prefixes are also family evidence.** `naming-*` (`naming-case`\u002F`naming-confusable`\u002F\n   `naming-predicate`\u002F`naming-series`\u002F`naming-setter`\u002F`naming-short`\u002F`naming-underscore`\u002F`naming-wordy`) is\n   exactly `--ensemble`'s\u002F`--quality-panel`'s `lexical` family; `atom-*` (`atom-assign-as-value`\u002F\n   `atom-comma-operator`\u002F`atom-embedded-crement`\u002F`atom-implicit-predicate`\u002F`atom-nested-ternary`\u002F\n   `atom-octal-literal`\u002F`atom-reversed-subscript`) is `confusion`. A `--lint` finding under either prefix\n   is the identical predicate the family join runs — reading it here just skips the join. **Not a moment to\n   reach for mid-task:** `--naming-calibration` scores both spellings of this repo's own historical renames\n   (old identifier vs. what it was renamed to) against the same `naming-*` predicates — it is how those\n   rules were validated, a maintainer calibration harness (`test\u002Fnamingcalibrationcheck.sh` pins the\n   per-rule floor) with a `pairs=` sample size and its own legend calling itself a **noisy proxy**, not a\n   verdict on any function you're looking at. It always exits 0.\n\n   **What rules exist, and are they even structurally possible on this corpus? — `ripwire \u003Cdir>\n   --lint-catalog`.** The full built-in registry: every rule's severity, category, one-line rationale, its\n   registered languages, and the release it shipped in — no corpus needed, so it answers \"what could `--lint`\n   ever find here\" before you run it. A plain `--lint` run then discloses the corpus-specific half:\n   `applicable=\"0\"` on a `\u003Crule>` row means none of that rule's registered languages are present at all (its\n   `count=\"0\"` is structural inertness, not a measurement — e.g. `magic-number` is C\u002FC++\u002FObjC-only and reports\n   `applicable=\"0\"` on a pure-Go tree), and the root's `inert_rules=N` tallies how many rows that is true for.\n   **Scoping a `--lint` run to one family — `--lint-select=PREFIX[,...]` \u002F `--lint-ignore=PREFIX[,...]`**\n   (comma-separated, `*` for \"every rule\"): `--lint-select=cache-` runs only the `cache-*` family, disclosing\n   `selected=\"K of N\"` on the root so a filtered zero is never confusable with an unfiltered one; an\n   unresolvable PREFIX refuses with a near-miss rather than silently matching nothing.\n\n   **The one naming lens that proposes a FIX, not just evidence — `ripwire \u003Cdir> --naming-consistency`.**\n   Every other pass on this page tells you WHAT is wrong; this one is the deliberate exception, and only for\n   one narrow reason: case-CONVENTION is Tier A (the research record's own tiering for \"propose a fix only\n   where the correct replacement is derivable from the corpus\" — see `ripwire-quality-bar`'s zoom-in table\n   for the other nine `--quality-delta` kinds, which stay evidence-only on purpose). It votes the corpus's\n   OWN dominant case style (camel\u002Fpascal\u002Fsnake\u002Fscreaming) per `(language, kind)` group — decided only past a\n   20-name sample floor AND 90% agreement, `UNAVAILABLE` with `why=` otherwise, never a guessed winner — and\n   every off-convention name in a decided group gets `propose=`: its own subtokens mechanically recombined\n   into that style. No dictionary, no synonym judgment — which is exactly why this is the one place a rename\n   suggestion is safe to make. **It is still only a suggestion**, not a safe-to-blind-apply rename: applying\n   one for real needs `--uses` to prove the complete reference set first. Exit 0 always, a lens like the rest\n   of this page — abbreviation inconsistency and synonym unification (the other two Tier-A categories) stay\n   unimplemented on purpose; both need a dictionary or a semantic judgment call this verb's design\n   deliberately avoids.\n\n   **Local-variable naming, opt-in and explicitly not the default — `ripwire \u003Cdir> --lint --naming-locals`.**\n   A `--lint` modifier, not a standalone verb (a no-op without `--lint`): runs `naming-short`\u002F`naming-wordy`\u002F\n   `naming-underscore`\u002F`naming-case` — the same tags, same predicates as the Symbol-scoped checks above —\n   against LOCAL variable names too, C\u002FC++ only, and only where the risk is real: inside a function that\n   already clears an existing size\u002Fcomplexity gate (`loc>80 OR nest>4 OR ccx>=15`) AND has `locals>=8`\n   (measured, not guessed: median 9 among this repo's own 377 gated functions). `naming-short` additionally\n   requires the local's own declaration depth `>=2` — a depth-1 `int n = argc;` never fires, a nested\n   `int x` two blocks deep can. This deliberately reverses `naminglens.h`'s own stated invariant (\"an\n   un-indexed loop local can never be flagged\") — read the WITHDRAWN note atop that file before trusting it.\n   **NOT enabled inside a plain `--lint` run and not a candidate for that yet**: the plan's own hard blocker\n   (a hand-curated fixture corpus AND a manual real-corpus audit for idiomatic-short-name skew — `i`\u002F`j`\u002F`k`\u002F\n   `buf`\u002F`tmp`\u002F`err`) has not run. Treat a `--naming-locals` finding as a candidate to eyeball, not a verdict,\n   until that audit lands.\n\n   **Your own rules** — `ripwire \u003Cdir> --lint-rules=DIR` loads YAML ast-grep-style rules from `DIR` and runs\n   them alongside (or instead of) the built-ins; findings share the same `\u003Cf rule= sev= p= …>message\u003C\u002Ff>`\n   shape. A malformed rule alerts to stderr and is skipped (sibling rules still load); zero loaded rules\n   exits 1. Writing a rule (the query grammar, the `inside`\u002F`not-inside`\u002F`not-matches` combinators, a worked\n   example) → **[`lint-rules.md`](lint-rules.md)**.\n\n5. **Ownership \u002F knowledge risk** — `ripwire \u003Cdir> --owners[=SYM]`\n   `\u003Cowners files=\"N\">\u003Cf p=\"…\" authors=\"1\" bf=\"1\" top=\"…@…\" share=\"1.00\"\u002F>` (recency-weighted, 6-month\n   half-life). `authors=` distinct authors; `share=` the top author's fraction of weighted commits;\n   **`bf=\"1\"` = one person holds >80% (bus-factor risk)**; `top=` = who to ask \u002F who should review.\n   `--owners=SYM` resolves to just that symbol's defining file — the \"who should review my change to\n   `buildGraph`\" answer. Measures *git authorship* (recency-biased), not who *should* own the code.\n   **Worst case:** a file that's BOTH a top hotspot (step 1) AND `bf=\"1\"` — gnarly code only one person\n   understands.\n\n   **Per-function readability** — `ripwire \u003Cdir> --readability`\n   `\u003Creadability functions=\"N\" shown=\"40\" capped=\"1\">\u003Cfn p=\"…:512\" n=\"buildGraph\" lines=\"1244\" toks=\"6753\"\n   ops=\"4359\" vocab=\"382\" vol=\"57923.4\" ent=\"6.26\" posnett=\"0.000\"\u002F>` — the Posnett\u002FHindle\u002FDevanbu (MSR 2011)\n   closed-form model, **least readable first**: `vol=` Halstead volume, `ent=` Shannon token entropy,\n   `lines=` the definition's line span, `posnett=` the fitted sigmoid. Complements step 1: `--hotspots` ranks\n   by complexity × *churn* (where pain has been paid), this ranks by how hard the text is to *read* right\n   now, with no git history needed. Two caveats it states in its own legend and you should carry: one\n   token-class table serves every language, so `vol=` is a cross-language approximation; and the formula was\n   fitted on snippets of 20 lines or fewer, so on a 1,000-line function `posnett=` saturates at `0.000` —\n   **read the ORDER of the rows, never the number as a grade.**\n\n   **Reachable non-local mutable state** — `ripwire \u003Cdir> --nonlocal-state`\n   `\u003Cfn p=\"src\u002Finfra\u002FprofilePmc.h:288\" n=\"ensure_global_init\" writes=\"2\" reads=\"3\" direct_writes=\"1\"\n   direct_reads=\"3\" cells_total=\"3\">\u003Ccell n=\"g_perf\" p=\"…:284\" dir=\"rw\" at=\"…:339\" at_dir=\"rw\"\u002F>…` — per\n   function, the globals \u002F file-scope statics \u002F function-local statics \u002F Python module globals it **or its\n   transitive callees** touch, **most writes first**, with reads and writes kept apart. `writes=`\u002F`reads=`\n   fold in the callee closure; `direct_*` is what this body does itself; each `\u003Ccell>` names the declaration\n   and either the use site here (`at=`, with `at_dir=` for what THIS body does) or the callee it came\n   through (`via=`). Answers a different \"is it safe to touch this?\" than `--impact`: `--impact` is who\n   calls you, this is what *state* you can perturb from here — the reason a change with a tiny caller set\n   still breaks something across the repo. **`const`\u002F`constexpr` declarations are not cells**, so a big\n   `writes=` is genuinely shared mutable state, not a table of constants. Three things to carry: it is\n   **unsound by construction** — no indirect calls, no pointer aliasing, no macro-named cells — so every\n   count is a `counts_floor=\"1\"` floor and a zero means *none found*; a local **shadowing** a cell's name\n   can be charged to the cell; and it covers **C++\u002FObjC\u002FPython only**, with every other indexed language\n   named in `unanalyzed_langs=` on the root, which is *not measured*, not *measured zero*.\n\n   **THE SINGLE COMMAND — `ripwire \u003Cdir> --quality-panel[=strict|default|lenient]`. When the question is\n   just \"where is the rot\", start HERE, not at step 1.** It is the whole panel in one ranked report: the four\n   families `--ensemble` joins, plus `colocation` (how much of what you must read to understand this function\n   lives outside its own file) and `state` (this function's OWN BODY touching non-local mutable state) — six\n   families, ranked by the count of distinct families and never by a composite.\n   `\u003Cs p=\".\u002Fsrc\u002Fgraph.h:462\" n=\"buildGraph\" fam=\"4\" of=\"6\" fired=\"structural,confusion,historical,colocation\"\n   uncounted=\"\" unavail=\"\" join=\"deep+untested\">\u003Ce f=\"structural\" counted=\"1\" why=\"ccx=724 loc=1244 nest=9\n   humps=30 deep=308 rrank=1\"\u002F>\u003Ce f=\"colocation\" counted=\"1\" why=\"crank=33\"\u002F>…`\n   Pick the preset by what you are doing, and note that a preset only **selects** families and **cuts** on the\n   count — it never weights: `lenient` (all six, 1 must agree) is a *reading order*, about a third of any tree;\n   `default` (all six, 2 must agree) is a review list; `strict` (the four families measured stable enough to\n   stand behind a gate, 2 must agree) is the only rung to point CI at. `historical` and `colocation` are\n   deliberately out of `strict` — each is a fixed-size worst-40 cut over a ranking whose population moves, so\n   both re-shuffle across commits on code that did not change. A row still SHOWS them, as `uncounted=` with\n   `counted=\"0\"`, so you can see what the preset set aside. Everything the `--ensemble` paragraph below says\n   about ordinal cuts and UNAVAILABLE applies here unchanged.\n\n   **Read the structural `why=` as a PROFILE — `nest=` alone is a max, and on a subsystem you did not write\n   that is exactly the wrong number to act on.** `nest=9` is one deepest line; it cannot tell a **tangled**\n   body from a long **blocked-sequential** one whose max is a single inner loop. The row carries the profile\n   beside it: **`humps=`** (how many maximal control-nesting regions reach the bar — CodeScene's \"bumpy\n   road\", EXACT) and **`deep=`** (how many **LINES** lie inside them — a FLOOR, `deep_floor=\"1\"`), against\n   the `loc=` already on the row. Both are **absent exactly when `nest \u003C` the bar** — not-deep, never a\n   hidden `0` — and **`deep` below `humps` is legal output, not a defect** (`deep` counts lines, `humps`\n   counts regions, and a one-line `if(c){x;}else{y;}` at the bar is two regions on one line). Two ratios do\n   the discriminating: **`deep\u002Floc`** separates tangled (high — depth is sustained) from blocked-sequential\n   (low — a dispatch table or a setup block), and **`deep\u002Fhumps`** separates one giant tangle (high — the\n   expensive fix) from many tiny touches (low — repeated missing abstractions, each its own cheap\n   extraction). `locals=` on the same row is the reader's working set — a FLOOR (`locals_floor=\"1\"`),\n   **C\u002FC++ only**, absent rather than `0` elsewhere. **`ev=` on the same row (essential complexity, McCabe:\n   absent\u002F`1` = single-entry\u002Fsingle-exit, extract-method applies mechanically; `2+` = a jump — see\n   `ev_why=`) — tells you whether the shape you are about to prescribe a fix for is a cheap lift or an\n   expensive rewrite before you commit to one.** **Which fix each shape calls for, and its precondition\n   → ripwire-quality-bar's shape → refactor playbook.**\n   **The numbers in the example rows on this page are ILLUSTRATIVE OF A SHAPE, not values to expect** — these\n   counters are under active calibration (an else-clause over-count fix in flight moves `humps=` down\n   substantially, and `ccx=`\u002F`nest=` with it, on else-heavy functions). Durable is what you do with the row:\n   `humps=1` vs many, the two ratios, and the semantics above. Read the row in front of you.\n\n   **`join=\"deep+untested\"`** is an annotation, not a seventh family: this row carries `deep=` *and* no\n   indexed test reaches it. It changes nothing — not `fam=`, not `of=`, not the ordering, not which rows\n   appear — and it is exactly the pair where a refactor is most wanted and least safe (**test first**,\n   → **ripwire-write-tests**). It is **suppressed on every row when `tested_scope=\"0\"`**, because on a corpus\n   whose tests were never crawled \"untested\" describes the crawl and not the code, so read `tested_scope=` on\n   the root before treating its absence as good news; `deep_untested=` counts them across the whole row set,\n   which the `limit=` window does not change.\n\n   **The `historical` family's unit is the FILE, not the symbol.** `churn=` and `hrank=` are file facts\n   inherited verbatim by every symbol in that file, so a symbol in a busy file collects this family without\n   any property of its own. On a subsystem read that is worth discounting explicitly: confirm at the symbol\n   (`git log -p \u003Cfile>`, or `--hotspots --since=`) before calling one function the churny one.\n\n   **Corroborated rot, four families only — `ripwire \u003Cdir> --ensemble`.** The narrower join, and the one\n   whose numbers are published; reach for it when you want exactly the calibrated four plus the per-file\n   rollup. One lens firing is an\n   opinion; the same function flagged by *several kinds of evidence at once* is a finding. `--ensemble` joins\n   four **orthogonal** families — `structural` (the shape: `ccx`\u002F`loc`\u002F`nest`\u002F`params` bars plus the\n   readability rank), `lexical` (the `naming-*` rules on the identifier text), `confusion` (the `atom-*`\n   rules on the syntactic construct), `historical` (git change frequency) — and ranks by the **count of\n   distinct families**:\n   `\u003Cs p=\".\u002Fsrc\u002Fgraph.h:462\" n=\"buildGraph\" fam=\"3\" of=\"4\" fired=\"structural,confusion,historical\"\n   unavail=\"\">\u003Ce f=\"structural\" why=\"ccx=724 loc=1244 nest=9 humps=30 deep=308 rrank=1\"\u002F>…` — plus a\n   per-file rollup whose `top_fam=` is the strongest single-symbol corroboration in that file. (The\n   `humps=`\u002F`deep=` profile and the per-FILE `historical` unit read exactly as in the panel above; this\n   verb has no `join=` annotation.)\n   **There is deliberately no composite score**: averaging correlated metrics re-weights one signal and calls\n   it three (the Maintainability-Index failure), so `fam=` is ordinal and every row carries the evidence\n   behind it — you never need a second command to see WHY. Two things to carry: `rrank=`\u002F`hrank=` are\n   **relative** cuts (the worst decile of *this* corpus, so something always fires), while the `ccx`\u002F`loc`\u002F\n   `nest`\u002F`params` bars are absolute and printed on the root; and a family that could not be measured is\n   named in `unavail=` with `of=` dropping to 3 — **UNAVAILABLE is not the same as clean**, so on a corpus\n   with no git history do not read the missing `historical` as \"nothing is churning\".\n\n   **How much is NOT in front of you — `ripwire \u003Cdir> --context-ratio`.** The other lenses ask how hard a\n   function is to read *once you have it open*; this one asks how much you must open *besides* it.\n   `\u003Cs p=\"src\u002Fmain.cpp:10177\" n=\"main\" sites=\"1050\" ents=\"131\" ents_out=\"85\" ent_ratio=\"0.649\" files=\"37\"\n   files_out=\"36\" rtok=\"165317\" rtok_out=\"61968\" read_ratio=\"0.375\" ext=\"141\" amb_names=\"19\"\u002F>` — `ents=` distinct\n   in-corpus definitions its reference sites resolve to, `ents_out=`\u002F`ent_ratio=` how many live outside its\n   own file, and `rtok=`\u002F`rtok_out=`\u002F`read_ratio=` the same split weighted by the **tokens a reader must\n   actually read**. Read the two ratios *together*: `main` above needs 65% of its entities from elsewhere but\n   only 37% of its reading volume, because the biggest things it touches are next door. A per-file rollup\n   follows the symbol rows and is a **union over the whole file** (includes and imports included), not the sum\n   of those rows. Three things to carry: it credits its own prior art — the fraction is Beck & Diehl's\n   per-class congruence (FSE 2011) flipped, and the refinement is the reader weighting plus the use of every\n   reference role, not just calls; resolution is **name-based**, so `amb_names=` names resolved to several\n   definitions and `ents=` is a floor; and `ext=` is dominated by locals and parameters, so it is **not** an\n   external-dependency count and never enters either ratio.\n\n   **Comments that say nothing — `ripwire \u003Cdir> --comment-coherence`.** Per function\u002Fmethod **with a doc\n   comment**, two content measures, most name-restating first: `\u003Cfn p=\"…:41\" n=\"computeTotal\" c_coeff=\"1.000\"\n   words=\"2\" restate=\"2\" cic=\"0.667\" c_terms=\"2\" i_terms=\"3\" shared=\"2\"\u002F>`. `c_coeff` (Steidl\u002FHummel\u002FJuergens,\n   ICPC 2013) is the fraction of the comment's words within Levenshtein distance 2 of a word in the name —\n   **HIGH is BAD**, it means the comment just restates the name (`\u002F\u002F compute total` above `computeTotal`\n   scores `c_coeff=\"1.000\"`), the opposite of the naive \"high coherence sounds good\" reading. `cic`\n   (Scalabrino, ICPC 2016\u002FJSEP 2018) is the Jaccard overlap between the comment's vocabulary and the method's\n   own identifier vocabulary (params, locals, callees, fields) — a different axis, expected to disagree with\n   `c_coeff`, so read both rather than either alone. **UNAVAILABLE, never a zero**, where no doc comment\n   exists at all (counted in `no_comment=` on the root) — this pass never guesses at an absent comment's\n   quality. Different question from `--doc-drift` above: doc-drift asks whether a *markdown* claim is still\n   *true*; this asks whether a *source doc-comment* carries *information* — neither checks the other's axis.\n\n## Hidden-coupling pass — \"a change here keeps breaking unrelated files\"\n\n6. **Behavioural coupling** — `ripwire \u003Cdir> --cochange`\n   Bare `--cochange` emits ONLY the *surprising* pairs — files that change together in git but share **no\n   static dependency** either way:\n   `\u003Ccochange pairs=\"N\" sub_windows=\"3\">\u003Cpair a=\"…\" b=\"…\" together=\"17\" deg=\"1.00\" conf_ab=\"1.00\"\n   conf_ba=\"0.34\" driver=\"a\" recur=\"3\" surprising=\"1\"\u002F>…`\n   (`together` = commits co-appearing, `deg` = fraction of the rarer file's commits). Pure behavioural\n   coupling — shared global state, parallel ownership, or an implicit protocol; statically-linked pairs are\n   filtered out as expected. For ONE file's full partner list, `--cochange=FILE`.\n\n   **Read `recur=` before you act on a row.** It is how many of the header's `sub_windows=` equal-commit-count\n   slices of the window the pair actually co-changed in. `recur=\"1\"` at any `together=` is a *single burst* —\n   a refactor sprint, a rename wave — not a standing coupling, and it is the biggest source of rows that look\n   alarming and are not. `ripwire \u003Cdir> --cochange --cochange-recur=2` drops them; the header then carries\n   `min_recur=` so the shorter list is explained rather than mysterious.\n\n   **`driver=` names the file to look at.** `conf_ab` is \"of a's commits, the fraction that also touched b\";\n   `conf_ba` is the reverse. `driver=\"a\"` means a is the one that never moves alone, so a is where the\n   implicit dependency lives. `deg=` is just the larger of the two, and `driver=` is omitted on a tie.\n\n   **`ripwire \u003Cdir> --cochange --cochange-groups`** collapses the violating pairs around the file each one\n   implicates: `\u003Cgroup core=\"…\" partners=\"3\">` says \"this file co-changes with three files it does not depend\n   on\" in one row instead of three. That is the row to act on — it names the fix target. The cover is greedy\n   (`cover=\"greedy\"`), so `groups=` is an upper bound on the minimum, not the minimum.\n\n7. **Structural coupling** — `ripwire \u003Cdir> --deps`\n   `\u003Cdeps>` with god-files ranked by `afferent` (dependents) and each file's `instab` (1 = leaf, 0 = core).\n   High-afferent, high-instability files are unstable hubs — every change there fans out. Cross with the\n   step-6 surprising partners: a clone group (step 3) that *also* co-changes is a maintenance coupling — a\n   fix must land in both copies.\n\n## Planning a refactor \u002F \"this class is a god object\"\n\nWhen the job is *\"I'm about to restructure this — where's the seam and what will it break?\"*, chain three\npasses into a refactor brief:\n\n1. **Find the high-complexity cluster** — `ripwire \u003Cdir> --communities` (cohesive call-graph modules) or\n   `ripwire \u003Cdir> --metrics --top-k=40` and read `ccx`\u002F`lcom4`. `lcom4>1` is a **god object by the numbers**\n   — N disjoint method clusters that want to be N types; the community\u002F`--zoom` view names the members that\n   belong together. Pick the cluster to break apart.\n2. **Its blast radius** — `ripwire \u003Cdir> --impact=SYM` on the cluster's lead symbol → `reaches=\"N\"` = every\n   caller a signature change would touch. Large `reaches=` → stage behind a shim, don't big-bang it.\n   `--affected=\u003Cfiles>` names the tests to keep green through the move.\n3. **Its co-change seams** — `ripwire \u003Cdir> --cochange=FILE` on the file you're splitting → files that\n   historically move with it. A `surprising=\"1\"` partner (no static dependency) is **hidden coupling the\n   refactor must preserve or explicitly cut** — fold it into the plan before you start.\n\n4. **Pick the fix from the SHAPE, not the score** — `ripwire \u003Cdir> --quality-panel` (or `--metrics`) on the\n   cluster, then read `humps=`\u002F`deep=`\u002F`locals=` as above: many shallow humps → extract each one (cheap); one\n   deep tangle → guard-clause inversion then state extraction (expensive); small-and-dense → read it first,\n   density is often the algorithm; `join=\"deep+untested\"` or high fan-in → **test before you touch it**. The\n   full shape → fix → precondition table, and the fix-then-prove loop that closes it\n   (`--quality-delta` → `--edit-check=SYM` → `--affected`), are in **ripwire-quality-bar**.\n\n→ **Refactor brief:** the cluster to split (with its `lcom4`\u002F`ccx` evidence and its nesting profile), the\nblast radius + test gate, the co-change partners to keep in sync, and the named fix each shape calls for. For\nCI-enforcing the boundary you extract → **ripwire-layers**.\n\n## Output\n\nA one-page health snapshot:\n- **Hotspots** — top 3 files by `score`, each with its worst function.\n- **Cleanup wins** — count of high-confidence dead-code candidates (all still marked *verify*) + the largest\n  clone group (biggest dedup payoff).\n- **Dominant smell** — the highest-count lint rule and where it clusters.\n- **Knowledge risk** — `bf=\"1\"` files, flagging any that are also hotspots.\n- **Hidden coupling** — top surprising co-change pairs + any that overlap a clone group.\n- **One-line verdict** — healthy \u002F has-debt \u002F needs-attention, with the single highest-priority item first.\n\nThis is the structural read — it doesn't run tests or a compiler. Pair with the build's warnings and test\nsuite; use **ripwire-change-check** for a specific diff rather than the whole repo.\n\n**Date the snapshot.** A health report is quoted back weeks later, long after the numbers moved. The\ngit-aware verbs stamp the commit they measured at — `--map-diff`\u002F`--doc-drift` carry `at=\"\u003Csha>[+dirty]\"`,\n`--stray-content` carries `head=\"\u003Csha>\"` — but most of this skill's passes (`--hotspots`, `--clones`,\n`--lint`, `--dead-code`, `--cochange`, `--owners`) carry **none**. Open the snapshot with the sha you ran\nat (`git rev-parse --short HEAD`) so a reader can tell a live finding from an archaeological one.\n",{"name":5,"description":24,"allowed-tools":25},"Maintenance risk in code you did NOT write — inheriting a module, a suspected god object, 'what's gnarly \u002F where's the rot \u002F safe to touch?': hotspots, dead code, clones, a function's real shape, bus factor, co-change. Naming the fix or judging YOUR new code → quality-bar. A single-lens question is a single call.\n","Bash, Read","main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","04-安全渗透\u002Fripwire-fresh-eyes-ripwire",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill ripwire-fresh-eyes",{"tool":40,"command":41},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill ripwire-fresh-eyes",{"tool":43,"command":44},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill ripwire-fresh-eyes","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Fripwire-fresh-eyes-ripwire\u002FSKILL.md",true,[48],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"lint-rules.md","REFERENCE","参考文档",1803,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Fripwire-fresh-eyes-ripwire\u002Flint-rules.md",[55,63,68,75,82,89],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":62},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":64,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":62},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":62},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":62},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":62},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":62},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]