Plan: slices 1, 2 and 3b (slice 3 proposed dropped: Phase A needs no Equipo code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+232
−0
docs/superpowers/plans/2026-11-30-team-bundle-slices-1-3b.md+232 −0
CI passed — run details
CI log
=== vet === go vet ./... === fmt === === test === CGO_ENABLED=0 go test ./... ok amadan.net/oficina/alta/adopt (cached) ok amadan.net/oficina/alta/carlosop (cached) ? amadan.net/oficina/alta/carlosop/fakecarlos [no test files] ok amadan.net/oficina/alta/cmd/alta (cached) ok amadan.net/oficina/alta/cmd/alta-adopt (cached) ok amadan.net/oficina/alta/console (cached) ? amadan.net/oficina/alta/console/fakeconsole [no test files] ok amadan.net/oficina/alta/homeop (cached) ok amadan.net/oficina/alta/homeop/fakehome (cached) ok amadan.net/oficina/alta/internal/web (cached) ok amadan.net/oficina/alta/provision (cached) === compat === cd homecompat && go vet ./... && CGO_ENABLED=0 go test ./... ok amadan.net/oficina/home/altacompat (cached)
diff --git a/docs/superpowers/plans/2026-11-30-team-bundle-slices-1-3b.md b/docs/superpowers/plans/2026-11-30-team-bundle-slices-1-3b.md| new file mode 100644 |
| index 0000000..9e7e296 |
| --- /dev/null |
| +++ b/docs/superpowers/plans/2026-11-30-team-bundle-slices-1-3b.md |
| @@ -0,0 +1,232 @@ |
| +# Team bundle: plan for slices 1, 2, 3 and 3b |
| + |
| +**Spec:** `docs/superpowers/specs/2026-11-29-team-bundle-design.md`, |
| +revision 3. Fable approved it and Paul ruled every question as recommended |
| +(2026-11-30). |
| + |
| +**Goal:** Alta can create a fresh Equipo and a fresh Base for one of |
| +Paul's own-profile teams. Both reach `live` in the directory, and an |
| +owner's own runner can run agents on the team's Equipo. |
| + |
| +**Status:** draft, not reviewed. Nothing is built. |
| + |
| +Facts below were read on 2026-11-30 from these commits: |
| + |
| +| Repo | Commit | |
| +|---|---| |
| +| Alta | `43bf19d` | |
| +| Equipo | `cfe54cfc` | |
| +| Base | origin/main | |
| +| Home | `88f610a` | |
| + |
| +The live key names were read with `carlos env list`, names and |
| +non-secret values only. |
| + |
| +## Finding that changes slice 3 |
| + |
| +A TensorX connection already belongs to **one person and one runner**. |
| +The Connections page offers TensorX with a key, a confirmation and a |
| +pre-filled budget (`internal/equipo/connections_metered.go:32-55`), and |
| +any owner can add one today. A "house connection" added by Paul is |
| +**Paul's** connection, sealed to **Paul's** runner. It does not reach |
| +another owner's runner. |
| + |
| +So Phase A needs no Equipo code. Paul gives the team key to the adults |
| +he names, and each adds it as an ordinary TensorX connection. The |
| +spec's remaining slice 3 items would only: |
| +- label the row `house` in Usage; |
| +- add an off switch, which deleting the connection already provides; |
| +- prefer a healthy subscription, which connectors §7 rule 1 already |
| + does for kept sessions. |
| + |
| +**Proposal:** drop slice 3 from this build. It returns with the hosted |
| +runner, where an operator really can install one connection for a |
| +team. **Paul needs to OK this:** it reduces what was approved. |
| +`EQUIPO_HOUSE_CONNECTIONS` goes with it. |
| + |
| +## Repos and tasks |
| + |
| +Each repo works on its own branch in its own worktree, built and tested |
| +with that repo's `make` targets, filtered to the package touched. Each |
| +branch gets hub CI, then a Fable whole-branch review, then a merge |
| +through `amadan`. Nothing is deployed by this plan. |
| + |
| +### Equipo: branch `team-probe` |
| + |
| +**E1. `GET /api/team`, a seeded readiness probe.** |
| +- Answers `{"team_mode": false, "seeded": true, "consumer": "<EQUIPO_HOME_CONSUMER_ID>", "roster": "ok" | "owner-pending"}`. |
| +- `roster` is `ok` when the instance's team exists and has at least one |
| + active owner, and `owner-pending` otherwise. |
| +- No authentication, and no names or addresses. It matches Docs' |
| + probe in shape (the fields Alta reads, `provision/steps.go:731-735`). |
| +- With no `EQUIPO_HOME_CONSUMER_ID` set, it answers 404, so an instance |
| + without Home is never "ready". |
| +- Tests: |
| + - shape, and that the consumer is echoed exactly; |
| + - `owner-pending` before Bootstrap and `ok` after; |
| + - 404 without Home; |
| + - no address in the body (the repo's guard pattern). |
| + |
| +**E2. The marker-loss answer (spec slice 3b).** |
| +- Read `internal/equipo/execution_startup.go` for what happens when the |
| + database says execution ran but the marker is gone. |
| +- Write the behaviour and the operator's recovery into Equipo's README |
| + "Deploying" section. |
| +- No code, unless the read shows a silent failure. If it does, stop and |
| + report before changing anything. |
| + |
| +### Base: branch `team-probe` |
| + |
| +**B1. `GET /api/team`, the same seeded probe.** |
| +- `consumer` is `BASE_HOME_CONSUMER_ID`. |
| +- `roster` is `ok` once the owner from `BASE_OWNER` is seeded as a |
| + person, and `owner-pending` before. |
| +- 404 without Home. |
| +- The same tests as E1. |
| + |
| +### Alta: branch `team-bundle` |
| + |
| +**A1. Registry.** |
| +- Equipo and Base lose `AdoptionOnly` and gain `Seeded: true`. A new |
| + field, `OwnOnly: true`, offers them only under profile `own`. |
| +- Step 0 refuses `app-own-only` for an `outside` run that names them. |
| +- Step 0 refuses `label-too-long-for-base` when Base is in the run and |
| + the label is longer than 19 characters (Base `maxSlug`). |
| +- `ProvisioningApps` and the run form follow the registry. |
| +- Adoption keeps working. Check `adopt/` for every use of |
| + `AdoptionOnly` and keep its meaning under a new name if one is needed. |
| + |
| +**A2. Recipes** (`provision/apps.go`, `Recipe`). |
| + |
| +Equipo: |
| + |
| +| Key | Class | Value | |
| +|---|---|---| |
| +| `EQUIPO_ORIGIN` | Set | from the common header | |
| +| `EQUIPO_INSTANCE_KEY` | Generated | from the common header | |
| +| `EQUIPO_HOME_ISSUER` | Set | from the common header | |
| +| `EQUIPO_HOME_CONSUMER_ID` | Set | from the common header | |
| +| `EQUIPO_HOME_KEYS_BASE64` | Set | from the common header | |
| +| `EQUIPO_HOME_DEK_BASE64` | Generated | from the common header | |
| +| `HOME_DIRECTORY_ORIGIN` | Set | from the common header | |
| +| `EQUIPO_OWNERS` | `ownerKey` | owner's address; `OwnerAddress`, so the wait rule applies through `NeedsOwner` | |
| +| `EQUIPO_ASSISTANT_HOSTS` | Set | `PublicOrigin(label, "base")` when Base is in the run, otherwise `""` | |
| +| `EQUIPO_AGENT_ISSUER` | Set | `https://connect.oficina.works`, as adoption writes it | |
| +| `EQUIPO_AGENT_TEAM` | Set | the team SQID | |
| + |
| +Base: |
| + |
| +| Key | Class | Value | |
| +|---|---|---| |
| +| `BASE_ORIGIN` | Set | from the common header | |
| +| `BASE_INSTANCE_KEY` | Generated | from the common header | |
| +| `BASE_HOME_ISSUER` | Set | from the common header | |
| +| `BASE_HOME_CONSUMER_ID` | Set | from the common header | |
| +| `BASE_HOME_KEYS_BASE64` | Set | from the common header | |
| +| `BASE_HOME_DEK_BASE64` | Generated | from the common header | |
| +| `HOME_DIRECTORY_ORIGIN` | Set | from the common header | |
| +| `BASE_OWNER` | `ownerKey` | owner's address | |
| +| `BASE_NAME` | Set | the team's display name if the run has one; the label otherwise | |
| +| `BASE_SLUG` | Set | label | |
| +| `BASE_OFICINA_APPS` | Set | `<app>=<PublicOrigin>` for each app in the run, comma-joined, in Home's order. The format is read from Base `config.parseOficinaApps` | |
| +| `BASE_EQUIPO_ORIGIN` | Set | `PublicOrigin(label, "equipo")` when Equipo is in the run, otherwise `""` | |
| +| `BASE_AGENT_ISSUER`, `BASE_AGENT_TEAM` | Set | as for Equipo | |
| + |
| +Base gets no `BASE_PLATFORM_*`, `BASE_APPS_DOMAIN` or |
| +`BASE_ASSERTION_KEY`: no Store. |
| + |
| +- `profileWrites` and the exact-keys audit follow from `Recipe`, so no |
| + separate edit is needed. Tests pin both recipes key by key, as for |
| + the six. |
| +- **Check first:** |
| + - that Equipo and Base read `HOME_DIRECTORY_ORIGIN` or tolerate it; |
| + - that `<P>_AGENT_*` on a fresh instance needs nothing at connect |
| + beyond what adoption did. |
| + |
| + If connect needs a per-team registration, leave both keys out and |
| + report it. |
| + |
| +**A3. Steps** (`provision/steps.go`). |
| +- `AppSteps` (`:43`) includes verify and activate for `Roster || Seeded`. |
| +- `inputs` (`:422`) loads the record only for `Roster`. Seeded recipes |
| + carry no `_TEAM_*` keys. |
| +- `stepVerify` (`:786` onward): |
| + - for a `Seeded` app, it accepts `probe.Seeded && probe.Consumer == ConsumerID(...) && probe.Roster == "ok"`; |
| + - `owner-pending` parks as `roster-owner-pending`; |
| + - a wrong consumer parks as `not-team-mode`, as now; |
| + - a `Roster` app answering `seeded`, or the reverse, parks as |
| + `probe-mode-mismatch`. |
| +- `stepAudit` (`:996`) records `live` for a seeded app that activated. |
| +- Tests use the fake Home and console: |
| + - a seeded app reaches live; |
| + - a wrong consumer parks; |
| + - `owner-pending` parks, then resumes; |
| + - a mode mismatch parks; |
| + - an `outside` run naming Equipo is refused at step 0. |
| + |
| +**A4. Execution pair (slice 3b).** |
| +- `OperatorKeys(app App, p Profile)` becomes |
| + `OperatorKeys(app App, in Inputs, account string)`. For Equipo under |
| + `own` it returns: |
| + - `EQUIPO_EXECUTION_ENABLED=1`; |
| + - `EQUIPO_EXECUTION_MARKER_PATH=/data/instances/<RouteHost(label,"equipo",account)>/execution/witness`. |
| +- Both call sites change: `provision/steps.go:450` and `:920`. |
| +- `operatorState` compares exact values, so a marker naming another |
| + instance is `OperatorInvalid`. |
| +- `console/client.go:80` `operatorOnly` gains both Equipo keys. |
| +- Tests: |
| + - the pair is admitted only whole; |
| + - the wrong host is invalid; |
| + - the console guard refuses Alta writing either key; |
| + - Memoria's pair is unchanged. |
| + |
| +**A5. homecompat.** One test runs a seeded Equipo through verify and |
| +activate against Home's real operator code at the pinned commit. It |
| +proves Home's activation needs no roster evidence (spec §1.2). |
| + |
| +**A6. README and AGENTS.** Document the two recipes, the `OwnOnly` and |
| +`Seeded` flags, the post-run pair, and the closing steps from spec §5.1 |
| +rule 4. |
| + |
| +### Home: branch `team-page-seeded` |
| + |
| +**H1. Team page copy.** |
| +- Below the member list, when the team has a live Equipo or Base, one |
| + line says removing someone here doesn't remove them from Equipo or |
| + Base, and they must be removed there too. |
| +- On every team page, one sentence says the team's operator can read |
| + its data. |
| +- The strings go through copy review (the `copy-review` skill, never a |
| + static page). Code waits for Paul's approved wording. |
| +- Tests: the line appears only with a seeded app present; the sentence |
| + is always present; no address renders. |
| + |
| +## Order |
| + |
| +1. E1 and B1, small and independent. |
| +2. A1–A6, against E1 and B1's probe shape. |
| +3. H1 copy review runs in parallel. H1 code follows the approval. |
| +4. E2 is a read. |
| + |
| +One heavy job at a time on this machine: builds and tests run in |
| +sequence, filtered to the package touched. |
| + |
| +## Gates (from the spec) |
| + |
| +The canary steps need the six-app rollout (mail on, Alta deployed). |
| +Until then the gates are the fake-Home, fake-console and homecompat |
| +tests. |
| + |
| +- **Slice 1:** |
| + - a throwaway-label canary reaches `live` for Equipo through the probe; |
| + - a wrong consumer id parks; |
| + - an `outside` run is refused; |
| + - the owner's sealed inputs are gone after the run; |
| + - the audit shows no extra key; |
| + - the owner signs in through Oficina ID. |
| +- **Slice 2:** the canary Base signs in, and lists only its team's hosts. |
| +- **Slice 3b:** |
| + - the pair set by hand, and a chat turn on an owner-enrolled runner; |
| + - a new Equipo build deploys under swap hold; |
| + - without the hold, the deploy fails safe on the startup lock; |
| + - the audit refuses half a pair and a foreign marker path. |