bkd

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

BKD

BKD

Operate BKD by sending HTTP requests to
$BKD_URL
, which must point at the BKD API root such as
http://host:port/api
.
Keep this entry file small. Load only the references needed for the current turn.
通过向
$BKD_URL
发送HTTP请求来操作BKD,该变量必须指向BKD API根地址,例如
http://host:port/api
保持该入口文件简洁,仅加载当前轮次所需的引用。

Always-On Rules

常驻规则

  1. Confirm
    $BKD_URL
    before making any request. If it is missing, ask for it.
  2. Prefer
    curl -s
    piped to
    jq
    so results are easy to inspect.
  3. Use the safe issue execution flow: create in
    todo
    -> follow-up -> move to
    working
    .
  4. Check
    /processes/capacity
    before starting any execution.
  5. Move finished work to
    review
    , not
    done
    . Use
    done
    only after human confirmation.
  6. Use follow-up for all inter-issue communication.
  7. Treat project and issue deletions as soft-delete unless the API says otherwise.
  8. Expect all responses to use
    { success, data }
    or
    { success, error }
    .
  9. Never use
    sleep
    to wait for subtasks or long-running operations. Create a cron job (
    issue-follow-up
    ) to callback the coordinator issue on a schedule, then let the current turn end.
  1. 发起任何请求前先确认
    $BKD_URL
    ,如果缺失请询问用户。
  2. 优先使用
    curl -s
    管道传输给
    jq
    ,方便查看结果。
  3. 使用安全的issue执行流程:在
    todo
    状态下创建 -> 跟进 -> 移动到
    working
    状态。
  4. 启动任何执行前先检查
    /processes/capacity
    接口。
  5. 将已完成的工作移动到
    review
    状态,而非
    done
    。仅在人工确认后才使用
    done
    状态。
  6. 所有issue间的沟通都使用跟进功能。
  7. 除非API另有说明,否则将项目和issue删除视为软删除。
  8. 所有响应格式均为
    { success, data }
    { success, error }
  9. 永远不要使用
    sleep
    等待子任务或长时间运行的操作。创建定时任务(
    issue-follow-up
    )按计划回调协调issue,然后结束当前轮次。

Core Workflow

核心工作流

Single Issue Execution

单个issue执行

bash
undefined
bash
undefined

1. Create issue

1. Create issue

ISSUE=$(curl -s -X POST "$BKD_URL/projects/{projectId}/issues"
-H 'Content-Type: application/json'
-d '{"title":"short title","statusId":"todo"}') ISSUE_ID=$(echo "$ISSUE" | jq -r '.data.id')
ISSUE=$(curl -s -X POST "$BKD_URL/projects/{projectId}/issues"
-H 'Content-Type: application/json'
-d '{"title":"short title","statusId":"todo"}') ISSUE_ID=$(echo "$ISSUE" | jq -r '.data.id')

2. Send details

2. Send details

curl -s -X POST "$BKD_URL/projects/{projectId}/issues/$ISSUE_ID/follow-up"
-H 'Content-Type: application/json'
-d '{"prompt":"full implementation details"}' | jq
curl -s -X POST "$BKD_URL/projects/{projectId}/issues/$ISSUE_ID/follow-up"
-H 'Content-Type: application/json'
-d '{"prompt":"full implementation details"}' | jq

3. Start execution

3. Start execution

curl -s -X PATCH "$BKD_URL/projects/{projectId}/issues/$ISSUE_ID"
-H 'Content-Type: application/json'
-d '{"statusId":"working"}' | jq
undefined
curl -s -X PATCH "$BKD_URL/projects/{projectId}/issues/$ISSUE_ID"
-H 'Content-Type: application/json'
-d '{"statusId":"working"}' | jq
undefined

Quick Operations

快速操作

bash
undefined
bash
undefined

Health check

Health check

curl -s "$BKD_URL/health" | jq
curl -s "$BKD_URL/health" | jq

Execution capacity

Execution capacity

curl -s "$BKD_URL/processes/capacity" | jq
curl -s "$BKD_URL/processes/capacity" | jq

Monitor logs (last 3 turns, assistant messages only)

Monitor logs (last 3 turns, assistant messages only)

curl -s "$BKD_URL/projects/{projectId}/issues/{issueId}/logs/filter/types/assistant-message/turn/last3" | jq
curl -s "$BKD_URL/projects/{projectId}/issues/{issueId}/logs/filter/types/assistant-message/turn/last3" | jq

Cron jobs

Cron jobs

curl -s "$BKD_URL/cron/actions" | jq curl -s "$BKD_URL/cron" | jq
undefined
curl -s "$BKD_URL/cron/actions" | jq curl -s "$BKD_URL/cron" | jq
undefined

Reference Packs

引用包

Load only what the current task needs:
  • references/rest-api.md
    Use for exact BKD routes, payload shapes, query params, and field lists.
  • references/orchestration.md
    Use for multi-subtask dispatch workflows, mode selection (worktree vs simple), subtask creation and monitoring, and follow-up communication patterns.
  • references/quality-review.md
    Use for subtask self-review responsibilities, coordinator logs filter assessment, and signal classification.
  • references/merge-strategy.md
    Use for worktree branch merging, conflict resolution, post-merge verification, and cleanup after subtasks complete in worktree mode.
仅加载当前任务所需的内容:
  • references/rest-api.md
    用于查询准确的BKD路由、负载结构、查询参数和字段列表。
  • references/orchestration.md
    用于多子任务调度工作流、模式选择(worktree vs simple)、子任务创建与监控,以及跟进沟通模式。
  • references/quality-review.md
    用于子任务自审职责、协调日志过滤评估和信号分类。
  • references/merge-strategy.md
    用于worktree模式下子任务完成后的worktree分支合并、冲突解决、合并后验证和清理。

Quick Routing

快速路由

Choose references by intent:
  • Single issue CRUD, cron jobs, or API details: load
    references/rest-api.md
    .
  • Multi-subtask dispatch or orchestration: load
    references/orchestration.md
    .
  • Subtask quality assessment or code review: load
    references/quality-review.md
    .
  • Branch merging after worktree subtasks: load
    references/merge-strategy.md
    .
  • Full orchestration pipeline: load
    references/orchestration.md
    , then
    references/quality-review.md
    , then
    references/merge-strategy.md
    as each phase is reached.
根据意图选择引用:
  • 单个issue CRUD、定时任务或API详情:加载
    references/rest-api.md
  • 多子任务调度或编排:加载
    references/orchestration.md
  • 子任务质量评估或代码审查:加载
    references/quality-review.md
  • worktree子任务完成后的分支合并:加载
    references/merge-strategy.md
  • 完整编排流水线:依次加载
    references/orchestration.md
    references/quality-review.md
    references/merge-strategy.md
    ,到达对应阶段时加载对应文档。