Skip to content
Randy Northrup edited this page Nov 19, 2026 · 2 revisions

Agent Playbook

Agent Playbook is a skill folder for AI coding agents (Claude Code, Codex, or any agent that can read files and run commands). It keeps a repeatable operation, such as posting and replying for your own open-source project, as a playbook of step-by-step flows. You see and edit the flows on a local canvas in your browser. The agent reads the same files through a small command line and follows them.

Change a step on the canvas and the agent does it your way on the next run. No retraining, no prompt to keep in sync, no rule hidden in an agent's memory.

Who it is for

Developers who want an agent to do the same job many times, the same way, with guard rails they can read and change. You should be comfortable with Python and a terminal. You don't need to know anything about this tool yet.

The 60-second picture

 you ── edit on the canvas ──►  playbook files  ◄── pb.py show / catalog ── agent
                                (flows, accounts,                            │
                                 folders, parts)                             ▼
                                                              run.py checklist (one per job)
                                                                             │
                                                     draft ──► qc.py check ──┤ BLOCK: fix the draft
                                                                             │ ASK: answer with evidence
                                                                             ▼
                                                     send ──► audit.py add ──► audit log ──► History view
  • Flows are the instructions. Each flow is one JSON file with typed nodes (start, step, decision, QC check, rule, tool, gotcha, result, go to flow, account) and connections. python playbook/pb.py show <flow> prints a flow as an outline the agent follows.
  • Recipes map a kind of job ("reply run", "announce a release") to a checklist. scripts/run.py opens the checklist; every step ends done with evidence or skipped with a reason, and the run can't close while a step is open.
  • The QC gate checks every draft before it is sent. Filters are data in playbook/qc/filters.json, each with examples it must catch and examples it must pass.
  • The audit log records everything sent. audit.py add refuses text that never passed QC.
  • Safe editing: every save is checked against a schema, the old version is kept, deletes need a reason, and a save based on an old revision is refused instead of overwriting someone else's change.

The engine and the helper scripts use the Python standard library only (Python 3.8 or newer). The shipped playbook is the demo: a fictional open-source notes app called Acme Notes, with reply passes on X, Bluesky and Reddit, original posts, release announcements and art. You replace it with your own.

The canvas showing the "Change the playbook" flow

Read in this order

  1. Installation: requirements, clone, setup check, installing it as a skill.
  2. Quick start: open the canvas, read the demo, run a checklist end to end on a throwaway copy.
  3. The canvas: every view, shortcuts, versions, conflicts, the read-only export.
  4. Flows and nodes: the document model, node kinds, limits and lint rules.
  5. Parts, accounts and folders: the three shared libraries.
  6. Recipes and run checklists: recipes, run.py, carry-over, a Stop hook.
  7. QC gate: severities, every filter type, receipts, writing your own filter.
  8. Audit log: entries, statuses, pacing, reports.
  9. Make it yours: replace the demo with your own accounts, project and rules.
  10. CLI reference: every subcommand of pb.py, qc.py, audit.py and run.py.
  11. Scripts and media tools: the helpers, what they need, environment variables.
  12. Security and privacy: the local server, what to commit, responsible use.
  13. Troubleshooting
  14. FAQ

Conventions on this wiki

  • Commands are run from the skill folder: the inner agent-playbook/ folder of the clone, the one that holds SKILL.md. That is also where an agent runs them (SKILL.md says so).
  • Every command works in bash, zsh and PowerShell unless a page shows separate versions.
  • Exit codes for pb.py, qc.py, audit.py and run.py: 0 done, 1 refused or failed (the reason is on stderr), 2 the command line was wrong. A few commands use 1 or 2 for a specific answer; the CLI reference lists them.

Clone this wiki locally