execution-tracking
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseExecution Tracking
执行跟踪
Abstraction layer for agent execution tracking. Other skills (e.g., spec-management) express intent using abstract terms; this skill translates that intent into concrete CLI commands.
Before first use: Read references/bd-cheatsheet.md for complete command syntax, flags, ID formats, and anti-patterns.
用于Agent执行跟踪的抽象层。其他技能(例如spec-management)使用抽象术语表达意图;此技能将这些意图转换为具体的CLI命令。
首次使用前: 请阅读 references/bd-cheatsheet.md 了解完整的命令语法、参数、ID格式和反模式。
Artifact handoff protocol
工件交接协议
This skill receives handoffs from spec-management based on a four-tier tracking model:
| Tier | Artifacts | This skill's role |
|---|---|---|
| Implementation | SPEC, STORY, BUG | Create a tracked implementation plan and task breakdown before any code is written |
| Coordination | EPIC, VISION, JOURNEY | Do not track directly — spec-management decomposes these into children first, then hands off the children |
| Research | SPIKE | Create a tracked plan when the research is complex enough to benefit from task breakdown |
| Reference | ADR, PERSONA, RUNBOOK | No tracking expected |
If invoked directly on a coordination-tier artifact (EPIC, VISION, JOURNEY) without prior decomposition, defer to spec-management to create child SPECs or STORYs first, then create plans for those children.
本技能基于四层跟踪模型接收来自spec-management的交接:
| 层级 | 工件 | 本技能的角色 |
|---|---|---|
| 实现层 | SPEC, STORY, BUG | 编写任何代码前先创建可跟踪的实现计划和任务拆解 |
| 协调层 | EPIC, VISION, JOURNEY | 不直接跟踪——spec-management先将这些拆解为子项,再交接子项 |
| 研究层 | SPIKE | 当研究复杂度足够高,能从任务拆解中获益时,创建可跟踪的计划 |
| 参考层 | ADR, PERSONA, RUNBOOK | 无需跟踪 |
如果直接在未提前拆解的协调层工件(EPIC、VISION、JOURNEY)上调用本技能,请先委托spec-management创建子SPEC或STORY,再为这些子项创建计划。
Term mapping
术语映射
Other skills use these abstract terms. This skill maps them to the current backend ():
bd| Abstract term | Meaning | bd command |
|---|---|---|
| implementation plan | Top-level container grouping all tasks for a spec artifact | |
| task | An individual unit of work within a plan | |
| origin ref | Immutable link from a plan to the spec that seeded it | |
| spec tag | Mutable label linking a task to every spec it affects | |
| dependency | Ordering constraint between tasks | |
| ready work | Unblocked tasks available for pickup | |
| claim | Atomically take ownership of a task | |
| complete | Mark a task as done | |
| abandon | Close a task that will not be completed | |
| escalate | Abandon + invoke spec-management to update upstream artifacts | Abandon, then invoke spec-management skill |
其他技能使用如下抽象术语,本技能将其映射到当前后端():
bd| 抽象术语 | 含义 | bd命令 |
|---|---|---|
| 实现计划 | 聚合某个规范工件所有任务的顶层容器 | |
| 任务 | 计划内的单个工作单元 | |
| 来源引用 | 计划到其生成来源规范的不可变链接 | 创建epic时使用 |
| 规范标签 | 将任务关联到其影响的所有规范的可变标签 | 创建时使用 |
| 依赖 | 任务之间的顺序约束 | |
| 可认领工作 | 未被阻塞、可以领取的任务 | |
| 认领 | 原子性获取任务所有权 | |
| 完成 | 将任务标记为已完成 | |
| 废弃 | 关闭不会完成的任务 | |
| 升级 | 废弃任务 + 调用spec-management更新上游工件 | 先废弃,再调用spec-management技能 |
Configuration
配置
The skill stores persistent project-level configuration in . This file is created on first run and checked on every subsequent invocation.
.agents/execution-tracking.vars.json本技能将持久化的项目级配置存储在中。该文件会在首次运行时创建,每次调用时都会读取校验。
.agents/execution-tracking.vars.jsonFirst-run setup
首次运行设置
If does not exist, create it by asking the user the questions below (use sensible defaults if the user says "just use defaults"):
.agents/execution-tracking.vars.json| Key | Type | Default | Question |
|---|---|---|---|
| boolean | | "Should bd use Dolt for remote sync? (Requires a running Dolt server)" |
| boolean | | "Run |
| | | "If bd is unavailable, use JSONL or Markdown for the fallback ledger?" |
Write the file as pretty-printed JSON:
json
{
"use_dolt": false,
"auto_prime": true,
"fallback_format": "jsonl"
}On subsequent runs, read the file and apply its values — don't re-ask.
如果不存在,通过询问用户以下问题创建该文件(如果用户说「直接用默认值」则使用合理默认值):
.agents/execution-tracking.vars.json| 键 | 类型 | 默认值 | 问题 |
|---|---|---|---|
| 布尔值 | | "bd是否应该使用Dolt进行远程同步?(需要运行中的Dolt服务器)" |
| 布尔值 | | "引导启动时自动运行 |
| | | "如果bd不可用,使用JSONL还是Markdown作为降级台账格式?" |
将文件写为格式化的易读JSON:
json
{
"use_dolt": false,
"auto_prime": true,
"fallback_format": "jsonl"
}后续运行时直接读取该文件并应用配置,不要重复询问。
Applying config
配置应用
- : When
use_dolt, skip allfalsecommands (start, stop, push, pull). Whenbd dolt *, runtrueduring bootstrap andbd dolt startat session end.bd dolt push - : When
auto_prime, runtrueat bootstrap step 7. Whenbd prime, skip it.false - : Controls the format used by the Fallback section.
fallback_format
- :值为
use_dolt时,跳过所有false命令(start、stop、push、pull);值为bd dolt *时,在引导启动阶段运行true,会话结束时运行bd dolt start。bd dolt push - :值为
auto_prime时,在引导步骤7运行true;值为bd prime时跳过该步骤。false - :控制降级方案部分使用的格式。
fallback_format
Bootstrap workflow
引导工作流
- Load config: Read . If missing, run first-run setup above.
.agents/execution-tracking.vars.json - Check availability:
command -v bd - If missing, install:
- macOS:
brew install beads - Linux:
cargo install beads - If install fails, go to Fallback.
- macOS:
- Check for existing database: look for directory.
.beads/ - If no , initialize:
.beads/.bd init - Validate: . If errors, try
bd doctor --json.bd doctor --fix - If is
use_dolt: start the Dolt server withtrue.bd dolt start - If shows modified
git statusor.beads/dolt-*.pid: these are ephemeral runtime files that were tracked by mistake. See.beads/dolt-server.activity§ "Remediation: Untrack Ephemeral Runtime Files" for the fix..beads/README.md - If is
auto_prime:truefor dynamic workflow context.bd prime
- 加载配置: 读取,如果不存在则运行上述首次运行设置。
.agents/execution-tracking.vars.json - 检查可用性: 执行。
command -v bd - 如果不存在则安装:
- macOS:
brew install beads - Linux:
cargo install beads - 如果安装失败,进入降级方案。
- macOS:
- 检查现有数据库: 查找目录。
.beads/ - 如果没有则初始化: 执行
.beads/。bd init - 校验: 执行,如果有错误尝试运行
bd doctor --json。bd doctor --fix - 如果为
use_dolt: 执行true启动Dolt服务器。bd dolt start - 如果显示有修改的
git status或.beads/dolt-*.pid: 这些是被错误追踪的临时运行时文件,参考.beads/dolt-server.activity§「修复:取消追踪临时运行时文件」解决。.beads/README.md - 如果为
auto_prime: 执行true加载动态工作流上下文。bd prime
Statuses
状态
bd accepts exactly four status values: , , , . It rejects aliases like or . See the cheatsheet for the full status table and valid values.
openin_progressblockedclosedtododoneTo express abandonment, use — see Escalation.
bd close <id> --reason "Abandoned: ..."bd仅接受四种状态值:、、、,会拒绝、等别名。完整状态表和合法值请参考速查手册。
openin_progressblockedclosedtododone要表示任务废弃,请使用——参考升级流程。
bd close <id> --reason "Abandoned: ..."Operating rules
操作规则
- Always use on create/update/close — bd's human-readable output varies between versions, but JSON is stable and machine-parseable. Capture issue IDs from the JSON response so subsequent commands can reference them reliably.
--json - Always include when creating issues — a title alone loses the "why" behind a task. Future agents (or your future self) picking up this work need enough context to act without re-researching.
--description - Create/update tasks at the start of work, after each major milestone, and before final response — this keeps the external tracker useful as a live dashboard rather than a post-hoc record.
- Keep task titles short and action-oriented — they appear in output, tree views, and notifications where space is limited.
bd ready - Store handoff notes in task notes (or
--notes) rather than ephemeral chat context — chat history is lost between sessions, but task notes persist and are visible to any agent or observer.--append-notes - Include references to related artifact IDs in labels (e.g., ) — this makes it possible to query all work touching a given spec with
spec:SPEC-003.bd list -l spec:SPEC-003 - Never use — it opens
bd edit(vim/nano) which blocks agents. Use$EDITORwith inline flags instead.bd update - Prefix abandonment reasons with when closing incomplete tasks — this convention makes abandoned work queryable (
Abandoned:) so nothing silently disappears.bd search "Abandoned:"
- 所有创建/更新/关闭操作**必须使用**参数——bd的人类可读输出会随版本变化,但JSON格式稳定且可被机器解析。从JSON响应中捕获工单ID,后续命令可以可靠引用这些ID。
--json - 创建工单时必须包含——仅标题会丢失任务背后的「为什么」。后续处理该工作的Agent(或未来的你)需要足够的上下文来执行,无需重复调研。
--description - 在工作开始前、每个重要里程碑完成后、最终响应前创建/更新任务——这能让外部追踪器作为实时看板使用,而非事后记录。
- 任务标题保持简短、面向动作——它们会出现在输出、树状视图、通知等空间有限的场景中。
bd ready - 将交接笔记存储在任务笔记中(或
--notes),不要放在临时聊天上下文里——会话之间会丢失聊天历史,但任务笔记会持久化,所有Agent或观察者都可见。--append-notes - 在标签中包含关联工件ID的引用(例如)——这样可以通过
spec:SPEC-003查询关联某个规范的所有工作。bd list -l spec:SPEC-003 - 绝对不要使用——它会打开
bd edit(vim/nano)阻塞Agent执行,改用带内联参数的$EDITOR。bd update - 关闭未完成任务时,在废弃原因前加上前缀——这个约定让废弃工作可被查询(
Abandoned:),避免工作项无声消失。bd search "Abandoned:"
Spec lineage tagging
规范谱系标签
When creating tasks that implement a spec artifact:
bash
undefined创建实现某个规范工件的任务时:
bash
undefinedCreate epic with immutable origin ref
创建带不可变来源引用的epic
bd create "Implement auth" -t epic --external-ref SPEC-003 --json
bd create "Implement auth" -t epic --external-ref SPEC-003 --json
Create child tasks with spec label
创建带规范标签的子任务
bd create "Add JWT middleware" -t task
--parent <epic-id> --labels spec:SPEC-003 --json
--parent <epic-id> --labels spec:SPEC-003 --json
bd create "Add JWT middleware" -t task
--parent <epic-id> --labels spec:SPEC-003 --json
--parent <epic-id> --labels spec:SPEC-003 --json
Add cross-spec impact later
后续添加跨规范影响标签
bd update <task-id> --add-label spec:SPEC-007
bd update <task-id> --add-label spec:SPEC-007
Query all work for a spec
查询某个规范关联的所有工作
bd list -l spec:SPEC-003
bd list -l spec:SPEC-003
Bidirectional link between tasks in different plans
不同计划中任务的双向关联
bd dep relate <task-a> <task-b>
undefinedbd dep relate <task-a> <task-b>
undefinedEscalation
升级流程
When work cannot proceed as designed, use this protocol to abandon tasks and flow control back to spec-management for upstream changes before re-planning.
当工作无法按设计推进时,使用此协议废弃任务,将流程交回spec-management进行上游变更,之后再重新规划。
Triage table
分诊表
| Scope | Situation | Action |
|---|---|---|
| Single task | Alternative approach exists | Abandon task, create replacement under same plan |
| Single task | Spec assumption is wrong | Abandon task, invoke spec-management to update SPEC, create replacement task |
| Multiple tasks | Direction change needed | Abandon affected tasks, create ADR + update SPEC via spec-management, seed new tasks |
| Entire plan | Fundamental rethink required | Abandon all tasks, abandon SPEC (and possibly EPIC) via spec-management, create new SPEC if needed |
| 范围 | 场景 | 操作 |
|---|---|---|
| 单个任务 | 存在替代实现方案 | 废弃任务,在同一计划下创建替代任务 |
| 单个任务 | 规范假设错误 | 废弃任务,调用spec-management更新SPEC,创建替代任务 |
| 多个任务 | 需要调整方向 | 废弃受影响的任务,通过spec-management创建ADR + 更新SPEC,生成新任务 |
| 整个计划 | 需要彻底重新思考 | 废弃所有任务,通过spec-management废弃SPEC(可能包含EPIC),必要时创建新的SPEC |
Abandoning tasks
废弃任务
bash
undefinedbash
undefinedSingle task
单个任务
bd close <id> --reason "Abandoned: <why>" --json
bd close <id> --reason "Abandoned: <why>" --json
Batch — close all open tasks under an epic
批量关闭某个epic下所有未完成的任务
for id in $(bd list --parent <epic-id> --status=open --json | jq -r '.[].id'); do
bd close "$id" --reason "Abandoned: <why>" --json
done
for id in $(bd list --parent <epic-id> --status=open --json | jq -r '.[].id'); do
bd close "$id" --reason "Abandoned: <why>" --json
done
Preserve in-progress notes before closing
关闭前保留进行中的笔记
bd update <id> --append-notes "Abandoning: <context about partial work>"
bd close <id> --reason "Abandoned: <why>" --json
undefinedbd update <id> --append-notes "Abandoning: <context about partial work>"
bd close <id> --reason "Abandoned: <why>" --json
undefinedEscalation workflow
升级工作流
-
Record the blocker. Append notes to the plan epic explaining why work cannot proceed:bash
bd update <epic-id> --append-notes "Blocked: <description of blocker>" -
Invoke spec-management. Choose the appropriate scope:
- Spec tweak — update the SPEC's assumptions or requirements, then return here.
- Design pivot — create an ADR documenting the decision change, update affected SPECs, then return here.
- Full abandon — transition the SPEC (and possibly EPIC) to Abandoned phase via spec-management.
-
Seed replacement plan from the updated spec. Create a new implementation plan linked to the same (or new) SPEC via origin ref:bash
bd create "Implement <updated approach>" -t epic --external-ref <SPEC-ID> --json -
Link lineage. Preserve traceability between abandoned and replacement work:
- Use the same labels on new tasks.
spec:<SPEC-ID> - Reference abandoned task IDs in the new epic's description or notes:
bash
bd update <new-epic-id> --append-notes "Replaces abandoned tasks: <old-id-1>, <old-id-2>"
- Use the same
-
记录阻塞原因。 向计划epic追加笔记,说明工作无法推进的原因:bash
bd update <epic-id> --append-notes "Blocked: <description of blocker>" -
调用spec-management。 选择合适的处理范围:
- 规范微调——更新SPEC的假设或需求,然后返回本流程。
- 设计转向——创建ADR记录决策变更,更新受影响的SPEC,然后返回本流程。
- 完全废弃——通过spec-management将SPEC(可能包含EPIC)转为废弃阶段。
-
基于更新后的规范生成替代计划。 创建新的实现计划,通过来源引用关联到同一个(或新的)SPEC:bash
bd create "Implement <updated approach>" -t epic --external-ref <SPEC-ID> --json -
链接谱系。 保留废弃工作和替代工作之间的可追溯性:
- 新任务使用相同的标签。
spec:<SPEC-ID> - 在新epic的描述或笔记中引用废弃任务ID:
bash
bd update <new-epic-id> --append-notes "Replaces abandoned tasks: <old-id-1>, <old-id-2>"
- 新任务使用相同的
Cross-spec escalation
跨规范升级
When abandoned tasks carry multiple labels, each referenced spec may need upstream changes. Check every spec label on the abandoned tasks and invoke spec-management for each affected spec before re-planning.
spec:bash
undefined当废弃任务带有多个标签时,每个被引用的规范可能都需要上游变更。检查废弃任务上的所有规范标签,重新规划前为每个受影响的规范调用spec-management。
spec:bash
undefinedList spec labels on an abandoned task
列出废弃任务上的规范标签
bd show <id> --json | jq -r '.labels[]' | grep '^spec:'
undefinedbd show <id> --json | jq -r '.labels[]' | grep '^spec:'
undefined"What's next?" flow
「下一步做什么?」流程
When asked what to work on next, show ready work from the execution backend:
bash
undefined当被询问下一步应该做什么时,展示执行后端的可认领工作:
bash
undefinedCheck for bd availability and initialization
检查bd可用性和初始化状态
command -v bd && [ -d .beads ]
command -v bd && [ -d .beads ]
Show unblocked tasks (blocker-aware)
展示未被阻塞的任务(感知依赖阻塞)
bd ready --json
bd ready --json
If there are in-progress tasks, show those too
如果有进行中的任务,也一并展示
bd list --status=in_progress --json
If bd is initialized and has tasks, present the results. If bd is not initialized or has no tasks, report that and defer to the spec-management skill's `specgraph.sh next` for artifact-level guidance.
When invoked from the spec-management skill's combined "what's next?" flow, this skill provides the **task layer** — concrete claimable work items — complementing the spec layer's artifact-level readiness view.bd list --status=in_progress --json
如果bd已初始化且有任务,展示结果。如果bd未初始化或没有任务,报告该情况,委托spec-management技能的`specgraph.sh next`提供工件级别的指导。
当从spec-management技能的组合「下一步做什么?」流程中调用时,本技能提供**任务层**——具体可认领的工作项,补充规范层的工件级就绪视图。Observer pattern expectations
观察者模式预期
- Maintain compact current-status view: and
bd status.bd list --pretty - Ensure blockers are explicit: shows issues with unsatisfied deps.
bd blocked - Use consistent labels so supervisors can filter by stream, owner, or phase.
- 维护简洁的当前状态视图:和
bd status。bd list --pretty - 确保阻塞原因明确:展示未满足依赖的工单。
bd blocked - 使用统一的标签,便于管理者按业务线、负责人或阶段过滤。
Plan ingestion (superpowers integration)
计划导入(superpowers集成)
When a superpowers plan file exists (produced by the skill), use the ingestion script instead of manually decomposing tasks. The script parses the plan's blocks and registers them in bd with full spec lineage.
writing-plans### Task N:Script location: (relative to this skill)
scripts/ingest-plan.py当存在superpowers计划文件(由技能生成)时,使用导入脚本而非手动拆解任务。该脚本会解析计划的区块,将其注册到bd中,并保留完整的规范谱系。
writing-plans### Task N:脚本位置: (相对于本技能的路径)
scripts/ingest-plan.pyWhen to use
适用场景
- A superpowers plan file exists at
docs/plans/YYYY-MM-DD-<name>.md - The plan follows the format (header +
writing-plansblocks)### Task N: - You have an origin-ref artifact ID to link the plan to
- 路径下存在superpowers计划文件
docs/plans/YYYY-MM-DD-<name>.md - 计划遵循格式(头部 +
writing-plans区块)### Task N: - 你有来源引用工件ID可以关联到计划
Usage
使用方法
bash
undefinedbash
undefinedParse and register in bd
解析并注册到bd
python3 scripts/ingest-plan.py <plan-file> <origin-ref>
python3 scripts/ingest-plan.py <plan-file> <origin-ref>
Parse only (preview without creating bd tasks)
仅解析(预览,不创建bd任务)
python3 scripts/ingest-plan.py <plan-file> <origin-ref> --dry-run
python3 scripts/ingest-plan.py <plan-file> <origin-ref> --dry-run
With additional labels
带额外标签
python3 scripts/ingest-plan.py <plan-file> <origin-ref> --labels epic:EPIC-009
undefinedpython3 scripts/ingest-plan.py <plan-file> <origin-ref> --labels epic:EPIC-009
undefinedWhat it does
功能说明
- Parses the plan header (title, goal, architecture, tech stack)
- Splits on boundaries
### Task N: - Creates a bd epic with
--external-ref <origin-ref> - Creates child tasks with and full task body as description
--labels spec:<origin-ref> - Wires sequential dependencies (Task N+1 depends on Task N)
- 解析计划头部(标题、目标、架构、技术栈)
- 按边界拆分内容
### Task N: - 创建带的bd epic
--external-ref <origin-ref> - 创建子任务,附带,将完整任务内容作为描述
--labels spec:<origin-ref> - 建立顺序依赖(任务N+1依赖任务N)
When NOT to use
不适用场景
- The plan file doesn't follow superpowers format — fall back to manual task breakdown
- You need non-sequential dependencies — use the script, then adjust deps manually with
bd dep add - The plan is very short (1-2 tasks) — manual creation is faster
- 计划文件不遵循superpowers格式——降级为手动任务拆解
- 需要非顺序依赖——先用脚本,再通过手动调整依赖
bd dep add - 计划非常短(1-2个任务)——手动创建更快
Fallback
降级方案
If cannot be installed or is unavailable:
bd- Log the failure reason.
- Fall back to a neutral text task ledger (JSONL or Markdown checklist) in the working directory.
- Use the same status model (,
open,in_progress,blocked) and keep updates externally visible.closed
如果无法安装或不可用:
bd- 记录失败原因。
- 降级为工作目录下的中性文本任务台账(JSONL或Markdown检查清单)。
- 使用相同的状态模型(、
open、in_progress、blocked),保持更新对外可见。closed