Add driver-led feedback recovery for Codex stage harness#3
Open
LUAgam wants to merge 10 commits into
Open
Conversation
Owner
LUAgam
commented
May 26, 2026
- Codex plugin 支持
- 新增 .codex-plugin/plugin.json、AGENTS.md、Codex skills 包装。
- 将 Claude command / skill / agent 概念映射到 Codex 可用的本地 workflow。
- 增加 Codex plugin 安装、使用、示例和受控 artifact 写入策略文档。
- Feedback 显式提交入口
- 新增 harness-feedback-submit command。
- 支持用户明确触发 feedback 流程,而不是只依赖模型判断普通反馈是否应进入 feedback。
- 提交后进入 evidence-pack、council-triage、aggregate、continue 等链路。
- Feedback recovery driver
- 新增 driver-driven recovery 流程。
- feedback continue --execute 不再承担多步推进职责,而是创建 recovery state。
- 新增/强化 feedback drive,由它返回唯一合法下一步 command。
- 移除容易歧义的 next_command、proof_command、canonical_command 等输出字段。
- recovery 流程统一由状态机推进,避免模型自行解释回退流程。
- Canonical stage workflow 回退
- recovery 首步必须指向原阶段 workflow,例如:
- /harness:clarify --reopen
- /harness:spec --reopen
- /harness:plan --reopen
- re-plan / re-spec / re-clarify 降级为确定性登记/合并命令,不再作为回退入口。
- 增加 workflow proof 机制,要求证明本次 recovery 确实执行过对应阶段 workflow。
- Recovery state 与状态推进控制
- 引入 recovery state,用于记录 recovery pipeline、cursor、当前 stage、目标 stage、return stage、proof 等信息。
- 区分 feedback lifecycle status 与 recovery execution state。
- re-complete 不再直接 resolved feedback。
- feedback resolved 只能由 driver 在 gate 通过后设置。
- active recovery 存在时,主流程 gate 会提示继续执行 feedback drive。
- Same-stage / cross-stage recovery 统一模型
- 同阶段 replan 和跨阶段 reopen 都统一成 driver pipeline。
- 模型侧只需要循环:
- 运行 feedback drive
- 执行返回的唯一 command
- 再运行 feedback drive
- 避免让模型判断 SPEC 后是否 PLAN、PLAN 后是否 EXECUTE、何时 close/resolved。
- Feedback STAY_EXECUTE 与 stage-loop 修正
- 修复 feedback STAY_EXECUTE action flow。
- 优化 feedback stage-loop 流程。
- stage reminder 能正确提示 active feedback recovery。
- 修复 reminder 中 harnessctl 路径获取问题。
- Hook / guard 修复
- 修复 Bash 读取 .harness JSON 被误判为手工写受控状态的问题。
- 允许只读访问,例如 json.load(open(...))、open(...).read()、open(..., "r")。
- 收窄写入检测,只拦截明确写入模式:
- json.dump
- write_text
- write_bytes
- .write(
- shell redirection / tee 写 .harness
- open(..., "w/a/x/+")
- 增强 write guard 对受控 feedback/recovery 状态的保护。
- 文档和 skill 指引更新
- 更新 commands/harness-feedback.md、commands/harness-feedback-submit.md。
- 更新 skills/feedback-triage、re-plan、re-spec、re-clarify。
- 明确 feedback recovery 不是直接修当前反馈,而是基于 triage 结果回退到对应阶段 workflow。
- 明确只执行 feedback drive 返回的 command,不要自行选择后续命令。
- 测试覆盖
- 增加/更新 feedback orchestration、feedback v2、feedback reopen 相关测试。
- 增加 hook script 测试,覆盖只读访问不拦截、受控状态写入继续拦截。
- 当前相关测试通过:146 passed。
…d compliance - Update all /harness: references to /stage-harness:harness-* format - Add SLASH_COMMAND_PREFIX constant for dynamic command namespace - Fix hardcoded command references in harnessctl.py output messages - Update slugify() to generate CLI-friendly ASCII slugs with hash fallback - Add trusted CLI write paths for council votes, coverage, verification - Clarify stage-gate check --advance usage in plan/review commands Synced from stage-harness-oms_backup commits: - 15bea8c: commands layer skill reference normalization - 58e25ff: harnessctl.py SLASH_COMMAND_PREFIX namespace fixes - 983c2de: slugify() ASCII-only slug generation with hash suffix Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.