beads
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseThis skill teaches effective use of beads (), a distributed git-backed issue tracker designed for AI agents. Use beads to track tasks, manage dependencies, and coordinate work across sessions.
bd本技能将教授如何高效使用beads()——一款基于Git的分布式问题跟踪器,专为AI Agent设计。通过beads可跟踪任务、管理依赖关系,并跨会话协调工作。
bdGetting Started
快速开始
First, check if beads is available and initialized:
bash
undefined首先,检查beads是否已安装并初始化:
bash
undefinedCheck if bd is installed
检查bd是否已安装
bd version
bd version
Check if current project has beads initialized
检查当前项目是否已初始化beads
bd status
**If `bd` is not installed**, ask the user which installation method they prefer:
- **npm:** `npm install -g @beads/bd`
- **Homebrew:** `brew install beads` (macOS)
- **Go:** `go install github.com/steveyegge/beads/cmd/bd@latest`
Do not install without user confirmation, as these are global system packages.
**If not initialized in the project**, run:
```bash
bd initFor personal use on shared projects (won't commit to repo):
bash
bd init --stealthFor contributors on forked repos (routes to separate planning repo):
bash
bd init --contributorbd status
**若未安装`bd`**,询问用户偏好的安装方式:
- **npm:** `npm install -g @beads/bd`
- **Homebrew:** `brew install beads`(适用于macOS)
- **Go:** `go install github.com/steveyegge/beads/cmd/bd@latest`
未经用户确认请勿安装,因为这些是全局系统包。
**若项目未初始化**,运行:
```bash
bd init适用于共享项目的个人使用(不会提交到仓库):
bash
bd init --stealth适用于复刻仓库的贡献者(路由至独立的规划仓库):
bash
bd init --contributorEssential Commands
核心命令
| Command | Purpose |
|---|---|
| List tasks with no open blockers (what to work on next) |
| Create a task (priority 0-3, lower = higher priority) |
| View task details and dependencies |
| List all open issues |
| Mark task as complete |
| Update task status |
| Create dependency (child blocked by parent) |
| Force immediate sync to git |
Always use flag for machine-readable output when parsing results.
--json| 命令 | 用途 |
|---|---|
| 列出无未解决阻塞的任务(下一步可开展的工作) |
| 创建任务(优先级0-3,数值越低优先级越高) |
| 查看任务详情与依赖关系 |
| 列出所有未关闭的问题 |
| 标记任务为已完成 |
| 更新任务状态 |
| 创建依赖关系(子任务被父任务阻塞) |
| 强制立即同步至Git |
解析结果时请始终使用参数,以获取机器可读的输出格式。
--jsonTask Hierarchy
任务层级
Beads supports hierarchical IDs for organizing work:
- — Epic (large feature)
bd-a3f8 - — Task under epic
bd-a3f8.1 - — Sub-task
bd-a3f8.1.1
Create hierarchical tasks:
bash
bd create "Epic: User Authentication" -t epic -p 1
bd create "Implement login flow" -p 1 --parent bd-a3f8Beads支持通过层级ID组织工作:
- — 史诗任务(大型功能)
bd-a3f8 - — 史诗任务下的子任务
bd-a3f8.1 - — 二级子任务
bd-a3f8.1.1
创建层级任务:
bash
bd create "Epic: User Authentication" -t epic -p 1
bd create "Implement login flow" -p 1 --parent bd-a3f8Session Workflow
会话工作流
Starting a Session
开启会话
bash
undefinedbash
undefinedSee what's ready to work on
查看可立即开展的工作
bd ready --json
bd ready --json
Pick a task and mark it in progress
选择任务并标记为进行中
bd update <id> --status in_progress
bd update <id> --status in_progress
View full details
查看完整详情
bd show <id> --json
undefinedbd show <id> --json
undefinedDuring Work
工作过程中
bash
undefinedbash
undefinedCreate new tasks as you discover them
发现新任务时创建新条目
bd create "Fix edge case in validation" -p 2
bd create "Fix edge case in validation" -p 2
Add dependencies
添加依赖关系
bd dep add <new-task> <blocking-task>
bd dep add <new-task> <blocking-task>
Update task with notes
为任务添加备注
bd update <id> --notes "Found issue with timezone handling"
undefinedbd update <id> --notes "Found issue with timezone handling"
undefinedEnding a Session ("Land the Plane")
结束会话("收尾工作")
When finishing work, complete ALL these steps:
bash
undefined完成工作时,需执行以下所有步骤:
bash
undefined1. File issues for remaining work
1. 为剩余工作创建任务
bd create "TODO: Add integration tests" -p 2
bd create "TODO: Add integration tests" -p 2
2. Close completed tasks
2. 关闭已完成的任务
bd close <id> --reason "Completed"
bd close <id> --reason "Completed"
3. Sync and push (MANDATORY)
3. 同步并推送(必须执行)
git pull --rebase
bd sync
git push
git pull --rebase
bd sync
git push
4. Verify push succeeded
4. 验证推送是否成功
git status # Must show "up to date with origin"
git status # 必须显示"up to date with origin"
5. Identify next task for follow-up
5. 确定后续任务
bd ready --json
**CRITICAL**: Always push before ending a session. Unpushed work causes coordination problems in multi-agent workflows.bd ready --json
**重要提示**:结束会话前务必推送代码。未推送的工作会在多Agent工作流中引发协作问题。Important Rules
重要规则
DO use bd update
with flags
bd update请使用带参数的bd update
命令
bd updatebash
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"
bd update <id> --status in_progressbash
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"
bd update <id> --status in_progressDO NOT use bd edit
bd edit请勿使用bd edit
命令
bd editThe command opens an interactive editor () which AI agents cannot use. Always use with flags instead.
edit$EDITORbd updateedit$EDITORbd updateDO sync before ending sessions
结束会话前请执行同步
bash
bd sync # Forces immediate export, commit, and pushWithout , changes sit in a 30-second debounce window and may not be committed.
bd syncbash
bd sync # 强制立即导出、提交并推送若未执行,更改会处于30秒的防抖窗口中,可能不会被提交。
bd syncDO include issue IDs in commit messages
请在提交信息中包含任务ID
bash
git commit -m "Fix auth validation bug (bd-abc)"This enables to detect orphaned issues.
bd doctorbash
git commit -m "Fix auth validation bug (bd-abc)"这能让检测到孤立任务。
bd doctorDependency Types
依赖类型
bash
undefinedbash
undefinedHard blocker - child cannot start until parent is done
强阻塞 - 子任务需等待父任务完成后方可启动
bd dep add <child> <parent> --type blocks
bd dep add <child> <parent> --type blocks
Soft link - related but not blocking
弱关联 - 相关但不阻塞
bd dep add <issue1> <issue2> --type related
bd dep add <issue1> <issue2> --type related
Parent-child - hierarchical relationship
父子关系 - 层级关联
bd dep add <child> <parent> --type parent-child
undefinedbd dep add <child> <parent> --type parent-child
undefinedHandling Merge Conflicts
处理合并冲突
If conflicts occur in :
.beads/issues.jsonlbash
undefined若文件出现冲突:
.beads/issues.jsonlbash
undefinedAccept remote version
接受远程版本
git checkout --theirs .beads/issues.jsonl
git checkout --theirs .beads/issues.jsonl
Re-import to database
重新导入至数据库
bd import -i .beads/issues.jsonl
bd import -i .beads/issues.jsonl
Continue with your work
继续工作
undefinedundefinedGit Hooks (Recommended)
Git钩子(推荐)
Install hooks for automatic sync:
bash
bd hooks installThis prevents stale JSONL problems by auto-syncing on commit, merge, push, and checkout.
安装钩子以实现自动同步:
bash
bd hooks install该钩子会在提交、合并、推送与切换分支时自动同步,避免JSONL文件过期问题。
MCP Server Alternative
MCP服务器替代方案
For tighter integration, beads also offers an MCP server () that provides tools directly to your agent. Install via:
beads-mcpbash
pip install beads-mcpThe CLI () and MCP server work with the same underlying database.
bd如需更紧密的集成,beads还提供MCP服务器(),可直接为Agent提供工具。安装方式:
beads-mcpbash
pip install beads-mcpCLI工具()与MCP服务器共用底层数据库。
bdQuick Reference
速查指南
bash
undefinedbash
undefinedWhat should I work on?
我该做什么工作?
bd ready
bd ready
Create a task
创建任务
bd create "Fix bug in login" -p 1
bd create "Fix bug in login" -p 1
Start working
开始工作
bd update bd-xyz --status in_progress
bd update bd-xyz --status in_progress
Done working
完成工作
bd close bd-xyz --reason "Completed"
bd sync
git push
undefinedbd close bd-xyz --reason "Completed"
bd sync
git push
undefined