--- name: assess-findings description: Renders the /assess report from the deterministic run-context.json and the practice scorecard - the scorecard, the verbatim cross-practice findings, the findings where the repository says one thing and does another, and the mandatory Top 3 Actions. TRIGGER when the /assess orchestrator reaches the report-writing step; not a standalone user command. --- # Assess Findings Writer The report-writing half of `/assess`. The deterministic core has written `.assess/run-context.json` (the data bus) and the `assess-layer-scorer` agent has returned the per-practice scorecard. Your job is to assemble `.assess/assess-report.md`: the deterministic top card, the scorecard, the snapshots, the **verbatim** cross-practice findings, the findings where the repository says one thing and does another, and the Top 3 Actions. **Windows:** run the bash blocks below in Git Bash, which ships with Git for Windows. Installs, PATH notes and the make-free commands are in the [Windows setup guide](../../docs/windows.md). The deterministic parts are not yours to invent - you paste them. You write the prose *around* a findings section you cannot omit or reorder. This is the deterministic-core-writes-data / LLM-writes-prose split that makes the report reproducible regardless of which model drives the run. ## Inputs - `$REPO_ROOT/.assess/run-context.json` - the data bus (the `headline` and `level` blocks, findings, attention, keyhole summary, prescribed actions, stats, diff). - The scorecard returned by the `assess-layer-scorer` agent (the per-practice verdicts and their evidence), with its `evidence` list already re-checked by `lib/report/evidence_check.py`: only entries that held on disk remain there; the rejected ones arrive separately under `evidence_rejected`, each with the `reason` the check gave. **Existence and wiring claims cite only verified evidence.** A report sentence saying a file or directory exists or is missing, or that something is or is not wired in (a workflow runs the linter, no CI job calls the script), must rest on an entry in the scorecard's `evidence` list and name the path that entry cites. When no verified entry backs such a claim, leave it out rather than restating it from the scorer's prose. The scorecard's per-layer Evidence cell is exempt only in its two empty states (no entries offered, every entry rejected), set beside the scorecard table below; a cell whose layer kept some verified entries cites only those, as the partial state there says. The deterministic findings you paste verbatim are already grounded and need no entry. ## Read the cross-practice findings first The layers above each measure one axis. The deterministic core also crosses those axes against each other and emits ten named findings - the "where to look" signals no single layer surfaces. Read them once, after the per-layer scans: ```bash jq '.derived_findings, .attention, .attention_low_signal, .keyhole_summary, .blocker_actions, .prescribed_actions, .gap_actions, .stats_summary.complexity_unreliable, .stats_summary.scc_unread' "$REPO_ROOT/.assess/run-context.json" ``` `derived_findings` is a fixed-order list of ten `{name, paths, action}` objects - all ten always present, `paths` may be empty. Omit a finding from the report when its `paths` is empty. Each pairs an axis-crossing with the action it implies: - **`hidden_coupling`** - modular statically but bleeds across boundaries historically (files that keep changing together). The static map says "isolated"; git says "coupled." Action: check why these files change together before trusting the boundary. - **`lying_map`** - high complexity under a stale doc: the map exists but no longer matches the territory. Staleness is the decaying-map churn ratio for a hand-written doc, counted only over distinct subject commits after the doc's last content change (a doc corrected after its subject last moved is never flagged, however busy the window was), but for a *generated* doc that declares provenance (frontmatter `source:` or a `[[generated]]` config mapping) it is measured against the source - the doc is stale only when its source is newer than it, so an accurate generated doc is never flagged. Action: fix or delete the doc - a wrong map is worse than none. - **`unexplained_complexity`** - high complexity with no doc and no recorded intent. Action: write the contract the code needs. Do **not** auto-generate it - a guessed contract is one more doc that says one thing while the code does another. - **`untrusted_hotspot`** (E1 trust axis) - a complexity hotspot whose tests are hollow: an opt-in mutation pass let a high fraction of mutants survive, so the suite *runs* the code but doesn't *pin* it. Silent without mutation data (the default read-only run never fires it). Action: make the tests check what the code does, as a caller sees it, not its internal state. - **`self_referential_tests`** (E2 trust axis) - the code and its co-located tests were introduced in the same commit, so the suite may verify the author's mental model rather than independently-specified behaviour. Action: ask a person to review - the tests check that the code agrees with itself, not that it is right. - **`unactioned_intent`** (write-side tendency) - files carrying stale promissory markers (`TODO` / `FIXME` / "remove after migration") that survived at least `stale_touches_threshold` edits to their own file without being kept: a note of intent that says one thing while the code does another. A justified suppression (`eslint-disable-line x -- reason`, `# noqa: X # reason`) is never stale; a marker citing an issue or a date still ages. Silent when the marker scan is unavailable or the history is too thin to age markers. Action: keep the promise - fix it, open a ticket for it, or delete the marker or skip. - **`accretion_ratchet`** (write-side tendency) - a top-band hotspot whose line count only ever ratcheted upward: monotonic net growth across multiple commits with almost no deletion pressure (deletions below ~15% of total churn). The fingerprint of a file appended to rather than reworked. Only surfaced for files already in the top complexity/size band, so a growing-but-simple file is never flagged. Silent when the scan is unavailable or reads `reliable: false`: degenerate history (shallow clone or squashed import), a rename fallback, or `short_history` (under 30 days or 30 commits; both minimums uncalibrated). An unreliable reading adds no attention rows and no Top 3 action; the hotspot pages still show the growth line, disclaimed with the scan's reason. Action: make the file smaller - move code out, delete dead code, or split the file. - **`orphaned_understanding`** - high complexity with no human anchor and no intent: nobody owns the knowledge. Action: name a person who owns this code before it changes again. - **`candidate_dead_weight`** - high complexity with no runtime evidence it is live. The bias is to **keep** (static reachability can't see external callers - the runtime legibility caveat applies). Action: check that the code is used, and delete it only if it is not. - **`refactor_boundary`** (positive) - high containment: edits stay local. A safe zone, never an attention row. Action: safe to hand an agent in isolation; cite these paths in Strengths. **Partial import graph (`structure.name_collisions`).** Read it with `jq '.structure.name_collisions'`. Each entry is `{name, paths}`: one import name held by two or more discovered packages (`paths` are their repo-relative directories, with `.` written `%2E` and `%` written `%25` so each stays one module name; decode those two escapes before naming a path, so `v1%2E2/lib` reads `v1.2/lib`), which the core graphs in separate builds. Every import between those builds is dropped, not only imports of the colliding name, so the import-graph signals - the per-module import footprints, the front-door ratio, modularity, and the static containment behind `hidden_coupling` and `refactor_boundary` - cover only part of the tree and can be understated. When the list is non-empty, say so in one or two sentences directly under the `## Cross-Practice Findings (Keyhole Readiness)` heading, naming each colliding package by `name` with its `paths`, so a reader does not take the structure figures as whole-repo. Omit the note when the list is empty or `structure.available` is false (the import graph did not run; there is nothing to qualify). `attention` ranks the few units landing in the most *negative* findings (`refactor_boundary` never counts) - the "look here first" list, each row carrying its `findings` and `score`. Equal scores order by `stats_summary.top_hotspots` rank (members first), then finding severity (stale-marker severity, or lower `containment_ratio` for `hidden_coupling`), then path, so the order is already the priority. Lead the report's findings with the top of this list. A row is prescribed only when it is not tied with more than one other row at its `score`, and no row ranked below such a tie is prescribed. The sibling boolean `attention_low_signal` is true when that rule held back a row that would have filled one of the three slots. **Copy `findings_markdown` verbatim.** `run-context.json` carries a pre-rendered `findings_markdown` string - the deterministic findings section (the ten findings with their paths and actions, then the attention list). Paste it into the report **verbatim, inside the `πŸ”Ž Cross-practice findings` fold below** - do not paraphrase, summarise, reorder, or drop findings. You write framing prose (the "why these matter here") *inside* the block, directly under its `## Cross-Practice Findings (Keyhole Readiness)` heading - the block already opens with that heading, so **never add your own heading above or around it**; the heading must appear exactly once in the report. The section itself is the deterministic core's product, not yours. This is what makes the findings impossible to omit regardless of which LLM drives the run. `keyhole_summary` rolls the same findings into a one-line readiness summary (`summary_text`), pasted in the catalogue coverage fold of the report template below. `blocker_actions` lists the next Step's unmet gates as ready actions, in Step order (`{condition, gate, step, action, done_when, why}`, #1646): the `action` is the check manifest's fix of the gate's condition (for the instructions gate, one sentence per failing criterion with its measured value, #1746) and the `done_when` names the gate, both deterministic, so copy them verbatim. A gate not measured gives no entry: not measured is not failed. `prescribed_actions` lists the actions the report MUST include, one per top `attention` row (up to three, fewer or none when `attention_low_signal` is true; the Blocker rule below may push the last one under the table), and `gap_actions` lists `{signal, action, paths}` candidates for the slots left free: instruction files that are all nested (`signal` `layer_grades`, advising a root `AGENTS.md` or `CLAUDE.md` that names the check command, naming the nested files), a missing coverage report (`signal` `coverage_report`, naming the top hotspots to measure), doc reachability below the 0.50 floor (`signal` `doc_graph`, naming the unreachable docs), and a removal (`signal` `instruction_placement`, `mode` `remove`, #1084): an instruction file whose always-on text the scan flags, with its measured `cost` (`{metric, path, value}`, always-on lines). A removal earns credit by taking something away; when it fills a Top 3 slot, copy its `finding` and `cost` into the action in `finalize-input.json` verbatim, and its `paths` into the action's `files`, so finalize writes the `remove` mode and the measured cost into `actions.json` and keeps the action's lifecycle across runs (identity is `finding` plus `files`; the directive's line count changes as the file shrinks). `[]` when none fires, or `{available: false, reason}` when the gap scan failed (then fill free slots by judgement) - see the **Mandatory attention rule** in the Top 3 Actions section below. ## Write the Report Write the report to `$REPO_ROOT/.assess/assess-report.md`. **The top card is not yours to compute.** `headline.summary_markdown` (`lib/top_card.py`) states each fact about where the repository stands once: the Step, the gates held, the gate that blocks the next Step, what moved since the last run, and one "Start here" and one "Done when". It is the only paste above the fold. `assess_finalize.py` later rewrites its Start here and Done when from the first open action of the Top 3 you write (rank 1 unless it is already done), except when a hazard or a declined condition blocks the first measured gate of the next Step, whose two lines then stay, so paste it exactly as it stands and never edit those two lines yourself. When the run's headline kind (`headline.kind`, `lib/headline_kinds.py`) carries disclosures, the card ends with them, one paragraph each, such as "Not measured is not met: ...": they are part of the paste, so paste the disclosure block verbatim with the card. `assess_finalize.py` stops the run, naming the disclosure id, when the report does not carry one byte for byte. Never write a layered score, a fraction such as "X / 8" or a band name; the per-practice verdicts sit underneath as detail, and they never set the Step. **Lead decisions (#1825).** A profile's `lead_decisions` say which decisions its reader takes first. The report opens with them: `## Decisions that lead` is the first `##` section, unfolded, and its entries are the deterministic report's, never re-ordered, reworded or picked by judgement. The scorecard and Step tables below keep their own fixed order. `assess_finalize.py` refuses a report whose first section is not this one, byte for byte, and its message holds the section to paste; paste from that message on a `--scope` run, whose context `--stdout` does not read. **Translation for a reader in another language (#1174).** When the user works in a language other than English, add a translation directly under the pasted card: a line `Translation ():` (the language named in English, for example `Translation (Polish):`), then the same lines in that language, with Start here and Done when translated from the first open action of your Top 3 (rank 1 unless it is already done: its first step and done-when), since finalize rewrites the English pair from it. When a hazard or a declined condition blocks the first measured gate of the next Step, translate the card's own two lines: finalize keeps them. The English stays first and verbatim: it is the source of truth, and the deterministic lines are never rewritten. Translate the words only: condition ids, file paths, commands, code, gate ids and link targets stay exactly as written, so every backticked span and every link URL of the English appears unchanged in the translation (the helper `lib/plain_english.untranslated_tokens(english, translation)` lists any that went missing; `tests/test_plain_english.py` applies it to a sample Polish translation). Nothing machine-read is translated: `run-context.json`, `badge.json`, `log.md`, `actions.json` and fleet output stay English. With an English-speaking user, add nothing. **Two audiences, one file.** The report serves a human (wants a short, picture-led skim) and an AI agent (wants the full structured detail). The structure below satisfies both: the **default-visible surface is short** - the top card, any lead decisions, the Top 3 Actions, the "Says one thing, does another" section, and the two SVG images with a one-line takeaway each, plus one caveat line - and **everything verbose, your own prose included, is relocated into collapsible `
` folds**. A collapsed `
` keeps its content fully present in the raw markdown, so an agent reading the file sees everything inside the folds; the fold only hides it from a human's *rendered* view. **Folding is presentation, not removal - never delete content to shorten, relocate it into a fold.** Four things never fold: the **top card**, the **Decisions that lead** section (present only under a model that names them), the **Top 3 Actions** and the **"Says one thing, does another"** section. A section-ablation A/B showed that removing the Top 3 made a fresh agent confidently act on the *wrong* (lower-priority) item, so they stay visible and complete. A doc or gate that says one thing while the repository does another is the finding a reader most needs, so it stays visible too (#1254). Use the CodeRabbit fold style: `
`, then `emoji label`, a blank line, the content, a blank line, then `
`. The blank lines are required for tables and lists to render inside the fold. Nesting is allowed. **Report format** (write this to disk verbatim, filling in the placeholders; the bolded paragraphs - inside the folds and under the Top 3 Actions table - are instructions for *how* to fill that section, not literal report text): ````markdown # Codebase Assessment: _Generated . Generated by `/assess` v. --stdout` prints (the evidence classes the run read and the ones it did not); leave them out when that line has none>_ ):` on its own line, then the card in that language; see "Translation for a reader in another language" above> _New to these words? The [glossary](https://github.com/bjcoombs/ai-native-toolkit/blob/main/docs/glossary.md) explains [Step](https://github.com/bjcoombs/ai-native-toolkit/blob/main/docs/glossary.md#step), [gate](https://github.com/bjcoombs/ai-native-toolkit/blob/main/docs/glossary.md#gate), [practice](https://github.com/bjcoombs/ai-native-toolkit/blob/main/docs/glossary.md#practice), [level](https://github.com/bjcoombs/ai-native-toolkit/blob/main/docs/glossary.md#level), [evidence grade](https://github.com/bjcoombs/ai-native-toolkit/blob/main/docs/glossary.md#evidence-grade) and [truth tag](https://github.com/bjcoombs/ai-native-toolkit/blob/main/docs/glossary.md#truth-tag) in a sentence or two each._ _Note: Mutation testing was not run. The "Coverage gates and truth pressure" practice is held at Partly in place, and truth pressure is not yet measured._ _Note: Mutation testing stopped at its time budget in every package it ran in. The "Coverage gates and truth pressure" practice is held at Partly in place: the figures cover only the fastest mutants, a biased sample._ ## Decisions that lead --stdout` then prints a `### Decisions that lead` heading. Copy what is under it verbatim, from the first bold entry head to the line before the next heading, in its order; leave out the sentence between the heading and that head. Leave this whole section out, heading included, when the printed report has no such heading> ## Top 3 Actions | # | Action | Practice | Effort | Command / First Step | Done when | Scope fence | Hotspot files this addresses | Issue | |---|--------|-------|--------|---------------------|-----------|-------------|------------------------------|-------| | 1 | | | | `` | | | | - | | 2 | | | | `` | | | | - | | 3 | | | | `` | | | | - | **Done when** is the action's exit criterion and it must be *checkable, not aspirational*. Write it in the card's form: it holds a backticked command or path, a number, or a Markdown link, because the first open action's `done_when` becomes the top card's Done when line (unless a hazard or a declined condition words it) and every line there carries one. `assess_finalize.py` warns on stderr, naming the action, for a `done_when` that holds none (#1300), a sub-item's included (#1518). State it in the repository's own terms first, so a maintainer without the plugin can check it: a command whose pass state defines done (`golangci-lint run` reports 0 new issues; `bats tests/` passes), a file state (`AGENTS.md` names the check command), or a CI result (the `lint` job runs `actionlint` and is green). A re-run criterion (`max_fn_ccn` of the named function drops below the threshold in a re-run's stats sidecar; the finding no longer lists the path) may follow, but never as the only one. An executing agent - especially a smaller model - uses this to know when to stop; an action without a verifiable exit invites either premature "done" claims or runaway scope. **One concern per action.** Each row carries one change a maintainer could accept or decline on its own. When a gap needs several independent changes (an instruction-file stub, a lockfile, a CI step), the row takes the highest-leverage one, and each other change goes directly under the table as a lettered sub-item (`3a. - Done when: `), so a maintainer can take each on its own. Sub-items are not extra rows: the table and `actions.json` keep one entry per rank. Wherever you write a lettered sub-item, also write it into that action's `sub_items` list in `finalize-input.json`, as `{"label": "a", "action": "", "done_when": ""}` (with `first_step` or `scope_fence` when it differs from its parent's); the issue-tracking step files each one as its own item titled `3a. ` (#1263), and a sub-item left out of `sub_items` never reaches the tracker. **Name the condition an action moves.** When an action changes one maturity-model condition, put that condition's id in the action's `condition` field in `finalize-input.json` (an id `level.conditions` lists, e.g. `layer-5-ci.1`); `assess_finalize.py` refuses an id the run's level result does not list. The first `blocker_actions` entry holds rank 1: copy its `action`, `done_when` and `condition` into rank 1 (add the `first_step` and `scope_fence` cells by judgement), so the card's Start here and Done when, which finalize rewrites from rank 1, name the gate its Blocks line names (finalize checks the `action`, not the `done_when`, so copy both). The one exception is a prescribed action that already moves that condition: it takes rank 1 in the blocker action's place, with the condition on it. Either way rank 1 carries the condition. `assess_finalize.py` refuses a Top 3 whose rank 1 does not, or whose rank 1 is neither the blocker's `action` verbatim nor an action naming a `prescribed_actions` path, naming the condition. **Scope fence** names what the action must NOT touch: the files, behaviours, or conventions out of bounds ("only `.golangci.yml`; no source edits", "extract the one function; no drive-by reformatting of the rest of the file"). Smaller models over-extend without an explicit fence. **Keyhole-size the action.** When an action targets code (not config), prefer the *function* over the *file*: the stats sidecar carries per-function data on each ranked row (`max_fn_ccn` and `max_fn_name`, the worst function's name, filled for files a per-function backend scored - lizard, and the approximate `dart-scanner` for Dart; both are null for files scc scored at file level only), so "extract the dispatch branch of `parseLine` (fn ccn 41), characterization test first" fits one context window where "refactor parser.go (ccn 67)" does not. An action a fresh agent cannot complete inside one keyhole is two actions. **scc-only ccn is not a priority figure (issue #590).** A row with `source` `scc` and null `max_fn_ccn` carries scc's file-level keyword count, not a parsed complexity, and a path listed in `stats_summary.complexity_unreliable` is one whose count is implausibly low for its size (scc lost its place, often on shell quoting). Never justify an action's rank or order with such a figure: argue from churn, size and the finding instead, and when the figure appears at all write it as "ccn ~N (approximate)" - or "ccn ~N (unreliable)" for a `complexity_unreliable` path (the report table's `~N (approximate)` and `~N (unreliable)` cells, with the column's "ccn" in front). The Top 3 table is pasted into PR and issue bodies, so this caveat travels with it. ### Why these three? ") | .why` in the assess skill's `references/measures.json`. Never quote a why that is `exempt: plumbing`. Then add one or two sentences of repository-specific framing after the quote: what the action prevents here, naming the scorecard gap or hotspot file. The why states the reason; do not invent another reason, and when an action names no condition or scan, give its leverage in one or two sentences of framing alone.> ## Says one thing, does another These artefacts look true but aren't: the repository says one thing and does another, which is what an agent navigating the codebase most needs to know. Each row is something the repo presents as trustworthy that a scan flagged as hollow: a map of a place that moved, code that reads as live but is never called, a gate that reports "tested" without pinning behaviour. | Practice | Signal Type | Instance | What it says, and what it does | |----------|-------------|----------|-------------| | Agent instructions | Stale hub doc | `` (d stale; subject churned commits in window) | A central doc agents anchor on, frozen while its subject code moves - reads as the map, describes terrain that no longer exists | | Agent instructions | False instruction claim | `:` - `` () | The agent instruction file states enforcement, a pin or a file count the repo does not back - an agent trusts the rule as guarded when nothing checks it | | Agent instructions | Ignored Claude Code config | `:` - `: ` () | A skill, command or agent field Claude Code drops without an error - the configuration reads as set while the runtime ignores it | | Runtime legibility | Dead-but-present | `` - `` () | Compiles and reads as live, but nothing in *this* repo calls it - an agent extends or trusts a path that is never exercised | | CI and the agent's local check | Config snapshot drift | `` - `` (tracked , live ) | A committed copy of platform configuration that reads as restorable truth while the live setting has moved - restoring it silently reverts a deliberate change | | Coverage gates and truth pressure | Green-but-hollow | `` (coverage % vs mutation %) | Tests execute the file (green coverage) but don't constrain it (mutants survive) - the gate says "tested" while behaviour is unpinned | | Review on merged pull requests | Hollow required review | `review_reality` (% of merged PRs reviewed, % approved, by someone other than the author; % self-merged) | The branch rules require an approving review, so review reads as enforced, while merges land without one - the gate is bypassed as routine | | Review on merged pull requests | Code owner review with no owners | `change_controls` branch `` | The branch requires code owner review, so it reads as owner-reviewed, while no CODEOWNERS file there names an owner - GitHub has no one to ask, so the rule adds no review | **Populate each row from `run-context.json`; omit any row whose signal is absent or below threshold. Omit the table when no row qualifies, and omit the entire section only when no row qualifies **and** the `lying_map` finding's `paths` is empty; when only the paths exist, show the section with the paths and no table. This section is never folded: it sits above the first `
` block, with the `lying_map` finding's paths, so the reader meets every mismatch before any fold.** **Fill each row, and the `lying_map` paths line, by its rule in `references/report-says-one-thing-rows.md` (relative to this skill dir): which block and entry to take, the threshold that admits a row, and the cells to fill from it.** ## Snapshots ### Complexity - riskiest to change [![Complexity hotspot](./complexity-heatmap.svg)](./complexity-heatmap.svg) ### Doc navigability - can an agent find its way? [![Doc map](./doc-graph.svg)](./doc-graph.svg)