@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,69 +1,70 @@
1
1
  ---
2
2
  name: using-superpowers
3
- description: "Superpower Skill:适用于任何对话开始前,建立技能查找与调用规范,要求在任何回复前优先调用相关技能,包括澄清问题。"
3
+ description: "Superpower Skill: Use when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions"
4
+ description_zh: "Superpower Skill:适用于任何对话开始前,建立技能查找与调用规范,要求在任何回复前优先调用相关技能,包括澄清问题。"
4
5
  ---
5
6
 
7
+
6
8
  <SUBAGENT-STOP>
7
- 如果你是作为 subagent 被派来执行特定任务,请忽略本技能。
9
+ If you were dispatched as a subagent to execute a specific task, ignore this skill.
8
10
  </SUBAGENT-STOP>
9
11
 
10
12
  <EXTREMELY-IMPORTANT>
11
- 如果你认为有哪怕 1% 的可能性某个技能适用于你当前要做的事,你就**必须**调用该技能。
13
+ If you think there is even a 1% chance a skill might apply to what you are doing, you ABSOLUTELY MUST invoke the skill.
12
14
 
13
- 如果某项任务适用某个技能,你别无选择,必须使用它。
15
+ IF A SKILL APPLIES TO YOUR TASK, YOU DO NOT HAVE A CHOICE. YOU MUST USE IT.
14
16
 
15
- 这没有商量余地,你不能为自己找借口绕开它。
17
+ This is not negotiable. You cannot rationalize your way out of this.
16
18
  </EXTREMELY-IMPORTANT>
17
19
 
18
- ## 规则
20
+ ## The Rule
19
21
 
20
- **在任何回复或行动之前先调用相关或被请求的技能**——包括澄清问题、探索代码库或检查文件。如果事后发现不适用于当前情况,可以不使用它。
22
+ **Invoke relevant or requested skills BEFORE any response or action** — including clarifying questions, exploring the codebase, or checking files. If it turns out wrong for the situation, you don't have to use it.
21
23
 
22
- **进入规划模式之前:** 如果尚未进行头脑风暴,请先调用头脑风暴技能。
24
+ **Before entering plan mode:** if you haven't already brainstormed, invoke the brainstorming skill first.
23
25
 
24
- 然后宣告 "Using [skill] to [purpose]" 并严格按技能要求执行。如果技能包含清单,请为每一项创建一个待办。
26
+ Then announce "Using [skill] to [purpose]" and follow the skill exactly. If it has a checklist, create a todo per item.
25
27
 
26
- ## 技能优先级
28
+ ## Skill Priority
27
29
 
28
- 当多个技能同时适用时,流程类技能优先——它们决定方法论,然后由实现类技能(如 frontend-design 等)负责落地。头脑风暴与系统化调试是 Superpowers 中最常见的流程技能,但该规则适用于所有技能。
30
+ When multiple skills apply, process skills come first — they set the approach, then implementation skills (frontend-design, etc.) carry it out. Brainstorming and systematic-debugging are Superpowers' most common process skills, but the rule holds for any of them.
29
31
 
30
- - "Let's build X" → 优先使用 brainstorming,再使用实现类技能。
31
- - "Fix this bug" → 优先使用 systematic-debugging,再使用领域技能。
32
+ - "Let's build X" → superpowers:brainstorming first, then implementation skills.
33
+ - "Fix this bug" → superpowers:systematic-debugging first, then domain skills.
32
34
 
33
- ## 警示信号
35
+ ## Red Flags
34
36
 
35
- 出现以下想法时请立刻停下——你正在为自己找借口:
37
+ These thoughts mean STOP—you're rationalizing:
36
38
 
37
- | 想法 | 现实 |
39
+ | Thought | Reality |
38
40
  |---------|---------|
