@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,82 +1,91 @@
1
1
  ---
2
2
  name: finishing-a-development-branch
3
- description: "Superpower Skill:实现完成且全部测试通过后,用于决定分支集成方式,支持本地合并、创建 PR 或保留分支等完整收尾流程。"
3
+ description: "Superpower Skill: Use when implementation is complete, all tests pass, and you need to decide how to integrate the work"
4
+ description_zh: "Superpower Skill:实现完成且全部测试通过后,用于决定分支集成方式,支持本地合并、创建 PR 或保留分支等完整收尾流程。"
4
5
  ---
5
6
 
6
- # 完成开发分支
7
7
 
8
- ## 概述
8
+ # Finishing a Development Branch
9
9
 
10
- **核心原则:** 验证测试 → 检测环境 → 提供选项 → 执行选择 → 清理收尾。
10
+ ## Overview
11
11
 
12
- **开始时声明:** “我将使用 finishing-a-development-branch 技能来完成收尾工作。”
12
+ **Core principle:** Verify tests → Detect environment → Present options → Execute choice → Clean up.
13
13
 
14
- ## 步骤 1:验证测试
14
+ **Announce at start:** "I'm using the finishing-a-development-branch skill to complete this work."
15
15
 
16
- 运行项目的完整测试套件(`npm test` / `cargo test` / `pytest` / `go test ./...`)。
16
+ ## Step 1: Verify Tests
17
17
 
18
- **若测试失败**,报告失败信息并停止——只有测试全通过后才展示选项菜单:
18
+ Run the project's full test suite (`npm test` / `cargo test` / `pytest` / `go test ./...`).
19
+
20
+ **If tests fail**, report the failures and stop — the menu comes after a green suite:
19
21
 
20
22
  ```
21
- 测试未通过(<N> 项失败),需修复后才能完成:
23
+ Tests failing (<N> failures). Must fix before completing:
22
24
 
23
- [展示失败详情]
25
+ [Show failures]
24
26
  ```
25
27
 
26
- **若测试通过:** 继续进入步骤 2。
28
+ **If tests pass:** continue to Step 2.
27
29
 
28
- ## 步骤 2:检测环境
30
+ ## Step 2: Detect Environment
29
31
 
30
32
  ```bash
31
33
  GIT_DIR=$(cd "$(git rev-parse --git-dir)" 2>/dev/null && pwd -P)
32
34
  GIT_COMMON=$(cd "$(git rev-parse --git-common-dir)" 2>/dev/null && pwd -P)
33
- # 此时仍在工作区内,立即捕获此值——步骤 5 会切换目录,
34
- # 而后清理阶段(步骤 6)需要该值
35
+ # Capture now, while still inside the workspace — Step 5 changes directory
36
+ # before cleanup (Step 6) needs this value
35
37
  WORKTREE_PATH=$(git rev-parse --show-toplevel)
36
38
  ```
37
39
 
38
- 下表决定展示哪种菜单以及如何执行清理:
40
+ This determines which menu to show and how cleanup works:
39
41
 
40
- | 状态 | 菜单 | 清理方式 |
42
+ | State | Menu | Cleanup |
41
43
  |-------|------|---------|
42
- | `GIT_DIR == GIT_COMMON`(普通仓库) | 标准 3 项选项 | 无需清理 worktree |
43
- | `GIT_DIR != GIT_COMMON`,具名分支 | 标准 3 项选项 | 按来源判定(见步骤 6) |
44
- | `GIT_DIR != GIT_COMMON`,游离 HEAD | 精简 2 项选项(无合并) | 由外部托管——保持原样 |
44
+ | `GIT_DIR == GIT_COMMON` (normal repo) | Standard 3 options | No worktree to clean up |
45
+ | `GIT_DIR != GIT_COMMON`, named branch | Standard 3 options | Provenance-based (see Step 6) |
46
+ | `GIT_DIR != GIT_COMMON`, detached HEAD | Reduced 2 options (no merge) | Externally managed — leave in place |
45
47
 
46
- ## 步骤 3:确定基线分支
48
+ ## Step 3: Determine Base Branch
47
49
 
