This project uses bd (beads) for issue tracking.
Record a bd comment/notes update for major items of work or significant changes in design/content (brief rationale + links to relevant files/PRs).
Never overwrite or delete .beads/issues.jsonl directly. Always use the bd CLI to make changes.
Never overwrite a beads descritption or comments made by other team members (human or AI). Always append new information either as a new comment or an addition to the description.
Before starting a session that will change something other than .beads/issues.jsonl, ensure you are on a branch named <beads_prefix>-<id>/<short-desc> and that it is up to date with origin/main. Verify git status is clean. If it is not clean (exception: uncommitted changes are allowed in .beads/issues.jsonl, carry them into the work) then pause and check with the Producer before proceeding.
IMPORTANT: This project uses bd (beads) for ALL issue tracking. Do NOT use markdown TODOs, task lists, or other tracking methods.
- Dependency-aware: Track blockers and relationships between issues
- Git-friendly: Auto-syncs to JSONL for version control
- Agent-optimized: JSON output, ready work detection, discovered-from links
- Prevents duplicate tracking systems and confusion
Bead Lifecycle Overview
Beads maintain their stage and stage though a combination of status and labels. Status is a single value representing the current state of the bead, while labels provide additional context and categorization. To set the status of a bead, use the --status flag with the bd update command. To add or remove labels, use the --add-label and --remove-label flags respectively.
Whenever a bead moves between stages, ensure that the appropriate stage label is added and any previous stage labels are removed to accurately reflect its current state.
Status Values:
- open - Ready to be worked on
- in_progress - Currently being worked on
- blocked - Cannot proceed (waiting on dependencies)
- deferred - Deliberately put on ice for later
- closed - Work completed
- tombstone - Deleted issue (suppresses resurrections)
Stage Labels:
- stage:idea - Initial idea stage`
- stage:prd_complete - PRD/requirements complete
- stage:milestones_defined - Milestones (top level epics for the PRD) defined
- stage:planned - Full implementation plan, in the form of subtasks, created
- stage:in_progress - Work in progress
- stage:in_review - code complete, PR created, working on passing review/QA
- stage:done - Completed work, PR merged
Create new issues:
- Before creating a new issue ensure that all details are clear. Pause and ask the user for more information and clarifications as necessary; provide advice and guidance when possible;
- The description should include clear acceptance criteria (definition of done), suggestions for how to implement, and any relevant context or links to related issues/PRs. It should also include a list of files/doc paths that may be created, edited, or deleted while working the issue.
- Search the existing issues to avoid duplicates:
bd search "search terms" --json - Use clear markdown formatting (in string form) in issue content; Use templates when possible (discoverable with
bd template listand viewable withbd template show $NAME) - Select a team member (see
docs/dev/team.md) as ASSIGNEE. If in doubt use$USER. - Always provide a state label (use
--add-label stage:ideaas default if unsure). - Only epics can be created without a parent; all other issue types must have a parent specified with
--parent <parent-id>. - Create the issue and capture the ISSUE_ID with a command such as:
bd create "Issue title" -t bug|feature|task -p 0-4 --description "Issue description" --assignee <assignee> --add-label stage:idea --validate --json bd create "Issue title" -p 1 --deps discovered-from:bd-123 --description "Issue description" --validate --assignee <assignee> --add-label stage:idea --json bd create "Subtask" --parent <epic-id> --description "Issue description" --assignee <assignee> --add-label stage:idea --validate --json # Hierarchical subtask (gets ID like epic-id.1)
- Assign the issue to the chosen owner:
bd update <bead-id> --assignee <assignee> --json
Claim and update:
bd update bd-42 --status in_progress --add-label stage:in_progress --remove-label stage:plan_complete --json
bd update bd-42 --add-label stage:in_review --remove-label stage:in_progress --json
bd update bd-42 --priority 1 --json*Add Comments to Issue:
bd comments add bd-42 "The content of the comment" --actor @your-agent-name --json
bd comments add bd-42 --file /tmp/comment.md --actor @your-agent-name --jsonComplete work:
Issues should only be closed when ALL acceptance criteria are met, all child issues (if any) are also complete and any associated PRs have been merged.
bd close bd-42 --reason "Completed" --add-label stage:done --remove-label stage:in_review --jsonbug- 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)
- Check issue is ready: ensure the issue to be worked on appears in the output of
bd ready - Claim your task:
bd update <id> --status in_progress --assignee @your-agent-name - View details:
bd show <id> --jsonto get all info, including acceptance criteria and related files/paths - Understand context: Run
waif contextto get a comprehensive view of the objectives of the project you are working on. Review, at least,README.mdand any relevant beads linked from the issue for the requested change; - Work on it: Implement, test, document, etc.
- Discover new work? Create linked issue:
bd create "Found bug" -p 1 --deps discovered-from:<parent-id>
- Complete:
bd close <id> --reason "Done" - Commit together: Always commit the
.beads/issues.jsonlfile together with the code changes so issue state stays in sync with code state
- Ask first:
- Re-scoping milestones, high-priority work, or cross-team commitments set by the Producer.
- Retiring/repurposing agents or redefining their roles.
- Approving multi-issue rewrites or new epics that materially change roadmap assumptions.
- Never:
- Create parallel tracking systems outside
bd. - Run destructive git commands (
reset,push --force, branch deletions) or merge changes yourself unless given explicit permission.
- Create parallel tracking systems outside
bd automatically syncs with git:
- Exports to
.beads/issues.jsonlafter changes (5s debounce) - Imports from JSONL when newer (e.g., after
git pull) - No manual export/import needed!
If using GitHub Copilot, also create .github/copilot-instructions.md for automatic instruction loading. Run bd onboard to get the content, or see step 2 of the onboard instructions.
If using Claude or MCP-compatible clients, install the beads MCP server:
pip install beads-mcpAdd to MCP config (e.g., ~/.config/claude/config.json):
{
"beads": {
"command": "beads-mcp",
"args": []
}
}Then use mcp__beads__* functions instead of CLI commands.
AI assistants often create planning and design documents during development:
- PLAN.md, IMPLEMENTATION.md, ARCHITECTURE.md
- DESIGN.md, CODEBASE_SUMMARY.md, INTEGRATION_PLAN.md
- TESTING_GUIDE.md, TECHNICAL_DESIGN.md, and similar files
Best Practice: Use a dedicated directory for these ephemeral files
Recommended approach:
- Create a
history/directory in the project root - Store ALL AI-generated planning/design docs in
history/ - Keep the repository root clean and focused on permanent project files
- Only access
history/when explicitly asked to review past planning
Example .gitignore entry (optional):
# AI planning documents (ephemeral)
history/
Benefits:
- ✅ Clean repository root
- ✅ Clear separation between ephemeral and permanent documentation
- ✅ Easy to exclude from version control if desired
- ✅ Preserves planning history for archeological research
- ✅ Reduces noise when browsing the project
Run bd <command> --help to see all available flags for any command.
For example: bd create --help shows --parent, --deps, --assignee, etc.
- ✅ Use bd for ALL task tracking
- ✅ Always use
--jsonflag for programmatic use - ✅ Link discovered work with discovered-from dependencies
- ✅ Check
waif in-progressbefore asking "what should I work on?" - ✅ Store AI planning docs in
history/directory - ✅ Run
bd <cmd> --helpto discover available flags - ❌ Do NOT create markdown TODO lists
- ❌ Do NOT use external issue trackers
- ❌ Do NOT duplicate tracking systems
- ❌ Do NOT clutter repo root with planning documents
waif next # Find available work
bd show <id> # View issue details
bd update <id> --status in_progress # Claim work
bd close <id> # Complete work
bd sync # Sync with gitWhen ending a work session, you MUST complete ALL steps below. Work is NOT complete until git push succeeds.
MANDATORY WORKFLOW:
- File issues for remaining work - Create issues for anything that needs follow-up
- Run quality gates (if code changed) - Tests, linters, builds
- Update issue status - Close finished work, update in-progress items
- PUSH TO REMOTE - This is MANDATORY once a remote is configured:
git pull --rebase bd sync git push git status # MUST show "up to date with origin" - Clean up - Clear stashes, prune remote branches
- Verify - All changes committed AND pushed
- Hand off - Provide context for next session
CRITICAL RULES:
- NEVER close, or recommend closing, beads unless work is fully complete, including children and sub-tasks per acceptance criteria
- Whenever listing a bead ID ALWAYS add the title in parentheses
- ALWAYS run
bd syncafter any git operation that changes `.beads/issues.jsonl - Work is NOT complete until changes are pushed to the canonical remote
- If no remote is configured yet, configure it first, then push
- NEVER stop before pushing - that leaves work stranded locally
- NEVER say "ready to push when you are" - YOU must push
- If push fails, resolve and retry until it succeeds
- When offering a list of options for next steps always use numbered lists