diff --git a/docs/design/21-unified-toolchain-design.md b/docs/design/21-unified-toolchain-design.md index 10a2c59..c55506c 100644 --- a/docs/design/21-unified-toolchain-design.md +++ b/docs/design/21-unified-toolchain-design.md @@ -203,6 +203,19 @@ issue_assigned: **分支**:test/{issue_number}-{brief} **PR**:#{pr_number} + infrastructure: + steps: + - "根据 Issue body 中的错误来源和日志片段排查问题" + - "修复基础设施问题(CI runner/网络/Gitea/磁盘等)" + - "修复后在 Issue 上 comment 说明修复方式和结果" + - "汇报执行结果" + output_template: | + [Action Report] + **问题**:{problem} + **根因**:{root_cause} + **修复方式**:{fix} + **验证**:{verification} + # toolchain 事件(非 issue_assigned)的模板 ci_failure: steps: @@ -323,7 +336,7 @@ _ACTION_HINTS = { | action_type | 终态信号 | 检测方式 | 兜底 | |-------------|---------|---------|------| | issue_assigned | PR merged 或 Issue closed | webhook: pull_request/closed(merged=true) 或 issues/closed | — | -| ci_failure | CI status 从 fail → success | webhook: CI status 变化 ⚠️ 需 §20 Phase 0 验证 CI status webhook 是否触发 | agent Issue comment 汇报 | +| ci_failure | agent Issue comment 汇报 | Issue comment 检测([Action Report] 标记) | ⚠️ Gitea 1.26.2 不触发 CI status webhook,只能靠 comment 兜底。ticker 可选轮询 Gitea commit status API 作为补充 | | review_result(APPROVED) | PR merged | webhook: pull_request/closed(merged=true) | — | | review_result(CHANGES) | agent push 到分支 | webhook: pull_request/synchronize | — | | review_request | Review 提交 | webhook: pull_request_review | — | @@ -358,6 +371,19 @@ daemon 的 verify 通过 webhook 事件检测终态(不需要检查 comment output_template 作为 steps 的最后一步注入 prompt: +### 7.5 action report 识别规范 + +daemon 通过 webhook `issue_comment/created` 感知到新 comment 后,需要判断是否为 action report。 + +**匹配规则**: +- 精确匹配:comment body 以 `[Action Report]` 开头(允许前导空白) +- 容错策略:如果 body 包含 `[Action Report]`(不要求开头),也接受 +- 大小写不敏感 + +**匹配失败处理**: +- 不匹配的 comment 不触发完成检测 +- 作为普通讨论 comment 处理(agent 之间的 handoff/讨论) + ``` 最后一步:汇报执行结果,在 Issue 上 comment,格式: [Action Report]