Repository navigation
Open
Labels
enhancementNew feature or request
Description
Item 7 of 9 in the Playbooks v2: one owner, flexible staffing milestone. It needs #788 and #790, plus Personas #781 (who picked sets the limits), #778 (the ordered model list), and #782 (reviewers prefer a different model).
The problem
A step's persona: is only a hint today. A missing or disabled persona is a warning in Settings, and a Crew built from the playbook gets a stand-in seat for it. If I write a playbook whose review step names my Reviewer persona, I want the Reviewer to do it, not whatever agent happened to be around.
Where this sits
This is section 3 of the Playbooks proposal (26 October), "Required personas":
- A step's
persona:means the step requires that saved persona. A step that just needs some kind of expertise says so in its prompt. - On handoff, the platform checks that the named participant runs that persona. A required persona is never replaced by a custom worker, a stand-in, or the owner.
- It follows the persona rules from Personas v2: the ordered model list, access, reviewer independence, and escalation.
- When the run starts, every required persona is checked against what the agent plans. One that can't run is reported before step 1. One that would be limited as an agent pick goes to me as one question. My answer counts as a person's pick of that persona for the rest of the run.
- Saving or starting a playbook doesn't count as a person's pick by itself.
This replaces my earlier ruling that a missing persona gets a stand-in seat (docs/j5/product/features/playbooks.md:58).
What we already have
- The schema.
personais optional on a step (packages/contracts/src/j5/playbook.ts:38-44). The warning codespersona_missing,persona_disabled, andpersona_unverifiedare at:78-84. - Warnings. Computed in
PlaybookStore.ts:66-84(stepPersonaWarnings) and:338-357, where an unreadable catalog becomespersona_unverified. They're attached indiscover(:386-395) andreadPath(:461), not in start (:561-630). They're shown only in Settings (PlaybookLibrarySettings.tsx:290-296). - Persona problems.
personaCatalogProblemreturns only"missing" | "disabled"(apps/server/src/j5/agents/agentPersonaLibrary.ts:83-94). One bad persona file or duplicate id fails the whole catalog (:255-263), so "invalid" can't be reported per persona today. - Availability. It's available, or unavailable with
routes-unavailable | authority-not-enforceable | disabled | removed(packages/contracts/src/j5/agentPersona.ts:136-153).j5_list_personasmaps that to available, disabled, or blocked (handlers.ts:791-830). - Which persona a thread runs.
thread.agentPersonaAssignment(packages/contracts/src/orchestrationV2.ts:370) is the immutable launch record (agentPersona.ts:88-100). A Crew seat's persona isAgentCrewMember.agentId, null for a custom seat (AgentCrewInstanceService.ts:17-18). - Crew persona swaps. These are advisory today (
apps/server/src/j5/a2a/crewPlaybookPlan.ts:97-103, shown atapps/web/src/j5/crew/crewPlaybookPlan.ts:36-44andCrewProposalCard.tsx:207). Playbooks: the owner hands each step to someone #788 removes them. - Pick source and the access cap. They don't exist yet. Personas: agents pick personas, and who picked sets the limits #781 adds them and replaces the "no parent-child permission ceiling" ruling in
SpawnAgentService.ts:136-143. Reviewer independence is Personas: reviewers prefer a different model from the author #782. This issue uses the one service method Personas: agents pick personas, and who picked sets the limits #781 introduces rather than adding its own check. - Timing. A move commits in
PlaybookStore.mutate(:716-726) before the relay hands off (PlaybookCrewRelay.ts:307-330). Playbooks: the owner hands each step to someone #788 moves the assignee check into the same transaction, and this check belongs there too.
Proposal
- On a move. The assignee check from Playbooks: the owner hands each step to someone #788 also compares the step's required persona with the holder's
agentPersonaAssignment, or the owner's when nobody is named. - On start.
j5_playbook_startreturns each required persona's status: available, limited as an agent pick (with what's limited), or unavailable (with the reason). - The question. When any persona is limited, the platform opens one request from the owner's thread, using Playbooks: approval checkpoints #790's request machinery, naming each one and what approving lifts. Approving records a person's pick on the run for each persona it names.
- Person picks. Personas: agents pick personas, and who picked sets the limits #781's pick check treats a spawn of that persona by the run's owner during the run as a person's pick.
Acceptance criteria
- Handing a step that requires a persona to an assignee that doesn't run it is refused, and the run doesn't move.
- Moving onto such a step with no assignee is refused unless the owner runs that persona. The owner, a custom worker, or a stand-in never takes a required persona's step.
-
j5_playbook_startreports each required persona's status before step 1:- available;
- limited as an agent pick, with which models fall off the eligibility list or which access is above the caller's;
- unavailable, because it's disabled, removed, its models are exhausted, or the catalog can't be read (then every required persona counts as unavailable, with the catalog error).
The run still starts. An unavailable persona's step can't be handed off until it's fixed.
- When any required persona is limited, start opens one request covering all of them. Approving records a person's pick on the run for each. Until it's answered, spawns of those personas stay agent picks.
- Within that run, the owner's spawns of an approved persona through
j5_spawn_agent,delegate_task, and Crew launches and additions count as person picks under Personas: agents pick personas, and who picked sets the limits #781's rules. Runs and owners other than this one aren't affected. - Saving or starting a playbook doesn't count as a person's pick by itself. An approved Crew roster still does. Auto-approved rosters and Captain additions remain agent picks.
- Requiring a reviewer persona doesn't waive Personas: reviewers prefer a different model from the author #782's independence check.
- Existing playbooks that name personas are held to these rules with no migration. Settings shows a missing or disabled persona as "required persona missing" or "required persona disabled", not as an advisory warning.
- Focused tests cover:
- a handoff refused for the wrong persona;
- an unassigned move refused when the owner doesn't run the persona, and allowed when it does;
- start's three statuses;
- an approved start question lifting the limits for this run only;
- independence still enforced.
-
docs/j5/product/features/playbooks.mdis rewritten where it describes step personas and stand-ins, and gets AC for the requirement and the start check.docs/j5/user/playbooks.mdandpersonas.mdsay whatpersona:on a step means.
Out of scope
- Escalating a blocked persona and "Allow this once". That's Personas Personas: a blocked persona escalates, and I can allow it once #785, and it works here unchanged.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Activity
[-]Playbooks: progress shows the current step[/-][+]Playbooks: a step's persona is required[/+]