carlos / platform Public

spec rev 3.1: parity guard, stock + console guard; CLI registry to slice 4

Paul chose round 3's cut. This slice lands the table (qualified shared
members incl. mode qualifiers, R3-4), the generated page, and the console
declaration list with per-config equality and the security scanners'
migration (R3-5). CLI: structure + top-level coverage via docsite's
scanner. CLI registry and argument model move to slice 4.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 1f9f997b6992f82dffd006c834d0296d01f85a4c parent e6db522
1 file changed, +161 −216
  • docs/superpowers/specs/2026-11-09-parity-guard-design.md +161 −216

CI cancelled — superseded by a newer push — run details

Intent

Human

<paseo-system version="1" kind="agent-message" source-agent-id="3fb889a2-3c02-4a5b-bff5-0b94623ca20d" message-id="0aad73cd-682f-48d1-bcfd-861165f7fee9" source-agent-title="Parity guard spec rev 3 (registry) + Astra round 3 (design)"> Parity guard rev 3 done; Astra round 3 (last): NOT READY. Branch design-parity-guard pushed, e6db522e (rev 3 2ad9b6e4, findings docs/superpowers/specs/CODEX-FINDINGS-parity-guard-R3.md). Closed: R2-3 and R2-4 (console enumeration family CLOSED via declaration list + per-config equality); census/docsite note resolved. Still open: CLI enumeration and capability granularity. One P1, one cause: the registry Dispatch contract has no argument model (consumed Params never reach handlers, e.g. config destinations add &lt;name&gt;; flags-before-verb like steering latency|off; interspersed flags). P2s: legacy leaves have no Run so A2 rejects them and C1 coverage misses them; legacy string-presence pin cannot prove path (apps source delete); flag-name qualifiers cannot split env set --environment existing vs new (need mode qualifiers); step 0 must migrate console security scanners (scanCLISource, TestEveryCLIDoorNamesItsRoles, TestAuthCLIFamilyResolvesOnlyPersons). Astra: refusing the forms breaks compatibility; suggested cut = land the stock + console guard first, defer CLI dispatch change and automated CLI coverage until an argument contract is settled. Stopped per brief; no P2s applied. </paseo-system>

Human

<paseo-system version="1" kind="agent-message" source-agent-id="55f1f6a4-252a-4d89-af7b-a8a460b2b81d" message-id="ce0077bb-04b3-4c7b-bc7a-da36d629f3ee"> Coordinator: Paul chose the cut. Write rev 3.1 (no new review round; the remaining P1 and the CLI-family P2s are removed by the cut): land (1) the parity table with the row model, shared references with flag/mode qualifiers allowed in rows, structural status rules and negative fixtures; (2) the generated docs/parity.md with counts; (3) the console guard: the declaration list production registration consumes, per-config static-vs-runtime equality, forwarding-helper boundary, cliRoute family excluded from parity coverage but kept in equality, and step 0&apos;s migration of the console security scanners. CLI rows stay in the table, checked by a lightweight test only for structure (and, if cheap and exact, top-level command coverage from the existing docsite scanner), not full verb enumeration. The CLI command registry with an argument model moves to slice 4 (MCP connector) as a stated non-goal here, with a pointer to round 3&apos;s findings. Apply any round-3 P2 that still applies to the kept scope. Commit, push, report the commit and a 5-line summary, then stop. </paseo-system>

