🐛 fix(main_loop): enforce plan lifecycle ordering

Claim the first executable plan in plan-file order after resuming any in-progress plan, preserve skipped as its own workflow phase, and document the required post-done commit gate in the agent rules.
This commit is contained in:
csh
2026-05-27 14:07:09 +08:00
parent 61afff9d48
commit 1a3ea1f425
6 changed files with 221 additions and 48 deletions
@@ -31,7 +31,8 @@
2. 运行与本次改动直接相关的验证命令
3. 记录命令、结果和关键输出
4. 复核 diff 是否只包含预期修改
5. 复核 `workflow-state.phase``plan-status` 与当前声明一致
5. 如本轮来自 `main_loop.py claim`复核 `workflow-state.phase`
`plan-status` 与当前声明一致
6. 汇总未覆盖项和剩余风险
## 输出协议
@@ -52,8 +53,9 @@
## 状态留痕复核
- `workflow-state.phase` 是否与当前声明一致
- `plan-status` 是否已经通过 `main_loop.py finish` 写回
- 如本轮来自 `main_loop.py claim``workflow-state.phase` 是否与当前声明一致
- 如本轮来自 `main_loop.py claim``plan-status` 是否已经通过
`main_loop.py finish` 写回
- 如为代码类任务,`workflow-state` 中是否保留:
`executor=executing-plans`
`constraints=karpathy-guidelines,.agents,AGENT_RULES`