@wenaixi/dsh-superpower 7.3.0 → 7.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/README.md +112 -105
  2. package/README.zh.md +216 -0
  3. package/lib/catalog.d.ts +8 -2
  4. package/lib/catalog.d.ts.map +1 -1
  5. package/lib/catalog.js +64 -9
  6. package/lib/catalog.js.map +1 -1
  7. package/lib/client.js +120 -75
  8. package/lib/document.d.ts +8 -2
  9. package/lib/document.d.ts.map +1 -1
  10. package/lib/document.js +14 -4
  11. package/lib/document.js.map +1 -1
  12. package/lib/superpowers.d.ts +6 -0
  13. package/lib/superpowers.d.ts.map +1 -1
  14. package/lib/superpowers.js +25 -2
  15. package/lib/superpowers.js.map +1 -1
  16. package/lib/switches.d.ts +17 -18
  17. package/lib/switches.d.ts.map +1 -1
  18. package/lib/switches.js +78 -31
  19. package/lib/switches.js.map +1 -1
  20. package/package.json +3 -3
  21. package/skills/brainstorming/SKILL.md +234 -170
  22. package/skills/brainstorming/spec-document-reviewer-prompt.md +27 -25
  23. package/skills/brainstorming/visual-companion.md +84 -231
  24. package/skills/diagnosing-superpowers/SKILL.md +107 -43
  25. package/skills/diagnosing-superpowers/prompts/analyst-common.md +32 -18
  26. package/skills/diagnosing-superpowers/prompts/cost-and-time.md +25 -9
  27. package/skills/diagnosing-superpowers/prompts/plan-adherence.md +26 -12
  28. package/skills/diagnosing-superpowers/prompts/quality-evidence.md +23 -8
  29. package/skills/diagnosing-superpowers/prompts/repeated-work.md +25 -14
  30. package/skills/diagnosing-superpowers/prompts/request-conflicts.md +18 -9
  31. package/skills/diagnosing-superpowers/prompts/scrub-audit.md +23 -10
  32. package/skills/diagnosing-superpowers/prompts/scrub.md +25 -12
  33. package/skills/diagnosing-superpowers/prompts/similar-session.md +30 -22
  34. package/skills/diagnosing-superpowers/prompts/skill-timeline.md +26 -12
  35. package/skills/diagnosing-superpowers/prompts/stumbles.md +24 -12
  36. package/skills/diagnosing-superpowers/references/context-safety.md +15 -7
  37. package/skills/diagnosing-superpowers/references/github-issues.md +17 -9
  38. package/skills/diagnosing-superpowers/references/redaction-policy.md +27 -15
  39. package/skills/diagnosing-superpowers/references/session-discovery.md +31 -20
  40. package/skills/diagnosing-superpowers/templates/bundle-README.md +66 -40
  41. package/skills/diagnosing-superpowers/templates/case.md +49 -42
  42. package/skills/diagnosing-superpowers/templates/issue.md +32 -26
  43. package/skills/diagnosing-superpowers/templates/report.md +54 -48
  44. package/skills/dispatching-parallel-agents/SKILL.md +92 -90
  45. package/skills/executing-plans/SKILL.md +345 -197
  46. package/skills/finishing-a-development-branch/SKILL.md +107 -82
  47. package/skills/receiving-code-review/SKILL.md +129 -127
  48. package/skills/requesting-code-review/SKILL.md +52 -50
  49. package/skills/requesting-code-review/code-reviewer.md +132 -111
  50. package/skills/subagent-driven-development/SKILL.md +521 -298
  51. package/skills/subagent-driven-development/implementer-prompt.md +138 -117
  52. package/skills/subagent-driven-development/re-review-prompt.md +80 -48
  53. package/skills/subagent-driven-development/task-reviewer-prompt.md +189 -110
  54. package/skills/systematic-debugging/CREATION-LOG.md +85 -85
  55. package/skills/systematic-debugging/SKILL.md +221 -219
  56. package/skills/systematic-debugging/condition-based-waiting.md +48 -49
  57. package/skills/systematic-debugging/defense-in-depth.md +46 -46
  58. package/skills/systematic-debugging/root-cause-tracing.md +63 -63
  59. package/skills/systematic-debugging/test-academic.md +10 -10
  60. package/skills/systematic-debugging/test-pressure-1.md +40 -40
  61. package/skills/systematic-debugging/test-pressure-2.md +58 -58
  62. package/skills/systematic-debugging/test-pressure-3.md +48 -48
  63. package/skills/test-driven-development/SKILL.md +161 -153
  64. package/skills/test-driven-development/writing-good-tests.md +137 -84
  65. package/skills/using-git-worktrees/SKILL.md +74 -72
  66. package/skills/using-superpowers/SKILL.md +40 -39
  67. package/skills/using-superpowers/references/dsh-tools.md +36 -36
  68. package/skills/verification-before-completion/SKILL.md +85 -83
  69. package/skills/writing-plans/SKILL.md +123 -84
  70. package/skills/writing-skills/SKILL.md +419 -417
  71. package/skills/writing-skills/persuasion-principles.md +118 -118
  72. package/skills/writing-skills/testing-skills-with-subagents.md +190 -190
  73. package/skills/brainstorming/scripts/frame-template.html +0 -213
  74. package/skills/brainstorming/scripts/helper.js +0 -167
  75. package/skills/brainstorming/scripts/server.cjs +0 -715
  76. package/skills/brainstorming/scripts/start-server.sh +0 -204
  77. package/skills/brainstorming/scripts/stop-server.sh +0 -120
