feat(coordination): add atomic Gitea task workflow (phase 2)

This commit is contained in:
chengma
2026-07-14 12:23:09 +08:00
parent 94ff8b7e06
commit 0a09deacee
18 changed files with 559 additions and 20 deletions
+9
View File
@@ -88,3 +88,12 @@ tool_timeout_sec = 60
4. 保存 `read_file` 返回的文件 SHA;同一会话内 SHA 未变化时复用内容。
Gitea 中的文件与本地 `docs/` 是同一 Git 工件的远端与 checkout,不要再创建第三份人工同步副本。
## Issue / PR 协调
多 agent 协作时遵循 [`gitea-collaboration.md`](gitea-collaboration.md):
- 任务文件保存规格和长期证据,Issue 保存实时状态,PR 保存评审与合并决策。
- 领取互斥依赖唯一 `claims/T-<编号>` 分支;assignee、`status/doing` 和读回仅作状态确认。
- MVP 由单一 dispatcher 串行分配任务并检查 `write_paths`,每个 worker 使用 `agent/<agent-id>/T-<编号>` 和独立 worktree;每任务 claim 只解决同任务重复领取,不单独保证跨任务路径互斥。
- MCP 可创建 claim / 工作分支,但当前没有创建标签或删除分支工具。标签用 `python scripts/setup_gitea_labels.py --repo 【owner/repo】 --apply` 幂等初始化;过期 claim 由维护者通过 UI 或受控 REST 人工回收。