Skip to content

feat(playbooks): assign steps to runtime holders - #1088

Open
BastiHu wants to merge 1 commit into
feat/playbooks-787-integrated-331968a7from
feat/playbooks-integrated-331968a7
Open

BastiHu wants to merge 1 commit into
feat/playbooks-787-integrated-331968a7from
feat/playbooks-integrated-331968a7

Conversation

@BastiHu

@BastiHu BastiHu commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #788.

Migration 069 moves holder assignment to run time. Assignment uses a local peer in the same project and removes fixed Crew step ownership.

The port passed 284 focused tests and another 26 Crew client tests. Earlier tested head · Earlier stack verification.

Before and after

Before After
Crew before Crew after

December re-review

Current layer commit.

Fleet and hand-off evidence

On the base revision e7c5eea75, the Crew header shows “Step 1 of 2: First step · reviewer.” On b06f5048d5, which includes this PR, the owner row shows “Step 1 of 2: First step · Owner.” These are separate disposable runs of the same two-step Playbook.

Fleet before, step on the Crew header

Fleet after, step on the owner row

The desktop recording at 05b8a3f359 shows the owner taking Draft back from Jade Glow Draft Peer. Draft stays on step 1 throughout.

1088-handoff.mp4

Original evidence comment.

Additional live recording on a4e77e840b before the final rebase.

./1088-outbound-handoff.mp4

Historical submission and tests on earlier commits

The following records the original submission. The December re-review section above tracks current evidence.

Problem

Fixed Crew seat-to-step ownership prevents a run owner from choosing the right worker at runtime or recovering a handoff to an unavailable worker. Closes #788.

Stack 3 of 3; depends on #1087 and the #1086 snapshot foundation. Base: feat/playbooks-787-integrated-331968a7. Merge the stack in order.

What changed

Start, next, back, and changed-step revisions accept an optional assignee. j5_playbook_assign reassigns or takes back the current step. The Store validates an eligible local owner-spawned Peer or member of an owned Crew and records holder, owner attribution, pointer, and landing in one transaction. Omitting an assignee gives the step to the owner; same-step revision preserves the holder and rejects reassignment.

Delivery uses recorded identities and stable dispatch IDs. Failures remain visibly pending; explicit reassignment can supersede a stuck landing, and old retries cannot revive it. A shared per-run lock covers initial/replayed start and mutation dispatch. Migration 061 backfills recorded identities without changing delivery outcomes or selecting replacement workers; unresolved identities expose explicit recovery with run/step IDs.

Crew proposal/launch/replacement no longer reads YAML or derives, validates, writes, or transfers fixed step ownership. Legacy fields remain readable as compatibility data. Fleet shows the active run, holder, and pending state on its owner agent, including owners without a Crew.

UI changes

Fleet run information moves to the owner agent's row. Fixed Crew/seat ownership badges and proposal fields are removed. Before/after screenshots and a real handoff video remain outstanding; browser regressions are included in the automated suite.

Live testing

Automated pass at this head, 3d9d3079c74c14d4d52dbd21ec8662ed0a2d3486: vp run check:changed exited 0, with 439 tests across 31 files, all 36 affected/dependent package typechecks, format, lint, both Knip stages, GraphQL, and 12 React compiler cases. The unchanged result was rechecked before pushing.

Tests include real-orchestrator retry delivery, holder eligibility, invalid-assignment rollback, pending supersession, revision/assignee integration, Fleet projection, legacy Crew approval/addition/replacement after YAML deletion, identity-preserving migration, and deterministic start/assign/cancel barriers. The race and migration recovery cases failed before their fixes.

Live smoke pass, full live acceptance pending: the primary agent used the repository's isolated live-test setup at this head. Free Replay streaming/approval rendered; restart/reconnection, Fleet with live facts, playbook discovery/step preview, and Prepare chat worked. The disposable server was stopped afterward. Temporary Vite test files caused dev-server restarts when tests ran concurrently; the stable client checks ran after automated validation finished.

Real Codex/Claude Playbook turns, assigned-run Fleet/history, active-run restart recovery, and a live base-to-head upgrade were not exercised. Bounded Haiku/Luna authorization is pending; paid evals were not run. Native mobile, packaged Electron, remote/tunnel clients, full CI suites, release builds, and release smoke remain unverified locally.

