spec: CLI registry rev 2, builder check applied
Fallback sees consumed words; unnamed defaults; per-path update hint; Args.New with fresh state and OnError; lazy root, Validate in a test; projection from a package-main test; GoldenArgs; pending lint markers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+203
−91
docs/superpowers/specs/2026-11-09-cli-registry-design.md+203 −91
diff --git a/docs/superpowers/specs/2026-11-09-cli-registry-design.md b/docs/superpowers/specs/2026-11-09-cli-registry-design.md| index 466deaab8..7ff9f2b0f 100644 |
| --- a/docs/superpowers/specs/2026-11-09-cli-registry-design.md |
| +++ b/docs/superpowers/specs/2026-11-09-cli-registry-design.md |
| @@ -1,6 +1,7 @@ |
| # The CLI command registry (slice 4, project 1 of 3) |
| -Status: rev 1, 2026-11-09, for review. Slice 4 is the Carloku MCP |
| +Status: rev 2, 2026-11-09, for review. Rev 2 applies the builder check |
| +(fresh Sonnet reading spec and code; points marked **(builder N)**). Slice 4 is the Carloku MCP |
| connector for Claude, approved by Paul 2026-11-09 in three projects: (1) |
| this registry, (2) the connector (OAuth sign-in, read tools generated from |
| the registry, deploy-from-files), (3) change tools and the confirmation |
| @@ -104,26 +105,39 @@ them and commands whose deciding word follows flags (`steering --app a |
| ### A. The tree and the walk |
| 1. **Node.** `clireg.Node` has `Name`, `Aliases`, `Summary` (one line), |
| - `Children []*Node`, `Default string` (a child's name), `Fallback`, |
| - `Run`, `Args` (section B), `Meta` (section C) and `NoUpdateHint bool`. |
| - A node is a *branch* (has children) or a *leaf* (has `Run`), never both |
| - and never neither. A node's ID is its path joined with single spaces |
| - (`config destinations add`); aliases never appear in IDs. |
| + `Children []*Node`, `Default` (below), `DefaultOn`, `Fallback`, `Run`, |
| + `Args` (section B), `Meta` (section C), `Transparent`, `When` and |
| + `NoUpdateHint bool`. A node is a *branch* (has children) or a *leaf* |
| + (has `Run`), never both and never neither. A node's ID is its path |
| + joined with single spaces (`config destinations add`); aliases never |
| + appear in IDs. |
| 2. **The walk.** `clireg.Dispatch(root, args)` looks at `args[0]` at each |
| branch: |
| - - a child's name or alias: descend, drop that one word, repeat; |
| + - a child's name or alias (and its `When` true): descend, drop that one |
| + word, repeat; |
| - otherwise, if the branch has a `Default` and its `DefaultOn` admits |
| this case (`absent`, `flag` for a word starting with `-`, `word` for |
| - any other word), run the default child's leaf with **all of the |
| - remaining arguments, unchanged** (the word that did not match |
| - included); |
| - - otherwise call `Fallback(args)`: the dispatcher's existing `default:` |
| - arm, moved verbatim (its usage text, stream, exit code, its message |
| - naming the word, and its handling of `help`, `-h`, `--help`). |
| + any other word), run the default leaf with **all of the remaining |
| + arguments, unchanged** (the word that did not match included); |
| + - otherwise call `Fallback(args, consumed)`: the dispatcher's existing |
| + `default:` arm, moved verbatim (its usage text, stream, exit code, |
| + its message naming the word, and its handling of `help`, `-h`, |
| + `--help`, which may print and return normally with exit 0, as |
| + `system`'s does). `consumed` is every word the walk dropped, |
| + transparent words included, so a fallback can tell `system router` |
| + from bare `system` **(builder 3)**. |
| At a leaf, `Run` receives every remaining argument unchanged. The walk |
| never consumes a flag, a flag value or a positional. This is the whole |
| difference from rev 3 and answers R3-1: no value is taken from the |
| handler, and a word after flags is not a node (A4). |
| + |
| + **Default leaves** **(builder 9).** `Default` is either the name of a |
| + child (`canary`'s `deploy`, reachable as a word too) or an *unnamed* |
| + leaf reachable only as the default, whose ID is the branch's own ID |
| + (`instances`, `channels`, `releases`, `version`). An unnamed default is |
| + needed where naming the default would change parsing: a child named |
| + `registry` under `instances` would make `instances registry |
| + --registry x` parse a flag that today is never reached. |
| 3. **What `Default` covers, from the audit.** `canary` (any non-verb, |
| including a path, to `deploy`: audit A canary), `instances`, `channels`, |
| `releases`, `pipeline` (`show`), `move` (`request`), `version` (bare |
| @@ -144,8 +158,24 @@ them and commands whose deciding word follows flags (`steering --app a |
| enum (D3). |
| 5. **Word-first verbs whose handler is shared** (`system antivirus |
| status|enable|disable|rotate-webhook-key`, `system layout |
| - status|migrate|revert`, `canary ls|list`) become one child per word, each |
| - `Run` a closure passing the word the shared handler already takes. |
| + status|migrate|revert`) become one child per word, each `Run` a closure |
| + passing the word the shared handler already takes. Two spellings of one |
| + handler are one child with an alias (`canary ls` alias `list`, `canary |
| + rm` alias `delete`, `config destinations ls`/`rm` likewise), since the |
| + handler's flag set name is the same for both **(builder 13)**. |
| + **Whole-function dispatchers** **(builder 1).** `billing` |
| + (`billing_cli.go:44`, inline cases after registering `--console`), |
| + `move` (`parseMoveArgs`/`moveMain`, `move.go:138`, which tests call with |
| + the verb inside `args`) and `devbox` (`c.run`, word switch plus its |
| + exit-code table) cannot hand each word a separate handler without |
| + splitting a function. In step 1 each of their leaves is a closure that |
| + re-prepends its word and calls the old function unchanged; the old |
| + function's word switch carries `// clireg:pending <ID>` (E3) and is split |
| + in that area's args step. |
| + **Thin wrappers stay** **(builder 14).** `RunFleets`, `runDomains`, |
| + `RunApps`, `runDB`, `runSystem`, `runCanary` and any other dispatcher a |
| + test calls become one-line wrappers, `clireg.Dispatch(subtree, args)`, |
| + so the tests keep their entry points. |
| 6. **Shapes the audit found, and their declaration (marked calls):** |
| - `system router <verb>`: `router` is a *transparent* child |
| (`Transparent: true`): the walk drops it once and continues at the |
| @@ -167,27 +197,41 @@ them and commands whose deciding word follows flags (`steering --app a |
| `runSystem`'s arms, audit B) become one child list. |
| - `version target`, `releases retention|authorize`, `channels |
| resign|digests` (dispatched inline in main's switch today) become |
| - children. `channels resign` and `channels digests` set |
| - `NoUpdateHint` because today they `return` from `main()` before the |
| - hint (audit A channels). |
| + children. |
| - `help`, `-h`, `--help` at the top level: one leaf `help` with aliases |
| - `-h`, `--help`, `Audience: internal` (no row; today's rule). Below the |
| - top level, help words stay inside each fallback, as today. |
| -7. **The update hint.** `noHintVerbs` (`update.go:67`) is deleted; |
| - `NoUpdateHint` is set on exactly those top-level nodes, and |
| - `Dispatch` returns the top-level node it ran so `main` calls |
| - `maybeUpdateHint` as today. Handlers that exit still skip it. |
| -8. **Refused at init by `clireg.Validate`** (panics; one negative fixture |
| - each): branch and leaf at once, or neither; duplicate name or alias |
| - among siblings (counting a transparent child's lifted children); |
| - `Default` naming no child; `DefaultOn` empty with `Default` set; a |
| - branch with neither `Default` nor `Fallback`; `Audience: internal` on a |
| - word that is not `__`-prefixed and not `help`; a leaf with `Args` but |
| - incomplete `Meta` (C1); annotations naming a flag the leaf's flag set |
| - does not register (B4). |
| + `-h`, `--help`, `Audience: customer`, no `Args`, `Tool: never`. It |
| + keeps its parity row (`parity/parity.tsv:184`) and its heading |
| + (`docs/site/cli.md`, `### carlos help`) **(builder 7)**. Below the top |
| + level, help words stay inside each fallback, as today. |
| +7. **The update hint** **(builder 2).** `noHintVerbs` (`update.go:67`) |
| + is deleted. `Dispatch` returns the path it ran, and `main` calls |
| + `maybeUpdateHint` unless some node on that path has `NoUpdateHint`. |
| + It is set on today's `noHintVerbs` top-level words; on `channels |
| + resign`, `channels digests`, `releases retention` and `releases |
| + authorize` (today they `return` from `main()` before the hint); and on |
| + `__demo-snapshot` and `__registry-child` (same). Handlers that exit |
| + still skip it. `canary_test.go:307` (reads `noHintVerbs`) and |
| + `update_test.go:83` (calls `maybeUpdateHint("ship")`) move to the path |
| + form. |
| +8. **Refused by `clireg.Validate`** (one negative fixture each): branch |
| + and leaf at once, or neither; duplicate name or alias among siblings |
| + (counting a transparent child's lifted children); `Default` naming no |
| + child; `DefaultOn` empty with `Default` set; a branch with neither |
| + `Default` nor `Fallback`; `Audience: internal` on a word that is not |
| + `__`-prefixed; a leaf with `Args` but incomplete `Meta` (C1); |
| + annotations naming a flag the leaf's flag set does not register (B4). |
| + **When it runs** **(builder 6):** in a package-main test |
| + (`TestCommandTreeIsValid`), not at `init` and not at dispatch. |
| + Building every leaf's flag set reads defaults from the environment and |
| + files (`defaultRegistry()`, `cli.go:58`), which must not happen before |
| + the shim and the scrub, and costs every invocation. The root is built |
| + by `commandRoot()` (a function, `sync.Once`), first called after |
| + `ScrubEnvironment`; no package-level `var root`, so code that reads |
| + the tree (`move`'s offline verbs) cannot make an initialization cycle. |
| 9. **The early phase.** `internal/cgroup` replaces its `switch os.Args[1]` |
| - with a map `Shims` (`ShimVerb: runShim`, `ProbeVerb: runProbe`, built |
| - from the existing constants); `RunShimIfRequested` keeps its name, its |
| + with a map `Shims map[string]func([]string) int` (`ShimVerb: runShim`, |
| + `ProbeVerb`: a wrapper over `runProbe()`, **builder 15**), built from |
| + the existing constants; `RunShimIfRequested` keeps its name, its |
| first-statement position in `main` and its `shimHooked` store, and |
| dispatches from that map. The registry declares the early words from |
| the same map's keys (`internal` leaves whose `Run` panics, since they |
| @@ -204,18 +248,47 @@ them and commands whose deciding word follows flags (`steering --app a |
| ### B. The argument model |
| -1. **Moved, not rewritten.** A leaf's `Args` has `Flags func(fs |
| - *flag.FlagSet)`: the leaf's existing registration code (the |
| - `fs.String`, `appFlag`, `consoleOption`, shared registrars like |
| - `gateFlags`) moved into this function. `Name` and the error handling |
| - (`ExitOnError`/`ContinueOnError`) and `Usage` header are declared beside |
| - it. `clireg` builds the flag set from these, parses it with the leaf's |
| - strategy, and calls `Run(inv *clireg.Invocation)`. The handler reads |
| - its flags back through the same pointers it registered (the `Flags` |
| - function binds them into the handler's own variables, closure or |
| - struct), so values arrive exactly as today. Side effects of |
| - registration stay (`consoleOption` still points `-d` at the |
| - package-level `destinationFlag`). |
| +1. **Moved, not rewritten** **(builder 5).** A leaf's `Args` is: |
| + - `Name` (the flag set's name, as today: `"canary ls"`), |
| + `ErrorHandling` (`ExitOnError` or `ContinueOnError`), `Output` |
| + (`stdout`, `stderr`, or `inv.Out` for leaves whose writer is |
| + injected, as `destinationsFlagSet(out, ...)` is) and `Usage` (the |
| + header passed to `flagUsage`, or none for leaves with Go's stock |
| + usage, such as `system seeds-floor`); |
| + - `New func() (bind func(*flag.FlagSet), run func(*Invocation) error)`: |
| + called once per dispatch, and once per schema read, it makes the |
| + leaf's state fresh (a local struct or closure variables, never |
| + package-level, so the projection, the corpus and `t.Parallel` tests |
| + cannot share it). `bind` is the leaf's existing registration code |
| + moved verbatim (`fs.String`, `appFlag`, `consoleOption`, shared |
| + registrars such as `gateFlags`, `ratelimitFlags`, |
| + `pipelineFlagSet`'s body), storing the returned pointers in that |
| + state; `run` is the rest of today's handler, reading them back. |
| + `clireg` creates the flag set with `Name`, `ErrorHandling` and |
| + `Output`, sets `fs.Usage` from `Usage`, calls `bind`, parses with the |
| + leaf's strategy and calls `run`. `Invocation` carries `FS` (the parsed |
| + set, for `flagWasSet`, `fs.Visit`, `applyDestinationFlags`), `Pos` |
| + (`fs.Args()`, or the strategy's positionals), `Lead` (the `leading` |
| + strategy's lifted word), `Raw`, `Out` and `Err`. Registrars that |
| + create their own flag set (`destinationsFlagSet`, `pipelineFlagSet`) |
| + split into a set-free `bind` part and the declared `Name`/`Usage`. |
| + Side effects of registration stay (`consoleOption` still points `-d` |
| + at the package-level `destinationFlag`), and since only the dispatched |
| + leaf's `bind` runs in production, nothing else is registered. |
| + |
| + **Errors** **(builder 4).** Today some parents map their children's |
| + errors: `RunAuth` prints `carlos auth <word>: <err>` and exits 1, `-h` |
| + included (`auth.go:90-109`); `RunConfig` maps `flag.ErrHelp` to 0, a |
| + flag error to 2 and others to 1; `billing` maps `ErrHelp` to 0 and |
| + others to `log.Fatalf`; `devbox` has its own table |
| + (`devbox_cli.go:310-328`); `accounts plan` maps `ErrHelp` to 0. A |
| + branch keeps that mapping as `OnError func(path []string, err error)`, |
| + moved verbatim, and `clireg` calls the nearest one on the path when |
| + `run` (or a `ContinueOnError` parse) returns an error. A branch with no |
| + `OnError` and a leaf returning a non-nil error is refused by |
| + `Validate`; leaves that exit by themselves (`log.Fatal`) keep doing so. |
| + In step 1, before `Args` exist, the same mapping sits in the leaf's |
| + `Run` closure (the parent's helper wrapping the old handler). |
| 2. **Parse strategies are the existing helpers, moved verbatim:** `std` |
| (`fs.Parse`, stops at the first non-flag: the majority, and positionals |
| before flags keep failing as today, audit B (6)); `interspersed` |
| @@ -233,7 +306,7 @@ them and commands whose deciding word follows flags (`steering --app a |
| `Meta.Tool` to a refusal unless project 2 writes an explicit mapping. |
| 4. **Flag annotations** for what a flag set cannot say: `Required |
| []string`, `Enum map[string][]string`, `Secret []string` (C4), `Scope` |
| - bindings (C2). Each name must be registered by `Flags` (A8), so an |
| + bindings (C2). Each name must be registered by the leaf's `bind` (A8), so an |
| annotation cannot name a flag that does not exist. Types come from the |
| flag set: `IsBoolFlag`, and `flag.Getter`'s value type for string, int, |
| duration and so on; a custom `flag.Value` without `Getter` is a string. |
| @@ -249,8 +322,11 @@ them and commands whose deciding word follows flags (`steering --app a |
| 6. **Raw leaves** (`system demos`, `system box|group role`, `system |
| floor-allows-prev`, `system named-units`, `system guard-exec`, |
| `system host-env` (pre-scan), `instance-control`, `instance-exec`, |
| - `instance-exit`, `instance-stop`, `agent`, `edge`, `ops host resolve`, |
| - `run` (`--` split), `store scan enforce`): their parsing stays in the |
| + `instance-exit`, `instance-stop`, `agent`, `edge`, `adopt` (startup |
| + work before `fs.Parse`, `agent.go:5643-5671`, **builder 12**), `ops |
| + host resolve`, `run` (`--` split), `store scan enforce`, and any other |
| + leaf the args step finds doing work before its parse, since parsing |
| + first would reorder its output): their parsing stays in the |
| handler, unchanged, including today's bugs (`store scan enforce -a on`, |
| audit B (1)). They carry positional and flag annotations as text only |
| and can never become tools (C3). All but `run` and `store scan |
| @@ -296,12 +372,15 @@ them and commands whose deciding word follows flags (`steering --app a |
| ### D. The parity guard, from the registry |
| -1. **A projection file.** `make parity-doc` also writes |
| - `parity/cli.tsv` from the registry: one line per node that runs (every |
| - leaf, and every branch's default), with ID, audience, effect, scope, |
| - tool name, and declared flags and enum values. A package-main test |
| - fails if the file is stale. It is the only bridge: `internal/parity` |
| - and `internal/docsite` read this file and never import package main. |
| +1. **A projection file.** `parity/cli.tsv` holds one line per node that |
| + runs (every leaf, named or unnamed default), with ID, audience, effect, |
| + scope, tool name, and declared flags and enum values. Nothing outside |
| + package main can import the tree **(builder 10)**, so the writer is a |
| + package-main test: `TestCLIProjection` fails if the file is stale and |
| + rewrites it under `-update`; `make parity-doc` runs `go test -run |
| + '^TestCLIProjection$' -update .` before its existing generator. It is |
| + the only bridge: `internal/parity` and `internal/docsite` read this |
| + file and never import package main. No hidden CLI word writes it. |
| 2. **Coverage, replacing `TestParityCLITopLevel`:** every non-internal |
| projected ID is some row's CLI member (with or without qualifier); |
| every row's CLI member is a projected ID or an `internal` early word. |
| @@ -323,34 +402,55 @@ them and commands whose deciding word follows flags (`steering --app a |
| ### E. Compatibility proof |
| -1. **The golden corpus.** `cmd/clireg-golden` (test tooling, not in the |
| - root binary) derives argv lists from the registry: for every branch, |
| - bare, `help`, `-h`, `--help`, an unknown word and an unknown flag; for |
| - every leaf, `-h`, an unknown flag, and for `Args` leaves the forms its |
| - strategy accepts with values that fail before any I/O (positional |
| - first, flags first, interspersed, `--`). Nodes marked `Golden: skip` |
| - with a reason (daemons such as `edge`, `agent`, `relay serve`; anything |
| - that would touch a box) are listed in the corpus file as skipped. It |
| - runs a binary with `HOME` and the working directory in an empty |
| - temporary directory and `CARLOS_*` unset, and records stdout, stderr |
| - and exit code. |
| -2. **Record once, replay always.** The corpus is recorded from the base |
| - commit's binary (`make clireg-golden BASE=<sha>` builds it from a |
| - temporary worktree) and committed as `testdata/clireg-golden.tsv`. A |
| - package-main test replays it against the current binary (the shared |
| - test binary `sharedCarlos` already built by `main_test.go`). A step |
| - that changes behaviour on purpose re-records and lists each changed |
| - line in its PR; project 1 itself changes none. |
| +1. **The golden corpus** **(builder 11).** A package-main test, |
| + `TestCLIGolden`, derives argv lists from the tree (only package main |
| + can read it): for every branch, bare, `help`, `-h`, `--help`, an |
| + unknown word and an unknown flag; for every leaf, `-h` and an unknown |
| + flag; and for each leaf with `Args`, its own `GoldenArgs` (written by |
| + hand in the args step, since only the leaf's author knows which values |
| + fail before any I/O): the positional-first, flags-first, interspersed |
| + and `--` forms its strategy accepts. Nodes marked `Golden: skip` with a |
| + reason (daemons such as `edge`, `agent`, `relay serve`; anything that |
| + would touch a box or the terminal) are listed in the file as skipped. |
| + Each case runs with `HOME` and the working directory in an empty |
| + directory under `$TMPDIR`, `CARLOS_*` unset, `HTTP(S)_PROXY` pointed at |
| + a closed local port so any network attempt fails at once and the same |
| + way, and a 5-second limit; a case that exceeds it is recorded as |
| + skipped with that reason rather than flaking. It records stdout, stderr |
| + and exit code, with `log`'s date-time prefix (`^\d{4}/\d\d/\d\d |
| + \d\d:\d\d:\d\d `) and the temporary paths normalised, on record and |
| + on replay alike. |
| +2. **Record once, replay always.** `go test -run '^TestCLIGolden$' |
| + -record -base <sha> .` extracts the base commit with `git archive` |
| + into a directory under `$TMPDIR`, builds it there, runs the cases, and |
| + writes `testdata/clireg-golden.tsv`; it removes the directory after. |
| + Without `-record` the test replays the file against the current binary |
| + (`sharedCarlos`, already built by `main_test.go`). Step 1 records |
| + from its merge base; each args step adds its leaves' `GoldenArgs` cases |
| + recorded from its own merge base. A step that changes behaviour on |
| + purpose re-records and lists each changed line in its PR; project 1 |
| + itself changes none. |
| 3. **The word-dispatch lint.** `TestWordsDispatchOnlyInRegistry` parses |
| the root binary's non-test Go files and fails on a `switch` or |
| if-chain comparing `X[n]` or `fs.Arg(n)` (any `[]string` index or |
| `Arg` call) against two or more string literals, unless the statement |
| - carries `// clireg:enum <node ID> <positional>` and its literals equal |
| - that positional's declared `Enum` (help words excluded). Fallbacks may |
| - compare against help words only. This keeps new sub-verbs out of |
| - handlers and ties every payload enum to the code that reads it. It is a |
| - ban with an exact allowance, not an enumeration (Paul's 2026-11-09 |
| - ruling stands: the list of commands comes from the registry). |
| + carries one of: |
| + - `// clireg:enum <node ID> <positional>`, and its literals equal that |
| + positional's declared `Enum` (help words excluded); |
| + - `// clireg:pending <node ID>`, allowed only until that node's args |
| + step **(builder 1, 8)**: in step 1 every payload switch the audit |
| + lists (about 37 in package main, `runSteering`'s at |
| + `instances_cli.go:957` among them) and every whole-function |
| + dispatcher (A5) carries it; each args step turns its area's markers |
| + into `clireg:enum` or removes the switch, and step 7 makes the lint |
| + refuse `pending`. |
| + Fallbacks may compare against help words only. A switch on a variable |
| + the registry passed in (`switch verb` in `runSystemAntivirus`, set by |
| + the child's closure) is not flagged: that word was dispatched by the |
| + walk. This keeps new sub-verbs out of handlers and ties every payload |
| + enum to the code that reads it. It is a ban with an exact allowance, |
| + not an enumeration (Paul's 2026-11-09 ruling stands: the list of |
| + commands comes from the registry). |
| ### F. Migration |
| @@ -360,15 +460,17 @@ adapter, no opaque nodes; this removes R3-2 and R3-3 rather than patching |
| them. |
| - **Step 1, words (one branch, one census card).** `internal/clireg` |
| - (walk, `Validate`, early phase, `Invocation`, strategies), every |
| + (walk, `Validate`, `Invocation`, strategies, `OnError`), every |
| dispatcher's `switch` turned into nodes (about 50 dispatchers and their |
| nested ones, audit A and B), `Run` on each leaf as |
| - `clireg.RawArgs(runX)` (the handler unchanged, receiving its args), the |
| - early phase, `commands.go`, `NoUpdateHint`, the corpus recorded from the |
| - merge base and replayed, the lint, `parity/cli.tsv` and the new |
| - coverage guard (D2, D5), the docsite move (G), and the parity rows the |
| - full coverage newly demands. Built as one task per area so each commit |
| - is reviewable; merged once so the guard never has a half state. Only |
| + `clireg.RawArgs(...)` over the old handler (unchanged, receiving its |
| + args, wrapped in the parent's error mapping where one exists), the |
| + early phase (A9), `commandRoot()` in `commands.go`, `NoUpdateHint` |
| + (A7), the corpus recorded from the merge base and replayed (E1-E2), the |
| + lint with `pending` markers (E3), `parity/cli.tsv` and the new coverage |
| + guard (D2, D5), the docsite move (G), and the parity rows the full |
| + coverage newly demands. Built as one task per area so each commit is |
| + reviewable; merged once so the guard never has a half state. Only |
| `Audience` is required on leaves here. |
| - **Steps 2 to 6, arguments by area** (each one branch and census card): |
| (2) apps, appconfig, env, secrets, features, assets, domains, routes; |
| @@ -378,11 +480,13 @@ them. |
| protection, steering; (5) store, email, relay, services, fleets, |
| accounts, auth, billing, ledger, devbox, config, update; (6) system, |
| ops, move, economics, proof, status, the host, edge, vet and |
| - instanceexec subtrees. Each moves registration into `Flags`, names the |
| - strategy, writes annotations and metadata, and replays the corpus. |
| - Customer areas go first because project 2 needs them. |
| + instanceexec subtrees. Each moves registration into `Args.New` (B1), |
| + names the strategy, writes annotations, metadata and `GoldenArgs`, |
| + splits its area's whole-function dispatchers, converts its `pending` |
| + markers, and replays the corpus. Customer areas go first because |
| + project 2 needs them. |
| - **Step 7:** `RawArgs` is allowed only on `raw`-strategy leaves (B6); |
| - `Validate` refuses it elsewhere. |
| + `Validate` refuses it elsewhere, and the lint refuses `pending`. |
| ### G. Docsite |
| @@ -406,7 +510,7 @@ non-vacuity test becomes one on the file (at least 20 commands; `ship`, |
| - **A4:** words after flags are enum positionals, not nodes. |
| - **A6a, A6b:** `system router` is transparent; `ops host` is conditional. |
| - **A9:** shim words enumerated from cgroup's own map. |
| -- **B1:** registration moves into the node rather than being redeclared |
| +- **B1:** registration moves into the node (`Args.New`) rather than being redeclared |
| in a schema DSL, so help output and parsing cannot change. |
| - **B2, B6:** hand loops and hand parsers stay as they are (`raw`) unless |
| proven identical. |
| @@ -418,6 +522,14 @@ non-vacuity test becomes one on the file (at least 20 commands; `ship`, |
| argued. |
| - Help text, exit-code inconsistencies and silent stray positionals are |
| preserved (Non-goals). |
| +- From the builder check: `Fallback(args, consumed)` (A2); unnamed |
| + default leaves (A2); whole-function dispatchers wrapped in step 1 and |
| + split in their args step (A5); the update hint skipped per path (A7); |
| + `Validate` in a test and the root built lazily after the scrub (A8); |
| + `Args.New` with fresh per-dispatch state and `OnError` per branch |
| + (B1); the projection written by a package-main test (D1); hand-written |
| + `GoldenArgs` and a closed proxy for the corpus (E1); `pending` lint |
| + markers until each args step (E3); `help` stays a customer row (A6). |
| ## For Paul |