@wenaixi/dsh-superpower 7.0.0 → 7.0.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 (57) hide show
  1. package/README.md +3 -3
  2. package/lib/catalog.d.ts +83 -0
  3. package/lib/catalog.d.ts.map +1 -0
  4. package/lib/catalog.js +231 -0
  5. package/lib/catalog.js.map +1 -0
  6. package/lib/document.d.ts +52 -0
  7. package/lib/document.d.ts.map +1 -0
  8. package/lib/document.js +196 -0
  9. package/lib/document.js.map +1 -0
  10. package/lib/superpowers.d.ts +6 -0
  11. package/lib/superpowers.d.ts.map +1 -1
  12. package/lib/superpowers.js +27 -250
  13. package/lib/superpowers.js.map +1 -1
  14. package/package.json +1 -1
  15. package/skills/brainstorming/SKILL.md +1 -1
  16. package/skills/brainstorming/scripts/server.cjs +6 -14
  17. package/skills/brainstorming/scripts/start-server.sh +1 -6
  18. package/skills/brainstorming/spec-document-reviewer-prompt.md +1 -1
  19. package/skills/brainstorming/visual-companion.md +5 -31
  20. package/skills/diagnosing-superpowers/SKILL.md +1 -1
  21. package/skills/diagnosing-superpowers/prompts/request-conflicts.md +1 -1
  22. package/skills/diagnosing-superpowers/templates/issue.md +1 -1
  23. package/skills/dispatching-parallel-agents/SKILL.md +4 -4
  24. package/skills/executing-plans/SKILL.md +5 -5
  25. package/skills/finishing-a-development-branch/SKILL.md +5 -5
  26. package/skills/receiving-code-review/SKILL.md +1 -1
  27. package/skills/requesting-code-review/SKILL.md +1 -1
  28. package/skills/requesting-code-review/code-reviewer.md +1 -1
  29. package/skills/subagent-driven-development/SKILL.md +2 -2
  30. package/skills/subagent-driven-development/implementer-prompt.md +1 -1
  31. package/skills/subagent-driven-development/re-review-prompt.md +1 -1
  32. package/skills/subagent-driven-development/scripts/sdd-workspace +2 -2
  33. package/skills/subagent-driven-development/task-reviewer-prompt.md +1 -1
  34. package/skills/systematic-debugging/CREATION-LOG.md +2 -2
  35. package/skills/systematic-debugging/SKILL.md +2 -2
  36. package/skills/systematic-debugging/condition-based-waiting.md +3 -3
  37. package/skills/systematic-debugging/defense-in-depth.md +1 -1
  38. package/skills/systematic-debugging/root-cause-tracing.md +1 -1
  39. package/skills/systematic-debugging/test-pressure-3.md +1 -1
  40. package/skills/test-driven-development/SKILL.md +1 -1
  41. package/skills/test-driven-development/writing-good-tests.md +1 -1
  42. package/skills/using-git-worktrees/SKILL.md +1 -1
  43. package/skills/using-superpowers/SKILL.md +4 -10
  44. package/skills/using-superpowers/references/dsh-tools.md +3 -3
  45. package/skills/verification-before-completion/SKILL.md +1 -1
  46. package/skills/writing-plans/SKILL.md +1 -1
  47. package/skills/writing-skills/SKILL.md +6 -6
  48. package/skills/writing-skills/testing-skills-with-subagents.md +1 -1
  49. package/skills/using-superpowers/references/antigravity-tools.md +0 -23
  50. package/skills/using-superpowers/references/claude-code-tools.md +0 -11
  51. package/skills/using-superpowers/references/codex-tools.md +0 -108
  52. package/skills/using-superpowers/references/gemini-tools.md +0 -63
  53. package/skills/using-superpowers/references/hermes-tools.md +0 -56
  54. package/skills/using-superpowers/references/muse-tools.md +0 -35
  55. package/skills/using-superpowers/references/pi-tools.md +0 -16
  56. package/skills/writing-skills/anthropic-best-practices.md +0 -1146
  57. package/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +0 -188
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: receiving-code-review
3
- description: "Superpower Skill(最高优先级):收到代码评审意见时使用,实施建议前需技术验证与澄清,适用于反馈模糊或存疑场景,强调严谨核实而非盲从。"
3
+ description: "Superpower Skill:收到代码评审意见时使用,实施建议前需技术验证与澄清,适用于反馈模糊或存疑场景,强调严谨核实而非盲从。"
4
4
  ---
5
5
 
6
6
  # 接收代码评审
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: requesting-code-review
3
- description: "Superpower Skill(最高优先级):在任务完成、重大功能实现或准备合并到主分支时发起,用于校验实现是否符合需求与质量标准,建议定期执行。"
3
+ description: "Superpower Skill:在任务完成、重大功能实现或准备合并到主分支时发起,用于校验实现是否符合需求与质量标准,建议定期执行。"
4
4
  ---
5
5
 
6
6
  # 请求代码评审
@@ -1,4 +1,4 @@
1
- # 代码评审提示词模板
1
+ # code reviewer prompt 模板
2
2
 
3
3
  在派发代码评审 subagent 时使用此模板。
4
4
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: subagent-driven-development
3
- description: "Superpower Skill(最高优先级):在当前会话内执行包含独立任务的实现计划时使用,基于 subagent 分发与逐任务评审保障质量。"
3
+ description: "Superpower Skill:在当前会话内执行包含独立任务的实现计划时使用,基于 subagent 分发与逐任务评审保障质量。"
4
4
  ---
5
5
 
