| 1 | # Add Base to the existing Oficina team |
| 2 | |
| 3 | Status: **approved by Paul, 2026-11-23** (relayed by the coordinating |
| 4 | agent; oficina/alta discussion 5). Implementer: Claude Opus 5.5, |
| 5 | 2026-11-23. Authority: Paul's 2026-11-23 decision that Base production is |
| 6 | `https://base.oficina.works`, so Base's native app finds it in team |
| 7 | `oficina`'s directory. Home's matching change is `base-in-directory` |
| 8 | (`9dd7fc0`, review #157). Nothing here was run against production. |
| 9 | |
| 10 | Base joins canonical adoption exactly as Equipo did |
| 11 | ([the Equipo rollout](equipo-adoption.md)), with one difference: its |
| 12 | delivery check. That difference is the rule below, which Paul approved on |
| 13 | 2026-11-23. |
| 14 | |
| 15 | ## The rule: Base's operations door is held, not moved |
| 16 | |
| 17 | **What the delivery check proves for the other seven apps.** `configure` |
| 18 | writes `<P>_AGENT_ISSUER` and `<P>_AGENT_TEAM`, restarts the canonical host, |
| 19 | and records a check only if the app now serves the same reviewed release, |
| 20 | healthy, with its identity and configuration exactly the after snapshot's, |
| 21 | **and** `GET /api/v1/operations` has moved from its baseline (a 404, or the |
| 22 | app's own 401) to agent-access's challenge. agent-access mounts only when |
| 23 | the app reads both keys, so that move is the evidence, in place of 522 |
| 24 | Plan 2, that the running process holds the new keys. When Home then makes |
| 25 | the directory row live, oficina-connect's delegated calls for the team |
| 26 | reach an app that verifies them against connect. |
| 27 | |
| 28 | **Why Base cannot pass it.** Base's `/api/v1/operations` already answers |
| 29 | agent-access's exact challenge (`WWW-Authenticate: Bearer`, `no-store`, |
| 30 | `error.code = unauthenticated`): it is Base's own door for Equipo's |
| 31 | Assistant, authenticated by a Base host token (carlos/base |
| 32 | `internal/operations`, mounted outside the site middleware by |
| 33 | `withOperations`). agent-access writes the same bare `Bearer`, so no |
| 34 | unauthenticated probe can tell them apart. And Base reads neither |
| 35 | `BASE_AGENT_ISSUER` nor `BASE_AGENT_TEAM`, so nothing could move anyway. |
| 36 | Preflight would refuse Base with `operations-agent-401`. |
| 37 | |
| 38 | **The rule.** Base's baseline is agent-access's challenge, and the check |
| 39 | requires the same challenge after the restart. Everything else in the |
| 40 | check is unchanged. In code: `BaselineOps(base) = agent-401` |
| 41 | (`adopt/delivery.go`); `Delivered` then admits only agent-401 to agent-401 |
| 42 | for Base, and refuses a 404, an app 401, any other answer, and a 200 |
| 43 | without a token. On a resume, preflight's exemption for a door that has |
| 44 | already moved (both agent keys the journal's own) does not apply to Base: |
| 45 | its door must still give the challenge. |
| 46 | |
| 47 | **What it keeps for Base.** The reviewed release, unchanged across the |
| 48 | restart, with no redirect and `/healthz` 200; the instance, environment, |
| 49 | storage and domain route unchanged; every other config key preserved and |
| 50 | the config exactly the after snapshot's, with both agent keys stored as |
| 51 | sent; Home identity (`BASE_HOME_ISSUER = https://id.oficina.works`, |
| 52 | `BASE_HOME_CONSUMER_ID = base`); the door still closed to callers without a |
| 53 | token. Preflight also refuses Base unless its door answers the challenge, |
| 54 | so a host not serving Base's release is caught before anything is written. |
| 55 | The check stays void on any later change, as for every app. |
| 56 | |
| 57 | **What it gives up for Base.** |
| 58 | |
| 59 | 1. **No evidence that the process has the keys.** For Base this is moot: |
| 60 | Base never reads them. They are written, but they do nothing. |
| 61 | 2. **No evidence that the restart happened.** The old process answers the |
| 62 | same as the new one, so the first probe after the restart can pass. |
| 63 | The same holds for `rollback-config`: `Reverted` waits for the door's |
| 64 | baseline shape, which Base's door never left, so a rollback also |
| 65 | completes on its first probe. Both matter only for item 1, which is |
| 66 | moot. |
| 67 | 3. **No delegated access through connect.** Once Base's row is live, |
| 68 | oficina-connect may route team `oficina`'s delegated calls to |
| 69 | `https://base.oficina.works/api/v1`. Base refuses them with its 401, |
| 70 | because it accepts only its own host tokens. It fails closed: nothing is |
| 71 | exposed, and Equipo's Assistant keeps reaching Base on host tokens as |
| 72 | today. What adoption buys Base is the directory listing that its native |
| 73 | app needs. It does not give Base connect-routed assistants. |
| 74 | |
| 75 | If Base later reads the two keys (agent-access's remote verifier on its |
| 76 | door), the keys already stored would take effect at that release. That |
| 77 | release needs its own review and its own evidence. This check cannot |
| 78 | supply that evidence, because the challenge looks the same. |
| 79 | |
| 80 | **Alternatives rejected.** |
| 81 | |
| 82 | - *A per-app probe path* (a new Base door that answers only once the keys |
| 83 | are set). Base would have to build a door nobody calls, only so that Alta |
| 84 | has something to watch. The Equipo contract rules that out ("a fake |
| 85 | public list added only to satisfy Alta is not an integration"). It also |
| 86 | needs a Base change. |
| 87 | - *Base reads the keys and gates something on them.* The only meaningful |
| 88 | gate is accepting connect's delegated bearer on its door: the real |
| 89 | integration, mapping a Home person to a Base member. That restores item 3 |
| 90 | in substance. But agent-access's challenge is the same bare `Bearer`, so |
| 91 | the probe still sees no move. The evidence would need a new, configured- |
| 92 | only signal in Base's or agent-access's challenge. That is a Base design |
| 93 | change, and the right one only if Paul wants connect-routed assistants |
| 94 | in Base. |
| 95 | - *Skip `configure` for Base* (write no inert keys). Honest, but the |
| 96 | activation gate, the observer and Home's signed `environment_binding` all |
| 97 | require a write, an after snapshot and a recorded check. That is a larger |
| 98 | change to a reviewed design. |
| 99 | - *Make Base's own door answer an app 401 before adoption.* That breaks |
| 100 | Equipo's Assistant, which reads Base's operations today. |
| 101 | |
| 102 | **Home's design must say the same.** `implementation/existing-team-adoption.md`, |
| 103 | "Delivery evidence", lists each app's move. It needs one more sentence for |
| 104 | Base, the held door, as Paul rules it. This branch changes Alta only. |
| 105 | |
| 106 | ## Rollout differences from Equipo's |
| 107 | |
| 108 | Follow [the Equipo rollout](equipo-adoption.md) with `base` for `equipo` |
| 109 | and `BASE_` for `EQUIPO_`, and Base's own runbook (carlos/base |
| 110 | `.superpowers/sdd/2026-11-23-base-native/base-oficina-works-runbook.md`, |
| 111 | steps 1-9) for the order. In particular: |
| 112 | |
| 113 | - Home `base-in-directory` is merged and deployed to **both** `oficina` and |
| 114 | `oficina-id`. Alta's `homecompat` is re-pinned to Home's **merge commit** |
| 115 | (it pins `9dd7fc0` on this branch), and `make ci` passes, before this |
| 116 | branch merges. |
| 117 | - Base serves `https://base.oficina.works`: domain attached, and |
| 118 | `BASE_ORIGIN` and `HOME_CONSUMERS_BASE64`'s `base` entry moved together |
| 119 | (the runbook's steps 2 and 4). `register-consumer` only verifies that entry. |
| 120 | - Every Base env change (the runbook's steps 4 and 5) is made **before** |
| 121 | `configure`, which captures the immutable baseline. |
| 122 | - Expected preflight: `base: ready`, with Base's door answering its |
| 123 | agent-shaped 401. `operations-absent` or `operations-app-401` means the |
| 124 | host is not serving Base's release. |
| 125 | - `configure --app base --apply` writes `BASE_AGENT_ISSUER` and |
| 126 | `BASE_AGENT_TEAM`, restarts only the canonical Base host, and records the |
| 127 | held-door check. Base ignores both keys. |
| 128 | - A plan naming all eight canonical apps exactly fills Home's eight-app plan |
| 129 | cap. A continuation plan names only the missing apps (`base`). |
| 130 | |