What are Playbooks?
Playbooks are reusable Auto Run configurations that define a sequence of markdown documents with tasks for AI agents to execute. They enable you to:- Automate repetitive workflows across projects
- Create looping task sequences for continuous integration
- Share workflows with your team
- Build complex multi-document automation pipelines
Playbook Structure
A playbook consists of:Playbook Data Model
Playbooks are stored as JSON files in~/.config/maestro/playbooks/ (or equivalent on your platform):
Creating a Basic Playbook
Configure the run
- Open the Auto Run tab (
Cmd+Shift+1) - Click Run to open the configuration modal
- Click + Add Docs to add documents to the queue
- Drag documents to reorder them
- Configure per-document options:
- Reset on Completion - Creates working copies instead of modifying originals
- Duplicate - Add the same document multiple times
Playbook Configuration Options
Loop Mode
Enable Loop Mode to cycle back to the first document after completing the last one:Reset on Completion
When enabled for a document:- Creates a working copy in
Runs/subfolder - Original document is never modified
- Working copies serve as audit logs (e.g.,
TASK-1735192800000-loop-1.md) - Critical for looping playbooks to maintain clean state each iteration
Each task executes in a completely fresh AI session with its own unique session ID. No conversation history bleeds between tasks, ensuring predictable behavior across loop iterations.
Custom Prompts
The prompt is prepended to each task when sent to the AI agent. Use template variables for dynamic content:Advanced Patterns
Multi-Phase Workflows
Organize documents by phase for complex projects:Worktree Integration
Dispatch playbooks to git worktrees for isolated execution:Configure worktree
- Base Branch: Branch to base the worktree on (e.g.,
main) - Worktree Branch Name: Name for the new branch
- Automatically create PR: Opens a PR when the run completes
Example Worktree Settings
Playbook Management
Loading Playbooks
- Open the Auto Run panel
- Click the Load Playbook dropdown
- Select a saved playbook
- Configuration is loaded (documents, loop settings, prompt)
Updating Playbooks
After loading a playbook:- Modify documents, order, or settings
- Click Update Playbook to save changes
- Or click Discard Changes to revert to saved version
Sharing Playbooks
Playbooks are stored per-session in:- Locate the playbook JSON file
- Copy to another agent’s playbook directory
- Or use the Playbook Exchange for community playbooks
Using the Inline Wizard
Generate playbooks from conversational descriptions:Describe your project
Have a natural conversation about your goals:
“I want to build a REST API for user management with authentication, CRUD operations, and rate limiting.”
Build confidence
Watch the confidence gauge build as the AI understands requirements (80%+ triggers generation)
src/prompts/wizard-inline-new.md- Initial conversationsrc/prompts/wizard-inline-iterate.md- Refining requirementssrc/prompts/wizard-document-generation.md- Document creation
Playbook Best Practices
Keep tasks atomic
Keep tasks atomic
Each checkbox should be a single, verifiable action. Avoid compound tasks like “Implement authentication and add tests” — split into two checkboxes.
Use descriptive names
Use descriptive names
Name playbooks clearly: “Weekly Security Audit” instead of “Audit” or “Security Workflow v2” instead of “v2”.
Enable reset for loops
Enable reset for loops
Always use Reset on Completion for documents in looping playbooks to maintain clean state.
Test before looping
Test before looping
Run a playbook once in non-loop mode to verify all tasks work correctly before enabling loop mode.
Use template variables
Use template variables
Make prompts dynamic with
{{DATE}}, {{GIT_BRANCH}}, {{AGENT_PATH}} for context-aware execution.Troubleshooting
Playbook not appearing in dropdown Playbooks are session-specific. Ensure you’re viewing the dropdown in the correct agent session. Tasks not completing Check that checkboxes use the correct markdown syntax:- [ ] with a space between brackets.
Working copies not created
Verify “Reset on Completion” is enabled for the document and the Runs/ subfolder has write permissions.
Worktree creation fails
Ensure:
- Your project is a git repository
- The base branch exists
- The worktree branch name is valid (no spaces or special characters)
- You have write permissions in the project directory
Related Documentation
- Auto Run + Playbooks - Complete Auto Run guide
- Playbook Exchange - Community playbooks
- Slash Commands - Template variables reference
- Git Worktrees - Worktree integration details