d35fe70c21d341ec270e3c20b5e9d8684fc21761
Approved Plan Continuity Hard Gate
中文說明
這個 repo 目前聚焦兩條與 continuity 直接相關的成果:
- approved plan continuity hard-gate
- auto-next obligation gate
目標是避免以下兩種 failure:
-
continuity failure / auto-next break
- 任務已完成
- 下一步已知
- 但沒有真的 dispatch 下一顆 task
- 流程卻還是被當成正常收尾
-
task-boundary stop / 口頭續跑
- 同一份 approved plan 內其實應該 auto-next
- 但主代理停在 task boundary
- 用 checkpoint / 口頭回報 / session metadata 取代真正 dispatch
目前已完成
A. Continuity hard-gate
- continuity evaluator
- receipt validator 最小欄位驗證
derivedAction/nextDerivedAction納入 continuity 判定dry_run_dispatch不得冒充真 receipt- fake receipt 不得放行
- hook integration 已接入
hooks/force-recall/handler.ts
B. Auto-next obligation gate
- 新 failure reason:
missing_auto_next_dispatch - 同一份 approved plan 中,若:
- 當前 task 已完成
- 下一顆 task 已知
sameApprovedPlan=truetaskBoundaryStop=true- 非
waiting_user/blocked/pending_verification - 非
highRiskStop - 且沒有真實 next dispatch receipt
- ⇒ 直接 fail,不得停在 boundary 等主人再說「繼續」
- receipt linkage hardening:receipt 現在要對到要求的 next-task handoff,而不是只要存在就算過
- 新增最小 linkage 欄位:
nextTaskId - checkpoint / session metadata / stale receipt / dry-run planner intent 不得冒充 auto-next dispatch proof
驗證狀態
node scripts/test_approved_plan_continuity_gate.mjs→17 passed / 0 failednode scripts/test_force_recall_long_task_preflight.mjs→ PASSnode --check hooks/force-recall/handler.ts→ PASSnode --check scripts/approved_plan_continuity_gate.mjs→ PASSnode --check scripts/approved_plan_dispatch_binding.mjs→ PASS
目前限制
- 目前仍主要鎖在 continuity / force-recall 路徑,不是所有 entry points。
sameApprovedPlan的上游證據仍可再更硬。- continuity plugin MVP 仍在後續產品化中,尚未整理成可直接讓其他 OpenClaw 安裝的插件包。
下一步
- continuity 收尾覆核
- 回到 continuity plugin MVP
- 把目前 continuity 內核抽成可安裝、可設定、可測試、可依雙語 README 套用的插件 MVP
English Description
This repository currently focuses on two continuity-related hardening slices:
- approved plan continuity hard-gate
- auto-next obligation gate
It prevents two core failure classes:
- continuity failure / auto-next break
- task-boundary stop disguised as progress
Current State
A. Continuity hard-gate
- continuity evaluator
- minimum receipt validation
derivedAction/nextDerivedActioncontinuity handlingdry_run_dispatchrejected as real receipt- fake receipt rejected
- hook integration in
hooks/force-recall/handler.ts
B. Auto-next obligation gate
- explicit failure reason:
missing_auto_next_dispatch - task-boundary stop is now treated as continuity failure when same-plan auto-next is obligatory
- receipt linkage hardening via
nextTaskId - checkpoint / session metadata / stale receipt / dry-run intent can no longer stand in for real auto-next dispatch proof
Validation
- continuity gate tests passing
- force-recall preflight passing
- syntax checks passing
Current Limitations
- scoped mainly to the continuity / force-recall path
- upstream
sameApprovedPlanevidence can still be hardened further - plugin packaging is still pending
Description
Focused export of approved-plan continuity hard-gate and anti-blackhole watchdog workstream.
Languages
JavaScript
85.4%
TypeScript
14.6%