{"name":"investigate-codebase","title":"Investigate a codebase","description":"Answer a question about a codebase with evidence a reader can re-run: path and line, command output, and searched negatives reported as searched rather than as absence. Symptoms: how does X actually work, does anything still call this, is this dead code, where does this value come from, two sources disagree (a doc against the code, a registry against the runtime), I need to be sure before I delete it. For a failing test or a live bug use systematic debugging; this answers questions rather than repairing behaviour.","compatibility":"Any repository the agent can read, with git and a text search tool. Parallel children need a harness that can dispatch subagents and withhold context from them; without that, the bands run as sequential passes and the skill says so. Model choice is optional — the band then controls depth only. No index, no daemon, no network. Output is a written answer plus its coverage; nothing is committed unless the run record is asked for.","allowedTools":"Read Write Grep Glob Bash","license":"MIT","kind":"general","useWhen":"a question about how the code works whose wrong answer someone would act on","group":"workflow","lifecycle":"release","version":"1.0.1","author":"crissmoldovan","install":["npx skills add crissmoldovan/agent-skills --skill investigate-codebase"],"asks":["Is the generated job registry actually read at runtime, or is the page the source of truth?\nScore it before you start and tell me the band. I want the evidence, not a summary — and if\na search comes back empty, show me the control that proves the search was working.","The ticket says this timeout is caused by the retry wrapper. Check whether that is still\ntrue at HEAD before you go any further; the ticket is four months old. If the repo\ncontradicts the premise, stop and tell me, don't answer the question it implies.","Who reads the status column? Split it into writers, readers, and anything that derives\nanother value from it — I have been bitten by the third one before. Say what you did not\nsearch.","Go deep on this: I'm about to drop the column and I need to know what breaks. Run the\nadversarial pass, and document the run (--document) so I can hand the evidence to review\nalong with the migration.","Quick one, light is fine: which module defines the cursor parser? One definition site, not\nevery file that mentions the name."],"commands":[],"documents":[{"path":"references/clarifying-questions.md","slug":"clarifying-questions","title":"Clarifying questions","body":"# Clarifying questions\n\nA question to a human costs a round trip and, in an unattended run, costs the entire run. A\nwrong assumption costs the answer. The rule below decides between them mechanically, so that\nneither \"ask about everything\" nor \"never interrupt\" gets applied as a personality.\n\n## Two tests, in this order\n\n1. **Would the two readings produce different WORK?** If both readings lead to the same\n   searches and the same answer, the ambiguity is cosmetic. Do not ask. Note it and move.\n2. **Can a bounded probe settle it in under a minute?** If yes — **probe, do not ask.** A\n   `git grep`, a file listing, a schema dump, a `git log` on a path. Running the probe is\n   faster than the round trip, and it produces evidence rather than an opinion.\n\nOnly what survives both tests is a candidate question.\n\n## Must ask, even so\n\nFour cases go to the human regardless of how tempting a probe looks, because a probe cannot\nsettle them:\n\n- **A contradictory premise.** The ask asserts something the repository contradicts. Do not\n  quietly answer the question the premise implies; the premise is now the finding. State what\n  was measured, state the contradiction, and ask which the user meant.\n- **Two plausible referents.** Two things the noun could mean, both real, leading in different\n  directions. Guessing here does the wrong work perfectly.\n- **An order-of-magnitude scope gap.** The ask implies \"a couple of call sites\" and the count\n  is in the hundreds — or the reverse. The gap means the user is describing a different thing\n  from the one you found, and confirming the shape is cheaper than mapping the wrong one.\n- **An irreversible authorization.** The answer would authorise a migration, a deletion, a\n  production write, an outbound message, or closing a ticket. Consent lives here, at the act\n  — not back at band selection.\n\n## Cadence\n\n**One blocking question, plus up to three batched disambiguations, and the blocking one is\nlabelled.**\n\n```text\nBLOCKING — \"the importer\" resolves to two live modules: the CSV path and the feed poller.\n           Which is in scope? They share no code.\n\nAlso, if you have them (I will take the defaults otherwise):\n  1. Include the deprecated v1 route? (default: no)\n  2. Does \"recently\" mean since the last release, or the last 30 days? (default: last release)\n  3. Should generated files count as call sites? (default: no)\n```\n\nNot three separate messages, and not a twelve-item interview. A batch is answered in one\npass; a drip is answered once and then ignored.\n\n## What a question carries\n\nThree parts, always:\n\n1. **Established facts** — what has already been measured, so the answer is not \"go and look\".\n2. **The branches and what each costs** — what work each reading implies, and how much of it.\n3. **The default if unanswered** — what will be assumed, and where that assumption will be\n   marked. This is the part that makes a question safe to ignore, which is what makes it\n   answerable quickly.\n\n## Non-interactive degradation\n\nIf no human will answer in this run:\n\n1. **Record the blocking gap** as a blocking open question, in the answer and in the record.\n2. **Take the lower-consequence branch.** Lower-consequence means the one whose being wrong is\n   cheaper to discover and cheaper to undo — usually the narrower scope, never the branch that\n   authorises an irreversible action.\n3. **Mark every downstream claim assumption-dependent**, with the question, the default taken,\n   and the direction the answer would move the conclusion.\n\nAn unattended run never silently picks a branch. The mark is what lets the reader re-run the\nconclusion against the real answer instead of the whole investigation.\n\n## Two different refusals\n\nResisting a wrong **fact** and resisting a wrong **instruction** are different behaviours, and\na skill that only knows one of them fails half the cases:\n\n- **A wrong fact.** The ask states something the repository contradicts — \"this is caused by\n  the cache layer\", when the cache layer was removed two releases ago. The correct output is\n  the measurement, the contradiction, and a question. Answering the question as posed produces\n  a fluent explanation of a mechanism that does not exist.\n- **A wrong instruction.** The ask is a direct imperative whose premise fails — \"delete the\n  unused column\", where the column is read by a job the requester did not know about. The\n  correct output is **not** to comply and then note the risk. It is a decision brief: what was\n  measured, what the instruction would have done, the options, and the question. The instruction\n  being direct and confident is not evidence; it is the thing under test.\n\nIn both cases the deliverable is evidence plus a question, and in neither case is the\ndeliverable a completed action justified afterwards.\n\n## What not to ask\n\n- Anything a probe answers in under a minute.\n- Which band to run. That is announced, never negotiated.\n- Permission to search, read, or count. Reading is what this skill does.\n- A preference between two readings that produce the same work.\n- The same question twice in one run, reworded.\n","bodyHtml":"<h2 id=\"clarifying-questions\">Clarifying questions</h2>\n<p>A question to a human costs a round trip and, in an unattended run, costs the entire run. A\nwrong assumption costs the answer. The rule below decides between them mechanically, so that\nneither &quot;ask about everything&quot; nor &quot;never interrupt&quot; gets applied as a personality.</p>\n<h3 id=\"two-tests-in-this-order\">Two tests, in this order</h3>\n<ol>\n<li><strong>Would the two readings produce different WORK?</strong> If both readings lead to the same\nsearches and the same answer, the ambiguity is cosmetic. Do not ask. Note it and move.</li>\n<li><strong>Can a bounded probe settle it in under a minute?</strong> If yes — <strong>probe, do not ask.</strong> A\n<code>git grep</code>, a file listing, a schema dump, a <code>git log</code> on a path. Running the probe is\nfaster than the round trip, and it produces evidence rather than an opinion.</li>\n</ol>\n<p>Only what survives both tests is a candidate question.</p>\n<h3 id=\"must-ask-even-so\">Must ask, even so</h3>\n<p>Four cases go to the human regardless of how tempting a probe looks, because a probe cannot\nsettle them:</p>\n<ul>\n<li><strong>A contradictory premise.</strong> The ask asserts something the repository contradicts. Do not\nquietly answer the question the premise implies; the premise is now the finding. State what\nwas measured, state the contradiction, and ask which the user meant.</li>\n<li><strong>Two plausible referents.</strong> Two things the noun could mean, both real, leading in different\ndirections. Guessing here does the wrong work perfectly.</li>\n<li><strong>An order-of-magnitude scope gap.</strong> The ask implies &quot;a couple of call sites&quot; and the count\nis in the hundreds — or the reverse. The gap means the user is describing a different thing\nfrom the one you found, and confirming the shape is cheaper than mapping the wrong one.</li>\n<li><strong>An irreversible authorization.</strong> The answer would authorise a migration, a deletion, a\nproduction write, an outbound message, or closing a ticket. Consent lives here, at the act\n— not back at band selection.</li>\n</ul>\n<h3 id=\"cadence\">Cadence</h3>\n<p><strong>One blocking question, plus up to three batched disambiguations, and the blocking one is\nlabelled.</strong></p>\n<pre><code class=\"language-text\">BLOCKING — &quot;the importer&quot; resolves to two live modules: the CSV path and the feed poller.\n           Which is in scope? They share no code.\n\nAlso, if you have them (I will take the defaults otherwise):\n  1. Include the deprecated v1 route? (default: no)\n  2. Does &quot;recently&quot; mean since the last release, or the last 30 days? (default: last release)\n  3. Should generated files count as call sites? (default: no)\n</code></pre>\n<p>Not three separate messages, and not a twelve-item interview. A batch is answered in one\npass; a drip is answered once and then ignored.</p>\n<h3 id=\"what-a-question-carries\">What a question carries</h3>\n<p>Three parts, always:</p>\n<ol>\n<li><strong>Established facts</strong> — what has already been measured, so the answer is not &quot;go and look&quot;.</li>\n<li><strong>The branches and what each costs</strong> — what work each reading implies, and how much of it.</li>\n<li><strong>The default if unanswered</strong> — what will be assumed, and where that assumption will be\nmarked. This is the part that makes a question safe to ignore, which is what makes it\nanswerable quickly.</li>\n</ol>\n<h3 id=\"non-interactive-degradation\">Non-interactive degradation</h3>\n<p>If no human will answer in this run:</p>\n<ol>\n<li><strong>Record the blocking gap</strong> as a blocking open question, in the answer and in the record.</li>\n<li><strong>Take the lower-consequence branch.</strong> Lower-consequence means the one whose being wrong is\ncheaper to discover and cheaper to undo — usually the narrower scope, never the branch that\nauthorises an irreversible action.</li>\n<li><strong>Mark every downstream claim assumption-dependent</strong>, with the question, the default taken,\nand the direction the answer would move the conclusion.</li>\n</ol>\n<p>An unattended run never silently picks a branch. The mark is what lets the reader re-run the\nconclusion against the real answer instead of the whole investigation.</p>\n<h3 id=\"two-different-refusals\">Two different refusals</h3>\n<p>Resisting a wrong <strong>fact</strong> and resisting a wrong <strong>instruction</strong> are different behaviours, and\na skill that only knows one of them fails half the cases:</p>\n<ul>\n<li><strong>A wrong fact.</strong> The ask states something the repository contradicts — &quot;this is caused by\nthe cache layer&quot;, when the cache layer was removed two releases ago. The correct output is\nthe measurement, the contradiction, and a question. Answering the question as posed produces\na fluent explanation of a mechanism that does not exist.</li>\n<li><strong>A wrong instruction.</strong> The ask is a direct imperative whose premise fails — &quot;delete the\nunused column&quot;, where the column is read by a job the requester did not know about. The\ncorrect output is <strong>not</strong> to comply and then note the risk. It is a decision brief: what was\nmeasured, what the instruction would have done, the options, and the question. The instruction\nbeing direct and confident is not evidence; it is the thing under test.</li>\n</ul>\n<p>In both cases the deliverable is evidence plus a question, and in neither case is the\ndeliverable a completed action justified afterwards.</p>\n<h3 id=\"what-not-to-ask\">What not to ask</h3>\n<ul>\n<li>Anything a probe answers in under a minute.</li>\n<li>Which band to run. That is announced, never negotiated.</li>\n<li>Permission to search, read, or count. Reading is what this skill does.</li>\n<li>A preference between two readings that produce the same work.</li>\n<li>The same question twice in one run, reworded.</li>\n</ul>\n","words":854},{"path":"references/complexity-rubric.md","slug":"complexity-rubric","title":"The complexity rubric","body":"# The complexity rubric\n\nSpend is decided before the first search, from observables, and the decision is said out\nloud. That ordering is the whole point: a run that decides depth after it has already\nfanned out has not chosen anything, it has rationalised what it did.\n\nFive signals, each scored 0, 1, or 2 against an **observable** — something you ran, read,\nor counted, not an impression. Write the observable down next to the score. A score with\nno observable behind it is a guess wearing a number, and it is the first thing to\nchallenge when a run comes out mis-banded.\n\n## The five signals\n\n### 1. Scope — how much surface the question touches\n\n| Score | Anchor |\n|---|---|\n| 0 | One file, or one symbol at one definition site. A first probe returns a handful of hits in one or two files. |\n| 1 | One package or one surface. Tens of hits, all inside a boundary you can name. |\n| 2 | Crosses surfaces, languages, or repositories — or the count is unknown until you search, which is itself a 2. |\n\nObservables:\n\n```sh\ngit grep -n \"<term>\" -- <paths> | wc -l      # hits\ngit grep -c \"<term>\" -- <paths> | wc -l      # files containing it\ngit ls-files -- <surface> | wc -l            # size of the surface named in the ask\n```\n\nScore from the count, not from the noun. \"Just one function\" is a claim about scope, and\n`git grep` either supports it or does not.\n\n**Score the artifact the question names, not the term repo-wide.** If the ask is \"why does\n`shouldSkipRow` in `import/filter.ts` drop this record\", the scope signal is the reach of\n**that function at that definition site** — its callers, its call sites, what it returns to —\nand not the hit count for the word \"skip\" across the tree. Repo-wide hits for a term that\nhappens to appear in the question measure the repository, not the question, and scoring them\nis how a one-file question buys a fan-out. Where the question names no artifact, the repo-wide\ncount is the right observable and a 2 for \"unknown until you search\" is honest.\n\n### 2. Contradiction risk — does the ask assert a checkable attribution?\n\n| Score | Anchor |\n|---|---|\n| 0 | Pure lookup. Nothing is asserted that could be false. |\n| 1 | An attribution is asserted and rests on a single source — a ticket, a comment, one person's recollection. |\n| 2 | Two sources already disagree, or the asserted attribution is the thing that decides the answer. |\n\nAttributions look like: \"X is caused by Y\", \"the runtime reads Z\", \"this was already\nfixed\", \"nothing else calls it\". Each is checkable, and each is wrong often enough that\nscoring it 0 is how a fluent, false answer gets produced cheaply.\n\n### 3. Repo size and toolchain count\n\n| Score | Anchor |\n|---|---|\n| 0 | One package, one language, one build. |\n| 1 | A handful of packages, or two toolchains. |\n| 2 | A monorepo with many packages, more than two toolchains, generated code in-tree, or several deploy targets. |\n\nObservables:\n\n```sh\ngit ls-files | wc -l\ngit ls-files '*package.json' 'pyproject.toml' 'go.mod' 'Cargo.toml' '*.gemspec' | wc -l\n```\n\n**Where the question names its artifact, this signal contributes at most 1.** Size is scored\nbecause it changes what an *unresolved* search means; a question that already resolves to one\nfile or one definition site has spent that risk before the first command runs. A monorepo does\nnot make \"why does this function return early\" a big question, and scoring it 2 because\n`git ls-files` returned a large number is the most common way a light question is escalated.\n\nSize matters because it changes what a search means. In a monorepo of roughly 2,500\nTypeScript files and 592k lines, one measured pass found 184 exported names defined in\nmore than one file, with the repo's own conventions the worst offenders — one HTTP verb\nhandler name appearing 271 times. A bare-name search there answers a different question\nthan the one asked.\n\n### 4. Ambiguity — are there two plausible referents?\n\n| Score | Anchor |\n|---|---|\n| 0 | Every noun in the question resolves to exactly one thing you can point at. |\n| 1 | A noun has one obvious referent and one unlikely one. |\n| 2 | Two referents are both plausible and would send the work in different directions. |\n\nA 2 here is also a must-ask trigger. Scoring it and then not asking is the failure this\nsignal exists to catch.\n\n### 5. Cost of being wrong\n\n| Score | Anchor |\n|---|---|\n| 0 | The answer informs a conversation. |\n| 1 | The answer informs a change that review would catch. |\n| 2 | The answer authorises a migration, a deletion, a production write, an outbound message, or closing a ticket. |\n\nA 2 is about **reach**, not confidence. An answer that authorises something irreversible is\na 2 even when it feels obvious — especially then.\n\n## Banding\n\nSum the five scores, maximum 10.\n\n| Total | Band |\n|---|---|\n| 0–2 | light |\n| 3–7 | normal |\n| 8+ | deep |\n\nThese thresholds are tunable. They are provisional numbers calibrated against a scored\nscenario suite, and the suite penalises needless escalation as hard as it penalises an\nunder-resourced answer — so moving them is a measurement, not a preference.\n\n## The two overrides and the one start rule\n\n1. **Cost-of-being-wrong = 2 forces at least normal.** No matter what the total says. A\n   one-line question whose answer authorises a deletion does not get a light-band answer.\n   This override never produces a question at mode time; it raises the band and arms the\n   consent gates at the irreversible action itself.\n2. **Re-score after pass 1, in either direction.** The first pass changes its own inputs — a\n   scope you guessed at is now counted, an ambiguity has resolved or hardened, a contradiction\n   has surfaced that nobody asserted. Re-score, and if the band moves, announce again. A run\n   that discovers a contradiction and keeps its light band is choosing its budget over its\n   answer — and a run whose pass 1 resolved the ambiguity, found the artifact and closed the\n   scope keeps a deep band for exactly the same bad reason. **A downward re-score is as\n   legitimate as an upward one.** The band is a decision about the evidence in hand, not a\n   commitment made at minute one, and \"we already announced deep\" is not evidence.\n3. **A named artifact asked *why* or *how* starts light.** When the question names one file or\n   one function and asks why or how it behaves, the run **starts at the light band**: the\n   boundary round-up below does not fire on it before pass 1, and it escalates only on evidence\n   pass 1 actually produced — a contradiction that surfaced, a scope that turned out to cross\n   surfaces, a referent that split in two. In exchange, the re-score after pass 1 is\n   **mandatory** rather than merely allowed: a light start is a cheap first look, not a cap.\n   Only rule 1 outranks it; a question whose answer authorises something irreversible still\n   starts at normal.\n\n## Boundary round-up\n\nThe thresholds are 3 (normal) and 8 (deep). **A total exactly one point below a threshold\nrounds up one band, and the announcement says so.** So a 2 becomes normal and a 7 becomes\ndeep. Nothing rounds down.\n\n```text\nboundary: scored 2, rounding up to normal\n```\n\nThe rule is deterministic and biased towards safety, and it is applied without asking. A\nhuman in the loop at this point buys nothing: the information needed to decide is the five\nobservables, and they are already written down.\n\n**One suspension, stated so it can be checked:** the round-up does not fire before pass 1 on a\nquestion that names one file or one function and asks why or how (rule 3 above). Such a run\nstarts light and re-scores after pass 1, where the round-up applies normally to the new total.\nNothing else suspends it.\n\n## Calibration examples\n\nThe five signals are scored from **the question's shape** — the artifact it names, the\nattribution it asserts, the referents it leaves open, what its answer authorises. Not from the\nsize of the repository, and not from how much apparatus the run would enjoy using. The suite\nthese thresholds are tuned against penalises needless escalation exactly as hard as an\nunder-resourced answer, because the cost lands on the same person either way: **over-escalation\nis a scored failure, not diligence.**\n\nThree scorings, each pinning a reading that observed runs got wrong in the same direction.\n\n### (a) A small change with one attribution to check\n\n> \"Change this function — it has exactly two call sites; the ticket says the retry wrapper is\n> the cause.\"\n\n| signal | observable | score |\n|---|---|---|\n| scope | the definition site's call sites → 2, in 2 files | 1 |\n| contradiction | one authoritative-looking attribution, single source | 1 |\n| size | monorepo, capped: the ask names its artifact | ≤1 |\n| ambiguity | the function resolves; a second reading of \"the wrapper\" is unlikely | 0–1 |\n| cost | informs a change review would catch | 1 |\n\nTotal 4–5 → **normal, and never deep.** Two call sites is a bounded scope, and one attribution\nis one check — `git log -S` on the fragment, the wrapper opened, the branch read. The deep band\nbuys an adversarial pair to attack an answer; there is no answer here large enough to attack.\n\n### (b) A finite, enumerable list in a very large repository\n\n> \"Work through these 14 flagged rows: for each, is it still failing, and is the fix merged?\"\n\n| signal | observable | score |\n|---|---|---|\n| scope | 14 items, enumerable up front, each the same two-question check | 1 |\n| contradiction | nothing attributed | 0 |\n| size | 2,500 files and 4 toolchains — capped: each item names its artifact | 1 |\n| ambiguity | every row carries its own identifier | 0 |\n| cost | informs a triage decision review would catch | 1 |\n\nTotal 3 → **normal, in a repository of any size.** This is the scoring the size signal distorts\nmost often: scored 2 on the repository instead of on the question, the total is 4 — still\nnormal. **Size cannot carry a finite, enumerable list into the deep band.** What makes such a\nlist expensive is the number of items, and the band buys depth per question, not throughput; a\ndeep band here multiplies the adversarial machinery by 14 and answers nothing it did not.\n\n### (c) Why a named detector missed a named case\n\n> \"Why did `shouldSkipRow` not flag this record?\"\n\n| signal | observable | score |\n|---|---|---|\n| scope | one detector at one definition site | 0 |\n| contradiction | nothing attributed — the miss is observed, not explained | 0 |\n| size | capped: the ask names its artifact | 1 |\n| ambiguity | both the detector and the record resolve | 0 |\n| cost | informs a fix review would catch | 1 |\n\nTotal 2 → **light start** under rule 3: a named artifact asked *why*, so the round-up is\nsuspended before pass 1 and the run spends its first pass where the answer is — the record the\ncheck actually saw, and the branch that returned the verdict (the reproduce-the-miss rule).\nThe **re-score after pass 1 is mandatory**, and that is where this question is allowed to become\nexpensive: a second referent, a contradicting source, or a scope that turns out to cross\nsurfaces bands the new total normally. A 2 that survives pass 1 unchanged rounds up to normal —\nthe suspension covers the first look, not the run.\n\n## The announcement\n\nOne line, printed **before the first child is dispatched**, on the same code path whether\nor not a human is watching. It carries the spend shape, so that the next thing said about\nthis run cannot be a surprise.\n\n```text\ninvestigate-codebase · <band> band — scope <n> (<observable>), contradiction <n> (<observable>),\nsize <n> (<observable>), ambiguity <n> (<observable>), cost-of-being-wrong <n> (<observable>)\n= <total>[; <override>][; boundary: …] → <fan-out width>, <round cap>[, <estimate>]\n```\n\nWorked:\n\n```text\ninvestigate-codebase · light band — scope 0 (git grep -n \"parseCursor\" → 4 hits in 2 files),\ncontradiction 0 (nothing attributed), size 1 (2 toolchains), ambiguity 0, cost-of-being-wrong 0\n= 1 → no children, single pass, 1 round\n```\n\n```text\ninvestigate-codebase · normal band — scope 2 (git grep -n \"registerJob(\" → 41 hits in 18\nfiles), contradiction 2 (two registries disagree), size 1 (14 packages, capped: the ask names\nits artifact), ambiguity 0, cost-of-being-wrong 1 = 6 → 3 children + reconciler, 2 rounds max\n```\n\nThe same question once the deletion is on the table and \"the registry\" turns out to name two\nartifacts — a deep band carried by contradiction and cost, not by the size of the tree:\n\n```text\ninvestigate-codebase · deep band — scope 2 (41 hits in 18 files), contradiction 2 (authority\nand absence both asserted), size 1 (14 packages, capped: the ask names its artifact),\nambiguity 1 (\"the registry\" → 2 artifacts), cost-of-being-wrong 2 (authorises a deletion) = 8\n→ 4 children + reconciler, adversarial pair, 3 rounds max\n```\n\nA light start on a named artifact, with the mandatory re-score flagged in the line itself:\n\n```text\ninvestigate-codebase · light band — scope 0 (the ask names one function; git grep -n\n\"shouldSkipRow\" -- src → 3 hits in 1 file), contradiction 0 (nothing attributed), size 1\n(monorepo, capped: the ask names its artifact), ambiguity 0, cost-of-being-wrong 0 = 1\n→ no children, single pass, 1 round; named-artifact start, re-score after pass 1 is mandatory\n```\n\nAnd the same run again after pass 1 turned up nothing that widens it — a band that stays where\nit is, said out loud, so that \"light\" is visibly a decision rather than an omission:\n\n```text\ninvestigate-codebase · light band held after pass 1 — scope 0 (the branch that decided it is\nat import/filter.ts:41), contradiction 0, size 1, ambiguity 0, cost-of-being-wrong 0 = 1\n→ single pass, answer delivered with its coverage\n```\n\nA downward re-score, which is the same mechanism running the other way:\n\n```text\ninvestigate-codebase · normal band, re-scored DOWN from deep after pass 1 — scope 2 → 1 (the\n41 hits resolve to one package once the definition site is fixed), contradiction 2, size 1,\nambiguity 0, cost-of-being-wrong 1 = 5 → 3 children + reconciler, 2 rounds max\n```\n\n```text\ninvestigate-codebase · normal band — scope 1, contradiction 1, size 1, ambiguity 0,\ncost-of-being-wrong 2 (answer authorises dropping a column) = 5; override: cost-of-being-wrong=2\nholds the floor at normal → 3 children + reconciler, 2 rounds max\n```\n\nAt the deep band, add a priced estimate **where the harness can produce one** — a token or\ncurrency figure it actually reports. Do not invent a price; an estimate nobody computed is\nthe same decoration as a confidence percentage.\n\nThe announcement is never a question. Nothing waits on it, in either direction.\n\n## User-initiated overrides\n\nThe user may say \"go deep on this\" or \"light is fine\". Those are recognised intents: they\nforce a **re-score** with the requested band as the floor or ceiling, and a **fresh\nannouncement** stating that a user override applied and what the observables said before it.\n\nThe skill never solicits an override. It does not ask \"shall I go deeper?\", does not offer\na menu of bands, and does not treat a boundary score as an invitation to consult. If the\nuser overrides down while cost-of-being-wrong is 2, honour the ceiling for depth and keep\nthe act gates armed — depth is theirs to choose, an irreversible action is still consented\nto separately.\n\n## Degradation\n\n- **No subagents.** The bands survive as sequential passes with the same axes and the same\n  contracts — announce that they are sequential and state the wall-clock cost the fan-out\n  would have saved. A record that omits this reads as if a fan-out happened.\n- **No model choice.** The band then controls depth only: how many passes, how many rounds,\n  whether the adversaries run. Role names still describe who owns what; identifiers,\n  profiles, and escalation belong to `model-routing` and are not restated here.\n","bodyHtml":"<h2 id=\"the-complexity-rubric\">The complexity rubric</h2>\n<p>Spend is decided before the first search, from observables, and the decision is said out\nloud. That ordering is the whole point: a run that decides depth after it has already\nfanned out has not chosen anything, it has rationalised what it did.</p>\n<p>Five signals, each scored 0, 1, or 2 against an <strong>observable</strong> — something you ran, read,\nor counted, not an impression. Write the observable down next to the score. A score with\nno observable behind it is a guess wearing a number, and it is the first thing to\nchallenge when a run comes out mis-banded.</p>\n<h3 id=\"the-five-signals\">The five signals</h3>\n<h4 id=\"1-scope-how-much-surface-the-question-touches\">1. Scope — how much surface the question touches</h4>\n<table>\n<thead>\n<tr>\n<th>Score</th>\n<th>Anchor</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>0</td>\n<td>One file, or one symbol at one definition site. A first probe returns a handful of hits in one or two files.</td>\n</tr>\n<tr>\n<td>1</td>\n<td>One package or one surface. Tens of hits, all inside a boundary you can name.</td>\n</tr>\n<tr>\n<td>2</td>\n<td>Crosses surfaces, languages, or repositories — or the count is unknown until you search, which is itself a 2.</td>\n</tr>\n</tbody></table>\n<p>Observables:</p>\n<pre><code class=\"language-sh\">git grep -n &quot;&lt;term&gt;&quot; -- &lt;paths&gt; | wc -l      # hits\ngit grep -c &quot;&lt;term&gt;&quot; -- &lt;paths&gt; | wc -l      # files containing it\ngit ls-files -- &lt;surface&gt; | wc -l            # size of the surface named in the ask\n</code></pre>\n<p>Score from the count, not from the noun. &quot;Just one function&quot; is a claim about scope, and\n<code>git grep</code> either supports it or does not.</p>\n<p><strong>Score the artifact the question names, not the term repo-wide.</strong> If the ask is &quot;why does\n<code>shouldSkipRow</code> in <code>import/filter.ts</code> drop this record&quot;, the scope signal is the reach of\n<strong>that function at that definition site</strong> — its callers, its call sites, what it returns to —\nand not the hit count for the word &quot;skip&quot; across the tree. Repo-wide hits for a term that\nhappens to appear in the question measure the repository, not the question, and scoring them\nis how a one-file question buys a fan-out. Where the question names no artifact, the repo-wide\ncount is the right observable and a 2 for &quot;unknown until you search&quot; is honest.</p>\n<h4 id=\"2-contradiction-risk-does-the-ask-assert-a-checkable-attribution\">2. Contradiction risk — does the ask assert a checkable attribution?</h4>\n<table>\n<thead>\n<tr>\n<th>Score</th>\n<th>Anchor</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>0</td>\n<td>Pure lookup. Nothing is asserted that could be false.</td>\n</tr>\n<tr>\n<td>1</td>\n<td>An attribution is asserted and rests on a single source — a ticket, a comment, one person&#39;s recollection.</td>\n</tr>\n<tr>\n<td>2</td>\n<td>Two sources already disagree, or the asserted attribution is the thing that decides the answer.</td>\n</tr>\n</tbody></table>\n<p>Attributions look like: &quot;X is caused by Y&quot;, &quot;the runtime reads Z&quot;, &quot;this was already\nfixed&quot;, &quot;nothing else calls it&quot;. Each is checkable, and each is wrong often enough that\nscoring it 0 is how a fluent, false answer gets produced cheaply.</p>\n<h4 id=\"3-repo-size-and-toolchain-count\">3. Repo size and toolchain count</h4>\n<table>\n<thead>\n<tr>\n<th>Score</th>\n<th>Anchor</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>0</td>\n<td>One package, one language, one build.</td>\n</tr>\n<tr>\n<td>1</td>\n<td>A handful of packages, or two toolchains.</td>\n</tr>\n<tr>\n<td>2</td>\n<td>A monorepo with many packages, more than two toolchains, generated code in-tree, or several deploy targets.</td>\n</tr>\n</tbody></table>\n<p>Observables:</p>\n<pre><code class=\"language-sh\">git ls-files | wc -l\ngit ls-files &#39;*package.json&#39; &#39;pyproject.toml&#39; &#39;go.mod&#39; &#39;Cargo.toml&#39; &#39;*.gemspec&#39; | wc -l\n</code></pre>\n<p><strong>Where the question names its artifact, this signal contributes at most 1.</strong> Size is scored\nbecause it changes what an <em>unresolved</em> search means; a question that already resolves to one\nfile or one definition site has spent that risk before the first command runs. A monorepo does\nnot make &quot;why does this function return early&quot; a big question, and scoring it 2 because\n<code>git ls-files</code> returned a large number is the most common way a light question is escalated.</p>\n<p>Size matters because it changes what a search means. In a monorepo of roughly 2,500\nTypeScript files and 592k lines, one measured pass found 184 exported names defined in\nmore than one file, with the repo&#39;s own conventions the worst offenders — one HTTP verb\nhandler name appearing 271 times. A bare-name search there answers a different question\nthan the one asked.</p>\n<h4 id=\"4-ambiguity-are-there-two-plausible-referents\">4. Ambiguity — are there two plausible referents?</h4>\n<table>\n<thead>\n<tr>\n<th>Score</th>\n<th>Anchor</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>0</td>\n<td>Every noun in the question resolves to exactly one thing you can point at.</td>\n</tr>\n<tr>\n<td>1</td>\n<td>A noun has one obvious referent and one unlikely one.</td>\n</tr>\n<tr>\n<td>2</td>\n<td>Two referents are both plausible and would send the work in different directions.</td>\n</tr>\n</tbody></table>\n<p>A 2 here is also a must-ask trigger. Scoring it and then not asking is the failure this\nsignal exists to catch.</p>\n<h4 id=\"5-cost-of-being-wrong\">5. Cost of being wrong</h4>\n<table>\n<thead>\n<tr>\n<th>Score</th>\n<th>Anchor</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>0</td>\n<td>The answer informs a conversation.</td>\n</tr>\n<tr>\n<td>1</td>\n<td>The answer informs a change that review would catch.</td>\n</tr>\n<tr>\n<td>2</td>\n<td>The answer authorises a migration, a deletion, a production write, an outbound message, or closing a ticket.</td>\n</tr>\n</tbody></table>\n<p>A 2 is about <strong>reach</strong>, not confidence. An answer that authorises something irreversible is\na 2 even when it feels obvious — especially then.</p>\n<h3 id=\"banding\">Banding</h3>\n<p>Sum the five scores, maximum 10.</p>\n<table>\n<thead>\n<tr>\n<th>Total</th>\n<th>Band</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>0–2</td>\n<td>light</td>\n</tr>\n<tr>\n<td>3–7</td>\n<td>normal</td>\n</tr>\n<tr>\n<td>8+</td>\n<td>deep</td>\n</tr>\n</tbody></table>\n<p>These thresholds are tunable. They are provisional numbers calibrated against a scored\nscenario suite, and the suite penalises needless escalation as hard as it penalises an\nunder-resourced answer — so moving them is a measurement, not a preference.</p>\n<h3 id=\"the-two-overrides-and-the-one-start-rule\">The two overrides and the one start rule</h3>\n<ol>\n<li><strong>Cost-of-being-wrong = 2 forces at least normal.</strong> No matter what the total says. A\none-line question whose answer authorises a deletion does not get a light-band answer.\nThis override never produces a question at mode time; it raises the band and arms the\nconsent gates at the irreversible action itself.</li>\n<li><strong>Re-score after pass 1, in either direction.</strong> The first pass changes its own inputs — a\nscope you guessed at is now counted, an ambiguity has resolved or hardened, a contradiction\nhas surfaced that nobody asserted. Re-score, and if the band moves, announce again. A run\nthat discovers a contradiction and keeps its light band is choosing its budget over its\nanswer — and a run whose pass 1 resolved the ambiguity, found the artifact and closed the\nscope keeps a deep band for exactly the same bad reason. <strong>A downward re-score is as\nlegitimate as an upward one.</strong> The band is a decision about the evidence in hand, not a\ncommitment made at minute one, and &quot;we already announced deep&quot; is not evidence.</li>\n<li><strong>A named artifact asked <em>why</em> or <em>how</em> starts light.</strong> When the question names one file or\none function and asks why or how it behaves, the run <strong>starts at the light band</strong>: the\nboundary round-up below does not fire on it before pass 1, and it escalates only on evidence\npass 1 actually produced — a contradiction that surfaced, a scope that turned out to cross\nsurfaces, a referent that split in two. In exchange, the re-score after pass 1 is\n<strong>mandatory</strong> rather than merely allowed: a light start is a cheap first look, not a cap.\nOnly rule 1 outranks it; a question whose answer authorises something irreversible still\nstarts at normal.</li>\n</ol>\n<h3 id=\"boundary-round-up\">Boundary round-up</h3>\n<p>The thresholds are 3 (normal) and 8 (deep). <strong>A total exactly one point below a threshold\nrounds up one band, and the announcement says so.</strong> So a 2 becomes normal and a 7 becomes\ndeep. Nothing rounds down.</p>\n<pre><code class=\"language-text\">boundary: scored 2, rounding up to normal\n</code></pre>\n<p>The rule is deterministic and biased towards safety, and it is applied without asking. A\nhuman in the loop at this point buys nothing: the information needed to decide is the five\nobservables, and they are already written down.</p>\n<p><strong>One suspension, stated so it can be checked:</strong> the round-up does not fire before pass 1 on a\nquestion that names one file or one function and asks why or how (rule 3 above). Such a run\nstarts light and re-scores after pass 1, where the round-up applies normally to the new total.\nNothing else suspends it.</p>\n<h3 id=\"calibration-examples\">Calibration examples</h3>\n<p>The five signals are scored from <strong>the question&#39;s shape</strong> — the artifact it names, the\nattribution it asserts, the referents it leaves open, what its answer authorises. Not from the\nsize of the repository, and not from how much apparatus the run would enjoy using. The suite\nthese thresholds are tuned against penalises needless escalation exactly as hard as an\nunder-resourced answer, because the cost lands on the same person either way: <strong>over-escalation\nis a scored failure, not diligence.</strong></p>\n<p>Three scorings, each pinning a reading that observed runs got wrong in the same direction.</p>\n<h4 id=\"a-a-small-change-with-one-attribution-to-check\">(a) A small change with one attribution to check</h4>\n<blockquote>\n<p>&quot;Change this function — it has exactly two call sites; the ticket says the retry wrapper is\nthe cause.&quot;</p>\n</blockquote>\n<table>\n<thead>\n<tr>\n<th>signal</th>\n<th>observable</th>\n<th>score</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>scope</td>\n<td>the definition site&#39;s call sites → 2, in 2 files</td>\n<td>1</td>\n</tr>\n<tr>\n<td>contradiction</td>\n<td>one authoritative-looking attribution, single source</td>\n<td>1</td>\n</tr>\n<tr>\n<td>size</td>\n<td>monorepo, capped: the ask names its artifact</td>\n<td>≤1</td>\n</tr>\n<tr>\n<td>ambiguity</td>\n<td>the function resolves; a second reading of &quot;the wrapper&quot; is unlikely</td>\n<td>0–1</td>\n</tr>\n<tr>\n<td>cost</td>\n<td>informs a change review would catch</td>\n<td>1</td>\n</tr>\n</tbody></table>\n<p>Total 4–5 → <strong>normal, and never deep.</strong> Two call sites is a bounded scope, and one attribution\nis one check — <code>git log -S</code> on the fragment, the wrapper opened, the branch read. The deep band\nbuys an adversarial pair to attack an answer; there is no answer here large enough to attack.</p>\n<h4 id=\"b-a-finite-enumerable-list-in-a-very-large-repository\">(b) A finite, enumerable list in a very large repository</h4>\n<blockquote>\n<p>&quot;Work through these 14 flagged rows: for each, is it still failing, and is the fix merged?&quot;</p>\n</blockquote>\n<table>\n<thead>\n<tr>\n<th>signal</th>\n<th>observable</th>\n<th>score</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>scope</td>\n<td>14 items, enumerable up front, each the same two-question check</td>\n<td>1</td>\n</tr>\n<tr>\n<td>contradiction</td>\n<td>nothing attributed</td>\n<td>0</td>\n</tr>\n<tr>\n<td>size</td>\n<td>2,500 files and 4 toolchains — capped: each item names its artifact</td>\n<td>1</td>\n</tr>\n<tr>\n<td>ambiguity</td>\n<td>every row carries its own identifier</td>\n<td>0</td>\n</tr>\n<tr>\n<td>cost</td>\n<td>informs a triage decision review would catch</td>\n<td>1</td>\n</tr>\n</tbody></table>\n<p>Total 3 → <strong>normal, in a repository of any size.</strong> This is the scoring the size signal distorts\nmost often: scored 2 on the repository instead of on the question, the total is 4 — still\nnormal. <strong>Size cannot carry a finite, enumerable list into the deep band.</strong> What makes such a\nlist expensive is the number of items, and the band buys depth per question, not throughput; a\ndeep band here multiplies the adversarial machinery by 14 and answers nothing it did not.</p>\n<h4 id=\"c-why-a-named-detector-missed-a-named-case\">(c) Why a named detector missed a named case</h4>\n<blockquote>\n<p>&quot;Why did <code>shouldSkipRow</code> not flag this record?&quot;</p>\n</blockquote>\n<table>\n<thead>\n<tr>\n<th>signal</th>\n<th>observable</th>\n<th>score</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>scope</td>\n<td>one detector at one definition site</td>\n<td>0</td>\n</tr>\n<tr>\n<td>contradiction</td>\n<td>nothing attributed — the miss is observed, not explained</td>\n<td>0</td>\n</tr>\n<tr>\n<td>size</td>\n<td>capped: the ask names its artifact</td>\n<td>1</td>\n</tr>\n<tr>\n<td>ambiguity</td>\n<td>both the detector and the record resolve</td>\n<td>0</td>\n</tr>\n<tr>\n<td>cost</td>\n<td>informs a fix review would catch</td>\n<td>1</td>\n</tr>\n</tbody></table>\n<p>Total 2 → <strong>light start</strong> under rule 3: a named artifact asked <em>why</em>, so the round-up is\nsuspended before pass 1 and the run spends its first pass where the answer is — the record the\ncheck actually saw, and the branch that returned the verdict (the reproduce-the-miss rule).\nThe <strong>re-score after pass 1 is mandatory</strong>, and that is where this question is allowed to become\nexpensive: a second referent, a contradicting source, or a scope that turns out to cross\nsurfaces bands the new total normally. A 2 that survives pass 1 unchanged rounds up to normal —\nthe suspension covers the first look, not the run.</p>\n<h3 id=\"the-announcement\">The announcement</h3>\n<p>One line, printed <strong>before the first child is dispatched</strong>, on the same code path whether\nor not a human is watching. It carries the spend shape, so that the next thing said about\nthis run cannot be a surprise.</p>\n<pre><code class=\"language-text\">investigate-codebase · &lt;band&gt; band — scope &lt;n&gt; (&lt;observable&gt;), contradiction &lt;n&gt; (&lt;observable&gt;),\nsize &lt;n&gt; (&lt;observable&gt;), ambiguity &lt;n&gt; (&lt;observable&gt;), cost-of-being-wrong &lt;n&gt; (&lt;observable&gt;)\n= &lt;total&gt;[; &lt;override&gt;][; boundary: …] → &lt;fan-out width&gt;, &lt;round cap&gt;[, &lt;estimate&gt;]\n</code></pre>\n<p>Worked:</p>\n<pre><code class=\"language-text\">investigate-codebase · light band — scope 0 (git grep -n &quot;parseCursor&quot; → 4 hits in 2 files),\ncontradiction 0 (nothing attributed), size 1 (2 toolchains), ambiguity 0, cost-of-being-wrong 0\n= 1 → no children, single pass, 1 round\n</code></pre>\n<pre><code class=\"language-text\">investigate-codebase · normal band — scope 2 (git grep -n &quot;registerJob(&quot; → 41 hits in 18\nfiles), contradiction 2 (two registries disagree), size 1 (14 packages, capped: the ask names\nits artifact), ambiguity 0, cost-of-being-wrong 1 = 6 → 3 children + reconciler, 2 rounds max\n</code></pre>\n<p>The same question once the deletion is on the table and &quot;the registry&quot; turns out to name two\nartifacts — a deep band carried by contradiction and cost, not by the size of the tree:</p>\n<pre><code class=\"language-text\">investigate-codebase · deep band — scope 2 (41 hits in 18 files), contradiction 2 (authority\nand absence both asserted), size 1 (14 packages, capped: the ask names its artifact),\nambiguity 1 (&quot;the registry&quot; → 2 artifacts), cost-of-being-wrong 2 (authorises a deletion) = 8\n→ 4 children + reconciler, adversarial pair, 3 rounds max\n</code></pre>\n<p>A light start on a named artifact, with the mandatory re-score flagged in the line itself:</p>\n<pre><code class=\"language-text\">investigate-codebase · light band — scope 0 (the ask names one function; git grep -n\n&quot;shouldSkipRow&quot; -- src → 3 hits in 1 file), contradiction 0 (nothing attributed), size 1\n(monorepo, capped: the ask names its artifact), ambiguity 0, cost-of-being-wrong 0 = 1\n→ no children, single pass, 1 round; named-artifact start, re-score after pass 1 is mandatory\n</code></pre>\n<p>And the same run again after pass 1 turned up nothing that widens it — a band that stays where\nit is, said out loud, so that &quot;light&quot; is visibly a decision rather than an omission:</p>\n<pre><code class=\"language-text\">investigate-codebase · light band held after pass 1 — scope 0 (the branch that decided it is\nat import/filter.ts:41), contradiction 0, size 1, ambiguity 0, cost-of-being-wrong 0 = 1\n→ single pass, answer delivered with its coverage\n</code></pre>\n<p>A downward re-score, which is the same mechanism running the other way:</p>\n<pre><code class=\"language-text\">investigate-codebase · normal band, re-scored DOWN from deep after pass 1 — scope 2 → 1 (the\n41 hits resolve to one package once the definition site is fixed), contradiction 2, size 1,\nambiguity 0, cost-of-being-wrong 1 = 5 → 3 children + reconciler, 2 rounds max\n</code></pre>\n<pre><code class=\"language-text\">investigate-codebase · normal band — scope 1, contradiction 1, size 1, ambiguity 0,\ncost-of-being-wrong 2 (answer authorises dropping a column) = 5; override: cost-of-being-wrong=2\nholds the floor at normal → 3 children + reconciler, 2 rounds max\n</code></pre>\n<p>At the deep band, add a priced estimate <strong>where the harness can produce one</strong> — a token or\ncurrency figure it actually reports. Do not invent a price; an estimate nobody computed is\nthe same decoration as a confidence percentage.</p>\n<p>The announcement is never a question. Nothing waits on it, in either direction.</p>\n<h3 id=\"user-initiated-overrides\">User-initiated overrides</h3>\n<p>The user may say &quot;go deep on this&quot; or &quot;light is fine&quot;. Those are recognised intents: they\nforce a <strong>re-score</strong> with the requested band as the floor or ceiling, and a <strong>fresh\nannouncement</strong> stating that a user override applied and what the observables said before it.</p>\n<p>The skill never solicits an override. It does not ask &quot;shall I go deeper?&quot;, does not offer\na menu of bands, and does not treat a boundary score as an invitation to consult. If the\nuser overrides down while cost-of-being-wrong is 2, honour the ceiling for depth and keep\nthe act gates armed — depth is theirs to choose, an irreversible action is still consented\nto separately.</p>\n<h3 id=\"degradation\">Degradation</h3>\n<ul>\n<li><strong>No subagents.</strong> The bands survive as sequential passes with the same axes and the same\ncontracts — announce that they are sequential and state the wall-clock cost the fan-out\nwould have saved. A record that omits this reads as if a fan-out happened.</li>\n<li><strong>No model choice.</strong> The band then controls depth only: how many passes, how many rounds,\nwhether the adversaries run. Role names still describe who owns what; identifiers,\nprofiles, and escalation belong to <code>model-routing</code> and are not restated here.</li>\n</ul>\n","words":2776},{"path":"references/decomposition-and-children.md","slug":"decomposition-and-children","title":"Decomposition axes and the child result contract","body":"# Decomposition axes and the child result contract\n\n## Pick the axis on which children CAN disagree\n\nA fan-out is only worth its overhead when the children could return different answers. Four\nchildren pointed at the same files, given the same question, produce one reading billed four\ntimes — and then agree with each other, which reads like corroboration and is not.\n\nSo choose the split by asking: *if these two children come back with different answers, what\nwould that difference tell me?* If the answer is \"nothing, one of them read it wrong\", the\naxis is wrong.\n\n| Axis | Split by | Use it when | The trap it avoids |\n|---|---|---|---|\n| **by-surface** | directory, package, deploy target, language | the question is \"where does this happen\" and the repo has real boundaries | one child skimming everything at equal shallowness |\n| **by-symbol** | one **definition site** per child, never a bare name | the question is about a specific function, type, table, or route | name collisions merging unrelated code into one answer |\n| **by-data-flow** | writers / readers / **derivers** | the question is about a value: who sets it, who consumes it, who computes something else from it | the derivation stage, which belongs to neither of the other two |\n| **by-history** | commits, blame, reverts, the range where behaviour changed | the question is \"when did this start\" or \"was this deliberate\" | reading current code to answer a question about the past |\n| **by-runtime-evidence** | logs, boot output, traces, schema dumps, live config | the question is \"what actually happens\", not \"what does the code say\" | a code reading passed off as an observation |\n\nTwo or three axes at once is normal at the deep band — by-surface for coverage plus\nby-runtime-evidence for a check that no code reading can produce.\n\n### by-symbol: always a definition site\n\nA child briefed with a bare name searches for a string. In a monorepo of roughly 2,500\nTypeScript files, one measured pass found **184 exported names defined in more than one\nfile**, and the worst offenders were the repo's own conventions — one HTTP handler name\nappearing **271 times**, another 209, a registry key 143. Briefed with `POST`, a child\nreturns the whole application. Briefed with `path/to/module.ts:POST`, it returns the\ncallers of one thing.\n\nSo the brief names the file and the line, or resolves the name through a language server\nfirst. If neither is possible, say the child is searching a name and downgrade every\nfinding built on it to `inferred`.\n\n### by-data-flow: the third bucket is the one people forget\n\nWriters and readers are the obvious two. The third — **derivers**, code that computes\nsomething else from the value — is where questions go to die, because a deriver neither\nsets the value nor reads it in the way a search for reads would find. In one measured case\nthe defect was in exactly that third stage: both the writer and the reader were correct,\nand the value was transformed in between by code that a writers-and-readers split never\nlooked at.\n\nBrief the derivers child explicitly: *find every place this value is used to compute\nsomething that is then stored, cached, indexed, or sent.*\n\n### by-runtime-evidence: forbid the code\n\nThe runtime child is only worth dispatching if it is **forbidden from reading source**. Its\nwhole value is that its evidence is a different class from everybody else's; a child that\nquietly opens the file has produced a second code reading and a false independence signal.\n\nState the prohibition in the brief, and state in the record what it was given instead —\nboot output, a log query, a schema dump, a config listing.\n\n## Read what the repo already derived, first\n\nIf the repository carries generated registries, an atlas, or a compiler-backed index — the\nartifacts `derive-codebase-context` exists to build — read them and **open the file they\ncite** before dispatching anything. That is one read against a fan-out. Two rules keep it\nhonest:\n\n- A generated artifact is evidence of what the generator saw, not of what the runtime does.\n  It sits at the \"code reading\" class, and it can be stale.\n- Confirm by opening the cited file at the current revision. A registry entry pointing at a\n  path that no longer exists is a finding, not a lookup failure.\n\n## Brief the instance that was named\n\nWhen the ask names an instance — this call site, this run id, this row, this file — the brief\ncarries **that** instance, and the child opens it before it looks at anything of the same\nshape. A sibling instance answers a different question: the finding may be real, the evidence\nmay be sound, and it is still not about the line the asker pointed at. Generalise afterwards,\nexplicitly, and say which instance the finding came from.\n\nWhere the named instance cannot be found, that is the child's finding — `not_found` with its\ncontrol — not a licence to substitute the nearest thing with a similar name.\n\n### When the ask names a description, not an identity\n\n\"A PR\", \"the ticket\", \"that migration\", \"the failing job\" is a **description**. It becomes an\ninstance only when exactly one thing matches it, and whether that holds is a question with a\ncommand behind it: list the open pull requests touching this path, the tickets carrying this\ntitle, the migrations at this version — and count what comes back.\n\n- **One candidate.** That is the named instance. Proceed, and cite its identifier in the answer\n  so the asker can see which one was opened.\n- **More than one, attended.** Ask. This is a must-ask case rather than a probe: the readings\n  send the work to different artifacts, so no amount of searching settles which was meant.\n  List the candidates with the one fact that distinguishes them.\n- **More than one, unattended.** Cover each candidate, or answer for one and say **which and\n  why at the top of the answer**, not in a closing caveat where it arrives after the reader has\n  already believed the wrong thing.\n- **None.** The finding is that nothing matches — `not_found` with its control — and the\n  nearest-named thing is not a substitute.\n\nTwo independent runs skipped the count, resolved \"a PR\" to the first plausible match, and\ninvestigated a pull request the asker had not asked about. Both answers were internally sound.\nNeither was about the right instance, and nothing in either write-up said a choice had been\nmade — which is what made the failure invisible until somebody acted on it.\n\n## The child brief\n\nGive each child, and nothing else:\n\n- **The question**, narrowed to its slice, in one sentence.\n- **The instance it names**, verbatim, where the ask named one.\n- **Its axis and its slice** — the paths, the definition site, the range, the artifact.\n- **What is withheld and why.** The runtime child does not get source. The adversaries do\n  not get each other's inputs. Withholding is the mechanism that makes agreement mean\n  something; record it.\n- **The result contract**, verbatim, below.\n- **A stop condition** — hit budget, round, or \"when you can name the control that fired\".\n\nNever paste the whole conversation, the parent's working notes, or another child's output.\nContext packaging is `model-routing`'s subject; child visibility and lifecycle evidence are\n`agent-lifecycle`'s. Neither is restated here.\n\n## The result contract\n\n```json\n{\n  \"question\": \"the slice this child was asked\",\n  \"findings\": [\n    {\n      \"claim\": \"one checkable statement\",\n      \"evidence\": \"path/to/file.ts:120-133\",\n      \"basis\": \"measured | inferred\",\n      \"confidence\": \"basis x coverage, in words\"\n    }\n  ],\n  \"searched\": [\n    { \"query\": \"git grep -n \\\"registerJob(\\\" -- src worker\", \"tool\": \"git grep\", \"hits\": 41 }\n  ],\n  \"not_found\": [\n    {\n      \"target\": \"a runtime read of the generated registry\",\n      \"control\": \"git grep -n \\\"atlas\\\" -- worker\",\n      \"control_fired\": true,\n      \"reach\": \"no reference to depth 1\"\n    }\n  ],\n  \"blockers\": [\"deploy manifests are not readable from this checkout\"]\n}\n```\n\nField rules:\n\n- **`claim`** is one statement that could be false. \"Looked at the router\" is not a claim.\n- **`evidence`** is `path:line` or a named artifact plus the query that produced it. A claim\n  with no evidence field does not go in `findings`; it goes in prose, marked `inferred`.\n- **`basis`** is `measured` when something was run, counted, or read at a cited line, and\n  `inferred` for everything else — including plausible reasoning from strong priors.\n- **`confidence`** is basis × coverage, in words. Never a percentage.\n- **`searched`** holds queries **verbatim** with their hit counts. A paraphrased query\n  cannot be re-run, and re-running is the point.\n- **`reach`** says what the negative covers, at the depth it actually reached: `no reference to\n  depth N` with N and the hops walked, `closure over <boundary>` where the frontier stopped\n  growing inside a named boundary, or `resolver: <name>` where a reference graph answered\n  instead of a walk. A negative with no `reach` field cannot carry a claim about reachability,\n  and the reconciler treats it as the narrowest statement it could be.\n- **`blockers`** is where a child says what it could not do. An empty `blockers` on a child\n  that hit a permission wall is the most expensive kind of silence.\n\n## THE CONTROL RULE\n\n> A zero-hit search is admissible as **absent** only when a control fired. Otherwise it is\n> recorded **inconclusive**.\n\nA **control** is a deliberately positive variant of the same search, run the same way, that\nreturns hits. It proves the search apparatus was working — right tool, right paths, right\npattern dialect, right file types. Without it, \"no hits\" means one of two very different\nthings and you cannot tell which: the thing is absent, or the search never worked.\n\nWorked failures, each measured at least once:\n\n- **The word-boundary escape.** `git grep -E '\\bhandler\\b'` returns nothing, and it never\n  could: POSIX ERE has no `\\b`. Read as proof of absence, it is proof of a typo. Control:\n  the same command with the boundaries removed returns hits — so the pattern dialect, not\n  the codebase, was the problem.\n- **The pathspec that excluded the answer.** `-- src/` on a repo whose worker lives in\n  `services/`. Control: search for something certainly present, with the same pathspec. If\n  the control also returns nothing, the pathspec is the finding.\n- **The untracked file type.** `git grep` searches tracked files. Generated output, vendored\n  code, and anything in `.gitignore` are invisible to it. Control: `git ls-files -- '*.sql'\n  | wc -l` before concluding that no SQL mentions the table.\n- **Case and the compound identifier.** `job_name` does not match `jobName`. Control: search\n  the case-insensitive variant, and if it fires, the original search proved nothing.\n\nRecord the control **and whether it fired**, in `not_found[]`, every time. This is the\nsingle highest-value mechanical rule in this family, and it costs one extra command.\n\n## THE TRANSITIVE-NEGATIVE RULE\n\n> A zero-hit direct-reference search proves the **direct hop** and nothing beyond it, and one\n> more hop proves two. A claim about reachability or flow requires a walk to **closure over the\n> relevant boundary**, or a resolver that answers reachability directly. Anything shallower is\n> recorded as **\"no reference to depth N\"** — never as \"no path\".\n\nA fired control upgrades a negative from *inconclusive* to *absent*. It says nothing about the\n**reach** of the question that negative is being used to answer, and that is the second half\npeople skip. \"No file imports this module\" and \"this module cannot be reached\" are different\nstatements, and the second is the one that authorises a deletion.\n\nThe walk is cheap, and it ends at a **frontier, not at a hop count**. Take the surface the\nsearch covered and follow what it references outward — barrel files and re-exports, registry\ntables keyed by string, dynamic or glob imports, dependency-injection containers, generated\nentrypoints, configuration that names a module as text — then repeat over everything that walk\nreached, until the set of newly reached surfaces is empty or the boundary you named is crossed.\nAny of those edges reaches a target it never spells, so a search for the target's name over the\nimporting file returns zero forever, at every depth.\n\n**Name the boundary, or closure is unverifiable.** \"Closure\" over what: this package, this\ndeploy target, this repository? A frontier that stopped because the walk left the package is a\nclosure over the package and a depth-N negative over everything else, and the record says which.\n\n**A resolver substitutes for the walk.** A language server's reference graph, a bundler's module\ngraph, an import-boundary checker: each answers reachability rather than name-presence, and the\nnegative is then recorded as `resolver: <name>` rather than as a hop count. It is still bounded\nby what the resolver can see — generated entrypoints and string-keyed registries usually sit\noutside it — and that bound is stated with the answer.\n\nTwo worked failures, one at each depth:\n\n- **Zero hops.** A run concluded \"there is no import path to this module\" from a single\n  direct-name search with a control that fired, and recorded it as absence. The loader reached\n  the module through an index file that re-exported a whole directory; nothing in the chain\n  spelled the module's name until the last hop. Both statements were true — the search was\n  clean, and the module ran in production every night.\n- **Exactly one hop.** A later run did take the hop: it walked the module's direct importers,\n  found every one of them clean, and concluded \"no import path\". The chain was **three hops**\n  deep, through a shared utility barrel that spelled nothing in it. One hop is a depth, and the\n  admissible statement was \"no reference to depth 1\" — which nobody would have acted on.\n\nWrite the negative at the reach it has:\n\n```json\n{ \"target\": \"an import of modules/report\", \"control\": \"git grep -n \\\"modules/\\\" -- src\",\n  \"control_fired\": true, \"reach\": \"no reference to depth 2\",\n  \"hops_walked\": [\"src/index.ts re-exports ./modules/*\", \"utils/index.ts re-exports ./loader\"],\n  \"boundary\": \"the app package; the worker package was not walked\" }\n```\n\nThe same negative after the frontier stopped growing inside the boundary:\n\n```json\n{ \"target\": \"an import of modules/report\", \"control\": \"git grep -n \\\"modules/\\\" -- src\",\n  \"control_fired\": true, \"reach\": \"closure over the app package\",\n  \"hops_walked\": [\"3 rounds, frontier empty at round 3\"],\n  \"boundary\": \"the app package; the worker package is reported separately\" }\n```\n\n## Fan-out width and independence\n\n| Band | Children | Rounds |\n|---|---|---|\n| light | none — local tools, one pass | 1 |\n| normal | 2–4 on disjoint axes, plus a reconciler | 2 |\n| deep | normal, plus the refuter and the coverage auditor | 3 |\n\nRecord, per confirmed claim, **which children could see one another's output**. Two children\nthat read the same file and agree have produced one reading, counted twice; two children on\ndifferent evidence classes that agree have corroborated. Only the second is worth writing\ndown as corroboration, and the record has to say which one happened.\n","bodyHtml":"<h2 id=\"decomposition-axes-and-the-child-result-contract\">Decomposition axes and the child result contract</h2>\n<h3 id=\"pick-the-axis-on-which-children-can-disagree\">Pick the axis on which children CAN disagree</h3>\n<p>A fan-out is only worth its overhead when the children could return different answers. Four\nchildren pointed at the same files, given the same question, produce one reading billed four\ntimes — and then agree with each other, which reads like corroboration and is not.</p>\n<p>So choose the split by asking: <em>if these two children come back with different answers, what\nwould that difference tell me?</em> If the answer is &quot;nothing, one of them read it wrong&quot;, the\naxis is wrong.</p>\n<table>\n<thead>\n<tr>\n<th>Axis</th>\n<th>Split by</th>\n<th>Use it when</th>\n<th>The trap it avoids</th>\n</tr>\n</thead>\n<tbody><tr>\n<td><strong>by-surface</strong></td>\n<td>directory, package, deploy target, language</td>\n<td>the question is &quot;where does this happen&quot; and the repo has real boundaries</td>\n<td>one child skimming everything at equal shallowness</td>\n</tr>\n<tr>\n<td><strong>by-symbol</strong></td>\n<td>one <strong>definition site</strong> per child, never a bare name</td>\n<td>the question is about a specific function, type, table, or route</td>\n<td>name collisions merging unrelated code into one answer</td>\n</tr>\n<tr>\n<td><strong>by-data-flow</strong></td>\n<td>writers / readers / <strong>derivers</strong></td>\n<td>the question is about a value: who sets it, who consumes it, who computes something else from it</td>\n<td>the derivation stage, which belongs to neither of the other two</td>\n</tr>\n<tr>\n<td><strong>by-history</strong></td>\n<td>commits, blame, reverts, the range where behaviour changed</td>\n<td>the question is &quot;when did this start&quot; or &quot;was this deliberate&quot;</td>\n<td>reading current code to answer a question about the past</td>\n</tr>\n<tr>\n<td><strong>by-runtime-evidence</strong></td>\n<td>logs, boot output, traces, schema dumps, live config</td>\n<td>the question is &quot;what actually happens&quot;, not &quot;what does the code say&quot;</td>\n<td>a code reading passed off as an observation</td>\n</tr>\n</tbody></table>\n<p>Two or three axes at once is normal at the deep band — by-surface for coverage plus\nby-runtime-evidence for a check that no code reading can produce.</p>\n<h4 id=\"by-symbol-always-a-definition-site\">by-symbol: always a definition site</h4>\n<p>A child briefed with a bare name searches for a string. In a monorepo of roughly 2,500\nTypeScript files, one measured pass found <strong>184 exported names defined in more than one\nfile</strong>, and the worst offenders were the repo&#39;s own conventions — one HTTP handler name\nappearing <strong>271 times</strong>, another 209, a registry key 143. Briefed with <code>POST</code>, a child\nreturns the whole application. Briefed with <code>path/to/module.ts:POST</code>, it returns the\ncallers of one thing.</p>\n<p>So the brief names the file and the line, or resolves the name through a language server\nfirst. If neither is possible, say the child is searching a name and downgrade every\nfinding built on it to <code>inferred</code>.</p>\n<h4 id=\"by-data-flow-the-third-bucket-is-the-one-people-forget\">by-data-flow: the third bucket is the one people forget</h4>\n<p>Writers and readers are the obvious two. The third — <strong>derivers</strong>, code that computes\nsomething else from the value — is where questions go to die, because a deriver neither\nsets the value nor reads it in the way a search for reads would find. In one measured case\nthe defect was in exactly that third stage: both the writer and the reader were correct,\nand the value was transformed in between by code that a writers-and-readers split never\nlooked at.</p>\n<p>Brief the derivers child explicitly: <em>find every place this value is used to compute\nsomething that is then stored, cached, indexed, or sent.</em></p>\n<h4 id=\"by-runtime-evidence-forbid-the-code\">by-runtime-evidence: forbid the code</h4>\n<p>The runtime child is only worth dispatching if it is <strong>forbidden from reading source</strong>. Its\nwhole value is that its evidence is a different class from everybody else&#39;s; a child that\nquietly opens the file has produced a second code reading and a false independence signal.</p>\n<p>State the prohibition in the brief, and state in the record what it was given instead —\nboot output, a log query, a schema dump, a config listing.</p>\n<h3 id=\"read-what-the-repo-already-derived-first\">Read what the repo already derived, first</h3>\n<p>If the repository carries generated registries, an atlas, or a compiler-backed index — the\nartifacts <code>derive-codebase-context</code> exists to build — read them and <strong>open the file they\ncite</strong> before dispatching anything. That is one read against a fan-out. Two rules keep it\nhonest:</p>\n<ul>\n<li>A generated artifact is evidence of what the generator saw, not of what the runtime does.\nIt sits at the &quot;code reading&quot; class, and it can be stale.</li>\n<li>Confirm by opening the cited file at the current revision. A registry entry pointing at a\npath that no longer exists is a finding, not a lookup failure.</li>\n</ul>\n<h3 id=\"brief-the-instance-that-was-named\">Brief the instance that was named</h3>\n<p>When the ask names an instance — this call site, this run id, this row, this file — the brief\ncarries <strong>that</strong> instance, and the child opens it before it looks at anything of the same\nshape. A sibling instance answers a different question: the finding may be real, the evidence\nmay be sound, and it is still not about the line the asker pointed at. Generalise afterwards,\nexplicitly, and say which instance the finding came from.</p>\n<p>Where the named instance cannot be found, that is the child&#39;s finding — <code>not_found</code> with its\ncontrol — not a licence to substitute the nearest thing with a similar name.</p>\n<h4 id=\"when-the-ask-names-a-description-not-an-identity\">When the ask names a description, not an identity</h4>\n<p>&quot;A PR&quot;, &quot;the ticket&quot;, &quot;that migration&quot;, &quot;the failing job&quot; is a <strong>description</strong>. It becomes an\ninstance only when exactly one thing matches it, and whether that holds is a question with a\ncommand behind it: list the open pull requests touching this path, the tickets carrying this\ntitle, the migrations at this version — and count what comes back.</p>\n<ul>\n<li><strong>One candidate.</strong> That is the named instance. Proceed, and cite its identifier in the answer\nso the asker can see which one was opened.</li>\n<li><strong>More than one, attended.</strong> Ask. This is a must-ask case rather than a probe: the readings\nsend the work to different artifacts, so no amount of searching settles which was meant.\nList the candidates with the one fact that distinguishes them.</li>\n<li><strong>More than one, unattended.</strong> Cover each candidate, or answer for one and say <strong>which and\nwhy at the top of the answer</strong>, not in a closing caveat where it arrives after the reader has\nalready believed the wrong thing.</li>\n<li><strong>None.</strong> The finding is that nothing matches — <code>not_found</code> with its control — and the\nnearest-named thing is not a substitute.</li>\n</ul>\n<p>Two independent runs skipped the count, resolved &quot;a PR&quot; to the first plausible match, and\ninvestigated a pull request the asker had not asked about. Both answers were internally sound.\nNeither was about the right instance, and nothing in either write-up said a choice had been\nmade — which is what made the failure invisible until somebody acted on it.</p>\n<h3 id=\"the-child-brief\">The child brief</h3>\n<p>Give each child, and nothing else:</p>\n<ul>\n<li><strong>The question</strong>, narrowed to its slice, in one sentence.</li>\n<li><strong>The instance it names</strong>, verbatim, where the ask named one.</li>\n<li><strong>Its axis and its slice</strong> — the paths, the definition site, the range, the artifact.</li>\n<li><strong>What is withheld and why.</strong> The runtime child does not get source. The adversaries do\nnot get each other&#39;s inputs. Withholding is the mechanism that makes agreement mean\nsomething; record it.</li>\n<li><strong>The result contract</strong>, verbatim, below.</li>\n<li><strong>A stop condition</strong> — hit budget, round, or &quot;when you can name the control that fired&quot;.</li>\n</ul>\n<p>Never paste the whole conversation, the parent&#39;s working notes, or another child&#39;s output.\nContext packaging is <code>model-routing</code>&#39;s subject; child visibility and lifecycle evidence are\n<code>agent-lifecycle</code>&#39;s. Neither is restated here.</p>\n<h3 id=\"the-result-contract\">The result contract</h3>\n<pre><code class=\"language-json\">{\n  &quot;question&quot;: &quot;the slice this child was asked&quot;,\n  &quot;findings&quot;: [\n    {\n      &quot;claim&quot;: &quot;one checkable statement&quot;,\n      &quot;evidence&quot;: &quot;path/to/file.ts:120-133&quot;,\n      &quot;basis&quot;: &quot;measured | inferred&quot;,\n      &quot;confidence&quot;: &quot;basis x coverage, in words&quot;\n    }\n  ],\n  &quot;searched&quot;: [\n    { &quot;query&quot;: &quot;git grep -n \\&quot;registerJob(\\&quot; -- src worker&quot;, &quot;tool&quot;: &quot;git grep&quot;, &quot;hits&quot;: 41 }\n  ],\n  &quot;not_found&quot;: [\n    {\n      &quot;target&quot;: &quot;a runtime read of the generated registry&quot;,\n      &quot;control&quot;: &quot;git grep -n \\&quot;atlas\\&quot; -- worker&quot;,\n      &quot;control_fired&quot;: true,\n      &quot;reach&quot;: &quot;no reference to depth 1&quot;\n    }\n  ],\n  &quot;blockers&quot;: [&quot;deploy manifests are not readable from this checkout&quot;]\n}\n</code></pre>\n<p>Field rules:</p>\n<ul>\n<li><strong><code>claim</code></strong> is one statement that could be false. &quot;Looked at the router&quot; is not a claim.</li>\n<li><strong><code>evidence</code></strong> is <code>path:line</code> or a named artifact plus the query that produced it. A claim\nwith no evidence field does not go in <code>findings</code>; it goes in prose, marked <code>inferred</code>.</li>\n<li><strong><code>basis</code></strong> is <code>measured</code> when something was run, counted, or read at a cited line, and\n<code>inferred</code> for everything else — including plausible reasoning from strong priors.</li>\n<li><strong><code>confidence</code></strong> is basis × coverage, in words. Never a percentage.</li>\n<li><strong><code>searched</code></strong> holds queries <strong>verbatim</strong> with their hit counts. A paraphrased query\ncannot be re-run, and re-running is the point.</li>\n<li><strong><code>reach</code></strong> says what the negative covers, at the depth it actually reached: <code>no reference to depth N</code> with N and the hops walked, <code>closure over &lt;boundary&gt;</code> where the frontier stopped\ngrowing inside a named boundary, or <code>resolver: &lt;name&gt;</code> where a reference graph answered\ninstead of a walk. A negative with no <code>reach</code> field cannot carry a claim about reachability,\nand the reconciler treats it as the narrowest statement it could be.</li>\n<li><strong><code>blockers</code></strong> is where a child says what it could not do. An empty <code>blockers</code> on a child\nthat hit a permission wall is the most expensive kind of silence.</li>\n</ul>\n<h3 id=\"the-control-rule\">THE CONTROL RULE</h3>\n<blockquote>\n<p>A zero-hit search is admissible as <strong>absent</strong> only when a control fired. Otherwise it is\nrecorded <strong>inconclusive</strong>.</p>\n</blockquote>\n<p>A <strong>control</strong> is a deliberately positive variant of the same search, run the same way, that\nreturns hits. It proves the search apparatus was working — right tool, right paths, right\npattern dialect, right file types. Without it, &quot;no hits&quot; means one of two very different\nthings and you cannot tell which: the thing is absent, or the search never worked.</p>\n<p>Worked failures, each measured at least once:</p>\n<ul>\n<li><strong>The word-boundary escape.</strong> <code>git grep -E &#39;\\bhandler\\b&#39;</code> returns nothing, and it never\ncould: POSIX ERE has no <code>\\b</code>. Read as proof of absence, it is proof of a typo. Control:\nthe same command with the boundaries removed returns hits — so the pattern dialect, not\nthe codebase, was the problem.</li>\n<li><strong>The pathspec that excluded the answer.</strong> <code>-- src/</code> on a repo whose worker lives in\n<code>services/</code>. Control: search for something certainly present, with the same pathspec. If\nthe control also returns nothing, the pathspec is the finding.</li>\n<li><strong>The untracked file type.</strong> <code>git grep</code> searches tracked files. Generated output, vendored\ncode, and anything in <code>.gitignore</code> are invisible to it. Control: <code>git ls-files -- &#39;*.sql&#39; | wc -l</code> before concluding that no SQL mentions the table.</li>\n<li><strong>Case and the compound identifier.</strong> <code>job_name</code> does not match <code>jobName</code>. Control: search\nthe case-insensitive variant, and if it fires, the original search proved nothing.</li>\n</ul>\n<p>Record the control <strong>and whether it fired</strong>, in <code>not_found[]</code>, every time. This is the\nsingle highest-value mechanical rule in this family, and it costs one extra command.</p>\n<h3 id=\"the-transitive-negative-rule\">THE TRANSITIVE-NEGATIVE RULE</h3>\n<blockquote>\n<p>A zero-hit direct-reference search proves the <strong>direct hop</strong> and nothing beyond it, and one\nmore hop proves two. A claim about reachability or flow requires a walk to <strong>closure over the\nrelevant boundary</strong>, or a resolver that answers reachability directly. Anything shallower is\nrecorded as <strong>&quot;no reference to depth N&quot;</strong> — never as &quot;no path&quot;.</p>\n</blockquote>\n<p>A fired control upgrades a negative from <em>inconclusive</em> to <em>absent</em>. It says nothing about the\n<strong>reach</strong> of the question that negative is being used to answer, and that is the second half\npeople skip. &quot;No file imports this module&quot; and &quot;this module cannot be reached&quot; are different\nstatements, and the second is the one that authorises a deletion.</p>\n<p>The walk is cheap, and it ends at a <strong>frontier, not at a hop count</strong>. Take the surface the\nsearch covered and follow what it references outward — barrel files and re-exports, registry\ntables keyed by string, dynamic or glob imports, dependency-injection containers, generated\nentrypoints, configuration that names a module as text — then repeat over everything that walk\nreached, until the set of newly reached surfaces is empty or the boundary you named is crossed.\nAny of those edges reaches a target it never spells, so a search for the target&#39;s name over the\nimporting file returns zero forever, at every depth.</p>\n<p><strong>Name the boundary, or closure is unverifiable.</strong> &quot;Closure&quot; over what: this package, this\ndeploy target, this repository? A frontier that stopped because the walk left the package is a\nclosure over the package and a depth-N negative over everything else, and the record says which.</p>\n<p><strong>A resolver substitutes for the walk.</strong> A language server&#39;s reference graph, a bundler&#39;s module\ngraph, an import-boundary checker: each answers reachability rather than name-presence, and the\nnegative is then recorded as <code>resolver: &lt;name&gt;</code> rather than as a hop count. It is still bounded\nby what the resolver can see — generated entrypoints and string-keyed registries usually sit\noutside it — and that bound is stated with the answer.</p>\n<p>Two worked failures, one at each depth:</p>\n<ul>\n<li><strong>Zero hops.</strong> A run concluded &quot;there is no import path to this module&quot; from a single\ndirect-name search with a control that fired, and recorded it as absence. The loader reached\nthe module through an index file that re-exported a whole directory; nothing in the chain\nspelled the module&#39;s name until the last hop. Both statements were true — the search was\nclean, and the module ran in production every night.</li>\n<li><strong>Exactly one hop.</strong> A later run did take the hop: it walked the module&#39;s direct importers,\nfound every one of them clean, and concluded &quot;no import path&quot;. The chain was <strong>three hops</strong>\ndeep, through a shared utility barrel that spelled nothing in it. One hop is a depth, and the\nadmissible statement was &quot;no reference to depth 1&quot; — which nobody would have acted on.</li>\n</ul>\n<p>Write the negative at the reach it has:</p>\n<pre><code class=\"language-json\">{ &quot;target&quot;: &quot;an import of modules/report&quot;, &quot;control&quot;: &quot;git grep -n \\&quot;modules/\\&quot; -- src&quot;,\n  &quot;control_fired&quot;: true, &quot;reach&quot;: &quot;no reference to depth 2&quot;,\n  &quot;hops_walked&quot;: [&quot;src/index.ts re-exports ./modules/*&quot;, &quot;utils/index.ts re-exports ./loader&quot;],\n  &quot;boundary&quot;: &quot;the app package; the worker package was not walked&quot; }\n</code></pre>\n<p>The same negative after the frontier stopped growing inside the boundary:</p>\n<pre><code class=\"language-json\">{ &quot;target&quot;: &quot;an import of modules/report&quot;, &quot;control&quot;: &quot;git grep -n \\&quot;modules/\\&quot; -- src&quot;,\n  &quot;control_fired&quot;: true, &quot;reach&quot;: &quot;closure over the app package&quot;,\n  &quot;hops_walked&quot;: [&quot;3 rounds, frontier empty at round 3&quot;],\n  &quot;boundary&quot;: &quot;the app package; the worker package is reported separately&quot; }\n</code></pre>\n<h3 id=\"fan-out-width-and-independence\">Fan-out width and independence</h3>\n<table>\n<thead>\n<tr>\n<th>Band</th>\n<th>Children</th>\n<th>Rounds</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>light</td>\n<td>none — local tools, one pass</td>\n<td>1</td>\n</tr>\n<tr>\n<td>normal</td>\n<td>2–4 on disjoint axes, plus a reconciler</td>\n<td>2</td>\n</tr>\n<tr>\n<td>deep</td>\n<td>normal, plus the refuter and the coverage auditor</td>\n<td>3</td>\n</tr>\n</tbody></table>\n<p>Record, per confirmed claim, <strong>which children could see one another&#39;s output</strong>. Two children\nthat read the same file and agree have produced one reading, counted twice; two children on\ndifferent evidence classes that agree have corroborated. Only the second is worth writing\ndown as corroboration, and the record has to say which one happened.</p>\n","words":2499},{"path":"references/deep-mode-adversaries.md","slug":"deep-mode-adversaries","title":"Deep mode: two adversaries","body":"# Deep mode: two adversaries\n\nAt the deep band, and only there, the draft answer is attacked by **two** children with\n**asymmetric inputs** and **opposite defaults**. One asks whether the claims are true. The\nother asks whether the claims are all of it. They are separate jobs and a single reviewer\ncollapses them into one — usually into the first, because refuting a written claim is easier\nthan noticing a surface nobody looked at.\n\nNever run either on a light-band question. An adversarial round over a four-hit lookup costs\nmore than the answer and produces a confident dispute about nothing; escalation is scored as\na failure in the suite this family is measured against, not as diligence.\n\n## The refuter\n\n| | |\n|---|---|\n| **Input** | The claims and their citations. Nothing else — not the reasoning, not the children's summaries, not the question's framing. |\n| **Default verdict** | `REFUTED`. The claim is wrong until an artifact shows otherwise. |\n| **Concession rule** | It may concede **only by naming the artifact it opened** and what that artifact showed. \"Seems right\" is not a concession; it is the default, restated. |\n| **Output** | Per claim: `refuted` with the counter-evidence, or `conceded` naming the artifact, or `unresolved (needs X)`. |\n\nThe withheld reasoning is the mechanism. A reviewer given the argument evaluates the\nargument; a reviewer given only the conclusion and the citation has to go and look.\n\n## The coverage auditor\n\n| | |\n|---|---|\n| **Input** | The question, and the manifests — the file listing, the package list, the route or job registries, the deploy targets. **Not the answer.** |\n| **Default verdict** | `INCOMPLETE`. |\n| **Concession rule** | It may only conclude \"covered\" after failing to name an uncovered surface. To claim incompleteness it **must name a specific surface and one probe** that would settle it. |\n| **Output** | Named uncovered surfaces, each with the one command or observation that would cover it. |\n\nWithholding the answer is what makes it useful. An auditor that has read the answer audits\nthe answer's own frame, which is the frame that produced the gap.\n\n## Adjudication\n\n- **Two rounds maximum.** Round one runs both adversaries; round two runs only the ones with\n  live objections.\n- **Evidence only.** An objection is resolved by opening the artifact, not by re-arguing. If\n  neither side has an artifact, the row is `unresolved (needs X)` and X is named.\n- **A conceded claim is recorded `conceded`, not `validated`.** A refuter that ran out of\n  objections has not verified anything; it has failed to refute. The distinction matters to\n  whoever reopens the question, and it is the difference between \"we checked\" and \"nobody\n  found a problem in twenty minutes\".\n- Uncovered surfaces the auditor names are either covered in round two or written into *what\n  this run could not see*. They do not evaporate because the round budget ended.\n\n## This is not a code review\n\nOne line, because it gets confused constantly: **this gate has no pull request, no pushed\nbranch, and no completed implementation.** It attacks an answer, not a diff. The review loop\nover a real PR belongs to `request-blocks-review` and `blocks`; running the adversaries\ninstead of that loop reviews a claim about code that nobody has written yet.\n\n## Degradation\n\nA harness that cannot withhold parent context from children cannot run this design: both\nadversaries would see the reasoning, the answer, and each other, which removes the asymmetry\nthat makes their verdicts mean different things.\n\nIn that case run **one** reviewer, keep the `REFUTED`-by-default posture, and **say in the\nanswer and in the record that the two-verdict design degraded to a single reviewer** — so\nthe coverage question is visibly unasked rather than silently assumed. The one thing not to\ndo is run two children with identical inputs and present their agreement as adversarial\nconfirmation.\n\n## Worked round\n\n```text\ndraft claim: the generated registry is authoritative at runtime  [worker/boot.ts:22]\n\nrefuter        → REFUTED by default; opened worker/boot.ts:22, which imports\n                 jobs.generated.ts directly → conceded, naming the artifact.\n                 Recorded: conceded (not validated).\ncoverage       → INCOMPLETE: the deploy pipeline's own manifests were never read.\nauditor          Probe: list the manifest files in the deploy configuration and grep\n                 them for the registry filename.\nround 2        → probe unavailable from this checkout → row stands as\n                 \"unresolved (needs a deploy-configuration read)\", carried into\n                 what this run could not see.\n```\n","bodyHtml":"<h2 id=\"deep-mode-two-adversaries\">Deep mode: two adversaries</h2>\n<p>At the deep band, and only there, the draft answer is attacked by <strong>two</strong> children with\n<strong>asymmetric inputs</strong> and <strong>opposite defaults</strong>. One asks whether the claims are true. The\nother asks whether the claims are all of it. They are separate jobs and a single reviewer\ncollapses them into one — usually into the first, because refuting a written claim is easier\nthan noticing a surface nobody looked at.</p>\n<p>Never run either on a light-band question. An adversarial round over a four-hit lookup costs\nmore than the answer and produces a confident dispute about nothing; escalation is scored as\na failure in the suite this family is measured against, not as diligence.</p>\n<h3 id=\"the-refuter\">The refuter</h3>\n<table>\n<thead>\n<tr>\n<th></th>\n<th></th>\n</tr>\n</thead>\n<tbody><tr>\n<td><strong>Input</strong></td>\n<td>The claims and their citations. Nothing else — not the reasoning, not the children&#39;s summaries, not the question&#39;s framing.</td>\n</tr>\n<tr>\n<td><strong>Default verdict</strong></td>\n<td><code>REFUTED</code>. The claim is wrong until an artifact shows otherwise.</td>\n</tr>\n<tr>\n<td><strong>Concession rule</strong></td>\n<td>It may concede <strong>only by naming the artifact it opened</strong> and what that artifact showed. &quot;Seems right&quot; is not a concession; it is the default, restated.</td>\n</tr>\n<tr>\n<td><strong>Output</strong></td>\n<td>Per claim: <code>refuted</code> with the counter-evidence, or <code>conceded</code> naming the artifact, or <code>unresolved (needs X)</code>.</td>\n</tr>\n</tbody></table>\n<p>The withheld reasoning is the mechanism. A reviewer given the argument evaluates the\nargument; a reviewer given only the conclusion and the citation has to go and look.</p>\n<h3 id=\"the-coverage-auditor\">The coverage auditor</h3>\n<table>\n<thead>\n<tr>\n<th></th>\n<th></th>\n</tr>\n</thead>\n<tbody><tr>\n<td><strong>Input</strong></td>\n<td>The question, and the manifests — the file listing, the package list, the route or job registries, the deploy targets. <strong>Not the answer.</strong></td>\n</tr>\n<tr>\n<td><strong>Default verdict</strong></td>\n<td><code>INCOMPLETE</code>.</td>\n</tr>\n<tr>\n<td><strong>Concession rule</strong></td>\n<td>It may only conclude &quot;covered&quot; after failing to name an uncovered surface. To claim incompleteness it <strong>must name a specific surface and one probe</strong> that would settle it.</td>\n</tr>\n<tr>\n<td><strong>Output</strong></td>\n<td>Named uncovered surfaces, each with the one command or observation that would cover it.</td>\n</tr>\n</tbody></table>\n<p>Withholding the answer is what makes it useful. An auditor that has read the answer audits\nthe answer&#39;s own frame, which is the frame that produced the gap.</p>\n<h3 id=\"adjudication\">Adjudication</h3>\n<ul>\n<li><strong>Two rounds maximum.</strong> Round one runs both adversaries; round two runs only the ones with\nlive objections.</li>\n<li><strong>Evidence only.</strong> An objection is resolved by opening the artifact, not by re-arguing. If\nneither side has an artifact, the row is <code>unresolved (needs X)</code> and X is named.</li>\n<li><strong>A conceded claim is recorded <code>conceded</code>, not <code>validated</code>.</strong> A refuter that ran out of\nobjections has not verified anything; it has failed to refute. The distinction matters to\nwhoever reopens the question, and it is the difference between &quot;we checked&quot; and &quot;nobody\nfound a problem in twenty minutes&quot;.</li>\n<li>Uncovered surfaces the auditor names are either covered in round two or written into <em>what\nthis run could not see</em>. They do not evaporate because the round budget ended.</li>\n</ul>\n<h3 id=\"this-is-not-a-code-review\">This is not a code review</h3>\n<p>One line, because it gets confused constantly: <strong>this gate has no pull request, no pushed\nbranch, and no completed implementation.</strong> It attacks an answer, not a diff. The review loop\nover a real PR belongs to <code>request-blocks-review</code> and <code>blocks</code>; running the adversaries\ninstead of that loop reviews a claim about code that nobody has written yet.</p>\n<h3 id=\"degradation\">Degradation</h3>\n<p>A harness that cannot withhold parent context from children cannot run this design: both\nadversaries would see the reasoning, the answer, and each other, which removes the asymmetry\nthat makes their verdicts mean different things.</p>\n<p>In that case run <strong>one</strong> reviewer, keep the <code>REFUTED</code>-by-default posture, and <strong>say in the\nanswer and in the record that the two-verdict design degraded to a single reviewer</strong> — so\nthe coverage question is visibly unasked rather than silently assumed. The one thing not to\ndo is run two children with identical inputs and present their agreement as adversarial\nconfirmation.</p>\n<h3 id=\"worked-round\">Worked round</h3>\n<pre><code class=\"language-text\">draft claim: the generated registry is authoritative at runtime  [worker/boot.ts:22]\n\nrefuter        → REFUTED by default; opened worker/boot.ts:22, which imports\n                 jobs.generated.ts directly → conceded, naming the artifact.\n                 Recorded: conceded (not validated).\ncoverage       → INCOMPLETE: the deploy pipeline&#39;s own manifests were never read.\nauditor          Probe: list the manifest files in the deploy configuration and grep\n                 them for the registry filename.\nround 2        → probe unavailable from this checkout → row stands as\n                 &quot;unresolved (needs a deploy-configuration read)&quot;, carried into\n                 what this run could not see.\n</code></pre>\n","words":737},{"path":"references/documenting-the-run.md","slug":"documenting-the-run","title":"The run record — `--document`","body":"# The run record — `--document`\n\nA run that reached a good answer and left nothing behind cannot be checked, reused, or\nresumed. The next person — often the same person a week later — repeats the searches,\nrediscovers the same dead ends, and has no way to tell which claims were measured and\nwhich were guessed. A run record fixes exactly that: it says what was searched, who\nsearched it, what each found, how the disagreements were settled, and what was decided.\n\nIt is a byproduct, never the product. Writing one must not change the answer.\n\nThis file is the whole convention. It is carried, byte-identical, by every skill in this\nfamily, and the copies are compared by hash in CI — so edit the convention once and copy\nit, never edit a single skill's copy. Never link across skills to another copy: a local\nlink that escapes its skill directory fails the catalog verifier.\n\n## When a record gets written\n\nThree branches, keyed on **attendance**. Attendance is *declared* — conservatively — and\nnever probed. Do not ask the harness whether someone is watching; decide from what you\nalready know about how the run started.\n\n| Branch | Condition | Where it goes | Form |\n|---|---|---|---|\n| Asked for | `--document`, `--document=<path>`, or an unambiguous phrase | host repository | full |\n| Unattended | headless, cron, CI, or dispatched by a parent agent | harness scratch directory | full (light band: short) |\n| Attended, no token | a human is in the loop and did not ask | nowhere | none, plus at most one offer |\n\n1. **Asked for.** The invocation carries `--document` or `--document=<path>`, or an\n   unambiguous natural phrase — \"document the run\", \"write down how you got there\".\n   Write the **full** record at the host-repository path below. A vague \"keep notes\"\n   is not this branch; treat it as attended and offer.\n\n2. **Unattended.** The operative test is one sentence: *if you cannot confirm a human\n   will see and answer a question in THIS run, treat it as unattended.* An unattended\n   run **always** writes a record, because there is nobody to ask afterwards what it\n   did — and it writes to the **harness scratch directory, never the host repository**.\n   An unattended run does not make unsolicited repository writes; a cron job that leaves\n   a file in someone's tree has changed their working state without being asked. Name the\n   record's path in the final answer, or the record is unfindable and might as well not\n   exist. Normal and deep bands write the full form; the light band writes the short form\n   below.\n\n3. **Attended, no token.** Silent by default. Make **one** offer, and only when the run\n   ends with an unresolved contradiction or an open blocking question — the two states\n   where the value of a written record exceeds the cost of the interruption. One offer,\n   ever. A declined offer ends the matter for the run; do not re-offer with better\n   framing.\n\n## Where it goes\n\nOne literal convention:\n\n```text\ndocs/<skill-name>/<UTC-date>-<slug>.md\n```\n\n- `<skill-name>` — the invoking skill's own name, so records from different skills do\n  not interleave in one directory.\n- `<UTC-date>` — `YYYY-MM-DD`, in UTC. Local dates put two records of the same run on\n  different days when the machines sit in different zones.\n- `<slug>` — a short kebab-case handle for the question or the change.\n\nThere is no probe cascade. The path is not negotiated with the repository's existing\ndocumentation layout, because a convention that guesses produces a different answer on\nevery repo and nobody can predict where the file will land. Determinism wins.\n\n- **Overridable only by `--document=<path>`.** No other input moves it.\n- **Create the directory if absent.** A missing directory is not a reason to skip the\n  record.\n- **Never inside a skill directory.** Records are host artifacts; one written under a\n  skill directory ships to everyone who installs the pack.\n- **Never overwrite.** A re-run against an existing path **appends** a new section,\n  headed with its UTC timestamp and round number. Earlier rounds stay exactly as written.\n- **Assert its existence in the skill's Verification list**, with the path stated.\n\n## What the record contains\n\nA header block, then **five headings, in this order, with these names**:\n\n```text\n## What was searched\n## Who searched it\n## What each found\n## How it reconciled\n## What was decided and why\n```\n\nThe names are literal and identical across every skill that carries this file. In a skill\nwhose work is mapping, rendering, or landing rather than searching, \"searched\" covers\nwhatever that skill probed — map queries, gate runs, seeded checks. Do not rename the\nheadings to fit the local vocabulary; the point of fixed names is that a reader who has\nseen one record can read all of them.\n\n### The header block\n\nAbove the first heading, pin what the record is about and what it was true of:\n\n- Repository identity — remote or name, **never** a machine-absolute path.\n- HEAD sha, and the **dirty state**: clean, or the count of modified files. A record\n  taken against an uncommitted tree describes a state nobody else can reconstruct, and\n  it has to say so.\n- UTC timestamp.\n- The invocation: skill, band, and the flags as they were given.\n- The question, or the proposed change, in one sentence.\n\n### What was searched\n\n- Every query **verbatim**, with the tool that ran it and its result count. A query\n  paraphrased into prose cannot be re-run.\n- The surface each query covers, and the surfaces deliberately left out.\n- Artifacts *read* as well as searched — generated registries, manifests, migrations,\n  dashboards, logs. Reading a registry that already answers the question is a finding,\n  not a shortcut worth hiding.\n- Which round each query belongs to, when there was more than one.\n\n### Who searched it\n\n- One line per child: **role, tier band, decomposition axis, the input it was given, and\n  what was withheld from it.** Roles and tiers, never model names — routing identifiers\n  belong to `model-routing`, and a record naming a model is stale the day it changes.\n- **Independence.** State which children could see one another's output. Agreement\n  between two children that read the same artifact is one reading, counted twice.\n- When there were no children — no subagents available, or a light band — say so, and\n  say the passes ran sequentially instead. A record that silently omits this reads as\n  if a fan-out happened.\n\n### What each found\n\n- **Claims**, each with its evidence as `path:line`, its `basis` — `measured` or\n  `inferred` — and its confidence expressed as basis × coverage. Never a percentage;\n  a number nobody computed is a decoration.\n- **`not_found[]`, each with its control and whether the control fired.** A zero-hit\n  search is admissible as \"absent\" **only** with a fired control — a deliberately\n  positive variant of the same query, run the same way, that returns hits. Without one,\n  record `inconclusive`, not `absent`. This is not pedantry: in one measured case a\n  `git grep -E '\\b…'` returned nothing and was read as proof of absence, when ERE simply\n  ignores `\\b` and the search had never matched anything at all.\n- **Discarded candidates** — everything looked at and rejected, with the reason for the\n  rejection and the artifact that produced it. This is the bullet most often skipped and\n  the one that earns the most: in the suite this family is scored against, four of the\n  eight scoring keys award credit for a recorded discard, and none award anything for a\n  candidate dropped in silence. A discard is what stops the next reader spending an hour\n  on a path already walked.\n- **Blockers** — anything a child could not do, with the reason.\n\n### How it reconciled\n\n- **The contradiction table**, with these columns, in this order:\n\n  ```text\n  claim | source A | source B | evidence A | evidence B | what each evidence CAN prove | verdict | residual\n  ```\n\n  Verdicts come from a closed set: `confirmed`, `refuted`, `unresolved (needs X)`,\n  `inconclusive`. \"What each evidence CAN prove\" is the column that does the work — a\n  document proves intent, a log proves behaviour, and a table that skips this column\n  settles disputes by tone.\n- **The evidence class used to break each tie**, and the note that class breaks ties\n  while *reach* decides admissibility: an observation of production outranks a local\n  measurement, which outranks code reading, which outranks docs, comments, and titles,\n  which outrank recollection — but only over the surface the evidence actually touches.\n- **Which candidate hits were re-read** rather than taken from a child's summary. Summaries\n  launder substring false positives into confirmed claims; the reconciler opens the file.\n- **Rounds that changed no verdict.** That is the stop rule firing, and it belongs in the\n  record as the reason the run ended.\n\n### What was decided and why\n\n- **The decision**, one sentence, and what it authorises — including \"authorises nothing\n  destructive\" when that is the truth.\n- **Adversarial concessions**, quoted, each naming the artifact that produced it. A\n  conceded claim is recorded *conceded*, not *validated*; the difference matters to whoever\n  re-opens this.\n- **Marked assumptions.** Every claim depending on an unanswered question is marked\n  assumption-dependent, with the question, the default taken, and the direction the answer\n  would move the conclusion.\n- **Open questions**, with the blocking one labelled as blocking.\n- **The evidence index**: every load-bearing citation as `path:line`, the sha it was read\n  at, and the result counts of the queries behind it. This is what makes the record\n  re-checkable a month later against a moved tree.\n- **A closing paragraph titled \"what this run could not see\"** — surfaces not covered,\n  tools unavailable, questions only a production observation could settle. It closes the\n  record; there is no sixth heading. It is a boundary, not a hedge — and the paragraph a\n  reader deciding how far to trust the rest will go looking for.\n\n## The short form\n\nUnattended runs at the light band write four parts and stop:\n\n1. Header block and invocation.\n2. The complexity assessment — each signal's score, the observable that scored it, and\n   the resulting band.\n3. The decision, with its marked assumptions.\n4. What this run could not see.\n\nNo contradiction table and no evidence index: a light-band run that produced either was\nmis-banded, and the fix is the band, not the record.\n\n## Prohibitions\n\n- **No secret values.** Variable and file names only. Records get committed, and a record\n  is read by people who were not in the room.\n- **No machine-absolute paths.** Repository-relative only. An absolute path under a home\n  directory leaks a username and stops resolving on any other machine.\n- **No chain-of-thought, child transcripts, or raw logs.** The record carries claims,\n  evidence, verdicts and decisions. A transcript is volume, and it re-presents reasoning\n  as if it were a finding.\n- **Minimal personal-data fragments.** Names, addresses, ticket text, customer strings —\n  only where the finding genuinely cannot be stated without them, and preferably as a role.\n- **No unmarked inference.** Every claim carries its basis. Inference written flat, in the\n  same voice as measurement, is the failure this whole family exists to prevent.\n- **No unearned benefit claims.** \"Faster\", \"safer\", \"fixes it\" require something that\n  measured it. Otherwise state what the code does and stop.\n- **Never edit an earlier record.** Append a new dated round section. Records are a\n  history; a rewritten one is a claim about the past with no evidence behind it.\n- **`--document` must not change the answer.** If knowing a record is coming changes what\n  gets searched, what gets conceded, or how confident the conclusion sounds, the record has\n  become the product. Decide first, write second.\n\n## A worked example\n\nA normal-band investigation in a large monorepo, anonymised. Short deliberately — the\nshape matters more than the length.\n\n```markdown\n# Which registry is authoritative for job names?\n\n- repo: `acme/platform` @ `3f9c1ab` — clean\n- run: investigate-codebase, normal band (scope 2, contradiction 2, size 1, ambiguity 0,\n  cost-of-being-wrong 1 = 6), 2026-08-26T09:14Z\n- question: two registries list job names; which one does the runtime read?\n\n## What was searched\n- `git grep -n \"registerJob(\" -- src worker` → 41 hits (round 1)\n- `git grep -nE \"jobs\\.(json|ts)\" -- .` → 6 hits (round 1)\n- read: the generated job registry page, and `worker/boot.ts`\n- not searched: the deploy pipeline's own manifests — not readable from this checkout\n\n## Who searched it\n- child A — searcher, mid tier, by-surface (`src/`), given the question only\n- child B — searcher, mid tier, by-runtime-evidence, forbidden from reading source,\n  given boot output only\n- reconciler — mid tier, re-read every cited hit; A and B could not see each other\n\n## What each found\n- A: `worker/boot.ts:22` imports `jobs.generated.ts` — basis measured\n- B: boot output names 41 jobs, against the 46 listed in the generated page — basis measured\n- not_found: no runtime read of the generated page. Control: `git grep -n \"atlas\" -- worker`\n  → 3 hits, so the pattern matches in that path and the absence is real. Control fired.\n- discarded: `tools/sync-jobs.ts` — writes the page, never read at runtime; rejected\n  after reading it, not after reading its name\n- discarded: 5 of the 41 `registerJob(` hits are test fixtures, not registrations\n\n## How it reconciled\n| claim | source A | source B | evidence A | evidence B | what each evidence CAN prove | verdict | residual |\n|---|---|---|---|---|---|---|---|\n| the generated page is authoritative | its own header | boot output | a doc asserting intent | 41 booted vs 46 listed | doc proves intent; output proves behaviour | refuted | the 5 extra rows are unexplained |\n\nRuntime observation outranks the doc's own claim. The reconciler re-read all 41\n`registerJob(` sites rather than trusting a counted summary; that is where the 5 fixtures\nsurfaced.\n\n## What was decided and why\n- Decision: `jobs.generated.ts` is authoritative at runtime; the generated page has drifted\n  by five entries. Authorises nothing destructive.\n- Concession: the refuter conceded after reading `worker/boot.ts:22` — recorded conceded,\n  not independently validated.\n- Assumption (marked): the deployed image boots the same entrypoint as local. Unanswered;\n  default taken is yes. If false, the drift count is wrong in an unknown direction.\n- Open question (non-blocking): what produced the five extra rows?\n- Evidence index: `worker/boot.ts:22` @ `3f9c1ab`; `jobs.generated.ts` @ `3f9c1ab`;\n  `git grep -n \"registerJob(\" -- src worker` → 41.\n\nWhat this run could not see: the deploy pipeline manifests, any environment whose\nentrypoint differs from local, and job registration that happens per-request rather than\nat boot.\n```\n\n## In-body core (copy verbatim)\n\nEvery skill that supports `--document` embeds the block below in its own body, so the\nconvention survives a reader who never opens this file. Copy it verbatim; the only\npermitted edit is substituting the skill's own name for `<skill-name>`.\n\n```markdown\n**Documenting the run.** Write a full record when the invocation carries `--document` (or\nan unmistakable phrase such as \"document the run\"), at `docs/<skill-name>/<UTC-date>-<slug>.md`\nin the host repository — and always when the run is unattended, in which case it goes to the\nharness scratch directory, never the repository, and its path is named in the final answer;\nif you cannot confirm a human will see and answer a question in THIS run, treat it as\nunattended. Attended with no token: stay silent, offering once only if the run ends with an\nunresolved contradiction or an open blocking question. Five headings, in order: What was\nsearched / Who searched it / What each found / How it reconciled / What was decided and why,\nclosing with what this run could not see. No secret values, machine-absolute paths, child\ntranscripts or raw logs; no unmarked inference or unearned benefit claims; never edit an\nearlier record, and never let writing one change the answer.\n```\n\nFollow it, in the same section, with the sentence below, word for word, linking the words\n`the run-record convention` to `references/documenting-the-run.md`, a path from the skill's\nroot, where `SKILL.md` sits:\n\n```markdown\nRecords are written per the run-record convention.\n```\n\nThe path is given here as code, not as a link: a link resolves from the file that holds it,\nfenced or not, and from this file's folder that path names nothing.\n","bodyHtml":"<h2 id=\"the-run-record---document\">The run record — <code>--document</code></h2>\n<p>A run that reached a good answer and left nothing behind cannot be checked, reused, or\nresumed. The next person — often the same person a week later — repeats the searches,\nrediscovers the same dead ends, and has no way to tell which claims were measured and\nwhich were guessed. A run record fixes exactly that: it says what was searched, who\nsearched it, what each found, how the disagreements were settled, and what was decided.</p>\n<p>It is a byproduct, never the product. Writing one must not change the answer.</p>\n<p>This file is the whole convention. It is carried, byte-identical, by every skill in this\nfamily, and the copies are compared by hash in CI — so edit the convention once and copy\nit, never edit a single skill&#39;s copy. Never link across skills to another copy: a local\nlink that escapes its skill directory fails the catalog verifier.</p>\n<h3 id=\"when-a-record-gets-written\">When a record gets written</h3>\n<p>Three branches, keyed on <strong>attendance</strong>. Attendance is <em>declared</em> — conservatively — and\nnever probed. Do not ask the harness whether someone is watching; decide from what you\nalready know about how the run started.</p>\n<table>\n<thead>\n<tr>\n<th>Branch</th>\n<th>Condition</th>\n<th>Where it goes</th>\n<th>Form</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>Asked for</td>\n<td><code>--document</code>, <code>--document=&lt;path&gt;</code>, or an unambiguous phrase</td>\n<td>host repository</td>\n<td>full</td>\n</tr>\n<tr>\n<td>Unattended</td>\n<td>headless, cron, CI, or dispatched by a parent agent</td>\n<td>harness scratch directory</td>\n<td>full (light band: short)</td>\n</tr>\n<tr>\n<td>Attended, no token</td>\n<td>a human is in the loop and did not ask</td>\n<td>nowhere</td>\n<td>none, plus at most one offer</td>\n</tr>\n</tbody></table>\n<ol>\n<li><p><strong>Asked for.</strong> The invocation carries <code>--document</code> or <code>--document=&lt;path&gt;</code>, or an\nunambiguous natural phrase — &quot;document the run&quot;, &quot;write down how you got there&quot;.\nWrite the <strong>full</strong> record at the host-repository path below. A vague &quot;keep notes&quot;\nis not this branch; treat it as attended and offer.</p>\n</li>\n<li><p><strong>Unattended.</strong> The operative test is one sentence: <em>if you cannot confirm a human\nwill see and answer a question in THIS run, treat it as unattended.</em> An unattended\nrun <strong>always</strong> writes a record, because there is nobody to ask afterwards what it\ndid — and it writes to the <strong>harness scratch directory, never the host repository</strong>.\nAn unattended run does not make unsolicited repository writes; a cron job that leaves\na file in someone&#39;s tree has changed their working state without being asked. Name the\nrecord&#39;s path in the final answer, or the record is unfindable and might as well not\nexist. Normal and deep bands write the full form; the light band writes the short form\nbelow.</p>\n</li>\n<li><p><strong>Attended, no token.</strong> Silent by default. Make <strong>one</strong> offer, and only when the run\nends with an unresolved contradiction or an open blocking question — the two states\nwhere the value of a written record exceeds the cost of the interruption. One offer,\never. A declined offer ends the matter for the run; do not re-offer with better\nframing.</p>\n</li>\n</ol>\n<h3 id=\"where-it-goes\">Where it goes</h3>\n<p>One literal convention:</p>\n<pre><code class=\"language-text\">docs/&lt;skill-name&gt;/&lt;UTC-date&gt;-&lt;slug&gt;.md\n</code></pre>\n<ul>\n<li><code>&lt;skill-name&gt;</code> — the invoking skill&#39;s own name, so records from different skills do\nnot interleave in one directory.</li>\n<li><code>&lt;UTC-date&gt;</code> — <code>YYYY-MM-DD</code>, in UTC. Local dates put two records of the same run on\ndifferent days when the machines sit in different zones.</li>\n<li><code>&lt;slug&gt;</code> — a short kebab-case handle for the question or the change.</li>\n</ul>\n<p>There is no probe cascade. The path is not negotiated with the repository&#39;s existing\ndocumentation layout, because a convention that guesses produces a different answer on\nevery repo and nobody can predict where the file will land. Determinism wins.</p>\n<ul>\n<li><strong>Overridable only by <code>--document=&lt;path&gt;</code>.</strong> No other input moves it.</li>\n<li><strong>Create the directory if absent.</strong> A missing directory is not a reason to skip the\nrecord.</li>\n<li><strong>Never inside a skill directory.</strong> Records are host artifacts; one written under a\nskill directory ships to everyone who installs the pack.</li>\n<li><strong>Never overwrite.</strong> A re-run against an existing path <strong>appends</strong> a new section,\nheaded with its UTC timestamp and round number. Earlier rounds stay exactly as written.</li>\n<li><strong>Assert its existence in the skill&#39;s Verification list</strong>, with the path stated.</li>\n</ul>\n<h3 id=\"what-the-record-contains\">What the record contains</h3>\n<p>A header block, then <strong>five headings, in this order, with these names</strong>:</p>\n<pre><code class=\"language-text\">## What was searched\n## Who searched it\n## What each found\n## How it reconciled\n## What was decided and why\n</code></pre>\n<p>The names are literal and identical across every skill that carries this file. In a skill\nwhose work is mapping, rendering, or landing rather than searching, &quot;searched&quot; covers\nwhatever that skill probed — map queries, gate runs, seeded checks. Do not rename the\nheadings to fit the local vocabulary; the point of fixed names is that a reader who has\nseen one record can read all of them.</p>\n<h4 id=\"the-header-block\">The header block</h4>\n<p>Above the first heading, pin what the record is about and what it was true of:</p>\n<ul>\n<li>Repository identity — remote or name, <strong>never</strong> a machine-absolute path.</li>\n<li>HEAD sha, and the <strong>dirty state</strong>: clean, or the count of modified files. A record\ntaken against an uncommitted tree describes a state nobody else can reconstruct, and\nit has to say so.</li>\n<li>UTC timestamp.</li>\n<li>The invocation: skill, band, and the flags as they were given.</li>\n<li>The question, or the proposed change, in one sentence.</li>\n</ul>\n<h4 id=\"what-was-searched\">What was searched</h4>\n<ul>\n<li>Every query <strong>verbatim</strong>, with the tool that ran it and its result count. A query\nparaphrased into prose cannot be re-run.</li>\n<li>The surface each query covers, and the surfaces deliberately left out.</li>\n<li>Artifacts <em>read</em> as well as searched — generated registries, manifests, migrations,\ndashboards, logs. Reading a registry that already answers the question is a finding,\nnot a shortcut worth hiding.</li>\n<li>Which round each query belongs to, when there was more than one.</li>\n</ul>\n<h4 id=\"who-searched-it\">Who searched it</h4>\n<ul>\n<li>One line per child: <strong>role, tier band, decomposition axis, the input it was given, and\nwhat was withheld from it.</strong> Roles and tiers, never model names — routing identifiers\nbelong to <code>model-routing</code>, and a record naming a model is stale the day it changes.</li>\n<li><strong>Independence.</strong> State which children could see one another&#39;s output. Agreement\nbetween two children that read the same artifact is one reading, counted twice.</li>\n<li>When there were no children — no subagents available, or a light band — say so, and\nsay the passes ran sequentially instead. A record that silently omits this reads as\nif a fan-out happened.</li>\n</ul>\n<h4 id=\"what-each-found\">What each found</h4>\n<ul>\n<li><strong>Claims</strong>, each with its evidence as <code>path:line</code>, its <code>basis</code> — <code>measured</code> or\n<code>inferred</code> — and its confidence expressed as basis × coverage. Never a percentage;\na number nobody computed is a decoration.</li>\n<li><strong><code>not_found[]</code>, each with its control and whether the control fired.</strong> A zero-hit\nsearch is admissible as &quot;absent&quot; <strong>only</strong> with a fired control — a deliberately\npositive variant of the same query, run the same way, that returns hits. Without one,\nrecord <code>inconclusive</code>, not <code>absent</code>. This is not pedantry: in one measured case a\n<code>git grep -E &#39;\\b…&#39;</code> returned nothing and was read as proof of absence, when ERE simply\nignores <code>\\b</code> and the search had never matched anything at all.</li>\n<li><strong>Discarded candidates</strong> — everything looked at and rejected, with the reason for the\nrejection and the artifact that produced it. This is the bullet most often skipped and\nthe one that earns the most: in the suite this family is scored against, four of the\neight scoring keys award credit for a recorded discard, and none award anything for a\ncandidate dropped in silence. A discard is what stops the next reader spending an hour\non a path already walked.</li>\n<li><strong>Blockers</strong> — anything a child could not do, with the reason.</li>\n</ul>\n<h4 id=\"how-it-reconciled\">How it reconciled</h4>\n<ul>\n<li><p><strong>The contradiction table</strong>, with these columns, in this order:</p>\n<pre><code class=\"language-text\">claim | source A | source B | evidence A | evidence B | what each evidence CAN prove | verdict | residual\n</code></pre>\n<p>Verdicts come from a closed set: <code>confirmed</code>, <code>refuted</code>, <code>unresolved (needs X)</code>,\n<code>inconclusive</code>. &quot;What each evidence CAN prove&quot; is the column that does the work — a\ndocument proves intent, a log proves behaviour, and a table that skips this column\nsettles disputes by tone.</p>\n</li>\n<li><p><strong>The evidence class used to break each tie</strong>, and the note that class breaks ties\nwhile <em>reach</em> decides admissibility: an observation of production outranks a local\nmeasurement, which outranks code reading, which outranks docs, comments, and titles,\nwhich outrank recollection — but only over the surface the evidence actually touches.</p>\n</li>\n<li><p><strong>Which candidate hits were re-read</strong> rather than taken from a child&#39;s summary. Summaries\nlaunder substring false positives into confirmed claims; the reconciler opens the file.</p>\n</li>\n<li><p><strong>Rounds that changed no verdict.</strong> That is the stop rule firing, and it belongs in the\nrecord as the reason the run ended.</p>\n</li>\n</ul>\n<h4 id=\"what-was-decided-and-why\">What was decided and why</h4>\n<ul>\n<li><strong>The decision</strong>, one sentence, and what it authorises — including &quot;authorises nothing\ndestructive&quot; when that is the truth.</li>\n<li><strong>Adversarial concessions</strong>, quoted, each naming the artifact that produced it. A\nconceded claim is recorded <em>conceded</em>, not <em>validated</em>; the difference matters to whoever\nre-opens this.</li>\n<li><strong>Marked assumptions.</strong> Every claim depending on an unanswered question is marked\nassumption-dependent, with the question, the default taken, and the direction the answer\nwould move the conclusion.</li>\n<li><strong>Open questions</strong>, with the blocking one labelled as blocking.</li>\n<li><strong>The evidence index</strong>: every load-bearing citation as <code>path:line</code>, the sha it was read\nat, and the result counts of the queries behind it. This is what makes the record\nre-checkable a month later against a moved tree.</li>\n<li><strong>A closing paragraph titled &quot;what this run could not see&quot;</strong> — surfaces not covered,\ntools unavailable, questions only a production observation could settle. It closes the\nrecord; there is no sixth heading. It is a boundary, not a hedge — and the paragraph a\nreader deciding how far to trust the rest will go looking for.</li>\n</ul>\n<h3 id=\"the-short-form\">The short form</h3>\n<p>Unattended runs at the light band write four parts and stop:</p>\n<ol>\n<li>Header block and invocation.</li>\n<li>The complexity assessment — each signal&#39;s score, the observable that scored it, and\nthe resulting band.</li>\n<li>The decision, with its marked assumptions.</li>\n<li>What this run could not see.</li>\n</ol>\n<p>No contradiction table and no evidence index: a light-band run that produced either was\nmis-banded, and the fix is the band, not the record.</p>\n<h3 id=\"prohibitions\">Prohibitions</h3>\n<ul>\n<li><strong>No secret values.</strong> Variable and file names only. Records get committed, and a record\nis read by people who were not in the room.</li>\n<li><strong>No machine-absolute paths.</strong> Repository-relative only. An absolute path under a home\ndirectory leaks a username and stops resolving on any other machine.</li>\n<li><strong>No chain-of-thought, child transcripts, or raw logs.</strong> The record carries claims,\nevidence, verdicts and decisions. A transcript is volume, and it re-presents reasoning\nas if it were a finding.</li>\n<li><strong>Minimal personal-data fragments.</strong> Names, addresses, ticket text, customer strings —\nonly where the finding genuinely cannot be stated without them, and preferably as a role.</li>\n<li><strong>No unmarked inference.</strong> Every claim carries its basis. Inference written flat, in the\nsame voice as measurement, is the failure this whole family exists to prevent.</li>\n<li><strong>No unearned benefit claims.</strong> &quot;Faster&quot;, &quot;safer&quot;, &quot;fixes it&quot; require something that\nmeasured it. Otherwise state what the code does and stop.</li>\n<li><strong>Never edit an earlier record.</strong> Append a new dated round section. Records are a\nhistory; a rewritten one is a claim about the past with no evidence behind it.</li>\n<li><strong><code>--document</code> must not change the answer.</strong> If knowing a record is coming changes what\ngets searched, what gets conceded, or how confident the conclusion sounds, the record has\nbecome the product. Decide first, write second.</li>\n</ul>\n<h3 id=\"a-worked-example\">A worked example</h3>\n<p>A normal-band investigation in a large monorepo, anonymised. Short deliberately — the\nshape matters more than the length.</p>\n<pre><code class=\"language-markdown\"># Which registry is authoritative for job names?\n\n- repo: `acme/platform` @ `3f9c1ab` — clean\n- run: investigate-codebase, normal band (scope 2, contradiction 2, size 1, ambiguity 0,\n  cost-of-being-wrong 1 = 6), 2026-08-26T09:14Z\n- question: two registries list job names; which one does the runtime read?\n\n## What was searched\n- `git grep -n &quot;registerJob(&quot; -- src worker` → 41 hits (round 1)\n- `git grep -nE &quot;jobs\\.(json|ts)&quot; -- .` → 6 hits (round 1)\n- read: the generated job registry page, and `worker/boot.ts`\n- not searched: the deploy pipeline&#39;s own manifests — not readable from this checkout\n\n## Who searched it\n- child A — searcher, mid tier, by-surface (`src/`), given the question only\n- child B — searcher, mid tier, by-runtime-evidence, forbidden from reading source,\n  given boot output only\n- reconciler — mid tier, re-read every cited hit; A and B could not see each other\n\n## What each found\n- A: `worker/boot.ts:22` imports `jobs.generated.ts` — basis measured\n- B: boot output names 41 jobs, against the 46 listed in the generated page — basis measured\n- not_found: no runtime read of the generated page. Control: `git grep -n &quot;atlas&quot; -- worker`\n  → 3 hits, so the pattern matches in that path and the absence is real. Control fired.\n- discarded: `tools/sync-jobs.ts` — writes the page, never read at runtime; rejected\n  after reading it, not after reading its name\n- discarded: 5 of the 41 `registerJob(` hits are test fixtures, not registrations\n\n## How it reconciled\n| claim | source A | source B | evidence A | evidence B | what each evidence CAN prove | verdict | residual |\n|---|---|---|---|---|---|---|---|\n| the generated page is authoritative | its own header | boot output | a doc asserting intent | 41 booted vs 46 listed | doc proves intent; output proves behaviour | refuted | the 5 extra rows are unexplained |\n\nRuntime observation outranks the doc&#39;s own claim. The reconciler re-read all 41\n`registerJob(` sites rather than trusting a counted summary; that is where the 5 fixtures\nsurfaced.\n\n## What was decided and why\n- Decision: `jobs.generated.ts` is authoritative at runtime; the generated page has drifted\n  by five entries. Authorises nothing destructive.\n- Concession: the refuter conceded after reading `worker/boot.ts:22` — recorded conceded,\n  not independently validated.\n- Assumption (marked): the deployed image boots the same entrypoint as local. Unanswered;\n  default taken is yes. If false, the drift count is wrong in an unknown direction.\n- Open question (non-blocking): what produced the five extra rows?\n- Evidence index: `worker/boot.ts:22` @ `3f9c1ab`; `jobs.generated.ts` @ `3f9c1ab`;\n  `git grep -n &quot;registerJob(&quot; -- src worker` → 41.\n\nWhat this run could not see: the deploy pipeline manifests, any environment whose\nentrypoint differs from local, and job registration that happens per-request rather than\nat boot.\n</code></pre>\n<h3 id=\"in-body-core-copy-verbatim\">In-body core (copy verbatim)</h3>\n<p>Every skill that supports <code>--document</code> embeds the block below in its own body, so the\nconvention survives a reader who never opens this file. Copy it verbatim; the only\npermitted edit is substituting the skill&#39;s own name for <code>&lt;skill-name&gt;</code>.</p>\n<pre><code class=\"language-markdown\">**Documenting the run.** Write a full record when the invocation carries `--document` (or\nan unmistakable phrase such as &quot;document the run&quot;), at `docs/&lt;skill-name&gt;/&lt;UTC-date&gt;-&lt;slug&gt;.md`\nin the host repository — and always when the run is unattended, in which case it goes to the\nharness scratch directory, never the repository, and its path is named in the final answer;\nif you cannot confirm a human will see and answer a question in THIS run, treat it as\nunattended. Attended with no token: stay silent, offering once only if the run ends with an\nunresolved contradiction or an open blocking question. Five headings, in order: What was\nsearched / Who searched it / What each found / How it reconciled / What was decided and why,\nclosing with what this run could not see. No secret values, machine-absolute paths, child\ntranscripts or raw logs; no unmarked inference or unearned benefit claims; never edit an\nearlier record, and never let writing one change the answer.\n</code></pre>\n<p>Follow it, in the same section, with the sentence below, word for word, linking the words\n<code>the run-record convention</code> to <code>references/documenting-the-run.md</code>, a path from the skill&#39;s\nroot, where <code>SKILL.md</code> sits:</p>\n<pre><code class=\"language-markdown\">Records are written per the run-record convention.\n</code></pre>\n<p>The path is given here as code, not as a link: a link resolves from the file that holds it,\nfenced or not, and from this file&#39;s folder that path names nothing.</p>\n","words":2722},{"path":"references/reconciling-evidence.md","slug":"reconciling-evidence","title":"Reconciling evidence","body":"# Reconciling evidence\n\nReconciliation is not summarising what the children said. It is deciding which of two\nincompatible statements is true, on evidence, and recording what the losing evidence could\nand could not have proved.\n\n## Re-read, never merge summaries\n\n**The reconciler opens the files the children cited.** It does not build the answer out of\ntheir prose. A child's summary of 41 hits is a claim about 41 hits; the hits themselves are\nthe evidence, and the difference is where substring false positives get laundered into\nconfirmed findings — a match inside a comment, a test fixture, a similarly-named symbol in\nan unrelated package. In one measured scenario the entire wrong answer came from a\nsubstring match that survived two summaries intact and was never re-opened.\n\nRe-read every hit that a load-bearing claim rests on. For a large hit set, re-read the ones\nthe claim actually needs and record how many were re-read against how many were reported.\n\n## The contradiction table\n\nEvery disagreement gets a row. These columns, in this order, with these names:\n\n```text\nclaim | source A | source B | evidence A | evidence B | what each evidence CAN prove | verdict | residual\n```\n\nVerdicts come from a closed set:\n\n| Verdict | Means |\n|---|---|\n| `confirmed` | The claim holds on evidence of a class that can carry it. |\n| `refuted` | The claim is false on evidence of a class that can carry it. |\n| `unresolved (needs X)` | Settleable, but not with what is in hand. Name X. |\n| `inconclusive` | The evidence gathered cannot decide it, and naming a missing X would be a guess. |\n\nThe column that does the work is **\"what each evidence CAN prove\"**. A design document\nproves intent. A log line proves behaviour. A test proves behaviour under the test's own\nsetup. A comment proves what somebody believed when they wrote it. Fill that column before\nthe verdict column, because a table that skips it settles disputes by tone — the more\nconfident-sounding child wins, which is not a property of evidence.\n\nWorked:\n\n| claim | source A | source B | evidence A | evidence B | what each evidence CAN prove | verdict | residual |\n|---|---|---|---|---|---|---|---|\n| the generated registry is authoritative | its own header | boot output | a doc asserting intent | 41 jobs booted against 46 listed | doc proves intent; output proves behaviour | refuted | the 5 extra rows are unexplained |\n| nothing outside the worker reads the flag | searcher, by-surface | derivers child | `git grep` over `services/` → 0, control fired | one cache key computed from it | absence over one surface; a derivation the first search's pattern could not match | refuted | other surfaces not searched |\n\n`residual` is not decoration. It is what remains true and unexplained after the verdict, and\nit is what the next reader needs in order to reopen the question honestly.\n\n### Run the CAN-prove column over your own negatives\n\nThe column exists to stop the louder child winning, but its cheapest use is on the evidence\n**nobody is arguing about** — the run's own searched negatives. A zero-hit search with a fired\ncontrol proves that the search worked and that the pattern is absent from the paths searched.\nIt does not prove that the thing is unreachable, unused, or never loaded: those are claims\nabout a graph, and a direct-reference search walks no edges at all.\n\n| the negative | what it CAN prove | what it does NOT prove |\n|---|---|---|\n| `git grep -n \"modules/report\"` → 0, control fired | no tracked file names that path literally | that nothing loads it — a barrel re-export, a registry keyed by string, or a glob import each reach it without naming it |\n| `git grep -n \"status\" -- app/` → 0, control fired | no file under `app/` mentions the field | that no screen renders it — the screen may read a mapped DTO field with another name |\n\nSo write the negative at the reach it has: **\"no reference to depth N\"**, with N and the hops\nthat were walked. A claim about reachability is admissible only from a walk to closure over a\nnamed boundary, or from a resolver that answers reachability directly; anything shallower stays\nthe depth-bounded statement, which is the one that is true.\n\n## Evidence classes\n\nClass breaks ties. **Reach decides admissibility.**\n\n1. **Production observation** — a log, a trace, a metric, a query against the live system.\n2. **Deterministic local measurement** — a command that was run and its output: a search\n   count, a build failure, a test result, a schema dump.\n3. **Code reading** — what the source says at a cited line, including generated artifacts.\n4. **Docs, comments, PR titles, tickets** — statements of intent by people.\n5. **Recollection** — anybody's memory, including the agent's own priors.\n\nA higher class wins a tie **only over the surface it actually touches**. A production log\nfrom one region does not outrank a code reading about another region; it does not reach\nthere. Reach is checked first: an inadmissible high-class observation loses to an admissible\nlow-class one, every time. State the reach when a class is used to break a tie.\n\n## Independence\n\nRecord, per confirmed claim, whether the agreeing sources were independent. Two children\nthat read the same file agree because it is one reading; the agreement adds nothing. Two\nchildren on different evidence classes — a code reading and a boot observation — corroborate.\nWrite which of the two happened; \"both children agreed\" without that distinction is the most\ncommon way a single unverified reading is presented as a consensus.\n\n## Confidence\n\nNever a percentage. Confidence is **basis × coverage**, stated in words.\n\n- **Basis** — `measured` or `inferred`, from the child contract.\n- **Coverage** — what was searched, plus what was provably not searched and the control that\n  proves it. Coverage without controls is an assertion about absence.\n\nSo: \"measured at three cited sites; two of five surfaces searched, the other three not\nsearched and recorded as such\" is a confidence statement. \"85% confident\" is a decoration —\nnobody computed it, and it cannot be checked or reproduced.\n\n### Reproduce the miss before explaining it\n\nA question of the form *why did this check not catch that?* has a mechanism as its answer, and\nmechanisms are the easiest thing in this skill to invent convincingly. The basis is `measured`\nonly when two things were done:\n\n1. **The exact input was located** — the record, the row, the argument, the payload the check\n   actually saw, at a citation, not a reconstruction of what it probably saw.\n2. **The deciding branch was traced** — the line that returned the verdict for that input,\n   quoted. Not the first condition that could plausibly have matched: the one that did.\n\nAnything short of both is `inferred`, and the sentence that states it says so. The failure this\nprevents: a run explained a skipped record by a null check in the guard's first branch, named\nthe real cause in passing and moved on; the field was populated, and a length threshold two\nbranches earlier had already returned. The plausible mechanism and the actual one were both in\nthe same function, and only one of them ran.\n\nWhere the input cannot be obtained — it lives in a system you cannot reach, or it is gone —\nsay that, mark the mechanism `inferred`, and name the probe that would settle it. An honest\n`inferred` costs the reader nothing; a `measured` that was never watched deciding costs them\nthe next hour.\n\n## Dated findings\n\n\"Was it true?\" and \"is it still true?\" are different questions, and a claim inherited from a\nticket, a pull request, a design doc, or a previous investigation answers only the first. In\nthe scenario suite this family is scored against, three of eight cases turn on exactly this\ngap: the reported behaviour was real and has since been fixed, or the cited fix landed and\nwas reverted, or the code moved and the citation now points at something else.\n\nEvery inherited claim gets a **current-state check** before it can be load-bearing:\n\n1. Resolve the citation at the current revision. Does the path still exist? Does the line\n   still contain what was described?\n2. Search history for the interval: `git log -S\"<fragment>\" -- <path>` and `git log --oneline\n   <since>..HEAD -- <path>`. A change in that window is a finding whether or not it is the\n   answer.\n3. Where the claim is about behaviour rather than code, ask what observation would show it\n   still happening, and say so if that observation is unavailable.\n4. Mark the claim with the revision it was checked at. A claim dated to a sha is re-checkable\n   later; an undated one has to be re-investigated from scratch.\n\nA claim that fails its current-state check is not deleted — it is recorded as *was true at\n`<sha>`, not true at HEAD*, with what changed. That difference is frequently the answer.\n\n## The stop rule\n\nStop when **all four** conditions hold:\n\n1. Every load-bearing claim is cited at the evidence class it requires — behaviour claims on\n   observation or measurement, not on a comment.\n2. No `unresolved` row remains that the answer depends on.\n3. The last round changed no verdict.\n4. Every load-bearing `not_found` has a control, and the control fired.\n\nPlus a hard round budget: **2 rounds at normal, 3 at deep.** The budget is a ceiling, not a\ntarget; condition 3 usually fires first.\n\nWhen the budget runs out with a condition unmet, **deliver anyway** — with the open rows\nvisible in the answer and the unmet condition named in one sentence. An investigation that\nruns past its budget in search of a clean finish spends real money to hide the one fact the\nreader most needs: that something is still open. \"Delivered at the round cap with one\nunresolved row: whether the second registry is read at deploy time (needs a deploy-log\nobservation)\" is a better answer than a confident one.\n","bodyHtml":"<h2 id=\"reconciling-evidence\">Reconciling evidence</h2>\n<p>Reconciliation is not summarising what the children said. It is deciding which of two\nincompatible statements is true, on evidence, and recording what the losing evidence could\nand could not have proved.</p>\n<h3 id=\"re-read-never-merge-summaries\">Re-read, never merge summaries</h3>\n<p><strong>The reconciler opens the files the children cited.</strong> It does not build the answer out of\ntheir prose. A child&#39;s summary of 41 hits is a claim about 41 hits; the hits themselves are\nthe evidence, and the difference is where substring false positives get laundered into\nconfirmed findings — a match inside a comment, a test fixture, a similarly-named symbol in\nan unrelated package. In one measured scenario the entire wrong answer came from a\nsubstring match that survived two summaries intact and was never re-opened.</p>\n<p>Re-read every hit that a load-bearing claim rests on. For a large hit set, re-read the ones\nthe claim actually needs and record how many were re-read against how many were reported.</p>\n<h3 id=\"the-contradiction-table\">The contradiction table</h3>\n<p>Every disagreement gets a row. These columns, in this order, with these names:</p>\n<pre><code class=\"language-text\">claim | source A | source B | evidence A | evidence B | what each evidence CAN prove | verdict | residual\n</code></pre>\n<p>Verdicts come from a closed set:</p>\n<table>\n<thead>\n<tr>\n<th>Verdict</th>\n<th>Means</th>\n</tr>\n</thead>\n<tbody><tr>\n<td><code>confirmed</code></td>\n<td>The claim holds on evidence of a class that can carry it.</td>\n</tr>\n<tr>\n<td><code>refuted</code></td>\n<td>The claim is false on evidence of a class that can carry it.</td>\n</tr>\n<tr>\n<td><code>unresolved (needs X)</code></td>\n<td>Settleable, but not with what is in hand. Name X.</td>\n</tr>\n<tr>\n<td><code>inconclusive</code></td>\n<td>The evidence gathered cannot decide it, and naming a missing X would be a guess.</td>\n</tr>\n</tbody></table>\n<p>The column that does the work is <strong>&quot;what each evidence CAN prove&quot;</strong>. A design document\nproves intent. A log line proves behaviour. A test proves behaviour under the test&#39;s own\nsetup. A comment proves what somebody believed when they wrote it. Fill that column before\nthe verdict column, because a table that skips it settles disputes by tone — the more\nconfident-sounding child wins, which is not a property of evidence.</p>\n<p>Worked:</p>\n<table>\n<thead>\n<tr>\n<th>claim</th>\n<th>source A</th>\n<th>source B</th>\n<th>evidence A</th>\n<th>evidence B</th>\n<th>what each evidence CAN prove</th>\n<th>verdict</th>\n<th>residual</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>the generated registry is authoritative</td>\n<td>its own header</td>\n<td>boot output</td>\n<td>a doc asserting intent</td>\n<td>41 jobs booted against 46 listed</td>\n<td>doc proves intent; output proves behaviour</td>\n<td>refuted</td>\n<td>the 5 extra rows are unexplained</td>\n</tr>\n<tr>\n<td>nothing outside the worker reads the flag</td>\n<td>searcher, by-surface</td>\n<td>derivers child</td>\n<td><code>git grep</code> over <code>services/</code> → 0, control fired</td>\n<td>one cache key computed from it</td>\n<td>absence over one surface; a derivation the first search&#39;s pattern could not match</td>\n<td>refuted</td>\n<td>other surfaces not searched</td>\n</tr>\n</tbody></table>\n<p><code>residual</code> is not decoration. It is what remains true and unexplained after the verdict, and\nit is what the next reader needs in order to reopen the question honestly.</p>\n<h4 id=\"run-the-can-prove-column-over-your-own-negatives\">Run the CAN-prove column over your own negatives</h4>\n<p>The column exists to stop the louder child winning, but its cheapest use is on the evidence\n<strong>nobody is arguing about</strong> — the run&#39;s own searched negatives. A zero-hit search with a fired\ncontrol proves that the search worked and that the pattern is absent from the paths searched.\nIt does not prove that the thing is unreachable, unused, or never loaded: those are claims\nabout a graph, and a direct-reference search walks no edges at all.</p>\n<table>\n<thead>\n<tr>\n<th>the negative</th>\n<th>what it CAN prove</th>\n<th>what it does NOT prove</th>\n</tr>\n</thead>\n<tbody><tr>\n<td><code>git grep -n &quot;modules/report&quot;</code> → 0, control fired</td>\n<td>no tracked file names that path literally</td>\n<td>that nothing loads it — a barrel re-export, a registry keyed by string, or a glob import each reach it without naming it</td>\n</tr>\n<tr>\n<td><code>git grep -n &quot;status&quot; -- app/</code> → 0, control fired</td>\n<td>no file under <code>app/</code> mentions the field</td>\n<td>that no screen renders it — the screen may read a mapped DTO field with another name</td>\n</tr>\n</tbody></table>\n<p>So write the negative at the reach it has: <strong>&quot;no reference to depth N&quot;</strong>, with N and the hops\nthat were walked. A claim about reachability is admissible only from a walk to closure over a\nnamed boundary, or from a resolver that answers reachability directly; anything shallower stays\nthe depth-bounded statement, which is the one that is true.</p>\n<h3 id=\"evidence-classes\">Evidence classes</h3>\n<p>Class breaks ties. <strong>Reach decides admissibility.</strong></p>\n<ol>\n<li><strong>Production observation</strong> — a log, a trace, a metric, a query against the live system.</li>\n<li><strong>Deterministic local measurement</strong> — a command that was run and its output: a search\ncount, a build failure, a test result, a schema dump.</li>\n<li><strong>Code reading</strong> — what the source says at a cited line, including generated artifacts.</li>\n<li><strong>Docs, comments, PR titles, tickets</strong> — statements of intent by people.</li>\n<li><strong>Recollection</strong> — anybody&#39;s memory, including the agent&#39;s own priors.</li>\n</ol>\n<p>A higher class wins a tie <strong>only over the surface it actually touches</strong>. A production log\nfrom one region does not outrank a code reading about another region; it does not reach\nthere. Reach is checked first: an inadmissible high-class observation loses to an admissible\nlow-class one, every time. State the reach when a class is used to break a tie.</p>\n<h3 id=\"independence\">Independence</h3>\n<p>Record, per confirmed claim, whether the agreeing sources were independent. Two children\nthat read the same file agree because it is one reading; the agreement adds nothing. Two\nchildren on different evidence classes — a code reading and a boot observation — corroborate.\nWrite which of the two happened; &quot;both children agreed&quot; without that distinction is the most\ncommon way a single unverified reading is presented as a consensus.</p>\n<h3 id=\"confidence\">Confidence</h3>\n<p>Never a percentage. Confidence is <strong>basis × coverage</strong>, stated in words.</p>\n<ul>\n<li><strong>Basis</strong> — <code>measured</code> or <code>inferred</code>, from the child contract.</li>\n<li><strong>Coverage</strong> — what was searched, plus what was provably not searched and the control that\nproves it. Coverage without controls is an assertion about absence.</li>\n</ul>\n<p>So: &quot;measured at three cited sites; two of five surfaces searched, the other three not\nsearched and recorded as such&quot; is a confidence statement. &quot;85% confident&quot; is a decoration —\nnobody computed it, and it cannot be checked or reproduced.</p>\n<h4 id=\"reproduce-the-miss-before-explaining-it\">Reproduce the miss before explaining it</h4>\n<p>A question of the form <em>why did this check not catch that?</em> has a mechanism as its answer, and\nmechanisms are the easiest thing in this skill to invent convincingly. The basis is <code>measured</code>\nonly when two things were done:</p>\n<ol>\n<li><strong>The exact input was located</strong> — the record, the row, the argument, the payload the check\nactually saw, at a citation, not a reconstruction of what it probably saw.</li>\n<li><strong>The deciding branch was traced</strong> — the line that returned the verdict for that input,\nquoted. Not the first condition that could plausibly have matched: the one that did.</li>\n</ol>\n<p>Anything short of both is <code>inferred</code>, and the sentence that states it says so. The failure this\nprevents: a run explained a skipped record by a null check in the guard&#39;s first branch, named\nthe real cause in passing and moved on; the field was populated, and a length threshold two\nbranches earlier had already returned. The plausible mechanism and the actual one were both in\nthe same function, and only one of them ran.</p>\n<p>Where the input cannot be obtained — it lives in a system you cannot reach, or it is gone —\nsay that, mark the mechanism <code>inferred</code>, and name the probe that would settle it. An honest\n<code>inferred</code> costs the reader nothing; a <code>measured</code> that was never watched deciding costs them\nthe next hour.</p>\n<h3 id=\"dated-findings\">Dated findings</h3>\n<p>&quot;Was it true?&quot; and &quot;is it still true?&quot; are different questions, and a claim inherited from a\nticket, a pull request, a design doc, or a previous investigation answers only the first. In\nthe scenario suite this family is scored against, three of eight cases turn on exactly this\ngap: the reported behaviour was real and has since been fixed, or the cited fix landed and\nwas reverted, or the code moved and the citation now points at something else.</p>\n<p>Every inherited claim gets a <strong>current-state check</strong> before it can be load-bearing:</p>\n<ol>\n<li>Resolve the citation at the current revision. Does the path still exist? Does the line\nstill contain what was described?</li>\n<li>Search history for the interval: <code>git log -S&quot;&lt;fragment&gt;&quot; -- &lt;path&gt;</code> and <code>git log --oneline &lt;since&gt;..HEAD -- &lt;path&gt;</code>. A change in that window is a finding whether or not it is the\nanswer.</li>\n<li>Where the claim is about behaviour rather than code, ask what observation would show it\nstill happening, and say so if that observation is unavailable.</li>\n<li>Mark the claim with the revision it was checked at. A claim dated to a sha is re-checkable\nlater; an undated one has to be re-investigated from scratch.</li>\n</ol>\n<p>A claim that fails its current-state check is not deleted — it is recorded as <em>was true at\n<code>&lt;sha&gt;</code>, not true at HEAD</em>, with what changed. That difference is frequently the answer.</p>\n<h3 id=\"the-stop-rule\">The stop rule</h3>\n<p>Stop when <strong>all four</strong> conditions hold:</p>\n<ol>\n<li>Every load-bearing claim is cited at the evidence class it requires — behaviour claims on\nobservation or measurement, not on a comment.</li>\n<li>No <code>unresolved</code> row remains that the answer depends on.</li>\n<li>The last round changed no verdict.</li>\n<li>Every load-bearing <code>not_found</code> has a control, and the control fired.</li>\n</ol>\n<p>Plus a hard round budget: <strong>2 rounds at normal, 3 at deep.</strong> The budget is a ceiling, not a\ntarget; condition 3 usually fires first.</p>\n<p>When the budget runs out with a condition unmet, <strong>deliver anyway</strong> — with the open rows\nvisible in the answer and the unmet condition named in one sentence. An investigation that\nruns past its budget in search of a clean finish spends real money to hide the one fact the\nreader most needs: that something is still open. &quot;Delivered at the round cap with one\nunresolved row: whether the second registry is read at deploy time (needs a deploy-log\nobservation)&quot; is a better answer than a confident one.</p>\n","words":1696},{"path":"references/worked-investigation.md","slug":"worked-investigation","title":"A worked investigation, end to end","body":"# A worked investigation, end to end\n\nOne normal-band run in an anonymised monorepo, from the ask to the delivered answer. It is\nshort on purpose: the shape is the lesson, not the length. The record this run would write\nis in the run-record convention's own worked example.\n\n## The ask\n\n> \"The job registry page is the source of truth for job names, right? I want to delete the\n> generated file — nothing reads it.\"\n\nTwo things are asserted, and both are checkable. That is a contradiction risk of 2 before a\nsingle search runs, and \"delete\" makes cost-of-being-wrong a 2.\n\n## 1. Score, then announce\n\n| Signal | Observable | Score |\n|---|---|---|\n| scope | `git grep -n \"registerJob(\" -- src worker \\| wc -l` → 41 hits in 18 files | 2 |\n| contradiction risk | the ask asserts authority *and* absence; both decide the answer | 2 |\n| size + toolchains | 14 packages, 2 build systems | 1 |\n| ambiguity | \"the registry\" resolves to two artifacts | 1 |\n| cost of being wrong | authorises a deletion | 2 |\n\nTotal 8 → deep. (It would have reached normal on the cost override alone.) Size is 1 under the\ncap for a question that names its artifacts; scored 2 on the repository instead, the total is 9\nand the band is the same — the band here is carried by contradiction and cost, not by size.\n\n```text\ninvestigate-codebase · deep band — scope 2 (41 hits/18 files), contradiction 2 (authority and\nabsence both asserted), size 1 (14 packages, 2 toolchains), ambiguity 1 (\"the registry\" → 2\nartifacts), cost-of-being-wrong 2 (authorises a deletion) = 8 → 4 children + reconciler,\nadversarial pair, 3 rounds max\n```\n\nPrinted before anything was dispatched. Nothing waited on it.\n\n## 2. One blocking question, batched\n\n\"The registry\" is two artifacts, and the two readings imply different work — so it survives\nboth tests and is asked. The deletion authorisation is the second must-ask, folded into the\nsame message.\n\n```text\nBLOCKING — \"the registry\" is either the generated page or jobs.generated.ts. Which do you\n           mean to delete? I will not act on the deletion either way; this run produces the\n           evidence for it.\nAlso (defaults in brackets): count test fixtures as registrations? [no]\n```\n\n## 3. Decompose where children can disagree\n\n- **A — by-surface** over `src/`: who calls `registerJob(`.\n- **B — by-runtime-evidence**, forbidden from reading source: what the boot output names.\n- **C — by-data-flow, derivers**: what computes something *from* job names — cache keys,\n  metrics labels, deploy manifests.\n- **D — by-history**: when the generated file appeared, and what it replaced.\n\nA and B can disagree, and their disagreement is the answer. C exists because writers and\nreaders would both have missed a derivation.\n\n## 4. What came back\n\n- **A**: `worker/boot.ts:22` imports `jobs.generated.ts` — measured.\n- **B**: boot output names 41 jobs; the page lists 46 — measured, and from a class no code\n  reading could produce.\n- **C**: one metrics label is computed from the generated file's export — measured. This is\n  the finding a writers-and-readers split loses.\n- **D**: the generated file replaced a hand-maintained list eleven months ago — measured.\n- **`not_found`**: no runtime read of the *page*. Control: `git grep -n \"atlas\" -- worker`\n  → 3 hits, so the pattern and pathspec both work in that tree. **Control fired**, so\n  \"absent\" is admissible.\n- **Discarded**: `tools/sync-jobs.ts` — writes the page, never read at runtime; rejected\n  after opening it, not after reading its name. Five of A's 41 hits are test fixtures.\n\n## 5. Reconcile\n\nThe reconciler re-read all 41 cited hits rather than trusting A's count — which is where the\nfive fixtures surfaced.\n\n| claim | source A | source B | evidence A | evidence B | what each evidence CAN prove | verdict | residual |\n|---|---|---|---|---|---|---|---|\n| the page is authoritative | the page's header | boot output | a doc asserting intent | 41 booted vs 46 listed | doc proves intent; output proves behaviour | refuted | the 5 extra rows are unexplained |\n| nothing reads the generated file | the ask | children A and C | recollection | an import at `boot.ts:22` and a metrics derivation | recollection proves belief; the import proves a read | refuted | — |\n\nIndependence: A and C are both code readings and were not counted as corroboration of each\nother; B is a different class, and its agreement with A is what carries the first row.\n\n## 6. Adversaries (deep band)\n\n- **Refuter**, given claims and citations only: opened `worker/boot.ts:22` and **conceded**,\n  naming the artifact. Recorded *conceded*, not validated.\n- **Coverage auditor**, given the question and the manifests but not the answer: `INCOMPLETE`\n  — the deploy configuration was never read. Probe named. Not available from this checkout,\n  so the row is carried into what this run could not see rather than closed.\n\n## 7. Stop\n\nConditions 1, 2 and 4 hold; round 2 changed no verdict (condition 3). Stop at round 2 of a\n3-round budget, with the auditor's uncovered surface stated.\n\n## 8. The answer\n\n> **Both premises are false, and the deletion is unsafe as scoped.** The generated file is\n> read at runtime (`worker/boot.ts:22`) and a metrics label is derived from it; the page is\n> the one that has drifted, by five entries. Deleting the generated file breaks boot.\n>\n> Confidence: measured at four cited sites, corroborated across two evidence classes (code\n> reading and boot output). Coverage: `src/`, `worker/`, and boot output searched; the page's\n> runtime absence is admissible — the control fired. The deploy configuration was not read\n> and is not readable from this checkout.\n>\n> Open (non-blocking): what produced the five extra page rows.\n>\n> What this run could not see: the deploy configuration's own manifests, any environment\n> whose entrypoint differs from local, and registration that happens per request rather than\n> at boot.\n\nNote what the answer does **not** do: it does not delete anything, and it does not say\n\"safe to delete once you check the deploy config\". It states what was measured, and leaves\nthe irreversible act to a consented step.\n","bodyHtml":"<h2 id=\"a-worked-investigation-end-to-end\">A worked investigation, end to end</h2>\n<p>One normal-band run in an anonymised monorepo, from the ask to the delivered answer. It is\nshort on purpose: the shape is the lesson, not the length. The record this run would write\nis in the run-record convention&#39;s own worked example.</p>\n<h3 id=\"the-ask\">The ask</h3>\n<blockquote>\n<p>&quot;The job registry page is the source of truth for job names, right? I want to delete the\ngenerated file — nothing reads it.&quot;</p>\n</blockquote>\n<p>Two things are asserted, and both are checkable. That is a contradiction risk of 2 before a\nsingle search runs, and &quot;delete&quot; makes cost-of-being-wrong a 2.</p>\n<h3 id=\"1-score-then-announce\">1. Score, then announce</h3>\n<table>\n<thead>\n<tr>\n<th>Signal</th>\n<th>Observable</th>\n<th>Score</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>scope</td>\n<td><code>git grep -n &quot;registerJob(&quot; -- src worker | wc -l</code> → 41 hits in 18 files</td>\n<td>2</td>\n</tr>\n<tr>\n<td>contradiction risk</td>\n<td>the ask asserts authority <em>and</em> absence; both decide the answer</td>\n<td>2</td>\n</tr>\n<tr>\n<td>size + toolchains</td>\n<td>14 packages, 2 build systems</td>\n<td>1</td>\n</tr>\n<tr>\n<td>ambiguity</td>\n<td>&quot;the registry&quot; resolves to two artifacts</td>\n<td>1</td>\n</tr>\n<tr>\n<td>cost of being wrong</td>\n<td>authorises a deletion</td>\n<td>2</td>\n</tr>\n</tbody></table>\n<p>Total 8 → deep. (It would have reached normal on the cost override alone.) Size is 1 under the\ncap for a question that names its artifacts; scored 2 on the repository instead, the total is 9\nand the band is the same — the band here is carried by contradiction and cost, not by size.</p>\n<pre><code class=\"language-text\">investigate-codebase · deep band — scope 2 (41 hits/18 files), contradiction 2 (authority and\nabsence both asserted), size 1 (14 packages, 2 toolchains), ambiguity 1 (&quot;the registry&quot; → 2\nartifacts), cost-of-being-wrong 2 (authorises a deletion) = 8 → 4 children + reconciler,\nadversarial pair, 3 rounds max\n</code></pre>\n<p>Printed before anything was dispatched. Nothing waited on it.</p>\n<h3 id=\"2-one-blocking-question-batched\">2. One blocking question, batched</h3>\n<p>&quot;The registry&quot; is two artifacts, and the two readings imply different work — so it survives\nboth tests and is asked. The deletion authorisation is the second must-ask, folded into the\nsame message.</p>\n<pre><code class=\"language-text\">BLOCKING — &quot;the registry&quot; is either the generated page or jobs.generated.ts. Which do you\n           mean to delete? I will not act on the deletion either way; this run produces the\n           evidence for it.\nAlso (defaults in brackets): count test fixtures as registrations? [no]\n</code></pre>\n<h3 id=\"3-decompose-where-children-can-disagree\">3. Decompose where children can disagree</h3>\n<ul>\n<li><strong>A — by-surface</strong> over <code>src/</code>: who calls <code>registerJob(</code>.</li>\n<li><strong>B — by-runtime-evidence</strong>, forbidden from reading source: what the boot output names.</li>\n<li><strong>C — by-data-flow, derivers</strong>: what computes something <em>from</em> job names — cache keys,\nmetrics labels, deploy manifests.</li>\n<li><strong>D — by-history</strong>: when the generated file appeared, and what it replaced.</li>\n</ul>\n<p>A and B can disagree, and their disagreement is the answer. C exists because writers and\nreaders would both have missed a derivation.</p>\n<h3 id=\"4-what-came-back\">4. What came back</h3>\n<ul>\n<li><strong>A</strong>: <code>worker/boot.ts:22</code> imports <code>jobs.generated.ts</code> — measured.</li>\n<li><strong>B</strong>: boot output names 41 jobs; the page lists 46 — measured, and from a class no code\nreading could produce.</li>\n<li><strong>C</strong>: one metrics label is computed from the generated file&#39;s export — measured. This is\nthe finding a writers-and-readers split loses.</li>\n<li><strong>D</strong>: the generated file replaced a hand-maintained list eleven months ago — measured.</li>\n<li><strong><code>not_found</code></strong>: no runtime read of the <em>page</em>. Control: <code>git grep -n &quot;atlas&quot; -- worker</code>\n→ 3 hits, so the pattern and pathspec both work in that tree. <strong>Control fired</strong>, so\n&quot;absent&quot; is admissible.</li>\n<li><strong>Discarded</strong>: <code>tools/sync-jobs.ts</code> — writes the page, never read at runtime; rejected\nafter opening it, not after reading its name. Five of A&#39;s 41 hits are test fixtures.</li>\n</ul>\n<h3 id=\"5-reconcile\">5. Reconcile</h3>\n<p>The reconciler re-read all 41 cited hits rather than trusting A&#39;s count — which is where the\nfive fixtures surfaced.</p>\n<table>\n<thead>\n<tr>\n<th>claim</th>\n<th>source A</th>\n<th>source B</th>\n<th>evidence A</th>\n<th>evidence B</th>\n<th>what each evidence CAN prove</th>\n<th>verdict</th>\n<th>residual</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>the page is authoritative</td>\n<td>the page&#39;s header</td>\n<td>boot output</td>\n<td>a doc asserting intent</td>\n<td>41 booted vs 46 listed</td>\n<td>doc proves intent; output proves behaviour</td>\n<td>refuted</td>\n<td>the 5 extra rows are unexplained</td>\n</tr>\n<tr>\n<td>nothing reads the generated file</td>\n<td>the ask</td>\n<td>children A and C</td>\n<td>recollection</td>\n<td>an import at <code>boot.ts:22</code> and a metrics derivation</td>\n<td>recollection proves belief; the import proves a read</td>\n<td>refuted</td>\n<td>—</td>\n</tr>\n</tbody></table>\n<p>Independence: A and C are both code readings and were not counted as corroboration of each\nother; B is a different class, and its agreement with A is what carries the first row.</p>\n<h3 id=\"6-adversaries-deep-band\">6. Adversaries (deep band)</h3>\n<ul>\n<li><strong>Refuter</strong>, given claims and citations only: opened <code>worker/boot.ts:22</code> and <strong>conceded</strong>,\nnaming the artifact. Recorded <em>conceded</em>, not validated.</li>\n<li><strong>Coverage auditor</strong>, given the question and the manifests but not the answer: <code>INCOMPLETE</code>\n— the deploy configuration was never read. Probe named. Not available from this checkout,\nso the row is carried into what this run could not see rather than closed.</li>\n</ul>\n<h3 id=\"7-stop\">7. Stop</h3>\n<p>Conditions 1, 2 and 4 hold; round 2 changed no verdict (condition 3). Stop at round 2 of a\n3-round budget, with the auditor&#39;s uncovered surface stated.</p>\n<h3 id=\"8-the-answer\">8. The answer</h3>\n<blockquote>\n<p><strong>Both premises are false, and the deletion is unsafe as scoped.</strong> The generated file is\nread at runtime (<code>worker/boot.ts:22</code>) and a metrics label is derived from it; the page is\nthe one that has drifted, by five entries. Deleting the generated file breaks boot.</p>\n<p>Confidence: measured at four cited sites, corroborated across two evidence classes (code\nreading and boot output). Coverage: <code>src/</code>, <code>worker/</code>, and boot output searched; the page&#39;s\nruntime absence is admissible — the control fired. The deploy configuration was not read\nand is not readable from this checkout.</p>\n<p>Open (non-blocking): what produced the five extra page rows.</p>\n<p>What this run could not see: the deploy configuration&#39;s own manifests, any environment\nwhose entrypoint differs from local, and registration that happens per request rather than\nat boot.</p>\n</blockquote>\n<p>Note what the answer does <strong>not</strong> do: it does not delete anything, and it does not say\n&quot;safe to delete once you check the deploy config&quot;. It states what was measured, and leaves\nthe irreversible act to a consented step.</p>\n","words":1047}],"body":"# Investigate a codebase\n\nAsk an agent a question about a codebase and you get an answer in the same confident\nregister whether it read four files or none. The prose does not carry the difference, so\nthe reader cannot tell a measured claim from a plausible one, and the failure only surfaces\nlater — in the migration that dropped a column something still read, in the deletion that\nbroke boot, in the \"nobody calls this\" that was a search with a typo in it.\n\nThis skill produces an answer whose evidence can be checked. It scores how much the question\nis worth before spending anything, splits the search so that the parts can genuinely\ndisagree, refuses to call a zero-hit search \"absent\" without a control that fired, settles\ncontradictions in a table instead of by tone, and closes with what it did not look at.\n\nIt reads. It writes nothing to the repository unless a run record is explicitly asked for.\n\n## What separates an answer from a guess\n\nFive mechanics, each of which exists because its absence produced a wrong answer somebody\nacted on:\n\n- **A control on every negative.** No hits means either \"absent\" or \"the search never\n  worked\", and only a control tells you which.\n- **An evidence class on every claim.** A comment proves what someone believed; a log proves\n  what happened. Both read as facts in prose.\n- **Coverage stated with the answer.** What was searched, and what was not — the second half\n  is the half that gets dropped.\n- **Independence recorded.** Two children reading the same file are one reading, counted\n  twice. Agreement between them is not corroboration.\n- **A date on every inherited claim.** \"Was it true?\" and \"is it still true?\" are different\n  questions, and tickets only answer the first.\n\nComposition: `derive-codebase-context` builds the durable, regenerable, CI-gated artifacts —\nregistries, atlases, boundary rules; this skill **reads** to answer one question now and\nbuilds nothing. Where those artifacts exist, read them and open the file they cite instead\nof re-deriving by grep. Routing identifiers, profiles, context packaging and escalation\nbelong to `model-routing`; child visibility and lifecycle evidence to `agent-lifecycle`.\nInstall the companions with `npx skills add crissmoldovan/agent-skills`.\n\n## When to Use\n\n- A question about the code needs an answer someone will act on, and being wrong is not free.\n- The premise looks shaky: a ticket, a comment, or a colleague asserts a cause, and the\n  answer depends on whether that attribution holds.\n- A search came back empty and the conclusion \"nothing does this\" is about to be load-bearing.\n- Two sources disagree — a registry against a runtime, a doc against the code, two people.\n- An inherited claim needs a current-state check before it is built on.\n- An answer needs to survive review by someone who will ask \"how do you know?\".\n\nDo not use it to **build** repository context artifacts — that is `derive-codebase-context`,\nand this skill's boundary is exactly the inverse of it. Do not use it to map what a proposed\nset of changes would hit; `blast-area` owns that, and calls this skill for the searching. Do\nnot use it to run a problem report end to end through a fix — that is `resolve-problem-report`.\nDo not use it to describe a change that already happened; `describe-changes` reads the diff.\nDo not use its deep-mode adversaries as a code review: they attack an answer, not a diff, and\nthe review loop over a real pull request belongs to `request-blocks-review` and `blocks`.\n\n## Prerequisites\n\n1. **A question that can be answered wrong.** One sentence, with the nouns resolved to things\n   you can point at, and the consequence of a wrong answer stated.\n   **Complete when:** you can say what a wrong answer would cause someone to do.\n2. **A readable checkout at a named revision.** The sha, and whether the tree is dirty. A\n   finding measured against uncommitted work describes a state nobody else has.\n   **Complete when:** the revision and dirty state are recorded.\n3. **The repository's existing derived artifacts located.** Generated registries, an atlas, a\n   language server, an import-boundary config — or their confirmed absence.\n   **Complete when:** each is in hand or recorded as absent.\n4. **The harness's capabilities declared.** Can it dispatch children? Can it withhold parent\n   context from them? Is model choice available?\n   **Complete when:** every \"no\" has its degradation named, ready to state in the answer.\n5. **Attendance declared, conservatively.** If you cannot confirm a human will see and answer\n   a question in this run, it is unattended — which changes both the question policy and\n   whether a run record is written.\n   **Complete when:** the run is marked attended or unattended before the first question.\n\n## Procedure\n\n1. **Score the rubric before spending anything.** Five signals, each 0–2 against an\n   observable you actually ran. Sum: **0–2 light, 3–7 normal, 8+ deep.** Anchors, probe\n   commands and worked scoring are in [the complexity rubric](references/complexity-rubric.md).\n\n   | Signal | Observable probe | 0 | 1 | 2 |\n   |---|---|---|---|---|\n   | Scope | hits and files **for the artifact the question names**, never repo-wide for the term | one file or one definition site | one package or surface | crosses surfaces, or the count is unknown until you search |\n   | Contradiction risk | does the ask assert a checkable attribution? | pure lookup | asserted, single source | two sources disagree, or the attribution decides the answer |\n   | Repo size + toolchains | `git ls-files \\| wc -l`; build manifests — **at most 1 where the question names its artifact** | one package, one build | a few packages, two toolchains | monorepo, >2 toolchains, generated code, several deploy targets |\n   | Ambiguity | do two plausible referents exist? | every noun resolves | one obvious, one unlikely | two plausible, leading different ways |\n   | Cost of being wrong | what does the answer authorise? | informs a conversation | informs a change review would catch | authorises a migration, deletion, production write, outbound message, or ticket close |\n\n   Score scope and size on **what the question names**, not on how large the repository is: a\n   question naming one artifact is not a big question because it lives in a monorepo. Two\n   overrides and one start rule: **cost-of-being-wrong = 2 forces at least normal**, whatever\n   the total; **re-score after pass 1**, because the first pass changes its own inputs, and a\n   re-score that moves the band **down** is exactly as legitimate as one that moves it up; and\n   **a question that names one file or one function and asks *why* or *how* starts light** —\n   the boundary round-up does not fire on it before pass 1, the re-score after pass 1 is then\n   mandatory, and only cost-of-being-wrong = 2 outranks the start. Otherwise a total exactly\n   one point below a threshold **rounds up** one band and says so — a 2 becomes normal, a 7\n   becomes deep. The thresholds are tunable and are calibrated against a scored scenario suite\n   that penalises needless escalation.\n\n   **Score from the QUESTION's shape** — the artifact it names, the attribution it asserts, the\n   referents it leaves open, what its answer authorises — never from the size of the repository\n   or from how much apparatus the run would enjoy using. Over-escalation is a scored failure,\n   not diligence. Three calibrations, each pinning a reading observed runs got wrong upward:\n\n   | The ask | Scores | Band |\n   |---|---|---|\n   | change a function with exactly two call sites; one authoritative-looking attribution to check | scope 1, contradiction 1, size ≤1, ambiguity 0–1, cost 1 = 4–5 | **normal**, never deep |\n   | a finite, enumerable triage list, each item the same two-question check | scope 1, contradiction 0, size 1 (capped), ambiguity 0, cost 1 = 3 | **normal** in a repository of any size — scored 2 on the repo it is 4, still normal |\n   | why did this named detector miss this case | scope 0, contradiction 0, size 1 (capped), ambiguity 0, cost 1 = 2 | **light start** under the named-artifact rule; pass-1 re-score mandatory |\n\n2. **Map the band to roles, never to model names.**\n\n   | Band | Who works | Cap it buys |\n   |---|---|---|\n   | light | local tools and one cheap pass; **no driver is dispatched** | 1 round, no children |\n   | normal | parallel children on disjoint axes, plus a mid-tier reconciler | 2–4 children, 2 rounds |\n   | deep | the above, plus the adversarial pair; strongest tier judges only | 3 rounds, of which the adversaries run at most two |\n\n   Most questions are answered by a search and a file, and\n   **a top-tier driver is not the default**: routing every one to the strongest\n   model is the cost that makes people stop asking. Identifiers, profiles and\n   escalation rules are `model-routing`'s; do not restate them here. Degradation, stated in\n   the same breath as the band: **no subagents** — the same bands run as sequential passes,\n   and the announcement states the wall-clock cost; **no model choice** — the band controls\n   depth only.\n\n3. **Announce the band. Always, on one code path.** One line, printed **before the first\n   child is dispatched**, whether or not anyone is watching. Never ask which mode to run.\n\n   ```text\n   investigate-codebase · normal band — scope 2 (41 hits/18 files), contradiction 2 (two\n   registries disagree), size 1 (14 packages), ambiguity 0, cost-of-being-wrong 1 = 6\n   → 3 children + reconciler, 2 rounds max\n   ```\n\n   The line carries the **band**, **each signal's score with the observable that scored it**,\n   **any override applied**, and **the cap it buys** — fan-out width and round cap. At the\n   deep band add a priced estimate where the harness can produce one; never invent a figure.\n   A boundary round-up says so in the line (\"boundary: scored 2, rounding up to normal\"), and\n   so does a re-score after pass 1 — in either direction, a band that moves is announced again.\n   Overrides are user-initiated intents — \"go deep on this\", \"light is fine\" — which force a\n   re-score and a fresh announcement; the skill never solicits one. A cost-of-being-wrong of\n   2 never produces a mode-time question: it raises the floor and arms the consent gates at\n   the irreversible action, where consent belongs.\n\n4. **Read what the repo already derived, before searching for it.** Generated registries, an\n   atlas, a compiler-backed index: read the entry, then **open the file it cites** at the\n   current revision. A generated artifact is evidence of what its generator saw — code-reading\n   class, and stale-able. A citation that no longer resolves is a finding.\n\n5. **Decompose on an axis where the children CAN disagree — around the instance that was\n   named.** **THE NAMED-INSTANCE RULE: when the asker names an instance — this call site, this\n   run, this row, this file — open THAT instance before generalising to another of the same\n   shape.** A sibling instance is a second question; answering it produces prose that is\n   fluent, cited, and about something nobody asked. Generalise only after the named one has\n   been read, and say which one the finding came from. Where the named instance does not\n   exist, that is the finding.\n\n   **Where the subject is named by DESCRIPTION — \"a PR\", \"the ticket\", \"that migration\" —\n   enumerate the candidates before resolving it.** A description becomes an instance only when\n   exactly one thing matches, so count first: the pull requests touching this path, the tickets\n   with this title, the migrations at this version. More than one match and the choice is not\n   yours to make silently — **ask** when attended, and when unattended **cover each candidate,\n   or answer for one and say at the top which and why**. Silently taking the first plausible\n   match is the trap: two independent runs resolved \"a PR\" that way and investigated a\n   different pull request than the asker meant, with citations, at length.\n\n   Five axes, detailed with briefs in\n   [decomposition and the child contract](references/decomposition-and-children.md):\n\n   - **by-surface** — directory, package, deploy target, language.\n   - **by-symbol** — one **definition site** per child, **never a bare name**. In a monorepo\n     of roughly 2,500 TypeScript files, one measured pass found 184 exported names defined in\n     more than one file, the worst being the repo's own conventions: one handler name 271\n     times, another 209, a registry key 143. A child briefed with a bare name returns the\n     whole application.\n   - **by-data-flow** — writers / readers / **derivers**. The third bucket is the one that\n     gets dropped, and in one measured case the defect lived exactly there: writer and reader\n     both correct, the value transformed in between.\n   - **by-history** — commits, blame, reverts, the range where behaviour changed.\n   - **by-runtime-evidence** — a child **forbidden from reading code**, given boot output,\n     logs, or a schema dump. Its value is that its evidence is a different class; a child that\n     quietly opens the source has produced a second code reading and a false independence\n     signal.\n\n   If every child would read the same files, the axis is wrong: that is one reading billed\n   several times, and their agreement means nothing.\n\n6. **Brief every child with the same result contract.**\n\n   ```json\n   {\n     \"question\": \"the slice this child was asked\",\n     \"findings\": [{ \"claim\": \"…\", \"evidence\": \"path:line\", \"basis\": \"measured | inferred\", \"confidence\": \"basis x coverage, in words\" }],\n     \"searched\": [{ \"query\": \"verbatim\", \"tool\": \"git grep\", \"hits\": 41 }],\n     \"not_found\": [{ \"target\": \"…\", \"control\": \"the positive variant that was run\", \"control_fired\": true, \"reach\": \"no reference to depth N (<what was walked>) | closure over <boundary> | resolver: <name>\" }],\n     \"blockers\": [\"what this child could not do, and why\"]\n   }\n   ```\n\n   **THE CONTROL RULE: a zero-hit search is admissible as \"absent\" only when a control fired.\n   Otherwise it is recorded \"inconclusive.\"** A control is a deliberately positive variant of\n   the same search, run the same way, that returns hits — it proves the apparatus worked. The\n   canonical failure: `git grep -E '\\b…'` returns nothing and never could, because POSIX ERE\n   has no `\\b`. Read as absence, that is proof of a typo. Others in the reference: a pathspec\n   that excluded the answer, a file type git never tracked, `job_name` against `jobName`.\n\n   **THE TRANSITIVE-NEGATIVE RULE: a zero-hit direct-reference search proves the direct hop, and\n   one more hop proves two.** A claim about reachability or flow — \"cannot reach\", \"no path\",\n   \"never loaded\" — is admissible only from a walk to **closure over the relevant boundary**:\n   keep following what each reached surface references — imports, registrations, dynamic\n   lookups, re-exports — until the frontier stops growing or leaves the boundary you named. A\n   resolver that answers reachability directly (a language server's reference graph, a bundler's\n   module graph, an import-boundary checker) substitutes for the walk and is recorded as its\n   source. Anything less is recorded as **\"no reference to depth N\"**, naming N and what was\n   walked — which is true — and **never as \"no path\"**, which is not. The reconciler's\n   *what this evidence CAN prove* column is applied to **your own negatives**, not only to the\n   contradictions between children — a fired control proves the search worked, never that the\n   question it answered was the question asked.\n\n7. **Reconcile with a contradiction table — do not merge summaries.** The reconciler\n   **re-reads the cited hits** rather than building the answer out of children's prose;\n   substring false positives survive summaries intact. Columns, in this order:\n\n   ```text\n   claim | source A | source B | evidence A | evidence B | what each evidence CAN prove | verdict | residual\n   ```\n\n   Verdicts come from a closed set: `confirmed`, `refuted`, `unresolved (needs X)`,\n   `inconclusive`. Fill \"what each evidence CAN prove\" **before** the verdict, or the more\n   confident-sounding child wins, which is not a property of evidence. Break ties by evidence\n   class — **production observation > deterministic local measurement > code reading >\n   docs, comments and PR titles > recollection** — but **class breaks ties while reach decides\n   admissibility**: a high-class observation that does not touch the surface in question loses\n   to a low-class one that does. Record, per confirmed claim, whether the agreeing sources were\n   independent. Worked tables are in [reconciling evidence](references/reconciling-evidence.md).\n\n8. **State confidence as basis × coverage, never as a percentage.** `measured` or `inferred`,\n   crossed with what was searched plus what was provably not searched and the control that\n   proves it. \"85% confident\" is a number nobody computed; it cannot be checked and it cannot\n   be reproduced.\n\n   **THE REPRODUCE-THE-MISS RULE: a why-answer about a detector, a guard, a filter or any other\n   check is `measured` only when the exact input was located and the branch that decided it was\n   traced.** Find the record, the row, the argument the check actually saw; follow it to the\n   line that returned the verdict; quote that line. A mechanism that merely *could* produce the\n   observed outcome is `inferred` and is labelled so in the same sentence that states it —\n   plausible mechanisms are cheap, and the one that fired is frequently not the plausible one.\n\n9. **Date every inherited claim.** Anything carried in from a ticket, a pull request, a design\n   doc, or an earlier investigation answers \"was it true?\" only. Resolve the citation at the\n   current revision, check the interval with `git log -S\"<fragment>\" -- <path>`, and mark the\n   claim with the sha it was checked at. A claim that fails its check is not deleted — it is\n   recorded as *true at `<sha>`, not true at HEAD*, with what changed. That is frequently the\n   answer.\n\n10. **Ask only what a probe cannot settle.** Two tests, in order: would the two readings\n    produce different **work**? Can a bounded probe settle it in under a minute? If a probe\n    can — **probe, do not ask.** Four cases must be asked anyway: a contradictory premise, two\n    plausible referents, an order-of-magnitude scope gap, an irreversible authorization.\n    Cadence: **one blocking question plus up to three batched disambiguations, with the\n    blocking one labelled.** Every question carries established facts, the branches with their\n    costs, and the default if unanswered. Unattended: record the blocking gap, take the\n    lower-consequence branch, and mark every downstream claim assumption-dependent. Resisting a\n    wrong **fact** and resisting a wrong **instruction** are different behaviours — the second\n    returns a decision brief and a question rather than a completed action with a caveat\n    attached. Both are in [clarifying questions](references/clarifying-questions.md).\n\n11. **At the deep band only, run the two adversaries.** Asymmetric inputs, opposite defaults:\n    the **REFUTER** gets the claims and citations and nothing else, defaults to `REFUTED`, and\n    may concede **only by naming the artifact it opened**; the **COVERAGE AUDITOR** gets the\n    question and the manifests but **not the answer**, defaults to `INCOMPLETE`, and to claim\n    incompleteness must name an uncovered surface and one probe that would settle it. Two\n    rounds maximum, adjudication on evidence only, and **a conceded claim is recorded\n    `conceded`, not `validated`** — a refuter out of objections has failed to refute, which is\n    not the same as having verified. Never run this on a light-band question. If the harness\n    cannot withhold parent context from children, run **one** reviewer and say the two-verdict\n    design degraded. Briefs in [deep mode](references/deep-mode-adversaries.md).\n\n12. **Stop by the rule, not by exhaustion.** Stop when all four hold: every load-bearing claim\n    is cited at the class it requires; no `unresolved` row the answer depends on remains; the\n    last round changed no verdict; every load-bearing `not_found` has a control that fired.\n    Hard round budget on top: **2 at normal, 3 at deep.** If the budget runs out with a\n    condition unmet, **deliver anyway** — open rows visible in the answer, and the unmet\n    condition named in one sentence.\n\n13. **Deliver the answer with its coverage attached.** The answer, its evidence as `path:line`\n    at a sha, its confidence as basis × coverage, the open rows, the marked assumptions, and a\n    closing **what this run could not see**. An answer without its coverage is the failure this\n    skill exists to prevent, however correct it happens to be.\n\n14. **Document the run when the branch calls for it.** The convention is below, and it is\n    identical in every skill of this family that supports it.\n\n### The run record\n\n**Documenting the run.** Write a full record when the invocation carries `--document` (or\nan unmistakable phrase such as \"document the run\"), at `docs/investigate-codebase/<UTC-date>-<slug>.md`\nin the host repository — and always when the run is unattended, in which case it goes to the\nharness scratch directory, never the repository, and its path is named in the final answer;\nif you cannot confirm a human will see and answer a question in THIS run, treat it as\nunattended. Attended with no token: stay silent, offering once only if the run ends with an\nunresolved contradiction or an open blocking question. Five headings, in order: What was\nsearched / Who searched it / What each found / How it reconciled / What was decided and why,\nclosing with what this run could not see. No secret values, machine-absolute paths, child\ntranscripts or raw logs; no unmarked inference or unearned benefit claims; never edit an\nearlier record, and never let writing one change the answer.\n\nRecords are written per [the run-record convention](references/documenting-the-run.md).\n\n## Usage Examples\n\n```text\nIs the generated job registry actually read at runtime, or is the page the source of truth?\nScore it before you start and tell me the band. I want the evidence, not a summary — and if\na search comes back empty, show me the control that proves the search was working.\n```\n\n```text\nThe ticket says this timeout is caused by the retry wrapper. Check whether that is still\ntrue at HEAD before you go any further; the ticket is four months old. If the repo\ncontradicts the premise, stop and tell me, don't answer the question it implies.\n```\n\n```text\nWho reads the status column? Split it into writers, readers, and anything that derives\nanother value from it — I have been bitten by the third one before. Say what you did not\nsearch.\n```\n\n```text\nGo deep on this: I'm about to drop the column and I need to know what breaks. Run the\nadversarial pass, and document the run (--document) so I can hand the evidence to review\nalong with the migration.\n```\n\n```text\nQuick one, light is fine: which module defines the cursor parser? One definition site, not\nevery file that mentions the name.\n```\n\n## Pitfalls\n\n- **The zero-hit search read as absence.** The most expensive mistake in the family, and the\n  cheapest to prevent — one extra command. `git grep -E '\\b…'` matching nothing is not\n  evidence about the codebase; it is evidence about POSIX ERE.\n- **A reachability claim built on a direct-reference search.** \"Nothing imports it, so it\n  cannot run\" — measured on the module's own name, while the loader reached it one hop away\n  through a barrel file that never names it. The negative was true; the claim was false.\n- **Stopping the walk at one hop and calling it \"no path\".** A run walked exactly one hop, found\n  every direct importer clean, and concluded there was no import path. The chain was three hops\n  deep, through a shared utility barrel that spelled nothing in it. A hop count is a depth, not\n  a closure: \"no reference to depth 1\" was true and would have said so.\n- **Explaining a miss with the mechanism that sounds right.** A guard was reported as dropping\n  a record \"because the field was empty\"; the field was populated and a length check two\n  branches earlier had already returned. Nothing was opened, and it read like the real answer.\n- **Answering about a sibling of the instance that was named.** The question named one call\n  site; the run traced another with the same function name, found a genuine defect there, and\n  delivered it as the answer to a question about a different line.\n- **Resolving \"a PR\" to the first plausible PR.** The subject arrived as a description, more\n  than one candidate matched, and the run picked one without ever saying it had chosen. Two\n  independent runs did this and investigated a different instance than the asker meant — the\n  enumeration that would have caught it costs one listing command.\n- **Fan-out as theatre.** Four children over the same files, agreeing. That is one reading at\n  four times the price, and its agreement reads like corroboration in the write-up.\n- **Briefing a child with a bare symbol name.** In a real monorepo the common names are the\n  framework's own conventions, and a name-keyed search returns the whole application.\n- **Merging summaries instead of re-reading hits.** A substring match inside a comment becomes\n  a confirmed caller by the second summary, and nothing downstream can tell.\n- **Deciding the band after the fan-out.** Then the rubric is a justification, not a decision,\n  and it will always agree with what was already spent.\n- **Escalating on feeling.** A four-hit lookup does not need an adversarial round. Needless\n  escalation is scored as a failure, not as diligence.\n- **Asking what a probe would answer.** A round trip to a human costs more than a `git grep`,\n  and returns an opinion where the probe returns evidence.\n- **Answering the question a false premise implies.** A fluent explanation of a mechanism that\n  was deleted two releases ago is worse than no answer, because it is actionable.\n- **Complying with a wrong instruction and noting the risk afterwards.** The deliverable is a\n  decision brief and a question. A direct imperative is the thing under test, not evidence.\n- **Confidence as a percentage.** Nobody computed it. It survives into other people's\n  documents as though somebody had.\n- **Treating a generated artifact as the runtime.** It is evidence of what the generator saw.\n  Open the file it cites.\n- **Delivering the answer without its coverage.** The missing half is the half that decides\n  whether the reader should act on it.\n\n## Verification\n\n- [ ] The rubric was scored, with a stated observable behind each of the five signals, before\n      any search was dispatched.\n- [ ] Scope was scored on **the artifact the question named** rather than repo-wide, repo size\n      contributed at most 1 where an artifact was named, and a named-artifact why/how question\n      started at light.\n- [ ] Where pass 1 lowered the observables, the band was re-scored **downward** and announced\n      again, rather than the declared band being spent because it had been declared.\n- [ ] The **band, signal scores, override and cap were stated before any child was dispatched**.\n- [ ] Mode was announced, not asked: **no run blocked on a mode question**.\n- [ ] A boundary total said so in the announcement and rounded up, not down.\n- [ ] Cost-of-being-wrong = 2 raised the floor to normal and armed the consent gates at the\n      irreversible action, without producing a mode-time question.\n- [ ] Existing derived artifacts were read, and the file each one cites was opened at the\n      current revision.\n- [ ] The decomposition axis is one on which the children could have disagreed.\n- [ ] Every by-symbol child was briefed with a definition site, not a bare name.\n- [ ] Every child returned the result contract, including `searched[]` with verbatim queries\n      and `blockers[]`.\n- [ ] Every load-bearing `not_found` names its control and whether the control fired; every\n      negative without a fired control is recorded `inconclusive`, not `absent`.\n- [ ] Every reachability or flow claim rests on a walk to **closure over a named boundary** or\n      on a resolver's answer; anything shallower is recorded as **\"no reference to depth N\"**,\n      with N and what was walked, and never as \"no path\".\n- [ ] Every why-answer about a detector, guard, filter or check names the exact input and the\n      branch that decided it; a mechanism nobody watched decide is marked `inferred`.\n- [ ] The instance the asker named is the instance that was traced, and any generalisation\n      beyond it says which instance the finding came from.\n- [ ] Where the subject was named by description, the matching candidates were **enumerated**,\n      and the run either asked which was meant or covered each and named the one it answered\n      for — never resolved to the first plausible match in silence.\n- [ ] The contradiction table carries all eight columns, \"what each evidence CAN prove\" is\n      filled, and every verdict is from the closed set.\n- [ ] The reconciler re-read the cited hits rather than merging child summaries.\n- [ ] Independence is recorded for each confirmed claim.\n- [ ] Confidence is basis × coverage, in words, with no percentage anywhere.\n- [ ] Every inherited claim was checked against the current revision and dated to a sha.\n- [ ] At deep band: both adversaries ran with asymmetric inputs, concessions are recorded\n      `conceded` rather than `validated`, and any degradation to a single reviewer is stated.\n- [ ] The stop rule fired on its four conditions, or the run delivered at the round cap with\n      the unmet condition named and the open rows visible.\n- [ ] The answer closes with what this run could not see.\n- [ ] Nothing was written to the repository except a run record that was explicitly asked for.\n- [ ] Where a record was written, it exists at `docs/investigate-codebase/<UTC-date>-<slug>.md`\n      (or the harness scratch path for an unattended run, named in the answer), under the five\n      required headings.\n\n## Deeper reading\n\n- [The complexity rubric](references/complexity-rubric.md): every signal's anchors and probe\n  commands, the two overrides and the light start on a named artifact, the boundary round-up,\n  the calibration examples that pin the bands against inflation, the announcement format with\n  worked lines, user-initiated overrides, and the degradations.\n- [Decomposition and the child contract](references/decomposition-and-children.md): the five\n  axes with the trap each avoids, briefing the named instance and enumerating a described one,\n  the result contract field by field, the control rule with its measured failures, and the\n  transitive-negative rule with its closure boundary.\n- [Reconciling evidence](references/reconciling-evidence.md): the contradiction table worked\n  through, the CAN-prove column run over the run's own negatives, evidence classes and reach,\n  independence, confidence and reproducing a miss, dated findings, and the stop rule.\n- [Deep mode](references/deep-mode-adversaries.md): the refuter and coverage auditor briefs,\n  adjudication, why this is not a code review, and the single-reviewer degradation.\n- [Clarifying questions](references/clarifying-questions.md): the two tests, the four must-ask\n  cases, cadence, question payload, non-interactive degradation, and the difference between\n  resisting a wrong fact and a wrong instruction.\n- [A worked investigation](references/worked-investigation.md): one deep-band run end to end,\n  from the ask to the delivered answer.\n- [The run-record convention](references/documenting-the-run.md): when a record is written,\n  where it goes, its five headings, the prohibitions, and a worked record.\n","bodyHtml":"<h2 id=\"investigate-a-codebase\">Investigate a codebase</h2>\n<p>Ask an agent a question about a codebase and you get an answer in the same confident\nregister whether it read four files or none. The prose does not carry the difference, so\nthe reader cannot tell a measured claim from a plausible one, and the failure only surfaces\nlater — in the migration that dropped a column something still read, in the deletion that\nbroke boot, in the &quot;nobody calls this&quot; that was a search with a typo in it.</p>\n<p>This skill produces an answer whose evidence can be checked. It scores how much the question\nis worth before spending anything, splits the search so that the parts can genuinely\ndisagree, refuses to call a zero-hit search &quot;absent&quot; without a control that fired, settles\ncontradictions in a table instead of by tone, and closes with what it did not look at.</p>\n<p>It reads. It writes nothing to the repository unless a run record is explicitly asked for.</p>\n<h3 id=\"what-separates-an-answer-from-a-guess\">What separates an answer from a guess</h3>\n<p>Five mechanics, each of which exists because its absence produced a wrong answer somebody\nacted on:</p>\n<ul>\n<li><strong>A control on every negative.</strong> No hits means either &quot;absent&quot; or &quot;the search never\nworked&quot;, and only a control tells you which.</li>\n<li><strong>An evidence class on every claim.</strong> A comment proves what someone believed; a log proves\nwhat happened. Both read as facts in prose.</li>\n<li><strong>Coverage stated with the answer.</strong> What was searched, and what was not — the second half\nis the half that gets dropped.</li>\n<li><strong>Independence recorded.</strong> Two children reading the same file are one reading, counted\ntwice. Agreement between them is not corroboration.</li>\n<li><strong>A date on every inherited claim.</strong> &quot;Was it true?&quot; and &quot;is it still true?&quot; are different\nquestions, and tickets only answer the first.</li>\n</ul>\n<p>Composition: <code>derive-codebase-context</code> builds the durable, regenerable, CI-gated artifacts —\nregistries, atlases, boundary rules; this skill <strong>reads</strong> to answer one question now and\nbuilds nothing. Where those artifacts exist, read them and open the file they cite instead\nof re-deriving by grep. Routing identifiers, profiles, context packaging and escalation\nbelong to <code>model-routing</code>; child visibility and lifecycle evidence to <code>agent-lifecycle</code>.\nInstall the companions with <code>npx skills add crissmoldovan/agent-skills</code>.</p>\n<h3 id=\"when-to-use\">When to Use</h3>\n<ul>\n<li>A question about the code needs an answer someone will act on, and being wrong is not free.</li>\n<li>The premise looks shaky: a ticket, a comment, or a colleague asserts a cause, and the\nanswer depends on whether that attribution holds.</li>\n<li>A search came back empty and the conclusion &quot;nothing does this&quot; is about to be load-bearing.</li>\n<li>Two sources disagree — a registry against a runtime, a doc against the code, two people.</li>\n<li>An inherited claim needs a current-state check before it is built on.</li>\n<li>An answer needs to survive review by someone who will ask &quot;how do you know?&quot;.</li>\n</ul>\n<p>Do not use it to <strong>build</strong> repository context artifacts — that is <code>derive-codebase-context</code>,\nand this skill&#39;s boundary is exactly the inverse of it. Do not use it to map what a proposed\nset of changes would hit; <code>blast-area</code> owns that, and calls this skill for the searching. Do\nnot use it to run a problem report end to end through a fix — that is <code>resolve-problem-report</code>.\nDo not use it to describe a change that already happened; <code>describe-changes</code> reads the diff.\nDo not use its deep-mode adversaries as a code review: they attack an answer, not a diff, and\nthe review loop over a real pull request belongs to <code>request-blocks-review</code> and <code>blocks</code>.</p>\n<h3 id=\"prerequisites\">Prerequisites</h3>\n<ol>\n<li><strong>A question that can be answered wrong.</strong> One sentence, with the nouns resolved to things\nyou can point at, and the consequence of a wrong answer stated.\n<strong>Complete when:</strong> you can say what a wrong answer would cause someone to do.</li>\n<li><strong>A readable checkout at a named revision.</strong> The sha, and whether the tree is dirty. A\nfinding measured against uncommitted work describes a state nobody else has.\n<strong>Complete when:</strong> the revision and dirty state are recorded.</li>\n<li><strong>The repository&#39;s existing derived artifacts located.</strong> Generated registries, an atlas, a\nlanguage server, an import-boundary config — or their confirmed absence.\n<strong>Complete when:</strong> each is in hand or recorded as absent.</li>\n<li><strong>The harness&#39;s capabilities declared.</strong> Can it dispatch children? Can it withhold parent\ncontext from them? Is model choice available?\n<strong>Complete when:</strong> every &quot;no&quot; has its degradation named, ready to state in the answer.</li>\n<li><strong>Attendance declared, conservatively.</strong> If you cannot confirm a human will see and answer\na question in this run, it is unattended — which changes both the question policy and\nwhether a run record is written.\n<strong>Complete when:</strong> the run is marked attended or unattended before the first question.</li>\n</ol>\n<h3 id=\"procedure\">Procedure</h3>\n<ol>\n<li><p><strong>Score the rubric before spending anything.</strong> Five signals, each 0–2 against an\nobservable you actually ran. Sum: <strong>0–2 light, 3–7 normal, 8+ deep.</strong> Anchors, probe\ncommands and worked scoring are in <a href=\"references/complexity-rubric.md\">the complexity rubric</a>.</p>\n<table>\n<thead>\n<tr>\n<th>Signal</th>\n<th>Observable probe</th>\n<th>0</th>\n<th>1</th>\n<th>2</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>Scope</td>\n<td>hits and files <strong>for the artifact the question names</strong>, never repo-wide for the term</td>\n<td>one file or one definition site</td>\n<td>one package or surface</td>\n<td>crosses surfaces, or the count is unknown until you search</td>\n</tr>\n<tr>\n<td>Contradiction risk</td>\n<td>does the ask assert a checkable attribution?</td>\n<td>pure lookup</td>\n<td>asserted, single source</td>\n<td>two sources disagree, or the attribution decides the answer</td>\n</tr>\n<tr>\n<td>Repo size + toolchains</td>\n<td><code>git ls-files | wc -l</code>; build manifests — <strong>at most 1 where the question names its artifact</strong></td>\n<td>one package, one build</td>\n<td>a few packages, two toolchains</td>\n<td>monorepo, &gt;2 toolchains, generated code, several deploy targets</td>\n</tr>\n<tr>\n<td>Ambiguity</td>\n<td>do two plausible referents exist?</td>\n<td>every noun resolves</td>\n<td>one obvious, one unlikely</td>\n<td>two plausible, leading different ways</td>\n</tr>\n<tr>\n<td>Cost of being wrong</td>\n<td>what does the answer authorise?</td>\n<td>informs a conversation</td>\n<td>informs a change review would catch</td>\n<td>authorises a migration, deletion, production write, outbound message, or ticket close</td>\n</tr>\n</tbody></table>\n<p>Score scope and size on <strong>what the question names</strong>, not on how large the repository is: a\nquestion naming one artifact is not a big question because it lives in a monorepo. Two\noverrides and one start rule: <strong>cost-of-being-wrong = 2 forces at least normal</strong>, whatever\nthe total; <strong>re-score after pass 1</strong>, because the first pass changes its own inputs, and a\nre-score that moves the band <strong>down</strong> is exactly as legitimate as one that moves it up; and\n<strong>a question that names one file or one function and asks <em>why</em> or <em>how</em> starts light</strong> —\nthe boundary round-up does not fire on it before pass 1, the re-score after pass 1 is then\nmandatory, and only cost-of-being-wrong = 2 outranks the start. Otherwise a total exactly\none point below a threshold <strong>rounds up</strong> one band and says so — a 2 becomes normal, a 7\nbecomes deep. The thresholds are tunable and are calibrated against a scored scenario suite\nthat penalises needless escalation.</p>\n<p><strong>Score from the QUESTION&#39;s shape</strong> — the artifact it names, the attribution it asserts, the\nreferents it leaves open, what its answer authorises — never from the size of the repository\nor from how much apparatus the run would enjoy using. Over-escalation is a scored failure,\nnot diligence. Three calibrations, each pinning a reading observed runs got wrong upward:</p>\n<table>\n<thead>\n<tr>\n<th>The ask</th>\n<th>Scores</th>\n<th>Band</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>change a function with exactly two call sites; one authoritative-looking attribution to check</td>\n<td>scope 1, contradiction 1, size ≤1, ambiguity 0–1, cost 1 = 4–5</td>\n<td><strong>normal</strong>, never deep</td>\n</tr>\n<tr>\n<td>a finite, enumerable triage list, each item the same two-question check</td>\n<td>scope 1, contradiction 0, size 1 (capped), ambiguity 0, cost 1 = 3</td>\n<td><strong>normal</strong> in a repository of any size — scored 2 on the repo it is 4, still normal</td>\n</tr>\n<tr>\n<td>why did this named detector miss this case</td>\n<td>scope 0, contradiction 0, size 1 (capped), ambiguity 0, cost 1 = 2</td>\n<td><strong>light start</strong> under the named-artifact rule; pass-1 re-score mandatory</td>\n</tr>\n</tbody></table>\n</li>\n<li><p><strong>Map the band to roles, never to model names.</strong></p>\n<table>\n<thead>\n<tr>\n<th>Band</th>\n<th>Who works</th>\n<th>Cap it buys</th>\n</tr>\n</thead>\n<tbody><tr>\n<td>light</td>\n<td>local tools and one cheap pass; <strong>no driver is dispatched</strong></td>\n<td>1 round, no children</td>\n</tr>\n<tr>\n<td>normal</td>\n<td>parallel children on disjoint axes, plus a mid-tier reconciler</td>\n<td>2–4 children, 2 rounds</td>\n</tr>\n<tr>\n<td>deep</td>\n<td>the above, plus the adversarial pair; strongest tier judges only</td>\n<td>3 rounds, of which the adversaries run at most two</td>\n</tr>\n</tbody></table>\n<p>Most questions are answered by a search and a file, and\n<strong>a top-tier driver is not the default</strong>: routing every one to the strongest\nmodel is the cost that makes people stop asking. Identifiers, profiles and\nescalation rules are <code>model-routing</code>&#39;s; do not restate them here. Degradation, stated in\nthe same breath as the band: <strong>no subagents</strong> — the same bands run as sequential passes,\nand the announcement states the wall-clock cost; <strong>no model choice</strong> — the band controls\ndepth only.</p>\n</li>\n<li><p><strong>Announce the band. Always, on one code path.</strong> One line, printed <strong>before the first\nchild is dispatched</strong>, whether or not anyone is watching. Never ask which mode to run.</p>\n<pre><code class=\"language-text\">investigate-codebase · normal band — scope 2 (41 hits/18 files), contradiction 2 (two\nregistries disagree), size 1 (14 packages), ambiguity 0, cost-of-being-wrong 1 = 6\n→ 3 children + reconciler, 2 rounds max\n</code></pre>\n<p>The line carries the <strong>band</strong>, <strong>each signal&#39;s score with the observable that scored it</strong>,\n<strong>any override applied</strong>, and <strong>the cap it buys</strong> — fan-out width and round cap. At the\ndeep band add a priced estimate where the harness can produce one; never invent a figure.\nA boundary round-up says so in the line (&quot;boundary: scored 2, rounding up to normal&quot;), and\nso does a re-score after pass 1 — in either direction, a band that moves is announced again.\nOverrides are user-initiated intents — &quot;go deep on this&quot;, &quot;light is fine&quot; — which force a\nre-score and a fresh announcement; the skill never solicits one. A cost-of-being-wrong of\n2 never produces a mode-time question: it raises the floor and arms the consent gates at\nthe irreversible action, where consent belongs.</p>\n</li>\n<li><p><strong>Read what the repo already derived, before searching for it.</strong> Generated registries, an\natlas, a compiler-backed index: read the entry, then <strong>open the file it cites</strong> at the\ncurrent revision. A generated artifact is evidence of what its generator saw — code-reading\nclass, and stale-able. A citation that no longer resolves is a finding.</p>\n</li>\n<li><p><strong>Decompose on an axis where the children CAN disagree — around the instance that was\nnamed.</strong> <strong>THE NAMED-INSTANCE RULE: when the asker names an instance — this call site, this\nrun, this row, this file — open THAT instance before generalising to another of the same\nshape.</strong> A sibling instance is a second question; answering it produces prose that is\nfluent, cited, and about something nobody asked. Generalise only after the named one has\nbeen read, and say which one the finding came from. Where the named instance does not\nexist, that is the finding.</p>\n<p><strong>Where the subject is named by DESCRIPTION — &quot;a PR&quot;, &quot;the ticket&quot;, &quot;that migration&quot; —\nenumerate the candidates before resolving it.</strong> A description becomes an instance only when\nexactly one thing matches, so count first: the pull requests touching this path, the tickets\nwith this title, the migrations at this version. More than one match and the choice is not\nyours to make silently — <strong>ask</strong> when attended, and when unattended <strong>cover each candidate,\nor answer for one and say at the top which and why</strong>. Silently taking the first plausible\nmatch is the trap: two independent runs resolved &quot;a PR&quot; that way and investigated a\ndifferent pull request than the asker meant, with citations, at length.</p>\n<p>Five axes, detailed with briefs in\n<a href=\"references/decomposition-and-children.md\">decomposition and the child contract</a>:</p>\n<ul>\n<li><strong>by-surface</strong> — directory, package, deploy target, language.</li>\n<li><strong>by-symbol</strong> — one <strong>definition site</strong> per child, <strong>never a bare name</strong>. In a monorepo\nof roughly 2,500 TypeScript files, one measured pass found 184 exported names defined in\nmore than one file, the worst being the repo&#39;s own conventions: one handler name 271\ntimes, another 209, a registry key 143. A child briefed with a bare name returns the\nwhole application.</li>\n<li><strong>by-data-flow</strong> — writers / readers / <strong>derivers</strong>. The third bucket is the one that\ngets dropped, and in one measured case the defect lived exactly there: writer and reader\nboth correct, the value transformed in between.</li>\n<li><strong>by-history</strong> — commits, blame, reverts, the range where behaviour changed.</li>\n<li><strong>by-runtime-evidence</strong> — a child <strong>forbidden from reading code</strong>, given boot output,\nlogs, or a schema dump. Its value is that its evidence is a different class; a child that\nquietly opens the source has produced a second code reading and a false independence\nsignal.</li>\n</ul>\n<p>If every child would read the same files, the axis is wrong: that is one reading billed\nseveral times, and their agreement means nothing.</p>\n</li>\n<li><p><strong>Brief every child with the same result contract.</strong></p>\n<pre><code class=\"language-json\">{\n  &quot;question&quot;: &quot;the slice this child was asked&quot;,\n  &quot;findings&quot;: [{ &quot;claim&quot;: &quot;…&quot;, &quot;evidence&quot;: &quot;path:line&quot;, &quot;basis&quot;: &quot;measured | inferred&quot;, &quot;confidence&quot;: &quot;basis x coverage, in words&quot; }],\n  &quot;searched&quot;: [{ &quot;query&quot;: &quot;verbatim&quot;, &quot;tool&quot;: &quot;git grep&quot;, &quot;hits&quot;: 41 }],\n  &quot;not_found&quot;: [{ &quot;target&quot;: &quot;…&quot;, &quot;control&quot;: &quot;the positive variant that was run&quot;, &quot;control_fired&quot;: true, &quot;reach&quot;: &quot;no reference to depth N (&lt;what was walked&gt;) | closure over &lt;boundary&gt; | resolver: &lt;name&gt;&quot; }],\n  &quot;blockers&quot;: [&quot;what this child could not do, and why&quot;]\n}\n</code></pre>\n<p><strong>THE CONTROL RULE: a zero-hit search is admissible as &quot;absent&quot; only when a control fired.\nOtherwise it is recorded &quot;inconclusive.&quot;</strong> A control is a deliberately positive variant of\nthe same search, run the same way, that returns hits — it proves the apparatus worked. The\ncanonical failure: <code>git grep -E &#39;\\b…&#39;</code> returns nothing and never could, because POSIX ERE\nhas no <code>\\b</code>. Read as absence, that is proof of a typo. Others in the reference: a pathspec\nthat excluded the answer, a file type git never tracked, <code>job_name</code> against <code>jobName</code>.</p>\n<p><strong>THE TRANSITIVE-NEGATIVE RULE: a zero-hit direct-reference search proves the direct hop, and\none more hop proves two.</strong> A claim about reachability or flow — &quot;cannot reach&quot;, &quot;no path&quot;,\n&quot;never loaded&quot; — is admissible only from a walk to <strong>closure over the relevant boundary</strong>:\nkeep following what each reached surface references — imports, registrations, dynamic\nlookups, re-exports — until the frontier stops growing or leaves the boundary you named. A\nresolver that answers reachability directly (a language server&#39;s reference graph, a bundler&#39;s\nmodule graph, an import-boundary checker) substitutes for the walk and is recorded as its\nsource. Anything less is recorded as <strong>&quot;no reference to depth N&quot;</strong>, naming N and what was\nwalked — which is true — and <strong>never as &quot;no path&quot;</strong>, which is not. The reconciler&#39;s\n<em>what this evidence CAN prove</em> column is applied to <strong>your own negatives</strong>, not only to the\ncontradictions between children — a fired control proves the search worked, never that the\nquestion it answered was the question asked.</p>\n</li>\n<li><p><strong>Reconcile with a contradiction table — do not merge summaries.</strong> The reconciler\n<strong>re-reads the cited hits</strong> rather than building the answer out of children&#39;s prose;\nsubstring false positives survive summaries intact. Columns, in this order:</p>\n<pre><code class=\"language-text\">claim | source A | source B | evidence A | evidence B | what each evidence CAN prove | verdict | residual\n</code></pre>\n<p>Verdicts come from a closed set: <code>confirmed</code>, <code>refuted</code>, <code>unresolved (needs X)</code>,\n<code>inconclusive</code>. Fill &quot;what each evidence CAN prove&quot; <strong>before</strong> the verdict, or the more\nconfident-sounding child wins, which is not a property of evidence. Break ties by evidence\nclass — <strong>production observation &gt; deterministic local measurement &gt; code reading &gt;\ndocs, comments and PR titles &gt; recollection</strong> — but <strong>class breaks ties while reach decides\nadmissibility</strong>: a high-class observation that does not touch the surface in question loses\nto a low-class one that does. Record, per confirmed claim, whether the agreeing sources were\nindependent. Worked tables are in <a href=\"references/reconciling-evidence.md\">reconciling evidence</a>.</p>\n</li>\n<li><p><strong>State confidence as basis × coverage, never as a percentage.</strong> <code>measured</code> or <code>inferred</code>,\ncrossed with what was searched plus what was provably not searched and the control that\nproves it. &quot;85% confident&quot; is a number nobody computed; it cannot be checked and it cannot\nbe reproduced.</p>\n<p><strong>THE REPRODUCE-THE-MISS RULE: a why-answer about a detector, a guard, a filter or any other\ncheck is <code>measured</code> only when the exact input was located and the branch that decided it was\ntraced.</strong> Find the record, the row, the argument the check actually saw; follow it to the\nline that returned the verdict; quote that line. A mechanism that merely <em>could</em> produce the\nobserved outcome is <code>inferred</code> and is labelled so in the same sentence that states it —\nplausible mechanisms are cheap, and the one that fired is frequently not the plausible one.</p>\n</li>\n<li><p><strong>Date every inherited claim.</strong> Anything carried in from a ticket, a pull request, a design\ndoc, or an earlier investigation answers &quot;was it true?&quot; only. Resolve the citation at the\ncurrent revision, check the interval with <code>git log -S&quot;&lt;fragment&gt;&quot; -- &lt;path&gt;</code>, and mark the\nclaim with the sha it was checked at. A claim that fails its check is not deleted — it is\nrecorded as <em>true at <code>&lt;sha&gt;</code>, not true at HEAD</em>, with what changed. That is frequently the\nanswer.</p>\n</li>\n<li><p><strong>Ask only what a probe cannot settle.</strong> Two tests, in order: would the two readings\nproduce different <strong>work</strong>? Can a bounded probe settle it in under a minute? If a probe\ncan — <strong>probe, do not ask.</strong> Four cases must be asked anyway: a contradictory premise, two\nplausible referents, an order-of-magnitude scope gap, an irreversible authorization.\nCadence: <strong>one blocking question plus up to three batched disambiguations, with the\nblocking one labelled.</strong> Every question carries established facts, the branches with their\ncosts, and the default if unanswered. Unattended: record the blocking gap, take the\nlower-consequence branch, and mark every downstream claim assumption-dependent. Resisting a\nwrong <strong>fact</strong> and resisting a wrong <strong>instruction</strong> are different behaviours — the second\nreturns a decision brief and a question rather than a completed action with a caveat\nattached. Both are in <a href=\"references/clarifying-questions.md\">clarifying questions</a>.</p>\n</li>\n<li><p><strong>At the deep band only, run the two adversaries.</strong> Asymmetric inputs, opposite defaults:\nthe <strong>REFUTER</strong> gets the claims and citations and nothing else, defaults to <code>REFUTED</code>, and\nmay concede <strong>only by naming the artifact it opened</strong>; the <strong>COVERAGE AUDITOR</strong> gets the\nquestion and the manifests but <strong>not the answer</strong>, defaults to <code>INCOMPLETE</code>, and to claim\nincompleteness must name an uncovered surface and one probe that would settle it. Two\nrounds maximum, adjudication on evidence only, and <strong>a conceded claim is recorded\n<code>conceded</code>, not <code>validated</code></strong> — a refuter out of objections has failed to refute, which is\nnot the same as having verified. Never run this on a light-band question. If the harness\ncannot withhold parent context from children, run <strong>one</strong> reviewer and say the two-verdict\ndesign degraded. Briefs in <a href=\"references/deep-mode-adversaries.md\">deep mode</a>.</p>\n</li>\n<li><p><strong>Stop by the rule, not by exhaustion.</strong> Stop when all four hold: every load-bearing claim\nis cited at the class it requires; no <code>unresolved</code> row the answer depends on remains; the\nlast round changed no verdict; every load-bearing <code>not_found</code> has a control that fired.\nHard round budget on top: <strong>2 at normal, 3 at deep.</strong> If the budget runs out with a\ncondition unmet, <strong>deliver anyway</strong> — open rows visible in the answer, and the unmet\ncondition named in one sentence.</p>\n</li>\n<li><p><strong>Deliver the answer with its coverage attached.</strong> The answer, its evidence as <code>path:line</code>\nat a sha, its confidence as basis × coverage, the open rows, the marked assumptions, and a\nclosing <strong>what this run could not see</strong>. An answer without its coverage is the failure this\nskill exists to prevent, however correct it happens to be.</p>\n</li>\n<li><p><strong>Document the run when the branch calls for it.</strong> The convention is below, and it is\nidentical in every skill of this family that supports it.</p>\n</li>\n</ol>\n<h4 id=\"the-run-record\">The run record</h4>\n<p><strong>Documenting the run.</strong> Write a full record when the invocation carries <code>--document</code> (or\nan unmistakable phrase such as &quot;document the run&quot;), at <code>docs/investigate-codebase/&lt;UTC-date&gt;-&lt;slug&gt;.md</code>\nin the host repository — and always when the run is unattended, in which case it goes to the\nharness scratch directory, never the repository, and its path is named in the final answer;\nif you cannot confirm a human will see and answer a question in THIS run, treat it as\nunattended. Attended with no token: stay silent, offering once only if the run ends with an\nunresolved contradiction or an open blocking question. Five headings, in order: What was\nsearched / Who searched it / What each found / How it reconciled / What was decided and why,\nclosing with what this run could not see. No secret values, machine-absolute paths, child\ntranscripts or raw logs; no unmarked inference or unearned benefit claims; never edit an\nearlier record, and never let writing one change the answer.</p>\n<p>Records are written per <a href=\"references/documenting-the-run.md\">the run-record convention</a>.</p>\n<h3 id=\"usage-examples\">Usage Examples</h3>\n<pre><code class=\"language-text\">Is the generated job registry actually read at runtime, or is the page the source of truth?\nScore it before you start and tell me the band. I want the evidence, not a summary — and if\na search comes back empty, show me the control that proves the search was working.\n</code></pre>\n<pre><code class=\"language-text\">The ticket says this timeout is caused by the retry wrapper. Check whether that is still\ntrue at HEAD before you go any further; the ticket is four months old. If the repo\ncontradicts the premise, stop and tell me, don&#39;t answer the question it implies.\n</code></pre>\n<pre><code class=\"language-text\">Who reads the status column? Split it into writers, readers, and anything that derives\nanother value from it — I have been bitten by the third one before. Say what you did not\nsearch.\n</code></pre>\n<pre><code class=\"language-text\">Go deep on this: I&#39;m about to drop the column and I need to know what breaks. Run the\nadversarial pass, and document the run (--document) so I can hand the evidence to review\nalong with the migration.\n</code></pre>\n<pre><code class=\"language-text\">Quick one, light is fine: which module defines the cursor parser? One definition site, not\nevery file that mentions the name.\n</code></pre>\n<h3 id=\"pitfalls\">Pitfalls</h3>\n<ul>\n<li><strong>The zero-hit search read as absence.</strong> The most expensive mistake in the family, and the\ncheapest to prevent — one extra command. <code>git grep -E &#39;\\b…&#39;</code> matching nothing is not\nevidence about the codebase; it is evidence about POSIX ERE.</li>\n<li><strong>A reachability claim built on a direct-reference search.</strong> &quot;Nothing imports it, so it\ncannot run&quot; — measured on the module&#39;s own name, while the loader reached it one hop away\nthrough a barrel file that never names it. The negative was true; the claim was false.</li>\n<li><strong>Stopping the walk at one hop and calling it &quot;no path&quot;.</strong> A run walked exactly one hop, found\nevery direct importer clean, and concluded there was no import path. The chain was three hops\ndeep, through a shared utility barrel that spelled nothing in it. A hop count is a depth, not\na closure: &quot;no reference to depth 1&quot; was true and would have said so.</li>\n<li><strong>Explaining a miss with the mechanism that sounds right.</strong> A guard was reported as dropping\na record &quot;because the field was empty&quot;; the field was populated and a length check two\nbranches earlier had already returned. Nothing was opened, and it read like the real answer.</li>\n<li><strong>Answering about a sibling of the instance that was named.</strong> The question named one call\nsite; the run traced another with the same function name, found a genuine defect there, and\ndelivered it as the answer to a question about a different line.</li>\n<li><strong>Resolving &quot;a PR&quot; to the first plausible PR.</strong> The subject arrived as a description, more\nthan one candidate matched, and the run picked one without ever saying it had chosen. Two\nindependent runs did this and investigated a different instance than the asker meant — the\nenumeration that would have caught it costs one listing command.</li>\n<li><strong>Fan-out as theatre.</strong> Four children over the same files, agreeing. That is one reading at\nfour times the price, and its agreement reads like corroboration in the write-up.</li>\n<li><strong>Briefing a child with a bare symbol name.</strong> In a real monorepo the common names are the\nframework&#39;s own conventions, and a name-keyed search returns the whole application.</li>\n<li><strong>Merging summaries instead of re-reading hits.</strong> A substring match inside a comment becomes\na confirmed caller by the second summary, and nothing downstream can tell.</li>\n<li><strong>Deciding the band after the fan-out.</strong> Then the rubric is a justification, not a decision,\nand it will always agree with what was already spent.</li>\n<li><strong>Escalating on feeling.</strong> A four-hit lookup does not need an adversarial round. Needless\nescalation is scored as a failure, not as diligence.</li>\n<li><strong>Asking what a probe would answer.</strong> A round trip to a human costs more than a <code>git grep</code>,\nand returns an opinion where the probe returns evidence.</li>\n<li><strong>Answering the question a false premise implies.</strong> A fluent explanation of a mechanism that\nwas deleted two releases ago is worse than no answer, because it is actionable.</li>\n<li><strong>Complying with a wrong instruction and noting the risk afterwards.</strong> The deliverable is a\ndecision brief and a question. A direct imperative is the thing under test, not evidence.</li>\n<li><strong>Confidence as a percentage.</strong> Nobody computed it. It survives into other people&#39;s\ndocuments as though somebody had.</li>\n<li><strong>Treating a generated artifact as the runtime.</strong> It is evidence of what the generator saw.\nOpen the file it cites.</li>\n<li><strong>Delivering the answer without its coverage.</strong> The missing half is the half that decides\nwhether the reader should act on it.</li>\n</ul>\n<h3 id=\"verification\">Verification</h3>\n<ul>\n<li><input disabled=\"\" type=\"checkbox\"> The rubric was scored, with a stated observable behind each of the five signals, before\nany search was dispatched.</li>\n<li><input disabled=\"\" type=\"checkbox\"> Scope was scored on <strong>the artifact the question named</strong> rather than repo-wide, repo size\ncontributed at most 1 where an artifact was named, and a named-artifact why/how question\nstarted at light.</li>\n<li><input disabled=\"\" type=\"checkbox\"> Where pass 1 lowered the observables, the band was re-scored <strong>downward</strong> and announced\nagain, rather than the declared band being spent because it had been declared.</li>\n<li><input disabled=\"\" type=\"checkbox\"> The <strong>band, signal scores, override and cap were stated before any child was dispatched</strong>.</li>\n<li><input disabled=\"\" type=\"checkbox\"> Mode was announced, not asked: <strong>no run blocked on a mode question</strong>.</li>\n<li><input disabled=\"\" type=\"checkbox\"> A boundary total said so in the announcement and rounded up, not down.</li>\n<li><input disabled=\"\" type=\"checkbox\"> Cost-of-being-wrong = 2 raised the floor to normal and armed the consent gates at the\nirreversible action, without producing a mode-time question.</li>\n<li><input disabled=\"\" type=\"checkbox\"> Existing derived artifacts were read, and the file each one cites was opened at the\ncurrent revision.</li>\n<li><input disabled=\"\" type=\"checkbox\"> The decomposition axis is one on which the children could have disagreed.</li>\n<li><input disabled=\"\" type=\"checkbox\"> Every by-symbol child was briefed with a definition site, not a bare name.</li>\n<li><input disabled=\"\" type=\"checkbox\"> Every child returned the result contract, including <code>searched[]</code> with verbatim queries\nand <code>blockers[]</code>.</li>\n<li><input disabled=\"\" type=\"checkbox\"> Every load-bearing <code>not_found</code> names its control and whether the control fired; every\nnegative without a fired control is recorded <code>inconclusive</code>, not <code>absent</code>.</li>\n<li><input disabled=\"\" type=\"checkbox\"> Every reachability or flow claim rests on a walk to <strong>closure over a named boundary</strong> or\non a resolver&#39;s answer; anything shallower is recorded as <strong>&quot;no reference to depth N&quot;</strong>,\nwith N and what was walked, and never as &quot;no path&quot;.</li>\n<li><input disabled=\"\" type=\"checkbox\"> Every why-answer about a detector, guard, filter or check names the exact input and the\nbranch that decided it; a mechanism nobody watched decide is marked <code>inferred</code>.</li>\n<li><input disabled=\"\" type=\"checkbox\"> The instance the asker named is the instance that was traced, and any generalisation\nbeyond it says which instance the finding came from.</li>\n<li><input disabled=\"\" type=\"checkbox\"> Where the subject was named by description, the matching candidates were <strong>enumerated</strong>,\nand the run either asked which was meant or covered each and named the one it answered\nfor — never resolved to the first plausible match in silence.</li>\n<li><input disabled=\"\" type=\"checkbox\"> The contradiction table carries all eight columns, &quot;what each evidence CAN prove&quot; is\nfilled, and every verdict is from the closed set.</li>\n<li><input disabled=\"\" type=\"checkbox\"> The reconciler re-read the cited hits rather than merging child summaries.</li>\n<li><input disabled=\"\" type=\"checkbox\"> Independence is recorded for each confirmed claim.</li>\n<li><input disabled=\"\" type=\"checkbox\"> Confidence is basis × coverage, in words, with no percentage anywhere.</li>\n<li><input disabled=\"\" type=\"checkbox\"> Every inherited claim was checked against the current revision and dated to a sha.</li>\n<li><input disabled=\"\" type=\"checkbox\"> At deep band: both adversaries ran with asymmetric inputs, concessions are recorded\n<code>conceded</code> rather than <code>validated</code>, and any degradation to a single reviewer is stated.</li>\n<li><input disabled=\"\" type=\"checkbox\"> The stop rule fired on its four conditions, or the run delivered at the round cap with\nthe unmet condition named and the open rows visible.</li>\n<li><input disabled=\"\" type=\"checkbox\"> The answer closes with what this run could not see.</li>\n<li><input disabled=\"\" type=\"checkbox\"> Nothing was written to the repository except a run record that was explicitly asked for.</li>\n<li><input disabled=\"\" type=\"checkbox\"> Where a record was written, it exists at <code>docs/investigate-codebase/&lt;UTC-date&gt;-&lt;slug&gt;.md</code>\n(or the harness scratch path for an unattended run, named in the answer), under the five\nrequired headings.</li>\n</ul>\n<h3 id=\"deeper-reading\">Deeper reading</h3>\n<ul>\n<li><a href=\"references/complexity-rubric.md\">The complexity rubric</a>: every signal&#39;s anchors and probe\ncommands, the two overrides and the light start on a named artifact, the boundary round-up,\nthe calibration examples that pin the bands against inflation, the announcement format with\nworked lines, user-initiated overrides, and the degradations.</li>\n<li><a href=\"references/decomposition-and-children.md\">Decomposition and the child contract</a>: the five\naxes with the trap each avoids, briefing the named instance and enumerating a described one,\nthe result contract field by field, the control rule with its measured failures, and the\ntransitive-negative rule with its closure boundary.</li>\n<li><a href=\"references/reconciling-evidence.md\">Reconciling evidence</a>: the contradiction table worked\nthrough, the CAN-prove column run over the run&#39;s own negatives, evidence classes and reach,\nindependence, confidence and reproducing a miss, dated findings, and the stop rule.</li>\n<li><a href=\"references/deep-mode-adversaries.md\">Deep mode</a>: the refuter and coverage auditor briefs,\nadjudication, why this is not a code review, and the single-reviewer degradation.</li>\n<li><a href=\"references/clarifying-questions.md\">Clarifying questions</a>: the two tests, the four must-ask\ncases, cadence, question payload, non-interactive degradation, and the difference between\nresisting a wrong fact and a wrong instruction.</li>\n<li><a href=\"references/worked-investigation.md\">A worked investigation</a>: one deep-band run end to end,\nfrom the ask to the delivered answer.</li>\n<li><a href=\"references/documenting-the-run.md\">The run-record convention</a>: when a record is written,\nwhere it goes, its five headings, the prohibitions, and a worked record.</li>\n</ul>\n","outline":["What separates an answer from a guess","When to Use","Prerequisites","Procedure","Usage Examples","Pitfalls","Verification","Deeper reading"],"words":5101}
