Beads - Persistent Task Memory for AI Agents
Graph-based issue tracker that survives conversation compaction.
Overview
bd and br (beads_rust) replace markdown task lists with a dependency-aware graph stored in git. bv adds graph-aware triage using PageRank and betweenness centrality.
Key Distinction:
- bd/br: Multi-session work, dependencies, survives compaction, git-backed
- bv: Graph analysis, priority triage, bottleneck detection, parallel execution planning
- Task tools (TaskCreate/TaskUpdate/TaskList): Single-session tasks, status tracking, conversation-scoped
Decision Rule: If resuming in 2 weeks would be hard without bd, use bd.
br vs bd: br is the Rust rewrite. Commands are the same except: br never auto-commits (git is your job), and bd sync becomes br sync --flush-only. Use whichever is installed.
bv safety: NEVER run bare bv — it launches interactive TUI and blocks the terminal. Always use --robot-* flags.
Operating Rules
- Treat live
bd reads as authoritative. Use bd show, bd ready, bd list, and bd export to inspect current tracker state. Do not treat .beads/issues.jsonl as the primary decision source when live bd data is available.
- Before selecting new ready work after CI, release, or rollout activity, prefer
ao reconcile --json when available. Treat bd ready as planning input only after high-severity main/release/bead evidence findings are resolved or explicitly superseded.
- Treat
.beads/issues.jsonl as a git-friendly export artifact. If the repo tracks .beads/issues.jsonl and you mutate tracker state, refresh it explicitly with bd export -o .beads/issues.jsonl.
- After closing or materially updating a child issue, reconcile the open parent in the same session. Update stale "remaining gap" notes immediately, and close the parent when the child resolved the parent's last real gap.
- Before closing a child issue, include scoped closure proof in the
bd close --reason text.
Name the touched files or explicit no-file evidence artifact, validation command(s), and parent
reconciliation outcome. Do not use generic closure reasons such as "done" or "implemented" for child beads.
- If
bd ready returns a broad umbrella issue, do not implement directly against vague parent wording. First narrow the remaining gap into an execution-ready child issue, then land the child and reconcile the parent.
- Normalize stale queue items instead of silently skipping them. Rewrite broad or partially absorbed beads to the actual remaining gap.
- Use this post-mutation sequence when tracker state changed:
bd ... # mutate tracker state
bd export -o .beads/issues.jsonl # if tracked in git
bd vc status
bd dolt commit -m "..." # if tracker changes are pending
bd dolt push # only if a Dolt remote is configured
Prerequisites
- bd CLI: Version 0.34.0+ installed and in PATH
- Git Repository: Current directory must be a git repo
- Initialization:
bd init run once (humans do this, not agents)
Examples
Skill Loading from /vibe
User says: /vibe
What happens:
- Agent loads beads skill automatically via dependency
- Agent calls
bd show <id> to read issue metadata
- Agent links validation findings to the issue being checked
- Output references issue ID in validation report
Result: Validation report includes issue context, no manual bd lookups needed.
Skill Loading from /implement
User says: /implement ag-xyz-123
What happens:
- Agent loads beads skill to understand issue structure
- Agent calls
bd show ag-xyz-123 to read issue body
- Agent checks dependencies with bd output
- Agent closes issue with
bd close ag-xyz-123 after completion
Result: Issue lifecycle managed automatically during implementation.
br (beads_rust) Quick Reference
br is the Rust rewrite of bd. Commands match bd except git handling is explicit.
# Lifecycle
br create "Title" -p 1 -t task # Create (priority 0-4)
br update <id> --status in_progress # Claim work
br close <id> --reason "Done" # Complete
br ready --json # Actionable work (not blocked)
br list --json # All issues
br show <id> --json # Issue details
# Dependencies
br dep add <child> <parent> # child depends on parent
br dep cycles # MUST be empty
br dep tree <id> # Visualize dependencies
# Sync (EXPLICIT — never automatic)
br sync --flush-only # DB → JSONL (before git commit)
br sync --import-only # JSONL → DB (after git pull)
Session ending pattern (br):
git pull --rebase
br sync --flush-only
git add .beads/ && git commit -m "Update issues"
git push
bv Graph Triage
NEVER run bare bv. Always use --robot-* flags.
| Command |
Use When |
bv --robot-triage |
What should I work on? Full recommendations + blockers + health |
bv --robot-next |
Just the single top pick |
bv --robot-plan |
What can run concurrently? Parallel execution tracks |
bv --robot-insights |
Deep analysis: metrics, cycles, density, k-core |
bv --robot-priority |
Am I prioritizing wrong? Misalignment detection |
bv --robot-alerts |
Stale issues, blocking cascades, priority mismatches |
Key metrics: PageRank = everything depends on this (fix first). Betweenness = bottleneck (blocks multiple paths). High both = critical bottleneck, drop everything.
Plan-to-Beads Workflow
Convert a markdown plan into fully dependency-wired beads:
- Read the full plan, AGENTS.md, README, linked intent issue, and acceptance criteria.
- Create beads with
br create for each issue, including full context in the description.
- For every feature, bug, or product-facing behavior, include a fenced
gherkin
block or link to a filled intent issue. Mechanical chores may omit Gherkin
only when their acceptance criteria are fully command/file based.
- Include the
hexagon: boundary block from
docs/architecture/intent-to-loop-hexagon.md for substantial beads:
inbound port, bounded context, adapters, context packet, and done state.
- Wire dependencies with
br dep add / bd dep add. Do not hand-edit JSONL or
database files.
- Polish iteratively (usually 6-9 passes) until steady-state. Check for lost
features, oversimplification, missing tests, unclear boundaries, missing e2e
coverage, and weak logging.
- Validate:
br dep cycles must be empty; run bv --robot-insights for graph
health; use bv --robot-next for the first bead. Never run bare bv.
- Sync explicitly before commit:
br sync --flush-only, then git add .beads/
and commit tracker changes when appropriate.
Beads should be so detailed that a fresh agent can implement without consulting
the original plan. Ready-to-implement beads have clear scope, explicit
dependencies, BDD or mechanical acceptance, unit/e2e test expectations, detailed
logging expectations, a named done state, and no dependency cycles.
Troubleshooting
| Problem |
Cause |
Solution |
| bd/br command not found |
CLI not installed or not in PATH |
Install bd: brew install bd or check PATH |
| "not a git repository" error |
bd requires git repo, current dir not initialized |
Run git init or navigate to git repo root |
| "beads not initialized" error |
.beads/ directory missing |
Human runs bd init --prefix <prefix> once |
| Issue ID format errors |
Wrong prefix or malformed ID |
Check rigs.json for correct prefix |
bv hangs |
TUI launched without robot flag |
Always use --robot-* flags |
| Cycles detected |
Circular dependency |
br dep remove to break cycle |
| br sync confusion |
Missing --flush-only or --import-only |
Always specify direction explicitly |
Reference Documents
references/beads.feature — Executable spec: bd-mandatory tracker, create-before-code, ready-detection, discovered-from links, live-reads-authoritative (soc-qk4b)
references/ANTI_PATTERNS.md
references/BOUNDARIES.md
references/composition-over-invention.md — Run bd <subcmd> --help before specifying enforcement commands; compose primitives, don't invent
references/BR_REFERENCE.md
references/BV_TRIAGE.md
references/CLI_REFERENCE.md
references/DEPENDENCIES.md
references/INTEGRATION_PATTERNS.md
references/ISSUE_CREATION.md
references/MIGRATION.md
references/MOLECULES.md
references/PATTERNS.md
references/PLAN_TO_BEADS.md
references/RESUMABILITY.md
references/ROUTING.md
references/STATIC_DATA.md
references/tracker-migration-and-triage.md
references/TROUBLESHOOTING.md
references/WORKFLOWS.md
1---2name: beads-33description: Track issues with bd/br, triage with bv, and convert plans to beads.4---5# Beads - Persistent Task Memory for AI Agents
6
7Graph-based issue tracker that survives conversation compaction.
8
9## Overview
10
11**bd** and **br (beads_rust)** replace markdown task lists with a dependency-aware graph stored in git. **bv** adds graph-aware triage using PageRank and betweenness centrality.
12
13**Key Distinction**:
14- **bd/br**: Multi-session work, dependencies, survives compaction, git-backed
15- **bv**: Graph analysis, priority triage, bottleneck detection, parallel execution planning
16- **Task tools (TaskCreate/TaskUpdate/TaskList)**: Single-session tasks, status tracking, conversation-scoped
17
18**Decision Rule**: If resuming in 2 weeks would be hard without bd, use bd.
19
20**br vs bd**: br is the Rust rewrite. Commands are the same except: br never auto-commits (git is your job), and `bd sync` becomes `br sync --flush-only`. Use whichever is installed.
21
22**bv safety**: NEVER run bare `bv` — it launches interactive TUI and blocks the terminal. Always use `--robot-*` flags.
23
24## Operating Rules
25
26- Treat live `bd` reads as authoritative. Use `bd show`, `bd ready`, `bd list`, and `bd export` to inspect current tracker state. Do not treat `.beads/issues.jsonl` as the primary decision source when live `bd` data is available.
27- Before selecting new ready work after CI, release, or rollout activity, prefer `ao reconcile --json` when available. Treat `bd ready` as planning input only after high-severity main/release/bead evidence findings are resolved or explicitly superseded.
28- Treat `.beads/issues.jsonl` as a git-friendly export artifact. If the repo tracks `.beads/issues.jsonl` and you mutate tracker state, refresh it explicitly with `bd export -o .beads/issues.jsonl`.
29- After closing or materially updating a child issue, reconcile the open parent in the same session. Update stale "remaining gap" notes immediately, and close the parent when the child resolved the parent's last real gap.
30- Before closing a child issue, include scoped closure proof in the `bd close --reason` text.
31 Name the touched files or explicit no-file evidence artifact, validation command(s), and parent
32 reconciliation outcome. Do not use generic closure reasons such as "done" or "implemented" for child beads.
33- If `bd ready` returns a broad umbrella issue, do not implement directly against vague parent wording. First narrow the remaining gap into an execution-ready child issue, then land the child and reconcile the parent.
34- Normalize stale queue items instead of silently skipping them. Rewrite broad or partially absorbed beads to the actual remaining gap.
35- Use this post-mutation sequence when tracker state changed:
36
37```bash
38bd ... # mutate tracker state
39bd export -o .beads/issues.jsonl # if tracked in git
40bd vc status
41bd dolt commit -m "..." # if tracker changes are pending
42bd dolt push # only if a Dolt remote is configured
43```
44
45## Prerequisites
46
47- **bd CLI**: Version 0.34.0+ installed and in PATH
48- **Git Repository**: Current directory must be a git repo
49- **Initialization**: `bd init` run once (humans do this, not agents)
50
51## Examples
52
53### Skill Loading from /vibe
54
55**User says:** `/vibe`
56
57**What happens:**
581. Agent loads beads skill automatically via dependency
592. Agent calls `bd show <id>` to read issue metadata
603. Agent links validation findings to the issue being checked
614. Output references issue ID in validation report
62
63**Result:** Validation report includes issue context, no manual bd lookups needed.
64
65### Skill Loading from /implement
66
67**User says:** `/implement ag-xyz-123`
68
69**What happens:**
701. Agent loads beads skill to understand issue structure
712. Agent calls `bd show ag-xyz-123` to read issue body
723. Agent checks dependencies with bd output
734. Agent closes issue with `bd close ag-xyz-123` after completion
74
75**Result:** Issue lifecycle managed automatically during implementation.
76
77## br (beads_rust) Quick Reference
78
79br is the Rust rewrite of bd. Commands match bd except git handling is explicit.
80
81```bash
82# Lifecycle
83br create "Title" -p 1 -t task # Create (priority 0-4)
84br update <id> --status in_progress # Claim work
85br close <id> --reason "Done" # Complete
86br ready --json # Actionable work (not blocked)
87br list --json # All issues
88br show <id> --json # Issue details
89
90# Dependencies
91br dep add <child> <parent> # child depends on parent
92br dep cycles # MUST be empty
93br dep tree <id> # Visualize dependencies
94
95# Sync (EXPLICIT — never automatic)
96br sync --flush-only # DB → JSONL (before git commit)
97br sync --import-only # JSONL → DB (after git pull)
98```
99
100**Session ending pattern (br):**
101```bash
102git pull --rebase
103br sync --flush-only
104git add .beads/ && git commit -m "Update issues"
105git push
106```
107
108## bv Graph Triage
109
110NEVER run bare `bv`. Always use `--robot-*` flags.
111
112| Command | Use When |
113|---------|----------|
114| `bv --robot-triage` | What should I work on? Full recommendations + blockers + health |
115| `bv --robot-next` | Just the single top pick |
116| `bv --robot-plan` | What can run concurrently? Parallel execution tracks |
117| `bv --robot-insights` | Deep analysis: metrics, cycles, density, k-core |
118| `bv --robot-priority` | Am I prioritizing wrong? Misalignment detection |
119| `bv --robot-alerts` | Stale issues, blocking cascades, priority mismatches |
120
121**Key metrics:** PageRank = everything depends on this (fix first). Betweenness = bottleneck (blocks multiple paths). High both = critical bottleneck, drop everything.
122
123## Plan-to-Beads Workflow
124
125Convert a markdown plan into fully dependency-wired beads:
126
1271. Read the full plan, AGENTS.md, README, linked intent issue, and acceptance criteria.
1282. Create beads with `br create` for each issue, including full context in the description.
1293. For every feature, bug, or product-facing behavior, include a fenced `gherkin`
130 block or link to a filled intent issue. Mechanical chores may omit Gherkin
131 only when their acceptance criteria are fully command/file based.
1324. Include the `hexagon:` boundary block from
133 `docs/architecture/intent-to-loop-hexagon.md` for substantial beads:
134 inbound port, bounded context, adapters, context packet, and done state.
1355. Wire dependencies with `br dep add` / `bd dep add`. Do not hand-edit JSONL or
136 database files.
1376. Polish iteratively (usually 6-9 passes) until steady-state. Check for lost
138 features, oversimplification, missing tests, unclear boundaries, missing e2e
139 coverage, and weak logging.
1407. Validate: `br dep cycles` must be empty; run `bv --robot-insights` for graph
141 health; use `bv --robot-next` for the first bead. Never run bare `bv`.
1428. Sync explicitly before commit: `br sync --flush-only`, then `git add .beads/`
143 and commit tracker changes when appropriate.
144
145Beads should be so detailed that a fresh agent can implement without consulting
146the original plan. Ready-to-implement beads have clear scope, explicit
147dependencies, BDD or mechanical acceptance, unit/e2e test expectations, detailed
148logging expectations, a named done state, and no dependency cycles.
149
150## Troubleshooting
151
152| Problem | Cause | Solution |
153|---------|-------|----------|
154| bd/br command not found | CLI not installed or not in PATH | Install bd: `brew install bd` or check PATH |
155| "not a git repository" error | bd requires git repo, current dir not initialized | Run `git init` or navigate to git repo root |
156| "beads not initialized" error | .beads/ directory missing | Human runs `bd init --prefix <prefix>` once |
157| Issue ID format errors | Wrong prefix or malformed ID | Check rigs.json for correct prefix |
158| `bv` hangs | TUI launched without robot flag | Always use `--robot-*` flags |
159| Cycles detected | Circular dependency | `br dep remove` to break cycle |
160| br sync confusion | Missing `--flush-only` or `--import-only` | Always specify direction explicitly |
161
162## Reference Documents
163
164- [references/beads.feature](references/beads.feature) — Executable spec: bd-mandatory tracker, create-before-code, ready-detection, discovered-from links, live-reads-authoritative (soc-qk4b)
165
166- [references/ANTI_PATTERNS.md](references/ANTI_PATTERNS.md)
167- [references/BOUNDARIES.md](references/BOUNDARIES.md)
168- [references/composition-over-invention.md](references/composition-over-invention.md) — Run `bd <subcmd> --help` before specifying enforcement commands; compose primitives, don't invent
169- [references/BR_REFERENCE.md](references/BR_REFERENCE.md)
170- [references/BV_TRIAGE.md](references/BV_TRIAGE.md)
171- [references/CLI_REFERENCE.md](references/CLI_REFERENCE.md)
172- [references/DEPENDENCIES.md](references/DEPENDENCIES.md)
173- [references/INTEGRATION_PATTERNS.md](references/INTEGRATION_PATTERNS.md)
174- [references/ISSUE_CREATION.md](references/ISSUE_CREATION.md)
175- [references/MIGRATION.md](references/MIGRATION.md)
176- [references/MOLECULES.md](references/MOLECULES.md)
177- [references/PATTERNS.md](references/PATTERNS.md)
178- [references/PLAN_TO_BEADS.md](references/PLAN_TO_BEADS.md)
179- [references/RESUMABILITY.md](references/RESUMABILITY.md)
180- [references/ROUTING.md](references/ROUTING.md)
181- [references/STATIC_DATA.md](references/STATIC_DATA.md)
182- [references/tracker-migration-and-triage.md](references/tracker-migration-and-triage.md)
183- [references/TROUBLESHOOTING.md](references/TROUBLESHOOTING.md)
184- [references/WORKFLOWS.md](references/WORKFLOWS.md)