Skip to content

Playbook steps name the persona that does them #319

Closed

Description

@bryantderosier

My rule: a playbook step can name the persona that does it, and that name is data the tools return, not prose the Captain has to guess from. A step with no persona is staffed by the Captain's judgment.

Where it stands today:

  • A step is only { id, title, prompt } (packages/contracts/src/j5/playbook.ts → PlaybookStep). The decoder strips unknown keys, so a persona: line in the YAML silently disappears.
  • playbook_list returns step titles only (PlaybookDiscovery). The only way an agent reads the prompts is to playbook_start a run or open the YAML with file tools, so a Captain can't plan a Crew from a playbook without starting it in its own thread first.
  • Playbook Author (packages/client-runtime/src/j5/playbooks.ts → PLAYBOOK_AUTHOR_INSTRUCTIONS) only knows id, title, and prompt.

What should change:

  • Schema: PlaybookStep gains optional persona, a persona id from the library. Absent means "any seat".
  • Discovery: playbook_list returns each step's persona. A step naming a persona that isn't in the library, or is disabled, is still a valid definition, but the entry carries a non-blocking warning naming the step and the persona, so authors see it in Settings and Captains see it before proposing. Warnings are a new warnings list on the entry, separate from issue: both Settings screens disable starting and renaming whenever issue is set, so a warning must never go there. "Missing or disabled" is decided by the same persona catalog and enabled check propose_crew already uses (CrewProposalService), so the warning and the proposal refusal can't disagree.
  • Read without starting: a read-only playbook_read(name) returns the full live definition (steps with prompts and personas) without creating a run. It takes the same name playbook_start does (kebab-case since fix(playbooks): kebab-case names so /playbook keeps the name when text follows it #379) and returns the same warnings. Mark it read-only like playbook_list and add it to J5_PREAPPROVED_TOOLS in apps/server/src/j5/a2a/mcp/j5ToolPreapproval.ts, which both the Claude and Codex adapters already spread.
  • Step responses: playbook_current, playbook_next, playbook_back, and playbook_reselect include the current step's persona.
  • Playbook Author: its instructions explain persona, tell it to call list_personas before writing one, and to leave it off steps the user doesn't assign.
  • Library settings: web (PlaybookLibrarySettings.tsx) and mobile (PlaybookLibrarySettingsScreen.tsx) show each step's persona and the missing/disabled warning.
  • Docs: the example and step description in docs/user/playbooks.md, and PLAYBOOK_INSTRUCTIONS.

Tests to ship:

  • a step with persona decodes and comes back from playbook_list, playbook_read, and the step tools
  • a definition without persona behaves exactly as today
  • a missing or disabled persona produces the warning and doesn't mark the definition invalid
  • playbook_read creates no run and leaves an active run's pointer untouched

Done when a Captain can read which persona every step wants, with the prompts, without starting a run.

Out of scope: several personas per step with per-persona prompt blocks (the "per-Role blocks" in docs/j5/product/features/playbooks.md). One persona per step for this milestone.

Upstream footprint: all source changes are in J5-owned files (packages/contracts/src/j5/, apps/server/src/j5/, apps/web/src/j5/, apps/mobile/src/j5/, packages/client-runtime/src/j5/). The only upstream line is adding playbook_read to the exact tool inventory in apps/server/src/mcp/toolkits/worktree/registration.test.ts, which FORK.md's ledger row (cases 4 and 45) already covers.

Used by #320, #321, and #323.

Activity

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

Metadata

Metadata

Labels

size:M

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions