docs: DEV_AGENT.md 完善自举能力,新增命令速查表和闭环检查清单
CI / test (pull_request) Successful in 9s

- 新增 agent_poller 8 命令速查表
- 新增闭环完成 12 步检查清单
- 步骤 4 增加 PR 创建后评论 Issue 的步骤
- start_dev_agent.sh 启动提示更新为完整闭环指令

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-31 15:49:42 +08:00
parent c31ddd0bb3
commit e792fac6c0
2 changed files with 45 additions and 2 deletions
+42
View File
@@ -111,6 +111,18 @@ python scripts/agent_poller.py --action create-pr \
Closes #N"
```
PR 创建后,在 Issue 下评论 PR 链接:
```bash
python scripts/agent_poller.py --action comment --issue N \
--body "PR 已创建: <PR_URL>
变更:
- <摘要>
等待 CI 通过后 merge。"
```
### 5. 等待 CI
PR 创建后 CI 自动触发。用 agent_poller 监控状态:
@@ -166,3 +178,33 @@ QE-Agent 开 Issue (qe-feedback)
- **测试**:每次提交前必须确保 `python -m pytest -v` 全量通过
- **范围**:不混入与当前 Issue 无关的改动
- **PR**Push 后立即创建 PRCI 通过后 mergePR 信息写入 Issue 后关闭
## agent_poller 命令速查
| 命令 | 用途 | 阶段 |
|------|------|------|
| `--action list` | 列出所有待处理 Issue | 1. 轮询 |
| `--action get --issue N` | 查看 Issue 详情 | 2. 分析 |
| `--action create-pr --issue N --branch X --body "..."` | 创建 PR | 4. 提 PR |
| `--action comment --issue N --body "..."` | 评论 Issue(记录 PR 链接等) | 4. 提 PR |
| `--action pr-status --pr N` | 查看 PR + CI 状态 | 5. 等 CI |
| `--action merge-pr --pr N` | Merge PR(自动检查 CI | 6. Merge |
| `--action close-issue --issue N --body "..."` | 手动关闭 Issue | 6. 关闭 |
| `--action lifecycle --issue N` | 查看 Issue 完整生命周期 | 随时 |
## 闭环完成检查清单
处理每个 Issue 时,确认以下节点全部完成:
- [ ] **分析**`agent_poller.py --action get` 理解 Issue 内容
- [ ] **分支**`git checkout -b dev/issue-N-<slug>`
- [ ] **开发**:修改功能代码 + 同步更新 UT
- [ ] **测试**`python -m pytest -v` 全量通过
- [ ] **提交**`git commit -m "fix: <描述> - Closes #N"`
- [ ] **推送**`git push origin dev/issue-N-<slug>`
- [ ] **PR**`agent_poller.py --action create-pr` 创建 PR
- [ ] **评论**`agent_poller.py --action comment` 在 Issue 下记录 PR 链接
- [ ] **CI**`agent_poller.py --action pr-status` 确认 CI 通过
- [ ] **合并**`agent_poller.py --action merge-pr` 合并 PR
- [ ] **关闭**:确认 Issue 已自动关闭,否则 `--action close-issue`
- [ ] **验证**`agent_poller.py --action lifecycle` 确认全流程完成