@@ -1,128 +1,207 @@
1
- # task reviewer prompt 模板
1
+ # Task Reviewer Prompt Template
2
2
 
3
- 在派发任务评审 subagent 时使用本模板。reviewer 只读取一次任务的 diff,并返回两项裁决:规格符合度与代码质量。
3
+ Use this template when dispatching a task reviewer subagent. The reviewer
4
+ reads the task's diff once and returns two verdicts: spec compliance and
5
+ code quality.
4
6
 
5
- **目的:** 校验单个任务的实现是否完全贴合需求(不多不少),且构建良好(清晰、已测试、易维护)
7
+ **Purpose:** Verify one task's implementation matches its requirements (nothing
8
+ more, nothing less) and is well-built (clean, tested, maintainable)
6
9
 
7
10
  ```
8
11
  Subagent (general-purpose):
9
- description: "评审任务 N(规格 + 质量)"
10
- model: [MODEL — 必填:按 SKILL.md 的模型选择规则选择;若省略则静默继承会话中最昂贵的模型]
12
+ description: "Review Task N (spec + quality)"
13
+ model: [MODEL — REQUIRED: choose per SKILL.md Model Selection; an omitted
14
+ model silently inherits the session's most expensive one]
11
15
  prompt: |
12
- 你正在评审单个任务的实现:先判断是否符合需求,再判断是否构建良好。这是一个任务级别的门禁,而非合并评审——所有任务完成后的全分支广度评审会另行进行。
16
+ You are reviewing one task's implementation: first whether it matches its
17
+ requirements, then whether it is well-built. This is a task-scoped gate,
18
+ not a merge review — a broad whole-branch review happens separately after
19
+ all tasks are complete.
13
20
 
14
- ## 需求内容
21
+ ## What Was Requested
15
22
 
16
- 阅读 task brief:[BRIEF_FILE]
23
+ Read the task brief: [BRIEF_FILE]
17
24
 
18
- 来自规格/设计且约束本任务的全局约束:
25
+ Global constraints from the spec/design that bind this task:
19
26
  [GLOBAL_CONSTRAINTS]
20
27
 
21
- ## 实现者声称已完成的内容
28
+ ## What the Implementer Claims They Built
22
29
 
23
- 阅读实现者的报告:[REPORT_FILE]
30
+ Read the implementer's report: [REPORT_FILE]
24
31
 
25
- ## 待评审的 diff
32
+ ## Diff Under Review
26
33
 
27
34
  **Base:** [BASE_SHA]
28
35
  **Head:** [HEAD_SHA]
29
- **Diff 文件:** [DIFF_FILE]
30
-
31
- 只读取一次 diff 文件——其中包含提交列表、统计摘要以及带上下文的完整 diff,这就是你对本次变更的全部视图。diff 中的上下文行即为变更后的文件内容:除非某段 hunk 在函数中间被截断、导致无法判断,否则不要单独读取被修改的文件——如需这样做,请在报告中说明。不要重新执行 git 命令。如果 diff 文件缺失,请自行获取 diff:
32
- `git diff --stat [BASE_SHA]..[HEAD_SHA]` 和 `git diff [BASE_SHA]..[HEAD_SHA]`。
33
- 不要遍历更广的代码库。仅在你能明确指出具体风险时,才去检查 diff 之外的代码——每个已命名的风险只做一次聚焦检查,并在报告中同时写明风险是什么以及你检查了什么。跨切面变更属于合理的已命名风险:如果 diff 改动了锁顺序、函数或 API 契约、或共享可变状态,检查调用点就是正确的做法。
34
-
35
- 本次评审在当前检出上为只读。不要以任何方式修改 working tree、暂存区、HEAD 或分支状态。
36
-
37
- ## 禁止分发 subagent
38
-
39
- 由你独立完成全部评审。不要衍生 subagent 来分担 diff 的部分评审,也不要为二次意见再派一个 reviewer。本流程已提供了该工作所需的所有评审席位;你衍生的 reviewer 会以全量成本重复其中一个席位,且其裁决不计入结果。如果 diff 过大、单次难以看完,请自行分多遍评审,并在报告中说明。
40
-
41
- ## 不要信任报告
42
-
43
- 将实现者的报告视为未经核实的陈述。它可能不完整、不准确或过于乐观。请以 diff 为准核实其声明。报告中的设计理由同样是陈述:“按 YAGNI 保留”、“有意保持简单”或任何其他解释,都是实现者在给自己的工作打分。请按代码本身的优劣来评判——陈述的理由永远不会降低 finding 的严重级别。
44
-
45
- ## 测试
46
-
47
- 实现者已运行测试,并针对当前代码按 TDD 要求报告了结果与证据。不要为核实其报告而重新运行整个测试套件。仅在阅读代码后产生具体疑点、且现有运行结果无法解答时,才运行测试——此时也只运行聚焦的单项测试,绝不要运行包级别全量套件、竞态检测或重复/高频循环。如果认为有必要做重量级验证,请在报告中建议,而不是直接执行。如果当前环境无法执行命令,请写明你会运行哪条测试。
48
-
49
- 实现者报告的测试输出中的警告或其他噪音即为 finding——测试输出应当是干净的。
50
-
51
- 你看不到的证据不代表不存在。如果报告或其中的测试证据看起来被截断,或你找不到其声称的结果,请按其标注的路径重新读取该文件——如果确实缺失或格式错乱,请作为面向控制器的缺口上报。重新运行套件来补全你没读到的内容不叫验证;证据不可读不等于证据无效。
52
-
53
- ## 第一部分:规格符合度
54
-
55
- 将 diff 与“需求内容”逐项对比:
56
-
57
- - **缺失:** 遗漏、跳过或声称已实现但实际未实现的需求
58
- - **多余:** 未被要求的功能、过度设计、不必要的“锦上添花”
59
- - **误解:** 功能方向正确但实现方式错误,或解决了错误的问题
60
-
61
- 如果 brief 中列出了多个文件且每个文件各有改动(批量派发),请逐文件对照 diff 检查:每个列出的文件都必须有对应的 hunk。brief 中列出但 diff 始终未触及的文件,即为“缺失”finding,无论批次中其余部分看起来多么干净。
62
-
63
- 如果某项需求仅凭本 diff 无法验证(它位于未变更的代码中或跨多个任务),请将其记为 [WARN] 项,而不是扩大检索范围。
64
-
65
- ## 第二部分:代码质量
66
-
67
- **代码质量:**
68
- - 关注点是否清晰分离?
69
- - 错误处理是否得当?
70
- - 是否做到 DRY 且无过早抽象?
71
- - 边界情况是否已处理?
72
-
73
- **测试:**
74
- - 新增与变更的测试是否验证了真实行为,而非仅验证 mock?
75
- - 任务的边界情况是否已覆盖?
76
-
77
- **结构:**
78
- - 每个文件是否职责单一、接口清晰?
79
- - 单元是否已拆分到可独立理解与测试的程度?
80
- - 实现是否遵循了计划中的文件结构?
81
- - 本次变更是否产生了已经很大的新文件,或显著增大了现有文件?(不要对变更前已有的文件体积做评价——只关注本次变更带来的增量。)
82
-
83
- 报告应当指向证据:每条 finding 以及所有本可用一句“是”带过的检查,都需给出 file:line 引用。一份精炼且带行号引用的报告,能让控制器获得所需的一切信息。
84
-
85
- 你的最终消息即为报告本身:直接以规格符合度裁决开头。每一行都应是裁决、带 file:line 的 finding、或你已执行的检查——不要写前言、过程叙述或收尾总结。
86
-
87
- ## 评级校准
88
-
89
- 按实际严重程度对 finding 分级。并非所有问题都是 Critical。
90
- Important 表示该任务在修复前不可信:错误或脆弱的行为、遗漏的需求、或足以阻断合并的可维护性损伤——例如逻辑块的逐字重复、被吞掉的错误、断言空洞的测试。“覆盖可以更广”和打磨类建议属于 Minor。
91
- 如果计划或 brief 明确要求了按本标准应判为缺陷的内容(例如断言空洞的测试、逻辑块的逐字重复),这依然算 finding——请按 Important 级别上报,并标注为 plan-mandated。计划的作者身份不为其自身打分;最终由人来定夺。
92
- 在列出问题前,先肯定做得好的地方——准确的表扬有助于实现者信任后续的反馈。
93
-
94
- ## 输出格式
95
-
96
- ### 规格符合度
97
-
98
- - [OK] 符合规格 | [FAIL] 发现问题:[缺失/多余/误解的内容,并附 file:line 引用]
99
- - [WARN] 无法仅凭 diff 验证:[仅凭 diff 无法验证的需求,以及控制器应如何检查——需与上述 [OK]/[FAIL] 裁决一并报告,针对已可验证的部分给出结论]
100
-
101
- ### 优点
102
- [做得好的地方?请具体说明。]
103
-
104
- ### 问题
105
-
106
- #### Critical(必须修复)
107
- #### Important(建议修复)
108
- #### Minor(可选优化)
109
-
110
- 每个问题需包含:file:line、问题是什么、为什么重要、如何修复(若不明显)。
111
-
112
- ### 评估
113
-
114
- **任务质量:** [Approved | Needs fixes]
115
-
116
- **理由:** [1-2 句技术性评估]
36
+ **Diff file:** [DIFF_FILE]
37
+
38
+ Read the diff file once — it contains the commit list, a stat summary,
39
+ and the full diff with surrounding context, and it is your view of the
40
+ change. The diff's context lines ARE the changed files: do not Read a
41
+ changed file separately unless a hunk you must judge is cut off
42
+ mid-function — and say so in your report. Do not re-run git commands.
43
+ If the diff file is missing, fetch the diff yourself:
44
+ `git diff --stat [BASE_SHA]..[HEAD_SHA]` and `git diff [BASE_SHA]..[HEAD_SHA]`.
45
+ Do not crawl the broader codebase. Inspect code outside the diff only
46
+ to evaluate a concrete risk you can name — one focused check per named
47
+ risk, and name both the risk and what you checked in your report.
48
+ Cross-cutting changes are legitimate named risks: if the diff changes
49
+ lock ordering, a function or API contract, or shared mutable state,
50
+ checking the call sites is the right method.
51
+
52
+ Your review is read-only on this checkout. Do not mutate the working
53
+ tree, the index, HEAD, or branch state in any way.
54
+
55
+ ## You Do Not Dispatch Subagents
56
+
57
+ Do all of this review yourself. Never spawn a subagent to review part
58
+ of the diff, and never spawn another reviewer for a second opinion.
59
+ This process already provides every review seat the work gets; a
60
+ reviewer you spawn duplicates one of them at full cost, and its
61
+ verdict counts for nothing. If the diff feels too large for one
62
+ pass, review it in passes yourself and say so in your report.
63
+
64
+ ## Do Not Trust the Report
65
+
66
+ Treat the implementer's report as unverified claims about the code. It
67
+ may be incomplete, inaccurate, or optimistic. Verify the claims against
68
+ the diff. Design rationales in the report are claims too: "left it per
69
+ YAGNI," "kept it simple deliberately," or any other justification is the
70
+ implementer grading their own work. Judge the code on its merits — a
71
+ stated rationale never downgrades a finding's severity.
72
+
73
+ ## Tests
74
+
75
+ The implementer already ran the tests and reported results with TDD
76
+ evidence for exactly this code. Do not re-run the suite to confirm their
77
+ report. Run a test only when reading the code raises a specific doubt
78
+ that no existing run answers — and then a focused test, never a
79
+ package-wide suite, race detector run, or repeated/high-count loop. If
80
+ heavy validation seems warranted, recommend it in your report instead of
81
+ running it. If you cannot run commands in this environment, name the
82
+ test you would run.
83
+
84
+ Warnings or other noise in the implementer's reported test output are
85
+ findings — test output should be pristine.
86
+
87
+ Evidence you cannot see is not evidence that doesn't exist. If the
88
+ report or its test evidence looks truncated, or you cannot locate the
89
+ results it claims, re-read the file at its stated path — and if it is
90
+ genuinely missing or garbled, report that as a gap for the controller.
91
+ Re-running the suite to regenerate what you failed to read is not
92
+ verification; illegibility of the evidence is not invalidation of it.
93
+
94
+ ## Part 1: Spec Compliance
95
+
96
+ Compare the diff against What Was Requested:
97
+
98
+ - **Missing:** requirements they skipped, missed, or claimed without
99
+ implementing
100
+ - **Extra:** features that weren't requested, over-engineering, unneeded
101
+ "nice to haves"
102
+ - **Misunderstood:** right feature built the wrong way, wrong problem
103
+ solved
104
+
105
+ If the brief lists several files each with its own change (a batched
106
+ dispatch), check the diff against that list file by file: every listed
107
+ file must have its corresponding hunk. A listed file the diff never
108
+ touches is a Missing finding, no matter how clean the rest of the
109
+ batch looks.
110
+
111
+ If a requirement cannot be verified from this diff alone (it lives in
112
+ unchanged code or spans tasks), report it as a [WARN] item instead of
113
+ broadening your search.
114
+
115
+ ## Part 2: Code Quality
116
+
117
+ **Code quality:**
118
+ - Clean separation of concerns?
119
+ - Proper error handling?
120
+ - DRY without premature abstraction?
121
+ - Edge cases handled?
122
+
123
+ **Tests:**
124
+ - Do the new and changed tests verify real behavior, not mocks?
125
+ - Are the task's edge cases covered?
126
+
127
+ **Structure:**
128
+ - Does each file have one clear responsibility with a well-defined interface?
129
+ - Are units decomposed so they can be understood and tested independently?
130
+ - Is the implementation following the file structure from the plan?
131
+ - Did this change create new files that are already large, or
132
+ significantly grow existing files? (Don't flag pre-existing file
133
+ sizes — focus on what this change contributed.)
134
+
135
+ Your report should point at evidence: file:line references for every
136
+ finding and for any check you would otherwise answer with a bare
137
+ "yes." A tight report that cites lines gives the controller everything
138
+ it needs.
139
+
140
+ Your final message is the report itself: begin directly with the
141
+ spec-compliance verdict. Every line is a verdict, a finding with
142
+ file:line, or a check you ran — no preamble, no process narration,
143
+ no closing summary.
144
+
145
+ ## Calibration
146
+
147
+ Categorize issues by actual severity. Not everything is Critical.
148
+ Important means this task cannot be trusted until it is fixed: incorrect
149
+ or fragile behavior, a missed requirement, or maintainability damage you
150
+ would block a merge over — verbatim duplication of a logic block,
151
+ swallowed errors, tests that assert nothing. "Coverage could be broader"
152
+ and polish suggestions are Minor.
153
+ If the plan or brief explicitly mandates something this rubric calls a
154
+ defect (a test that asserts nothing, verbatim duplication of a logic
155
+ block), that IS a finding — report it as Important, labeled
156
+ plan-mandated. The plan's authorship does not grade its own work; the
157
+ human decides.
158
+ Acknowledge what was done well before listing issues — accurate praise
159
+ helps the implementer trust the rest of the feedback.
160
+
161
+ ## Output Format
162
+
163
+ ### Spec Compliance
164
+
165
+ - [OK] Spec compliant | [FAIL] Issues found: [what's missing/extra/misunderstood,
166
+ with file:line references]
167
+ - [WARN] Cannot verify from diff: [requirements you could not verify from the
168
+ diff alone, and what the controller should check — report alongside the
169
+ [OK]/[FAIL] verdict for everything you could verify]
170
+
171
+ ### Strengths
172
+ [What's well done? Be specific.]
173
+
174
+ ### Issues
175
+
176
+ #### Critical (Must Fix)
177
+ #### Important (Should Fix)
178
+ #### Minor (Nice to Have)
179
+
180
+ For each issue: file:line, what's wrong, why it matters, how to fix
181
+ (if not obvious).
182
+
183
+ ### Assessment
184
+
185
+ **Task quality:** [Approved | Needs fixes]
186
+
187
+ **Reasoning:** [1-2 sentence technical assessment]
117
188
  ```
