test: 添加 Agent session 上下文压缩规则 — Closes #115
CI / test (pull_request) Successful in 18s

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-06-08 14:14:55 +08:00
parent 67d0209e2b
commit 3957a32efa
5 changed files with 35 additions and 0 deletions
+7
View File
@@ -78,6 +78,13 @@ export GITEA_USER=pzhang_dev_agent_01 # Dev-Agent 账号
6. 无 Issue → 报告 "main healthy,无待处理 Issue",等待下次轮询
7. 同时保持对话开放,随时响应用户指令
## 上下文管理
Context window 有限。当 session 持续较长时间时:
1. 根据对话轮次和消息长度估计 context 使用量
2. **使用量达 ~80% 时主动使用 `/compact` 压缩对话**
3. 压缩时保留:当前 Issue 上下文、`GLOBAL_STATE.md``PROJECT_CHARTER.md`、Agent 角色定义
4. 压缩后从摘要恢复上下文,继续当前任务
## 工作流程
### 1. 轮询 Issue