6
6
  # subagent 驱动开发
@@ -170,7 +170,7 @@ digraph process {
170
170
 
171
171
  你粘贴到分发提示中的一切——以及 subagent 返回的一切——都会在会话剩余时间内常驻上下文,并在后续每一轮被重新读取。请以文件形式移交产物。
172
172
 
173
- **等待已分发的 subagent 时:** 切勿以短超时轮询等待接口,也不要陷入无声的无限等待。当你有本地工作可做时——更新 ledger、打包下一份评审、阅读报告——持续推进;子代结果会自行到达。当你真正空闲时,以有界时长等待(平台允许时每次 5 至 10 分钟),并在每段间隔发布一行状态、核对存活的子代:列出它们,并追查任何已完成却未上报的子代。有界等待几乎保留了长等待的全部效率,同时保证卡住或丢失的子代能在数分钟内被发现,而非等到会话结束。
173
+ **等待已分发的 subagent 时:** 切勿以短超时 poll等待接口,也不要陷入无声的无限等待。当你有本地工作可做时——更新 ledger、打包下一份评审、阅读报告——持续推进;子代结果会自行到达。当你真正空闲时,以有界时长等待(平台允许时每次 5 至 10 分钟),并在每段间隔发布一行状态、核对存活的子代:列出它们,并追查任何已完成却未上报的子代。有界等待几乎保留了长等待的全部效率,同时保证卡住或丢失的子代能在数分钟内被发现,而非等到会话结束。
174
174
 
175
175
  ### 1. 分发实现者
176
176
 
@@ -1,4 +1,4 @@
1
- # 实现者 subagent 提示词模板
1
+ # implementer subagent prompt 模板
2
2
 
3
3
  在分发实现者 subagent 时使用此模板。
4
4
 
@@ -1,4 +1,4 @@
1
- # 定点复审提示词模板
1
+ # re-review prompt 模板
2
2
 
3
3
  在派发修复轮次后的复审时使用此模板。re-reviewer 负责核实上一轮的问题是否已修复,并检查修复 diff 是否引入新的破坏性变更。这不是一次全新的评审——完整评审已经完成。
4
4
 
@@ -18,8 +18,8 @@
18
18
  # legacy workspace adopts instead of detecting; acceptable, marker-less
19
19
  # workspaces age out as plans finish.
20
20
  #
21
- # The workspace lives in the working tree (not under .git/) because Claude Code
22
- # treats .git/ as a protected path and denies agent writes there — which blocks
21
+ # The workspace lives in the working tree (not under .git/) because subagent
22
+ # sandbox policies treat .git/ as a protected path and deny writes there — which blocks
23
23
  # an implementer subagent from writing its report file. A self-ignoring
24
24
  # .gitignore at .superpowers/sdd/ keeps every plan's workspace out of
25
25
  # `git status` and out of accidental commits without modifying any tracked file.
@@ -1,4 +1,4 @@
1
- # 任务 reviewer 提示词模板
1
+ # task reviewer prompt 模板
2
2
 
3
3
  在派发任务评审 subagent 时使用本模板。reviewer 只读取一次任务的 diff,并返回两项裁决:规格符合度与代码质量。
4
4
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## 来源材料
6
6
 
7
- 从 `~/.claude/CLAUDE.md` 提取的调试框架:
7
+ 从早期版本的 `CLAUDE.md` 用户指令中提取的调试框架:
8
8
  - 四阶段系统化流程(调查 → 模式分析 → 假设 → 实现)
9
9
  - 核心原则:始终定位根因,绝不只修复表象
10
10
  - 规则设计用于抵御时间压力与自我合理化
@@ -99,7 +99,7 @@
99
99
 
100
100
  ## 关键洞察
101
101
 
102
- **最重要的加固点:** 反模式章节展示了在当下看似合理的捷径。当 Claude 产生“我就加这一个快速修复”的念头时,看到该模式被明确列为错误,会产生认知阻力。
102
+ **最重要的加固点:** 反模式章节展示了在当下看似合理的捷径。当 agent 产生“我就加这一个快速修复”的念头时,看到该模式被明确列为错误,会产生认知阻力。
103
103
 
104
104
  ## 使用示例
105
105
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: systematic-debugging
3
- description: "Superpower Skill(最高优先级):遇到缺陷、测试失败或异常行为时使用,要求先完成根因分析再提出修复,确保系统化调试。"
3
+ description: "Superpower Skill:遇到缺陷、测试失败或异常行为时使用,要求先完成根因分析再提出修复,确保系统化调试。"
4
4
  ---
5
5
 
6
6
  # 系统化调试
@@ -280,4 +280,4 @@ description: "Superpower Skill(最高优先级):遇到缺陷、测试失
280
280
 
281
281
  - **`root-cause-tracing.md`** - 沿调用栈回溯追踪,直至找到最初触发点
282
282
  - **`defense-in-depth.md`** - 找到根因后在多层添加校验
283
- - **`condition-based-waiting.md`** - 用条件轮询替代固定时延等待
283
+ - **`condition-based-waiting.md`** - 用条件poll替代固定时延等待
@@ -57,7 +57,7 @@ expect(result).toBeDefined();
57
57
 
58
58
  ## 实现
59
59
 
60
- 通用轮询函数:
60
+ 通用poll函数:
61
61
 
62
62
  ```typescript
63
63
  async function waitFor<T>(
@@ -84,8 +84,8 @@ async function waitFor<T>(
84
84
 
85
85
  ## 常见错误
86
86
 
87
- **[FAIL] 轮询过快:** `setTimeout(check, 1)` - 浪费 CPU
88
- **[OK] 修正:** 每 10ms 轮询一次
87
+ **[FAIL] poll过快:** `setTimeout(check, 1)` - 浪费 CPU
88
+ **[OK] 修正:** 每 10ms poll一次
89
89
 
90
90
  **[FAIL] 无超时:** 条件始终不满足时会无限循环
91
91
  **[OK] 修正:** 始终设置超时,并给出清晰的错误信息
@@ -54,7 +54,7 @@ function initializeWorkspace(projectDir: string, sessionId: string) {
54
54
 
55
55
  ```typescript
56
56
  async function gitInit(directory: string) {
57
- // In tests, refuse git init outside temp directories
57
+ // 在测试中,拒绝在临时目录之外执行 git init
58
58
  if (process.env.NODE_ENV === 'test') {
59
59
  const normalized = normalize(resolve(directory));
60
60
  const tmpDir = normalize(resolve(tmpdir()));
@@ -68,7 +68,7 @@ Project.create('name', context.tempDir); // Accessed before beforeEach!
68
68
  当无法手动追溯时,添加插桩:
69
69
 
70
70
  ```typescript
71
- // Before the problematic operation
71
+ // 在执行问题操作之前
72
72
  async function gitInit(directory: string) {
73
73
  const stack = new Error().stack;
74
74
  console.error('DEBUG git init:', {
@@ -21,7 +21,7 @@
21
21
 
22
22
  **技术负责人:**“调查要花多久?”
23
23
 
24
- **你:**“大概需要 30-45 分钟来梳理中间件并弄清令牌生命周期。”
24
+ **你:**“大概需要 30-45 分钟来梳理中间件并弄清令牌lifecycle。”
25
25
 
26
26
  **技术负责人:**“这次会议已经超时 20 分钟了。[资深工程师]对这块非常熟悉。我们直接实施修复吧。”
27
27
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: test-driven-development
3
- description: "Superpower Skill(最高优先级):实现新功能或修复缺陷时,编写实现代码前先写测试的测试驱动开发完整指南与流程约束规范。"
3
+ description: "Superpower Skill:实现新功能或修复缺陷时,编写实现代码前先写测试的测试驱动开发完整指南与流程约束规范。"
4
4
  ---
5
5
 
6
6
  # 测试驱动开发(TDD)
@@ -80,7 +80,7 @@ vi.mock('MCPServerManager');
80
80
 
81
81
  **完整镜像真实数据。** 按真实存在的完整结构来 mock——包含所有已文档化的字段——而不仅仅是你测试中读取的字段。部分 mock 会在下游代码读取缺失字段时静默失败:测试通过,而集成已损坏。
82
82
 
83
- **生产类只承载生产方法。** 仅测试需要的清理逻辑应放在测试工具中,绝不要以 `destroy()` 的形式出现在生产类上。自问:这个方法是否只被测试调用?这个类是否拥有该资源的生命周期?答案有误 → 放到测试工具里。
83
+ **生产类只承载生产方法。** 仅测试需要的清理逻辑应放在测试工具中,绝不要以 `destroy()` 的形式出现在生产类上。自问:这个方法是否只被测试调用?这个类是否拥有该资源的lifecycle?答案有误 → 放到测试工具里。
84
84
 
85
85
  **复杂 mock 不如真实组件。** 当 mock 的搭建超过测试逻辑本身、mock 缺少真实组件拥有的方法、或测试因 mock 变更而崩溃时,改用基于真实组件的集成测试。**你的 human partner 的提问:**“这里真的需要用 mock 吗?”
86
86
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: using-git-worktrees
3
- description: "Superpower Skill(最高优先级):适用于需与当前 worktree 隔离的功能开发或执行实现计划前,通过原生工具优先、git worktree 兜底的方式确保独立 worktree 就绪。"
3
+ description: "Superpower Skill:适用于需与当前 worktree 隔离的功能开发或执行实现计划前,通过原生工具优先、git worktree 兜底的方式确保独立 worktree 就绪。"
4
4
  ---
5
5
 
6
6
  # 使用 Git Worktree
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: using-superpowers
3
- description: "Superpower Skill(最高优先级):适用于任何对话开始前,建立技能查找与调用规范,要求在任何回复前优先调用相关技能,包括澄清问题。"
3
+ description: "Superpower Skill:适用于任何对话开始前,建立技能查找与调用规范,要求在任何回复前优先调用相关技能,包括澄清问题。"
4
4
  ---
5
5
 
6
6
  <SUBAGENT-STOP>
@@ -51,16 +51,10 @@ description: "Superpower Skill(最高优先级):适用于任何对话开
51
51
 
52
52
  ## 平台适配
53
53
 
54
- 如果你的执行环境出现在此列表中,请先阅读对应的参考文件获取专项说明:
54
+ 本套件专为 **DSH (DeepSeek Harness)** 原生环境设计,仅支持 DSH 平台:
55
55
 
56
- - DSH (DeepSeek Harness): `references/dsh-tools.md` — **请优先阅读。** 将 Bash→pwsh/bash、Read/Write/Edit→fs、Glob/Grep→fs-search、Task/Subagent→subagent/workflow、TodoWrite→todo、AskUserQuestion→ask-user、Skill→skill 进行映射。本套件中的所有技能均假定使用 DSH 工具。
57
- - Claude Code: `references/claude-code-tools.md`
58
- - Codex: `references/codex-tools.md`
59
- - Pi: `references/pi-tools.md`
60
- - Antigravity: `references/antigravity-tools.md`
61
- - Hermes Agent: `references/hermes-tools.md`
62
- - Muse: `references/muse-tools.md`
56
+ - 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)。
63
57
 
64
58
  ## 用户指令
65
59
 
66
- 用户指令(CLAUDE.md、AGENTS.md、GEMINI.md 等,以及直接请求)的优先级高于技能,技能又高于默认行为。仅当 human partner 明确指示时,才可跳过技能工作流或指令。
60
+ 用户指令(AGENTS.md、CLAUDE.md 等,以及直接请求)的优先级高于技能,技能又高于默认行为。仅当 human partner 明确指示时,才可跳过技能工作流或指令。
@@ -1,11 +1,11 @@
1
1
  # DSH Tools Reference for Superpowers
2
2
 
3
- > 面向模型的 DSH 工具速查。Superpowers 原版文案中的 Claude Code / Codex 工具名在此映射为 DSH 等价物。
4
- > 当 skill 指示使用某一工具时,按下表替换即可。
3
+ > 面向模型的 DSH 工具速查。Superpowers 技能在 DSH 平台环境下的原生工具等价物与行为规范。
4
+ > 当 skill 指示执行特定工具动作时,按本表原生 DSH 工具执行。
5
5
 
6
6
  ## 核心映射
7
7
 
8
- | 原版提及 | DSH 等价 | 备注 |
8
+ | 技能动作 | DSH 等价 | 备注 |
9
9
  |---|---|---|
10
10
  | `Bash` / `bash` | `pwsh`(首选,Windows 友好)或 `bash` | 长耗时命令用 `run_in_background: true`,通过 `job_output` / `job_list` 收敛 |
11
11
  | `Read` / `Write` / `Edit` | `fs` 工具的 `read` / `write` / `edit` | `read` 前无需 `fs/observed` 校验,`write/edit` 自动触发 `fs/observed` 失效 |
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: verification-before-completion
3
- description: "Superpower Skill(最高优先级):在声称完成、修复或通过前强制执行校验,用于提交或创建 PR 前必须运行验证命令并确认输出,始终以证据为准而非断言。"
3
+ description: "Superpower Skill:在声称完成、修复或通过前强制执行校验,用于提交或创建 PR 前必须运行验证命令并确认输出,始终以证据为准而非断言。"
4
4
  ---
5
5
 
6
6
  # 完成前的校验
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: writing-plans
3
- description: "Superpower Skill(最高优先级):当已具备清晰的需求规格或多步骤 task description 且尚未开始编码时使用,用于把需求拆解为结构清晰、粒度可控、可直接执行、可测试与可验证的完整实施计划。"
3
+ description: "Superpower Skill:当已具备清晰的需求规格或多步骤 task description 且尚未开始编码时使用,用于把需求拆解为结构清晰、粒度可控、可直接执行、可测试与可验证的完整实施计划。"
4
4
  ---
5
5
 
6
6
  # 编写计划
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: writing-skills
3
- description: "Superpower Skill(最高优先级):在创建新技能、编辑或重构现有技能,以及在部署前验证技能可用性、合规性与实际生效情况时使用。"
3
+ description: "Superpower Skill:在创建新技能、编辑或重构现有技能,以及在部署前验证技能可用性、合规性与实际生效情况时使用。"
4
4
  ---
5
5
 
6
6
  # 技能编写
@@ -9,7 +9,7 @@ description: "Superpower Skill(最高优先级):在创建新技能、编
9
9
 
10
10
  **编写技能就是将测试驱动开发应用于流程文档。**
11
11
 
12
- **个人技能存放于运行时的技能目录**(Claude Code 上为 `~/.claude/skills/`)—— 其他运行时的路径请参见 [codex-tools.md](../using-superpowers/references/codex-tools.md) 或 [gemini-tools.md](../using-superpowers/references/gemini-tools.md)。Codex、Copilot CLI 与 Gemini CLI 同样识别 `~/.agents/skills/` 作为跨运行时别名。
12
+ **个人技能存放于 DSH 的技能目录**:全局技能为 `~/.dsh/skills/`,项目级技能为 `<project>/.dsh/skills/`,亦可通过 DSH bundle 插件(`cordis.patch.yml` 注入 `ctx.skills`)分发提供。详细工具映射请参见 [dsh-tools.md](../using-superpowers/references/dsh-tools.md)。
13
13
 
14
14
  你编写测试用例(带 subagent 的压力场景)、观察其失败(基线行为)、编写技能(文档)、观察测试通过(agent 已遵守)、再进行重构(堵住漏洞)。
15
15
 
@@ -17,7 +17,7 @@ description: "Superpower Skill(最高优先级):在创建新技能、编
17
17
 
18
18
  **必备前置知识:** 使用本技能前,你必须理解 test-driven-development。该技能定义了基本的 红-绿-重构 循环,本技能则是将 TDD 适配到文档编写上。
19
19
 
20
- **官方指引:** 关于 Anthropic 官方的技能编写最佳实践,请参见 anthropic-best-practices.md。本文档在以 TDD 为核心的方法之外,提供了额外的模式与指南作为补充。
20
+ **官方指引:** 关于 DSH 平台技能的标准与工具规范,请参见 [dsh-tools.md](../using-superpowers/references/dsh-tools.md)。本文档在以 TDD 为核心的方法之外,提供了额外的模式与指南作为补充。
21
21
 
22
22
  ## 什么是技能?
23
23
 
@@ -371,7 +371,7 @@ pptx/
371
371
  ```
372
372
  适用场景:参考材料篇幅过大,不适合内联
373
373
 
374
- 通过解释器调用随包脚本(正文中用 `bash scripts/tool.sh`、`node scripts/tool.js`),绝不用裸路径:部分宿主插件打包器会剥掉可执行位,裸调 `scripts/tool.sh` 会以 `Permission denied` 失败。
374
+ 通过解释器调用随包脚本(正文中用 `bash scripts/tool.sh`、`node scripts/tool.js`),绝不用裸路径调用:部分宿主插件打包器会剥掉可执行位,裸调 `scripts/tool.sh` 会以 `Permission denied` 失败。
375
375
 
376
376
  ## 铁律(与 TDD 相同)
377
377
 
@@ -465,11 +465,11 @@ NO SKILL WITHOUT A FAILING TEST FIRST
465
465
  | 基线失效 | 正确形式 | 错误形式 |
466
466
  |---|---|---|
467
467
  | 在压力下跳过/违反规则(明知故犯) | 禁止项 + 辩解对照表 + 危险信号(见下文加固方法) | 软性指引("尽量..."、"考虑...") |
468
- | 遵守了,但输出形态错误(提示词臃肿、结论被淹没、复述需求) | 正向配方或契约:明确输出是什么——包含哪些部分、按什么顺序 | 禁止清单("不要复述"、"切勿叙述") |
468
+ | 遵守了,但输出形态错误(prompt臃肿、结论被淹没、复述需求) | 正向配方或契约:明确输出是什么——包含哪些部分、按什么顺序 | 禁止清单("不要复述"、"切勿叙述") |
469
469
  | 对已产出内容遗漏了必需元素 | 结构化:模板中设置必填字段或槽位 | 模板附近的文字提醒 |
470
470
  | 行为应取决于某个条件 | 以可观察谓词为键的条件式("如果 brief 存在,则引用它") | 无条件规则 + 例外条款 |
471
471
 
472
- **为什么禁止项在形态塑造问题上会适得其反:** 在竞争性动机("让提示词自包含")的影响下,agent 会与"不要做 X"进行博弈。在针对分发提示词指引的措辞对比测试中,禁止式措辞比配方式产生了明显更多的非期望内容,甚至比无指引的对照组表现更差——请对你自己的场景做微观测试而非想当然,但切勿默认使用禁止式。配方式无可博弈:输出要么符合既定形态,要么不符合。
472
+ **为什么禁止项在形态塑造问题上会适得其反:** 在竞争性动机("让prompt自包含")的影响下,agent 会与"不要做 X"进行博弈。在针对分发prompt指引的措辞对比测试中,禁止式措辞比配方式产生了明显更多的非期望内容,甚至比无指引的对照组表现更差——请对你自己的场景做微观测试而非想当然,但切勿默认使用禁止式。配方式无可博弈:输出要么符合既定形态,要么不符合。
473
473
 
474
474
  **无论选择哪种形式,都需遵守以下规则:**
475
475
  - **不要加细腻化条款。** "除非有必要否则不要做 X" 会重新打开博弈空间——在同一措辞测试中,给获胜配方追加一条细腻化条款,就使其从稳定表现退化为不稳定。真正的例外应表述为基于可观察谓词的独立条件式。
@@ -12,7 +12,7 @@
12
12
 
13
13
  **前置要求:** 使用本技能前,必须先掌握 test-driven-development。该技能定义了 RED-GREEN-REFACTOR 基础循环,本技能则提供面向技能测试的专用格式(压力场景、合理化对照表)。
14
14
 
15
- **完整实战示例:** 参见 examples/CLAUDE_MD_TESTING.md,其中包含针对 CLAUDE.md 文档变体的完整测试过程。
15
+ **完整实战示例:** 参见用 DSH 指令文件(`AGENTS.md` / `CLAUDE.md`)实际运行一遍上面的 TDD 映射,验证技能在压力场景下的发现率与合规性。
16
16
 
17
17
  ## 适用场景
18
18
 
@@ -1,23 +0,0 @@
1
- # Antigravity CLI (`agy`) Tool Mapping
2
-
3
- Skills speak in actions ("dispatch a subagent", "create a todo", "read a file"). On the Antigravity CLI (`agy`) these resolve to the tools below.
4
-
5
- | Action skills request | Antigravity CLI equivalent |
6
- |----------------------|----------------------|
7
- | Dispatch a subagent (`Subagent (general-purpose):` template) | `invoke_subagent` with a built-in `TypeName` — `self` for full-capability work, `research` for read-only |
8
- | Task tracking ("create a todo", "mark complete") | a **task artifact** — `write_to_file` with `IsArtifact: true` and `ArtifactType: "task"` (see [Task tracking](#task-tracking)). **Not** `manage_task`, which manages background processes. |
9
-
10
- ## Task tracking
11
-
12
- Antigravity has **no todo tool** (`manage_task` manages background
13
- processes — `list`/`kill`/`status`/`send_input` — it is *not* a checklist). When a
14
- skill says to create a todo list or track tasks, maintain a **task artifact**: a
15
- markdown checklist saved with `write_to_file` (`IsArtifact: true`,
16
- `ArtifactMetadata.ArtifactType: "task"`), edited with `replace_file_content` /
17
- `multi_replace_file_content` as you go.
18
-
19
- At the start of any multi-step task, create the task artifact listing every step of
20
- your plan. As you complete each step, edit the artifact to mark it done (`- [x]`).
21
- If the plan changes, update the checklist. Keep it current — it is your source of
22
- truth for what remains; once the conversation gets long, re-read it before starting
23
- each step.
@@ -1,11 +0,0 @@
1
- # Claude Code 工具说明
2
-
3
- Claude Code 是参考宿主:技能以其词汇表表述(`Agent` 用于派发 subagent、todos 表示待办、`Skill` 表示技能)。本文说明 Claude Code 中唯一能让技能运行成本低于默认形态的场景,该场景由 human partner 决定是否启用,不影响技能的任何既有要求。
4
-
5
- ## subagent 驱动开发的低成本编排
6
-
7
- 控制会话是 subagent-driven-development 运行中最昂贵的席位:它读取每一次派发结果与每一份报告,且通常运行在会话最强的模型上。Claude Code 支持嵌套 subagent(默认比主对话低三层,`CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH` 可调整),因此整个循环可以整体下移一层运行。
8
-
9
- 当 human partner 提出要求——或表示会话模型过于昂贵、不宜用于协调——就派发一个运行在中层模型上的编排 subagent,附上计划路径与"端到端使用 subagent-driven-development"的指令。编排者按该技能的模型选择条款派出自己的实现者与 reviewer;workspace 与 ledger 都在磁盘上,不会因多出的这一层而丢失任何内容。其最终消息必须原样携带 "Rulings I made" 清单——这份清单是决策到达 human partner 的途径,你要转达它,而不是概括它。
10
-
11
- 仅对完整计划这样做。嵌套单个任务的派发毫无收益,只会多占一个席位。
@@ -1,108 +0,0 @@
1
- ## Subagent dispatch requires multi-agent support
2
-
3
- Add to your Codex config (`~/.codex/config.toml`):
4
-
5
- ```toml
6
- [features]
7
- multi_agent = true
8
- ```
9
-
10
- This enables the multi-agent tools that skills like
11
- `dispatching-parallel-agents` and `subagent-driven-development` use.
12
- Which tools you get depends on the multi-agent version your model
13
- preset selects (current presets run V2; older ones run V1). Trust your
14
- actual tool list over any table — including this one — when they
15
- disagree.
16
-
17
- - **Spawning:** give children a clean context with
18
- `spawn_agent {fork_turns: "none"}`; the default `"all"` copies your
19
- entire transcript into the child. On Codex 0.145+, role files under
20
- `~/.codex/agents/` attach to isolated forks via `agent_type`.
21
- Full-history forks accept `model` and `reasoning_effort` overrides
22
- (only `agent_type` is refused there) — isolated forks are the SDD
23
- default for context hygiene, not because overrides require them.
24
- - **Fix rounds:** resume the implementer with `followup_task` — it
25
- delivers your message, triggers a turn, and transparently reloads a
26
- child the harness evicted. Never dispatch a fresh implementer on the
27
- theory that a spawned agent cannot be messaged again; on V2 it
28
- always can.
29
- - **Lifecycle:** V2 has no `close_agent`. Finished children are
30
- evicted automatically when slots are needed; leaving them unclosed
31
- costs nothing. Only V1 sessions have `close_agent` — there, close
32
- reviewers when their review returns, and close each implementer
33
- after its task's review passes.
34
- - **Model names:** never copy a model name from a skill, table, or old
35
- session into `spawn_agent` without checking it against your current
36
- spawn allowlist — V2 accepts only V2-capable presets and hard-errors
37
- on the rest.
38
-
39
- ## Waiting on children
40
-
41
- `wait_agent` is an event subscription, not a poll: a long wait wakes
42
- the moment a child produces mailbox activity, with the same latency as
43
- a short one. Short-timeout polling buys nothing and costs a tool call —
44
- and a context rebill — per poll. In measured sessions, roughly
45
- two-thirds of all wait calls were short polls that timed out.
46
-
47
- - While you still have local work, do not wait at all. A completed
48
- child's final answer is pushed into your mailbox and arrives with
49
- your next turn.
50
- - When you are genuinely idle with children outstanding, wait in
51
- bounded stretches: `wait_agent` with `timeout_ms` 300000-600000
52
- (5-10 minutes). After each stretch — wake or timeout — post one
53
- status line, run `list_agents`, and chase any child that finished
54
- without reporting. Never stack polls shorter than five minutes; the
55
- event subscription wakes a bounded stretch just as fast as a short
56
- one.
57
- - Completion mail cannot wake an idle controller (it is delivered
58
- without triggering a turn); covering that idle window is
59
- `wait_agent`'s only job. A stretch that times out with no activity
60
- is your cue to reconcile, not to shorten the next stretch.
61
-
62
- ## Model routing on spawns
63
-
64
- Every `spawn_agent` you issue — including when you are yourself a
65
- spawned child running a fan-out — sets `model` AND `reasoning_effort`
66
- explicitly, per the Model Selection rules of the skill you are
67
- executing. Setting `model` alone is a trap: the child's effort
68
- silently resets to that model's default, not to yours.
69
-
70
- Ask your human partner to add a machine-level backstop to
71
- `~/.codex/config.toml` so any spawn that slips through still routes to
72
- a deliberate tier instead of silently inheriting the session's most
73
- expensive model:
74
-
75
- ```toml
76
- [agents]
77
- default_subagent_model = "<a mid-tier model from your spawn allowlist>"
78
- default_subagent_reasoning_effort = "medium"
79
- ```
80
-
81
- ## Environment Detection
82
-
83
- Skills that create worktrees or finish branches should detect their
84
- environment with read-only git commands before proceeding:
85
-
86
- ```bash
87
- GIT_DIR=$(cd "$(git rev-parse --git-dir)" 2>/dev/null && pwd -P)
88
- GIT_COMMON=$(cd "$(git rev-parse --git-common-dir)" 2>/dev/null && pwd -P)
89
- BRANCH=$(git branch --show-current)
90
- ```
91
-
92
- - `GIT_DIR != GIT_COMMON` → already in a linked worktree (skip creation)
93
- - `BRANCH` empty → detached HEAD (cannot branch/push/PR from sandbox)
94
-
95
- See `using-git-worktrees` Step 0 and `finishing-a-development-branch`
96
- Step 1 for how each skill uses these signals.
97
-
98
- ## Codex App Finishing
99
-
100
- When the sandbox blocks branch/push operations (detached HEAD in an
101
- externally managed worktree), the agent commits all work and informs
102
- the user to use the App's native controls:
103
-
104
- - **"Create branch"** — names the branch, then commit/push/PR via App UI
105
- - **"Hand off to local"** — transfers work to the user's local checkout
106
-
107
- The agent can still run tests, stage files, and output suggested branch
108
- names, commit messages, and PR descriptions for the user to copy.
@@ -1,63 +0,0 @@
1
- # Gemini CLI Tool Mapping
2
-
3
- Skills speak in actions ("dispatch a subagent", "create a todo", "read a file"). On Gemini CLI these resolve to the tools below.
4
-
5
- | Action skills request | Gemini CLI equivalent |
6
- |----------------------|----------------------|
7
- | Read a file | `read_file` |
8
- | Read multiple files at once | `read_many_files` |
9
- | Create a new file | `write_file` |
10
- | Edit a file | `replace` |
11
- | Run a shell command | `run_shell_command` |
12
- | Search file contents | `grep_search` |
13
- | Find files by name | `glob` |
14
- | List files and subdirectories | `list_directory` |
15
- | Fetch a URL | `web_fetch` |
16
- | Search the web | `google_web_search` |
17
- | Invoke a skill | `activate_skill` |
18
- | Dispatch a subagent (`Subagent (general-purpose):` template) | `invoke_agent` with `agent_name: "generalist"` (invocable via `@generalist` chat syntax — see [Subagent support](#subagent-support)) |
19
- | Multiple parallel dispatches | Multiple `invoke_agent` calls in the same response |
20
- | Task tracking ("create a todo", "mark complete") | `write_todos` (statuses: pending, in_progress, completed, cancelled, blocked) |
21
-
22
- ## Instructions file
23
-
24
- When a skill mentions "your instructions file", on Gemini CLI this is **`GEMINI.md`**. Gemini CLI loads `GEMINI.md` hierarchically: global at `~/.gemini/GEMINI.md`, project-level files in workspace directories and their ancestors, and sub-directory `GEMINI.md` files when a tool accesses files in those directories.
25
-
26
- ## Personal skills directory
27
-
28
- User-level skills live at **`~/.gemini/skills/`**, with **`~/.agents/skills/`** as a cross-runtime alias (shared with Codex and Copilot CLI). When both directories exist at the same scope, `.agents/skills/` takes precedence. Each skill is a subdirectory containing a `SKILL.md` (with `name` and `description` frontmatter).
29
-
30
- ## Subagent support
31
-
32
- Gemini CLI dispatches subagents through the `invoke_agent` tool, which takes `agent_name` and `prompt` parameters. The same dispatch is also surfaced as a chat-syntax shortcut: typing `@generalist <prompt>` is equivalent to calling `invoke_agent` with `agent_name: "generalist"`. Built-in agent names include `generalist`, `cli_help`, `codebase_investigator`, and (with browser tooling enabled) `browser_agent`.
33
-
34
- Skills dispatch with `Subagent (general-purpose):` and either reference a prompt-template file (e.g., `subagent-driven-development`'s `./implementer-prompt.md`) or supply an inline prompt. On Gemini CLI:
35
-
36
- | Skill dispatch form | Gemini CLI equivalent |
37
- |---------------------|----------------------|
38
- | References a `*-prompt.md` template (implementer, task-reviewer, code-reviewer, etc.) | Fill the template, then `invoke_agent` with `agent_name: "generalist"` and the filled prompt |
39
- | References `requesting-code-review`'s `./code-reviewer.md` | `invoke_agent` with `agent_name: "generalist"` and the filled review template |
40
- | Inline prompt (no template referenced) | `invoke_agent` with `agent_name: "generalist"` and your inline prompt |
41
-
42
- ### Prompt filling
43
-
44
- Skills provide prompt templates with placeholders like `{WHAT_WAS_IMPLEMENTED}` or `[FULL TEXT of task]`. Fill all placeholders before passing the complete prompt to `invoke_agent`. The prompt template itself contains the agent's role, review criteria, and expected output format — the subagent will follow it.
45
-
46
- ### Parallel dispatch
47
-
48
- Gemini CLI supports parallel subagent dispatch. Issue multiple `invoke_agent` calls in the same response (or multiple `@generalist` invocations in one prompt) to run independent subagent work in parallel. Keep dependent tasks sequential, but do not serialize independent subagent tasks just to preserve a simpler history.
49
-
50
- ## Additional Gemini CLI tools
51
-
52
- These tools are unique to Gemini CLI:
53
-
54
- | Tool | Purpose |
55
- |------|---------|
56
- | `save_memory` (legacy) | Persist facts across sessions when `experimental.memoryV2 = false` |
57
- | `get_internal_docs` | Look up Gemini CLI's bundled documentation |
58
- | `ask_user` | Pose structured questions to the user (text / single-select / multi-select) |
59
- | `enter_plan_mode` / `exit_plan_mode` | Switch into and out of read-only plan mode |
60
- | `update_topic` | Update the current conversation's topic / strategic-intent metadata |
61
- | `complete_task` | Signal that a Gemini subagent has completed and return its result to the parent agent |
62
- | `tracker_create_task`, `tracker_update_task`, `tracker_get_task`, `tracker_list_tasks`, `tracker_add_dependency`, `tracker_visualize` | Rich task tracker with dependency and visualization support |
63
- | `read_mcp_resource`, `list_mcp_resources` | MCP resource access |
@@ -1,56 +0,0 @@
1
- # Hermes Agent Tool Mapping
2
-
3
- Skills speak in actions ("dispatch a subagent", "create a todo", "read a file"). On Hermes Agent these resolve to the tools below.
4
-
5
- ## Tools
6
-
7
- | Action skills request | Hermes tool |
8
- |---|---|
9
- | Read a file | `read_file` |
10
- | Create a new file | `write_file` |
11
- | Edit a file (targeted patch) | `patch` |
12
- | Run a shell command | `terminal` |
13
- | Search file contents | `search_files` |
14
- | Find files by name | `terminal` with `find` |
15
- | Fetch a URL / read a webpage | `web_extract(urls=[...])` |
16
- | Search the web | `web_search(query=...)` |
17
- | Dispatch a subagent | `delegate_task(goal=..., context=..., toolsets=[...], role="leaf")` |
18
- | Task tracking | `todo` tool |
19
- | Invoke a skill | `skill_view("skill-name")` |
20
-
21
- ## Instructions file
22
-
23
- When a skill mentions "your instructions file," on Hermes Agent this is **`AGENTS.md`** in the project directory, or **`SOUL.md`** globally at `~/.hermes/SOUL.md`.
24
-
25
- ## Invoking a skill
26
-
27
- Hermes Agent has a `skills` toolset with `skill_view` and `skills_list` tools.
28
- To invoke a superpowers skill, use:
29
-
30
- ```
31
- skill_view("brainstorming")
32
- skill_view("test-driven-development")
33
- ```
34
-
35
- If `skill_view` cannot find a superpowers skill (it may not appear in the catalog
36
- until the plugin fully registers it), fall back to reading the SKILL.md directly:
37
-
38
- ```
39
- read_file(path="~/.hermes/plugins/superpowers/skills/<skill-name>/SKILL.md")
40
- ```
41
-
42
- This fallback is the same mechanism used by other harnesses without native skill loading.
43
-
44
- ## Subagent dispatch
45
-
46
- Use `delegate_task` to spawn isolated subagents for parallel or sequential workstreams:
47
-
48
- ```
49
- delegate_task(goal="...", context="...", toolsets=[...], role="leaf")
50
- ```
51
-
52
- If `delegate_task` is unavailable, do the work inline rather than inventing tool calls.
53
-
54
- ## Task tracking
55
-
56
- Use the `todo` tool for task tracking within a session. For multi-agent task boards, use `hermes kanban` CLI if available. Treat older `TodoWrite` references as the task-tracking action.
@@ -1,35 +0,0 @@
1
- # Muse 工具映射
2
-
3
- 技能以动作表述("派发 subagent"、"创建待办"、"读取文件")。在 Muse 上,这些动作对应下表工具。
4
-
5
- | 技能要求的动作 | Muse 等价 |
6
- |----------------------|----------------|
7
- | 读取文件 | `read_file` |
8
- | 读取多个文件 | `read_file`(多次调用)或 `search` |
9
- | 创建新文件 | `write_file` |
10
- | 编辑文件 | `edit_file` |
11
- | 运行 shell 命令 | `bash` |
12
- | 搜索文件内容 | `search` |
13
- | 按名称查找文件 | 带 `glob` 的 `search` |
14
- | 抓取 URL | `web_fetch` |
15
- | 搜索网络 | `web_search` |
16
- | 调用技能 | 对 `skills/<name>/SKILL.md` 使用 `read_file`,或使用原生技能工具 |
17
- | 派发 subagent(`Subagent (general-purpose):` 模板) | 用填充的提示词调用 `subagent_spawn` |
18
- | 任务跟踪("创建待办"、"标记完成") | `write_todos` 或 `bash` 任务文件 |
19
- | 向用户提问 | `request_user_input` |
20
-
21
- ## 指令文件
22
-
23
- 当技能提及"你的指令文件"时,在 Muse 上即项目根目录的 **`CLAUDE.md`** 或 **`AGENTS.md`**。Muse 在配置处按层级加载这些文件。
24
-
25
- ## 技能调用
26
-
27
- Muse 通过 `muse skills` 提供原生技能支持。要调用 Superpowers 技能,读取其 `SKILL.md` 并遵循其中的说明。引导技能(using-superpowers)会通过插件钩子在 `SessionStart` 时自动注入——你已在遵循它,无需重新加载。
28
-
29
- ## subagent 派发
30
-
31
- 使用 `subagent_spawn` 将工作委派给隔离的 subagent。派发前先填充提示词模板(如 `implementer-prompt.md`、`task-reviewer-prompt.md`)。若没有可用的 subagent 工具,就在当前会话内联完成工作,而不是臆造工具调用。
32
-
33
- ## 任务跟踪
34
-
35
- 使用 `write_todos` 跟踪清单。技能清单中的每一项创建一个待办,随进度标记 in_progress/completed。若 `write_todos` 不可用,通过 `write_file`/`edit_file` 维护一个 Markdown 任务文件。