Repository navigation
Description
Item 8 of 9 in the Playbooks v2: one owner, flexible staffing milestone. It lands last, after #787, #788, #789, #790, and #792, because it describes their tools.
The problem
Most of the new model is the owner's judgment, so agents have to be told how it works. The guidance they get today describes the old model: building a Crew from a playbook, one seat per persona, stand-ins, and "a playbook named in passing is not a request". It also never lets an agent pick up a playbook that clearly fits what I asked for.
Where this sits
This is section 1 (choosing an arrangement), section 6 ("Starting a run"), the "ask first" part of section 7, the "stop what you assigned" part of section 9, and section 10 ("Completion") of the Playbooks proposal (26 October). It supersedes my #387 ruling that a playbook named in passing isn't a request, for conversations only.
What we already have
- Every instruction string about playbooks is in
packages/provider-core/src/j5/playbookInstructions.ts:PLAYBOOK_MENTION_INSTRUCTIONS(:4)PLAYBOOK_CREW_INSTRUCTIONS(:8-9), which has the "named in passing … is not a request" rule, pinned byplaybookInstructions.test.ts:18PLAYBOOK_INSTRUCTIONS(:11-18), which says "a playbook never spawns agents itself: a Crew follows one only when its Captain proposes it" and has the Captain delivery bullet
- Where they're injected. They're embedded in
j5/orchestrationInstructions.ts:31-32and re-exported asT3_CODE_ORCHESTRATION_INSTRUCTIONS(provider-core/src/server/orchestrationInstructions.ts:7). Thedelegate_task, Peer Agent, and Crew sections are in the same file at:19-23.- Codex gets them as developer instructions (
apps/server/src/provider/CodexDeveloperInstructions.ts:208). - Claude gets them appended to the system prompt (
ClaudeAdapterV2.ts:1171). - Cursor gets them prepended to the first user prompt (
packages/provider-cursor/src/server/adapter.ts:2141). - ACP, OpenCode, and Pi get them too.
- Codex gets them as developer instructions (
- Tool descriptions:
playbooks/mcp.ts:53-127.j5_playbook_startsays "never spawns or stops agents" and has a Captain andcrew_instance_idsentence (:84).j5_propose_crew(tools.ts:563) andj5_stop_agent(:568-569, which takesparticipant_id)delegate_task(agents/agentDelegation.ts:39-40)
- Other text agents get. The seat first-turn block (
spawnIds.ts:147), the launch prose (crewGateNotice.ts:203-206), the step notice tail (crewStepNotice.ts:36), and the/playbook NAMEcomposer command, which becomes "Start playbook NAME" (packages/client-runtime/src/j5/playbooks.ts:205-219). Mention parsing is inpackages/shared/src/j5/playbookMention.ts. - Scheduled tasks. A task's prompt is dispatched as-is (
ScheduledTaskService.ts:736-777).scheduledTaskIdtravels only as message metadata (ProviderTurnStartService.ts:1305), and nothing tells the agent the turn is scheduled. So the scheduled-task rule has to be enforced by the start tool, not left to guidance.
Proposal
- Replace
PLAYBOOK_CREW_INSTRUCTIONSand the Crew lines inPLAYBOOK_INSTRUCTIONSwith one owner section, instead of adding to them. j5_playbook_startrefuses a start in a turn that came from a scheduled task, unless that task's prompt names the playbook by@playbook:mention or by name.
Acceptance criteria
Starting
- In a person's conversation, the agent may start a saved playbook that clearly fits the request. It says which one it's using. It asks first when the fit is unclear, or when more than one could fit.
- A turn started by a scheduled task can start a playbook only when the task's prompt names it.
j5_playbook_startrefuses otherwise, with a reason the agent can report. - The agent asks only for missing information the conversation doesn't already supply. Choosing a playbook doesn't widen the assignment's scope or waive its approvals.
Working
- The guidance describes the three arrangements (work directly,
delegate_tasksubagents, a Crew) and says the owner can switch mid-run without restarting completed work. - It says how to hand a step to someone, how the holder reports back, and that only the owner advances (Playbooks: the owner hands each step to someone #788).
- It says to ask before skipping, reordering, or replacing required steps, removing a required persona, or bypassing a checkpoint, and to revise the run's copy only after I ask or approve (Playbooks: revise an active run's procedure #787). It may judge an "if applicable" step, and it records why it skipped one.
- On cancel, it stops anything else it assigned for the run with
j5_stop_agent, and reports any worker the platform couldn't stop (Playbooks: cancelling stops the step holder, and archiving a Crew keeps the run #789).
Finishing
- The owner completes the run only once every required outcome and checkpoint is satisfied. The final reply gives the result, the relevant verification, and any remaining limitations. Unresolved required work is reported as a blocker, never as complete.
Cleanup
-
PLAYBOOK_CREW_INSTRUCTIONS, the "named in passing" rule, the Captain delivery bullet, the Crew-from-playbook launch prose, and the "report back to your Captain" tail are replaced or removed. The tool descriptions inplaybooks/mcp.tsandj5_propose_crewmatch. - Checked once with a Codex, a Claude, and a Cursor owner: a playbook that fits is started and named; an unclear fit is asked about; a scheduled task that doesn't name a playbook doesn't start one; and a run is completed with its result and verification.
- Focused tests cover the scheduled-task refusal and the replaced instruction text.
-
docs/j5/product/features/playbooks.md(the opening of the Definition, and the feat(crews): a crew request that mentions @playbook: builds the playbook's Crew #387 history line) and the starting section ofdocs/j5/user/playbooks.mdare rewritten.
Out of scope
- The Playbook Author persona's instructions. Those are Playbooks: only Owners save, and a library copy overrides a team folder #794.
Activity
[-]Playbooks: a step's persona is required[/-][+]Playbooks: owner guidance for starting, working, and finishing[/+]Check only the scheduled task that started this turn (#793)