Upstream impact

The measured apps/server/src/provider/agentContextBudget.json is updated under the existing FORK.md case 110; its tool registration seam is documented in case 2 by the preceding layer. Runtime and UI changes are J5-owned. Upstream product behavior is unchanged.

Checklist

  • One concern: runtime ownership and reliable handoff of a playbook step
  • Tests cover the changed behavior, migrations, concurrency, and recovery
  • Live testing: coverage and gaps are stated above
  • Upstream-owned files: measured budget data is covered by the existing FORK.md record
  • Upstream product: no product divergence introduced
  • Surfaces: owner/Peer/Crew paths, web/desktop, mobile contracts, MCP, pending/reverse states, and connection limits considered
  • Docs: product/user/tool guidance updated to runtime assignments

Implemented with GPT-6 Astra through the Codex harness.

1088-outbound-handoff.mp4

@vercel

vercel Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
j5-code Ready Ready Preview Dec 1, 2026 7:21pm UTC

Request Review

@Jacksondr5

Copy link
Copy Markdown
Owner

Direction for the whole stack, before the full review, is in this comment on #1086. We'll review once the stack is rebased onto j5/main after #1205.

@BastiHu
BastiHu force-pushed the feat/playbooks-787-integrated-331968a7 branch from 427fb17 to 80e9374 Compare November 24, 2026 11:00
@BastiHu
BastiHu force-pushed the feat/playbooks-integrated-331968a7 branch from 82d64d2 to 59c1110 Compare November 24, 2026 11:00
@BastiHu

BastiHu commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator Author

@Jacksondr5, Migration 062 moves holder assignment to run time. Assignment uses a local peer in the same project and removes fixed Crew step ownership. The port passed 284 focused tests and another 26 Crew client tests. Commit · Stack-wide response and outstanding evidence.

@Jacksondr5

Copy link
Copy Markdown
Owner
  • Compatibility code for states that exist only between merges. Migration 060 cancels every active run from before copies existed. The following serve only a server that ran an intermediate merge of this stack:

    • migration 062's holder backfill;
    • the relay's fallback for runs with no landing;
    • holder_unavailable.

    Please delete them. Keep legacyRequest, because trunk already wrote Crew start receipts.

  • crews.md still describes the old replacement. It says a replaced member's step moves "the way a reselect does" (Definition, around :16, and AC10 at :89). Please say that the run owner reassigns the step.

  • Always-empty legacy outputs (nit): playbookStepIds: [] (AgentCrewInstanceService.ts), and FleetCrew.playbook/playbookRun sent as null (fleetRead.ts). Keep decoding them, and stop producing them.

  • Stale wording (nit): "a persona or Crew follows" in docs/j5/product/glossary.md:30 and overview.md:24; step pills limited to Crew seats in thread-a2a-rendering.md.

  • agent-tools.md History: link the History line to issue Playbooks: the owner hands each step to someone #788, not the PR.

  • Evidence: before/after of Fleet (Crew header → owner row) and of the Crew proposal card, plus a short video of a hand-off.

@BastiHu

BastiHu commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator Author

Fleet and hand-off evidence

On the base revision e7c5eea75, the Crew header shows “Step 1 of 2: First step · reviewer.” On b06f5048d5, which includes this PR, the owner row shows “Step 1 of 2: First step · Owner.” These are separate disposable runs of the same two-step Playbook.

Fleet before, step on the Crew header

Fleet after, step on the owner row

The desktop recording at 05b8a3f359 shows the owner taking Draft back from Jade Glow Draft Peer. Draft stays on step 1 throughout.

1088-handoff.mp4

Step ownership moved to the run in #788, so a crew member no longer
records playbookStepIds. Two launch tests still expected an empty list
and failed CI (Test Server 2) on #1088 and every layer above it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@BastiHu
BastiHu force-pushed the feat/playbooks-integrated-331968a7 branch from b9006dd to f49baa0 Compare December 1, 2026 19:20
@BastiHu
BastiHu force-pushed the feat/playbooks-787-integrated-331968a7 branch from e7c5eea to ee69046 Compare December 1, 2026 19:20

This branch was successfully deployed

1 active deployment
Preview — f49baa09 Deployed Dec 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL 1,000+ effective changed lines (test files excluded in mixed PRs). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants