spec: CLI and console parity stock and guard (slice 3), draft
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 files changed,
+489
−0
docs/superpowers/notes/2026-11-09-parity-inventory.md+403 −0docs/superpowers/specs/2026-11-09-parity-guard-design.md+86 −0
CI cancelled — superseded by a newer push — run details
Intent
Attributed to this commit: 40.6 g CO₂e (5,302,161 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/notes/2026-11-09-parity-inventory.md b/docs/superpowers/notes/2026-11-09-parity-inventory.md| new file mode 100644 |
| index 000000000..690f5bff2 |
| --- /dev/null |
| +++ b/docs/superpowers/notes/2026-11-09-parity-inventory.md |
| @@ -0,0 +1,403 @@ |
| +# CLI / console parity inventory |
| + |
| +Taken from origin/main at `04dc1dc0` (2026-11-09), read-only. |
| + |
| +Sources: |
| + |
| +- The CLI: `main.go:63-238` dispatch, each command's own dispatcher (cited per row), and `docs/site/cli.md`. |
| +- The console: the browser routes in `internal/console/server.go:1933-2260`, `authcli.go:549-560`, `apidemo.go:273-294` and `claim_routes.go`, plus the forms in `internal/console/templates/*.html`. |
| +- `/api/cli/*` doors (224 of them, registered through `cliRoute`/`cliScopedRoute`) are left out as console features. They are only used to size a gap: if a door exists, the browser form is S. |
| + |
| +All console citations are `internal/console/<file>:<line>` of the handler. A plain `server.go:NNNN` is the route registration. |
| + |
| +**Status words** |
| + |
| +- **PARITY**: the console does the same job. |
| +- **PARTIAL**: the console does part of it. The missing part is named. |
| +- **GAP**: the console has nothing that does it, or only shows it read-only and tells you to run the CLI. |
| +- **CLI-only (reason)**: does not belong in a browser. |
| + |
| +**Sizes** (gaps only) |
| + |
| +- **S**: a form or table on an existing page, over backend logic or a `/api/cli` door that already exists. |
| +- **M**: a new handler and page or section, or several related forms with new view logic. |
| +- **L**: needs a new subsystem or a design first. |
| + |
| +--- |
| + |
| +## 1. Every CLI command, against the console |
| + |
| +### 1a. Customer-facing: your apps |
| + |
| +| CLI command | What it does | Console equivalent | Status | Size | |
| +|---|---|---|---|---| |
| +| `auth login` | device-code login for this terminal | approval page `/auth/cli` authcli.go:1648, approve authcli.go:1723 (it is the browser half of the same flow) | CLI-only (auth bootstrap) | | |
| +| `auth whoami` / `logout` / `default` | show identity, revoke own token, pick a default console | `/settings` lists and revokes CLI tokens authcli.go:1848, :1910 | CLI-only (terminal identity) | | |
| +| `config destinations` list/add/set/default/remove/rename | named deploy targets in `.carlos/config` | none | CLI-only (local file) | | |
| +| `apps create` | claim an app name, with region/analytics/place/control-plane/build-probe | New app form server.go:5788 (+ form :5764, region picker regionpicker.go:97) | PARTIAL: no `--place`, `--control-plane`, `--build-probe` at create | S | |
| +| `apps list` | the account's apps with region/fleet | account home server.go:4282 (apps.html) | PARITY | | |
| +| `apps place --target` | put an app on a customer fleet or back | app settings Placement fleets.go:1133; fleet page "Place an app here" fleets.go:1175 | PARITY | | |
| +| `apps region [--set]` | show/change where new instances start | settings General region form appregionset.go:417 | PARITY | | |
| +| `apps build-probe` | path whose body names the running build | none | GAP | S | |
| +| `apps set --swap/--swap-concurrency` | how instances take a new build | settings General swap form appswap.go:20 | PARITY | | |
| +| `apps set --interactive on/off` | allow `run -it` / `console` terminals | none | GAP | S | |
| +| `apps set --copies N` | copies per instance on fleet boxes | none (overview shows counts only) | GAP | S | |
| +| `apps set --instance-control/--default-updates/--default-major/--default-channel` | app-wide update defaults | none (per-instance only, see `instances set`) | GAP | S | |
| +| `apps set --egress-allow/--size` | instance policy | none | operator-only, see 1d | | |
| +| `apps show` | read instance policy (egress, size) | none | GAP (read) | S | |
| +| `apps delete` | move to Trash | settings Delete appsettings.go:1385 (passkey) | PARITY | | |
| +| `apps restore` | bring back from Trash | Trash restore ownership.go:310 | PARITY | | |
| +| `apps ttl <dur>` | move a temporary app's expiry, 1 h to 30 d | Extend form applist.go:255 (owner; 1, 7 or 30 days, extend only) | PARTIAL: fixed steps, cannot shorten | S | |
| +| `apps keep` | make a temporary app permanent | Keep button in app nav apitemporary.go:435 | PARITY | | |
| +| `apps source pull` | download source saved at claim | "Download source" on overview app_source.go:188 | PARITY | | |
| +| `ship` | upload a release built on this machine | none | CLI-only (local build and upload) | | |
| +| `deploy` (incl. `--temporary`) | ship + promote + wait for the URL | none | CLI-only (local build). A browser "deploy from git" would be L and is not proposed | | |
| +| `promote` | point a channel at a shipped version | Releases page promote forms server.go:5910 (passkey rules apply) | PARITY | | |
| +| `rollback` | point a channel back | Releases "Live now" rollback server.go:6180 | PARITY | | |
| +| `canary deploy` | ship + canary channel + its own host | New canary (channel at an existing version) server.go:6671 | PARTIAL: no build upload (fine), no canary host | S (with instances create) | |
| +| `canary ls` / `rm` | list / retire canaries | Releases "Canaries" section, retire server.go:6837 | PARITY | | |
| +| `channels` | what each channel serves | Releases "Live now" + "Channels" (app_releases.html:30, :114) | PARITY | | |
| +| `channels resign` | re-sign a channel pointer with manifest digests | none | GAP (niche, needs typed confirmation of digests) | S | |
| +| `channels digests` (show) | are pointers digest-signed | none | GAP (read) | S | |
| +| `pipeline show/init/set/add/remove` | release ladder | Pipeline page pipelinepage.go:218, save :262 (templates, add/remove/save rows) | PARITY | | |
| +| `releases` | every shipped version | Releases "Versions" + "Tags" server.go:4771 | PARITY | | |
| +| `releases retention --keep/--off/--dry-run` | prune policy | Releases shows the keep count only (app_releases.html:61) | PARTIAL: read only | S | |
| +| `version target` | semver base for `ship` | none | GAP | S | |
| +| `env set/unset/list` | plain config vars per bundle | settings Environments form envform.go:690 | PARITY (existing bundles) | | |
| +| `env environments` | list named bundles | settings Environments section (app_settings.html:267) | PARITY | | |
| +| `env set --environment <new>` | create a new named bundle by writing to it | none: the form only edits bundles that already exist | GAP | S | |
| +| `env exec-delivery file\|off` | opt a bundle into file delivery | none | GAP | S | |
| +| `env sync` | nudge boxes to re-read config now | none | GAP | S | |
| +| `env adopt/release/fork` | team-scope ownership of an environment | none | GAP (owner-only) | S | |
| +| `secrets set/unset/list` | sealed config | settings Environments form, sealed in the browser (envform.go:690) | PARITY | | |
| +| `secrets genkey` | mint a sealing key pair locally | none | CLI-only (private key must stay local) | | |
| +| `secrets fingerprint` | fingerprint of a local host.env key | none | CLI-only (reads a local file) | | |
| +| `instances list` | an app's instances | Running page server.go:4856, instance page instancepage.go:245 | PARITY (fewer columns: no DB size per row, EGRESS, REASON) | | |
| +| `instances enable` | opt the app into provisioning | none | GAP | S | |
| +| `instances create` | new instance (host, channel, environment, region, role, `--from/--at`, `--restore`) | none: the empty Running page prints the CLI command (app_instances.html:55-58) | GAP | M | |
| +| `instances delete` | remove an instance (data kept) | none | GAP | S | |
| +| `instances set-channel` | which channel a route follows | none (instance page shows channel, "channel-hint" only) | GAP | S | |
| +| `instances set-environment` | bind to a config bundle | none | GAP | S | |
| +| `instances set-assets on/off` | asset copying per instance | none | GAP | S | |
| +| `instances set --updates/--major/--pin` | how one instance takes builds | instance page Updates form browserupdates.go:272 | PARITY (channel not editable there) | | |
| +| `instances update [--fast-track]` | install newest ready build now | instance page "Update now" browserupdates.go:294 | PARITY | | |
| +| `instances retry` | clear a failed-build hold | instance page Retry browserretry.go:32 | PARITY | | |
| +| `instances import` (+ `commit`/`abort`) | bring an outside SQLite instance in, verify, commit | none | GAP | L (browser upload of a DB plus a verify-token flow) | |
| +| `instances door-key create/list/revoke` | keys for the edge-local socket | none | GAP | M (one-time secret display) | |
| +| `instances set-upstreams` | TCP backends | none | operator-only, see 1d | | |
| +| `steering latency\|off` | DNS latency steering per instance | none | GAP | S | |
| +| `routes` | routes with channel, environment, replication, DB size | Running page + settings Domains cover host and channel | PARTIAL: no environment or replication column | S | |
| +| `restart [--host/--environment/--dry-run]` | cycle instances | Restart app browserrestart.go:38; restart one instance :42 | PARTIAL: no environment scope, no dry-run listing | S | |
| +| `domains list` | claimed hostnames | settings Domains table (app_settings.html:78) | PARITY | | |
| +| `domains attach` / `detach` | custom hostname on/off | appdomains.go:32 / :102 | PARITY | | |
| +| `domains verify` | prove TXT ownership | attach again re-verifies (appdomains.go:92 guidance) | PARTIAL: no explicit Verify button | S | |
| +| `domains check` / `buy` | registrar check and purchase | Buy page appdomainbuy.go:139, check :146, buy :168, purchase status :200/:226 | PARITY | | |
| +| `domains paths` | path routing under a hostname | none | GAP | S | |
| +| `domains placements` | regional placements for a hostname | none | GAP | M (DNS guidance per region) | |
| +| `features list` | the app's feature flags | settings Features table (app_settings.html:481) | PARITY | | |
| +| `features set key=value` | set or clear a flag | none: section prints the CLI command | GAP | S | |
| +| `assets status` / `purge` | edge copies of asset files | none | GAP | S | |
| +| `gate set/clear/list` | password gate | settings Domains, Password gate appsettings.go:1177 | PARITY | | |
| +| `ratelimit show/set/clear` | per-client limits | settings Domains, Rate limit appsettings.go:1278 | PARITY | | |
| +| `logs [-f]` | merged log timeline | Logs page server.go:4924 (+ data :5030) | PARITY | | |
| +| `errors [--set-level]` | error groups; app log level | Errors page errorsview.go:217; level errorsview.go:296 | PARITY | | |
| +| `availability` | 502/503/504 by cause | Availability page errorsview.go:224 | PARITY | | |
| +| `analytics [--set-count]` | page views, visitors; on/off | Analytics page analyticsview.go:577; setting :103 | PARITY | | |
| +| `protection --record-only` | edge guard mode | Protection page protectionview.go:81; setting protectionsetting.go:53 | PARITY | | |
| +| `geo <ip>` | GeoIP lookup | none | GAP | S | |
| +| `explain <code>` | decode an edge reference code | none | GAP | S | |
| +| `schedule ls/set/rm/run` | recurring POSTs to the app | none: no page shows schedules at all | GAP | M | |
| +| `sidecars enable/create/ls/wake/rm/logs` | socketless members | none | GAP | M | |
| +| `run` | one command on one instance, streamed output, files | none | GAP | M (doors exist; needs streamed output and upload in a page) | |
| +| `run -it` / `console` | interactive terminal session | none | GAP | L (browser terminal over websocket, security review) | |
| +| `db query` | one read-only query on a restored replica | none | GAP | M | |
| +| `db pull [--at]` | save a restored copy of the DB | none | GAP | M (server-side restore to a download) | |
| +| `store create` | declare and provision object storage | none: Storage section prints the CLI command (app_settings.html:400) | GAP | S | |
| +| `store status` | the app's store | settings Storage table (app_settings.html:302) | PARITY | | |
| +| `store apply` | owner applies for storage | Account settings storepage.go:88 | PARITY | | |
| +| `store rotate [--finish]` | rotate store credentials | none: section prints the CLI command | GAP | S | |
| +| `store scan request/status/grant/revoke/sweep/enforce/rotate-webhook-key` | antivirus scanning for an app's store | none | GAP | M | |
| +| (store destroy) | | settings Storage destroy appsettings.go:1528 | console-only, see 2 | | |
| +| `relay enable/status/disable/adopted` | STUN/TURN for an app | none | GAP | M (status shows per-region health and waiting routes) | |
| +| `email enable` | turn on tenant email | none: section prints the CLI command | GAP | S | |
| +| `email status` | email state | settings Email table (app_settings.html:506) | PARITY | | |
| +| `email domains add/remove` (+ verify) | sending domains and DNS records | none | GAP | M (DNS records table) | |
| +| `email test` | send a test mail | none | GAP | S | |
| +| `email events [push]` | delivery events; webhook push | none | GAP | M | |
| +| `email credentials create/list/revoke` | standalone SMTP credentials | list shown read-only (app_settings.html:548) | PARTIAL: no create/revoke | M (one-time secret display) | |
| +| `email rotate [--finish]` | rotate the SMTP key | none | GAP | S | |
| +| `email pause/resume` | stop/restart sending | none | GAP | S | |
| +| `ledger list/head` | an app's ledgers | none | GAP | S | |
| +| `ledger publish` | choose which ledgers are public | none | GAP | S | |
| +| `ledger append/blob` | write entries and blobs | none | CLI-only (programmatic writes by the app or CI) | | |
| +| `ledger verify` | verify a published chain | none | CLI-only (client-side verification) | | |
| +| `move` (+ `status/cut/abort/resolve`, `offline stage..finish`) | move an instance to another region | instance page shows "moving" only (app_instance.html:15) | GAP (behind `CARLOS_MOVES_PHASE1`) | M | |
| +| `devbox share/unshare/list/serve` | publish a local dev server | none | CLI-only (box-local) | | |
| +| `vet` | check a release against the contract | none | CLI-only (local tooling) | | |
| +| `update` | update this binary | none | CLI-only (local) | | |
| +| `skills [name]` | print published agent skills | none | CLI-only (agent tooling; it is a public index) | | |
| +| `version` | print build id | none | CLI-only | | |
| +| `help` | usage | none | CLI-only | | |
| + |
| +### 1b. Customer-facing: accounts, fleets, credentials |
| + |
| +| CLI command | What it does | Console equivalent | Status | Size | |
| +|---|---|---|---|---| |
| +| `accounts create` | new account | New account server.go:3427 (+ form :3392) | PARITY | | |
| +| `accounts list` | your accounts | `/accounts` accountindex.go:7 | PARITY | | |
| +| `services create/ls/rotate/revoke` | service credentials | Account settings: mint svcpage.go:269, rotate :460, revoke :540 | PARITY | | |
| +| `fleets ls` | the account's fleets | Fleet tab accountfleet.go:227 | PARITY | | |
| +| `fleets show` | boxes, versions, managed progress | Fleet page fleets.go:1505 | PARTIAL: no managed-operation progress | S | |
| +| `fleets create --bucket` (BYO) | create a fleet | BYO page prints the CLI command (accountfleet.go:250, fleet_byo.html:20) | GAP | S | |
| +| `fleets create --managed` | ask for a managed fleet | none | GAP | M (plan preview and progress) | |
| +| `fleets add-box` | register a box, token printed once | none: fleet page prints the CLI command (fleetdetail.html:73) | GAP | S (one-time token display) | |
| +| `fleets boxes add` (managed) | add managed boxes | none | GAP | S | |
| +| `fleets rotate-token` | new box token | Fleet page rotate fleets.go:1538 | PARITY | | |
| +| `fleets tag-box` | box tags | Fleet page tags fleets.go:1669 | PARITY | | |
| +| `fleets detach-box` | remove a box | Fleet page detach fleets.go:1603 | PARITY | | |
| +| `fleets drain` | move instances off a box | none | GAP | S | |
| +| `fleets secrets-key` | register the fleet's sealing public key | fingerprint shown; page prints the CLI command (fleetdetail.html:75-79) | GAP | S | |
| + |
| +### 1c. Box-local and host verbs (CLI-only) |
| + |
| +These run on a box or under systemd. None belongs in a browser. |
| + |
| +| CLI command | What it does | Status | |
| +|---|---|---| |
| +| `bootstrap` | prepare a host | CLI-only (box-local, root) | |
| +| `add` / `remove` / `route` (+ `hibernate/backing/unit/replication`) | this box's routes | CLI-only (box-local operator) | |
| +| `instances` (no sub-verb, on a box) | this box's registry routes | CLI-only (box-local) | |
| +| `edge` / `agent` / `adopt` | front door, host agent, adoption pass | CLI-only (systemd) | |
| +| `instance-control/-exec/-exit/-stop/-probe` | instance plumbing | CLI-only (systemd) | |
| +| `ops litestream/restore-verify`, `ops host resolve` | box operations; host-claim resolve | CLI-only (box / operator) | |
| +| `release-keygen` | mint signing keys | CLI-only (private key stays local) | |
| +| `proof keygen/get/put/history` | dev proofs a box needs | CLI-only (box adoption) | |
| +| `relay serve` / `relay keygen` | run the relay; mint a region master | CLI-only (systemd / key material) | |
| +| `system apply/files/guard-arm/guard-exec/floor-allows-prev/install-channel/host-env/named-units/db-worker/journal-migrate/group-maintenance` | root oneshots and units | CLI-only (box-local, root) | |
| +| `status --dry-run` | leak check against a fixture fleet | CLI-only (local test) | |
| + |
| +### 1d. Operator-only (`carlos system ...`, ops account) |
| + |
| +Not customer parity. Listed so the operator console's gaps are visible. |
| + |
| +| CLI command | What it does | Ops console equivalent | Status | |
| +|---|---|---|---| |
| +| `store approvals/approve/decline` | decide storage applications | `/fleet/store` storepage.go:131, decision :157 | PARITY | |
| +| `store grant` | per-app storage override | none | GAP | |
| +| `economics bill` | record the month's AWS bill | `/fleet/economics/bill` economicspass.go:1394 | PARITY | |
| +| `economics backhaul` | region-edge backhaul cost | Economics page models it (economics.html:166) | PARTIAL | |
| +| `status --live` | what every box reported | Boxes page opboxes.go:71 | PARITY | |
| +| `status --instances` / `--layout` | awake instances; layout per box | Boxes page counts; Architecture archpage.go:23 | PARTIAL | |
| +| `accounts plan [--set]` | show/change an account's plan | Economics accounts tier economicspass.go:1473 (pool tier only) | GAP | |
| +| `accounts migrate` | re-prefix an app's objects | none | CLI-only (one-off migration) | |
| +| `billing problems/close/house` | billing problems; house accounts | none | GAP | |
| +| `apps set --egress-allow/--size`, `instances set --size` | instance policy | none | GAP | |
| +| `instances set-upstreams`, `instances create --addr` | TCP backends | none | GAP | |
| +| `channels digests on/off` | digest signing switch | none | GAP | |
| +| `releases authorize` | sign a promotion record for an old build | none | GAP | |
| +| `relay rotate` | rotate a region's relay master | none | GAP | |
| +| `move resolve --declare-lost` | declare a box lost mid-move | none | GAP | |
| +| `system update/status/rollback/cancel-activation` | platform self-update | none | GAP | |
| +| `system antivirus` | deployment-wide scanning | none | GAP | |
| +| `system pdf status` | PDF service status | none | GAP | |
| +| `system layout` | instance layout | Architecture page (read) archpage.go:23 | PARTIAL | |
| +| `system geoip publish/status/off` | platform GeoIP database | none | GAP | |
| +| `system seeds-floor`, `legacy-routes`, `lifetimes cutover`, `hosts-used` | one-off cutovers and floors | none | CLI-only (one-shot migrations) | |
| +| `system box` / `group` (roles) | box and group roles | none | GAP | |
| +| `system demos status/serving/takedown`, demo reports | demo serving and takedowns | public report form apidemoreports.go:122; no operator page | GAP | |
| +| `system managed-fleets show/set` | managed-fleet catalog | none | GAP | |
| + |
| +--- |
| + |
| +## 2. Console actions with no CLI equivalent |
| + |
| +| Console action | Where | Status | |
| +|---|---|---| |
| +| Sign in (passkey, email link/code, step-up), sign out | server.go:1935-1946, emailsignin.go:395/442/622, stepup.go:361 | console-only (browser auth) | |
| +| List and revoke any CLI token | `/settings` authcli.go:1848, :1910 | GAP (CLI can only log itself out) | |
| +| Team: invite, revoke invite, accept invite | server.go:3474, :3697, :3818 | GAP | |
| +| Team: remove member | ownership.go:37 | GAP | |
| +| Team: transfer ownership | ownership.go:102 (passkey) | console-only (passkey) | |
| +| Delete account | ownership.go:135 (passkey) | console-only (passkey) | |
| +| Account default error level | errorsview.go:339 | GAP | |
| +| Account default analytics | analyticsview.go:160 | GAP | |
| +| Billing: checkout, change plan, seats, renewal, card, portal, confirm | billingcheckout.go:150, billingchange.go:148/579, billingseats.go:712, billingcard.go:13, billingportal.go:33, billingops.go:734 | console-only (Stripe redirect) | |
| +| Plan lapse: choose apps to keep | planlapse_keep.go:64, :172 | GAP | |
| +| Rename an app (before first ship) | appsettings.go:896 | GAP | |
| +| Move an app to another account | appsettings.go:1686 (passkey) | console-only (passkey) | |
| +| Mark app as control plane after create | controlplane.go:265 | GAP (CLI only at `apps create --control-plane`) | |
| +| Clear the control-plane flag | controlplane.go:208 (passkey) | console-only (passkey) | |
| +| Turn the production flag on/off | server.go:6360 (passkey) | console-only (passkey) | |
| +| Fast-track a channel past its bake | server.go:6429 (passkey) | console-only (passkey); `instances update --fast-track` covers one instance | |
| +| Confirm / reject a pending gated change | pendinghandlers.go:710, :796 | console-only (passkey quorum by design); CLI `pipeline show` lists them | |
| +| Delete now (purge from Trash) | ownership.go:420 (passkey) | console-only (passkey, per apps.go:16) | |
| +| Destroy an object store | appsettings.go:1528 (passkey) | console-only (passkey) | |
| +| App activity (audit log) | server.go:5124 | GAP (`logs` has platform events, not the audit trail) | |
| +| Protection events (what the guard did) | protectionview.go:81, data :112 | GAP (`protection` shows only the mode) | |
| +| Analytics live view | analyticslive.go:173 | console-only (live UI) | |
| +| Star an app | applist.go:179 | console-only (UI preference) | |
| +| Getting-started checklist hide/show/skip/done | gettingstarted_handlers.go:49-73 | console-only (UI) | |
| +| Account mismatch review | accountreview.go:93 | console-only (UI) | |
| +| Demo claim pages (intent, prove, select, kept) | demo_claim_page.go:111/323/363/475, demo_claim_kept.go:18/38 | console-only (browser claim flow; agents use `/api/demo/claims`) | |
| +| Report a demo | apidemoreports.go:122 | console-only (public form) | |
| +| Alert email links (confirm, unsubscribe, snooze) | alertpages.go:896-1019 | console-only (email links) | |
| +| Ops: dashboard, activity, people, person, metrics, index | opdashboard.go:364, opactivity.go:168, oppeople.go:118, opperson.go:104, server.go:4182, opshell.go:88 | operator GAP (no CLI reads) | |
| +| Ops: alert connectors add/test/confirm/delete, rule save, history | alertpages.go:514/610/659/695/719/776 | operator GAP | |
| +| Ops: economics scenarios, tier, accounts table | economicspass.go:1290, :1473, server.go:4235 | operator GAP | |
| +| Ops: fleet-wide protection view | protectionview.go:332 | operator GAP | |
| +| Ops: architecture map and refresh | archpage.go:23, :117 | operator GAP | |
| + |
| +--- |
| + |
| +## 3. Customer-facing gaps: sizes and work packages |
| + |
| +These are grouped by how they would be built and shipped. Every S already has its backend: a `/api/cli` door that a browser handler can reuse, plus a page or section to put it on. |
| + |
| +### WP1: Instances in the browser (console side) |
| +The Running page tells a new user to run `carlos instances create` (app_instances.html:55-58). Nothing in the console can make an instance yet. |
| + |
| +| Gap | Size | Why | |
| +|---|---|---| |
| +| `instances enable` | S | PUT `instances-manifest` door exists; one button on the empty Running page | |
| +| `instances create` | M | POST `instances` door exists, but the form has many fields (host, channel, environment, region, role, `--from/--at`, `--restore`) and refusal copy | |
| +| `instances delete` | S | DELETE door; typed confirmation on the instance page | |
| +| `instances set-channel` | S | POST `.../channel` door; a select on the instance page | |
| +| `instances set-environment` | S | PATCH door; a select fed by the environments list | |
| +| `instances set-assets` | S | PATCH door; a toggle | |
| +| `steering` | S | PATCH door; a toggle | |
| +| `routes` environment/replication columns | S | data already read for `routes`; two columns | |
| +| `restart --environment` / dry-run list | S | `restart/scope` door exists | |
| +| canary with its own host | S | becomes instances create on the canary channel once create exists | |
| + |
| +### WP2: App settings that are CLI-only today |
| +Small forms on existing settings sections. Several of these sections already print the CLI command. |
| + |
| +| Gap | Size | Why | |
| +|---|---|---| |
| +| `features set` | S | POST `features` door; the Features section lists flags already | |
| +| `apps set --interactive` | S | PUT `interactive` door; owner-only toggle | |
| +| `apps set --copies` | S | PUT `copies` door | |
| +| `apps set --instance-control/--default-*` | S | PUT `updates` door; same words as the instance Updates form | |
| +| `apps build-probe` | S | POST `build-probe` door | |
| +| `apps create --place/--build-probe/--control-plane` | S | same create door, extra fields | |
| +| `apps show` (policy read) | S | GET `policy` door | |
| +| `apps ttl` any duration / shorten | S | POST `ttl` door | |
| +| `version target` | S | GET/PUT `version-target` door | |
| +| `releases retention` set + dry-run | S | GET/POST `retention` door | |
| +| `channels digests` (show) / `channels resign` | S | GET `channels`, POST `channels/resign`; resign needs a digest confirmation step | |
| +| new named environment | S | config PUT with `environment`; an "add environment" card on the env form | |
| +| `env exec-delivery` | S | config PUT field | |
| +| `env sync` | S | POST `config/sync` door; one button | |
| +| `env adopt/release/fork` | S | three doors in apienv.go:29-31; owner-only | |
| +| `domains verify` | S | explicit button over the verify door | |
| +| `domains paths` | S | PUT `domains/{host}/paths` door | |
| +| `domains placements` | M | PUT door exists; needs per-region DNS guidance and the ingress refusal copy | |
| +| `geo`, `explain` | S | GET `geo`, `edge-refs/{code}` doors; a lookup box | |
| +| `assets status/purge` | S | GET `assets`, POST `assets/purge` doors | |
| +| `ledger list/head/publish` | S | ledger doors exist; a table plus a public toggle | |
| + |
| +### WP3: Email and storage self-serve |
| +Both settings sections are read-only today and print CLI commands. |
| + |
| +| Gap | Size | Why | |
| +|---|---|---| |
| +| `store create` | S | POST `store` + `store/provision` doors; one button in the empty state | |
| +| `store rotate [--finish]` | S | doors exist; the section already detects a half-finished rotation | |
| +| `store scan *` | M | seven doors; needs a scan status table, grants, enforce toggle, key rotation with one-time display | |
| +| `email enable` | S | POST `email/enable` door | |
| +| `email domains add/remove/verify` | M | doors exist; needs a DNS records table and verify state per domain | |
| +| `email test` | S | there is no test door: the CLI composes the send itself (mail_cli.go:1549), so a small server-side handler | |
| +| `email credentials create/revoke` | M | doors exist; one-time password display is new UI | |
| +| `email rotate [--finish]`, `pause/resume` | S | doors exist | |
| +| `email events` + push webhook | M | GET events / push doors; new table and webhook form | |
| + |
| +### WP4: Schedules and sidecars |
| +Neither appears anywhere in the console, so the person cannot see what their agent set up. |
| + |
| +| Gap | Size | Why | |
| +|---|---|---| |
| +| `schedule ls/set/rm/run` | M | doors exist; new settings section with a table (declared vs each instance's next/last) and forms | |
| +| `sidecars enable/create/ls/wake/rm/logs` | M | doors exist; new section; logs can deep-link the Logs page | |
| + |
| +### WP5: Fleets self-serve |
| +| Gap | Size | Why | |
| +|---|---|---| |
| +| `fleets create --bucket` (BYO) | S | POST `fleets/{account}/new` door; the BYO page already explains it | |
| +| `fleets add-box` | S | POST `boxes` door; one-time token display (the rotate form already does this) | |
| +| `fleets drain` | S | POST `drain` door; a button beside rotate/detach | |
| +| `fleets secrets-key` | S | PUT `secrets-key` door; paste a public key | |
| +| `fleets boxes add` (managed) | S | POST `managed-boxes` door | |
| +| `fleets create --managed` + progress | M | `managed-plan` preview + operation progress page | |
| + |
| +### WP6: Relay |
| +| Gap | Size | Why | |
| +|---|---|---| |
| +| `relay enable/status/disable/adopted` | M | doors exist; status has per-region health and routes waiting on a manual restart | |
| + |
| +### WP7: Run and data access |
| +| Gap | Size | Why | |
| +|---|---|---| |
| +| `db query` | M | POST `db/{host}/reads` door exists; needs a query page, result table, limits copy | |
| +| `db pull [--at]` | M | the CLI restores from LTX locally; a browser download needs that restore done server-side | |
| +| `run` (non-interactive) | M | runs doors exist (create, follow, cancel, ack); needs streamed output in a page and file upload | |
| +| `run -it` / `console` | L | browser terminal over a websocket to the box's PTY; a security design first (who, audit, idle) | |
| +| `instances door-key create/list/revoke` | M | doors exist; one-time key display and a revoke list | |
| +| `instances import` | L | uploading a database through the browser plus the verify-token commit/abort flow | |
| + |
| +### WP8: Region moves |
| +| Gap | Size | Why | |
| +|---|---|---| |
| +| `move` / `status` / `cut` / `abort` / `resolve --retry`, offline moves | M | all move doors exist (apiinstancemove.go); needs a move panel on the instance page with progress, behind `CARLOS_MOVES_PHASE1` | |
| + |
| +### WP9: The other direction (CLI gaps for an agent) |
| +An agent driving the CLI cannot do these. None has a `/api/cli` door yet, so each is a new door plus a CLI verb. |
| + |
| +| Gap | Size | Why | |
| +|---|---|---| |
| +| Team: list members, invite, revoke invite, remove member | M | new doors over the handlers at server.go:3474/3697, ownership.go:37; transfer stays passkey-only | |
| +| App activity / audit log read | M | new door; the audit rows exist (server.go:5124) | |
| +| Protection events read | M | new door over the data the protection page reads (protectionview.go:112) | |
| +| App rename | S | one door over the rename logic (appsettings.go:896) | |
| +| Control plane set after create | S | one door over controlplane.go:265 (clear stays passkey) | |
| +| Account default error level / analytics | S | the telemetry PUT shape, at account scope | |
| +| CLI token list / revoke others | M | new door over authcli.go:1848/1910; step-up rules to decide | |
| +| Plan lapse "keep these apps" | M | new door over planlapse_keep.go:172 | |
| + |
| +Console-only by design, not proposed for the CLI: passkey actions (production flag, fast-track, pending confirm/reject, purge, store destroy, account delete, transfer, app move, control-plane clear) and Stripe billing. |
| + |
| +--- |
| + |
| +## 4. Summary |
| + |
| +**Counts.** There are 118 customer-facing CLI rows (1a and 1b). Two rows that only point to 1d are not counted. |
| + |
| +- 42 at PARITY. |
| +- 9 PARTIAL: 8 close with an S form, and 1 is M (email credentials). |
| +- 52 GAP: 36 S, 14 M, 2 L. |
| +- 15 sensibly CLI-only: local build and upload, keys, local files, terminal identity, tooling. |
| + |
| +There are also 11 box-local rows (1c), all CLI-only. The 24 operator rows (1d) split into 3 parity, 3 partial, 16 gap and 2 CLI-only. |
| + |
| +In the other direction there are 33 console actions with no CLI: |
| + |
| +- 18 are console-only by design: passkey actions, Stripe billing, browser auth, and UI-only pages. |
| +- 10 are customer GAPs for the CLI. |
| +- 5 are operator-console pages. |
| + |
| +**Biggest customer-facing gaps for a new Carloku user driving an agent.** |
| + |
| +1. **Instances.** The person cannot give an app an address, delete one, or change its channel or environment from the console. The empty Running page hands them a CLI command. |
| +2. **Visibility of what the agent set up.** Schedules, sidecars, relay and door keys do not appear in the console at all. Feature flags, email and storage appear read-only, with a CLI command where the button should be. |
| +3. **Email and storage setup.** Each is several small steps, all CLI-only. Email needs DNS records shown. |
| +4. **Running a command or reading the database.** `run` and `db query` are how a person checks their data. There is no browser path to either. |
| +5. **The reverse direction.** The agent cannot invite a teammate, read the audit trail, rename an app, or see protection events. |
| + |
| +**Suggested order.** |
| + |
| +1. **WP1 Instances** (mostly S, one M): it unblocks the first-run path. |
| +2. **WP2 settings forms and WP3's S items**: about 25 S items over existing doors, cheap and visible. `store create`, `email enable` and `features set` come first. |
| +3. **WP4 schedules and sidecars** (M), then **WP3's M items**: email domains, credentials and events, and store scan. |
| +4. **WP9 CLI team, activity and rename verbs** (S/M), so an agent can finish onboarding without a browser. |
| +5. **WP5 fleets** and **WP6 relay**. |
| +6. **WP7**: `db query` and `run` (M) first, then **WP8 moves** (M). |
| +7. **WP7's two L items** last, each after its own design: the browser terminal and browser import. |
diff --git a/docs/superpowers/specs/2026-11-09-parity-guard-design.md b/docs/superpowers/specs/2026-11-09-parity-guard-design.md| new file mode 100644 |
| index 000000000..20a9bfe0f |
| --- /dev/null |
| +++ b/docs/superpowers/specs/2026-11-09-parity-guard-design.md |
| @@ -0,0 +1,86 @@ |
| +# CLI and console parity: the stock and its guard (slice 3) |
| + |
| +Status: draft for Paul, 2026-11-09. Slice 3 of "agent-first onboarding and |
| +console parity". |
| + |
| +## Why |
| + |
| +Paul (2026-11-08/09): "everything that the CLI can do, the console can do", |
| +both directions; "We don't need to do all of this at once. Keeping the stock |
| +is the most important part." The first stock-take |
| +(`docs/superpowers/notes/2026-11-09-parity-inventory.md`, from main |
| +04dc1dc0) found 118 customer-facing CLI rows: 42 with a console |
| +equivalent, 9 partial, 52 gaps, 15 rightly CLI-only; plus 10 console actions |
| +the CLI lacks and 18 console-only by design; and box-local and operator rows |
| +listed apart. |
| + |
| +## What |
| + |
| +1. **The stock:** one checked-in table, `parity/parity.tsv` (or the |
| + builder's choice of a simple line-based format), one row per capability: |
| + CLI command (as typed, e.g. `carlos secrets set`), console action (the |
| + browser route and a few words, e.g. `POST /a/{sqid}/apps/{app}/settings/env`), |
| + status, and a note. Status is exactly one of: |
| + - `both` (each side names its counterpart), |
| + - `partial` (both exist but one does less; note says what), |
| + - `gap` (one side missing; note names the work package), |
| + - `cli-only` / `console-only` (by design; note gives the one-line reason), |
| + - `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 are derived from the real code (the CLI's command dispatch and |
| + the console's route registrations), never from a second hand-kept list. |
| + 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; |
| + the test fails if it is stale. This is where Paul and agents look. |
| +4. **Work packages as tracking:** one amadan discussion per work package |
| + from the inventory (instances; small settings forms; schedules and |
| + sidecars; email and storage; CLI verbs for team, activity and rename; |
| + fleets and relay; db query and run; later the browser terminal and |
| + instance import). Each `gap` row names its package ID; the discussion |
| + links back to its rows in `docs/parity.md`. No per-row discussions. |
| +5. **Seed:** the table starts from the inventory, every row checked against |
| + the code at build time (the inventory is a starting point, not truth). |
| + |
| +## Goals |
| + |
| +- Drift becomes a failing test, not a surprise: a new CLI command or console |
| + action cannot land without its row. |
| +- 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. |
| + |
| +## Non-goals |
| + |
| +Closing any gap (each package is its own later design); the MCP connector; |
| +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). |
| + |
| +## Anti-goals |
| + |
| +- A second hand-maintained list of commands or routes that can itself drift. |
| +- A guard so noisy people learn to rubber-stamp rows: statuses and reasons |
| + must stay few and meaningful. |
| + |
| +## Constraints |
| + |
| +AGENTS.md: amadan discussions not GitHub; touched-package tests locally, CI |
| +full; census if any root-scope code moves (unlikely: a test, a data file, a |
| +make target, docs). Add a short AGENTS.md rule: new CLI commands and console |
| +actions update `parity/parity.tsv` in the same branch. |
| + |
| +## Left to the builder |
| + |
| +The table format and location details, how commands and routes are |
| +enumerated (reflection over the dispatch table, a small exported registry, |
| +or parsing the registration calls, whichever is robust), the docs page |
| +layout, and the exact work-package IDs. |