39
- | "这只是个简单问题" | 问题也是任务,先检查技能。 |
40
- | "我需要先了解更多上下文" | 技能检查应在澄清问题之前。 |
41
- | "我先探索一下代码库" | 技能会告诉你如何探索,先检查技能。 |
42
- | "我可以快速看一下 git/文件" | 文件缺少对话上下文,先检查技能。 |
43
- | "我先收集一下信息" | 技能会告诉你如何收集信息。 |
44
- | "这不需要正式的技能" | 只要技能存在,就要用。 |
45
- | "我记得这个技能" | 技能会演进,请阅读当前版本。 |
46
- | "这不算任务" | 有行动就是任务,检查技能。 |
47
- | "用技能太小题大做了" | 简单的事情也会变复杂,请使用技能。 |
48
- | "我就先做这一件事" | 做任何事之前先检查。 |
49
- | "这样做感觉很高效" | 无章法的行动只会浪费时间,技能可以避免。 |
50
- | "我知道那是什么意思" | 知道概念不等于会用技能,请调用它。 |
51
-
52
- ## 技能开关
41
+ | "This is just a simple question" | Questions are tasks. Check for skills. |
42
+ | "I need more context first" | Skill check comes BEFORE clarifying questions. |
43
+ | "Let me explore the codebase first" | Skills tell you HOW to explore. Check first. |
44
+ | "I can check git/files quickly" | Files lack conversation context. Check for skills. |
45
+ | "Let me gather information first" | Skills tell you HOW to gather information. |
46
+ | "This doesn't need a formal skill" | If a skill exists, use it. |
47
+ | "I remember this skill" | Skills evolve. Read current version. |
48
+ | "This doesn't count as a task" | Action = task. Check for skills. |
49
+ | "The skill is overkill" | Simple things become complex. Use it. |
50
+ | "I'll just do this one thing first" | Check BEFORE doing anything. |
51
+ | "This feels productive" | Undisciplined action wastes time. Skills prevent this. |
52
+ | "I know what that means" | Knowing the concept ≠ using the skill. Invoke it. |
53
53
 
54
- 本套件的 15 个技能各自带两个开关,位于 DSH Web GUI 插件管理页中 `@wenaixi/dsh-superpower` 卡片的详情页:
54
+ ## Skill Switches
55
55
 
56
- - **模型可调用**:关闭后该技能不再出现在模型的可用技能目录中,`skill` 工具调用也会被拒绝。
57
- - **用户可调用**:关闭后该技能不再出现在斜杠命令补全与命令行技能清单中。
56
+ Each of the 15 skills in this bundle has one switch on the detail page of the `@wenaixi/dsh-superpower` card in the DSH Web GUI plugin manager:
58
57
 
59
- 开关拨动后立即生效,状态落在 profile 的 `cordis.patch.yml` 里;当前进行中的这一轮对话不受影响,下一轮才会看到新的目录。
58
+ - **Model invocable:** when off, the skill no longer appears in the model's available skill catalog and `skill` tool calls are rejected.
59
+ - **User invocable:** when off, the skill no longer appears in slash-command completion or the CLI skill list.
60
60
 
61
- ## 平台适配
61
+ Toggles take effect immediately; the current turn is unaffected, and the next turn sees the new catalog. State is stored in the profile's `cordis.patch.yml` under the `disabled` table.
62
62
 
63
- 本套件专为 **DSH (DeepSeek Harness)** 原生环境设计,仅支持 DSH 平台:
63
+ ## Platform Adaptation
64
64
 
65
- - DSH 工具规范:`references/dsh-tools.md` — 本套件中的所有技能均假定使用 DSH 工具(Bash→pwsh/bash、Read/Write/Edit→fs、Glob/Grep→fs-search、Task/Subagent→subagent/workflow、TodoWrite→todo、AskUserQuestion→ask-user、Skill→skill)。
65
+ This bundle is designed natively for **DSH (DeepSeek Harness)** and supports only the DSH platform:
66
66
 
67
- ## 用户指令
67
+ - DSH tool mapping: `references/dsh-tools.md` — every skill in this bundle assumes DSH tools (Bash -> pwsh/bash, Read/Write/Edit -> fs, Glob/Grep -> fs-search, Task/Subagent -> subagent/workflow, TodoWrite -> todo, AskUserQuestion -> ask-user, Skill -> skill).
68
+ ## User Instructions
68
69
 
69
- 用户指令(AGENTS.md、CLAUDE.md 等,以及直接请求)的优先级高于技能,技能又高于默认行为。仅当 human partner 明确指示时,才可跳过技能工作流或指令。
70
+ User instructions (CLAUDE.md, AGENTS.md, GEMINI.md, etc, direct requests) take precedence over skills, which in turn override default behavior. Only skip skill workflows or instructions when your human partner has explicitly told you to.
@@ -1,47 +1,47 @@
1
1
  # DSH Tools Reference for Superpowers
