Skip to content

The Captain runs a Crew's playbook and each seat receives its steps #322

Closed

Description

@bryantderosier

My rule: when a Crew follows a playbook, the Captain owns the single run in its own thread. The Captain starts it after the roster is approved, hands each step to the seat that owns it, and advances when that seat reports back. There is one progress board: the Captain's thread and Fleet → Playbook runs.

Where it stands today:

  • A run belongs to one thread (PlaybookStore), and playbook_current only answers for the caller's own thread.
  • Nothing delivers a step's prompt to anyone but the run's owner. docs/j5/product/features/playbooks.md AC5 ("on advance, every participant receives its own instructions for the new step") and AC6 ("the interface shows which step each Crew … is on") aren't met for Crews.
  • One active run per thread. A Captain can command several Crews, so two playbook Crews under one Captain would collide.

What should change:

  • Start: once a playbook Crew launches, the Captain is told to playbook_start the Crew's playbook (the launch notice in CrewLaunchReporter.ts says so). playbook_start takes an optional crew_instance_id, and the launch notice includes it. The server checks that the Crew is the caller's, is live, and follows that playbook, then records the link on the run. Without the id, the run is an ordinary thread run. I'm making the link explicit because a Crew stays live after its run completes, so a Captain can later command a second Crew on the same playbook and name matching alone would be ambiguous.
  • Delivery on advance: when a Crew-linked run lands on a step, including the first step on playbook_start, the platform sends that step's live prompt to the seat that owns it as a platform notice: the step id, the title, and the prompt read fresh from the YAML, plus "report back to your Captain with send_message when this step is done". A step nobody owns is delivered to the Captain. Ownership is read from the Crew's live members at delivery time, so a step whose seat never launched (the roster drops it before the launch report, fix(crews): drop never-created seats from the roster before the launch report #377) or has been archived also goes to the Captain. The Captain still decides when to advance; the platform never advances on its own (playbooks AC3).
  • Captain guidance: the Captain waits for the owning seat's report (it arrives as a message; no t3_thread_wait), checks it, then calls playbook_next. playbook_back or playbook_reselect re-delivers the step to its owner.
  • One run per Captain thread: the propose-time refusal moved to A Crew proposal records the playbook it follows #321. This issue relies on it: a Crew-linked run is always the only active run in its Captain's thread. Lifting this limit is out of scope.
  • Lifecycle: stopping the Crew leaves the run where it is. Archiving the Crew, or its Captain, cancels the Crew's active run, and unarchiving through the Captain cascade does not restart it. Completing the run leaves the Crew live.
  • Fleet (web and desktop): the Crew's header shows "Step N of M: <title>" and the seat that owns the current step. The Playbook runs section links the run to its Crew.
  • Docs: docs/user/playbooks.md gains a short "With a Crew" section; docs/j5/product/features/playbooks.md AC2, AC5, and AC6 note the Captain-owned shape.

Tests to ship:

  • starting a Crew-linked run delivers the first step to its owning seat, and playbook_start refuses a crew_instance_id that isn't the caller's live Crew on that playbook
  • advancing a Crew-linked run delivers the new step's live prompt to exactly the owning seat, and an unowned step, or one whose seat never launched or was archived, goes to the Captain
  • a retried playbook_next delivers once
  • back and reselect re-deliver to the owner
  • archiving the Crew cancels its run; stopping it doesn't
  • deliveries wait on receipts, not sleeps

Done when a playbook Crew moves through every step with each seat receiving only its own steps, and Fleet shows where the Crew is.

Surfaces: mobile has no Fleet or Crew UI; the Captain thread's existing playbook board already renders on mobile.

Upstream footprint: none. PlaybookStore, the run migration, CrewLaunchReporter, ArchiveCrewService, the playbook MCP tools, and the Fleet page are all J5-owned.

Follows #319 and #321.

Activity

  1. added this to the Crew playbooks milestone on Sep 25, 2026
  2. added
    size:L
    on Sep 25, 2026
  3. added a commit that references this issue on Sep 30, 2026
    08aee52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

size:L

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions