ds-unstick

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

ds-unstick

ds-unstick

When two fixes fail the same way, the problem is usually a wrong belief, not a wrong edit. Find that belief and test it.
当两次修复以相同方式失败时,问题通常出在某个错误认知,而不是某次错误修改。找出这个认知并直接验证它。

Steps

步骤

  1. Stop editing. Do not try a third variation of the same fix.
  2. Write down each failed attempt in one line: what you changed and what happened. Include the exact error text.
  3. Write the assumption that all of those attempts shared. Typical examples: "this file is the one that runs", "the config is loaded", "the function receives a string", "the cache is cleared", "the error comes from my code". Name one, in one sentence.
  4. Test that assumption directly with the cheapest probe that gives a yes or no answer: a print statement, a log line, a
    which
    or
    --version
    , a grep for the real call site, a minimal script, or a read of the docs for the exact version installed. Paste the result.
  5. If the assumption is false, you have found the real problem. Plan the fix from the new fact.
  6. If the assumption holds, list 3 different approaches. "Different" means another mechanism, library, layer or data path, not a tweak of the same edit. Give each approach one line on cost and risk.
  7. Pick one approach and say why in one sentence.
  8. Restart from a clean state if the failed attempts left debris: revert them with git (
    git stash
    or
    git checkout -- <files>
    ), then apply only the chosen approach.
  9. Record the false assumption or the chosen approach in PROGRESS.md (see ds-context-reset) so a later session does not repeat the attempts.
  10. Return to ds-verify-loop with the new approach.
  1. 停止编辑。不要尝试对同一修复做第三个变体。
  2. 用一行记录每次失败尝试:改了什么,以及发生了什么。包括确切的错误文本。
  3. 写出所有尝试共有的假设。典型例子:“这个文件就是实际运行的文件”“配置已加载”“函数接收到的是字符串”“缓存已清除”“错误来自我的代码”。用一句话指明其中一个。
  4. 使用能给出是或否答案的最低成本探针直接测试该假设:一条
    print
    语句、一行日志、一次
    which
    或
    --version
    、一次针对真实调用位置的 grep、一个最小脚本,或阅读当前已安装确切版本的文档。粘贴结果。
  5. 如果假设为假,你就已经找到了真正的问题。根据新事实制定修复方案。
  6. 如果假设成立,列出 3 种不同的方案。“不同”意味着采用另一种机制、库、层或数据路径,而不是对同一次修改进行微调。用一行说明每种方案的成本和风险。
  7. 选择一种方案,并用一句话说明原因。
  8. 如果失败的尝试留下了残留内容,请从干净状态重新开始:使用 git 回退这些修改(
    git stash
    或
    git checkout -- <files>
    ),然后仅应用选定的方案。
  9. 在 PROGRESS.md 中记录错误假设或选定方案(参见 ds-context-reset),避免后续会话重复这些尝试。
  10. 使用新方案返回 ds-verify-loop。

Stop when

停止条件

  • The probe in step 4 explains the failure, or the new approach passes its check.
  • Two rounds of this skill have failed. Stop and report to the user: the attempts, the assumptions you tested, and the evidence. Ask for direction.
  • 第 4 步的探针解释了故障原因,或者新方案通过了检查。
  • 此 skill 已进行两轮但仍然失败。停止并向用户报告:尝试过的方案、验证过的假设以及相关证据。请用户决定下一步方向。

Rules

规则

  • Do not repeat a fix that has already failed, even with small changes.
  • Evidence beats reasoning. If a probe takes a minute, run it.
  • Keep the failed-attempt list, because it is the most useful part of the report.
  • Use a clean state before a new approach, so that old edits cannot hide the result.
  • 不要重复已经失败的修复,即使只做小幅修改也不行。
  • 证据胜过推理。如果一个探针只需一分钟,就立即运行。
  • 保留失败尝试列表,因为它是最有用的报告内容。
  • 采用新方案前先恢复到干净状态,避免旧修改掩盖结果。