oficina / equipo Public

spec: Equipo release plan rev 4, approved; guided auto-release slice 9

Paul approved the plan 2026-11-11 with D1-D7 as recommended and added
guided auto-release: per-project policy in words, a deterministic risk
gate, an other-family risk review that can only veto or tighten,
automated production checks with a receipt and Undo, a trust threshold
of K approved releases, and recorded spend. Platform requests filed:
amadan/amadan#131 (A1), carlos/platform#893-#896 (C1, C2, C4, C5); C3
answered from code.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by paul@keymail.dev 99d078c719d6fbc25d94b92c7a0bb483d5b18447 parent b08015a
1 file changed, +93 −19
  • docs/superpowers/specs/2026-11-11-equipo-release.md +93 −19

CI failed — run details

diff --git a/docs/superpowers/specs/2026-11-11-equipo-release.md b/docs/superpowers/specs/2026-11-11-equipo-release.md
index 0f86a150..03639ee6 100644
--- a/docs/superpowers/specs/2026-11-11-equipo-release.md
+++ b/docs/superpowers/specs/2026-11-11-equipo-release.md
@@ -1,6 +1,7 @@
# Equipo release, thin v1: plan for approval
-Status: 2026-11-11, revision 3, plan only, nothing built. Drafted by
+Status: Approved by Paul 2026-11-11 (D1–D7 as recommended; guided
+auto-release added as slice 9). Revision 4, nothing built. Drafted by
Claude (Opus 5.5) on `release-plan` from main d4b1414. Revision 1
(339c9e8) drew NOT READY from Astra round 1; revision 2 (1e00aea) drew
READY AFTER FIXES from round 2; §9 maps every finding. Every
@@ -57,14 +58,16 @@ that, and production never rolls back without you.
grants.
**Platform requests:**
-- **A1** (amadan): per-run hosted CI artifacts, so builds can move to
- single-use machines.
-- **C4** (Carloku): a `deploy` scope without assets purge and gate
- pass.
-- **C5** (Carloku): a digest-bound promote with a status read. Until
- then, you resolve an uncertain promote.
-- Also C1 (a replica position read), C2 (owner instance restore) and C3
- (confirm that `--swap hold` works with a `deploy` credential).
+- **A1** (amadan/amadan#131): per-run hosted CI artifacts, so builds
+ can move to single-use machines.
+- **C4** (carlos/platform#895): a credential that can only ship, promote
+ and read.
+- **C5** (carlos/platform#896): a digest-bound promote with a status
+ read. Until then, you resolve an uncertain promote.
+- Also C1 (#893, a replica position read) and C2 (#894, an owner
+ point-in-time restore of a live database). C3 is answered from the
+ code: `--swap hold` rides in the ship request, which a `deploy`
+ credential may make.
**Slices.** "Needs you" means your approval:
1. Hosted checks (needs you: the policy).
@@ -75,8 +78,10 @@ that, and production never rolls back without you.
6. Staging runner self-update (the unit change).
7. Production (every release, and the credential).
8. CLI pin bumps (each one).
+9. Guided auto-release (the policy, in your words), after slice 7 has
+ run in practice.
-Slices 1 and 3 to 8 each get their own spec and Astra review. Today, main
+Slices 1 and 3 to 9 each get their own spec and Astra review. Today, main
is red and the rename task needs another fix round. Once both are fixed,
the rename task is the end-to-end demo (§5).
@@ -448,6 +453,69 @@ Otherwise:
- task cards carry the line from §2.1;
- the project page lists the last known-good per target.
+### 2.9 Guided auto-release (slice 9)
+
+Paul's addition, approving the plan: "allow me to sort of guide it
+towards being able to release less risky features / improvements under
+certain conditions ... it could double-check risks with e.g. a highest
+capability model." It has the same shape as merge authority: policy in
+words, a gate in code, and a reviewer that can only say no.
+
+- **Policy in words, per project.** Paul states conditions, for example
+ "UI and copy changes can go to production on their own". Equipo
+ stores them as a structured policy (`chat_release_policies`: change
+ classes allowed, diff size limit, look-back N, words, revision), shown
+ on the project page under "How Equipo releases".
+ - The coordinator may tighten the policy at once.
+ - Loosening it takes an owner's confirm card, as with
+ `set_merge_policy`.
+- **Deterministic risk gate** (`releasegate`, pure). A production
+ release is eligible only when all of these hold:
+ - migrations are `none`, or `additive` with the four rollback proofs
+ of §2.6;
+ - no wire or protocol change (`surface.json` unchanged);
+ - no sensitive path is touched: merge authority's list, plus release
+ config (`release/`, `scripts/release-*`, `Makefile` release targets,
+ the install manifest and pins);
+ - the diff is within the policy's size limit;
+ - staging is verified, smoke included;
+ - no `failed`, `rolled_back` or `uncertain` release for this project
+ among its last N;
+ - every changed file falls in a change class Paul allowed. The code
+ defines the classes, for example `copy` and `ui`, by path and file
+ kind.
+
+ Anything else gets the approval card of §2.6, unchanged.
+- **Independent risk review.** For an eligible release, a
+ highest-capability model from a family other than the author's (Astra
+ when Claude wrote it; Fable or Opus when Codex did) reads the release
+ diff and the release record.
+ - Its only answers are `veto` or `tighten`, with reasons. It cannot
+ approve: eligibility comes from the gate, never from its words.
+ - A veto, a tighten, a failure to answer, or a missing other family
+ sends the release to the card.
+ - The verdict, the reasons, the model and its tokens are recorded on
+ the release.
+- **Production verification without Paul.** Automated checks replace the
+ [Works] card:
+ - version and digest;
+ - health;
+ - a read-only production smoke set defined as data
+ (`release/smoke-production.json`): pages that render with no
+ sign-in, or the owner's read-only views.
+
+ Paul then gets a quiet receipt with Undo. Undo promotes the last
+ known-good version through `authorizeRelease`, and the release is
+ tagged `automatic` in the record and the audit. A failed check opens
+ the rollback decision card; production still never rolls back on its
+ own.
+- **Trust.** Auto-release unlocks for a project only after K successful,
+ manually approved production releases (K is in the policy, at least
+ 3). Any rollback or Undo puts the project back on approval until Paul
+ says otherwise, as Undo does for merges.
+- **Spend.** The risk review's tokens are recorded on the release, and
+ it counts toward the project's spend like any turn.
+
## 3. Permissions
| What | Who holds it | Where | Paul's action |
@@ -464,15 +532,19 @@ The release runner is the runner of the instance Paul works in: staging
today, production after the cutover (D1). Credentials move with it.
Requests, filed as discussions:
-- **A1 (amadan):** per-run hosted CI artifacts, with digests the hub
+- **A1 (amadan/amadan#131):** per-run hosted CI artifacts, with digests the hub
records and no credential in the job.
-- **C1 (Carloku):** a `deploy`-role read of replica position, so a
- release records its restore point.
-- **C2 (Carloku):** owner-usable instance restore (#658).
-- **C3 (Carloku):** confirm that a `deploy` credential may ship with
- `--swap hold`.
-- **C4 (Carloku):** a `deploy` scope without assets purge and gate pass.
-- **C5 (Carloku):** a promote bound to the shipped release's digest (or
+- **C1 (carlos/platform#893):** a `deploy`-role read of replica
+ position, so a release records its restore point.
+- **C2 (carlos/platform#894):** an owner point-in-time restore of a live
+ instance's database (related to #658, which restores deleted
+ instances).
+- **C3 (answered, not filed):** `--swap hold` travels in the ship
+ request's metadata (`internal/console/apicli.go:2015`), and the ship
+ door admits `deploy`. Staging confirms it on first use.
+- **C4 (carlos/platform#895):** a credential that can only ship, promote
+ and read, without assets purge and gate pass.
+- **C5 (carlos/platform#896):** a promote bound to the shipped release's digest (or
ID), with an idempotency key and a status read: landed, refused or
expired. Until then, a person resolves an uncertain promote.
@@ -492,8 +564,10 @@ Paul's approval.
| 6 Staging runner self-update | after a staging release both staging runners update on their own, releasing runner last, no step interrupted | the unit change | yes |
| 7 Production | after one approval, the staging-verified artifact file, digest rechecked, shipped and promoted to `equipo` (never rebuilt); production runners updated by hand; Paul's [Works] records verified | each release, the credential | yes |
| 8 CLI pins | a pin bump goes through a security review, then a release | yes | yes |
+| 9 Guided auto-release | §2.9: a release inside Paul's policy goes to production with no card, verified by automated checks, with a receipt and Undo; one outside it gets the card | the policy, in words | yes |
-Order: 1 and 2, then 3, 4, 5, 6, the staging demo, 7, 8.
+Order: 1 and 2, then 3, 4, 5, 6, the staging demo, 7, 8. Slice 9 waits
+until slice 7 has run in practice.
## 5. The demo