ptbk coder drives Claude Code, OpenAI Codex, Gemini CLI and other coding agents through a queue of plain-markdown prompts. It runs your tests after every task, commits what passes and pushes it. You do not have to be at the keyboard for any of it.
ptbk coder reads the PRD markdown files in prompts/ and works through them one at a time. You choose the harness and start the run. Come back to commits that already passed your tests, instead of a chat window full of questions.
No babysitting
Start the queue. Get back to your work.
Put your PRD markdown files in prompts/ and start a run. ptbk coder implements each task, runs the checks you configured, feeds every failure back to the agent, and commits before it moves to the next one.
No vendor lock-in
Keep your agent portable.
The behavior of the agent lives in a .book file you commit next to the code, not in one vendor prompt box. Change --harness and the same queue runs on Claude Code or OpenAI Codex. With opencode you point it at whatever provider you configured, local models included.
One source of truth
Let your PRD tell the truth.
When a task passes, ptbk coder writes its [x] into the PRD and puts that line in the same commit as the code it describes. Revert the commit and the checkbox goes back to [ ] together with the code.
From install to autopilot in five steps
1
Install Promptbook
ptbk coder ships with the ptbk package. Install it in your project (or globally with -g).
bash
$ npminstallptbk
2
Initialize your project
Creates the prompts/ queue, prompts/done/ archive, the default agents/developer.book persona, AGENTS.md project context, and the agent git identity entries in .env.
bash
$ ptbkcoderinit
3
Write your backlog as prompts
ptbk coder add writes one ready-to-run markdown file into prompts/ for you. Describe the task the same way you would prompt Claude Code or Codex, in plain language and as specific as you like. Pipe in a heredoc for longer descriptions, or run it with no arguments and type one interactively.
bash
$ ptbkcoderadd"Add a dark mode toggle to the settings page"
4
Run the queue
Pick a harness and let it work. It implements one prompt, verifies it, commits it, then starts the next one. Add --dry-run first if you only want to see what the queue would do.
bash
$ ptbkcoderrun--harnessclaude-code
5
Or keep it running as a server
ptbk coder server never stops. It watches prompts/ for new files and serves a Trello-style kanban board at localhost:4441, where you can follow progress and edit prompts in the browser.
Every run can carry an agent written in the Book language, Promptbook's human-readable language for defining AI agents. Its rules, its persona and what it knows live in one .book file, and ptbk coder compiles that file into the system message of every coding prompt.
ptbk coder init creates this default developer agent at agents/developer.book. Edit it like any other file in your repository to change how your agent codes.
readonly preview of agents/developer.book
📖
Bring the agent you already use
ptbk coder does not replace your coding agent. It drives it. Pick a harness with --harness, add a --model if you want one, and for the harnesses that support it a --thinking-level (low, medium, high, xhigh, max).
Claude Code
by Anthropic
--harness claude-code
The agentic CLI by Anthropic. ptbk coder drives it through your whole prompt queue, with thinking levels up to max.
The open-source terminal coding agent. Bring any provider configured in your opencode installation.
Uses the models configured in the harness itself.
bash
$ ptbkcoderrun--harnessopencode
Cline
by Cline Bot Inc.
--harness cline
The Cline CLI agent. Uses the models configured in your Cline setup.
Uses the models configured in the harness itself.
bash
$ ptbkcoderrun--harnesscline
Built for unattended coding
The agent writes the code. ptbk coder does the rest: it runs your tests, commits, pulls and pushes, paces the queue against your quota window, and gives you back control the moment you press P or X. That is what keeps a run going for hours without you.
Verified by your tests
Run any test command after each prompt. When it fails, ptbk coder hands the output back to the agent, which retries until the tests pass.
bash
$ ptbkcoderrun--harnessclaude-code--testnpmtest
Test before coding
Run the tests before the first coding prompt. Stop on failures that were already there, or let one repair prompt fix them before the backlog starts.
Every successful round lands under a git identity that belongs to the agent, GPG-signed if you set that up. You can always tell which commits it wrote.
bash
$ CODING_AGENT_GIT_NAME="PromptbookCodingAgent"
Autopilot git
Pull before prompts and push after commits, so a long-running queue stays in sync with your remote.
ptbk coder init, add, generate-boilerplates and verify all take the same --commit, --auto-push and --auto-pull switches. Setting up a project, queueing prompts and archiving finished ones leave no uncommitted work behind. Verify pulls and pushes around every single verification.
bash
$ ptbkcoderinit--auto-pull--commit--auto-push
Isolated worktrees
Implement every prompt in its own temporary git worktree with its own environment. Verified work lands back on your branch as one commit. If a task will not merge, ptbk coder marks it failed and keeps its worktree so you can look at it. Deeply nested repositories work on Windows too.
bash
$ ptbkcoderrun--harnessclaude-code--isolate
Kanban web UI
ptbk coder server keeps running after the queue is empty, watches for new prompt files and serves a Trello-style board where you can edit prompts in the browser.
bash
$ ptbkcoderserver--port4441--harnessclaude-code
Prompt priorities
Give prompts a priority and process only the range you want in the current run.
Wait a fixed wall-clock duration between prompts. The clock keeps running through a pause and through sleep, and errors retry after a cool-down. The terminal also shows every subscription window a harness reports, with its remaining allowance and reset time. Whenever S is offered it skips whatever the coder waits for right now, down to the harness session limit that would otherwise hold the run for hours.
Preview which prompts would run. No files touched, no tokens spent.
bash
$ ptbkcoderrun--dry-run
Ping before you queue
ptbk coder ping sends one tiny dummy prompt to a harness and model and reports the answer, the response time and the usage. Use it to check that a harness, model and login work before you queue anything. It also opens the hourly or weekly quota window early, so the quota is already refreshing by the time you need it. It touches nothing in your project.
Add --period and the ping repeats until you stop it with CTRL+C. One ping every 5h holds the Claude Code 5-hour limit window open, so a queue you start at any hour already has a refreshing window waiting for it. That costs a handful of tokens per ping instead of a run you have to babysit.
Confirm each prompt yourself with --no-auto. Press P to pause a running queue, or X to end it after the current prompt. Every press is answered in the Controls panel on the next frame, so you can tell that the key landed even when it changed nothing.
bash
$ ptbkcoderrun--harnessclaude-code--no-auto
Live status in the prompt file
A prompt turns from [ ] into [^] the moment the agent picks it up, and the line names the step that is running. It only becomes [x] after the work is implemented, verified and committed. ptbk coder never reverts a [^], so if the queue is killed or crashes you can see which task was left half-done.
A dirty working tree stops ptbk coder by default. --git-changes ignore starts anyway, and --git-changes continue resumes the one prompt left in [^] with its half-finished changes still in place. Any harness can take the work over, and the status line then names both the one that started and the one that finished it.
Every successful round writes the harness, model and thinking level into the prompt status line. Walk through completed prompts one by one, archive the finished ones to prompts/done/, and get a repair prompt appended for anything left incomplete. Pick the order with --order from-earliest, from-latest or random.
bash
$ ptbkcoderverify--orderfrom-latest
Many prompts per file
ptbk coder generate-boilerplates writes one prompt per file by default (--count 5*1). Use --count N*M to pack a whole backlog into fewer files: N files with M prompts each. A --- line separates the sections, every file carries one fresh emoji tag, and each section still runs as its own task.
bash
$ ptbkcodergenerate-boilerplates--count10*7
Not another agent. The layer above them.
Claude Code, OpenAI Codex and opencode are agents that ptbk coder drives, so you keep the one you already use. The table is not about who writes better code. It compares what happens around a task: whether the queue runs unattended, whether the agent definition moves to another vendor, and whether git history keeps the code and its done state together. Where all three behave the same, the table says so once instead of three times.
Capability
ptbk coderby Promptbook
Claude Codeby Anthropic
OpenAI Codexby OpenAI
opencodeby opencode
One task, side by sideSit in the terminal with the agent and steer a single task while it happens.
Not availableIt drives them instead
Built inWhat they are built for
The whole backlog, unattendedTask files go through the agent one after another: implement, verify, commit, next one.
Built inptbk coder run
Do it yourselfScript one session per task
Several agents on one backlogRun more harnesses and models at once, each taking its own slice of the queue.
Built in--min-priority --max-priority
Not availableNo shared queue
The same agent on another vendorThe queue and the .book behavior move to a different harness or model without a rewrite.
Built in--harness
Not availableOne of the harnesses
Do it yourselfAny provider, your config
Your tests gate every taskTests run before the queue starts and after every task, and failures go back to the agent until it is green.
Built in--test --test-before
Do it yourselfAsk for it, or wire a hook
Done state committed with the codeThe finished [x] lands in the same commit as the work it describes, so reverting takes both back.
Built inIn every commit
Do it yourselfTrack it by hand
Git kept in order around each taskCommits under the agent git identity, a pull before and a push after, and one throwaway worktree per task.
Built in--auto-pull --auto-push --isolate
Do it yourselfIt commits as you, when asked
Long runs that outlast a quota windowPacing between tasks, a cool-down retry after an error, and a ping that keeps the quota window refreshing.
Built in--wait-between-prompts
Not availableNo queue to pace
A backlog you can watch and refillA kanban board over the prompt files while the queue runs, with commands that write new ones and archive the finished.
Built inptbk coder server
Not availableNo backlog to show
Built inBuilt in, one option or command away
Do it yourselfReachable, but you script and maintain it yourself
Not availableNo such concept in the tool
Inside a single task nothing changes. ptbk coder runs your harness as it is, with its own tools, its own sandbox and its own MCP servers. The features above explain every capability in this table in detail.