2
2
 
3
- > 面向模型的 DSH 工具速查。Superpowers 技能在 DSH 平台环境下的原生工具等价物与行为规范。
4
- > 当 skill 指示执行特定工具动作时,按本表原生 DSH 工具执行。
3
+ > Model-facing DSH tool quick reference. Native tool equivalents and behavior conventions for Superpowers skills on the DSH platform.
4
+ > When a skill directs a specific tool action, execute it with the native DSH tool from this table.
5
5
 
6
- ## 核心映射
6
+ ## Core Mapping
7
7
 
8
- | 技能动作 | DSH 等价 | 备注 |
8
+ | Skill action | DSH equivalent | Notes |
9
9
  |---|---|---|
10
- | `Bash` / `bash` | `pwsh`(首选,Windows 友好)或 `bash` | 长耗时命令用 `run_in_background: true`,通过 `job_output` / `job_list` 收敛 |
11
- | `Read` / `Write` / `Edit` | `fs` 工具的 `read` / `write` / `edit` | `read` 前无需 `fs/observed` 校验,`write/edit` 自动触发 `fs/observed` 失效 |
12
- | `Glob` / `Grep` / `Grep -R` | `fs-search` 工具的 `glob` / `grep` | `glob` 发现文件,`grep` 搜内容;大仓用 `include` 过滤 |
13
- | `Task` / `Subagent` | `subagent` / `subagent_fork` / `workflow` | 单任务派发用 `subagent`,多阶段扇出用 `workflow`(`agent`/`pipeline`/`parallel`) |
14
- | `AskUserQuestion` | `ask-user` | 阻塞式提问,遵守 `userQuestions` 策略 |
15
- | `TodoWrite` | `todo` | 每次提供全量列表,`in_progress` 至少一项 |
16
- | `Skill` | `skill` | `skill(name)` 加载 `<skill_content>`,与 `ctx.skills.get()` 同源 |
17
- | `WebSearch` / `WebFetch` | `web` 工具 | `web_search` + `web_fetch_exa` 已封装为统一 `web` |
18
- | `/skill <name>` | `skill` 工具或用户显式 `/skill` 命令 | 两种路径渲染一致的 `<skill_content>` |
19
- | `git worktree` | `bash` / `pwsh` 中直接执行 `git worktree` | DSH 无 worktree 专属封装,按原命令执行 |
20
-
21
- ## DSH 专属能力(原版无直接对应)
22
-
23
- | DSH 能力 | 何时用 |
10
+ | `Bash` / `bash` | `pwsh` (preferred, Windows-friendly) or `bash` | Long-running commands use `run_in_background: true`; collect with `job_output` / `job_list` |
11
+ | `Read` / `Write` / `Edit` | `fs` tool's `read` / `write` / `edit` | No `fs/observed` check needed before `read`; `write`/`edit` trigger `fs/observed` invalidation automatically |
12
+ | `Glob` / `Grep` / `Grep -R` | `fs-search` tool's `glob` / `grep` | `glob` finds files, `grep` searches content; use `include` filters on large repos |
13
+ | `Task` / `Subagent` | `subagent` / `subagent_fork` / `workflow` | Single-task dispatch uses `subagent`; multi-stage fan-out uses `workflow` (`agent`/`pipeline`/`parallel`) |
14
+ | `AskUserQuestion` | `ask-user` | Blocking question, obeying `userQuestions` policy |
15
+ | `TodoWrite` | `todo` | Always provide the full list; at least one `in_progress` |
16
+ | `Skill` | `skill` | `skill(name)` loads `<skill_content>`, same source as `ctx.skills.get()` |
17
+ | `WebSearch` / `WebFetch` | `web` tool | `web_search` + `web_fetch` wrapped into one `web` |
18
+ | `/skill <name>` | `skill` tool or the user's explicit `/skill` command | Both paths render the same `<skill_content>` |
19
+ | `git worktree` | run `git worktree` directly in `bash` / `pwsh` | DSH has no worktree-specific wrapper; run the plain command |
20
+
21
+ ## DSH-Specific Capabilities (no direct original equivalent)
22
+
23
+ | DSH capability | When to use |
24
24
  |---|---|
