decision-drift-guard
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDecision Drift Guard
决策漂移防护
A supersession is a new accepted user decision replacing an earlier one. Make it explicit before consequential work.
决策替代(supersession) 是指用户已接受的、用于替换先前决策的新决策。在开展后续实质性工作前,需明确该变更。
Steps
步骤
-
Load the ledger. Path:relative to worktree root. Use host session ID or derive from first request. Each session reads/writes only its own file. Filesystem fails: keep ledger in context, say persistence unavailable.
.agents/decision-ledger/sessions/<session-id>.md -
Track decisions. One line per active decision:. Suggestions stay proposed until user accepts.
D-<n> | scope | chosen approach | acceptance -
Classify new statement against active decisions in same scope:
| Statement means... | Class | Action |
|---|---|---|
| Same meaning | same | continue |
| Adds detail or fixes mistake | refinement | update record |
| Separate scope | branch | create record |
| "Use this instead" | supersession | run Gate 1 |
| Cannot both hold | conflict | run Gate 1 |
| Cannot tell | unclear | ask one question |
Watch for: "actually", "instead", "forget that", "on second thought". Compare meaning, not phrase overlap.
-
Gate 1 (supersession or conflict only): Show old decision, new instruction, impact. Ask: replace, branch, or refine. Wait for choice.
-
Gate 2 (after replacement confirmed): Touches architecture, public behavior, data shape, security, cost, or irreversible actions: runand wait. Otherwise: which old assumption dies, what changes, what must stay.
/grilling -
Commit supersession. Mark old record superseded. Link new with. Recompute plan, tests, tool actions. Label stale recommendations.
supersedes: D-<n>
Completion: one active record per replaced scope, every downstream action uses it.
-
加载决策账本。 路径为工作区根目录下的。使用宿主会话ID或从首次请求中推导会话ID。每个会话仅读写自身对应的文件。若文件系统不可用:将账本保存在上下文中,并说明持久化功能不可用。
.agents/decision-ledger/sessions/<session-id>.md -
跟踪决策。 每个活跃决策占一行,格式为:。建议在用户接受前始终保持“提议中”状态。
D-<n> | scope | chosen approach | acceptance -
对新表述进行分类,对比同一范围内的活跃决策:
| 表述含义 | 分类 | 操作 |
|---|---|---|
| 含义完全一致 | same(相同) | 继续执行 |
| 补充细节或修正错误 | refinement(细化) | 更新记录 |
| 属于不同范围 | branch(分支) | 创建记录 |
| 明确表示“改用这个” | supersession(替代) | 执行Gate 1 |
| 两者无法同时成立 | conflict(冲突) | 执行Gate 1 |
| 无法判断含义 | unclear(不明确) | 提出一个问题确认 |
需留意以下表述:「actually」、「instead」、「forget that」、「on second thought」。应基于语义对比判断,而非仅看短语字面重叠。
-
Gate 1(仅适用于替代或冲突场景):展示旧决策、新指令、影响范围。询问用户选择:替换、分支还是细化。等待用户决策。
-
Gate 2(确认替换后执行):若变更涉及架构、公开行为、数据结构、安全、成本或不可逆操作,则执行命令并等待结果。否则,需明确:哪些旧假设不再成立、哪些内容会变更、哪些内容必须保留。
/grilling -
提交决策替代。 将旧记录标记为已替代。使用关联新决策与旧决策。重新计算计划、测试、工具操作。为过时的建议打上标签。
supersedes: D-<n>
完成标准:每个被替换的范围仅有一条活跃记录,所有下游操作均基于该记录执行。
First pass format
首次执行格式
- Ledger: loaded or unavailable.
- Classification: supersession or conflict.
- Old decision: . New instruction:
<old>. Impact:<new>.<changes> - Paused. Choose: ,
replace, orbranch.refine
- 决策账本:已加载 / 不可用
- 分类:supersession(替代) / conflict(冲突)
- 旧决策:。新指令:
<old>。影响:<new>。<changes> - 已暂停。请选择:(替换)、
replace(分支)或branch(细化)。refine