48
- 基线分支即本次工作 fork 时的来源分支——通常在计划、对话记录或分支的上游中已注明。若尚未明确,请询问:“该分支是从 <你的最佳推测> fork 出来的,这样对吗?” 合并前务必确认:合错基线分支的回滚成本很高。
50
+ The base branch is whatever this work forked from — usually named in the
51
+ plan, the conversation, or the branch's upstream. If it is not already
52
+ known, ask: "This branch split from <your best guess> - is that correct?"
53
+ Confirm before merging: merging into the wrong base is expensive to undo.
49
54
 
50
- ## 步骤 4:提供选项
55
+ ## Step 4: Present Options
51
56
 
52
- **普通仓库与具名分支 worktree——请严格按以下 3 项呈现:**
57
+ **Normal repo and named-branch worktree — present exactly these 3 options:**
53
58
 
54
59
  ```
55
- 实现已完成。接下来怎么处理?
60
+ Implementation complete. What would you like to do?
56
61
 
57
- 1. 本地合并回 <base-branch>
58
- 2. 推送并创建 Pull Request
59
- 3. 保持分支现状(稍后自行处理)
62
+ 1. Merge back to <base-branch> locally
63
+ 2. Push and create a Pull Request
64
+ 3. Keep the branch as-is (I'll handle it later)
60
65
 
61
- 请选择:
66
+ Which option?
62
67
  ```
63
68
 
64
- **游离 HEAD——请严格按以下 2 项呈现:**
69
+ **Detached HEAD — present exactly these 2 options:**
65
70
 
66
71
  ```
67
- 实现已完成。当前处于游离 HEAD(外部托管的 worktree)。
72
+ Implementation complete. You're on a detached HEAD (externally managed workspace).
68
73
 
69
- 1. 以新分支推送并创建 Pull Request
70
- 2. 保持现状(稍后自行处理)
74
+ 1. Push as new branch and create a Pull Request
75
+ 2. Keep as-is (I'll handle it later)
71
76
 
72
- 请选择:
77
+ Which option?
73
78
  ```
74
79
 
