oficina / equipo Public

spec: places rev 2, Astra round 1 fixes

App-bound publish credential (deploy cannot promote edge on pipelined
apps); first publish with the owner's login; secret scan on publish
exports; approval bound through dispatch and the final check; owner
login for revocation; console discovery; platform requests renumbered.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by paul@keymail.dev 2bed1adacca502aa1a8a93f519b92ab1c4d5b122 parent 56b80b3
1 file changed, +114 −74
  • docs/superpowers/specs/2026-11-26-places-config.md +114 −74
diff --git a/docs/superpowers/specs/2026-11-26-places-config.md b/docs/superpowers/specs/2026-11-26-places-config.md
index d56df979..0a32265f 100644
--- a/docs/superpowers/specs/2026-11-26-places-config.md
+++ b/docs/superpowers/specs/2026-11-26-places-config.md
@@ -1,6 +1,6 @@
# Places: where a team's code and sites go
-Status: 2026-11-26, revision 1, draft for Paul. Drafted by Claude (Opus 5.5)
+Status: 2026-11-26, revision 2, draft for Paul. Drafted by Claude (Opus 5.5)
on `design-places` from main c74fd0ac. Nothing is built.
Paul, 2026-11-26: "Equipo is having trouble publishing the site. Is it not
@@ -36,7 +36,7 @@ Facts from main c74fd0ac and a read-only copy of production
which lists apps installed on Base's own account, found none, and told
Paul the site "never appeared there". Base is not where Equipo puts sites.
- **Previews are broken on every host.** Since the injection defences
- (2026-11-19) every export carries a `_headers` file with
+ (2026-11-19) every preview export carries a `_headers` file with
Content-Security-Policy, X-Content-Type-Options, Referrer-Policy and
X-DNS-Prefetch-Control. The carlos static-header parser accepts only
Cache-Control, Access-Control-Allow-Origin, Access-Control-Expose-Headers,
@@ -101,21 +101,33 @@ The instance holds only metadata: credential name, role, app, rungs,
console, account, the runner that holds it, a fingerprint (a hash, to tell
rotations apart), minted and last used.
-- *Site.* One CARLOS `deploy` credential per site app, minted with
- `--app <app> --rungs edge`. It can ship and promote that app's `edge`
- channel and nothing else: it cannot create apps, touch domains, retention
- or `stable`. A deploy credential cannot create its own app, so when the
- owner confirms a site place the runner runs two fixed commands with the
- owner's signed-in carlos on that machine: `carlos apps create` (only when
- the app does not exist) and `carlos services create --role deploy --app
- <app> --rungs edge --json <name>`. The runner process reads the secret
- from that command's output and stores it 0600 in its state directory,
- outside every directory a sandbox mounts. Each later deploy runs one fixed
- `carlos deploy` with the secret in `CARLOS_SERVICE_TOKEN` and the console
- in `CARLOS_CONSOLE`, never in argv, a record, a log or a model's context,
+- *Site.* One CARLOS service credential per site app, bound with `--app
+ <app>`, so it reaches that app only and cannot create apps. The narrower
+ `deploy` role does not work for a site: every new app gets the default
+ edge pipeline, and a deploy credential on a pipelined app may move only
+ `canary/<name>` channels (carlos/platform main 18d64564,
+ `internal/console/server.go` claim and `internal/console/deployscope.go`).
+ So v1 mints an app-bound `publish` credential, which can ship, promote and
+ roll back that one app and manage its hostnames, and asks CARLOS for a
+ narrower role (P2). First-deploy setup (creating the app, enabling it and
+ minting its platform host) is a person's write that no service credential
+ may do. So a new site's first publish, at the owner's tap on its publish
+ card, runs the existing fixed `carlos deploy` with the owner's signed-in
+ carlos on that machine, which creates the app, as today; the existing
+ guard still refuses a name the account already holds unless this runner
+ recorded deploying it. Right after that first deploy the runner runs
+ `carlos services create --role publish --app <app> --json <name>` with
+ the same login. Every later publish uses the app credential. The runner
+ process reads the secret from that command's JSON output, never logs the
+ output, and stores it 0600 in its state directory, outside every
+ directory a sandbox mounts. Each later deploy runs one fixed `carlos
+ deploy` with the secret in `CARLOS_SERVICE_TOKEN` and the console in
+ `CARLOS_CONSOLE`, never in argv, a record, a log or a model's context,
and with `CARLOS_CONFIG` naming a runner-written config holding exactly
- the confirmed destination. The person's own credential is used only for
- setup, at their tap, never to deploy.
+ the confirmed destination. The owner's own login is used only for a new
+ site's first publish, the mint, and rotation or revocation (no service
+ credential can revoke or rotate any credential, itself included), each at
+ an owner's tap, until P3 replaces it.
- *A credential minted elsewhere* (by Base through `carlos platform
credentials mint`, or by the consent flow in section 6) arrives sealed to
the runner's seal key, as API keys do (connections spec §2.4).
@@ -124,7 +136,7 @@ rotations apart), minted and last used.
- *CARLOS temporary sites.* `/new-temporary` refuses an app-scoped
credential, so `--temporary` needs an account-wide `publish` credential,
which can also claim, ship, promote and retire every app in that account.
- Until CARLOS offers a narrower scope (P3), a public temporary place may
+ Until CARLOS offers a narrower scope (P4), a public temporary place may
only name an account the owner dedicates to previews, and the coordinator
proposes devbox first.
@@ -132,7 +144,8 @@ A place with a credential belongs to the runner that holds it, which is the
creator's primary today. If that runner is removed, the place shows "needs a
machine" and the coordinator proposes setting it up again on another
runner. Equipo then revokes the old credential with `carlos services
-revoke`, or asks the owner to.
+revoke` through an owner's login, at their tap. A revocation that could not
+run stays on the Places page as "still live on CARLOS" until one does.
**Seeing and changing places.** Settings gains **Places**, state first. One
line per kind, then one line per project that overrides or has a site:
@@ -155,9 +168,11 @@ website with no site place, a preview with no temporary place, a new project
with no code home. It also proposes a starting set when it moves in.
**What the runner can see.** The runner reports a bounded, validated reach
-inventory in its hello, with no secrets: consoles its carlos is signed in to
-(`carlos auth whoami --console`), accounts it owns on each (`carlos accounts
-list`), apps in an account when asked (`carlos apps list`), whether a devbox
+inventory in its hello, with no secrets: the consoles its carlos is signed in
+to (the console origins in its credential file, read by the runner process
+for their names only, until CARLOS offers a secret-free list, P6), accounts
+it owns on each (`carlos accounts list --console <origin>`, owner rows only),
+apps in an account when asked (`carlos apps list`), whether a devbox
answers (`carlos devbox list`), and the namespaces it may create repositories
in (`create_in`, as today). A repository's committed `.carlos/config`
destinations are hints only, read as untrusted repository text.
@@ -170,9 +185,10 @@ paulca); else the person's only owned account. The coordinator calls
`propose_place` with a kind, a project and one candidate id from the
inventory; it cannot write a console, account or app itself. Equipo raises a
card: "Publish Neary's on Carloku, in account paulca?" with the candidates
-(best first, at most six) and Not now. The owner's tap confirms. The runner
-then creates the app and mints the credential, and the card says when that
-is done or why it failed. Confirming a place publishes nothing.
+(best first, at most six) and Not now. The owner's tap confirms. Code mints
+the app name, as `projectSite` does today. Confirming a place publishes
+nothing and creates nothing on CARLOS; the app and its credential come with
+the first publish the person taps (section 1).
## 3. Coordinator tools
@@ -187,20 +203,26 @@ on the runner, from a fixed template, outside every sandbox.
and a target (`site` or `temporary_site`). It raises the publish card,
which now names the place ("Publish Neary's to site-nearys-k3x9qa on
Carloku, account paulca?"). Only the task creator's tap, while they are
- an owner, places a publish step, as today. A site takes only a commit Equipo merged into the
- default branch and Review approved; a temporary site takes an approved
+ an owner, places a publish step, as today. A site takes only a commit
+ Equipo merged into the default branch and Review approved; a temporary site takes an approved
candidate, as previews do. With no confirmed place it proposes one first.
It may raise a card for an older merged task that was never asked, which
is what Neary's needs.
- `site_status`: a project's site: app, console, account, address (the URL
the deploy printed, confirmed by fetching the marker), the version its
- `edge` channel serves (read with the deploy credential), and the last
- publish outcome and when.
+ `edge` channel serves and its attached domains (both read with the app
+ credential), and the last publish outcome and when.
-The publish step itself stays as built: export from git objects, the
+The publish step keeps what is built: export from git objects, the
instance's digest-bound publish check right before the deploy, the marker
fetched back over https, and published or unconfirmed recorded on the task.
-What changes is where the console, account, app and credential come from.
+Two things change. The console, account, app and credential come from the
+confirmed place. And the trusted secret scan that previews run
+(`scanPreview`) now runs on the exact publish export before its built
+report; a finding or an unavailable scanner refuses the publish, which
+today's publish path does not. Published sites carry no Equipo `_headers`:
+the preview policy exists to fence unreviewed agent pages, and a published
+site's own headers are the project's.
## 4. What this replaces
@@ -217,7 +239,7 @@ What changes is where the console, account, app and credential come from.
needs a CARLOS update before previews open" and no link. An unconfirmed
preview never shows a link as if it works.
- The devbox domain comes from `carlos devbox list` once CARLOS reports it
- (P4), else from the first share, and Places says "address known after the
+ (P5), else from the first share, and Places says "address known after the
first preview" until then.
- The Assistant asks Equipo for a site's address (a read-only operation
backed by `site_status`) instead of looking in Base.
@@ -230,10 +252,13 @@ Carloku app exists for Neary's, so it starts fresh.
## 5. Security
-- **Scope.** Per-app `deploy` credentials on `edge` only. An account-wide
- credential only for a public temporary place on a dedicated account, until
- P3. The person's own credential is used only to create an app and mint
- its credential, at the owner's tap.
+- **Scope.** One app-bound `publish` credential per site: one app, no app
+ creation, no other app in the account. That is wider than wanted (it
+ includes the app's hostnames and rollback), so P2 asks for a narrower
+ role. An account-wide credential only for a public temporary place on a
+ dedicated account, until P4. The owner's own login is used only for a new
+ site's first publish, the mint, rotation and revocation, each at an
+ owner's tap, until P3 replaces it.
- **Gates.** An owner's tap confirms or changes a place. A tap on the
publish card, per merged commit, publishes (unchanged). The existing
"Publish previews publicly" project setting still gates public temporary
@@ -241,20 +266,25 @@ Carloku app exists for Neary's, so it starts fresh.
- **Model text never chooses a place.** Tools take inventory ids, and the
card shows console, account and app strings that code derived. A tap is
bound to the card id, revision, person and a hash of the exact place
- record, so a stale or altered card is refused. The publish dispatch reads
- its target from the confirmed place, never from tool arguments, and the
- runner refuses a dispatch whose console, account or app differs from what
- it minted the credential for. Repository `.carlos/config` is a quoted
- hint, never authority.
+ record, so a stale or altered card is refused. Repository `.carlos/config`
+ is a quoted hint, never authority.
+- **The approval holds to the deploy.** The publish step stores the place
+ id, the place and project-binding revisions and the destination hash the
+ person tapped. The dispatch carries them, and the runner's final publish
+ check right before `carlos deploy` (today bound to app and digest) is also
+ bound to them. If the place or binding changed, or was retired, after the
+ tap, the check refuses and the person is asked again. The runner refuses a
+ dispatch whose console, account or app differs from what it holds the
+ credential for.
- **Audit.** Place proposed, confirmed, changed and retired; app created;
credential minted, rotated and revoked (name and fingerprint only); and
the publish events that exist today. CARLOS audits each credential's use
on its side.
-- **Revocation.** Retiring a place revokes its credential. CARLOS service
- credentials belong to the account, not the person, so an owner leaving the
- team does not revoke them; the Places view lists live credentials and the
- owner who minted each, and an owner's removal raises a card offering
- rotation.
+- **Revocation.** Retiring a place revokes its credential through an
+ owner's login (section 1). CARLOS service credentials belong to the
+ account, not the person, so an owner leaving the team does not revoke
+ them; the Places view lists live credentials and the owner who minted
+ each, and an owner's removal raises a card offering rotation.
## 6. Platform requests (CARLOS; nothing filed)
@@ -263,54 +293,64 @@ Carloku app exists for Neary's, so it starts fresh.
X-DNS-Prefetch-Control) in ship, deploy and devbox share. The work exists
on carlos/platform `headers-security-allowlist` (77637a40, 2026-11-21),
not merged into main.
-- **P2.** A service credential by consent: Equipo asks for `deploy` on one
- app (creating the app if needed), an account owner approves in the
- console, and the secret is delivered once to the requesting machine, as
- `carlos auth login` codes travel. This lets teams without an owner's CLI
- login on the runner set up sites, and removes that login from Paul's
- runner.
-- **P3.** A temporary-sites scope: create, ship and delete only `tmp-` apps
+- **P2.** A site-publisher scope: ship, promote and roll back one app's
+ live channel, with no hostnames, lifecycle or retention. Today `deploy`
+ cannot promote `edge` on a pipelined app, and every new app is pipelined,
+ so Equipo has to use `publish`.
+- **P3.** A service credential by consent: Equipo asks for the P2 scope on
+ one app, including its first-deploy setup (create the app, enable it and
+ mint its platform host), an account owner approves in the console, and
+ the secret is delivered once to the requesting machine, as `carlos auth
+ login` codes travel. Revocation and rotation by the same consent. This
+ lets teams without an owner's CLI login on the runner set up sites, and
+ removes that login from Paul's runner.
+- **P4.** A temporary-sites scope: create, ship and delete only `tmp-` apps
in one account, within the existing caps, and nothing else.
-- **P4.** `carlos devbox list` reports the devbox's domain before the first
+- **P5.** `carlos devbox list` reports the devbox's domain before the first
share, in a machine-readable form.
-- **P5.** Let the `deploy` role read its own app's public addresses
- (routes and attached domains are person-only today), so `site_status` can
- name a custom domain.
+- **P6.** A secret-free list of the consoles a carlos is signed in to, and
+ JSON from `carlos accounts list` and `carlos apps list`, so the runner's
+ inventory parses no human-readable output.
## 7. Slices
1. **Neary's goes live (M).** Migration 0108 and the place records; the
site kind with the Carloku adapter, console and account taken from the
- place; `propose_place` and `publish_site` for sites; app create and
- per-app deploy credential minting on the runner with Paul's existing
- login; `offerPublish` says why instead of returning silently; a
+ place; `propose_place` and `publish_site` for sites; the approval bound
+ through dispatch and the final check; the secret scan on publish
+ exports; a new site's first publish with Paul's existing login on
+ docs-t1, then the app-bound credential minted and used for later
+ publishes; `offerPublish` says why instead of returning silently; a
read-only Places page. Finish line: Paul confirms "Carloku, account
paulca" for Neary's, taps Publish on the merged commit c069eae7, and the
- task shows a confirmed address.
+ task shows a confirmed address. Nothing in slice 1 waits on CARLOS.
2. **Temporary places (S, after P1 ships).** Devbox and CARLOS temporary
sites as places; the honest preview card; the env variables become
- observed proposals; the domain from the devbox list once P4 lands.
-3. **Places view and status (S).** Change, Undo and Retire; `site_status`
- and `places` tools; the Assistant's read-only site operation; code homes
- folded in from `project_home`.
-4. **Consent credentials (M, after P2).** Credentials by consent for teams
- with no owner login on a runner; rotation and revocation cards; P3 for
- public temporary sites when it lands.
+ observed proposals; the domain from the devbox list once P5 lands.
+3. **Places view and status (S).** Change, Undo and Retire with revocation;
+ `site_status` and `places` tools; the Assistant's read-only site
+ operation; code homes folded in from `project_home`.
+4. **Consent credentials (M, after P2 and P3).** The narrower scope and
+ consent delivery for teams with no owner login on a runner; P4 for public
+ temporary sites when it lands.
## 8. Open questions for Paul
1. **Where does Neary's live?** Recommend Carloku, account paulca, matching
the forge namespace; oficina projects go to account oficina. Tito only
for projects that are Tito's.
-2. **May Equipo use your CLI login on docs-t1 to create the app and mint its
- deploy credential, at your tap?** Recommend yes for slice 1, and retire
- that use when P2 lands.
-3. **Temporary sites default.** Recommend docs-t1's devbox (tailnet) as the
- team default and no public temporary place until P3, or a dedicated
+2. **May Equipo use your CLI login on docs-t1 for a new site's first
+ publish, to mint its app credential, and to revoke one, each at your
+ tap?** Recommend yes for slice 1, and retire that use when P3 lands.
+3. **Is an app-bound `publish` credential acceptable until P2?** Recommend
+ yes: it reaches one app, and the alternative is your full login on every
+ publish.
+4. **Temporary sites default.** Recommend docs-t1's devbox (tailnet) as the
+ team default and no public temporary place until P4, or a dedicated
previews account if you want public links sooner.
-4. **Ship P1 now?** Recommend reviewing and merging
+5. **Ship P1 now?** Recommend reviewing and merging
`headers-security-allowlist` in the next platform release; every preview
fails until it rolls to the boxes and to the devbox's carlos.
-5. **Who may confirm places?** Recommend owners only, as with project
+6. **Who may confirm places?** Recommend owners only, as with project
placement and merge policy; a creator still taps their own task's
publish card.