Abilities spec: Astra round 6 is READY; apply its 3 P2s
Record the ability hold for any blocked job work, turns included, and honour it on every dispatch path until Try again; accept a bound project_created for an already-authorised creation; align the MCP dispatcher amendment with the unknown-on-blocked-recovery rule.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+13
−4
docs/superpowers/specs/2026-11-26-assistant-abilities-design.md+13 −4
CI passed — run details
CI log
=== build === CGO_ENABLED=0 go build ./... === vet === go vet ./... === fmt-check === === staticcheck === go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 ./... === govulncheck === go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 ./... No vulnerabilities found. === gitleaks === [90m12:17PM[0m [32mINF[0m [1mUnknown SCM platform. Use --platform to include links in findings.[0m [36mhost=[0mamadan.net [90m12:17PM[0m [32mINF[0m [1m1 commits scanned.[0m [90m12:17PM[0m [32mINF[0m [1mscanned ~2474122 bytes (2.47 MB) in 290ms[0m [90m12:17PM[0m [32mINF[0m [1mno leaks found[0m === budget === go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget size budget size: 22 directories within budget === script-test === scripts/prepare-apps_test.sh ok releases lookup failure stops before ship ok app owned elsewhere stops the script ok apps listing failure stops before create ok ambiguous release dir is refused ok explicit version resolves the ambiguity ok releases match is exact, not substring ok shipped version is only promoted, existing app not created ok fresh account creates, ships, promotes to edge, enables ok failing promote stops the script ok ship is retried while uploads are rate limited all passed hack/fonts_test.sh fonts_test: ok === test === go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -count=1 ./... receipt: test step 9.38s against a 60s target (the gate's other steps are not in this figure) receipt: 16 packages ran, 0 cached, 6 without tests, 0 failed receipt: slow package 8.281s amadan.net/oficina/base/internal/webtest receipt: slow package 605ms amadan.net/oficina/base/internal/operations receipt: slow package 492ms amadan.net/oficina/base/internal/issuer receipt: slow package 230ms amadan.net/oficina/base/internal/consumer receipt: slow package 170ms amadan.net/oficina/base/internal/web receipt: slow test 1.52s amadan.net/oficina/base/internal/webtest TestHomeDoesNotWaitOnAStalledSnapshot receipt: slow test 1.13s amadan.net/oficina/base/internal/webtest TestAskZoneIsToldOnce receipt: slow test 520ms amadan.net/oficina/base/internal/operations TestOperationsRefusals receipt: slow test 270ms amadan.net/oficina/base/internal/issuer TestAuthorizeRefusals receipt: slow test 220ms amadan.net/oficina/base/internal/webtest TestAskZoneAgainOnANewConnection === native === strings: copy review's strings.json is not here (git-ignored); its comparison skipped strings: 119 in the catalog, 116 used worktree-lib_test: ok
diff --git a/docs/superpowers/specs/2026-11-26-assistant-abilities-design.md b/docs/superpowers/specs/2026-11-26-assistant-abilities-design.md| index 5543d9c..830c6eb 100644 |
| --- a/docs/superpowers/specs/2026-11-26-assistant-abilities-design.md |
| +++ b/docs/superpowers/specs/2026-11-26-assistant-abilities-design.md |
| @@ -1,6 +1,6 @@ |
| # Base's Assistant can do things out of the box; admins can limit it per person |
| -Status: **draft for Paul's review**, revision 6, 2026-11-26 (after Astra rounds 1 to 5, see Review). Design only: no implementation, merge or deploy. |
| +Status: **draft for Paul's review**, revision 7, 2026-11-26 (after Astra rounds 1 to 6; round 6 READY, see Review). Design only: no implementation, merge or deploy. |
| Paul, 2026-11-26, after asking Base "What's the weather in Dublin?" and being sent to met.ie: |
| @@ -383,7 +383,7 @@ So a Research step dispatched before the switch went off doesn't start, and one |
| - **Nothing new.** `team_request` and `team_add` are refused `ability_off`. The instance's sweep doesn't answer this person's taste questions or queue `team_update` turns that nudge their jobs (jobs spec K8). The dispatcher doesn't dispatch new steps for their hand-offs. |
| - **The job's own conversation is held too** (round 5, finding 1). Each job has its own Coordinator thread (lane `job:<id>`, assistant-jobs spec). Its turns can do work before any step exists, for example authorising a new repository (`create_project`, `authorizeCreate` in `equipo:internal/equipo/chat/tools.go:860`). So, for a job lane whose hand-off's person lacks `build`: |
| - `dispatchNext` (`equipo:internal/equipo/chat/store.go:642`) doesn't dispatch the lane's queued turns. They wait, and are dispatched in order once Try again resumes the job (below); |
| - - in a job-lane turn already running, every Coordinator tool that starts or changes work is refused `ability_off` with fixed Coordinator-facing text: "Refused: the person this work is for can't have new work done right now. Stop here; don't start or change anything." That covers `create_project`, `project_created`, `add_project`, recording or starting a task, proposing a specialist or Research, and merge or publish requests. Reads, `status`, notes and cancelling still run; |
| + - in a job-lane turn already running, every Coordinator tool that starts or changes work is refused `ability_off` with fixed Coordinator-facing text: "Refused: the person this work is for can't have new work done right now. Stop here; don't start or change anything." That covers `create_project`, `add_project`, recording or starting a task, proposing a specialist or Research, and merge or publish requests. Reads, `status`, notes and cancelling still run. One exception: `project_created` reporting a repository that an earlier `create_project` already authorised (`equipo:internal/equipo/chat/tools.go:890-925`) is accepted, bound to that authorisation's repository. That records an action already done, as an in-flight request finishes, so no repository is left stranded. Nothing further starts from it; |
| - an answer to a job-lane card from Equipo's own pages ("Open in Equipo") goes through the same check. A card that would start or change work is refused 403 `ability_off`, and dropping the job still works. |
| - **Start authorization is the boundary for steps** (round 2, finding 5). `Store.Authorize`, the start authorization of every step attempt (`equipo:internal/equipo/chat/runners.go:587-600`), refuses a step of a task followed by a hand-off whose person lacks `build`. It refuses with `ability_off` in the same transaction that would record the start. So: |
| - a step dispatched but not yet started never starts; |
| @@ -396,7 +396,8 @@ So a Research step dispatched before the switch went off doesn't start, and one |
| - detail: "Building is turned off for you. <Owner> can turn it back on, or you can drop this." (DRAFT); |
| - actions: Drop it and Dismiss. Once `build` is on again, also Try again. Drop it succeeds in this state, so T1 (no dead ends) holds. |
| - **The stop is stored, and Try again resumes it** (round 4, finding 3). A step that was never dispatched leaves no failed attempt, so K6's `retryFailed` (`equipo:internal/equipo/chat/handoff.go:1723-1752`, which needs `NeedsRetry`) can't resume it. So: |
| - - the hand-off records `ability_held_at` (a new `chat_handoffs` column) the first time the dispatcher skips one of its steps, or `Authorize` refuses one, for `ability_off`; |
| + - the hand-off records `ability_held_at` (a new `chat_handoffs` column) the first time any of its work is blocked for `ability_off`: a step the dispatcher skips or `Authorize` refuses, a job-lane turn `dispatchNext` holds back, or a work-changing Coordinator tool refused in a job turn. A job with no task yet is covered too; |
| + - while `ability_held_at` is set, the shared dispatch paths refuse the job's work **whatever the switch says now**: `dispatchNext` for its lane, step dispatch, and the dispatch that follows a runner reconnect (`equipo:internal/equipo/chat/runner.go:664-669`, `store.go:794-795`). So turning `build` back on, or a runner reconnecting, never resumes it without the person's Try again; |
| - the job card reads that, not an attempt, for its stop row; |
| - Try again on such a job is a new act path, `resumeAbilityHold`. In one transaction it checks the person holds `build`, clears `ability_held_at`, and puts every held task back where the dispatcher picks it up: a refused attempt becomes a fresh attempt, an undispatched step is simply eligible again, and the job lane's waiting turns are dispatched in order. It is idempotent per card revision and key, like every K2 action. |
| @@ -460,7 +461,7 @@ The capability gate stays what it is: a presentation switch carried by `Base-Cap |
| - D6's matrix gains `Use` as a requirement for `request`, `connect`, `use`, and managing one's own allowances. `disconnect` doesn't need it. `set_permissions` leaves the matrix, because Base sets the permissions. |
| - "Owners always hold add and review" becomes "the Base owner always holds every ability and is the admin" (§5.1). |
| - The tests keep their intent: `TestPermsDefaults` (member use and add on, review off), `TestPermsDenyWins` (an admin's off wins), `TestOwnerCannotLoseBoth`, and `TestPermissionReadInsideTx`, which now reads `switches` inside the transaction. |
| -- **Tasks 24 and 25 (prepare, once-only dispatch, recovery).** The claim transaction reads `switches`: no `services` (for a service) or no `apps_write` (for an Oficina go-ahead) expires the confirm with `ability_off`, and nothing is sent. `SendPrepared` and the recovery send install the bound send gate, called right before the operation request, after any token refresh (§6.1). |
| +- **Tasks 24 and 25 (prepare, once-only dispatch, recovery).** The claim transaction reads `switches`. Without `services` (for a service) or `apps_write` (for an Oficina go-ahead), an approval never claimed for dispatch expires with `ability_off`, and nothing is sent. A call already claimed as `dispatching` whose recovery is blocked becomes `unknown`, isn't resent, and is never reported as not done (§6.1). `SendPrepared` and the recovery send install the bound send gate, called right before the operation request, after any token refresh (§6.1). |
| - **Task 28 (the account a change acts as).** The identity read after a publish goes through the service client's switch check, so it isn't made for a person without `services`. Their account label is read when the switch is next on. |
| - **Task 6 (guarded client)** moves to `internal/websource/guard` with a redirect option (§4.3). Services keep "no redirects". Whichever of lookups and MCP S1 comes first builds it. |
| - **Task 7 (instance inventory)** is shared as it is. Lookups wait for it too. |
| @@ -583,6 +584,8 @@ Tests come first, and each phase follows Equipo's "headless first" rule (thin v1 |
| - **Jobs.** |
| - `TestBuildOffRefusesStart`: a step dispatched before the switch went off isn't granted. A running step keeps its grant and finishes. No later step and no housekeeping retry starts. Run now can't release it. |
| - `TestJobLaneTurnsHeld`: `build` goes off between the job's creation and its turn's dispatch: the turn isn't dispatched. Off while a job turn runs: `create_project` and starting a task are refused, and `status` and cancel run. A job card answered from Equipo's pages that would start work is refused, and drop works. Try again dispatches the waiting turns in order. |
| + - `TestTasklessJobHoldResumes`: a job with no task has its turn held, so `ability_held_at` is set and the card shows the stop row. `build` goes on and the runner reconnects: nothing resumes. Try again dispatches the turn. |
| + - `TestProjectCreatedAfterSwitchOff`: `create_project` is authorised, the runner creates the repository, then `build` goes off. The bound `project_created` is accepted and nothing further starts. An unbound `project_created` is refused. |
| - `TestIdleEntryPointRefreshes`: an idle connected member whose hint failed uses a `/services/*` route. The board is refreshed first and the new off is honoured. |
| - `TestRecoveryBlockedStaysUnknown`: an external write succeeds, the process crashes before recording it, the switch goes off, and recovery runs. The call ends `unknown`, nothing is resent, and the person isn't told it wasn't done. An approval that was never claimed expires as `ability_off`. |
| - `TestAbilityHoldResumes`: `build` goes off and the current step finishes. The next step stays undispatched and `ability_held_at` is set. With `build` on again, Try again dispatches it. A refused attempt resumes the same way. Turning the switch on alone resumes nothing. A double tap resumes once. |
| @@ -772,3 +775,9 @@ Model-facing instance texts (not copy; reviewed as code): the two isolated steps |
| - **P1, job Coordinator turns not covered by `build`.** Job-lane turns aren't dispatched without `build`. Running job turns can't start or change work, `create_project` included, and job cards answered in Equipo's pages are checked the same way (§6.3). |
| - **P2, idle entry points using a stale board.** Every out-of-turn entry point refreshes a board older than 60 s before acting (§5.3). |
| - **P2, blocked recovery of a possibly sent call.** Only approvals known not to have been sent expire. A blocked recovery ends `unknown` and isn't resent (§6.1). |
| + |
| +**Round 6** (Astra, 2026-11-26): **READY**, with no P1 and 3 P2. The P2s were applied once in revision 7, as the review rule asks, and the loop stopped there. |
| + |
| +- **P2, job-lane holds without a resume path.** `ability_held_at` is recorded whenever job work is blocked, turns included. The shared dispatch paths, the one after a reconnect included, refuse held work until Try again (§6.3). |
| +- **P2, a created repository stranded by refusing `project_created`.** A `project_created` bound to an earlier authorisation is accepted (§6.3). |
| +- **P2, the MCP amendment contradicting the recovery rule.** §7.2 now keeps §6.1's distinction: never-claimed approvals expire, and blocked recoveries end `unknown`. |