75
- 请严格按原文呈现菜单——保持简洁,所有选项均来自上表。仅当 human partner 明确要求丢弃工作时才处理丢弃流程(见下文“若 human partner 要求丢弃工作”)。等待对方答复;集成决策权归 human partner 所有。
80
+ Present the menu exactly as written — concise, with every option coming
81
+ from the list above. Discarding the work happens only in response to your
82
+ human partner explicitly asking for it (see "If your human partner asks to
83
+ discard the work" below). Wait for their answer; the integration decision
84
+ is theirs.
76
85
 
77
- ## 步骤 5:执行选择
86
+ ## Step 5: Execute Choice
78
87
 
79
- ### 选项 1:本地合并
88
+ ### Option 1: Merge Locally
80
89
 
81
90
  ```bash
82
91
  # Get main repo root for CWD safety
@@ -92,15 +101,18 @@ git merge <feature-branch>
92
101
  <test command>
93
102
  ```
94
103
 
95
- 若合并后的测试失败:立即停止,保留 worktree 与分支并展开排查——此时尚未推送,合并仅在本地,可恢复。
104
+ If tests fail on the merged result: stop, leave the worktree and branch in
105
+ place, and investigate — nothing has been pushed, so the merge is local
106
+ and recoverable.
96
107
 
97
- 合并结果测试通过后:清理 worktree(步骤 6),然后删除分支:
108
+ Once the merged result is green: clean up the worktree (Step 6), then
109
+ delete the branch:
98
110
 
99
111
  ```bash
100
112
  git branch -d <feature-branch>
101
113
  ```
102
114
 
103
- ### 选项 2:推送并创建 PR
115
+ ### Option 2: Push and Create PR
104
116
 
105
117
  ```bash
106
118
  git push -u origin <feature-branch>
@@ -108,95 +120,108 @@ git push -u origin <feature-branch>
108
120
  # git push origin HEAD:refs/heads/<new-branch>
109
121
  ```
110
122
 
111
- 然后针对 <base-branch> 创建 pull/merge request——优先使用代码托管平台的命令行工具,若无则使用推送后打印的创建链接——遵循仓库现有的 PR 模板与规范,并将 URL 汇报给 human partner。
123
+ Then create the pull/merge request against <base-branch> with the forge's
124
+ tooling — its CLI if one is available, or the creation URL most forges
125
+ print when you push — following the repo's PR template and conventions if
126
+ present, and report the URL to your human partner.
112
127
 
113
- 保留 worktree——human partner 将在此处理 PR 反馈并继续迭代。
128
+ Keep the worktree — your human partner iterates on PR feedback there.
114
129
 
115
- ### 选项 3:保持现状
130
+ ### Option 3: Keep As-Is
116
131
 
117
- 汇报:“已保留分支 <name>,worktree 保留于 <path>。”
132
+ Report: "Keeping branch <name>. Worktree preserved at <path>."
118
133
 
119
- ### 若 human partner 要求丢弃工作
134
+ ### If your human partner asks to discard the work
120
135
 
121
- 此路径仅在明确要求丢弃工作时触发,需先进行确认:
136
+ This path exists only as a response to an explicit request to throw the
137
+ work away. Confirm first:
122
138
 
123
139
  ```
124
- 此操作将永久删除:
125
- - 分支 <name>
126
- - 全部提交:<commit-list>
127
- - 位于 <path> 的 worktree
140
+ This will permanently delete:
141
+ - Branch <name>
142
+ - All commits: <commit-list>
143
+ - Worktree at <path>
128
144
 
129
- 请输入 'discard' 以确认。
145
+ Type 'discard' to confirm.
130
146
  ```
131
147
 
132
- 等待该确切确认。确认后:
148
+ Wait for that exact confirmation. When it arrives:
133
149
 
134
150
  ```bash
135
151
  MAIN_ROOT=$(git -C "$(git rev-parse --git-common-dir)/.." rev-parse --show-toplevel)
136
152
  cd "$MAIN_ROOT"
137
153
  ```
138
154
 
139
- 然后清理 worktree(步骤 6)并强制删除分支:
155
+ Then clean up the worktree (Step 6) and force-delete the branch:
140
156
 
141
157
  ```bash
142
158
  git branch -D <feature-branch>
143
159
  ```
144
160
 
145
- ## 步骤 6:清理 worktree
161
+ ## Step 6: Cleanup Workspace
146
162
 
147
- **仅在选项 1 与已确认的丢弃操作中执行。** 选项 2 与选项 3 始终保留 worktree。两种调用方已切换至主仓库根目录——worktree 移除必须在 worktree 外部执行——并使用步骤 2 捕获的 `GIT_DIR`/`GIT_COMMON`/`WORKTREE_PATH` 值(目录切换前已保存)。
163
+ **Runs for Option 1 and confirmed discards.** Options 2 and 3 always
164
+ preserve the worktree. Both callers have already changed directory to the
165
+ main repo root — worktree removal must run from outside the worktree —
166
+ and use the `GIT_DIR`/`GIT_COMMON`/`WORKTREE_PATH` values captured in
167
+ Step 2, from before that directory change.
148
168
 
149
- **若 `GIT_DIR == GIT_COMMON`:** 普通仓库,无需清理 worktree,流程结束。
169
+ **If `GIT_DIR == GIT_COMMON`:** Normal repo, no worktree to clean up. Done.
150
170
 
151
- **若 `WORKTREE_PATH` 位于 `.worktrees/` 或 `worktrees/` 之下:** 该 worktree 由 Superpowers 创建——由我们负责清理:
171
+ **If `WORKTREE_PATH` is under `.worktrees/` or `worktrees/`:** Superpowers
172
+ created this worktree — we own cleanup:
152
173
 
153
174
  ```bash
154
175
  git worktree remove "$WORKTREE_PATH"
155
176
  git worktree prune # Self-healing: clean up any stale registrations
156
177
  ```
157
178
 
158
- **若移除被拒绝**(提示 `contains modified or untracked files`):说明 worktree 中存在仅存于此的未提交文件——可能是计划、笔记或临时文件。切勿自行使用 `--force`。向 human partner 展示涉及的文件并征询意见:
179
+ **If removal is refused** (`contains modified or untracked files`): the
180
+ worktree holds files that exist nowhere else — uncommitted plans, notes,
181
+ or scratch work. Never `--force` on your own initiative. Show your human
182
+ partner what is at stake and ask:
159
183
 
160
184
  ```bash
161
185
  git -C "$WORKTREE_PATH" status --porcelain -uall
162
186
  ```
163
187
 
164
188
  ```
165
- worktree 移除被拒绝——以下文件尚未提交:
189
+ Worktree removal refused — these files were never committed:
166
190
 
167
191
  <file list>
168
192
 
169
- 1. 清理前提交至 <branch>
170
- 2. 移动至 <主仓库根目录>
171
- 3. 删除(不可恢复)
193
+ 1. Commit them to <branch> before cleanup
194
+ 2. Move them into <main repo root>
195
+ 3. Delete them (unrecoverable)
172
196
 
173
- 请选择:
197
+ Which?
174
198
  ```
175
199
 
176
- 按选择执行,随后移除 worktree。
200
+ Carry out the choice, then remove the worktree.
177
201
 
178
- **其他情况:** 该 worktree 由宿主环境托管——保持原样。若平台提供了 worktree 退出工具,请使用它。
202
+ **Otherwise:** The host environment owns this workspace — leave it in
203
+ place. If your platform provides a workspace-exit tool, use it.
179
204
 
180
- ## 快速参考
205
+ ## Quick Reference
181
206
 
182
- | 选项 | 合并 | 推送 | 保留 Worktree | 清理分支 |
207
+ | Option | Merge | Push | Keep Worktree | Cleanup Branch |
183
208
  |--------|-------|------|---------------|----------------|
184
- | 1. 本地合并 | 是 | - | - | 是 |
185
- | 2. 创建 PR | - | 是 | 是 | - |
186
- | 3. 保持现状 | - | - | 是 | - |
187
- | 丢弃(仅在明确要求时) | - | - | - | 是(强制) |
209
+ | 1. Merge locally | yes | - | - | yes |
210
+ | 2. Create PR | - | yes | yes | - |
211
+ | 3. Keep as-is | - | - | yes | - |
212
+ | Discard (explicit request only) | - | - | - | yes (force) |
188
213
 
189
- ## 常见借口与实际情况
214
+ ## Common Rationalizations
190
215
 
191
- | 借口 | 实际情况 |
216
+ | Excuse | Reality |
192
217
  |--------|---------|
193
- | “本会话早些时候测试已通过” | 请在即将集成的代码树上重新运行完整测试套件,一次通过仅能证明当时的代码树。 |
194
- | “他们显然想直接合并” | 集成方式由 human partner 决定,请呈现菜单并等待选择。 |
195
- | “他们似乎已完成该功能——我来提议丢弃吧” | 菜单已完整,无需额外提议,仅当 human partner 明确要求丢弃时才处理。 |
196
- | “‘好,删掉吧’也算确认” | 只有输入 `discard` 才视为有效确认并授权删除。 |
197
- | “PR 已提交,worktree 就是冗余了” | PR 反馈需在该 worktree 中修复,工作落盘前应予以保留。 |
198
- | “这个 worktree 看起来废弃了——顺手一起清理” | 仅清理位于 `.worktrees/` 或 `worktrees/` 下的 worktree,其余均归宿主环境所有。 |
199
- | “移除被拒——用 `--force` 收个尾就行” | 拒绝意味着文件仅存在于该 worktree,`--force` 会永久销毁它们,请向 human partner 展示并征询意见。 |
200
- | “合并后失败大概是偶发问题” | 合并结果失败则立即中止,保留分支与 worktree 以便排查。 |
201
- | “基线分支显然是 main” | 请确认fork 点或主动询问,合错基线的回滚成本很高。 |
202
- | “推送被拒——强制推送就能解决” | 推送被拒说明远端已有更新,请先排查;仅在 human partner 明确要求时才执行强制推送。 |
218
+ | "Tests passed earlier this session" | Run the suite on the tree you are about to integrate. A green run only proves the tree it ran on. |
219
+ | "They obviously want it merged" | Integration is your human partner's decision. Present the menu and wait. |
220
+ | "They seem done with this feature — I'll offer to discard it" | The menu is complete as written. Discard happens only when your human partner asks for it in so many words. |
221
+ | "'Yeah, get rid of it' counts as confirmation" | Only the typed word `discard` authorizes deletion. |
222
+ | "The PR is up, so the worktree is clutter now" | PR feedback gets fixed in that worktree. It stays until the work lands. |
223
+ | "This other worktree looks stale — I'll clean it too" | Clean up only worktrees under `.worktrees/` or `worktrees/`. Everything else belongs to the host. |
224
+ | "Removal refused — `--force` is just finishing the cleanup" | The refusal means files exist only in that worktree. `--force` destroys them permanently. Show your human partner and ask. |
225
+ | "The merged-result failure is probably flaky" | A failing merged result stops everything. Branch and worktree stay put while you investigate. |
226
+ | "The base branch is obviously main" | Confirm the fork point or ask. Merging into the wrong base is expensive to undo. |
227
+ | "The push was rejected — force-push will fix it" | A rejected push means the remote moved. Investigate; force-push only on your human partner's explicit request. |
@@ -1,205 +1,207 @@
1
1
  ---
2
2
  name: receiving-code-review
3
- description: "Superpower Skill:收到代码评审意见时使用,实施建议前需技术验证与澄清,适用于反馈模糊或存疑场景,强调严谨核实而非盲从。"
3
+ description: "Superpower Skill: Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation"
4
+ description_zh: "Superpower Skill:收到代码评审意见时使用,实施建议前需技术验证与澄清,适用于反馈模糊或存疑场景,强调严谨核实而非盲从。"
4
5
  ---
5
6
 
6
- # 接收代码评审
7
7
 
8
- ## 概述
8
+ # Code Review Reception
9
9
 
10
- 代码评审需要的是技术研判,而非情绪化表演。
10
+ ## Overview
11
11
 
12
- **核心原则:** 先验证,再实施;先提问,再假设。技术正确性优先于社交舒适度。
12
+ Code review requires technical evaluation, not emotional performance.
13
13
 
14
- ## 响应模式
14
+ **Core principle:** Verify before implementing. Ask before assuming. Technical correctness over social comfort.
15
+
16
+ ## The Response Pattern
15
17
 
16
18
  ```
17
- WHEN 收到代码评审反馈时:
19
+ WHEN receiving code review feedback:
18
20
 
19
- 1. 阅读:完整阅读全部反馈,不急于回应
20
- 2. 理解:用自己的话复述需求(或提问澄清)
21
- 3. 核实:对照代码库实际情况进行校验
22
- 4. 评估:对当前代码库而言是否技术上合理?
23
- 5. 回应:技术性确认或有理有据的异议
24
- 6. 实施:一次处理一项,逐项验证
21
+ 1. READ: Complete feedback without reacting
22
+ 2. UNDERSTAND: Restate requirement in own words (or ask)
23
+ 3. VERIFY: Check against codebase reality
24
+ 4. EVALUATE: Technically sound for THIS codebase?
25
+ 5. RESPOND: Technical acknowledgment or reasoned pushback
26
+ 6. IMPLEMENT: One item at a time, test each
25
27
  ```
26
28
 
27
- ## 禁止的回应方式
29
+ ## Forbidden Responses
28
30
 
29
- **严禁:**
30
- - "你完全正确!"(明确违反指令文件)
31
- - "好建议!" / "非常棒的反馈!"(表演式认同)
32
- - "我马上来实现"(未经核实就承诺)
31
+ **NEVER:**
32
+ - "You're absolutely right!" (explicit instruction-file violation)
33
+ - "Great point!" / "Excellent feedback!" (performative)
34
+ - "Let me implement that now" (before verification)
33
35
 
34
- **应改为:**
35
- - 复述技术需求
36
- - 提出澄清问题
37
- - 若判断有误,用技术理由提出异议
38
- - 直接开始动手(行动胜于空话)
36
+ **INSTEAD:**
37
+ - Restate the technical requirement
38
+ - Ask clarifying questions
39
+ - Push back with technical reasoning if wrong
40
+ - Just start working (actions > words)
39
41
 
40
- ## 处理模糊的反馈
42
+ ## Handling Unclear Feedback
41
43
 
42
44
  ```
43
- IF 存在表述不清的条目:
44
- 停止 - 在澄清前不要实施任何内容
45
- 针对不清晰的条目请求澄清
45
+ IF any item is unclear:
46
+ STOP - do not implement anything yet
47
+ ASK for clarification on unclear items
46
48
 
47
- 原因:各条目之间可能存在关联。理解不完整会导致实现错误。
49
+ WHY: Items may be related. Partial understanding = wrong implementation.
48
50
  ```
49
51
 
50
- **示例:**
52
+ **Example:**
51
53
  ```
52
- 你的 human partner:"修复 1-6 项"
53
- 你已理解 1,2,3,6,对 4,5 不清楚。
54
+ your human partner: "Fix 1-6"
55
+ You understand 1,2,3,6. Unclear on 4,5.
54
56
 
55
- [FAIL] 错误做法:先实现 1,2,3,6,之后再问 4,5
56
- [OK] 正确做法:"我已理解 1,2,3,6 项。在继续之前,需要澄清 4 和 5。"
57
+ [FAIL] WRONG: Implement 1,2,3,6 now, ask about 4,5 later
58
+ [OK] RIGHT: "I understand items 1,2,3,6. Need clarification on 4 and 5 before proceeding."
57
59
  ```
58
60
 
59
- ## 按来源区分处理
61
+ ## Source-Specific Handling
60
62
 
61
- ### 来自你的 human partner
62
- - **可信** - 理解后即可实施
63
- - **仍需提问** - 若范围不清晰
64
- - **不做表演式认同**
65
- - **直接进入行动**或做技术性确认
63
+ ### From your human partner
64
+ - **Trusted** - implement after understanding
65
+ - **Still ask** if scope unclear
66
+ - **No performative agreement**
67
+ - **Skip to action** or technical acknowledgment
66
68
 
67
- ### 来自外部 reviewer
69
+ ### From External Reviewers
68
70
  ```
69
- 实施前:
70
- 1. 检查:对当前代码库而言技术上是否正确?
71
- 2. 检查:是否会破坏现有功能?
72
- 3. 检查:当前实现是否有特定原因?
73
- 4. 检查:是否在所有平台/版本上均可用?
74
- 5. 检查:reviewer 是否了解完整上下文?
71
+ BEFORE implementing:
72
+ 1. Check: Technically correct for THIS codebase?
73
+ 2. Check: Breaks existing functionality?
74
+ 3. Check: Reason for current implementation?
75
+ 4. Check: Works on all platforms/versions?
76
+ 5. Check: Does reviewer understand full context?
75
77
 
76
- IF 建议看似有误:
77
- 用技术理由提出异议
78
+ IF suggestion seems wrong:
79
+ Push back with technical reasoning
78
80
 
79
- IF 无法轻易核实:
80
- 直接说明:"没有 [X] 我无法核实这一点。是否需要我[去调研/去询问/继续推进]?"
81
+ IF can't easily verify:
82
+ Say so: "I can't verify this without [X]. Should I [investigate/ask/proceed]?"
81
83
 
82
- IF 与 human partner 之前的决策冲突:
83
- 先与 human partner 讨论,再做决定
84
+ IF conflicts with your human partner's prior decisions:
85
+ Stop and discuss with your human partner first
84
86
  ```
85
87
 
86
- **你的 human partner 的原则:** "对待外部反馈——保持怀疑,但要认真核查"
88
+ **your human partner's rule:** "External feedback - be skeptical, but check carefully"
87
89
 
88
- ## 对“专业化”功能的 YAGNI 检查
90
+ ## YAGNI Check for "Professional" Features
89
91
 
90
92
  ```
91
- IF reviewer 建议"按规范完整实现":
92
- grep 代码库,检查实际调用情况
93
+ IF reviewer suggests "implementing properly":
94
+ grep codebase for actual usage
93
95
 
94
- IF 未被调用:"该接口未被调用。是否直接移除(YAGNI)?"
95
- IF 已被调用:再按规范完整实现
96
+ IF unused: "This endpoint isn't called. Remove it (YAGNI)?"
97
+ IF used: Then implement properly
96
98
  ```
97
99
 
98
- **你的 human partner 的原则:** "你和 reviewer 都向我汇报。如果我们不需要这个功能,就不要添加。"
100
+ **your human partner's rule:** "You and reviewer both report to me. If we don't need this feature, don't add it."
99
101
 
100
- ## 实施顺序
102
+ ## Implementation Order
101
103
 
102
104
  ```
103
- FOR 多条反馈:
104
- 1. 先澄清所有不清晰的项
105
- 2. 然后按以下顺序实施:
106
- - 阻塞性问题(崩溃、安全)
107
- - 简单修复(拼写、导入)
108
- - 复杂修复(重构、逻辑)
109
- 3. 逐项单独测试
110
- 4. 验证无回归
105
+ FOR multi-item feedback:
106
+ 1. Clarify anything unclear FIRST
107
+ 2. Then implement in this order:
108
+ - Blocking issues (breaks, security)
109
+ - Simple fixes (typos, imports)
110
+ - Complex fixes (refactoring, logic)
111
+ 3. Test each fix individually
112
+ 4. Verify no regressions
111
113
  ```
112
114
 
113
- ## 何时提出异议
115
+ ## When To Push Back
114
116
 
115
- 出现以下情况时应提出异议:
116
- - 建议会破坏现有功能
117
- - reviewer 缺乏完整上下文
118
- - 违反 YAGNI(功能未被使用)
119
- - 在当前技术栈下技术上不正确
120
- - 存在历史/兼容性原因需要保留现状
121
- - 与 human partner 的架构决策冲突
117
+ Push back when:
118
+ - Suggestion breaks existing functionality
119
+ - Reviewer lacks full context
120
+ - Violates YAGNI (unused feature)
121
+ - Technically incorrect for this stack
122
+ - Legacy/compatibility reasons exist
123
+ - Conflicts with your human partner's architectural decisions
122
124
 
123
- **如何提出异议:**
124
- - 使用技术理由,而非防御性措辞
125
- - 提出具体问题
126
- - 引用可运行的测试/代码
127
- - 若涉及架构问题,请 human partner 介入
125
+ **How to push back:**
126
+ - Use technical reasoning, not defensiveness
127
+ - Ask specific questions
128
+ - Reference working tests/code
129
+ - Involve your human partner if architectural
128
130
 
129
- **如果你不便当面提出异议:** 先点明这种顾虑,然后私下告知 human partner 你发现的问题。他们会欣赏你的坦诚。
131
+ **If you're uncomfortable pushing back out loud:** Name that tension, then tell your partner about the issue you've seen. They'll appreciate your honesty.
130
132
 
131
- ## 确认正确的反馈
133
+ ## Acknowledging Correct Feedback
132
134
 
133
- 当反馈确实正确时:
135
+ When feedback IS correct:
134
136
  ```
135
- [OK] "已修复。[简要说明改了什么]"
136
- [OK] "捉得好——[具体问题]。已在[位置]修复。"
137
- [OK] [直接修复,并在代码中体现]
137
+ [OK] "Fixed. [Brief description of what changed]"
138
+ [OK] "Good catch - [specific issue]. Fixed in [location]."
139
+ [OK] [Just fix it and show in the code]
138
140
 
139
- [FAIL] "你完全正确!"
140
- [FAIL] "好建议!"
141
- [FAIL] "感谢指出!"
142
- [FAIL] "谢谢你的[任何内容]"
143
- [FAIL] 任何形式的感谢措辞
141
+ [FAIL] "You're absolutely right!"
142
+ [FAIL] "Great point!"
143
+ [FAIL] "Thanks for catching that!"
144
+ [FAIL] "Thanks for [anything]"
145
+ [FAIL] ANY gratitude expression
144
146
  ```
145
147
 
146
- **为何不说感谢:** 行动即回应。直接修复即可。代码本身就能证明你已听取反馈。
148
+ **Why no thanks:** Actions speak. Just fix it. The code itself shows you heard the feedback.
147
149
 
148
- **如果你发现自己正要写"感谢":** 删掉它。改为陈述修复内容。
150
+ **If you catch yourself about to write "Thanks":** DELETE IT. State the fix instead.
149
151
 
150
- ## 优雅地纠正你的异议
152
+ ## Gracefully Correcting Your Pushback
151
153
 
152
- 如果你提出异议后发现自己错了:
154
+ If you pushed back and were wrong:
153
155
  ```
154
- [OK] "你是对的——我检查了 [X],确实会 [Y]。正在实现。"
155
- [OK] "已核实,你是正确的。我最初理解有误是因为[原因]。正在修复。"
156
+ [OK] "You were right - I checked [X] and it does [Y]. Implementing now."
157
+ [OK] "Verified this and you're correct. My initial understanding was wrong because [reason]. Fixing."
156
158
 
157
- [FAIL] 长篇道歉
158
- [FAIL] 为何当初要提出异议的辩解
159
- [FAIL] 过度解释
159
+ [FAIL] Long apology
160
+ [FAIL] Defending why you pushed back
161
+ [FAIL] Over-explaining
160
162
  ```
161
163
 
162
- 客观陈述纠正事实,然后继续推进。
164
+ State the correction factually and move on.
163
165
 
164
- ## 常见错误
166
+ ## Common Mistakes
165
167
 
166
- | 错误 | 修正方法 |
168
+ | Mistake | Fix |
167
169
  |---------|-----|
168
- | 表演式认同 | 陈述需求或直接行动 |
169
- | 盲目实施 | 先对照代码库核实 |
170
- | 批量修改且不测试 | 一次一项,逐项测试 |
171
- | 默认 reviewer 一定正确 | 检查是否会引发破坏 |
172
- | 回避异议 | 技术正确性优先于舒适度 |
173
- | 部分实现 | 先澄清所有条目 |
174
- | 无法核实仍继续推进 | 说明局限性,请求指示 |
170
+ | Performative agreement | State requirement or just act |
171
+ | Blind implementation | Verify against codebase first |
172
+ | Batch without testing | One at a time, test each |
173
+ | Assuming reviewer is right | Check if breaks things |
174
+ | Avoiding pushback | Technical correctness > comfort |
175
+ | Partial implementation | Clarify all items first |
176
+ | Can't verify, proceed anyway | State limitation, ask for direction |
175
177
 
176
- ## 实际示例
178
+ ## Real Examples
177
179
 
178
- **表演式认同(错误):**
180
+ **Performative Agreement (Bad):**
179
181
  ```
180
- reviewer:"移除历史遗留代码"
181
- [FAIL] "你完全正确!我来移除……"
182
+ Reviewer: "Remove legacy code"
183
+ [FAIL] "You're absolutely right! Let me remove that..."
182
184
  ```
183
185
 
184
- **技术核实(正确):**
186
+ **Technical Verification (Good):**
185
187
  ```
186
- reviewer:"移除历史遗留代码"
187
- [OK] "核查中……构建目标是 10.15+,该 API 需要 13+。为兼容旧版本仍需保留历史代码。当前实现 bundle ID 有误——是修复它,还是放弃对 13 以下版本的支持?"
188
+ Reviewer: "Remove legacy code"
189
+ [OK] "Checking... build target is 10.15+, this API needs 13+. Need legacy for backward compat. Current impl has wrong bundle ID - fix it or drop pre-13 support?"
188
190
  ```
189
191
 
190
- **YAGNI(正确):**
192
+ **YAGNI (Good):**
191
193
  ```
192
- reviewer:"用数据库、日期筛选、CSV 导出完整实现指标统计"
193
- [OK] "已 grep 代码库——没有地方调用该接口。是否直接移除(YAGNI)?还是有我未发现的调用场景?"
194
+ Reviewer: "Implement proper metrics tracking with database, date filters, CSV export"
195
+ [OK] "Grepped codebase - nothing calls this endpoint. Remove it (YAGNI)? Or is there usage I'm missing?"
194
196
  ```
195
197
 
196
- **条目不清晰(正确):**
198
+ **Unclear Item (Good):**
197
199
  ```
198
- 你的 human partner:"修复 1-6 项"
199
- 你已理解 1,2,3,6,对 4,5 不清楚。
200
- [OK] "已理解 1,2,3,6。实现前需要澄清 4 和 5。"
200
+ your human partner: "Fix items 1-6"
201
+ You understand 1,2,3,6. Unclear on 4,5.
202
+ [OK] "Understand 1,2,3,6. Need clarification on 4 and 5 before implementing."
201
203
  ```
202
204
 
203
- ## GitHub 评论线程回复
205
+ ## GitHub Thread Replies
204
206
 
205
- 在 GitHub 上回复行内评审意见时,请在评论线程中回复(`gh api repos/{owner}/{repo}/pulls/{pr}/comments/{id}/replies`),而非作为 PR 的顶层评论。
207
+ When replying to inline review comments on GitHub, reply in the comment thread (`gh api repos/{owner}/{repo}/pulls/{pr}/comments/{id}/replies`), not as a top-level PR comment.