feat(context): add task-routed context manifest (phase 1)

This commit is contained in:
chengma
2026-07-14 12:07:50 +08:00
parent 56fb3a7547
commit 94ff8b7e06
11 changed files with 476 additions and 8 deletions
+11
View File
@@ -77,3 +77,14 @@ tool_timeout_sec = 60
- Gitea / MCP 不可用:允许继续已领取任务的本地工作,不允许领取新任务或猜测远端状态。
- 恢复连接后:先拉取默认分支并重新读取任务 Issue,再提交或更新状态。
- MCP 读取结果与本地 checkout 冲突:以明确记录的提交 SHA 为比较基准,不静默覆盖本地未提交改动。
## 按需读取
启用 [`agent-context.json`](agent-context.json) 后,agent 不用通过 MCP 全量读取 `docs/`:
1. 获取默认分支头 SHA 作为 `context_ref`。
2. 读取清单和 `bootstrap.always_read`。
3. 按本轮任务类型读取对应 `routes`。
4. 保存 `read_file` 返回的文件 SHA;同一会话内 SHA 未变化时复用内容。
Gitea 中的文件与本地 `docs/` 是同一 Git 工件的远端与 checkout,不要再创建第三份人工同步副本。