plan: platform accounts slice 1, CLI UX pass
Task 1: render the CLI mocks at 80 columns and fix what read badly. State-first headings for customers show and list (with over/near counts), the mint expiry and grant reason on their own rows, "claimed" for "owned", shorter grant labels, and mocks for the turned-off grant and the no-catalog list and show. Copy ids are kept; seven rows added.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/superpowers/plans/2026-11-19-platform-accounts-1-platform-layer.md+114 −41
Intent
<task-notification> <task-id>ae811366cb6f58fcd</task-id> <tool-use-id>toolu_018MCUC2MPMWo8GgjU6hx3j2</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/9284fe97-c7c7-4e03-80f2-87c51eb0406d/tasks/ae811366cb6f58fcd.output</output-file> <status>completed</status> <summary>Agent "Pre-flight plan conflict scan" 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>`2ff79539` All 17 rulings are in the plan file, which is the only file I edited, and nothing was pushed. During the commit git printed a warning that `.git/packed-refs.lock` already exists, which probably means another git process on the shared repo was holding it. The commit went through anyway: HEAD and `design-platform-accounts` both point at `2ff79539` and the tree is clean. I left the lock file alone because it isn't mine; if git keeps complaining about it, someone should check whether it's stale.</result> <usage><subagent_tokens>212532</subagent_tokens><tool_uses>69</tool_uses><duration_ms>281860</duration_ms></usage> </task-notification>
Attributed to this commit: 14.4 g CO₂e (1,807,111 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on design-platform-accounts, 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/plans/2026-11-19-platform-accounts-1-platform-layer.md b/docs/superpowers/plans/2026-11-19-platform-accounts-1-platform-layer.md| index 24890747c..58c5a9af2 100644 |
| --- a/docs/superpowers/plans/2026-11-19-platform-accounts-1-platform-layer.md |
| +++ b/docs/superpowers/plans/2026-11-19-platform-accounts-1-platform-layer.md |
| @@ -135,64 +135,126 @@ Modify (refs checked at `06603e71`): |
| ### Task 1: UX pass on the CLI output |
| -No code. The output mocks below are the starting point; this task is AGENTS.md's UX pass on them, before anything is built or copy-reviewed. |
| +No code. The output mocks below are AGENTS.md's UX pass done on the plan's first mocks, before anything is built or copy-reviewed. They are what Tasks 6 and 11 build ("the Task 1 mocks"); the "UX pass" note under Step 2 lists what changed. |
| **Files:** |
| - Modify: this plan (the mocks and the copy table) |
| -- [ ] **Step 1: Render each mock below at 80 columns in a terminal (scratch file under `$TMPDIR`) and check it against AGENTS.md "Every UI change gets a UX pass": state first, label/value pairs and tables, about a dozen words to understand it, problems visible as a state.** |
| +- [x] **Step 1: Render each mock below at 80 columns in a terminal (scratch file under `$TMPDIR`) and check it against AGENTS.md "Every UI change gets a UX pass": state first, label/value pairs and tables, about a dozen words to understand it, problems visible as a state.** |
| ``` |
| $ carlos accounts platform --account bcd |
| bcd is a platform account |
| - status on |
| - customers 3 of 50 |
| - plans free, personal |
| - new accounts start on free |
| - granted by ops@example.com on 19 November 2026: agreed by email |
| + status on |
| + customers 3 of 50 |
| + customer plans free, personal |
| + default plan free |
| + granted by ops@example.com on 19 November 2026 |
| + reason agreed by email |
| + |
| +$ carlos accounts platform --account bcd --revoke --reason "contract ended" |
| +turned off platform access for bcd. credentials that stopped working: 2 |
| + |
| +$ carlos accounts platform --account bcd |
| +bcd is a platform account |
| + status off |
| + customers 3 of 50 |
| + customer plans free, personal |
| + default plan free |
| + turned off by ops@example.com on 20 November 2026 |
| + reason contract ended |
| $ carlos platform customers list --platform bcd |
| -3 customer accounts, 50 allowed |
| -ACCOUNT NAME REF PLAN OWNED USAGE |
| -bdf shop 4812 free no ok |
| -bdg bakery 4813 personal no near object storage |
| -bdh florist - free no over apps and instances |
| +3 of 50 customer accounts, 1 over a limit, 1 near a limit |
| +ACCOUNT NAME REF PLAN CLAIMED USAGE |
| +bdf shop 4812 free no ok |
| +bdg bakery 4813 personal no near: object storage |
| +bdh florist - free no over: apps and instances |
| $ carlos platform customers show --platform bcd --customer bdg |
| -bakery (bdg) |
| - ref 4813 |
| - plan personal |
| - owned no |
| - created 19 November 2026 |
| +bakery (bdg) is near a limit |
| + plan personal |
| + ref 4813 |
| + claimed no |
| + created 19 November 2026 |
| usage |
| - object storage 8.2 GB of 10 GB near the limit |
| - apps and instances 2 of 10 |
| + object storage 8.2 GB of 10 GB near the limit |
| + apps and instances 2 of 10 |
| + |
| +$ carlos platform customers show --platform bcd --customer bdh |
| +florist (bdh) is over a limit |
| + plan free |
| + claimed no |
| + created 19 November 2026 |
| +usage |
| + apps and instances 3 of 2 over, grace until 30 September 2026 |
| + object storage 120 MB of 1 GB |
| + |
| +$ carlos platform customers show --platform bcd --customer bdf |
| +shop (bdf) is within its limits |
| + plan free |
| + ref 4812 |
| + claimed no |
| + created 19 November 2026 |
| +usage |
| + apps and instances 1 of 2 |
| + object storage 40 MB of 1 GB |
| $ carlos platform customers create --platform bcd --name shop --ref 4812 |
| created shop (bdf) on the free plan |
| $ carlos platform credentials mint --platform bcd --customer bdf |
| -minted a publish credential for shop (bdf), valid until 19 November 2026 15:04 UTC |
| -token <the secret, shown once> |
| +minted a publish credential for shop (bdf) |
| + valid until 19 November 2026 15:04 UTC |
| + token <the secret> |
| use it as CARLOS_SERVICE_TOKEN with --account bdf |
| ``` |
| -On a console with no plan catalog (decision D8; pre-flight C17), a grant has no plans and a customer gets no plan row, so these outputs omit the plan lines. They are part of this UX pass: |
| +Rules the mocks carry: in each block or table, every column but the last is padded to its longest value plus two spaces (a `tabwriter` with padding 2), so a usage section aligns on its own. The status block shows "granted by" and its reason while the grant is on, and "turned off by" and the revoke's reason (not the grant's) once it is off. A customer with no ref has no `ref` line in `show` and `-` in the list. The list heading appends `ListOver` then `ListNear`, each only when its count is non-zero. `show`'s heading is `ShowOver` if any usage row is over, else `ShowNear` if any is near, else `ShowOK`; a customer with no plan gets the bare `ShowHeading`. The list's USAGE word uses the same worst-cap rule. |
| + |
| +On a console with no plan catalog (decision D8; pre-flight C17), a grant has no plans and a customer gets no plan row, so these outputs omit the plan lines: no `customer plans` or `default plan` line; no PLAN or USAGE column in the list (none of its customers has a plan); no `plan` line, no usage section and the bare `ShowHeading` in `show`; no plan words in create: |
| ``` |
| $ carlos accounts platform --account bcd |
| bcd is a platform account |
| - status on |
| - customers 3 of 50 |
| - granted by ops@example.com on 19 November 2026: agreed by email |
| + status on |
| + customers 3 of 50 |
| + granted by ops@example.com on 19 November 2026 |
| + reason agreed by email |
| $ carlos platform customers create --platform bcd --name shop --ref 4812 |
| created shop (bdf) |
| + |
| +$ carlos platform customers list --platform bcd |
| +3 of 50 customer accounts |
| +ACCOUNT NAME REF CLAIMED |
| +bdf shop 4812 no |
| +bdg bakery 4813 no |
| +bdh florist - no |
| + |
| +$ carlos platform customers show --platform bcd --customer bdf |
| +shop (bdf) |
| + ref 4812 |
| + claimed no |
| + created 19 November 2026 |
| ``` |
| -- [ ] **Step 2: Fix what reads badly in the mocks and the copy table rows they use; record each change in a short "UX pass" note under this task.** Expected: every mock leads with its state line; no line needs a second read. |
| +- [x] **Step 2: Fix what reads badly in the mocks and the copy table rows they use; record each change in a short "UX pass" note under this task.** Expected: every mock leads with its state line; no line needs a second read. |
| -- [ ] **Step 3: Commit** |
| +**UX pass (2026-11-19).** Rendered at 80 columns from a scratch file; the longest output line in the mocks is 73 columns, and 76 in the worst case (`awake hours a month`, `10.4 GB of 10 GB`, a grace end in September). Long account names and reasons can still wrap; they are the person's own text. Every existing id is kept; each new id is named where it is added. |
| + |
| +1. Mint: the first line was 82 columns and wrapped. The expiry moves to its own `valid until` row (`Minted` loses `, valid until %s`; new `LabelValidUntil`), and `token` joins the same label block. |
| +2. Grant: `ValueByOn` packed who, when and why into one value (77 columns before any long reason). The reason gets its own row (`ValueByOn` is now `%s on %s`; new `LabelReason`), so a long reason wraps alone. |
| +3. Grant: `plans` could read as the platform's own plan; it is now `customer plans`. `new accounts start on` is now `default plan`, the word the operator typed in `--default-plan`. The label column shrinks from 23 to 16. |
| +4. Grant: the turned-off state had no mock. It is mocked now (status `off`, who and why), with the revoke reply. `Revoked` read "1 credentials" for one; it now ends `credentials that stopped working: %d`. |
| +5. List: the heading said the count and the cap as two facts (`3 customer accounts, 50 allowed`); it is now `3 of 50`, as in the grant block, and states problems first: new `ListOver`, `ListNear` append "1 over a limit, 1 near a limit", so a list of hundreds shows its problems in the first line. |
| +6. List: `near object storage` read as a place. `UsageNear` and `UsageOver` are now `near: %s` and `over: %s`, state word first. |
| +7. List and show: `owned no` read as "nobody is responsible". The spec's word is "claimed", and slice 2 adds claim links, so `ColOwned` and `LabelOwned` now say `CLAIMED` and `claimed` (ids kept). |
| +8. Show: the heading was only the name. It now leads with the state: new `ShowOK`, `ShowNear`, `ShowOver` ("bakery (bdg) is near a limit"); `ShowHeading` stays for a customer with no plan. `plan` moves above `ref`, as usage depends on it. |
| +9. Show: `over the limit, grace until 30 September 2026` made the row 87 columns. `UsageOverLimit` is now `over, grace until %s` ("grace" is the approved word, `banner.warn`). |
| +10. No catalog: `CreatedNoPlan` and `audit.grant_no_plans` carried planning notes inside their text; the notes move out of the copy. The list and show without a catalog are mocked too, with no plan or usage lines. |
| + |
| +- [x] **Step 3: Commit** |
| ```bash |
| git add docs/superpowers/plans/2026-11-19-platform-accounts-1-platform-layer.md |
| @@ -1206,7 +1268,7 @@ Every row is pending copy review (Task 15). `%s`/`%d` are filled as named. CLI e |
| | id | text | |
| |---|---| |
| | audit.grant | made this a platform account: up to %d customer accounts, plans %s, new ones on %s. reason: %s | |
| -| audit.grant_no_plans | made this a platform account: up to %d customer accounts. reason: %s (a grant with no plans, on a console with no plan catalog; pre-flight C17, Task 1 UX pass) | |
| +| audit.grant_no_plans | made this a platform account: up to %d customer accounts. reason: %s | |
| | audit.revoke | turned off platform access, %d credentials stopped working. reason: %s | |
| | audit.customer_create | created customer account %s (%s) | |
| | audit.customer_created_by | created by platform account %s | |
| @@ -1214,6 +1276,8 @@ Every row is pending copy review (Task 15). `%s`/`%d` are filled as named. CLI e |
| | audit.customer_plan | moved customer account %s to the %s plan | |
| | audit.credential | minted a %s credential for %s, valid until %s | |
| +`audit.grant_no_plans` is the grant's audit line on a console with no plan catalog, where a grant has no plans (pre-flight C17). |
| + |
| **CLI** (`platform_copy.go`, constants `cliPlatformCopy*`) |
| | id | text | |
| @@ -1248,38 +1312,47 @@ Every row is pending copy review (Task 15). `%s`/`%d` are filled as named. CLI e |
| | ValueOff | off | |
| | LabelCustomers | customers | |
| | ValueCustomers | %d of %d | |
| -| LabelPlans | plans | |
| -| LabelDefault | new accounts start on | |
| +| LabelPlans | customer plans | |
| +| LabelDefault | default plan | |
| | LabelGrantedBy | granted by | |
| | LabelTurnedOffBy | turned off by | |
| -| ValueByOn | %s on %s: %s | |
| +| ValueByOn | %s on %s | |
| +| LabelReason | reason | |
| | Granted | %s is now a platform account | |
| -| Revoked | turned off platform access for %s. %d credentials stopped working | |
| -| ListHeading | %d customer accounts, %d allowed | |
| +| Revoked | turned off platform access for %s. credentials that stopped working: %d | |
| +| ListHeading | %d of %d customer accounts | |
| +| ListOver | , %d over a limit | |
| +| ListNear | , %d near a limit | |
| | ListEmpty | no customer accounts yet. create one with carlos platform customers create | |
| -| ColAccount / ColName / ColRef / ColPlan / ColOwned / ColUsage | ACCOUNT / NAME / REF / PLAN / OWNED / USAGE | |
| +| ColAccount / ColName / ColRef / ColPlan / ColOwned / ColUsage | ACCOUNT / NAME / REF / PLAN / CLAIMED / USAGE | |
| | Yes / No | yes / no | |
| | UsageOK | ok | |
| -| UsageNear | near %s | |
| -| UsageOver | over %s | |
| +| UsageNear | near: %s | |
| +| UsageOver | over: %s | |
| | ShowHeading | %s (%s) | |
| -| LabelRef / LabelPlan / LabelOwned / LabelCreated | ref / plan / owned / created | |
| +| ShowOK | %s (%s) is within its limits | |
| +| ShowNear | %s (%s) is near a limit | |
| +| ShowOver | %s (%s) is over a limit | |
| +| LabelRef / LabelPlan / LabelOwned / LabelCreated | ref / plan / claimed / created | |
| | UsageHeading | usage | |
| | UsageRow | %s of %s | |
| | UsageNearLimit | near the limit | |
| -| UsageOverLimit | over the limit, grace until %s | |
| +| UsageOverLimit | over, grace until %s | |
| | CapPDF | PDFs a month | |
| | Created | created %s (%s) on the %s plan | |
| -| CreatedNoPlan | created %s (%s) (on a console with no plan catalog; pre-flight C17, Task 1 UX pass) | |
| +| CreatedNoPlan | created %s (%s) | |
| | Exists | %s (%s) already exists for reference %s | |
| | Renamed | %s (%s) is now called %s | |
| | Replanned | %s (%s) is now on the %s plan | |
| -| Minted | minted a %s credential for %s (%s), valid until %s | |
| +| Minted | minted a %s credential for %s (%s) | |
| +| LabelValidUntil | valid until | |
| | MintedToken | token | |
| | MintedUse | use it as CARLOS_SERVICE_TOKEN with --account %s | |
| | accounts plan: cliPlanCopySourcePlatform | set by its platform account: %s (lives in `accounts_plan_copy.go` with the other `cliPlanCopy*` constants; pre-flight C6) | |
| -A grant with no plans (no plan catalog) prints no `LabelPlans` or `LabelDefault` line in `carlos accounts platform`; see the Task 1 no-catalog mocks (pre-flight C17). |
| +A grant with no plans (no plan catalog) prints no `LabelPlans` or `LabelDefault` line in `carlos accounts platform`; a customer with no plan gets `CreatedNoPlan`, no PLAN or USAGE column, and the bare `ShowHeading` with no `plan` line or usage section. See the Task 1 no-catalog mocks (pre-flight C17). |
| + |
| +Task 1's UX pass (2026-11-19) changed the text of `ValueByOn`, `LabelPlans`, `LabelDefault`, `Revoked`, `ListHeading`, `ColOwned`, `LabelOwned`, `UsageNear`, `UsageOver`, `UsageOverLimit`, `Minted`, `CreatedNoPlan` and `audit.grant_no_plans`, and added these rows: `LabelReason`, `ListOver`, `ListNear`, `ShowOK`, `ShowNear`, `ShowOver`, `LabelValidUntil`. The ids `ColOwned` and `LabelOwned` are kept although the words are now “claimed”. `ShowHeading` is used only for a customer with no plan. `ListOver` and `ListNear` are appended to `ListHeading` in that order, each only when its count is non-zero. |
| Cap names in usage reuse the approved `cliPlanCopyLimit*` labels (apps and instances, object storage, emails a day, bandwidth a month, awake hours a month); `CapPDF` is the one new label. |