🐛 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:
@@ -17,7 +17,8 @@
|
||||
|
||||
## 规则
|
||||
|
||||
- 如果任务状态变更,优先通过 `main_loop.py finish` 留痕
|
||||
- 如本轮来自 `main_loop.py claim` 且任务状态变更,优先通过
|
||||
`main_loop.py finish` 留痕
|
||||
- 未验证内容必须显式说明
|
||||
- 只写对下一轮仍重要的信息
|
||||
- 不手工改写 `workflow-state` 或 `plan-status` 状态块
|
||||
@@ -26,15 +27,18 @@
|
||||
|
||||
1. 核对已完成项与未完成项
|
||||
2. 核对已运行验证与未运行验证
|
||||
3. 核对 `main_loop.py finish` 是否已经写回 `plan-status`
|
||||
4. 核对 `workflow-state.phase` 是否与当前结果一致
|
||||
3. 如本轮来自 `main_loop.py claim`,核对 `main_loop.py finish`
|
||||
是否已经写回 `plan-status`
|
||||
4. 如本轮来自 `main_loop.py claim`,核对 `workflow-state.phase`
|
||||
是否与当前结果一致
|
||||
5. 如需回写上下文,更新 `active-context`、`progress` 上半部分和 `decisions`
|
||||
6. 输出本轮摘要与下一步
|
||||
|
||||
## 状态留痕复核
|
||||
|
||||
- `main_loop.py finish` 是否已经写回 `plan-status`
|
||||
- `workflow-state.phase` 是否与当前结果一致
|
||||
- 如本轮来自 `main_loop.py claim`,`main_loop.py finish` 是否已经写回
|
||||
`plan-status`
|
||||
- 如本轮来自 `main_loop.py claim`,`workflow-state.phase` 是否与当前结果一致
|
||||
- 如为代码类执行,`workflow-state` 中是否保留了
|
||||
`executor=executing-plans` 与既定 `constraints`
|
||||
|
||||
@@ -59,7 +63,7 @@
|
||||
|
||||
## 停止条件
|
||||
|
||||
- 如状态未写回,先完成留痕再收尾
|
||||
- 如已领取 Plan 但状态未写回,先完成留痕再收尾
|
||||
- 如验证不足以支持交付,停止并标记风险
|
||||
|
||||
---
|
||||
|
||||
@@ -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`
|
||||
|
||||
Reference in New Issue
Block a user