This project uses bd (beads) for issue tracking. Run bd prime at the start of any session (after compaction, clear, or a new session) to load the workflow context.
bd prime # Load workflow context (run at session start)
bd ready # Find available work
bd show <id> # View issue details
bd update <id> --claim # Atomically claim work
bd update <id> --status in_progress # Or set status explicitly
bd close <id> # Complete work
bd dolt push # Push issue DB to remote (Dolt)
bd dolt pull # Pull issue DB from remote (Dolt)
Note:
bd syncno longer exists in current bd versions. Beads now uses Dolt as the issue database and auto-commits every write to Dolt history. Usebd dolt push/bd dolt pullfor remote sync.
When creating Beads tasks, always include Acceptance Criteria.
Acceptance Criteria: Must Be Verifiable. Each criterion must be something that can be objectively checked, not something vague.
DO NOT use bd edit — it opens an interactive editor ($EDITOR) which AI agents cannot use.
Use bd update with flags instead:
bd update <id> --description "new description"
bd update <id> --title "new title"
bd update <id> --design "design notes"
bd update <id> --notes "additional notes"
bd update <id> --acceptance "acceptance criteria"
# Use stdin for descriptions with special characters (backticks, !, nested quotes)
echo 'Description with `backticks` and "quotes"' | bd create "Title" --description=-
echo 'Updated text' | bd update <id> --description=-
ALWAYS use non-interactive flags with file operations to avoid hanging on confirmation prompts.
Shell commands like cp, mv, and rm may be aliased to include -i (interactive) mode on some systems, causing the agent to hang indefinitely waiting for y/n input.
Use these forms instead:
cp -f source dest # NOT: cp source dest
mv -f source dest # NOT: mv source dest
rm -f file # NOT: rm file
# For recursive operations
rm -rf directory # NOT: rm -r directory
cp -rf source dest # NOT: cp -r source dest
Other commands that may prompt:
scp / ssh — use -o BatchMode=yes to fail instead of promptingapt-get — use -y flagbrew — use HOMEBREW_NO_AUTO_UPDATE=1 env varWhen ending a work session, you MUST complete ALL steps below. Work is NOT complete until git push succeeds.
MANDATORY WORKFLOW:
git pull --rebase
git push
bd dolt push # Sync issue DB to Dolt remote
git status # MUST show "up to date with origin"
CRITICAL RULES:
git push succeedsIMPORTANT: This project uses bd (beads) for ALL issue tracking. Do NOT use markdown TODOs, task lists, or other tracking methods.
Check for ready work:
bd ready --json
Create new issues:
bd create "Issue title" --description="Detailed context" -t bug|feature|task -p 0-4 --json
bd create "Issue title" --description="What this issue is about" -p 1 --deps discovered-from:bd-123 --json
# Use stdin for descriptions with special characters (backticks, !, nested quotes)
echo 'Description with `backticks` and "quotes"' | bd create "Title" --description=- --json
Claim and update:
bd update <id> --claim --json
bd update bd-42 --priority 1 --json
Complete work:
bd close bd-42 --reason "Completed" --json
bug — Something brokenfeature — New functionalitytask — Work item (tests, docs, refactoring)epic — Large feature with subtaskschore — Maintenance (dependencies, tooling)0 — Critical (security, data loss, broken builds)1 — High (major features, important bugs)2 — Medium (default, nice-to-have)3 — Low (polish, optimization)4 — Backlog (future ideas)bd ready shows unblocked issuesbd show <id> --json | jq '.[0] | {id,title,metadata,description,notes}'
The execution metadata keys execution_agent_type, execution_suggested_model, execution_reasoning_effort, execution_mode, and execution_parallel_group are authoritative hints when present. Use description and notes as fallback context.
bd update <id> --claimbd create "Found bug" --description="Details about what was found" -p 1 --deps discovered-from:<parent-id>bd close <id> --reason "Done"bd automatically syncs via Dolt:
bd dolt push / bd dolt pull for remote syncbd sync command — it has been removedNever close a task without verifying ALL acceptance criteria.
Before marking any task complete:
bd show <id> to see the full acceptance criteriaCommon mistakes to avoid:
If any criterion fails: The task is NOT complete. Either fix the gaps or leave it open.
--json flag for programmatic usediscovered-from dependenciesbd ready before asking “what should I work on?”bv (beads_viewer) is a graph-aware triage engine for Beads projects. Instead of parsing the issue DB or hallucinating graph traversal, use robot flags for deterministic, dependency-aware outputs with precomputed metrics (PageRank, betweenness, critical path, cycles, HITS, eigenvector, k-core).
Scope boundary: bv handles what to work on (triage, priority, planning). For agent-to-agent coordination (messaging, work claiming, file reservations), use MCP Agent Mail.
⚠️ CRITICAL: Use ONLY --robot-* flags. Bare bv launches an interactive TUI that blocks your session.
bv --robot-triage is your single entry point. It returns everything you need in one call:
quick_ref: at-a-glance counts + top 3 picksrecommendations: ranked actionable items with scores, reasons, unblock infoquick_wins: low-effort high-impact itemsblockers_to_clear: items that unblock the most downstream workproject_health: status/type/priority distributions, graph metricscommands: copy-paste shell commands for next stepsbv --robot-triage # THE MEGA-COMMAND: start here
bv --robot-next # Minimal: just the single top pick + claim command
# Token-optimized output (TOON) for lower LLM context usage:
bv --robot-triage --format toon
export BV_OUTPUT_FORMAT=toon
bv --robot-next
Planning:
| Command | Returns |
|---|---|
--robot-plan |
Parallel execution tracks with unblocks lists |
--robot-priority |
Priority misalignment detection with confidence |
Graph Analysis:
| Command | Returns |
|---|---|
--robot-insights |
Full metrics: PageRank, betweenness, HITS, eigenvector, critical path, cycles, k-core, articulation points, slack |
--robot-label-health |
Per-label health: health_level, velocity_score, staleness, blocked_count |
--robot-label-flow |
Cross-label dependency: flow_matrix, dependencies, bottleneck_labels |
--robot-label-attention [--attention-limit=N] |
Attention-ranked labels by: (pagerank × staleness × block_impact) / velocity |
History & Change Tracking:
| Command | Returns |
|---|---|
--robot-history |
Bead-to-commit correlations |
--robot-diff --diff-since <ref> |
Changes since ref |
Other Commands:
| Command | Returns |
|---|---|
--robot-burndown <sprint> |
Sprint burndown, scope changes, at-risk items |
--robot-forecast <id\|all> |
ETA predictions with dependency-aware scheduling |
--robot-alerts |
Stale issues, blocking cascades, priority mismatches |
--robot-suggest |
Hygiene: duplicates, missing deps, label suggestions, cycle breaks |
--robot-graph [--graph-format=json\|dot\|mermaid] |
Dependency graph export |
--export-graph <file.html> |
Self-contained interactive HTML visualization |
bv --robot-plan --label backend # Scope to label's subgraph
bv --robot-insights --as-of HEAD~30 # Historical point-in-time
bv --recipe actionable --robot-plan # Pre-filter: ready to work (no blockers)
bv --recipe high-impact --robot-triage # Pre-filter: top PageRank scores
bv --robot-triage --robot-triage-by-track # Group by parallel work streams
bv --robot-triage --robot-triage-by-label # Group by domain
All robot JSON includes:
data_hash — Fingerprint of source data (verify consistency across calls)status — Per-metric state: computed|approx|timeout|skipped + elapsed msas_of / as_of_commit — Present when using --as-ofTwo-phase analysis:
status flagsFor large graphs (>500 nodes): Some metrics may be approximated or skipped. Always check status.
bv --robot-triage | jq '.quick_ref' # At-a-glance summary
bv --robot-triage | jq '.recommendations[0]' # Top recommendation
bv --robot-plan | jq '.plan.summary.highest_impact' # Best unblock target
bv --robot-insights | jq '.status' # Check metric readiness
bv --robot-insights | jq '.Cycles' # Circular deps (must fix!)
bv --robot-label-health | jq '.results.labels[] | select(.health_level == "critical")'
Performance: Phase 1 instant, Phase 2 async (500ms timeout). Prefer --robot-plan over --robot-insights when speed matters. Results cached by data hash.
Use bv instead of parsing the beads DB directly — it computes PageRank, critical paths, cycles, and parallel tracks deterministically.