Attributed to this commit: 23.0 g CO₂e (2,683,869 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on design-parity-guard, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.

diff --git a/docs/superpowers/specs/2026-11-09-parity-guard-design.md b/docs/superpowers/specs/2026-11-09-parity-guard-design.md
index ae9e3e6fd..1c28eae13 100644
--- a/docs/superpowers/specs/2026-11-09-parity-guard-design.md
+++ b/docs/superpowers/specs/2026-11-09-parity-guard-design.md
@@ -1,12 +1,15 @@
# CLI and console parity: the stock and its guard (slice 3)
-Status: rev 3 for Paul, 2026-11-09. Astra round 1:
-`CODEX-FINDINGS-parity-guard.md` (NOT READY: P1 CLI enumeration, three P2s),
-all accepted, marked **(codex N)**. Astra round 2:
-`CODEX-FINDINGS-parity-guard-R2.md` (NOT READY, stopping rule 2: P1 CLI
-enumeration, three P2s), all accepted, marked **(codex R2-N)**. Paul's ruling
-after round 2: enumerate from registries the code dispatches from, not from
-scanners. Slice 3 of "agent-first onboarding and console parity".
+Status: rev 3.1, 2026-11-09. Astra round 1:
+`CODEX-FINDINGS-parity-guard.md` (all accepted, **(codex N)**); round 2:
+`CODEX-FINDINGS-parity-guard-R2.md` (all accepted, **(codex R2-N)**); round
+3, the last: `CODEX-FINDINGS-parity-guard-R3.md` (NOT READY: one P1, the CLI
+registry's missing argument model). Paul chose the cut Astra named: this
+slice lands the stock, the generated page and the console guard; the CLI
+command registry, with an argument model, moves to slice 4 (MCP connector).
+Round-3 P2s that apply to the kept scope are applied, marked
+**(codex R3-N)**; R3-1 to R3-3 are removed by the cut. No further review
+round. Slice 3 of "agent-first onboarding and console parity".
## Why
@@ -33,17 +36,16 @@ listed apart.
- `box-local` / `operator` (outside customer parity; listed so the guard
sees them).
A column is reserved for the MCP tool (slice 4), empty for now.
-2. **The guard:** a Go test that fails when the table and the code disagree:
- - a CLI command or subcommand exists that has no row;
- - a customer-facing console browser action (page or form POST route,
- not the `/api/cli/*` doors, which are the CLI's own API) exists that
- has no row;
- - a row names a CLI command or console route that no longer exists;
- - a row's status is not one of the allowed values, or a `gap` row has no
- work package, or a `cli-only`/`console-only` row has no reason.
- Both lists come from registries production dispatches from (the CLI
- command registry and the console route declaration list, below), never
- from a scanner or a second hand-kept list **(codex R2-1, R2-3, R2-4)**.
+2. **The guard:** Go tests that fail when the table and the code disagree:
+ - console: a route the console registers has no row (except the
+ `/api/cli/*` doors, the CLI's own API), or a row names a route the
+ console does not declare; routes come from the declaration list
+ production registers from (B), checked for equality with what is
+ registered under every configuration;
+ - CLI: the table's structure, and every top-level command main.go
+ dispatches has a row (C5). Full verb-path enumeration is not in this
+ slice (see Non-goals);
+ - any row whose status, members or note break the rules (C3, C4).
The failure message says exactly which row to add or fix.
3. **A readable view:** `docs/parity.md`, generated from the table
(`make parity-doc`), grouped by area, with counts per status at the top;
@@ -59,8 +61,9 @@ listed apart.
## Goals
-- Drift becomes a failing test, not a surprise: a new CLI command or console
- action cannot land without its row.
+- Drift becomes a failing test, not a surprise: a new console route or a
+ new top-level CLI command cannot land without its row (CLI subcommands
+ by the AGENTS.md rule until slice 4's registry makes them a test too).
- Anyone can see the state of parity in one page, with counts.
- Closing a gap is visible: the row moves from `gap` to `both` in the same
branch that builds the missing side.
@@ -68,7 +71,14 @@ listed apart.
## Non-goals
Closing any gap (each package is its own later design); the MCP connector
-(slice 4; the CLI registry carries what it will need, nothing is built);
+(slice 4). **Full CLI verb enumeration and the CLI command registry** are
+slice 4's, not this slice's: a registry the CLI dispatches from needs an
+argument model first (consumed positionals delivered to handlers, verbs
+after flags, interspersed flags; R3-1), and its legacy adapter's coverage
+and conformance problems (R3-2, R3-3) go with it. Rev 3's section A
+(commit `2ad9b6e4`) and `CODEX-FINDINGS-parity-guard-R3.md` are slice 4's
+starting point. Until then CLI rows below the top level are kept by hand
+and checked for structure only;
judging whether a console page is good (only whether the capability exists);
API-door parity (`/api/cli/*` vs CLI is already one-to-one by construction).
@@ -81,220 +91,155 @@ API-door parity (`/api/cli/*` vs CLI is already one-to-one by construction).
## Constraints
AGENTS.md: amadan discussions not GitHub; touched-package tests locally, CI
-full. **Census (codex R2, closing note):** the CLI registry changes the root
-binary's production dispatch (package main, a new `internal/clireg`, and the
-dispatching functions of `internal/cgroup`, `internal/host`,
-`internal/ops`, `internal/hostenv`, `internal/edge`, `internal/vet`,
-`internal/instanceexec`), so every CLI step below carries a census card
-(class: argument routing; no root-read unit changes) and needs the
-independent reviewer's approval before its merge. The console half is out of
-census scope (`internal/console`). Add a short AGENTS.md rule: a new CLI
-command is a registry node and a new console route is a declaration, each
-with its `parity/parity.tsv` row in the same branch.
+full. Census: none expected. `internal/console` is outside census scope;
+the table parser and page generator live in a new `internal/parity`
+package that the root binary does not import; `internal/docsite` stays
+unlinked; nothing in package main changes. The builder runs `make
+census-card` to confirm. The console security scanners change (B5): that
+part gets the repository's security review. Add a short AGENTS.md rule: a
+new CLI command or subcommand, and a new console route declaration, add
+their `parity/parity.tsv` row in the same branch.
-## Calls (rev 3: registries, Paul's ruling 2026-11-09)
+## Calls (rev 3.1)
-### A. The CLI command registry **(codex R2-1)**
+### A. (Moved to slice 4) The CLI command registry
-1. **One tree the CLI dispatches from.** A new package `internal/clireg`
- (no dependencies beyond the standard library) defines `Node`: `Name`,
- `Aliases`, `Summary` (one line), `Params` (named positionals, in order),
- `Children`, `Default` (the child that runs when the next argument is a
- flag or absent, e.g. `config destinations` -> `list`), `Run func(args
- []string)`, and the metadata in A4. `main()` becomes: the early phase
- (A3), `rootaws.ScrubEnvironment()`, the error writer, then
- `clireg.Dispatch(root, os.Args[1:])`, then `maybeUpdateHint` with the
- matched top-level word. `Dispatch` walks words: at a node with children
- the next argument must be a child name or alias, or a flag/absent with
- `Default` set; at a node with `Params` it consumes them; at a node with
- `Run` it calls `Run` with what is left. Anything else is the existing
- usage error (stderr, exit 2). There is no other way for an argument word
- to select code, so the registry is complete by construction.
-2. **Refused up front, by `clireg.Validate` (panics at init, unit-tested
- with one negative fixture each):** a level that takes both child words
- and a positional value; a node with neither `Run` nor children; a
- duplicate name or alias among siblings; an alias equal to a sibling name;
- a leaf with zero-valued metadata (A4); `Audience: internal` on a word
- that does not start with `__` and is not a help alias. The current
- ambiguous shapes become declared structure: `version` bare prints the
- build and `version target` is a child (`Default` = the bare print);
- `channels`/`releases` bare list via `Default`; `apps source pull`'s
- valid bare form is a declared `Default`; `instances import
- commit/abort` are nested children; `move offline <verb>` is eight
- declared children, and `offlineVerbs` becomes the registry's child list
- rather than a slice a parser consults (the R2-1 collection case).
- Handler maps keyed on argument words are not a registry and cannot
- dispatch: a word reaches code only through `Dispatch`.
-3. **Plumbing dispatched before main's switch.** `internal/cgroup` exports
- its shim words as nodes (`ShimCommands()`, names from its existing
- constants); `main()` calls `clireg.DispatchEarly(cgroup.ShimCommands(),
- os.Args[1:])` as its first statement, preserving today's order (before
- the environment scrub; the `shimHooked` invariant unchanged).
- `__demo-snapshot`, `__registry-child` and the `__rootfs-check-*` words
- become ordinary `internal` nodes in the main tree, still dispatched
- before any other word because they are matched first by name.
-4. **Metadata for slice 4 (MCP), required on every runnable node now:**
- `Effect` (`read` | `write` | `destructive`), `Auth` (`none` |
- `console-login` | `operator` | `box-root`), `Audience` (`customer` |
- `operator` | `box-local` | `internal`), `Summary`, `Params`. Zero values
- are refused (A2). Flags stay in each handler's `flag.FlagSet` for now; a
- reserved `Flags func(*flag.FlagSet)` field, nil in this slice, is where
- slice 4 declares them so MCP tool schemas can be generated. A node's
- stable ID is its path joined with spaces (`apps set`), the ID the
- parity table and later the MCP tool name use.
-5. **Migration with an adapter, the guard complete at every step.** A node
- may be `Legacy`: its `Run` is an unmigrated dispatcher (`RunApps`) and
- its `Children` declare that dispatcher's whole word tree (names, aliases,
- nesting, `Default`, `Params`) with no `Run` on the declared descendants.
- `Dispatch` walks a legacy node's declared tree exactly as A1 (the gate)
- and refuses any undeclared word, then calls the legacy `Run` with the
- original arguments. A word the legacy code would act on but the tree
- does not declare is therefore unreachable, so the enumeration stays
- complete. Two pins keep the adapter honest until it is deleted:
- - a level the gate cannot close (word or value at the same position, or
- words found after flags) is not allowed under `Legacy`: those commands
- are fully migrated in step 0;
- - `testdata/clireg-legacy.tsv` lists each remaining legacy node and a
- go/ast hash of each of its dispatching functions' bodies. The list may
- only shrink, and a branch that changes a pinned function must migrate
- that command instead of re-pinning (the test says so). A stale
- declaration (declared word the legacy code no longer handles) is
- caught by the same test: each declared word under a legacy node must
- appear as a string constant in the pinned functions.
- Migrated nodes need neither pin: their `Run` is the leaf handler.
-6. **Steps (each one reviewable branch, census card each):**
- - **Step 0:** `internal/clireg` with `Validate`, `Dispatch`,
- `DispatchEarly` and the adapter; main's switch and if-chains replaced by
- the root tree (every top-level command a migrated or legacy node);
- the cgroup early phase; full migration of every command A5 bars from
- `Legacy` (expected: `move`, `version`, `channels`, `releases`, `config`,
- plus any the builder's audit finds); the docsite move (A7); the
- parity table, both guards and `docs/parity.md` (sections B and C).
- - **Steps 1-6**, about eight dispatchers each, by area: (1) apps,
- appconfig, env, secrets, features, assets; (2) instances, sidecars,
- schedule, run, db, devbox; (3) domains, routes, gate, ratelimit,
- protection, analytics, geo, errors, logs; (4) store, email, relay,
- services, fleets, accounts, auth, billing; (5) pipeline, skills,
- ship/deploy/canary/promote/rollback, economics, steering, ledger,
- proof, update; (6) system, ops, console, the host/edge/vet/
- instanceexec packages (each exports its subtree as `[]clireg.Node`;
- their dispatchers move like main's).
- - **Step 7:** delete the `Legacy` field, its gate path and the pin file.
- Each step changes no command's behaviour except refusing words that were
- silently ignored (e.g. `carlos version foo`, today the build id); the
- builder lists every such tightening in the step's PR.
-7. **Docsite projection moves onto the registry (codex R2 closing note).**
- `internal/docsite.TopLevelCommands` (the main.go AST scan) is deleted.
- `docsite` gains `CommandsMissingHeadings(site, cmds []string)`; the gate
- test `TestCLICommandsAreDocumented` moves to package main and calls it
- with the projection `root.TopLevel()`: top-level names, excluding
- aliases and `internal` nodes, so `-h`/`--help` stay excluded and
- headings are still required. Step 0's test asserts the projection
- equals today's scanner output (pinned list in testdata) so the move
- changes nothing; the scanner's own non-vacuity test becomes a
- non-vacuity test on the projection (at least 20, `ship`, `deploy`,
- `fleets` present).
+Rev 3's section A is withdrawn from this slice (see Non-goals). The CLI
+stays as it is: main.go's switch and each command's own dispatcher.
### B. Console route declarations **(codex R2-3, R2-4)**
1. **One declaration list production registers from.** `internal/console`
- gains `routeDecls []routeDecl`: `Method`, `Pattern` (literal, exactly as
- registered; methodless keeps an empty method), `Kind` (`plain` |
- `cli` | `cli-journaled` | `cli-scoped`, which picks today's helper
- wrapper: `registerRoute`, `cliRoute`, `cliRouteJournaled`,
+ gains `routeDecls []routeDecl`: `Method`, `Pattern` (string literals,
+ exactly as registered; methodless keeps an empty method), `Kind`
+ (`plain` | `cli` | `cli-journaled` | `cli-scoped`, which picks today's
+ helper: `registerRoute`, `cliRoute`, `cliRouteJournaled`,
`cliScopedRoute`, with their `allow`, `refused` and `target` as fields),
`Gate` (a named predicate over `Config`, nil = always; e.g. `gateDemo` =
- today's `Demo.Enabled || Demo.BoxMode()`), and `Handler func(*Server)
- http.HandlerFunc` (method values and closures alike). `s.routes()` is a
- loop: for each declaration whose gate holds, call its helper. The
- helpers stay the only wrappers, but their pattern now always comes from a
- declaration, so the forwarding-helper boundary is the declaration itself
- (R2-4): no call-site scan, no literal-pattern rule.
-2. **One registrar.** `TestClaimConsoleMuxHasOneRegistrar` is extended: the
- only call sites of `registerRoute`, `cliRoute`, `cliRouteJournaled` and
- `cliScopedRoute` in non-test code are the declaration loop and the
- helpers forwarding to `registerRoute`; anything else fails with its
- location. So a registration cannot exist outside the list.
+ today's `Demo.Enabled || Demo.BoxMode()`), and the handler as exactly
+ one of `Method` (a method expression, `(*Server).handleHome`) or `Build`
+ (a function literal `func(s *Server) http.HandlerFunc` returning a
+ function literal, for handlers that close over state). `s.routes()` is
+ a loop: for each declaration whose gate holds, call its helper. The
+ helpers stay the only wrappers and now get their pattern only from a
+ declaration, so the forwarding-helper boundary is the declaration
+ itself (R2-4).
+2. **One registrar.** `TestClaimConsoleMuxHasOneRegistrar` is extended: in
+ non-test code the only call sites of `registerRoute`, `cliRoute`,
+ `cliRouteJournaled` and `cliScopedRoute` are the declaration loop and
+ the helpers forwarding to `registerRoute`, and the only `mux`
+ registration is `registerRoute`'s; anything else fails with its
+ location. So a route cannot be registered outside the list.
3. **Static/runtime equality across configurations (R2-3).** The test
builds the server under a matrix of configurations (every named gate on
- and off at least once; the matrix lives beside the gates and a gate not
- flipped by it fails). For each configuration, the runtime register
- (`claimEntries`, kind `route`) must EQUAL the declarations whose gate
- holds; across the matrix every declaration must be registered at least
- once (an unexercised declaration fails); and a non-empty list is
- checked first (empty discovery fails on its own). Negative fixtures: a
+ and off at least once; a gate the matrix never flips fails). For each
+ configuration the runtime register (`claimEntries`, kind `route`) must
+ EQUAL the declarations whose gate holds; across the matrix every
+ declaration is registered at least once (an unexercised declaration
+ fails); a non-empty list is checked first. Negative fixtures: a
declaration whose gate is never true; a group function kept but its
- loop entry or gate disconnected (R2-3's `registerDemoRoutes` case); a
+ gate or loop entry disconnected (R2-3's `registerDemoRoutes` case); a
direct registration outside the loop.
4. **CLI doors.** Declarations of kind `cli*` are the `/api/cli/*` doors:
- in the equality check, out of parity coverage (they are the CLI's API,
- one-to-one by construction). The exclusion comes from `Kind`, not a
- prefix.
-5. **Migration:** console is out of census and has one registrar, so it
- moves in one mechanical branch inside step 0 (one commit per source
- file: `server.go`, `authcli.go`, `apidemo.go`, `teamdoors.go` and the
- rest). `registerDemoRoutes` and similar group functions become gated
- declarations.
-
-### C. The table and the guard
+ in the equality check, out of parity coverage. The exclusion comes from
+ `Kind`, not a prefix.
+5. **The console security scanners move with the registrations**
+ **(codex R3-5).** `scanCLISource` (`svcroutes_test.go`) today reads
+ literal patterns at registration calls; after B1 those calls pass
+ declaration fields, so it is rewritten, in the same branch, to read the
+ `routeDecls` composite literal instead: each element's `Pattern`,
+ `Kind`, and handler (`Method` resolved to its `FuncDecl` by name,
+ `Build` to its function-literal bodies). Every check it feeds keeps its
+ strength:
+ - **Bypass detection:** the package-wide pass still fails on any
+ `/api/cli/` pattern that is not a `cli*` declaration, and on any
+ registration or mux call outside B2's allowed sites (the "only
+ exemption" comment moves to the loop and the helpers).
+ - **`TestEveryCLIDoorNamesItsRoles`:** every `cli*` declaration names
+ its roles; the doors absent from `cliRoles` in the default
+ configuration are exactly those whose gate is off there, read from
+ `Gate` (the hand lists `hostClaimDoors` and `regionHADoors` become a
+ check that those doors' declarations carry the expected gates).
+ - **`TestAuthCLIFamilyResolvesOnlyPersons`:** runs over every `plain`
+ declaration's handler body as today; a handler that is neither a
+ method expression nor a function literal still fails ("this test
+ cannot see inside it"); the named presence checks of the `/auth/cli/`
+ family stay.
+ - **Non-vacuity:** each test keeps its own minimum and named-presence
+ assertions, and a scan that finds no declarations fails first.
+ This part gets the repository's security review (Constraints).
+6. **Migration:** one mechanical branch, one commit per source file
+ (`server.go`, `authcli.go`, `apidemo.go`, `teamdoors.go`, then the
+ rest), with B5's scanner rewrite and B3's equality test in the commit
+ that removes the last direct call. `registerDemoRoutes` and the other
+ group functions become gated declarations.
+
+### C. The table, the page and the CLI check
1. **Rows are capabilities; coverage is separate from reference**
- **(codex 3)**. A row lists zero or more CLI members and zero or more
- console members. Coverage: every runnable registry node not `internal`
- and every non-`cli*` route declaration appears in at least one row.
- Duplicate row IDs and duplicate members within a row are invalid.
-2. **Shared members with qualifiers (codex R2-2).** A CLI member is a node
- ID with an optional flag qualifier: `apps set [--swap,--swap-concurrency]`,
- `apps set [--interactive]`, `apps set [--egress-allow,--size]` may be
- three rows with three statuses (parity, gap, operator). A node ID in
- more than one row must carry a qualifier in every one of them, and the
- qualifiers must be pairwise disjoint; an unqualified member owns the
- whole node and may appear in one row only. Console routes may be shared
- across rows without qualifiers (one GET page serving several settings
- sections). In this slice a qualifier's flags are checked for shape and
- disjointness only: flags are not in the registry until slice 4 fills
- `Flags`, and from then the guard also checks each qualified flag
- exists on its node.
-3. **The table classifies, not a prefix list** (rev 2 call 2). Statuses:
- `both`, `partial`, `gap`, `cli-only`, `console-only`, `operator`,
- `box-local`, and for non-customer routes `auth`, `demo`, `asset`,
- `internal`. A row whose CLI members have `Audience` operator or
- box-local must have that status (the registry's audience and the table
- cannot disagree). Counts in `docs/parity.md` cover customer rows only.
+ **(codex 3)**. A row lists zero or more CLI members (a command path as
+ typed, e.g. `apps set`) and zero or more console members (a
+ declaration's method and pattern). Every non-`cli*` declaration
+ appears in at least one row. Duplicate row IDs and duplicate members
+ within a row are invalid.
+2. **Shared members with qualifiers (codex R2-2, R3-4).** A member may
+ carry a qualifier naming the part of the command or page the row is
+ about: flags (`apps set [--swap,--swap-concurrency]`, `apps set
+ [--interactive]`) or a mode in words (`env set [--environment,
+ existing bundle]` as `both`, `env set [--environment, new bundle]` as
+ `gap`). A member that appears in more than one row carries a qualifier
+ in every one, and the qualifiers of one member are pairwise distinct (as
+ written; the guard does not interpret them). An unqualified member owns
+ the whole command or route and appears in one row only. A console route
+ may also be shared without qualifiers (one GET page serving several
+ settings sections), since a route's capabilities are its rows.
+3. **Statuses, and the table classifies, not a prefix list.** `both`,
+ `partial`, `gap`, `cli-only`, `console-only`, `operator`, `box-local`,
+ and for non-customer routes and CLI plumbing `auth`, `demo`, `asset`,
+ `internal`. Counts in `docs/parity.md` cover customer rows only.
4. **Structural rules per status** **(codex 4)**, each with a negative
fixture: every row non-empty; `both`/`partial` list at least one member
on each side, `partial` with a note saying what is missing; `gap` lists
- members on exactly one side and names its work package;
- `cli-only` only CLI members, `console-only` only routes, both with a
- reason; `auth`/`demo`/`asset`/`internal`/`operator`/`box-local` have a
- reason.
-5. **Stale references fail:** a CLI member that is not a node ID, a
- console member that is not a declaration, a qualifier on a node with
- one row.
-6. **Two tests, one table:** the console test (package console) checks
- routes against `routeDecls`; the root test (package main) checks node
- IDs against the registry and the generated page. Both read
- `parity/parity.tsv`. `make parity-doc` regenerates; the stale check
- regenerates and diffs. Failure messages name the exact row to add or
- fix.
-
-## Round-2 findings, closed
-
-- **R2-1 (P1, CLI enumeration):** closed by construction: the CLI dispatches
- from the registry (A1); collection, map and returned-value dispatch cannot
- select code (A2); the transitional adapter gates undeclared words and pins
- legacy dispatchers until they migrate (A5).
-- **R2-2 (P2, shared CLI references):** qualified shared members (C2).
-- **R2-3 (P2, disconnected registrations):** declaration list plus
- per-configuration equality and an unexercised-declaration failure (B3).
-- **R2-4 (P2, forwarding helpers):** patterns live in declarations; helpers
- only wrap; the `cli*` kinds are doors, in equality, out of coverage
- (B1, B4).
-- **Census and docsite notes:** census card per CLI step (Constraints);
- docsite projection moved onto the registry with its tests (A7).
+ members on exactly one side and names its work package; `cli-only` only
+ CLI members, `console-only` only routes, both with a reason;
+ `auth`/`demo`/`asset`/`internal`/`operator`/`box-local` have a reason.
+ Also negative fixtures for C2: a shared member left unqualified in one
+ row, and two equal qualifiers on one member.
+5. **The CLI check is light and exact.** It reuses
+ `docsite.TopLevelCommands` (the main.go switch scan, with its existing
+ non-vacuity test) unchanged. Every word it returns is the first word of
+ at least one CLI member, and every CLI member's first word is one it
+ returns, except members whose first word starts with `__` (the
+ plumbing words dispatched before the switch, e.g. `__demo-snapshot`
+ and `internal/cgroup`'s shim words), which are checked for shape only.
+ Words below the top level are checked for shape (lower-case words and
+ hyphens) and not against the code: they are kept by hand until slice
+ 4's registry, and the page says so in one line above the CLI counts.
+6. **The page.** `docs/parity.md` is generated from the table (`make
+ parity-doc`), grouped by area, counts per status at the top (customer
+ rows only); the stale check regenerates and diffs.
+7. **Where the tests live.** `internal/parity` holds the table parser, the
+ rules of C1-C4, the page generator and their fixtures, plus the CLI
+ check (C5) and the stale-page check. The console's coverage test (C1
+ against `routeDecls`) lives in package console and calls
+ `internal/parity` for the table. Both read `parity/parity.tsv`. Failure
+ messages name the row to add or fix.
+8. **Seed.** The table starts from the inventory, every console row
+ checked against the declarations and every CLI row's command read
+ against its dispatcher at build time (the inventory is a starting
+ point, not truth).
+
+## Review findings, where they went
+
+- **R1 (all), R2-2, R2-3, R2-4:** applied (B, C).
+- **R2-1, R3-1, R3-2, R3-3 (CLI enumeration, registry):** moved to slice 4
+ with the registry; this slice checks top-level coverage only (C5).
+- **R3-4 (mode qualifiers):** applied (C2).
+- **R3-5 (console security scanners):** applied (B5).
+- **R2 census/docsite note:** no root-binary change in this slice;
+ `docsite`'s scanner is reused unchanged (C5).
## Left to the builder
-The table format details, the docs page layout, the exact work-package IDs,
-the gate names and test matrix, and the exact grouping of steps 1-6 (any
-grouping that keeps each branch reviewable and each step's guard complete).
+The table format details, the docs page layout, the exact work-package
+IDs, the gate names and the configuration matrix.