Plan: the docs pass — every page readable and accurate against the tree

Closes: #200. Branch: docs/readability-pass. Status: Done (2026-09-23) — every page measured and reworked, five commit groups; no release for docs alone

TL;DR

An inventory of all thirteen pages (four cold reads against the code, 2026-09-23; the findings are on #200) found the pages mostly right about their invariants and wrong in three recurring ways: recipes that no longer do what they say, facts that moved under them, and prose that narrates how a rule came to be instead of stating the rule. Three of the cookbook’s recipes are actively harmful today:

  • tuning.adoc § Keep certain actions interactive even in yolo (line 305) sets top-level safetyValve — which yolo opts out of (modes.json yolo judge.alwaysAsk: []; config.ts applySharedValve fills only an undefined list; pinned in config.test.ts). The recipe does nothing.

  • § Give the judge your own rubric (290) and § Tune the denial-loop guard (320) show a judge block without authority; a judge block replaces the whole object (mergeModesConfig, config.ts), so copying either demotes auto’s judge from advise to the default deny-only.

  • § Add or remove models, change regions (366, the "three lines" entry), § Give thinking levels bigger budgets (377) and § Auth expiry (389) are bare snippets for vertex-models.json, which replaces the catalog (index.ts resolveConfigPath; loadConfig throws without a non-empty models). Pasted as shown, pi refuses to start.

The rest is stale facts (the package table missing pi-remote; "eight loaders" for nine; Node ≥ 20 for ≥ 22.4; "no containers yet"; /model "reloads the catalog"; a Kind column saying maas where the schema says openai-compatible; remote.adoc still saying parts 3 and 4 of #154 "are not here yet" — line numbers in this plan are the inventory’s and two pages have moved since (#199 rewrote `remote.adoc’s wire paragraph and `security.adoc’s paired-device bullet), so each item is anchored by its words as well) and readability: table cells of 90 lines, paragraphs of 25 to 45 lines, and sentences that chain five issue numbers.

The bar (applied to every page)

  1. Accurate to the tree. Every claim about code or config matches the repository at the commit. A claim is checked by reading the code, not remembered; the commit message names the code files the changed claims rest on, so the cold reader can check them too.

  2. Current rule first, history second or gone. The first sentence of a passage says what holds now. How it came to be goes in a [NOTE] titled History, or is cut. An issue number stays only where a reader will need the tracker (a deferred decision, a known gap, a plan or ADR by name); it never stands in for the rule ("moved to X on DATE (#N)" as the only statement of X).

  3. Structure at twelve lines. No paragraph or table cell longer than about twelve lines without a list, a table or a subheading. Reference content (defaults, limits, file names, event names) is a table.

  4. One owner per topic. modes.adoc owns how decisions are made — invariants, defaults, where each is set. tuning.adoc owns what you type — recipes, each complete. vertex.adoc owns the catalog and the provider. Contributor pages own their subject. Elsewhere, one sentence and an xref; the duplicate text goes.

  5. Recipes are copy-paste safe. Every JSON block in tuning.adoc is a complete, valid overlay for its file that does what its heading says when pasted as shown, and says which file it goes in and whether that file merges or replaces.

Two calls the inventory left to the operator, decided here and put to them with this plan: issue numbers are stripped from prose except where they point at a decision record (an ADR, a plan) or a known gap the reader may need to look up; reviewer-eval.adoc stays as the record of its run, with a stronger Superseded note, rather than being deleted.

What the pass is not: no behaviour change, no new gate or check, no rewording of ADR bodies or plan records, no edit to the battery’s rendered tables (battery render owns them). reviewer-eval.adoc is a record of a hand-scored run and stays one: its Superseded note grows a "since then" list naming the claims that no longer hold (Gemini 3.8 Flash is the seeded Explore/Verify model and the compaction fallback), and the body is left.

The work, one commit per group

Each commit is docs-only, validate green (check-docs, plan-lint), and reviewed cold like any other. Order is by harm.

C1 — tuning.adoc: the recipes, then the shape

  • Yolo valve recipe → override yolo’s own judge block: { "modes": [{ "id": "yolo", "judge": { "authority": "allow-all", "alwaysAsk": [ … ] } }] }, with the sentence that yolo opts out of the shared valve on purpose.

  • Judge recipes (rubric, denial limits) carry "authority": "advise" and the line above them says why a judge block must be whole.

  • vertex-models.json recipes become one complete-file example (a models array of one entry copied from the shipped catalog, then the knob), with the sentence that this file replaces the catalog and node packages/pi-vertex/probe.mjs --json writes a full one.

  • task eval → node tools/task.mjs eval; node probe.mjs → its path.

  • The settings table names reviewThinking under the workflow file.

  • Shape (by heading; the inventory’s line numbers for this page were off): § Back to the package defaults (/gadhs-reset) to bullets; § Keep your chosen model when switching modes recipe first; the carve-out NOTE under § Carve an exception out of a shipped rule to three rules; § The pivot client diagnostics split into the command and the log; § Run a helper on a different model recipe first, benchmarks to an xref; § Memory's concurrency history to one sentence; § Switching models mid-session's context-fit duplicate to an xref; issue numbers stripped per the bar.

C2 — modes.adoc: the reference, restructured

  • (modes.adoc is over the review context’s 80 KB cap and cannot be supplied to the cold reader; every item here is anchored by its words.) The reflection-pause table cell (the |Reflection pause row of the workflow-guards table, ~90 lines) leaves the guards table for === The reflection pause with subsections: what is read, the questions and the verdict grammar (CLEAN / FLAGS (n) / bare FLAGS; nudge; unreviewed and its two attempts), who reviews (the author’s own model in a fresh context when ranked at or above the floor or unranked — cold means no session history, not other weights; Sonnet 4.6 below it), dispositions, thinking level, snapshot reads, the approved plan, the log events. The table cell becomes two sentences and an xref.

  • § How the guards read a command line under three subheadings; the snapshot-reads paragraph ("bounded and disclosed") to a limits table; the plan-mode overlay’s sizing paragraph rule first, the 0.8.1 layout autopsy cut; plan-model round-tripping (model and thinking across enter/exit/resume) as four bullets.

  • Contradictions closed: safety valve vs yolo (the safetyValve config row says "every mode, including yolo"; the mode table’s yolo row says "the safety valve (empty by default)"; § The safety valve says which list is which) — one statement: the shared valve applies to every mode that has not declared its own list, and yolo declares an empty one; self-review ("an unranked model reviews itself" beside "authors do not review their own work" — cold means no session history, not other weights); plan mode’s tool list (write/edit present, denied by rule, the draft carve-out); judge timeoutMs — the page’s 45 000 is the runtime’s (judge.ts JUDGE_DEFAULTS) and `config.ts’s doc comment ("Default 15000") is the stale one, fixed in the same commit (a doc comment is docs).

  • Issue-number chains (the reflection-pause cell, the command-line section, the yield/headless passages) stripped per the bar; duplicates with tuning.adoc (high-consequence globs, headless timeouts, context budget) reduced to the invariant plus an xref.

C3 — vertex.adoc: the catalog page

  • /model does not reload the catalog (208): restart pi; the Kind column (155–179) says openai-compatible with a note that the probe’s flag is maas; the 0.5.0 troubleshooting row names the behaviour, not a version; node probe.mjs gets its path; `gemini-2.5-pro’s roster note matches its probe row.

  • The context-window probing paragraph (185–200) to the user-facing rule plus an xref to local-dev; the MiniMax <think> history (267–282) to one specification sentence; the restamping paragraph (285–296) to one sentence; the ADC duplicate (211–224) to an xref.

C4 — the contributor pages

  • packages.adoc: pi-remote in the table; nine loaders; "this repo’s five" → seven; pivot-wire is `pi-remote’s dependency; the registry paragraph (75–104) split; the pi-vertex rename history to one line.

  • architecture.adoc: nine loaders; pi-remote in the tree; the decomposition bullet (75–86) split; "Rejected alternatives" its own subsection.

  • testing.adoc: pi-remote in the coverage table (98 / 88); the transform-types NOTE (76–85) to the requirement and one sentence.

  • local-dev.adoc: Node ≥ 22.4; consumer-sim, battery, landstrip-probe in the verb table; the sandbox paragraph (179–224) under two subheadings; the explore-question rules (248–268) rule first.

  • project-conventions.adoc: the containers row states the CI images; the peer-range sentence says what is true per package — >=0.87.0 for pi-ai and pi in pi, pi-modes, pi-workflow, pi-vertex; pi-remote still / >=0.85.0, pi-guidance and pi-agents >=0.75.0; typebox — rather than one range for all; the overrides list as date / rule / local form / tracking.

  • security.adoc: the paired-device bullet (the 45-line "A paired phone …" item, its tail rewritten by #199) becomes === Remote pairing and the wire with sub-bullets; the text #199 wrote there is kept.

C5 — remote.adoc, model-battery.adoc, reviewer-eval.adoc, index.adoc

  • remote.adoc: "parts 3 and 4 … are not here yet" goes (they shipped; the paragraph above it documents them); "the wish is kept (link.wanted in the state dir …)" → link.wanted.d/<sha256(cwd)> with the legacy file named once, and the later "is now per directory" sentence folds into it; devices.json named where forget is described; link.log rotates at 256 KiB to .1; the Set up once per box connection steps and the Handover paragraph split into stages; the #179 "until now, stayed off with no word" narrative becomes the current rule. The wire paragraph #199 wrote stands.

  • model-battery.adoc prose: the scores paragraph (35–77) to a list per role — metric and fail condition; "Measured" (85–115) split into provenance and how to re-measure; the shipped-defaults paragraph (502–503) to a subsection per role with its argument; issue chains stripped.

  • reviewer-eval.adoc: the Superseded note gains "since then".

  • index.adoc: "a model that did not write the change" → "a fresh instance of a model at or above the author’s, with no session history"; otherwise the page stands.

  • adrs/index.adoc: statuses match; no body edits.

Risks

Change Mode Mitigation

A recipe rewritten wrong (the valve, the judge blocks, the catalog file)

silent — a reader pastes it and gets something else

Each recipe is loaded by the package’s own loader in a one-off script and its effect asserted (yolo’s alwaysAsk non-empty; auto’s judge authority still advise; pi-vertex loadConfig returns the entry with the knob), before the page says "copy-paste safe".

A "current rule" stated wrong while cutting history

silent

Every rule sentence that replaces a narrative is checked against the code it describes at edit time, and the commit message lists the code files each page’s changed claims rest on (Review-Context), so the cold reader can check them too.

The config.ts doc comment (timeoutMs "Default 15000")

silent

Changed to the runtime’s 45 000 with JUDGE_DEFAULTS named; no behaviour touched. typecheck and the judge suite run as they do.

An xref to a heading that moved

loud

node tools/task.mjs check-docs runs in validate per commit and fails on a broken xref.

Cutting a fact a reader still needed

silent

History moves to a [NOTE] or the CHANGELOG (which already carries it); nothing about what happens today is cut, only how it came to be.

Delivery

Docs-only, but a change all the same: CHANGELOG.adoc == Unreleased gets one Changed entry for the pass (the harmful recipes named, the pages restructured) in the first commit and it grows per group — that is the changelog’s new entry; the pass does not reword released entries. Each group is one commit on docs/readability-pass, cold-read; the branch merges as one MR Closes #200; a note on #200 with the merge SHA and anything left; the plan’s Status → Done in the last commit. No release cut for docs alone — the entry ships with the next one.

Verification

Per commit: node tools/task.mjs validate (which runs check-docs and plan-lint); every JSON recipe in tuning.adoc pasted into a scratch overlay and loaded by the package’s own loader (loadModesConfig / pi-vertex loadConfig) in a one-off script, so "copy-paste safe" is observed, not asserted; a paragraph-length scan (awk over the page for runs of more than twelve non-blank lines outside code blocks and tables) reported in the message. After the last commit: the Antora build (build/site) opened for the three user pages to check the tables render.

Scope

In: C1–C5 as listed; the config.ts:79 doc comment; nav unchanged.

Out (named): behaviour changes the inventory suggested (an overlay merge for vertex-models.json; a hot reload on /model; a check-docs rule for paragraph length) — each an issue if wanted; ADR bodies and plan records; the battery’s rendered tables; the CHANGELOG’s released entries (a release note is a record; the pass adds its own entry under Unreleased); pages under standards/ that arrive with the guidance package.

Erratum ledger:

  • Erratum (2026-09-23, C1): the catalog recipes start from a copy of the shipped models.json, not a one-entry complete file — pasted, a one-entry file strips the catalog to one model — and the probe’s --json output carries placeholder zero rates, so the page calls it the list of what answered, not a catalog. The knob sections say their key goes into that copy. Found while loading the recipes: the old yolo valve recipe also replaced the shipped twelve valve patterns for auto and plan with three; the page now says a top-level safetyValve replaces the list and names what the shipped one holds.

  • Erratum (2026-09-23, C2): check-docs is a stub for synced-standards drift and does not check xrefs, as the Risks table said. Each commit is verified instead by an Antora build of the site (npx antora --to-dir <tmp> antora-playbook.yml, which reports an unresolved page xref) and a one-off anchor check (every in-page cross-reference and xref:…#id against the ids the pages define, confirmed against the built HTML). The first build found three pre-existing breaks outside this pass’s pages so far: `adrs/index.adoc’s seven links resolve against the wrong directory (C5 fixes the index, not the ADRs), and two plan records link to renamed plans (records; left).

  • Erratum (2026-09-23, C4): security.adoc’s paired-device text became its own `== A paired device section with five subsections rather than one ===, and gained a line on the local hub’s boundary (the 0600 socket, the connection as identity), which the page omitted. The overrides stay a bulleted list — a date / rule / local form / tracking table read worse; at the operator’s decision the 2026-09-07 closing-comments override is retired (this repo merges through MRs) and the plans override says plan-lint --done was not adopted (#69 closed). local-dev.adoc’s battery text also used a retired `--role flag and --out directory; it now names tasks and the store. validate does not run check-docs.

  • Erratum (2026-09-23, C5): the battery’s defaults argument is a list per role inside battery.json’s `defaultsNote, not a subsection per role — a subsection needs a render.mjs change, and the pass is docs-only. The page’s head and defaults paragraph were mirrored by hand from page-head.adoc and the note rather than re-rendered, because a render also adds the Opus 5.5 and Sonnet 5 rows (not measured) that #196’s fill will render; a fresh render differs from the page by exactly those rows. Also fixed: `index.adoc’s "the same diff then commits on retry" (a FLAGS retry needs each finding fixed or answered); `adrs/index.adoc’s ADR-001 title, to match the ADR; `remote.adoc’s headless section, which listed pivot among the RPC hosts its own note excluded.

Edit this page · latest