Repository navigation
Description
Item 9 of 11 in the Crews: organic teamwork milestone.
The problem
When I approve a roster, every seat starts at the same moment on the same brief (startBriefs in apps/server/src/j5/a2a/CrewLaunchService.ts). That's right for seats that work in parallel, and wrong for seats that come later in the flow. The Reviewer wakes up before there's anything to review. The Sitter wakes up before there's a PR. Each one spends a turn working out that it's waiting, often messages the Builder to ask when things will be ready, and then the Captain has to wake it again later anyway.
Playbook crews partly avoid this because steps are handed out one at a time, but most crews don't use a playbook.
Where this sits
Crews should feel like a team where people join the work when it's their turn, not a set of threads all started at once. This keeps the one approval up front (I still approve the whole team once) while letting the Captain bring seats in when they're needed. Fewer wasted turns also means fewer messages feeding #677.
Per-seat briefs already exist as seat instructions, so this issue is only about when a seat starts.
Definition
The docs PR on j5/crew-teamwork-docs writes the end state into the definitions, so read these first; this issue builds to them. Crews AC3, AC6, AC22, and AC35–AC36, Agent tool surface AC40 (start, and start=waiting in the launch report), and Fleet page AC38.
What we already have
- Roster input:
J5ProposeCrewInput/J5RequestCrewMemberInputinapps/server/src/j5/a2a/mcp/tools.ts:424/:436. - The roster card and addition card on web (web
src/j5), which already edit each seat's runtime and workspace. - The launch report waits until every seat has started or failed (
CrewLaunchReporter.ts, crews.md AC6). - A seat's first turn:
spawnFirstTurnText(spawnIds.ts). Delivery:DeliveryTransport.ts. - Seat state on the Fleet row and Captain expander: crews.md AC22.
Proposal
Each seat gets start: "now" | "when_called", defaulting to now. A when_called seat:
- is created on approval (its thread exists and it's on the roster), but gets no first turn;
- starts on the first message anyone sends it, or the first playbook step handed to it. That first turn is its normal first-turn text (crew context, instructions, brief, with the roster as it is at that moment), followed by the message;
- shows as "not started" on the Fleet row and the Captain's expander, which is different from idle.
Acceptance criteria
j5_propose_crewandj5_request_crew_memberacceptstartper seat, defaulting tonow. The roster and addition cards show it and let the person change it, and the preview binds it.- A
when_calledseat is created on approval and gets no turn until it's called. - The first message to it (from any participant) or the first playbook step delivered to it starts its first turn: the full first-turn text with the roster as of that moment, then the message. That message keeps its own envelope and any reply obligation.
- The launch report lists a
when_calledseat as created and waiting to be called, not as pending or unconfirmed, and doesn't wait on it. - The Fleet row and Captain expander count "not started" separately from idle, running, and failed.
- Stop, archive, settle, and unarchive treat a not-started seat like an idle one.
- A
when_calledseat added later is announced in Crews: tell existing seats when someone joins the crew #681's roster-changed notice, marked waiting, and a seat still waiting gets no roster notice of its own, since one would start its turn. Whichever of this and Crews: tell existing seats when someone joins the crew #681 lands second wires it. - The standing guidance tells Captains when to use it (seats that work later in the flow) in one sentence.
- The quoted tool descriptions in
agent-tools.mdstay as shipped until the code changes them, so this PR updates the shippedj5_propose_crewandj5_request_crew_memberdescriptions and their quoted copies together (EnvelopeFormatter.test.tscompares thej5_send_messageone). The field itself is already in the definitions. - Focused tests cover: launch with a mix of seats, first message wakes the seat with a current roster, playbook step wakes the seat, and the launch report.
Out of scope
- Scheduled or conditional starts ("start when the PR opens"). The Captain calls the seat, and that's the whole trigger.
Dependencies
- None blocking.
- If Crews: tell existing seats when someone joins the crew #681 lands first, a seat woken after an addition already reads the current roster, since its first turn is built at wake time.
Activity