test: 统一 Agent Issue 轮询 label 体系与创建规则 - Closes #40
CI / test (pull_request) Successful in 8s
CI / test (pull_request) Successful in 8s
- test-dev → test-code:QE-Agent 一致化 label - Dev-Agent 新增 product-code label + [product] 前缀规则 - agent_poller.py 新增 create-issue action - QE/Dev Agent 轮询改为多轮递进:label → title 前缀 → 无标识分析 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+38
-4
@@ -60,7 +60,10 @@ description: AI 开发专家,负责 document_analyzer 项目的功能开发、
|
||||
1. 读取项目章程和全局状态:`docs/PROJECT_CHARTER.md` 和 `docs/GLOBAL_STATE.md`
|
||||
2. 确认环境变量已设置(GITEA_URL, GITEA_REPO, GITEA_API_TOKEN)
|
||||
3. 用 `/loop 10m` 开启 10 分钟间隔的自动轮询
|
||||
4. 轮询内容:`agent_poller.py --action list` 列出所有打开的非纯测试 Issue
|
||||
4. 轮询内容(多轮递进):
|
||||
a. `--action list --labels product-code` — 先捡带 `product-code` 标签的 Issue
|
||||
b. `--action list` 无过滤,筛选 title 带 `[product]` 前缀的无标签 Issue
|
||||
c. 都无则分析无标签、无标识的 Issue,判断是否在 Dev 域内
|
||||
5. 有 issue → 走完整闭环处理(分析 → 开发 → push → PR → CI → merge → 自行验证 → 关闭)
|
||||
6. 无 issue → 报告 "main healthy,无待处理 Issue",等待下次轮询
|
||||
7. 同时保持对话开放,随时响应用户指令
|
||||
@@ -69,17 +72,30 @@ description: AI 开发专家,负责 document_analyzer 项目的功能开发、
|
||||
|
||||
### 1. 轮询 Issue
|
||||
|
||||
使用 `python scripts/agent_poller.py --action list` 列出所有当前开启的 Issue。
|
||||
**第一轮:捡带标签的 Issue**
|
||||
```bash
|
||||
python scripts/agent_poller.py --action list --labels product-code
|
||||
```
|
||||
|
||||
**第二轮:捡无标签但 title 带前缀的 Issue**
|
||||
```bash
|
||||
python scripts/agent_poller.py --action list
|
||||
```
|
||||
从输出中筛选 title 以 `[product]` 开头的无标签 Issue。
|
||||
|
||||
**第三轮:分析无标识 Issue**
|
||||
如果以上两轮都无结果,分析所有无标签、无 title 标识的 Issue,判断是否属于 Dev 域。
|
||||
|
||||
**处理范围**:Dev-Agent 负责处理**所有非纯测试开发**相关的 Issue。具体来说:
|
||||
|
||||
| 处理 | 跳过 |
|
||||
|------|------|
|
||||
| `ci-failure` — CI 测试失败 | 标注为 QE-Agent 负责或纯测试实现的 Issue |
|
||||
| `product-code` — 产品/功能开发 | 标注为 QE-Agent 负责或纯测试实现的 Issue |
|
||||
| `ci-failure` — CI 测试失败 | |
|
||||
| `bug` — 功能缺陷 | |
|
||||
| `qe-feedback` — QE 反馈的功能/质量问题 | |
|
||||
| `feature` / `enhancement` — 新功能或改进需求 | |
|
||||
| 无标签或自定义标签的 Issue | |
|
||||
| `[product]` 前缀的无标签 Issue | |
|
||||
|
||||
**判断原则**:如果 Issue 涉及功能代码、算法逻辑、IR 生成质量、一致性、覆盖率改进 — 你负责。如果 Issue 纯粹是关于测试框架搭建、测试用例编写 — 那是 QE-Agent 的领域。
|
||||
|
||||
@@ -207,12 +223,30 @@ QE-Agent 开 Issue (qe-feedback / bug / ci-failure)
|
||||
- **范围**:不混入与当前 Issue 无关的改动
|
||||
- **PR**:Push 后立即创建 PR,CI 通过后 merge,PR 信息写入 Issue 后关闭
|
||||
|
||||
## Issue 创建规则
|
||||
|
||||
创建 Issue 时,必须指定 label 以明确 Issue 归属:
|
||||
|
||||
- **产品/功能 Issue** → `product-code` label(Dev-Agent 域)
|
||||
```bash
|
||||
python scripts/agent_poller.py --action create-issue \
|
||||
--title "issue 标题" --labels product-code --body "..."
|
||||
```
|
||||
- **测试代码 Issue** → `test-code` label(QE-Agent 域)
|
||||
```bash
|
||||
python scripts/agent_poller.py --action create-issue \
|
||||
--title "[test] issue 标题" --labels test-code --body "..."
|
||||
```
|
||||
- 多个 label 用逗号分隔,如 `--labels "ci-failure,product-code"`
|
||||
|
||||
## agent_poller 命令速查
|
||||
|
||||
| 命令 | 用途 | 阶段 |
|
||||
|------|------|------|
|
||||
| `--action list` | 列出所有待处理 Issue | 1. 轮询 |
|
||||
| `--action list --labels X` | 按标签筛选 Issue | 1. 轮询 |
|
||||
| `--action get --issue N` | 查看 Issue 详情 | 2. 分析 |
|
||||
| `--action create-issue --title "..." --labels X --body "..."` | 创建 Issue | — |
|
||||
| `--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 |
|
||||
|
||||
Reference in New Issue
Block a user