---
source: CrewKit documentation
url: https://crewkit.io/docs/playbooks.md
title: "Playbooks"
description: "Team conventions and standards that guide AI behavior."
---


Playbooks are collections of conventions — team standards that guide how AI assistants work in your projects. They enforce patterns like "always use MiniTest" or "follow RESTful routing."

---

## How playbooks work

1. **Platform playbooks** are published by crewkit for common frameworks (Rails, Next.js, etc.)
2. Your organization **subscribes** to relevant playbooks
3. Playbooks are **assigned** to projects (automatically via stack matching or manually)
4. Conventions are **injected** into agent prompts during sync

---

## Subscribe to a playbook

Browse available playbooks in the dashboard:

1. Go to **Playbooks** in the sidebar
2. Click **Available** to see the marketplace
3. Subscribe to playbooks that match your stack

Or via the CLI:

```bash
crewkit playbooks list    # See applicable playbooks
```

---

## Conventions

Each playbook contains conventions — structured rules with:

- **Category** — What area it covers (testing, architecture, style, security)
- **Key** — Unique identifier (e.g., `use-minitest`)
- **Value** — The actual convention text
- **Anti-patterns** — What to avoid

Example convention:

```json
{
  "category": "testing",
  "key": "use-minitest",
  "value": "Use MiniTest for all tests. Do not use RSpec.",
  "anti_patterns": ["require 'rspec'", "RSpec.describe"]
}
```

---

## AI-powered extraction

crewkit can extract conventions from your existing codebase using AI:

1. Go to a playbook in the dashboard
2. Click **Extract Conventions**
3. Provide a code sample or repository context
4. Review the extracted conventions before saving

This uses Claude to identify patterns and standards already present in your code.

---

## Stack matching

Playbooks can be automatically matched to projects based on detected framework stacks. When crewkit detects that a project uses Rails, it suggests the Rails playbook. The matching considers:

- Package manifests (Gemfile, package.json, Cargo.toml)
- Framework indicators (config/routes.rb, next.config.ts)
- Directory structure

---

## Convention challenges

During a session, if Claude deviates from a convention, the hook system can detect it and log a challenge. This data feeds back into analytics so you can see which conventions are frequently challenged and may need revision.

---

## Next steps

- [Experiments](/docs/experiments)
- [Hooks](/docs/hooks)
- [Team management](/docs/team)
