Repository navigation
Home
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.
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.
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.pyopens 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 addrefuses 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.

- Installation: requirements, clone, setup check, installing it as a skill.
- Quick start: open the canvas, read the demo, run a checklist end to end on a throwaway copy.
- The canvas: every view, shortcuts, versions, conflicts, the read-only export.
- Flows and nodes: the document model, node kinds, limits and lint rules.
- Parts, accounts and folders: the three shared libraries.
-
Recipes and run checklists: recipes,
run.py, carry-over, a Stop hook. - QC gate: severities, every filter type, receipts, writing your own filter.
- Audit log: entries, statuses, pacing, reports.
- Make it yours: replace the demo with your own accounts, project and rules.
-
CLI reference: every subcommand of
pb.py,qc.py,audit.pyandrun.py. - Scripts and media tools: the helpers, what they need, environment variables.
- Security and privacy: the local server, what to commit, responsible use.
- Troubleshooting
- FAQ
- Commands are run from the skill folder: the inner
agent-playbook/folder of the clone, the one that holdsSKILL.md. That is also where an agent runs them (SKILL.mdsays so). - Every command works in bash, zsh and PowerShell unless a page shows separate versions.
- Exit codes for
pb.py,qc.py,audit.pyandrun.py:0done,1refused or failed (the reason is on stderr),2the command line was wrong. A few commands use1or2for a specific answer; the CLI reference lists them.
Agent Playbook is released under the MIT licence. Source: github.com/RandyNorthrup/agent-playbook