Skip to content

Playbooks: approval checkpoints #790

Open

Description

@bryantderosier

Item 5 of 9 in the Playbooks v2: one owner, flexible staffing milestone. It needs #795 and Crews #747 (one request in the Inbox and the Captain's chat).

The problem

Some steps need my sign-off before the work moves on, like "show me the plan before you build it". Today all a playbook can do is say so in the prompt and hope the agent stops. Nothing stops it from advancing anyway, and there's no clear place for me to answer.

Where this sits

This is section 4 of the Playbooks proposal (26 October), "Required outcomes and approval checkpoints":

  • A step can be marked approval: required.
  • The platform refuses to move past it until a person answers its request.
  • The request is the single Crew-style request from Crews Crews: one adjudication request in the Inbox and the Captain's chat #747, shown in both the Inbox and the owner's chat, and answering it in one place clears it in the other.
  • An Owner or a Collaborator can approve. A Viewer can't.
  • A task-specific "show me first" stays an instruction to the agent.

What we already have

  • The step schema and validation. packages/contracts/src/j5/playbook.ts:39-44 and apps/server/src/j5/playbooks/definition.ts:26-49. PlaybookStep is a plain struct, so as far as we know an older server drops an unknown approval: key silently.
  • Editing. Settings has no step editor, only a YAML import textarea (PlaybookLibrarySettings.tsx:643,690-717) and a read-only steps dialog (:502-504). Conversational authoring gets its YAML rules from PLAYBOOK_AUTHOR_INSTRUCTIONS (packages/client-runtime/src/j5/playbooks.ts:28-49), with web PlaybookConversationDialog.tsx and mobile PlaybookConversationModal.tsx.
  • Where a checkpoint would block a move. PlaybookStore.mutate (:653-735), which covers next, back, and complete.
  • Where an open request must close. The cancel paths: mutate cancel (:691), cancelOrphans (:223), and owner archive (Playbooks: cancelling stops the step holder, and archiving a Crew keeps the run #789).
  • Asking a person.
    • SendService.ts:1009-1147 requires expect_reply and an urgency for a human, and the agent is always the sender.
    • The Inbox only lists agent-to-person exchanges with an agent sender (HumanInboxService.ts:194-212), so the checkpoint request should be sent from the owner's thread.
  • Answering.
    • HumanInboxService.ts:269-419. The answer is allowed only if the person can write to the asking thread (writerOfAskers, :176-185), so a Viewer is refused (:149-152).
    • The RPCs need orchestration:operate (packages/contracts/src/j5/clientRpcPermissions.ts:54-55), which Owners and Collaborators hold (levels.ts:65-79), plus a per-thread write check (clientActionRpc.ts:150-180, connectionWriter.ts:69-87).
  • Change feeds. ReadChangeFeeds.ts:39-65 carries the inbox, and :114 carries the playbook store revision.
  • A precedent for one request in two places. CrewRuntimeRequestService.ts (doc comment around :94-101): one pending request answered by the same respond call from the Inbox or the composer. Crews: one adjudication request in the Inbox and the Captain's chat #747 builds the card in the owner's chat.

Proposal

  • Add an optional approval: required field on a step.
  • When the owner first tries to move past a checkpoint step (j5_playbook_next, or j5_playbook_complete on the last step), the move is refused with approval_pending, and the platform opens one request from the owner's thread. It carries the step's title and a summary the owner passes in, which says what to approve.
    • It opens on the attempt to leave the step, not on arrival, so I approve finished work rather than a step that hasn't started.
  • The request has Approve and Decline actions, with an optional reason on Decline. It uses the Crews: one adjudication request in the Inbox and the Captain's chat #747 card in the owner's chat and the matching Inbox item.
  • The run records the open request. Once it's approved, the next move past the step succeeds.

Acceptance criteria

  • A step can be marked approval: required in YAML and through conversational authoring, and the read-only steps dialog shows it. Validation rejects any other value.
  • Moving past a checkpoint step, by j5_playbook_next or by completing on it, is refused until a person approves. The first refused attempt opens the request; later attempts don't open another while one is open.
  • The request shows in the Inbox and as a card in the owner's chat, using Crews: one adjudication request in the Inbox and the Captain's chat #747's design. Answering in either place closes it in both, on every device, without a reload.
  • An Owner or a Collaborator can approve or decline. A Viewer sees it but can't answer. A second answer is refused with the existing "already answered" message.
  • Approving lets the next move past the step succeed. Declining keeps the run on the step, and the owner gets the reason in its next turn.
  • The open request and its result survive compaction, restart, and "continue", and j5_playbook_current reports them.
  • Cancelling the run, or archiving or deleting the owner's thread, closes its open checkpoint request.
  • Going back onto a checkpoint that was already approved asks again before moving past it.
  • A checkpoint doesn't replace Crew approval, persona selection, or tool approval rules. They all still apply.
  • Focused tests cover: a refused move that opens the request; approval by an Owner and by a Collaborator; a Viewer refused; decline with a reason; completion blocked on a last-step checkpoint; cancel closing the request; and going back onto an approved checkpoint.
  • docs/j5/product/features/playbooks.md gets an AC for checkpoints, and the Definition's "no platform-owned automation" line still holds. docs/j5/user/playbooks.md explains the field and who can approve.

Surfaces

The Inbox and the owner's chat on web and desktop. There's no J5 Inbox on mobile, so mobile shows the state through the progress bar (#791). Remote and relay connections are covered through the existing read-change feeds. Agents reach checkpoints only through the refused move.

Out of scope

Activity

  1. added
    enhancement
    on Oct 29, 2026
  2. changed the title [-]Playbooks: cancelling stops the step holder, and archiving a Crew keeps the run[/-] [+]Playbooks: approval checkpoints[/+] on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancement

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions