Ruby uses a playbook architecture - structured, transactional processes with explicit state management.
Same thing, different perspective:
- Skill: Claude Code term (SKILL.md file)
- Playbook: Business term ("run the content playbook")
| Level | Keyword | Runs When | Human Role |
|---|---|---|---|
| Autonomous | autonomous |
On schedule | None |
| Gated | gated |
Schedule/trigger, pauses at gates | Approve at checkpoints |
| Manual | manual |
Only when invoked | Full control |
ORCHESTRATOR PLAYBOOKS (top-level processes)
|- Call worker playbooks in sequence
|- Define approval gates
|- Track overall progress
'- Run on schedule or manually
WORKER PLAYBOOKS (atomic operations)
|- Do one thing well
|- Called by orchestrators
|- No scheduling, no gates
'- Return success/failure
Every playbook behaves like a database transaction:
READ STATE -> PROCESS -> WRITE STATE
Every playbook must declare what it reads and writes:
| Source | Location | Read | Write | Description |
|---|---|---|---|---|
| Library | content_library.yaml |
Y | Y | Content tracking |
| Schedule | schedule.json |
Y | Y | Post scheduling |
| Drafts | Articles/drafts/ |
Y | New articles |
- Read fresh at start - never rely on stale context
- Write explicitly at end - document every state change
- Document recovery - what to do if playbook fails mid-run
---
name: playbook-name
description: When to use (triggers Claude's skill loading)
automation: gated # autonomous | gated | manual
schedule: "0 9 * * 1" # cron (optional)
calls: [child-skill-1, child-skill-2] # dependencies
allowed-tools: [Read, Write, Bash]
---
# Playbook Name
## Purpose
One sentence describing the outcome.
## State Dependencies
| Source | Location | Read | Write | Description |
|--------|----------|------|-------|-------------|
## Process
### Step 1: Read Current State
[Always first - read all state dependencies fresh]
### Step 2-N: [Actions]
[APPROVAL GATE] markers where human input needed
### Step N: Write Updated State
[Always last - save all changes]
## Completion Checklist
- [ ] State read fresh
- [ ] [Task-specific items]
- [ ] State written
- [ ] Changes committed (if applicable)/weekly-content-cycle [ORCHESTRATOR - scheduled]
|
|- /content-library [worker] check status
|
|- /create-article [GATED]
| |- /knowledge-base-query [worker]
| '- /tone-of-voice [worker]
|
|- /repurpose [GATED]
| '- /content-pillar-tagger [worker]
|
'- /schedule-week [GATED]
'- /schedule-post [worker]
/create-video [GATED - needs scene approval]
|- /create-veo-video [worker]
|- /edit-video [GATED - needs edit approval]
| |- /analyze-video [worker]
| '- /insert-broll [worker]
'- /upload-media [worker]
/daily-twitter-cycle [ORCHESTRATOR - scheduled]
|- /find-viral-replies [worker]
|- /reply-to-mentions [worker]
'- /post-queued-replies [GATED - needs reply approval]
Use [APPROVAL GATE] markers in gated playbooks:
### Step 3: Review Generated Content
[APPROVAL GATE] - Review article before proceeding
Present to user:
- Article title
- Key points
- Word count
Wait for: Approve / Request changes / AbortGate placement:
- Before irreversible actions (publish, send, delete)
- After AI generation, before use
- At major phase transitions
Playbooks can declare schedules in frontmatter:
schedule: "0 9 * * 1" # Every Monday 9amCommon patterns:
0 9 * * *- Daily 9am0 9 * * 1- Weekly Monday 9am0 9 1 * *- Monthly 1st at 9am*/30 * * * *- Every 30 minutes
When deployed to an orchestration platform, these schedules are read and executed automatically. Locally, run manually.
| File | Purpose | Updated By |
|---|---|---|
content_library.yaml |
Article/video workflow | /content-library |
schedule.json |
Social post scheduling | /schedule-tracker |
twitter_replies.txt |
Reply queue | /find-viral-replies |
reply_queue.json |
Pending replies | /post-queued-replies |
To create a new skill:
- Create directory:
.claude/skills/my-skill/ - Create
SKILL.mdwith frontmatter and playbook structure - Add
automation:level to frontmatter - Add
## State Dependenciestable - Add "Read Current State" as Step 1
- Add "Write Updated State" as final step
- Add
## Completion Checklist - Mark
[APPROVAL GATE]where needed - Add
calls:for child skills - Reference in CLAUDE.md skills table
---
name: my-skill
description: Short description that triggers skill loading
automation: gated
calls: []
allowed-tools: [Read, Write, Bash]
---
# My Skill
## Purpose
What this skill accomplishes in one sentence.
## State Dependencies
| Source | Location | Read | Write | Description |
|--------|----------|------|-------|-------------|
| Schedule | `.claude/memory/schedule.json` | Y | Y | Post tracking |
## Process
### Step 1: Read Current State
Read schedule.json and any other state files.
### Step 2: Do The Thing
[APPROVAL GATE] - Present results for review
### Step 3: Write Updated State
Update schedule.json with changes.
## Completion Checklist
- [ ] State read fresh
- [ ] Task completed
- [ ] State written
- [ ] User notified