Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 41ecca25f3 | |||
| 7494cf3502 | |||
| 1ae09452d2 | |||
| 4abc56457d | |||
| 3957a32efa |
@@ -78,6 +78,13 @@ export GITEA_USER=pzhang_dev_agent_01 # Dev-Agent 账号
|
|||||||
6. 无 Issue → 报告 "main healthy,无待处理 Issue",等待下次轮询
|
6. 无 Issue → 报告 "main healthy,无待处理 Issue",等待下次轮询
|
||||||
7. 同时保持对话开放,随时响应用户指令
|
7. 同时保持对话开放,随时响应用户指令
|
||||||
|
|
||||||
|
## 上下文管理
|
||||||
|
Context window 有限。当 session 持续较长时间时:
|
||||||
|
1. 根据对话轮次和消息长度估计 context 使用量
|
||||||
|
2. **使用量达 ~80% 时主动使用 `/compact` 压缩对话**
|
||||||
|
3. 压缩时保留:当前 Issue 上下文、`GLOBAL_STATE.md`、`PROJECT_CHARTER.md`、Agent 角色定义
|
||||||
|
4. 压缩后从摘要恢复上下文,继续当前任务
|
||||||
|
|
||||||
## 工作流程
|
## 工作流程
|
||||||
|
|
||||||
### 1. 轮询 Issue
|
### 1. 轮询 Issue
|
||||||
@@ -99,6 +106,8 @@ python scripts/agent_poller.py --action list
|
|||||||
- 运行 `--action blocked-check` 检查阻塞状态是否已解除
|
- 运行 `--action blocked-check` 检查阻塞状态是否已解除
|
||||||
- 关闭 Issue 时会自动检查并解除被其阻塞的 Issue(auto-unblock)
|
- 关闭 Issue 时会自动检查并解除被其阻塞的 Issue(auto-unblock)
|
||||||
|
|
||||||
|
**Label 优先原则**:Issue 的 label 反映创建者(尤其是人类)的显式意图。`product-code` → Dev-Agent 域,`test-code` → QE-Agent 域。即使内容看似不在自身常规范围,只要 label 指定了自己的域就必须 pick up。Label 与内容冲突时,先 pick up 并评论确认,不直接跳过。
|
||||||
|
|
||||||
### 2. 分析 Issue
|
### 2. 分析 Issue
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
@@ -31,6 +31,13 @@ description: "document_analyzer QE-Agent: 自动化验收测试开发与质量
|
|||||||
|
|
||||||
这样 QE-Agent 真正做到 **"默认轮询 + 随时互动"**。
|
这样 QE-Agent 真正做到 **"默认轮询 + 随时互动"**。
|
||||||
|
|
||||||
|
## 上下文管理
|
||||||
|
Context window 有限。当 session 持续较长时间时:
|
||||||
|
1. 根据对话轮次和消息长度估计 context 使用量
|
||||||
|
2. **使用量达 ~80% 时主动使用 `/compact` 压缩对话**
|
||||||
|
3. 压缩时保留:当前 Issue 上下文、`GLOBAL_STATE.md`、`PROJECT_CHARTER.md`、Agent 角色定义
|
||||||
|
4. 压缩后从摘要恢复上下文,继续当前任务
|
||||||
|
|
||||||
## 环境要求
|
## 环境要求
|
||||||
|
|
||||||
开始工作前,确认以下环境变量已设置:
|
开始工作前,确认以下环境变量已设置:
|
||||||
@@ -85,6 +92,8 @@ python scripts/agent_poller.py --action list
|
|||||||
python scripts/agent_poller.py --action list --labels acceptance-failure
|
python scripts/agent_poller.py --action list --labels acceptance-failure
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Label 优先原则**:Issue 的 label 反映创建者(尤其是人类)的显式意图。`test-code` → QE-Agent 域,`product-code` → Dev-Agent 域。即使内容看似不在自身常规范围(如基础设施、agent 配置),只要 label 指定了自己的域就必须 pick up。Label 与内容冲突时,先 pick up 并评论确认,不直接跳过。
|
||||||
|
|
||||||
### Step 2: 领取并分析 Issue
|
### Step 2: 领取并分析 Issue
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
@@ -16,10 +16,22 @@
|
|||||||
- Agent 身份通过各自环境变量设置(Dev: `pzhang_dev_agent_01`,QE: `pzhang_qe_agent_01`)
|
- Agent 身份通过各自环境变量设置(Dev: `pzhang_dev_agent_01`,QE: `pzhang_qe_agent_01`)
|
||||||
- **所有 Gitea API 操作必须通过 `python scripts/agent_poller.py`**,禁止直接 curl 或硬编码 token
|
- **所有 Gitea API 操作必须通过 `python scripts/agent_poller.py`**,禁止直接 curl 或硬编码 token
|
||||||
|
|
||||||
|
## 上下文管理
|
||||||
|
|
||||||
|
Context window 有限。当 session 持续较长时间时:
|
||||||
|
1. 根据对话轮次和消息长度估计 context 使用量
|
||||||
|
2. **使用量达 ~80% 时主动使用 `/compact` 压缩对话**
|
||||||
|
3. 压缩时保留:当前 Issue 上下文、`GLOBAL_STATE.md`、`PROJECT_CHARTER.md`、Agent 角色定义
|
||||||
|
4. 压缩后从摘要恢复上下文,继续当前任务
|
||||||
|
|
||||||
## 核心规则
|
## 核心规则
|
||||||
|
|
||||||
1. 代码改动走完整流程:Issue → 分支 → 开发/UT → pytest → PR → CI → merge → 自行验证 → 关闭 Issue
|
1. 代码改动走完整流程:Issue → 分支 → 开发/UT → pytest → PR → CI → merge → 自行验证 → 关闭 Issue
|
||||||
2. 关闭 Issue 必须包含 4 要素:问题 / 根因 / 修复 / 验证
|
2. 关闭 Issue 必须包含 4 要素:问题 / 根因 / 修复 / 验证
|
||||||
|
3. **Label 优先原则**:Issue 的 label 反映创建者(尤其是人类)的显式意图,Agent 必须尊重
|
||||||
|
- `test-code` → QE-Agent 域,`product-code` → Dev-Agent 域
|
||||||
|
- 即使内容看似不在自身常规范围,只要 label 指定了自己的域,就必须 pick up
|
||||||
|
- Label 与内容明显冲突时,先 pick up 并评论确认,不直接跳过
|
||||||
|
|
||||||
## Agent 模式
|
## Agent 模式
|
||||||
|
|
||||||
|
|||||||
@@ -78,6 +78,13 @@ export GITEA_USER=pzhang_dev_agent_01 # Dev-Agent 账号
|
|||||||
6. 无 issue → 报告 "main healthy,无待处理 Issue",等待下次轮询
|
6. 无 issue → 报告 "main healthy,无待处理 Issue",等待下次轮询
|
||||||
7. 同时保持对话开放,随时响应用户指令
|
7. 同时保持对话开放,随时响应用户指令
|
||||||
|
|
||||||
|
## 上下文管理
|
||||||
|
Context window 有限。当 session 持续较长时间时:
|
||||||
|
1. 根据对话轮次和消息长度估计 context 使用量
|
||||||
|
2. **使用量达 ~80% 时主动使用 `/compact` 压缩对话**
|
||||||
|
3. 压缩时保留:当前 Issue 上下文、`GLOBAL_STATE.md`、`PROJECT_CHARTER.md`、Agent 角色定义
|
||||||
|
4. 压缩后从摘要恢复上下文,继续当前任务
|
||||||
|
|
||||||
## 工作流程
|
## 工作流程
|
||||||
|
|
||||||
### 1. 轮询 Issue
|
### 1. 轮询 Issue
|
||||||
@@ -109,6 +116,8 @@ python scripts/agent_poller.py --action list
|
|||||||
2. 给原 Issue 加上 `blocked` 标签(通过 Gitea API PUT /issues/{num}/labels)
|
2. 给原 Issue 加上 `blocked` 标签(通过 Gitea API PUT /issues/{num}/labels)
|
||||||
- `blocked-check` 会自动检测阻塞解除,但**设置阻塞必须是手动的,且与创建 Issue 原子执行**
|
- `blocked-check` 会自动检测阻塞解除,但**设置阻塞必须是手动的,且与创建 Issue 原子执行**
|
||||||
|
|
||||||
|
**Label 优先原则**:Issue 的 label 反映创建者(尤其是人类)的显式意图,Agent 必须尊重。`product-code` → Dev-Agent 域,`test-code` → QE-Agent 域。即使内容看似不在自身常规范围,只要 label 指定了自己的域就必须 pick up。Label 与内容冲突时,先 pick up 并评论确认,不直接跳过。
|
||||||
|
|
||||||
**处理范围**:Dev-Agent 负责处理**所有非纯测试开发**相关的 Issue。具体来说:
|
**处理范围**:Dev-Agent 负责处理**所有非纯测试开发**相关的 Issue。具体来说:
|
||||||
|
|
||||||
| 处理 | 跳过 |
|
| 处理 | 跳过 |
|
||||||
|
|||||||
@@ -30,6 +30,13 @@ description: QE Agent — 自动化验收测试开发与质量门禁。轮询 Gi
|
|||||||
|
|
||||||
这样 QE-Agent 真正做到 **"默认轮询 + 随时互动"**。
|
这样 QE-Agent 真正做到 **"默认轮询 + 随时互动"**。
|
||||||
|
|
||||||
|
## 上下文管理
|
||||||
|
Context window 有限。当 session 持续较长时间时:
|
||||||
|
1. 根据对话轮次和消息长度估计 context 使用量
|
||||||
|
2. **使用量达 ~80% 时主动使用 `/compact` 压缩对话**
|
||||||
|
3. 压缩时保留:当前 Issue 上下文、`GLOBAL_STATE.md`、`PROJECT_CHARTER.md`、Agent 角色定义
|
||||||
|
4. 压缩后从摘要恢复上下文,继续当前任务
|
||||||
|
|
||||||
## 环境要求
|
## 环境要求
|
||||||
|
|
||||||
开始工作前,确认以下环境变量已设置:
|
开始工作前,确认以下环境变量已设置:
|
||||||
@@ -84,6 +91,8 @@ python scripts/agent_poller.py --action list
|
|||||||
python scripts/agent_poller.py --action list --labels acceptance-failure
|
python scripts/agent_poller.py --action list --labels acceptance-failure
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Label 优先原则**:Issue 的 label 反映创建者(尤其是人类)的显式意图,Agent 必须尊重。`test-code` → QE-Agent 域,`product-code` → Dev-Agent 域。即使内容看似不在自身常规范围(如基础设施、agent 配置),只要 label 指定了自己的域就必须 pick up。Label 与内容冲突时,先 pick up 并评论确认,不直接跳过。
|
||||||
|
|
||||||
### Step 2: 领取并分析 Issue
|
### Step 2: 领取并分析 Issue
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
Reference in New Issue
Block a user