25
- | `goal` / `ralph` | 长周期目标的创建、续跑、阻塞判定 |
26
- | `workflow` 脚本 | 需要编排数十个 subagent 的审计/迁移/批量改写 |
27
- | `jobs` | 托管后台任务的查询与终止 |
28
- | `plan-mode` | 只读规划锁定,与 `writing-plans` 的细粒度切片互补 |
29
- | `cordis` 动态插件 | 会话内临时扩展能力(非本移植包范畴) |
25
+ | `goal` / `ralph` | Creating, resuming, or blocking on long-horizon goals |
26
+ | `workflow` scripts | Orchestrating dozens of subagents for audits/migrations/bulk rewrites |
27
+ | `jobs` | Querying and terminating managed background jobs |
28
+ | `plan-mode` | Read-only planning lock, complementing writing-plans' fine-grained slicing |
29
+ | `cordis` dynamic plugins | Extending capabilities mid-session (outside this bundle's scope) |
30
30
 
31
- ## 约束与习惯
31
+ ## Constraints and Habits
32
32
 
33
- - 沙箱默认 `danger-full-access`,但仍需在 skill 中标注文件路径为绝对路径或相对 `cwd` 可解析路径。
34
- - PowerShell 中 `ls -la` / `head` 等 Unix 别名不可用,用 `Get-ChildItem` / `Select-Object -First N`。
35
- - 工具 `execute` 返回结构化 JSON,面向人类的渲染放在 `output.render`(对 skill 编写者)。
36
- - 所有 `waterfall` 事件监听必须调用 `next()`,否则短路下游。
33
+ - Sandbox defaults to `danger-full-access`, but still annotate file paths in skills as absolute or resolvable relative to `cwd`.
34
+ - Unix aliases like `ls -la` / `head` are unavailable in PowerShell; use `Get-ChildItem` / `Select-Object -First N`.
35
+ - Tool `execute` returns structured JSON; human-facing rendering lives in `output.render` (for skill authors).
36
+ - Every `waterfall` event listener must call `next()`, or downstream short-circuits.
37
37
 
38
- ## 最小示例
38
+ ## Minimal Example
39
39
 
40
40
  ```text
41
- 用户:帮我加一个重试工具
42
- 模型:Using brainstorming to clarify requirements
43
- -> 调用 skill(name="brainstorming")
44
- -> 按 skill 流程提问、分类 Spike/Bounded/Architectural
45
- -> 设计获批后调用 skill(name="writing-plans") 切片
46
- -> 每切片派发 subagent(prompt="实现 task-03...") 并用 todo 跟踪
47
- ```
41
+ User: Help me add a retry tool
42
+ Model: Using brainstorming to clarify requirements
43
+ -> call skill(name="brainstorming")
44
+ -> follow the skill's flow to ask questions, classify Spike/Bounded/Architectural
45
+ -> after design approval, call skill(name="writing-plans") to slice
46
+ -> dispatch subagent(prompt="implement task-03...") per slice and track with todo
47
+ ```
@@ -1,120 +1,122 @@
1
1
  ---
2
2
  name: verification-before-completion
3
- description: "Superpower Skill:在声称完成、修复或通过前强制执行校验,用于提交或创建 PR 前必须运行验证命令并确认输出,始终以证据为准而非断言。"
3
+ description: "Superpower Skill: Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always"
4
+ description_zh: "Superpower Skill:在声称完成、修复或通过前强制执行校验,用于提交或创建 PR 前必须运行验证命令并确认输出,始终以证据为准而非断言。"
4
5
  ---
5
6
 
6
- # 完成前的校验
7
7
 
8
- ## 概述
8
+ # Verification Before Completion
9
9
 
10
- **核心原则:** 始终以证据为先,再作断言。
10
+ ## Overview
11
11
 
12
- **违背规则的字面,即是违背规则的精神。**
12
+ **Core principle:** Evidence before claims, always.
13
13
 
14
- ## 铁律
14
+ **Violating the letter of this rule is violating the spirit of this rule.**
15
+
16
+ ## The Iron Law
15
17
 
16
18
  ```
17
- 未经全新的校验证据,不得声称完成
19
+ NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE
18
20
  ```
19
21
 
20
- 若在本条消息中未运行校验命令,则不得声称其已通过。
22
+ If you haven't run the verification command in this message, you cannot claim it passes.
21
23
 
22
- ## 门禁流程
24
+ ## The Gate Function
23
25
 
24
26
  ```
25
- 在声称任何状态或表达满意之前:
27
+ BEFORE claiming any status or expressing satisfaction:
26
28
 
27
- 1. 识别:哪条命令能证明该断言?
28
- 2. 执行:完整执行该命令(全新、完整)
29
- 3. 读取:完整输出,检查退出码,统计失败数
30
- 4. 核验:输出是否印证该断言?
31
- - 若否:如实陈述实际状态并附上证据
32
- - 若是:附证据再作断言
33
- 5. 仅在此之后:方可提出断言
29
+ 1. IDENTIFY: What command proves this claim?
30
+ 2. RUN: Execute the FULL command (fresh, complete)
31
+ 3. READ: Full output, check exit code, count failures
32
+ 4. VERIFY: Does output confirm the claim?
33
+ - If NO: State actual status with evidence
34
+ - If YES: State claim WITH evidence
35
+ 5. ONLY THEN: Make the claim
34
36
 
35
- 跳过任何一步即等同于撒谎,而非校验
37
+ Skip any step = lying, not verifying
36
38
  ```
37
39
 
38
- ## 常见失效场景
40
+ ## Common Failures
39
41
 
40
- | 断言 | 所需证据 | 不充分的依据 |
42
+ | Claim | Requires | Not Sufficient |
41
43
  |-------|----------|----------------|
42
- | 测试通过 | 测试命令输出:0 失败 | 历史运行结果、“应该能过” |
43
- | Lint 干净 | Linter 输出:0 错误 | 局部检查、推断外延 |
44
- | 构建成功 | 构建命令:exit 0 | Linter 通过、日志看起来正常 |
45
- | 缺陷已修复 | 复现原症状的测试:通过 | 已改代码、想当然认为已修 |
46
- | 回归测试有效 | 红绿循环已验证 | 仅通过一次 |
47
- | agent 已完成 | VCS diff 显示有变更 | agent 报告“成功” |
48
- | 需求已满足 | 逐项核对清单 | 测试通过 |
49
-
50
- ## 危险信号 - 立即停止
51
-
52
- - 使用“应该”“大概”“似乎”等不确定表述
53
- - 校验前就表达满意(“太好了!”“完美!”“搞定了!”等)
54
- - 未经校验就准备 commit / push / 提 PR
55
- - 轻信 agent 的成功报告
56
- - 依赖局部校验
57
- - 心存“就这一次”的侥幸
58
- - 因疲惫而想草草收工
59
- - **任何未运行校验就暗示成功的措辞**
60
-
61
- ## 防止自我合理化
62
-
63
- | 借口 | 事实 |
44
+ | Tests pass | Test command output: 0 failures | Previous run, "should pass" |
45
+ | Linter clean | Linter output: 0 errors | Partial check, extrapolation |
46
+ | Build succeeds | Build command: exit 0 | Linter passing, logs look good |
47
+ | Bug fixed | Test original symptom: passes | Code changed, assumed fixed |
48
+ | Regression test works | Red-green cycle verified | Test passes once |
49
+ | Agent completed | VCS diff shows changes | Agent reports "success" |
50
+ | Requirements met | Line-by-line checklist | Tests passing |
51
+
52
+ ## Red Flags - STOP
53
+
54
+ - Using "should", "probably", "seems to"
55
+ - Expressing satisfaction before verification ("Great!", "Perfect!", "Done!", etc.)
56
+ - About to commit/push/PR without verification
57
+ - Trusting agent success reports
58
+ - Relying on partial verification
59
+ - Thinking "just this once"
60
+ - Tired and wanting work over
61
+ - **ANY wording implying success without having run verification**
62
+
63
+ ## Rationalization Prevention
64
+
65
+ | Excuse | Reality |
64
66
  |--------|---------|
65
- | “现在应该能行了” | 去运行校验 |
66
- | “我很有把握” | 把握 ≠ 证据 |
67
- | “就这一次” | 没有例外 |
68
- | “Linter 过了” | Linter ≠ 编译器 |
69
- | “agent 说成功了” | 需独立核验 |
70
- | “我太累了” | 疲惫不是理由 |
71
- | “局部检查就够了” | 局部证明不了任何事 |
72
- | “换个说法就不算违规” | 重精神而非抠字眼 |
73
-
74
- ## 关键模式
75
-
76
- **测试:**
67
+ | "Should work now" | RUN the verification |
68
+ | "I'm confident" | Confidence ≠ evidence |
69
+ | "Just this once" | No exceptions |
70
+ | "Linter passed" | Linter ≠ compiler |
71
+ | "Agent said success" | Verify independently |
72
+ | "I'm tired" | Exhaustion ≠ excuse |
73
+ | "Partial check is enough" | Partial proves nothing |
74
+ | "Different words so rule doesn't apply" | Spirit over letter |
75
+
76
+ ## Key Patterns
77
+
78
+ **Tests:**
77
79
  ```
78
- [OK] [执行测试命令] [看到:34/34 通过] “所有测试通过”
79
- [FAIL] “现在应该能过了” / “看起来是对的”
80
+ [OK] [Run test command] [See: 34/34 pass] "All tests pass"
81
+ [FAIL] "Should pass now" / "Looks correct"
80
82
  ```
81
83
 
82
- **回归测试(TDD 红绿循环):**
84
+ **Regression tests (TDD Red-Green):**
83
85
  ```
84
- [OK] 编写 → 运行(通过)→ 回退修复 → 运行(必须失败)→ 恢复 → 运行(通过)
85
- [FAIL] “我已写好回归测试”(未经红绿验证)
86
+ [OK] Write → Run (pass) → Revert fix → Run (MUST FAIL) → Restore → Run (pass)
87
+ [FAIL] "I've written a regression test" (without red-green verification)
86
88
  ```
87
89
 
88
- **构建:**
90
+ **Build:**
89
91
  ```
90
- [OK] [执行构建] [看到:exit 0] “构建通过”
91
- [FAIL] “Linter 过了”(Linter 不检查编译)
92
+ [OK] [Run build] [See: exit 0] "Build passes"
93
+ [FAIL] "Linter passed" (linter doesn't check compilation)
92
94
  ```
93
95
 
94
- **需求:**
96
+ **Requirements:**
95
97
  ```
96
- [OK] 重读方案 → 创建核对清单 → 逐项核验 → 报告缺口或完成情况
97
- [FAIL] “测试通过,阶段完成”
98
+ [OK] Re-read plan → Create checklist → Verify each → Report gaps or completion
99
+ [FAIL] "Tests pass, phase complete"
98
100
  ```
99
101
 
100
- **agent 委派:**
102
+ **Agent delegation:**
101
103
  ```
102
- [OK] agent 报告成功 → 检查 VCS diff → 核验变更 → 报告实际状态
103
- [FAIL] 轻信 agent 报告
104
+ [OK] Agent reports success → Check VCS diff → Verify changes → Report actual state
105
+ [FAIL] Trust agent report
104
106
  ```
105
107
 
106
- ## 适用时机
107
-
108
- **始终在以下动作之前:**
109
- - 任何形式的成功/完成断言
110
- - 任何满意度的表达
111
- - 任何关于工作状态的肯定性陈述
112
- - 提交、创建 PR、任务收尾
113
- - 进入下一项任务
114
- - 委派给 agent
115
-
116
- **规则适用于:**
117
- - 准确措辞
118
- - 改写与同义词
119
- - 暗示成功
120
- - 任何暗示完成/正确的沟通
108
+ ## When To Apply
109
+
110
+ **ALWAYS before:**
111
+ - ANY variation of success/completion claims
112
+ - ANY expression of satisfaction
113
+ - ANY positive statement about work state
114
+ - Committing, PR creation, task completion
115
+ - Moving to next task
116
+ - Delegating to agents
117
+
118
+ **Rule applies to:**
119
+ - Exact phrases
120
+ - Paraphrases and synonyms
121
+ - Implications of success
122
+ - ANY communication suggesting completion/correctness