118
189
 
119
- **占位符说明:**
120
- - `[MODEL]` — 必填:reviewer 模型,按 SKILL.md 的模型选择规则选择
121
- - `[BRIEF_FILE]` — 必填:task brief 文件(执行 `bash scripts/task-brief PLAN N` 可打印路径;与实现者所依据的文件为同一份)
122
- - `[GLOBAL_CONSTRAINTS]` — 原样抄录计划中 Global Constraints 小节或规格中的约束性需求:精确的取值、格式以及组件之间的既定关系(不含流程类规则——那些已包含在本模板中)
123
- - `[REPORT_FILE]` — 必填:实现者写入详细报告的文件
124
- - `[BASE_SHA]` — 任务开始前的提交
125
- - `[HEAD_SHA]` — 当前提交
126
- - `[DIFF_FILE]` — 必填:控制器写入review package的路径(执行 `bash scripts/review-package PLAN_FILE BASE HEAD` 会打印其写入的唯一路径;该包不会进入控制器的上下文)
127
-
128
- **reviewer 返回:** 规格符合度裁决([OK]/[FAIL]/[WARN])、优点、问题(Critical/Important/Minor)、任务质量裁决
190
+ **Placeholders:**
191
+ - `[MODEL]` — REQUIRED: reviewer model per SKILL.md Model Selection
192
+ - `[BRIEF_FILE]` — REQUIRED: the task brief file (`bash scripts/task-brief PLAN N`
193
+ prints the path; same file the implementer worked from)
194
+ - `[GLOBAL_CONSTRAINTS]` — the binding requirements copied verbatim from
195
+ the plan's Global Constraints section or the spec: exact values, formats,
196
+ and stated relationships between components (not process rules — those
197
+ are already in this template)
198
+ - `[REPORT_FILE]` — REQUIRED: the file the implementer wrote its detailed
199
+ report to
200
+ - `[BASE_SHA]` — commit before this task
201
+ - `[HEAD_SHA]` — current commit
202
+ - `[DIFF_FILE]` — REQUIRED: the path the controller wrote the review
203
+ package to (`bash scripts/review-package PLAN_FILE BASE HEAD` prints the unique
204
+ path it wrote; the package never enters the controller's context)
205
+
206
+ **Reviewer returns:** Spec Compliance verdict ([OK]/[FAIL]/[WARN]), Strengths, Issues
207
+ (Critical/Important/Minor), Task quality verdict
@@ -1,119 +1,119 @@
1
- # 创建日志:系统化调试技能
1
+ # Creation Log: Systematic Debugging Skill
2
2
 
3
- 提取、结构化并加固关键技能的参考示例。
3
+ Reference example of extracting, structuring, and bulletproofing a critical skill.
4
4
 
5
- ## 来源材料
5
+ ## Source Material
6
6
 
7
- 从早期版本的 `CLAUDE.md` 用户指令中提取的调试框架:
8
- - 四阶段系统化流程(调查 → 模式分析 → 假设 → 实现)
9
- - 核心原则:始终定位根因,绝不只修复表象
10
- - 规则设计用于抵御时间压力与自我合理化
7
+ Extracted debugging framework from an early-version `CLAUDE.md` user instructions file:
8
+ - 4-phase systematic process (Investigation → Pattern Analysis → Hypothesis → Implementation)
9
+ - Core mandate: ALWAYS find root cause, NEVER fix symptoms
10
+ - Rules designed to resist time pressure and rationalization
11
11
 
12
- ## 提取决策
12
+ ## Extraction Decisions
13
13
 
14
- **包含内容:**
15
- - 包含全部规则的完整四阶段框架
16
- - 反捷径约束("NEVER fix symptom"、"STOP and re-analyze")
17
- - 抗压力表述("even if faster"、"even if I seem in a hurry")
18
- - 每个阶段的具体执行步骤
14
+ **What to include:**
15
+ - Complete 4-phase framework with all rules
16
+ - Anti-shortcuts ("NEVER fix symptom", "STOP and re-analyze")
17
+ - Pressure-resistant language ("even if faster", "even if I seem in a hurry")
18
+ - Concrete steps for each phase
19
19
 
20
- **不包含内容:**
21
- - 项目特定上下文
22
- - 同一规则的重复变体表述
23
- - 叙述性解释(已压缩为原则)
20
+ **What to leave out:**
21
+ - Project-specific context
22
+ - Repetitive variations of same rule
23
+ - Narrative explanations (condensed to principles)
24
24
 
25
- ## 结构遵循 skill-creation/SKILL.md
25
+ ## Structure Following skill-creation/SKILL.md
26
26
 
27
- 1. **丰富的 when_to_use** - 包含症状与反模式
28
- 2. **类型:technique** - 带明确步骤的具体流程
29
- 3. **关键词** - "root cause"、"symptom"、"workaround"、"debugging"、"investigation"
30
- 4. **流程图** - 针对“修复失败”场景的决策点 → 重新分析 vs 追加修复
31
- 5. **分阶段拆解** - 可快速扫描的清单格式
32
- 6. **反模式章节** - 明确不应做什么(对本技能至关重要)
27
+ 1. **Rich when_to_use** - Included symptoms and anti-patterns
28
+ 2. **Type: technique** - Concrete process with steps
29
+ 3. **Keywords** - "root cause", "symptom", "workaround", "debugging", "investigation"
30
+ 4. **Flowchart** - Decision point for "fix failed" → re-analyze vs add more fixes
31
+ 5. **Phase-by-phase breakdown** - Scannable checklist format
32
+ 6. **Anti-patterns section** - What NOT to do (critical for this skill)
33
33
 
34
- ## 加固要素
34
+ ## Bulletproofing Elements
35
35
 
36
- 框架设计用于抵御压力下的合理化:
36
+ Framework designed to resist rationalization under pressure:
37
37
 
38
- ### 措辞选择
39
- - "ALWAYS" / "NEVER"(而非 "should" / "try to")
38
+ ### Language Choices
39
+ - "ALWAYS" / "NEVER" (not "should" / "try to")
40
40
  - "even if faster" / "even if I seem in a hurry"
41
- - "STOP and re-analyze"(显式暂停)
42
- - "Don't skip past"(命中真实的跳步行为)
41
+ - "STOP and re-analyze" (explicit pause)
42
+ - "Don't skip past" (catches the actual behavior)
43
43
 
44
- ### 结构防御
45
- - **阶段 1 强制执行** - 无法跳过直接进入实现
46
- - **单一假设规则** - 强制思考,避免霰弹式修复
47
- - **显式的失败处理** - 针对“首次修复未生效”设定必做动作
48
- - **反模式章节** - 直观展示捷径的具体形态
44
+ ### Structural Defenses
45
+ - **Phase 1 required** - Can't skip to implementation
46
+ - **Single hypothesis rule** - Forces thinking, prevents shotgun fixes
47
+ - **Explicit failure mode** - "IF your first fix doesn't work" with mandatory action
48
+ - **Anti-patterns section** - Shows exactly what shortcuts look like
49
49
 
50
- ### 冗余设计
51
- - 根因原则在概述 + when_to_use + 阶段 1 + 实现规则中重复强调
52
- - "NEVER fix symptom" 在不同上下文中出现 4 次
53
- - 每个阶段都包含显式的“不要跳过”指引
50
+ ### Redundancy
51
+ - Root cause mandate in overview + when_to_use + Phase 1 + implementation rules
52
+ - "NEVER fix symptom" appears 4 times in different contexts
53
+ - Each phase has explicit "don't skip" guidance
54
54
 
55
- ## 测试方案
55
+ ## Testing Approach
56
56
 
57
- 按照 skills/meta/testing-skills-with-subagents 创建了 4 项验证测试:
57
+ Created 4 validation tests following skills/meta/testing-skills-with-subagents:
58
58
 
59
- ### 测试 1:学术场景(无压力)
60
- - 简单缺陷,无时间压力
61
- - **结果:** 完全合规,完成全部调查
59
+ ### Test 1: Academic Context (No Pressure)
60
+ - Simple bug, no time pressure
61
+ - **Result:** Perfect compliance, complete investigation
62
62
 
63
- ### 测试 2:时间压力 + 显而易见的快速修复
64
- - 用户“很赶”,表象修复看似简单
65
- - **结果:** 抵制捷径,执行完整流程,定位到真实根因
63
+ ### Test 2: Time Pressure + Obvious Quick Fix
64
+ - User "in a hurry", symptom fix looks easy
65
+ - **Result:** Resisted shortcut, followed full process, found real root cause
66
66
 
67
- ### 测试 3:复杂系统 + 不确定性
68
- - 多层联动故障,能否找到根因尚不明确
69
- - **结果:** 系统化调查,逐层追踪,定位源头
67
+ ### Test 3: Complex System + Uncertainty
68
+ - Multi-layer failure, unclear if can find root cause
69
+ - **Result:** Systematic investigation, traced through all layers, found source
70
70
 
71
- ### 测试 4:首次修复失败
72
- - 假设未生效,存在追加修复的诱惑
73
- - **结果:** 暂停、重新分析、形成新假设(未采用霰弹式修复)
71
+ ### Test 4: Failed First Fix
72
+ - Hypothesis doesn't work, temptation to add more fixes
73
+ - **Result:** Stopped, re-analyzed, formed new hypothesis (no shotgun)
74
74
 
75
- **全部测试通过。** 未发现合理化行为。
75
+ **All tests passed.** No rationalizations found.
76
76
 
77
- ## 迭代过程
77
+ ## Iterations
78
78
 
79
- ### 初始版本
80
- - 完整的四阶段框架
81
- - 反模式章节
82
- - 针对“修复失败”决策的流程图
79
+ ### Initial Version
80
+ - Complete 4-phase framework
81
+ - Anti-patterns section
82
+ - Flowchart for "fix failed" decision
83
83
 
84
- ### 增强 1:TDD 关联
85
- - 增加到 skills/testing/test-driven-development 的链接
86
- - 补充说明 TDD 的“最简实现” ≠ 调试的“根因定位”
87
- - 避免方法论混淆
84
+ ### Enhancement 1: TDD Reference
85
+ - Added link to skills/testing/test-driven-development
86
+ - Note explaining TDD's "simplest code" ≠ debugging's "root cause"
87
+ - Prevents confusion between methodologies
88
88
 
89
- ## 最终成果
89
+ ## Final Outcome
90
90
 
91
- 具备以下能力的加固技能:
92
- - [OK] 明确要求开展根因调查
93
- - [OK] 抵御时间压力下的合理化
94
- - [OK] 为每个阶段提供具体步骤
95
- - [OK] 显式展示反模式
96
- - [OK] 在多种压力场景下完成测试
97
- - [OK] 澄清与 TDD 的关系
98
- - [OK] 可直接投入使用
91
+ Bulletproof skill that:
92
+ - [OK] Clearly mandates root cause investigation
93
+ - [OK] Resists time pressure rationalization
94
+ - [OK] Provides concrete steps for each phase
95
+ - [OK] Shows anti-patterns explicitly
96
+ - [OK] Tested under multiple pressure scenarios
97
+ - [OK] Clarifies relationship to TDD
98
+ - [OK] Ready for use
99
99
 
100
- ## 关键洞察
100
+ ## Key Insight
101
101
 
102
- **最重要的加固点:** 反模式章节展示了在当下看似合理的捷径。当 agent 产生“我就加这一个快速修复”的念头时,看到该模式被明确列为错误,会产生认知阻力。
102
+ **Most important bulletproofing:** Anti-patterns section showing exact shortcuts that feel justified in the moment. When Claude thinks "I'll just add this one quick fix", seeing that exact pattern listed as wrong creates cognitive friction.
103
103
 
104
- ## 使用示例
104
+ ## Usage Example
105
105
 
106
- 遇到缺陷时:
107
- 1. 加载技能:skills/debugging/systematic-debugging
108
- 2. 阅读概述(10 秒)- 重申原则
109
- 3. 按阶段 1 清单执行 - 强制完成调查
110
- 4. 若产生跳步冲动 - 查看反模式,立即停止
111
- 5. 完成全部阶段 - 定位根因
106
+ When encountering a bug:
107
+ 1. Load skill: skills/debugging/systematic-debugging
108
+ 2. Read overview (10 sec) - reminded of mandate
109
+ 3. Follow Phase 1 checklist - forced investigation
110
+ 4. If tempted to skip - see anti-pattern, stop
111
+ 5. Complete all phases - root cause found
112
112
 
113
- **时间投入:** 5-10 分钟
114
- **节省时间:** 数小时的表象修补
113
+ **Time investment:** 5-10 minutes
114
+ **Time saved:** Hours of symptom-whack-a-mole
115
115
 
116
116
  ---
117
117
 
118
- *创建于:2025-10-03*
119
- *用途:技能提取与加固的参考示例*
118
+ *Created: 2025-10-03*
119
+ *Purpose: Reference example for skill extraction and bulletproofing*