decision-drift-guard

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Decision Drift Guard

决策漂移防护

A supersession is a new accepted user decision replacing an earlier one. Make it explicit before consequential work.
决策替代(supersession) 是指用户已接受的、用于替换先前决策的新决策。在开展后续实质性工作前,需明确该变更。

Steps

步骤

  1. Load the ledger. Path:
    .agents/decision-ledger/sessions/<session-id>.md
    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.
  2. Track decisions. One line per active decision:
    D-<n> | scope | chosen approach | acceptance
    . Suggestions stay proposed until user accepts.
  3. Classify new statement against active decisions in same scope:
Statement means...ClassAction
Same meaningsamecontinue
Adds detail or fixes mistakerefinementupdate record
Separate scopebranchcreate record
"Use this instead"supersessionrun Gate 1
Cannot both holdconflictrun Gate 1
Cannot tellunclearask one question
Watch for: "actually", "instead", "forget that", "on second thought". Compare meaning, not phrase overlap.
  1. Gate 1 (supersession or conflict only): Show old decision, new instruction, impact. Ask: replace, branch, or refine. Wait for choice.
  2. Gate 2 (after replacement confirmed): Touches architecture, public behavior, data shape, security, cost, or irreversible actions: run
    /grilling
    and wait. Otherwise: which old assumption dies, what changes, what must stay.
  3. Commit supersession. Mark old record superseded. Link new with
    supersedes: D-<n>
    . Recompute plan, tests, tool actions. Label stale recommendations.
Completion: one active record per replaced scope, every downstream action uses it.
  1. 加载决策账本。 路径为工作区根目录下的
    .agents/decision-ledger/sessions/<session-id>.md
    。使用宿主会话ID或从首次请求中推导会话ID。每个会话仅读写自身对应的文件。若文件系统不可用:将账本保存在上下文中,并说明持久化功能不可用。
  2. 跟踪决策。 每个活跃决策占一行,格式为:
    D-<n> | scope | chosen approach | acceptance
    。建议在用户接受前始终保持“提议中”状态。
  3. 对新表述进行分类,对比同一范围内的活跃决策:
表述含义分类操作
含义完全一致same(相同)继续执行
补充细节或修正错误refinement(细化)更新记录
属于不同范围branch(分支)创建记录
明确表示“改用这个”supersession(替代)执行Gate 1
两者无法同时成立conflict(冲突)执行Gate 1
无法判断含义unclear(不明确)提出一个问题确认
需留意以下表述:「actually」、「instead」、「forget that」、「on second thought」。应基于语义对比判断,而非仅看短语字面重叠。
  1. Gate 1(仅适用于替代或冲突场景):展示旧决策、新指令、影响范围。询问用户选择:替换、分支还是细化。等待用户决策。
  2. Gate 2(确认替换后执行):若变更涉及架构、公开行为、数据结构、安全、成本或不可逆操作,则执行
    /grilling
    命令并等待结果。否则,需明确:哪些旧假设不再成立、哪些内容会变更、哪些内容必须保留。
  3. 提交决策替代。 将旧记录标记为已替代。使用
    supersedes: D-<n>
    关联新决策与旧决策。重新计算计划、测试、工具操作。为过时的建议打上标签。
完成标准:每个被替换的范围仅有一条活跃记录,所有下游操作均基于该记录执行。

First pass format

首次执行格式

  • Ledger: loaded or unavailable.
  • Classification: supersession or conflict.
  • Old decision:
    <old>
    . New instruction:
    <new>
    . Impact:
    <changes>
    .
  • Paused. Choose:
    replace
    ,
    branch
    , or
    refine
    .
  • 决策账本:已加载 / 不可用
  • 分类:supersession(替代) / conflict(冲突)
  • 旧决策:
    <old>
    。新指令:
    <new>
    。影响:
    <changes>
    。
  • 已暂停。请选择:
    replace
    (替换)、
    branch
    (分支)或
    refine
    (细化)。