
Beads
- 36 installs
- 22 repo stars
- Updated August 1, 2026
- itechmeat/llm-code
Track agent tasks and dependencies with the Beads (bd) Dolt-backed graph issue tracker, syncing to Linear, Jira, or GitLab.
About
A distributed, Dolt-backed graph issue tracker giving AI coding agents persistent, dependency-aware task memory across sessions. A developer uses it when agents need durable task tracking or multi-branch coordination.
- Dependency-aware tracking with blocks/depends_on and hash-based IDs
- Dolt Git-like sync and Linear/Jira/GitLab integration
Beads by the numbers
- 36 all-time installs (skills.sh)
- Ranked #1,759 of 3,282 Productivity & Planning skills by installs in the Skillselion catalog
- Data as of Aug 2, 2026 (Skillselion catalog sync)
npx skills add https://github.com/itechmeat/llm-code --skill beadsAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 36 |
|---|---|
| repo stars | ★ 22 |
| Last updated | August 1, 2026 |
| Repository | itechmeat/llm-code ↗ |
What it does
Track agent tasks and dependencies with the Beads (bd) Dolt-backed graph issue tracker, syncing to Linear, Jira, or GitLab.
Files
Beads (bd)
Distributed, Dolt-backed (Git-like) graph issue tracker for AI coding agents. Persistent memory with dependency-aware task tracking.
Quick Start
Install: brew install beads or use the install scripts/binaries from the GitHub repo.
# Initialize in repo (humans run once)
bd init
# Tell your agent
echo "Use 'bd' for task tracking" >> AGENTS.mdWhen to Use
- AI agent needs persistent task memory across sessions
- Tracking dependencies between tasks (
blocks:,depends_on:) - Multi-agent/multi-branch workflows (hash-based IDs prevent conflicts)
- Incremental delivery with molecules/gates
- Sync issues with GitLab, Linear, Jira, GitHub
Essential Commands
| Command | Action |
|---|---|
bd ready | List tasks with no open blockers |
bd ready --explain | Explain why tasks are or are not ready |
bd ready --gated | Tasks waiting at gate checkpoints |
bd ready --exclude-type=X | Exclude specific issue types |
bd create "Title" -p 0 | Create P0 task |
bd show <id> | View task details and audit trail |
bd update <id> --status=X | Update status (open/in_progress/done) |
bd close <id> | Close task |
bd close <id> --claim-next | Close current task and claim next |
bd dep add <child> <parent> | Link tasks (blocks, related, parent) |
bd list | List issues (default: 50, non-closed) |
bd list --format json | JSON output (alias for --json) |
bd show --current | Show active issue (no ID needed) |
bd update <id> --claim | Atomically claim issue for work |
bd note <id> "text" | Append note (shorthand) |
bd import -i <file> | Import JSONL incrementally |
bd sync | Sync database state |
bd dolt pull | Pull latest DB changes (advanced) |
bd dolt push | Push DB changes (advanced) |
bd bootstrap | Repair/bootstrap workspace identity |
bd context | Show current workspace/task context |
bd kv set <key> <value> | Store key-value pair |
bd kv get <key> | Retrieve stored value |
bd dolt show | Show Dolt connection/remote settings |
bd config set-many | Apply multiple config changes in one step |
bd ado sync | Sync with Azure DevOps work items |
bd ado status | Check Azure DevOps sync status |
bd ado projects | List Azure DevOps projects |
bd gitlab sync | Sync with GitLab |
bd github sync | Sync with GitHub Issues |
bd remember | Write persistent agent memory |
bd recall | Read persistent agent memory |
bd purge | Delete closed ephemeral beads (wisps) |
Hash-Based IDs
Issues use hash-based IDs like bd-a1b2 to prevent merge conflicts:
bd create "Fix login bug" -p 1
# Created: bd-x7k3
bd show bd-x7k3Hierarchical IDs
bd-a3f8 (Epic)
bd-a3f8.1 (Task)
bd-a3f8.1.1 (Sub-task)Use bd children <id> to view hierarchy.
References
| File | Purpose |
|---|---|
| workflow.md | Daily operations, status flow, sync |
| authoring.md | Writing quality issues, EARS patterns |
| molecules.md | Molecules, gates, formulas, compounds |
| sync.md | Dolt sync, upgrades, and integrations |
Key Concepts
Dolt as Database
Beads stores issues in a Dolt database. Team synchronization happens via Dolt-style pull/push, not by committing JSONL files into your repo history.
Dependency Graph
bd dep add bd-child bd-parent --blocks # child blocks parent
bd dep add bd-a bd-b --related # related items
bd ready # only shows unblocked workMolecules (Advanced)
Molecules group related issues with gates for incremental delivery:
bd mol create "Feature X" --steps=3 # Create 3-step molecule
bd mol progress bd-xyz # Check progress
bd mol burn bd-xyz # Complete moleculeStealth Mode
Use Beads locally without committing to repo:
bd init --stealthContributor vs Maintainer
# Contributor (forked repos) — separate planning repo
bd init --contributor
# Maintainer auto-detected via SSH/HTTPS credentialsConfiguration
Config stored in .beads/config.yaml:
The exact schema evolves between releases. Prefer using CLI helpers to inspect and validate your current setup:
bd dolt showto see current Dolt connection/remote settingsbd dolt testto validate connectivitybd doctor/bd doctor --deepfor health checks
Storage Backend (Dolt)
Beads uses Dolt as its primary backend. Depending on your setup, Dolt can run:
- Embedded (single-writer, no daemon)
- Server mode (multi-writer)
Use bd doctor (and bd doctor --server when applicable) to validate your environment. For legacy stores, use bd migrate workflows.
Agent Integration
Tell Agent About Beads
Add to AGENTS.md:
## Task Tracking
Use `bd` for task tracking. Run `bd ready` to find work.Agent-Optimized Output
BD_AGENT_MODE=1 bd list --json # Ultra-compact JSON output
bd list --json # Standard JSON outputMCP Plugin
Beads includes Claude Code MCP plugin for direct integration.
Release Highlights (1.0.3–1.0.4)
- Workflow/config ergonomics:
bd -Cchanges working directory before running,bd closegains--reason-file, and setup/bootstrap flows gain better remote/server config handling. - Linear sync: OAuth client-credentials, idempotency markers, stale-data signaling, per-workspace sync locks, richer type mappings, and batch create/update make larger sync loops safer and faster.
- Security/export defaults: Beads now refuses to write secret keys into git-tracked config, and exports exclude memories and ephemeral wisps by default unless you opt back in.
- Dependencies/data paths: JSONL bulk dependency add and several hook/bootstrap/init fixes reduce friction in automated and shared-server environments.
Release Highlights (1.0.0–1.0.2)
- Distribution: precompiled binaries now cover Linux, macOS (Intel/Apple Silicon), Windows (AMD64/ARM64), Android/Termux, and FreeBSD.
- Automation:
bd init --non-interactive/--roleandbd bootstrap --non-interactiveimprove CI/cloud-agent setup. - Workflow:
bd ready --explain,bd config set-many, batch dependency listing, and comma-separated status filters improve agent ergonomics. - Authoring/modeling:
spike,story, andmilestoneare now first-class issue types; custom statuses/types moved to normalized tables. - Integrations/sync: GitLab sync adds better dedup + epic→milestone mapping, ADO sync respects more filters, and embedded/shared-server recovery got safer.
Release Highlights (0.62.0–0.63.3)
- Azure DevOps integration:
bd adoCLI commands (sync, status, projects) for work item tracking. - Embedded Dolt support: dep, duplicate, epic, graph, supersede, swarm operations work without a running Dolt server.
- Custom status categories: configure active/wip/done/frozen status groupings.
- `bd note` command: shorthand for appending notes to issues.
- `--exclude-type` flag: filter by issue type on
bd readyandbd list. - `--format json` alias: alternative to
--jsonflag for consistency. - Audit log: captures close reason; status changes logged to
interactions.jsonl. - Memories in export/import: round-trip includes agent memories.
- Init defaults: AGENTS.md defaults to minimal profile;
--agents-profileflag added. - Quality/lifecycle commands: surfaced in prime, template, and doctor.
- Validation on close:
--validatechecks--acceptancefield;validation.on-closeconfig.
Release Highlights (0.61.0)
bd close --claim-nextshortens the common close-and-claim-next loop for agents.bd creategains--skills,--context, and--no-historyfor richer task creation and optional Dolt-history suppression.bd importadds incremental JSONL import for portability and recovery workflows.bd init/bd bootstrapcan auto-detect the Beads database from the repository git origin.- Dolt/server-mode sync improves credential pass-through, runtime port reporting, and health checks.
- Config and backup handling are safer, including proper project+user config merge and
BD_BACKUP_ENABLED=falsesupport.
Critical Commands
# What to work on
bd ready # Unblocked tasks
bd ready --pretty # Formatted output
# Create with dependencies
bd create "Task B" --blocks bd-a1b2
bd create "Task C" --context "Need schema review" --skills "python,sql"
# Doctor (fix issues)
bd doctor # Check health
bd doctor --fix # Auto-fix problems
bd sync # Sync DB state
bd import -i backup.jsonl # Incremental JSONL import
bd dolt pull # Pull latest changes (advanced)
bd dolt push # Push to remote (advanced)Anti-patterns
| ❌ Wrong | ✅ Correct |
|---|---|
priority: high | -p 1 (P0-P4 numeric) |
| Manual JSON editing | Use bd commands |
Ignoring bd ready | Always check blockers first |
Skipping bd sync | Sync before/after work |
| Creating without deps | Declare --blocks upfront |
Links
Issue Authoring (Spec-Grade Quality)
Write Beads issues that are implementable without guesswork.
Quality Triangle
Every issue must answer:
- What must be true? (
description= contract/requirements) - How do we implement it here? (
design= approach + integration map) - How do we prove it works? (
acceptance_criteria= pass/fail)
Minimum Content Bar
| Field | Must Include |
|---|---|
| Contract | Inputs/outputs, schemas, defaults, limits |
| Decision closure | No unresolved "pick one" behaviors |
| Integration map | Concrete files/modules/symbols |
| Acceptance | Executable pass/fail checklist |
| Constraints | Hard rules, allowed identifiers for QA |
Description (Requirements)
Recommended Structure
1. System context: runtime surface, tenant/bot scope, invariants 2. Functional requirements: EARS-style with REQ-### numbering 3. Non-functional requirements: only if measurable 4. Out of scope: explicit non-goals 5. Acceptance scenarios: 3–6 Given/When/Then
EARS Writing Rules
Each requirement must be testable and unambiguous:
- When
<trigger>, the system shall<behavior>. - While
<state>, the system shall<behavior>. - If
<condition>, then the system shall<behavior>.
Do not leave behavioral forks (e.g., "reject or return empty — pick one").
Input Contract Checklist
- Field list + types (Pydantic/JSON schema)
- Defaulting rules
- Validation constraints (ranges, max window, enums)
- Time semantics (timezone source, absolute vs relative)
- Tenant scoping fields
- Invalid input behavior and signaling model
Output Contract Checklist
- Field list + types
- Ordering guarantees
- Empty result signaling (
empty_reasonvalues) - Debug block (flag-controlled)
- Error signaling model
Design (Implementation Plan)
Recommended Structure
1. Current state (what exists today) 2. Proposed approach (decisions and rationale) 3. Data flow (bullets or Mermaid diagram) 4. Integration map (files/modules/symbols) 5. Isolation & invariants (RLS, required identifiers) 6. Risks & mitigations
Architecture Decomposition
Make component boundaries explicit:
- API/handler layer
- Tool/agent layer
- Service layer
- Data access layer (RLS enforcement)
- External deps (RAG, cache)
For each component: public interface, failure modes, observability.
File-Backed Design Input (v0.60.0)
When the design section is large or already exists as a checked-in document, prefer passing it from a file instead of stuffing it into inline CLI arguments.
bd create "Implement feature X" --design-file ./docs/feature-x-design.mdThis keeps issue creation reproducible and avoids truncation/quoting mistakes in automation.
PRIME.md Fallback
If a repository-local PRIME guidance file is absent, Beads can fall back to ~/.config/beads/PRIME.md.
- Use the global fallback for durable personal authoring defaults.
- Keep repo-specific constraints in the repository when they materially affect implementation or review.
Cutover Checklist (when replacing legacy)
- Tool catalog/registry: remove legacy tool visibility
- Tool exports: ensure legacy not re-exported
- Runtime toolset: ensure legacy not registered
- References: update prompts/docs
Acceptance Criteria
Scenario Template
Scenario A (Happy path)
- Given <precondition>
- When <trigger/input>
- Then <observable outputs>
Scenario B (Empty result)
- Given <no matching data>
- When <trigger/input>
- Then <empty_reason + no hallucination>
Scenario C (Constraints/limits)
- Given <invalid window / out-of-range>
- When <trigger/input>
- Then <exact behavior and signaling>Multi-Tenant Isolation Scenario (mandatory when applicable)
- Given tenant A and tenant B have different data
- When tenant A invokes the feature
- Then only tenant A data is returnedRequire proof in design: where tenant context is derived and set.
NFRs (Non-Functional Requirements)
Only include if measurable. Use prefixes:
- PERF-###: Latency/size budgets
- QUAL-###: Quality targets with measurement method
Example:
- PERF-001: When retrieval is executed, p95 latency shall be < 500ms.
- QUAL-001: Grouping correctness shall achieve 95% measured by manual sampling.
Task Authoring
Decompose each STAGE into 3–8 atomic TASKs:
- Schemas/contract
- Data access (queries, RLS)
- Business logic
- Formatting/output
- Observability
- Tests
Each TASK must name concrete touch points and what verification it adds.
Issue types (v1.0.0)
Beads now treats spike, story, and milestone as first-class issue types.
- Use
storyfor user-visible slices of behavior. - Use
spikefor bounded investigation where uncertainty reduction is the deliverable. - Use
milestonefor tracking larger delivery checkpoints without forcing an epic/task misuse. - Newer sync integrations map these built-in types more completely into external trackers such as Linear and GitHub, so prefer the built-in names when external tracker fidelity matters.
Custom statuses and custom types also moved to normalized tables in the 1.0.x line. Prefer built-in types when they fit; use custom types only when the workflow semantics are truly different.
Molecules & Gates
Molecules group related issues for incremental delivery with QA checkpoints.
Concepts
Molecule
A molecule is a collection of related issues (steps) that form a deliverable unit:
bd mol create "Feature X" --steps=3
# Creates: bd-xyz (molecule) with 3 step issuesGates
Gates are QA checkpoints between steps:
bd ready --gated # Tasks waiting at gates
bd gate check bd-xyz # Evaluate gate conditionsCreating Molecules
Simple Molecule
bd mol create "Add user auth" --steps=3Creates:
bd-abc(molecule root)bd-abc.1(step 1)bd-abc.2(step 2)bd-abc.3(step 3)
With Variables
bd mol create "Feature" --steps=2 --var="component=auth"From Formula
bd mol pour my-formula --var="name=auth"Managing Molecules
# Progress check
bd mol progress bd-abc
# Show last activity timestamp (v0.58.0)
bd mol last-activity bd-abc
# Show compound structure
bd mol show bd-abc
# Complete molecule
bd mol burn bd-abc
# Batch burn
bd mol burn bd-abc bd-def bd-ghiWisps (Ephemeral Molecules)
Wisps are ephemeral molecules for operational loops that you _don’t_ want to keep as persistent, shareable history.
Create a wisp from a proto or a formula name:
bd mol wisp mol-patrol
bd mol wisp beads-release --var version=1.0Manage existing wisps:
bd mol wisp list
bd mol wisp gcNotes:
- In newer versions, wisp creation defaults to a root-only workflow unless the
formula explicitly opts into pouring child steps. Use --root-only when you want to force creating only the root issue.
Wisp lifecycle shortcuts:
- Promote a wisp to persistent work:
bd mol squash <id> - Delete a wisp without preserving it:
bd mol burn <id>
Gate Types
Human Gates
Manual approval required:
bd gate add-waiter bd-step1 --human
bd gate show bd-step1Timer Gates
Wait for time period:
bd gate check bd-xyz # Checks timer conditionsGitHub Gates
Wait for CI/workflow:
bd gate check bd-xyz --gh:run # Check GitHub Actions
bd gate discover bd-xyz # Auto-discover workflow IDMerge-Slot Gates
Serialized conflict resolution:
bd slot set bd-xyz agent-1
bd slot show bd-xyzFormulas
Reusable molecule templates:
# List formulas
bd formula list
# Pour (instantiate) formula
bd mol pour release-checklist --var="version=1.0"
# Validate template
bd lint template.yamlFormula Structure
name: release-checklist
steps:
- title: "Prepare {{version}}"
gate:
type: human
- title: "Deploy {{version}}"
condition: "{{ci_passed}}"Compounds
Nested molecule structures:
bd mol show bd-abc --tree # Show compound hierarchyBest Practices
1. Use gates for mandatory review points 2. Keep molecules small (3-5 steps max) 3. Name descriptively for audit trail 4. Use formulas for repeatable patterns 5. Check progress regularly with bd mol progress
Sync & Integration
Beads v0.58.0 uses Dolt as the primary backend and supports multiple sync strategies.
TL;DR
- Prefer
bd syncfor the “do the right thing” sync loop. - Use
bd dolt push/bd dolt pullwhen operating directly with Dolt remotes. - Use JSONL export/import for portability, migration, and off-machine backups.
Recommended Loop (Most Teams)
bd syncAt a high level, bd sync:
1. Ensures local DB state is consistent 2. Pulls updates from the configured sync channel 3. Applies merges/conflict strategy 4. Pushes if configured (or if you didn’t opt out)
If you need to skip pushing (e.g. read-only environments):
bd sync --no-pushInit / Bootstrap Auto-Detection (v0.61.0)
bd init and bd bootstrap can now auto-detect the Beads database from the repository's git origin.
- Prefer this when reconnecting an existing clone or repairing a miswired workspace.
- It reduces manual remote/database discovery during bootstrap and recovery flows.
1.0.x adds non-interactive init/bootstrap flows for CI and improves bootstrap recovery in fresh clones and shared-server scenarios.
The 1.0.4 line also adds a more direct remote bootstrap path (bd init --remote) plus cleaner external-server directory override behavior, which is useful when the Beads store is not colocated with the working tree.
Sync Modes
Beads supports different sync modes depending on your backend and workflow. The exact knobs live in .beads/config.yaml / ~/.config/bd/config.yaml.
dolt-native(recommended): Dolt remotes handle sync; cell-level merge.git-portable(legacy portability): JSONL export/import during sync operations.belt-and-suspenders: Dolt remotes + JSONL backups for extra redundancy.
Dolt Remotes
Use bd dolt remote commands to manage remotes without editing config files:
bd dolt remote list
bd dolt remote add origin <url>
bd dolt remote remove origin
bd dolt pull
bd dolt pushNotes:
- For git-protocol remotes, Beads may fall back to the Dolt CLI for transfer.
bd dolt showandbd dolt testhelp validate configuration and connectivity.- In server mode and federation flows, Beads now routes CLI credentials through push/pull/fetch operations more consistently.
bd contextnow reports the actual runtime Dolt port instead of assuming the default port.- Credentials-file support is also available for Dolt server passwords in newer
1.0.xsetups.
Multiple Clones / Worktrees: .beads/redirect
To make multiple clones share one database, create .beads/redirect containing a single relative or absolute path to the target .beads directory.
mkdir -p .beads
echo "../main-clone/.beads" > .beads/redirect
bd where
bd where --jsonConstraints:
- Redirects are single-level (A → B works; A → B → C does not)
- Target must exist and contain a valid database
Backup / Portability (JSONL)
Use JSONL as an off-machine recovery path and migration/portability tool.
bd export -o backup.jsonl
bd import -i backup.jsonlIf auto-backup is enabled, you can trigger it manually:
bd backup
bd backup statusSet BD_BACKUP_ENABLED=false when automation must suppress backup commits.
Recent export defaults changed in a safer direction:
bd exportexcludes memories by default.bd exportexcludes ephemeral wisps by default.
If you rely on older "everything goes into export" assumptions for migration or audit tooling, re-test those flows and opt back in intentionally where needed.
Upgrades & Migrations
For upgrades, prefer inspecting first:
bd migrate --inspect --json
bd migrate --to-dolt --dry-run
bd migrate --to-doltRecent releases also merge user-level config under project config instead of discarding it.
External Integrations
Integrations (GitLab/Linear/Jira/etc.) are separate from database sync: sync keeps Beads’ local issue database consistent; integrations exchange data with external trackers.
For automation, prefer structured/JSON-aware error handling when integration commands fail instead of scraping human-readable error text.
1.0.x also tightened integration safety: external tracker content is sanitized for terminal display, response sizes are bounded, and sync warnings are surfaced more explicitly.
bd doctor also has stronger server-mode behavior, including cold-start Dolt detection and committed runtime/sensitive-file detection.
Recent config safety tightened further: secret keys are refused in git-tracked config.yaml, so treat secrets as out-of-repo state instead of assuming the CLI will happily persist them into tracked config.
GitLab Sync
bd gitlab sync
bd gitlab statusRecent updates improved GitLab dedup behavior, type filtering, and epic → milestone mapping.
GitHub Issues Sync (v0.60.0)
bd github sync
bd github statusUse this when your coordination loop lives in GitHub Issues instead of GitLab, Linear, or Jira.
Linear Sync
bd linear sync --project-id=<id>Recent 1.0.4 Linear upgrades matter operationally:
- OAuth client-credentials support for headless/service setups
- Ambient staleness signaling for auto-fresh data
- Idempotency markers to prevent duplicate issue creation
- Per-workspace concurrency locks on sync
- Batch create/update flows for much faster bulk sync
- Type mappings for
decision,spike,story, andmilestone
Jira Import
bd jira import --project=KEYAzure DevOps sync notes (1.0.x)
- ADO push flows now respect
--types,--states, and--no-createfilters more consistently. - New work items are created in the initial state and then transitioned to the target state when needed.
Daily Workflow
Daily task operations with bd CLI.
Non-interactive setup (v1.0.0)
Use the non-interactive flags when bootstrapping CI runners or cloud agents that cannot answer prompts.
bd init --non-interactive --role=<role>
bd bootstrap --non-interactiveUse --role to make the workspace intent explicit for agent automation.
Recent 1.0.4 setup/workflow additions:
bd init --remotehelps bootstrap against a remote-backed setup path more directly.bd -C <dir> ...changes directory before command execution, which is useful in automation that orchestrates multiple repos/workspaces from one parent shell.
Daily Loop
# 0. Sync database state
bd sync
# 0b. Repair bootstrap/identity state when a workspace looks miswired
bd bootstrap
# 1. What can I work on?
bd ready # Unblocked tasks
bd ready --pretty # Formatted output
bd ready --gated # Tasks at gate checkpoints
# (Optional) see what is currently active
bd show --current
# 2. Pick and start work
bd update bd-xyz --status=in_progress
# 3. Complete work
bd close bd-xyz --reason "Implemented per spec"
bd close bd-xyz --reason "Implemented per spec" --claim-next
# 4. Share DB changes (when you want to share)
bd syncIf you are operating directly against Dolt remotes (advanced), you can also use:
bd dolt pull
bd dolt pushFinding Work
Workspace Context
bd context
bd context --jsonUse this before planning or handoff when you need a concise snapshot of the current workspace/task state.
Ready Tasks
bd ready # Tasks with no open blockers
bd ready --explain # Explain dependency/blocker reasoning
bd ready --json # JSON output for agents
bd ready --limit=10 # Limit resultsList Tasks
bd list # Default: 50 non-closed issues
bd list --all # All issues
bd list --status=open # Filter by status
bd list --status=open,in_progress # Comma-separated status values
bd list --type=bug # Filter by type
bd list --tree # Tree view with hierarchy
bd list --tree --parent=bd-abc # SubtreeShow Details
bd show bd-xyz # Full details + audit trail
bd show bd-xyz --short # Compact output
bd view bd-xyz # Alias for show
bd show --id bd-xyz # Use when ID could be parsed as a flagStatus Updates
# Update status
bd update bd-xyz --status=in_progress
bd update bd-xyz --status=done
# Update with fields
bd update bd-xyz --priority=0 --assignee="agent-1"
# Batch update
bd update bd-abc bd-def --status=in_progress
# Append notes
bd update bd-xyz --append-notes "New info"
# Ephemeral / persistent markers
bd update bd-xyz --ephemeral
bd update bd-xyz --persistentStatus Values
| Status | Meaning |
|---|---|
open | Not started |
in_progress | Work in progress |
done | Completed |
hooked | Claimed by agent |
Closing Tasks
# Close with reason (recommended)
bd close bd-xyz --reason "Implemented and tested"
# Close with a longer reason from file
bd close bd-xyz --reason-file ./close-reason.md
# Close and immediately claim the next ready task
bd close bd-xyz --reason "Implemented and tested" --claim-next
# Close multiple
bd close bd-abc bd-def --reason "Batch completion"
# Cannot close if blockers exist
# bd close bd-blocked # Error: has open blockersDependencies
# Add dependency (child blocks parent)
bd dep add bd-child bd-parent --blocks
# Add related link
bd dep add bd-a bd-b --related
# Remove dependency
bd dep rm bd-child bd-parent
# View dependency tree
bd dep tree bd-xyz1.0.x also adds batch dependency listing for multiple issue IDs, which is useful when an agent is triaging several candidates at once.
Recent 1.0.4 automation paths also add JSONL bulk dependency add, which is useful when importing or repairing a larger dependency graph from generated/project data instead of issuing one bd dep add per edge.
Labels
# Add labels
bd label add bd-xyz urgent backend
# Remove labels
bd label remove bd-xyz urgent
# List by label
bd list --label=urgentActivity Feed
bd activity # Recent activity
bd activity --watch # Real-time feed
bd activity --town # Cross-rig aggregated feed
bd activity --details # Full issue detailsAgent Mode
For AI agents, use structured output:
BD_AGENT_MODE=1 bd ready --json
BD_AGENT_MODE=1 bd list --jsonKey-Value Store
Store arbitrary key-value data alongside issues:
bd kv set config.api_url "https://api.example.com"
bd kv get config.api_url
bd kv list # List all keys
bd kv delete config.api_urlUseful for storing agent configuration, session state, or project metadata.
Batch config updates (v1.0.0)
Use bd config set-many when automation needs to apply several config changes together instead of mutating keys one by one.
Backend Management
bd dolt show # Show Dolt connection/remote settings
bd dolt test # Validate connectivityBackup & Restore
Beads can produce JSONL backups for off-machine recovery and portability.
bd backup
bd backup status
bd export -o backup.jsonl
bd import -i backup.jsonlNotes:
- Use
bd backup --helpto see the available options (location, format, automation). - Treat restore as a bootstrap/recovery tool; validate Dolt connectivity after restoring.
bd importsupports incremental JSONL replay workflows and avoids duplicating already-imported comment history.
Richer Task Creation (v0.61.0)
bd create "Task C" --context "Needs schema review" --skills "python,sql"
bd create "Scratch task" --no-history--contextcaptures concise execution context at creation time.--skillsrecords the intended skill/tooling surface for the task.--no-historyskips the Dolt commit for that create operation without making the item GC-eligible.
Maintenance
Standalone lifecycle helpers for keeping the Beads store healthy:
bd gc
bd compact
bd flattenPurge Closed Ephemeral Beads (v0.58.0)
Delete closed ephemeral beads (wisps) to reclaim storage:
bd purgePersistent Agent Memory (v0.58.0)
For knowledge that should survive sessions:
bd remember "key" "value"
bd memories
bd recall "key"
bd forget "key"Claiming Work
bd update bd-xyz --claim # Mark as claimed by current agentSession End
# Sync before ending session (when you want to share)
bd syncExport
bd export -o backup.jsonl # Export full DB backup (JSONL)
bd export --id bd-xyz # Export specific issue
bd export --parent bd-abc # Export subtree by parentTroubleshooting
bd doctor # Health check
bd doctor --fix # Auto-fix issues
bd doctor --deep # Full integrity check
bd doctor --server # Dolt server mode health checks
bd doctor --agent # Diagnostics for AI agent setups (v0.57.0)Safe Re-initialization (v0.60.0)
When automation must reinitialize a store non-interactively, use the explicit destroy-token flow instead of scripting blind destructive prompts.
bd init --destroy-token <token>Treat the token as a deliberate safety barrier, not as a convenience flag to hardcode into generic scripts.
"""Generate a Beads bulk-create Markdown file for `bd create -f`.
This helper is intentionally stored inside a Copilot skill folder so the
workflow is self-contained and discoverable by agents.
Upstream bd markdown parser format:
- Each issue starts with an H2 header: `## Title`
- Fields live under H3 sections: `### Description`, `### Design`,
`### Acceptance Criteria`, etc.
See upstream implementation:
https://github.com/steveyegge/beads/blob/main/cmd/bd/markdown.go
"""
from __future__ import annotations
import argparse
import json
import os
import tempfile
from dataclasses import dataclass
from typing import Any, Iterable
@dataclass(frozen=True)
class IssueSpec:
title: str
priority: int
issue_type: str
description: str
design: str
acceptance_criteria: str
labels: tuple[str, ...]
dependencies: tuple[str, ...]
def _require_str(value: Any, *, field_name: str) -> str:
if not isinstance(value, str) or not value.strip():
raise ValueError(f"{field_name} must be a non-empty string")
return value.strip()
def _require_int(value: Any, *, field_name: str) -> int:
if not isinstance(value, int):
raise ValueError(f"{field_name} must be an integer")
return value
def _require_str_list(value: Any, *, field_name: str) -> tuple[str, ...]:
if value is None:
return ()
if not isinstance(value, list) or not all(isinstance(item, str) for item in value):
raise ValueError(f"{field_name} must be a list of strings")
items = tuple(item.strip() for item in value if item.strip())
return items
def _parse_issue(obj: Any) -> IssueSpec:
if not isinstance(obj, dict):
raise ValueError("Each issue must be an object")
title = _require_str(obj.get("title"), field_name="title")
priority = _require_int(obj.get("priority"), field_name="priority")
if priority < 0 or priority > 4:
raise ValueError("priority must be in range 0..4")
issue_type = _require_str(obj.get("type"), field_name="type")
description = _require_str(obj.get("description"), field_name="description")
# Repo rule: keep Beads self-contained.
design = _require_str(obj.get("design"), field_name="design")
acceptance_criteria = _require_str(
obj.get("acceptance_criteria"), field_name="acceptance_criteria"
)
labels = _require_str_list(obj.get("labels"), field_name="labels")
dependencies = _require_str_list(obj.get("dependencies"), field_name="dependencies")
return IssueSpec(
title=title,
priority=priority,
issue_type=issue_type,
description=description,
design=design,
acceptance_criteria=acceptance_criteria,
labels=labels,
dependencies=dependencies,
)
def _render_section(name: str, content: str) -> str:
content = content.strip("\n")
if not content.strip():
return ""
return f"### {name}\n{content}\n\n"
def render_markdown(issues: Iterable[IssueSpec]) -> str:
parts: list[str] = []
for issue in issues:
parts.append(f"## {issue.title}\n\n")
parts.append(_render_section("Priority", str(issue.priority)))
parts.append(_render_section("Type", issue.issue_type))
parts.append(_render_section("Description", issue.description))
parts.append(_render_section("Design", issue.design))
parts.append(_render_section("Acceptance Criteria", issue.acceptance_criteria))
if issue.labels:
parts.append(_render_section("Labels", ", ".join(issue.labels)))
if issue.dependencies:
parts.append(_render_section("Dependencies", ", ".join(issue.dependencies)))
return "".join(parts).rstrip() + "\n"
def _validate_out_path(path: str) -> str:
if os.path.isdir(path):
raise ValueError("--out must be a file path, not a directory")
if not path.lower().endswith((".md", ".markdown")):
raise ValueError("--out must end with .md or .markdown")
return path
def main() -> None:
parser = argparse.ArgumentParser(
description="Generate a Markdown file suitable for `bd create -f` from a JSON plan."
)
parser.add_argument(
"--in",
dest="in_path",
required=True,
help='Path to JSON plan file with shape: {"issues": [ ... ]}',
)
parser.add_argument(
"--out",
dest="out_path",
default=None,
help="Write Markdown to this path. If omitted, a temporary file is created.",
)
parser.add_argument(
"--print-path",
action="store_true",
help="Print only the output markdown path (for scripting).",
)
args = parser.parse_args()
with open(args.in_path, "r", encoding="utf-8") as f:
raw = json.load(f)
if not isinstance(raw, dict) or "issues" not in raw:
raise SystemExit("Input JSON must be an object with key 'issues'")
raw_issues = raw.get("issues")
if not isinstance(raw_issues, list):
raise SystemExit("'issues' must be a list")
issues = [_parse_issue(item) for item in raw_issues]
markdown = render_markdown(issues)
if args.out_path is None:
fd, out_path = tempfile.mkstemp(prefix="bd-plan-", suffix=".md")
os.close(fd)
else:
out_path = _validate_out_path(args.out_path)
with open(out_path, "w", encoding="utf-8") as f:
f.write(markdown)
if args.print_path:
print(out_path)
else:
print(f"Wrote: {out_path}")
if __name__ == "__main__":
main()