Request a demo
Docs / Extending / Playbooks — durable team knowledge

Playbooks

Playbooks give the agent your team's conventions — markdown files that are added to the agent's context, either always, when a message looks relevant, or when you name them.

Playbooks vs Apps. A Playbook is a single markdown file the agent reads as context ("how we do X"). An App is a bundle with a form, a workflow and a version — what you scaffold with /app create and run with /app run or the headless insightworker app run <slug>. Playbooks shape how the agent works; Apps define what it runs end to end.

Where they live

ScopePath
Per-project (recommended)<project>/.insightworker/playbooks/<name>.md
Global (your machine)~/.insightworker/playbooks/<name>.md

The project folder is the directory you start insightworker from. Per-project files are usually committed to the project's git repo so the whole team gets the same agent behaviour. Run /init in the REPL to create the .insightworker/ folder, and /playbooks to list what is loaded.

What playbooks are good for

  • Team conventions — "we squash and rebase, never merge"
  • Domain rules — "for property submissions, always check the SOV against COPE data before quoting"
  • Reusable instructions — "when generating sprint digests, always use these sections in this order"
  • Mappings — "when a broker says 'Type IV construction', map to ISO Class 3"

Anatomy

---
name: email-style
description: email draft reply broker tone salutation sign-off
scope: auto
---

# Email style — property underwriting team

## Salutations
- External brokers: "Hi <FirstName>" (never "Dear")
- Internal teammates: first name only, no greeting line

## Tone
- Direct. No "I hope this email finds you well."
- Bullet point action items when there are two or more asks. Otherwise prose.

Frontmatter fields

FieldDescription
namePlaybook name. Defaults to the file name without .md.
descriptionShort description. For scope: auto its words are what get matched.
scopealways (default), auto or on-demand.

How a playbook is loaded

ScopeLoaded when
alwaysEvery message. This is the default if you leave scope out, so keep these files short.
autoAt least two words (longer than three letters) from the playbook's description appear in your message. Matching is case-insensitive.
on-demandYou write @playbook-name in your message.

If several playbooks qualify, all of them are loaded.

Playbooks vs memory

PlaybooksMemory
Authored byPeopleThe agent (via memory_write)
ScopeShared with the team through gitPer workspace, on one machine
Location.insightworker/playbooks/<workspace>/memory/
When to useConventions everyone should follow"Remember this for next time" details from a conversation

Both are plain markdown.

Examples

Code style playbook

---
description: code refactor lint format typescript style
scope: auto
---
# Code style
- TypeScript strict mode
- Prefer `const` over `let`; never `var`
- Named exports only
- Tests live next to source: `foo.ts` + `foo.test.ts`

Migration conventions, loaded by name

---
name: adw-migration
scope: on-demand
---
# Airflow → ADW migration conventions
When generating Oracle ADW SQL from Airflow DAGs:
- Use `MERGE INTO` for upserts (not Postgres `INSERT ... ON CONFLICT`)
- Schema names map: `prod_redshift.<x>` → `MIGRATED.<X>` (uppercase)

Use it with: convert this DAG, follow @adw-migration.

Versioning

Treat playbooks as code. Commit them to the project's git repo and review changes in pull requests.

See also