Ledger · cli-registry-words
<task-notification> <task-id>bab848bk4</task-id> <tool-use-id>toolu_01Pfd4Hxvv9HRg8na3Nz5Ypv</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/27979b8d-cc90-4f50-88f6-87ba41433627/tasks/bab848bk4.output</output-file> <status>completed</status> <summary>Background command "Wait for design branch CI" completed (exit code 0)</summary> </task-notification>
<task-notification> <task-id>beb5am19l</task-id> <tool-use-id>toolu_01C6C43BzK4qsWPRJs5rxYUj</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/27979b8d-cc90-4f50-88f6-87ba41433627/tasks/beb5am19l.output</output-file> <status>completed</status> <summary>Background command "Wait for Astra plan review" completed (exit code 0)</summary> </task-notification>
<task-notification> <task-id>af54ac42ca43b7269</task-id> <tool-use-id>toolu_01A3xnBPeYyPUy4ZWUCdXo7Y</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/27979b8d-cc90-4f50-88f6-87ba41433627/tasks/af54ac42ca43b7269.output</output-file> <status>completed</status> <summary>Agent "Implement Task 1 clireg core" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>Task 1 is committed as `fb0bba0d3601780fd06ee0f8197f0a0f36ec1888` on `cli-registry-words`, with subject `clireg: node tree, walk and Validate (CLI registry step 1)`. git printed the "packed-refs.lock" error, but the branch and HEAD both point at the commit and the tree is clean. `go test ./internal/clireg/ -v` and `go vet ./internal/clireg/` pass, and `gofmt -l internal/clireg` prints nothing. The package imports only `fmt` and `strings`. **Files** (all new, in `/home/paulca/amadan.net/carlos/platform/.claude/worktrees/cli-registry-words/internal/clireg/`): `clireg.go`, `dispatch.go`, `validate.go`, `dispatch_test.go`, `validate_test.go`. **Tests, all passing:** - `TestDispatchWalk`: 21 rows. They cover every case in the plan, plus `instances create a`, bare `canary`, bare `config destinations`, `system router nope`, bare `system` and a root fallback. Each row also checks `ID(Dispatch(...))`. - `TestDispatchRawIsUnchanged` - `TestDispatchOnError`: the nearest handler is called, including through nested branches, and a leaf that returns nil calls nothing. - `TestDispatchErrorWithoutOnErrorPanics`: the panic message names the ID. - `TestRawArgs` - `TestRunnable` - `TestValidate`: 18 negative fixtures, one or more per rule in spec A8, each checking that an error starts with the node's ID. - `TestValidateInternalWord`: `__demo-snapshot` with the internal audience is accepted. - `TestValidateWalkFixture`: the walk fixture returns no errors. - `TestValidateReportsEveryError` Every test passed on its first run, so I checked that the walk table catches a real bug. Removing the "drop a transparent word only once per level" line made `system router router` fail, and I put the line back. `go vet` and `go test` could not write to `~/.cache/go-build` inside the sandbox ("read-only file system"), so I ran them with the sandbox off and `GOCACHE` at its default. Nothing was written to `$TMPDIR` or `/tmp`. **Decisions the plan and clarifications did not settle:** 1. **Audience constants are all typed.** The plan's block, as written, would make `Operator`, `BoxLocal` and `Internal` untyped strings. All four are now typed `Audience`; the names are unchanged. 2. **What Dispatch returns.** Transparent nodes are left off the returned path. An unnamed `DefaultLeaf` is on it, so its `NoUpdateHint` counts. `ID` skips the root, transparent nodes and a branch's `DefaultLeaf`, so `ID(path)` is always the canonical ID. 3. **Words recorded in `consumed`.** It holds canonical names, including for transparent nodes (`router`), not the alias the user typed. 4. **One Validate rule is stricter than the spec.** The spec only refuses a branch with neither a default nor a `Fallback`. I also refuse a branch whose `DefaultOn` doesn't admit absent, flag and word but has no `Fallback`, because at runtime that case has nowhere to go. 5. **Extra Validate checks.** `Default` must name a leaf child. A `DefaultLeaf` must be a leaf with an `Audience`, and the `__` prefix check for `Internal` applies to the branch's name. A child with no name and a nil child are refused. Duplicate checks include transparent siblings' names, and an alias that repeats the node's own name is ignored. 6. **Not checked in Validate.** I did not refuse a nonzero `DefaultOn` with no default. Validate also cannot tell statically whether a leaf will return an error with no `OnError` above it, so the panic in `Dispatch` is the only guard for that. 7. **Order of default entries in Runnable.** A branch's unnamed default comes before its children (`instances (default)`, then `instances create`). The root's `DefaultLeaf`, if it ever has one, produces no entry. 8. **Runtime panics.** `Dispatch` panics, naming the ID, if a branch has no match, no applicable default and no `Fallback`, or if `Default` names a missing or non-leaf child. These are runtime backstops for what Validate refuses. 9. **`Invocation.Raw`** shares the caller's array, is never modified, and is an empty slice rather than nil when no arguments remain.</result> <usage><subagent_tokens>72528</subagent_tokens><tool_uses>19</tool_uses><duration_ms>214885</duration_ms></usage> </task-notification>
<task-notification> <task-id>bnueq2o2m</task-id> <tool-use-id>toolu_019kiuzxgszZ6Yqxwm525VKi</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/27979b8d-cc90-4f50-88f6-87ba41433627/tasks/bnueq2o2m.output</output-file> <status>completed</status> <summary>Background command "Mark T1 started; wait for plan round 2" completed (exit code 0)</summary> </task-notification>
<task-notification> <task-id>buy2qcblc</task-id> <tool-use-id>toolu_01D6Q3gmbNbw1KF7bNaofHpn</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/27979b8d-cc90-4f50-88f6-87ba41433627/tasks/buy2qcblc.output</output-file> <status>completed</status> <summary>Background command "Wait for Astra T1 review" completed (exit code 0)</summary> </task-notification>
<task-notification> <task-id>a4abb02b71cd5d717</task-id> <tool-use-id>toolu_01WVGY93yrnWcR4faGWSNMff</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/27979b8d-cc90-4f50-88f6-87ba41433627/tasks/a4abb02b71cd5d717.output</output-file> <status>completed</status> <summary>Agent "Implement Task 2 main from tree" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>Task 2 is done and committed as one commit, `e7c1c945ee4adeb74eac421373b62c1d7b9ef9ac` (`cli: main dispatches from the command tree`). It printed the packed-refs.lock error, but `git log -1` and the branch both point at it and the tree is clean. All the tests you listed pass. The census tests in `internal/provision` now fail, as the plan expects until Task 9 (details at the end). **What changed** (worktree `/home/paulca/amadan.net/carlos/platform/.claude/worktrees/cli-registry-words`) - **`commands.go` (new):** `commandRoot()` builds the tree once, on first use. Every top-level word that has subcommands is one leaf calling today's dispatcher unchanged. - The root's `Fallback` prints usage to stderr and exits 2. - `help` is one leaf with aliases `-h` and `--help`. - `version` is a branch: child `target`, plus an unnamed default leaf that prints the build id on absent, flag or word. - The `__` bodies moved over verbatim. - The two shim words are built from `cgroup.Shims`, sorted, and panic if run. - **`main.go`:** the switch and the `__` checks are gone; `main()` now calls `clireg.Dispatch` and then the update hint. - **`update.go`:** `noHintVerbs` is deleted. `maybeUpdateHint(ran []*clireg.Node)` returns early if any node on the path has `NoUpdateHint`; the rest of the function is unchanged. - **`internal/cgroup/shim.go`:** new `Shims` map, and `RunShimIfRequested` dispatches from it. `TestShimsMapIsTheSwitch` added. - **Tests:** `commands_test.go` covers tree validity, the top-level word list and the hint per path. `canary_test.go` and `update_test.go` now use the path form. - **Projection:** `cli_projection_test.go` holds `TestCLIProjection` with `-update`, which writes `parity/cli.tsv`. `make parity-doc` now runs it first. - **Docsite and parity:** `internal/docsite/cliscan.go` is deleted and `internal/docsite/clinames.go` adds `TopLevelNames`. The docsite tests and `internal/parity/repo_test.go` read `../../parity/cli.tsv`. **How the channels/releases hint is kept:** `runChannelsTop` and `runReleasesTop` return true when they ran `resign`, `digests`, `retention` or `authorize`. The leaf stores that in `subVerbSkipsHint` (`commands.go:40`, `:139`, `:149`), and `main.go:41` skips `maybeUpdateHint` when it is set. Before, those four sub-verbs returned from `main()` before reaching the hint, so the result is the same. Task 5 deletes the variable once they are nodes with `NoUpdateHint`. **Tests run** - `go build ./...`: pass. - `go vet` on `.`, `internal/cgroup`, `internal/docsite`, `internal/parity` and `internal/clireg`: clean. `gofmt -l`: nothing. - `go test . -run 'TestCommandTree|TestTopLevelWords|TestUpdateHint|TestCanary|TestUpdate|TestCLIProjection'`: pass. - `go test ./internal/cgroup/ ./internal/docsite/ ./internal/parity/ ./internal/clireg/`: pass. - `TestMovesCopy*`, `TestMovesApproved*` and `TestPendingCopy*` also pass; that gate scans string literals in main.go. **Spot check:** base is the fork point `7f4bdf3a`, both binaries built with `-buildvcs=false`, run under `env -i`, with an empty HOME and an empty working directory. Every case matched. | args | stdout | stderr | exit | exit; bytes out, err | |---|---|---|---|---| | (bare) | same | same | same | 2; 0, 7460 | | help / -h / --help | same | same | same | 0; 7460, 0 | | version / version foo | same | same | same | 0; 11, 0 | | zz | same | same | same | 2; 0, 7460 | | channels -h / releases -h | same | same | same | 0; 0, 722 | | apps / apps zz | same | same | same | 1; 0, 6816 | | system | same | same | same | 2; 0, 4735 | The base worktree was removed and the scratch directory deleted. **Top-level lists:** `docsite.TopLevelCommands("main.go")` at base and `TopLevelNames` on the new `parity/cli.tsv` give the same list (checked with `diff`): `accounts add adopt agent analytics apps assets auth availability billing bootstrap canary channels config console db deploy devbox domains economics edge email env errors explain features fleets gate geo help instance-control instance-exec instance-exit instance-probe instance-stop instances ledger logs move ops pipeline promote proof protection ratelimit relay release-keygen releases remove restart rollback route routes run schedule secrets services ship sidecars skills status steering store system update version vet` **Decisions the plan did not settle** 1. **Audience where the parity rows are mixed:** I went by the most customer-facing status present. - `ops`, `status` and `system` have only operator and box-local rows, so I made them Operator (`commands.go:166,167,169`). - `devbox` (box-local and cli-only), `relay` (box-local, gap, operator), `move` (gap, operator) and `instances` are Customer, because each has at least one customer-status row (`:103,:126,:168`). - `proof` and `remove`/`route`/`add` are BoxLocal; `billing` and `economics` are Operator. - Words with no parity row (`agent`, `adopt`, `instance-*`, `remove`, `route`) are BoxLocal; `__drain-call` is Internal. 2. **The hint test can't call `Dispatch` without running handlers**, so `commands_test.go:59` copies the tree with every `Run` and `Fallback` made inert and dispatches that copy. 3. **`parity/cli.tsv` format:** two `#` comment lines, then a header line `id audience effect scope tool flags enums` (`cli_projection_test.go:31-33`). `TopLevelNames` skips `#` lines and requires the header first (`internal/docsite/clinames.go:40`). 4. **`Makefile parity-doc`** runs the test and the generator as two recipe lines rather than joined with `&&`. Make stops at the first failure, so the effect is the same. 5. **Golden skips:** - The shim words: "the cgroup shim, dispatched before main" (`commands.go:205`). - The `__` words: "plumbing". - The bare forms of edge, agent, adopt, bootstrap and instance-*: "starts a daemon or touches the box". 6. **`TestCanaryIsDispatchedNotStubbed`** now only checks that `canary` is in the tree and that something runs for it. It can no longer check for "not implemented". Task 5 tightens it. 7. **Test message wording:** the failure messages in `internal/parity/repo_test.go` now say "the binary dispatches" instead of "main.go dispatches". **Left for later** - `docs/parity.md:9` and `internal/parity/page.go:30` still say "checked against main.go". That is generated page copy, so I left it for Task 8. - The census tests in `internal/provision` fail, as the plan expects (the census is Task 9): - The record-write census: `main.go:main` is now stale, and `commands.go:buildCommandRoot [lit:instances,lit:sidecars]` is an unlisted write site. - `TestPlan14RootReadCensus`: `update.go:maybeUpdateHint` changed, and so did the root envelopes for `.`, `internal/cgroup` and `internal/clireg`. Task 9's CLAIMS file needs to cover them.</result> <usage><subagent_tokens>131945</subagent_tokens><tool_uses>53</tool_uses><duration_ms>722568</duration_ms></usage> </task-notification>
<task-notification> <task-id>a0791a0304085c183</task-id> <tool-use-id>toolu_01SvwCqXHkkHFmZNwQdwLioy</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/27979b8d-cc90-4f50-88f6-87ba41433627/tasks/a0791a0304085c183.output</output-file> <status>completed</status> <summary>Agent "Implement Task 3 golden corpus" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>Task 3 is done and committed as **3ab5be86** (`cli: golden corpus recorded from the base binary`). A `packed-refs.lock` error printed, but `git log -1` shows the commit on `cli-registry-words`. Replay passes with zero differences, and `TestCommandTreeIsValid`, `TestCLIProjection`, the two new generator/normaliser unit tests, `go vet .` and gofmt are all clean. With `-short`, `TestCLIGolden` skips. **Files** - `/home/paulca/amadan.net/carlos/platform/.claude/worktrees/cli-registry-words/clireg_golden_test.go`: the case generator, the runner, record and replay, and a generator unit test on a small tree with an alias, a named default, an unnamed default, a transparent word, a `When` node, a `Skip` node and a `SkipBare` branch. - `/home/paulca/amadan.net/carlos/platform/.claude/worktrees/cli-registry-words/testdata/clireg-golden.jsonl` - `/home/paulca/amadan.net/carlos/platform/.claude/worktrees/cli-registry-words/commands.go`: a `skipGolden` helper and two skips. **Cases:** 155 in total, 9 skipped. Seven are the `__` plumbing and shim words that were already skipped. The other two are new `Golden.Skip`s, both reported below. **Run times** - Record from 7f4bdf3a3674f1794241aab961f9c9b2a585036a: 19.5 s wall, 17.4 s test time. That covers the `git archive` and build plus every case run twice. - Replay: 7.3 s wall, 5.4 s test time. - No case came near the 10 s limit. The determinism check passed, including `secrets -h` and `secrets --zz-unknown-flag`. **New skips in commands.go** - `agent` (`commands.go:177`, was `SkipBare`): even `agent -h` starts the agent before it reads its arguments. It prints a lease-lock line containing its pid, so the output also changes from run to run. - `adopt` (`commands.go:179`, was `SkipBare`): even `adopt -h` opens root's release state and claims before reading its arguments. It ends in `adopt: permission denied`, which is an attempt on a path outside the case directory. **Fail demo:** I changed `usage: carlos <command> [flags]` to `[FLAGS]` in `main.go:62`, replayed, then put it back with `sed`. No checkout or restore was used. The replay failed on 12 cases, for example: ``` clireg_golden_test.go:554: case "<root> | --help": stdout: line 1: want "usage: carlos <command> [flags]", got "usage: carlos <command> [FLAGS]" clireg_golden_test.go:557: case "<root> | bare": stderr: line 1: want "usage: carlos <command> [flags]", got "usage: carlos <command> [FLAGS]" clireg_golden_test.go:554: case "help | -h": stdout: line 1: want ... FAIL github.com/carlosframework/platform 4.850s ``` **Absorbing-default audit** I ran the base binary on every generated case inside `bwrap` with the whole filesystem read-only except the case directory. I also ran bare, unknown-word, `-h` and unknown-flag for `instances`, `channels`, `releases`, `canary`, `move`, `pipeline`, `email events`, `version` and `secrets`. Apart from `adopt`, nothing tried to write outside the case directory, nothing timed out, and nothing left files behind. - `instances` (bare or a word) fails at `$DIR/data/registry.db`, inside the case directory. - `channels`, `releases`, `pipeline` and `email events` exit 1 with "no deployment target configured" and never reach the network. - `canary <word>` exits 1 with "not in a git repository". It runs git, which walks up from the working directory, so the result relies on the case directory not being inside a repo. - `move` exits 2 with "needs --host". - `version` prints `carlos dev` for every form. One finding: if a case directory sits under `$HOME` (as `$TMPDIR` does here), the CLI's config lookup finds the real `~/.carlos/config` and the output changes ("not logged in to https://console.carloku.com"). The test is only isolated because `TestMain` moves the temp root to `/var/tmp`. I added a check that makes the test stop if a config file sits above the cases' directory (`clireg_golden_test.go:358`). **Decisions the plan didn't settle** - **Switches for `When` nodes** (`clireg_golden_test.go:43`): the generator can't read a node's switch from its `When` func, so a test-side map `goldenWhenEnv` holds it, keyed by node ID. It holds `ops host` → `CARLOS_HOST_CLAIM=1` today, and a `When` node missing from it is an error. Only the `When` node gets on and off cases; the nodes below it run with the switch on. - **Case keys** (`clireg_golden_test.go:88`): each key is `<typed words> | <kind>`, `<root>` when there are no words. Alias cases use the alias spelling (`-h | -h`); `When` cases get ` (when on)` or ` (when off)` appended. A skipped node gets one `<id> | skipped` line, and a `SkipBare` gives a skipped `| bare` line. An unnamed default's cases are the same as its branch's, so they are written once. Aliases spell only the node's own cases, not the cases of everything below it. - **Leaves get no bare case**, as the plan says. So `SkipBare` on today's top-level leaves (edge, bootstrap, `instance-*`) has no effect yet. - **`TMPDIR=<case dir>/tmp`** (`clireg_golden_test.go:310`). HOME and the working directory are the case directory itself. - **argv[0] is set to `carlos`** (`clireg_golden_test.go:327`), so a usage line that names the binary reads the same from both builds. This controls the input, not the output, so the "normalise only two things" rule still holds. - **The base build directory** (`clireg_golden_test.go:466`) is made with `os.MkdirTemp("")`, so inside the test it lands in TestMain's moved temp root (`/var/tmp/carlos-test-*`, on disk) rather than the session's `$TMPDIR`. It is never `/tmp`, and a `t.Cleanup` removes it. - **`argv` is left out of the JSON when empty** (`clireg_golden_test.go:267`), so the root's bare line has no argv field. Replay treats a missing argv as an empty one. I removed my scratch (the audit binary and scripts under `$TMPDIR` and `/var/tmp`). No processes are left running.</result> <usage><subagent_tokens>137144</subagent_tokens><tool_uses>36</tool_uses><duration_ms>515309</duration_ms></usage> </task-notification>
<task-notification> <task-id>bhvnueezn</task-id> <tool-use-id>toolu_01FNHgrZWbmnuA9e7GzSeaUZ</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/27979b8d-cc90-4f50-88f6-87ba41433627/tasks/bhvnueezn.output</output-file> <status>completed</status> <summary>Background command "Wait for Astra T3 review" completed (exit code 0)</summary> </task-notification>
<task-notification> <task-id>af3796f4b37feb4de</task-id> <tool-use-id>toolu_01PTkv6NfMr878mazxRk2u3E</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/27979b8d-cc90-4f50-88f6-87ba41433627/tasks/af3796f4b37feb4de.output</output-file> <status>completed</status> <summary>Agent "Implement Task 4 apps/config words" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>Task 4 is done in one commit, `decd1033756a918e431bda2d4372d88f270c39fb` ("cli: apps, config and settings words in the registry"). Every dispatcher converted byte for byte, none had to stay a leaf, and the corpus replays with zero differences. Git printed the `packed-refs.lock` error; `git log -1` confirms the commit and the tree is clean. I made one commit for the whole task rather than one per dispatcher group, because the corpus file and `parity/cli.tsv` were regenerated once for all of them. **Nodes created.** Every leaf is `raw(...)` unless noted. Unless marked operator, nodes are Customer. - **`apps`** (`appsCommand`, apps.go): no default. Fallback prints `appsUsage` to stderr and exits 1. Children: `create`, `place`, `region`, `build-probe`, `set`, `show` (Operator), `delete`, `restore`, `ttl`, `keep`, `list`. `RunApps` stays as a wrapper for fleets_cli_test. - **`apps source`** (`appsSourceCommand`, apps_source.go): no default. Fallback is `log.Fatal(sourcePullUsage)`. One child, `pull`. - **`env`** (`envCommand`, appconfig_cli.go): Fallback prints `envUsage` to stderr and exits 1. Children: `set`, `unset`, `list`, `environments`, `exec-delivery`, `sync`, `adopt`, `release`, `fork`. `RunEnv` is deleted. - **`secrets`** (`secretsCommand`): Fallback prints `secretsUsage` to stderr and exits 1. Children: `set`, `unset`, `list`, `genkey` (Golden.Skip: "prints a freshly generated key pair: no two runs agree"), `fingerprint`. `RunSecrets` stays as a wrapper. - **`features`**: Fallback `log.Fatal(featuresUsage)`. Children `set`, `list`. `runFeatures` is deleted. - **`assets`**: Fallback `log.Fatal(assetsUsage)`. Children `purge`, `status`. Old dispatcher deleted. - **`domains`**: Fallback `log.Fatal(domainsUsage)`. Children: `check`, `buy`, `attach`, `verify`, `detach`, `list`, `paths`, `placements`. `runDomains` stays as a wrapper. - **`gate`**: Fallback `log.Fatal(gateUsage)`. Children `set`, `clear`, `list`. Old dispatcher deleted. - **`ratelimit`**: Fallback `log.Fatal(ratelimitUsage)`. Children `show`, `set`, `clear`. Old dispatcher deleted. - **`config`** (`configCommand`): Fallback prints `configUsage` to stderr and exits 1. OnError is `configError(path[1], err)`, which is RunConfig's mapping moved verbatim: ErrHelp returns, a flag error exits 2, anything else prints `carlos config <word>: <err>` and exits 1. `RunConfig` is deleted. - **`config destinations`** (`configDestinationsCommand(out io.Writer, errp *error)`): `Default: "list"` on `OnAbsent|OnFlag`. Children: `list` (alias `ls`), `add`, `set`, `default`, `remove` (alias `rm`), `rename`. The Fallback handles `help` by printing `destinationsUsage` to `out`; any other word builds the `no verb %q` error. `configDestinations(out, args) error` is now the three-line wrapper the plan describes, and config_cli_test.go is unchanged. - **`accounts`**: Fallback prints `accountsUsage` to stderr and exits 1. Children: `create`, `list`, `migrate` (Operator), `plan` (Operator). There is no OnError, because `runAccountsPlan` already maps its own errors. `RunAccounts` is deleted. - **`auth`**: Fallback prints `authUsage` to stderr and exits 1. Leaves `login`, `whoami`, `logout`, `default` are closures calling `f(os.Stdout, inv.Raw)`. OnError is RunAuth's mapping verbatim, printing `carlos auth <path[1]>:` and exiting 1. `RunAuth` is deleted. - **`route`, `routes`, `protection`**: no change, still leaves. They choose behaviour by flags, not words. **Corpus.** - It went from 155 cases to 333. The re-record from `7f4bdf3a` shows 178 lines added and 0 removed or changed in `git diff`. - I read every new line. Each matches the old behaviour, including `auth login -h` (exit 1, "flag: help requested"), `config destinations help` (stdout, exit 0) and `config destinations zz` (stderr, exit 1). - Replay with no flags passes. **Explicit cases.** I added a `goldenExtras` list to `clireg_golden_test.go`, keyed `"<argv> | extra"` with an optional `(note)` suffix. It is applied in `TestCLIGolden` only, so the generator fixture test is untouched. It holds the three cases the generator doesn't produce: `config destinations --global`, `config destinations zz` and `apps source delete`. The other three you listed come from the generator: `config destinations` bare, `auth login -h` and `apps source` bare. **Tests, all passing:** - The 31 related root-package test files (apps*, appconfig*, accounts*, auth*, config_cli, domains*, features, assets, gate, ratelimit, fleets_cli, fleets_secrets_key_cli). - `TestCommandTreeIsValid`, `TestCLIProjection`, `TestTopLevelWordsUnchanged`, `TestUpdateHintSkippedPerPath`, `TestGoldenCasesGenerator` and `TestCLIGolden` replay. - `internal/parity`, `internal/docsite`, `internal/clireg` and `internal/domains`. - `go vet .`, `gofmt -l` (clean), `go build ./...`, and `make parity-doc` (regenerated `parity/cli.tsv`). **Decisions the plan didn't settle:** 1. **`apps source pull`** (apps_source.go:26-41): `pull` had to become a node, so I split `runAppsSource` into a branch plus a new handler, `runAppsSourcePull(args)`. Its body is the old one, parsing `args` instead of `args[1:]`. That makes this the one handler whose body changed, which A0 requires. 2. **`errp` semantics** (config_cli.go:93-140): when `errp` is set, a verb's error goes to `*errp` through the node's OnError, the fallback stores its error there too, and nothing exits. When `errp` is nil (production), verb errors go to `config`'s OnError and the fallback calls `configError("destinations", err)` itself, because a Fallback cannot return an error. 3. **`config` OnError word** (config_cli.go:63): it uses `path[1]`, which is always `destinations`. That matches the old `args[0]`, since that word has no alias. 4. **`accounts plan`**: no OnError, because the ErrHelp mapping already lives inside `runAccountsPlan`, as the spec's step-1 note allows. 5. **Audiences** come from parity.tsv: `apps show`, `accounts migrate` and `accounts plan` are Operator; the rest are Customer. 6. **Stale comments**: a few still name the deleted functions (pipeline.go:63, appconfig_cli.go:2, cli.go:3469). I left them, apart from one fix at config_cli.go:212. The files changed are under `/home/paulca/amadan.net/carlos/platform/.claude/worktrees/cli-registry-words/`: `apps.go`, `apps_source.go`, `appconfig_cli.go`, `features_cli.go`, `assets_cli.go`, `domains_cli.go`, `gate_cli.go`, `ratelimit_cli.go`, `config_cli.go`, `accounts.go`, `auth.go`, `commands.go`, `clireg_golden_test.go`, `parity/cli.tsv` and `testdata/clireg-golden.jsonl`. My scratch directory under `$TMPDIR` is removed.</result> <usage><subagent_tokens>160285</subagent_tokens><tool_uses>48</tool_uses><duration_ms>508435</duration_ms></usage> </task-notification>
<task-notification> <task-id>a28fd22fa1276f6f9</task-id> <tool-use-id>toolu_01Mxm9Jg5BMKbKTDQcieJnuf</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/27979b8d-cc90-4f50-88f6-87ba41433627/tasks/a28fd22fa1276f6f9.output</output-file> <status>completed</status> <summary>Agent "Implement Task 5 release/runtime words" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>Task 5 is done in one commit, **8a9c2461** `cli: release, instances and runtime words in the registry`, on branch `cli-registry-words`. The usual packed-refs.lock error printed, but `git log -1` shows the commit landed and the tree is clean. All 21 dispatchers are converted; the corpus replays against the branch with zero differences. **Nodes per dispatcher.** "All three" means the default runs on absent, flag and unknown word. A fallback is the old `default:` arm moved verbatim unless noted. - **instances**: unnamed default = the box listing (`runInstancesBoxList`, box-local), all three, so no fallback. Children: enable, create, list, delete, set, update, set-upstreams (operator), set-channel, set-environment, set-assets, set-pages, retry, plus: - `instances import`: commit and abort call `runInstancesImportVerb(word, …)`; unnamed default = the import itself, all three. - `instances door-key`: create, list, revoke; fallback `log.Fatal(doorKeyUsage)`. `runInstancesDoorKey` stays as a one-line wrapper for its tests. - **sidecars**: fallback is `log.Fatal(usage)` bare, otherwise the "unknown subcommand" message, exit 1. - **schedule**: fallback `log.Fatal(scheduleUsage)`. - **db**: pull, query. Fallback: bare prints usage to stderr, exit 2; `-h`, `--help`, `help` print to stdout, exit 0; unknown verb exit 2. `runDB` stays as a wrapper. - **devbox** (whole-function): serve (box-local), share, unshare, list each re-prepend their word and call `runDevbox`. The fallback also calls `runDevbox(args)`, so `run`'s help words and exit-code table are unchanged. - **canary**: deploy; ls (alias list); rm (alias delete). `Default: "deploy"`, all three. `runCanary` is deleted because nothing calls it. - **channels**: unnamed default = list, all three. resign and digests (operator) are NoUpdateHint children. digests is a raw leaf and its parser is unchanged. - **releases**: unnamed default = list, all three. retention and authorize (operator) are NoUpdateHint children. - **pipeline**: `Default: "show"`, all three. In the old code every case that matched no word reached show. `runPipeline` stays as a wrapper. - **version**: Task 2's node checked; no change needed. - **skills**: stays a leaf. - **move** (whole-function): status, cut, abort, resolve, and `offline` with eight children, each re-prepending its words and calling `runMove`. The offline fallback calls `runMove("offline", args…)`, which gives the usage text on stdout and exit 2. Unnamed default = request (`runMove(args)`), all three. - `offlineVerbs` is deleted. `parseMoveArgs` and `move_test.go` now read `moveOfflineVerbs()`, which returns the offline node's children. `moveMain` and `parseMoveArgs` keep their signatures. - **economics** (operator): bill, backhaul; fallback usage on stderr, exit 2. - **proof** (box-local): history, keygen, get, put. The three old inline cases are now `runProofKeygen`, `runProofGet` and `runProofPut`. Fallback `log.Fatal(proofUsage)`. - **email**: enable, status, test, rotate; pause and resume (operator) share `runEmailPause` with a bool; plus: - `email domains`: add, rm (alias remove). - `email credentials`: create, list, revoke. - `email events`: push, with an unnamed default = the listing, all three. - Every level's fallback is `emailUsage`, exit 1. - **store**: create, status, rotate, apply; grant, approvals, approve, decline (operator); `store scan` with request, status, enforce (one raw leaf) and grant, revoke, sweep, rotate-webhook-key (closures over `runStoreScanSimple`). Fallbacks are each usage text, exit 1. - **relay**: enable, status, disable, adopted, rotate (operator); serve and keygen (box-local, `Golden.Skip`: serve starts a server and keygen mints a key, and neither reads its arguments). Fallback: bare or unknown exits 2 on stderr; help words print to stdout, exit 0. - **services** and **fleets**: `RunServices` and `RunFleets` stay as wrappers. `fleets boxes` has one child, add; its fallback is the old `log.Fatal` usage line. - **ledger**: six leaves; fallback usage, exit 1. `RunLedger` is deleted because nothing calls it. - **billing** (whole-function, operator): problems, close, house re-prepend their word and call `runBillingWithSession`, so `--console` is still registered before the verb. `OnError` is `billingError`, the mapping moved out of `runBilling`: `ErrHelp` returns, anything else is `log.Fatalf`. The fallback calls `runBillingWithSession` and passes the result to `billingError`. `runBilling` is deleted. **Other changes** - `subVerbSkipsHint` is deleted, from `commands.go` and the check in `main.go`. - `TestUpdateHintSkippedPerPath` now covers the four channels/releases paths, plus two cases that must still get the hint (`channels zz`, `releases --app x`). - `TestCanaryIsDispatchedNotStubbed` now requires `Default` "deploy" on all three cases and a runnable deploy leaf. - The nine explicit cases you listed are added to `goldenExtras`. - `make parity-doc` regenerated `parity/cli.tsv` (+123/−16). **Corpus**: 333 lines before, 710 after. `git diff --numstat` shows 377 added and 0 removed, so no existing line changed. Recording raised no nondeterminism or timeout errors, and the two relay skips are recorded as skipped cases. I read the new lines, including `instances foo`, `canary ./site`, `move --host h status`, `move offline zz` and `version foo`. **Tests**: all pass. - The named set (`TestCommandTree|TestCLIProjection|TestTopLevelWords|TestUpdateHint|TestCanary|TestGoldenCases`) and `TestCLIGolden` replay. - 670 test functions from the converted files' test files, plus `Ledger|Releases|Channels|TestInstances` from `cli_test.go`. - `./internal/parity`, `./internal/docsite`, `./internal/clireg`. - `go vet .`, gofmt, `go build ./...`, and darwin and windows builds of the root package. - The census tests in internal/provision still reference `runInstances`; you expected them to fail until Task 9. **Decisions the plan didn't settle** 1. **`proof history` is still one raw leaf** (`proof_cli.go`, `proofCommand`). `historyCommandWithSave` (`history_cli.go:47-54`) checks its verb (status|reconstruct|retire|resume) and its flags together, names the flag set after it, and `history_cli_test.go` calls it with the verb inside `args`. Splitting it would mean either a fourth whole-function exception or changing its order of checks. The audit treats the verb as an enum positional, but the spec's raw-leaf list (B6) doesn't name `proof history`, so it needs a ruling for the args step. 2. **Whole-function fallbacks call the old function** rather than copying its default arm: devbox (`runDevbox(args)`), billing (`runBillingWithSession`) and `move offline` (`runMove`). The output is identical, as the corpus shows. 3. **Audiences follow the parity table's status, and qualified rows count as customer**: `instances create [--addr]`, `instances set [--size]` and `move resolve [--declare-lost]`. Bare `instances` is box-local (the `box-routes` row). 4. **One commit instead of one per group.** `commands.go`, the corpus and `cli.tsv` are shared, and each split would have needed its own re-record. Leftover `/var/tmp/carlos-test-*` directories exist, but my runs finished cleanly, so I left them alone; they may belong to other sessions. My `$TMPDIR` scratch is removed.</result> <usage><subagent_tokens>192847</subagent_tokens><tool_uses>72</tool_uses><duration_ms>1052772</duration_ms></usage> </task-notification>
<task-notification> <task-id>a9dfa4fdc7b7a75a4</task-id> <tool-use-id>toolu_01Af2GnN2Hg83ZEXmvbmPUmj</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/27979b8d-cc90-4f50-88f6-87ba41433627/tasks/a9dfa4fdc7b7a75a4.output</output-file> <status>completed</status> <summary>Agent "Implement Task 6 box/host words" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>Task 6 is done and committed as **60ec807c** "cli: box and host words in the registry" on `cli-registry-words`. Git printed a `packed-refs.lock` error during the commit, but `git log -1` shows the commit on the branch and the worktree is clean. The corpus replay against the branch binary shows zero differences. **Nodes created** - **`ops`** is now a branch (Operator, `NoUpdateHint`), defined in `opsCommand()` at `/home/paulca/amadan.net/carlos/platform/.claude/worktrees/cli-registry-words/hostclaim_cli.go:38`. It has no default. Its fallback is the new `boxops.Fallback`: the old `Run`'s help and unknown-verb arms, moved verbatim. So bare `ops` and an unknown word still exit 2, and `help`/`-h`/`--help` still print usage to stderr with exit 0. - **`ops host`** (Operator) has `When: hostClaimEnabled(os.Getenv("CARLOS_HOST_CLAIM"))`. That reuses the exact `TrimSpace != ""` test the old `runOps` made. Its fallback is `runOpsHost(args)`, so any word other than `resolve`, or none, still prints the old `usage: carlos ops host resolve ...` and exits 1. - **`ops host resolve`** (Operator) is a raw leaf. - **`ops litestream`, `ops restore-verify`, `ops hibernate-verify`** (BoxLocal) are raw leaves exported by `internal/ops`. `Commands()` and `Fallback()` are at `internal/ops/ops.go:40` and `:53`. - `ops.Run` keeps its signature as a one-line `clireg.Dispatch` wrapper (`ops.go:34`). The old `runOps` is deleted; nothing called it. - **Unchanged leaves:** `vet` (`vet.Run` only parses flags, so no `vet.Command()`), `edge`, `agent`, `adopt`, `bootstrap`, `add`, `remove`, `status`, `update` and `instance-control/exec/exit/stop/probe`. Their Audience and corpus skips from Task 2 match the parity rows. **Corpus** - It went from 710 to 737 lines: 27 added, none changed or removed (`git diff --numstat`: 27 / 0), all re-recorded from base 7f4bdf3a. - `goldenWhenEnv` already had `ops host`, and `goldenExtra` already supported `Env`, so I only added three explicit cases: - `ops host resolve -h` with the variable set: `unknown option "-h"`, exit 1. - `ops host resolve -h` without it: `ops: unknown verb "host"` plus usage, exit 2. - `ops zz`: unknown verb, exit 2. - The generator also covers every `ops host` case with the variable both on and off. - `make parity-doc` replaced the `ops` row in `parity/cli.tsv` with the four leaf rows. `docs/parity.md` did not change. **Checks run (all pass)** - `TestCLIGolden` replay. - `go test .` with `-run` covering the command tree, projection, top-level words, update hint, golden cases, host claim and ops (18 tests). - `go test` for `internal/ops`, `internal/vet`, `internal/parity`, `internal/docsite` and `internal/clireg`. - `gofmt` and `go vet`. - `go build ./...`, plus `GOOS=darwin` and `GOOS=windows` builds of the root package. **Decisions the plan didn't settle** 1. The `resolve` leaf adds its own word back in front of the arguments before calling `runOpsHost` (`hostclaim_cli.go:48`). This keeps `parseHostResolve` unchanged, because `hostclaim_cli_test.go:34,44` call it with `"resolve"` first. Its `args[0] != "resolve"` check stays inside the parser until the args step, the same way `move` was handled. 2. The `ops host` fallback reuses `runOpsHost(args)` (`hostclaim_cli.go:51`) rather than copying the usage string, so the message and exit 1 come from the same code as before. 3. `instance-control`'s exact-match `--group-hairpin-*` arguments (`internal/host/claimstop_run.go:25`) look like flags but act as words. I left that a raw leaf, as spec B6 lists it. 4. The "host claim on" extra repeats the generated `ops host resolve | -h` case under a different key. I kept it because the task named it explicitly. **Cleanup:** I deleted the stray `platform` binary my own `go build .` left in the worktree, and the scratch copy of the corpus in `$TMPDIR`.</result> <usage><subagent_tokens>100833</subagent_tokens><tool_uses>32</tool_uses><duration_ms>282448</duration_ms></usage> </task-notification>
<task-notification> <task-id>a25cc91a3c84e61eb</task-id> <tool-use-id>toolu_01ABo2JNKhf4HhFkTxcqaW5a</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/27979b8d-cc90-4f50-88f6-87ba41433627/tasks/a25cc91a3c84e61eb.output</output-file> <status>completed</status> <summary>Agent "Implement Task 7 system words" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>Task 7 is committed as **b1abd1d13bbad300829c8c883c7b279960e3c70b** (`cli: system words in the registry`) on branch cli-registry-words. The packed-refs.lock error printed during the commit; `git log -1` shows the commit landed and the tree is clean. The corpus went from 737 to 931 lines, all additions, and replay against the branch shows zero differences. **The system tree** (`systemCommand()` in system.go; it carries NoUpdateHint and replaces the old `system` leaf in commands.go): - `router` is a Transparent child with no audience. - **system's fallback:** - `help`, `-h` or `--help` prints `systemUsage` to stderr and exits 0. - Otherwise it calls the unchanged `systemUnknownVerbMessage`, passing `["router"]+args` when the last consumed word is `router` and `args` otherwise. It then prints the usage to stderr and exits 2. - The result matches today: `system router` prints "no verb given", `system router router` prints unknown verb "router", `system router help` exits 0, and bare `system` prints only the usage. - **Single raw leaves:** - Box-local: runsc-ensure, exec-sandbox-allows-prev, group-maintenance (`os.Exit(host.RunGroupMaintenance(...))`), files, guard-arm, guard-exec, journal-migrate, floor-allows-prev, apply, install-channel, host-env, named-units, db-worker. - Operator: update, status, rollback, cancel-activation. - **antivirus** {status, enable, disable, rotate-webhook-key}: each leaf is a closure calling `runSystemAntivirus(args, word)`. The fallback prints "no verb given" when bare, and "unknown verb" for anything else, help words included. Both exit 2. - **pdf** {status → `runSystemPDFStatus`}: the fallback prints the usage and exits 2 when bare or on an unknown word; a help word prints the usage and exits 0. - **layout** {status, migrate, revert → `runSystemLayout(sub, args)`}: the fallback prints the layout usage and exits 2 when bare. A help word prints it and exits 0. An unknown word gets "unknown verb" and exits 2. - **geoip** {publish, status, off}: the fallback works like antivirus. - **managed-fleets** {show, set → `runSystemManagedFleets(verb, args)`}: bare prints the usage to stderr and exits 2. A help word prints it to stdout and exits 0. Any other word goes to `log.Fatal`, exit 1. - **seeds-floor publish, legacy-routes assign, lifetimes cutover, hosts-used status**: one shared helper, `systemOneVerbCommand`. Any other word prints `systemUsage` and exits 2. - **box** {role (raw, operator), publish-record (box-local)} and **group** {role}: the fallback prints `systemUsage` and exits 2. - **demos** {status, serving, takedown, takedown-status → `runSystemDemos(verb, rest)`, the old loop and after-loop checks unchanged}: - reports is a branch with child resolve and an unnamed list default on all three cases, running `runSystemDemosReports(resolve, args)`. - The demos fallback prints the help to stdout and exits 0 when a help word is the only argument; everything else prints `systemDemosInvalid` and exits 2. **Kept whole:** only the five box plumbing dispatchers A0 names. Splitting the other families changed no check order: - In every family the word was read before any other work. - In demos, every error before the session call already printed the same message and exit code. **Corpus extras:** all of the cases you listed, plus `system box role x` and `system group role x y --zz z` to pin the `roleArgs` change. Nothing needed Golden.Skip or SkipBare: both recording runs matched and nothing timed out. The root-only verbs fail fast as non-root, or before their parse in the case of `RunSystemFiles`. **Tests:** the system test set, the tree/projection test set, internal/parity, internal/docsite and internal/clireg all pass. `go vet`, `gofmt`, `go build ./...` and the darwin and windows builds are clean. I didn't run any internal package tests because no internal package changed. **Decisions the plan didn't settle:** 1. **No `SystemCommands()` exports in internal/host, internal/hostenv or internal/dbreads.** The plan's file list names them, but those leaves have no words to declare. Building them in package main from the existing exported functions means no root-side code changes, which fits A0's "census sees no change" and Task 6's precedent (system.go `systemCommand`). Every internal/host entry point signature is unchanged. 2. **`systemVerb` is kept, not deleted** (system.go, just below `systemFallback`). Eight test files call it. It now reads its words from `systemCommand()`'s children, so there is one list. `runSystem` is a one-line `clireg.Dispatch` wrapper. 3. **`roleArgs` now takes the arguments after `role`** (system_roles.go `roleArgs`). The check `len<3 || rest[0]!="role"` became `len<2`. Both give the same usage and exit 2, and the extras pin it. 4. **Old family dispatchers deleted, since nothing else called them:** `runSystemAntivirusVerb`, `runSystemPDFVerb`, `runSystemGeoipVerb`, `runSystemBoxVerb`, and the four `*Verb` one-word wrappers (renamed to `runSystemSeedsFloorPublish`, `runSystemLegacyRoutesAssign`, `runSystemLifetimesCutover`, `runSystemHostsUsedStatus`). `runSystemGroupVerb` became `runSystemGroupRole`. `runSystemDemos`, `runSystemDemosReports`, `runSystemLayout` and `runSystemManagedFleets` now take the verb as a parameter. `runSystemDemos` keeps its now-unreachable default `invalid()` arm unchanged. 5. **The guard-exec test key** is `goldenRootPub` from internal/release/golden_test.go:32. The internal/host tests generate their keys at runtime, so there was no fixed host key to use. `CARLOS_DEPLOYMENT_BUCKET` stays unset, so the key-set case exits 1 with `hostfloor: authenticated floor required` before reading any disk; the key-unset case fails on the key. 6. **Audiences:** box-local for the plumbing words plus box publish-record, operator for the rest. `system runsc-ensure` and `system exec-sandbox-allows-prev` now appear in parity/cli.tsv as box-local, but parity/parity.tsv:225 has no row member for them. I didn't edit parity.tsv because that is Task 8's guard work, but Task 8 will need to add them. `make parity-doc` changed only parity/cli.tsv (43 system leaves replace the one `system` row); docs/parity.md is unchanged. No scratch files or binaries are left behind.</result> <usage><subagent_tokens>174193</subagent_tokens><tool_uses>52</tool_uses><duration_ms>613090</duration_ms></usage> </task-notification>
<task-notification> <task-id>bot3ag9gf</task-id> <tool-use-id>toolu_01GHbSr4W5KdxK6MhfXVAihX</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/27979b8d-cc90-4f50-88f6-87ba41433627/tasks/bot3ag9gf.output</output-file> <status>completed</status> <summary>Background command "Wait for Astra T7 review" completed (exit code 0)</summary> </task-notification>
<task-notification> <task-id>a54f2b585ae3c796b</task-id> <tool-use-id>toolu_01Y92VVv9vQJD5R7iB5wuJsP</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/27979b8d-cc90-4f50-88f6-87ba41433627/tasks/a54f2b585ae3c796b.output</output-file> <status>completed</status> <summary>Agent "Implement Task 8 parity guard" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>I've finished Task 8 and committed it as **9ca0f62b** "parity: CLI coverage from the command registry". The usual packed-refs.lock error printed, but `git log -1` shows the commit and the tree is clean. **Tests:** these all pass: `go test ./internal/parity/ ./internal/docsite/ ./internal/clireg/`, `go test . -run 'TestCLIProjection|TestCommandTree'`, and the console's `TestParity*`. Vet and gofmt are clean. `make parity-doc` left `parity/cli.tsv` unchanged and regenerated `docs/parity.md`; customer rows go from 146 to 145 because one gap row moved to operator. From partway through, the sandbox mounted `~/.cache/go-build` read-only, so I ran the Go commands with the sandbox off. TMPDIR was the session dir and GOCACHE was left alone. The `/var/tmp/carlos-test-*` dir from the root-package run was removed. **What was built** - `parity.LoadCLI` and `ParseCLI` are in the new `internal/parity/cli.go`, with `CLIEntry{ID, Audience, Tool, Flags, Enums, Line}`. They check the header, 7 columns, ID shape, duplicates and known audiences. A `-` in the projection becomes empty. - The rule logic is in three functions in the same file: `CheckCLIPaths` (D2 coverage plus the D3 flag check), `CheckCLIAudience` (D5) and `CheckMCPColumn`/`MCPColumn` (D4). - `TestParityCLIPaths`, `TestParityCLIAudience` and `TestParityMCPColumn` replace `TestParityCLITopLevel` in `repo_test.go`. - `internal/parity/cli_test.go` has every fixture the plan lists, all passing. It also has parse-error and MCP fixtures. - `page.go` now says "CLI rows are checked against the command registry (`parity/cli.tsv`)." `page_test.go` checks for the new sentence. - AGENTS.md has the new rule beside the parity rule and the new test names. I also fixed its docsite paragraph, which still said docsite "reads main.go's dispatch switch". `parity/README.md` has the shortened sentence. **Parity rows changed or added** - **`steering`** (gap, wp-instances): members `steering latency ; steering off` became `steering`. `latency` and `off` are arguments of the leaf, not tree nodes. Note left empty, as before. - **`channels-digests`**: was gap, `channels digests`, wp-settings. It is now **operator**, area operator, moved under op-digests. Member: `channels digests [report]`. Note: "Operator only: the report needs a system operator (apiSystemRoller). Shows which channel pointers are digest-signed." - This is forced by the registry: the leaf is Operator, and the read path is operator-gated too (`internal/console/apidigests.go:154`). - **`op-digests`** (operator): `channels digests on ; channels digests off` became `channels digests [on, off]`. Note unchanged. - **`system-box`** (box-local): added `system exec-sandbox-allows-prev ; system runsc-ensure`. Note unchanged. No other leaf lacked a row and no other member failed. In particular, `instances` and its default, `ops`, `system` and the `status` rows already passed. I added no new customer rows, so no console route lookup was needed. **Status I was unsure of:** only `channels-digests`. It changes an existing customer status, which spec D5 says to leave alone ("Today's statuses are unchanged"), but the leaf's Operator audience leaves no other valid choice. Merging it into op-digests would be the alternative. **Decisions the plan didn't settle** - **mcp column now parses.** `internal/parity/table.go:159` used to reject any non-empty mcp column at parse time. I removed that rule so `CheckMCPColumn` can enforce D4, and replaced `TestParseMCPMustBeEmpty` with `TestParseKeepsMCP` in `table_test.go`. - **MCP column format** (`MCPColumn`, `cli.go`): tools in member order, each once, joined with a bare `,`. - **Flags and enums format** (`cliList`, `cli.go`): read as comma-separated, since the projection only writes `-` today. Flag matching ignores leading dashes on both sides (`undeclaredFlags`). The enum part of D3 is not implemented: a word that isn't a flag stays free text. - **Where problems point:** a command with no row is reported against `parity/cli.tsv:<line>` (empty RowID; `Problem.String` in `rules.go`). - **Internal commands** don't need a row. A `__` member must be an existing entry with internal audience. - **Docsite unchanged:** `internal/docsite/clinames.go` still has its own reader for `parity/cli.tsv` rather than using `LoadCLI`.</result> <usage><subagent_tokens>114261</subagent_tokens><tool_uses>36</tool_uses><duration_ms>341184</duration_ms></usage> </task-notification>
<task-notification> <task-id>aa7472fd22bf8ae87</task-id> <tool-use-id>toolu_016qmmm5kRHdNKcRTx4cHiXp</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/27979b8d-cc90-4f50-88f6-87ba41433627/tasks/aa7472fd22bf8ae87.output</output-file> <status>completed</status> <summary>Agent "Task 9 merge main and census" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>Steps 1 and 2 of Task 9 are done and the census tests are all green. I added two test-only exemptions to make them pass, and the reviewer needs to rule on those (item 1 at the end). Two commits are on `cli-registry-words`; the tip is `6ea678aa15b904067b9d4c3ce7047257b45a4890`. The `packed-refs.lock` error printed as expected, and `git log` confirms both commits. **Merge.** `origin/main` (3 commits) merged with no conflicts as `8596404c`. Nothing touched `main.go`, `commands.go` or the corpus. `go build ./...` and `go vet ./...` pass. **Corpus base.** The base moved to `197cc40ca6fd98dc80bb7baadb59206cabab9954`, which is `origin/main`'s tip. The only CLI change on main is in `pipeline.go:runPipelineShow`: the "one channel, no pipeline set" line now prints only when the single channel is exactly `{Name:"edge"}`. No corpus case reaches that path. Replay before re-recording showed zero differences. I then re-recorded from the new base (931 cases) and `git diff` was empty, so no existing line changed. I couldn't find a ledger file in the repo to write the new base into, so record it wherever the ledger lives. **Parity.** `make parity-doc` changed nothing. Main added no new top-level command, so no new node or parity row was needed. The parity, docsite and clireg package tests pass, and so does the root `TestCLIProjection|TestCommandTree|TestTopLevelWords|TestUpdateHint|TestGoldenCases|TestCanary` run. **Census card** (`docs/superpowers/notes/census-proposal-cli-registry-words.md`): | Class | Count | Units | |---|---|---| | body | 4 | `system.go:runSystem` and `system.go:systemVerb` (authority B,C,D,F,G,J4); `system_managedfleets.go:runSystemManagedFleets` and `update.go:maybeUpdateHint` (legacy) | | envelope | 4 | `.`, `internal/cgroup`, `internal/clireg`, `internal/ops` | | removed | 2 | `cli.go:runInstances` (legacy); `proof_cli.go:runProof` (authority E1) | | new | 2 | `cli.go:runInstancesBoxList`, `proof_cli.go:runProofPut`, both written `legacy` / `accepted-legacy` | | sites, reads, quiet, left, other | 0 | | The overlay is `internal/provision/testdata/plan14-root-reads-cli-registry-words.tsv`, with its line added to the chain file. **CLAIMS file.** It is at `docs/superpowers/notes/census-claims-cli-registry-words.tsv` and the `$TMPDIR` copy is deleted. `census-propose` refuses claims for units the census doesn't see. So `main`, `buildCommandRoot`, `RunShimIfRequested`/`Shims`, the clireg package, ops `Run`/`Commands`/`Fallback`, every renamed or split system function, `instancesCommand` and `sidecarsCommand` are described in `#` comment lines in the same file. That keeps them in front of the reviewer without breaking the tool. **Record-write inventory (9B8).** I added a new layer, `internal/provision/cli_registry_words_census_test.go`, built on `regionHAHeldWriteCensusInventory`, and pointed `TestPlan9B8RecordWriteCensus` at it. Classes and kinds are unchanged and no record write was added. The Task 2 note about `buildCommandRoot` is out of date: the literals now live in the per-command nodes, not in `buildCommandRoot`. - **Removed `main.go:main`** (key-site, `lit:instances,lit:sidecars`). Its `case "instances"` and `case "sidecars"` literals moved into the nodes below. - **Removed `cli.go:runInstances`** (key-site, `lit:instances`). It was split in two. - **Added `cli.go:instancesCommand`** (key-site, `lit:instances`). This is the node's `Name`, main's old case literal. - **Added `cli.go:runInstancesBoxList`** (key-site, `lit:instances`). This is `runInstances`'s bare listing, moved whole with its `flag.NewFlagSet("instances")`. - **Added `sidecars_cli.go:sidecarsCommand`** (key-site, `lit:sidecars`). This is main's case literal; `runSidecars`'s switch became its children. **Tests.** `go test ./internal/provision/ -run 'Census|Plan14|Plan9B8|RecordWrite'` passes, as does the full `./internal/provision/` package (287 s). The root `TestPlan14History|TestSystem|TestPlan9B` tests also pass. **For the reviewer:** 1. **J4 exemptions (my addition, outside the plan's step list).** `TestPlan14RootInputInventoryCoverage` failed with "no production caller" for `system.go:runSystem` and `system.go:systemVerb`. Since step 6 they are kept only for their tests (plan constraint 5), and production reaches `systemCommand` through `buildCommandRoot`. I added two `inputExemptions` entries in `internal/provision/plan14_input_inventory_test.go` with a `census-ruling-cli-registry-words` ruling. If the reviewer rejects that, the other route is to delete both functions and change their tests, which breaks constraint 5. 2. **`runProof` split.** It was `authority`, task E1. Its one file read (`os.ReadFile` of the `put` file) now sits in `runProofPut`, which `census-propose` wrote as a new `legacy` / `accepted-legacy` unit. That looks like a downgrade from authority to legacy, so the reviewer should confirm that disposition. This is a unit that moved rather than went, and the card's own rules ask the reviewer to check exactly that. 3. **Update-hint word list.** The old `noHintVerbs` map is now `NoUpdateHint` on the nodes. I checked it word for word against the old map, including `ops` (set in `hostclaim_cli.go`) and `system`. `__drain-call` and the two `__rootfs-check-*` words aren't marked, but they call `os.Exit` before the hint can run, as they did before.</result> <usage><subagent_tokens>145649</subagent_tokens><tool_uses>64</tool_uses><duration_ms>960235</duration_ms></usage> </task-notification>
<task-notification> <task-id>bef7mx6ve</task-id> <tool-use-id>toolu_015cWvh6B1UDFSstPrw8LWQM</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/27979b8d-cc90-4f50-88f6-87ba41433627/tasks/bef7mx6ve.output</output-file> <status>completed</status> <summary>Background command "Wait for whole-branch review" completed (exit code 0)</summary> </task-notification>
<task-notification> <task-id>b9tak5sfe</task-id> <tool-use-id>toolu_01TrT7ab5dPGVb5DTFspvysZ</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/27979b8d-cc90-4f50-88f6-87ba41433627/tasks/b9tak5sfe.output</output-file> <status>completed</status> <summary>Background command "Wait for CI on the branch tip" completed (exit code 0)</summary> </task-notification>
<paseo-system version="1" kind="agent-message" source-agent-id="8a3d302a-eac7-407c-b61c-f5ccc66b5544" message-id="f8f0e0b8-837e-45e2-91be-c78aeaad5746"> Agent manager 8a3d302: queued. eed714d rides v0.34.37 (after v0.34.36, which is rolling now), dev first, with your smoke list. </paseo-system>