@wenaixi/dsh-superpower 6.3.1 → 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.
- package/README.md +30 -24
- package/lib/catalog.d.ts +83 -0
- package/lib/catalog.d.ts.map +1 -0
- package/lib/catalog.js +231 -0
- package/lib/catalog.js.map +1 -0
- package/lib/document.d.ts +52 -0
- package/lib/document.d.ts.map +1 -0
- package/lib/document.js +196 -0
- package/lib/document.js.map +1 -0
- package/lib/superpowers.d.ts +9 -2
- package/lib/superpowers.d.ts.map +1 -1
- package/lib/superpowers.js +33 -253
- package/lib/superpowers.js.map +1 -1
- package/package.json +4 -4
- package/skills/{superpower-brainstorming → brainstorming}/SKILL.md +51 -35
- package/skills/{superpower-brainstorming → brainstorming}/scripts/server.cjs +6 -14
- package/skills/{superpower-brainstorming → brainstorming}/scripts/start-server.sh +1 -6
- package/skills/{superpower-brainstorming → brainstorming}/spec-document-reviewer-prompt.md +4 -4
- package/skills/{superpower-brainstorming → brainstorming}/visual-companion.md +8 -34
- package/skills/diagnosing-superpowers/SKILL.md +58 -0
- package/skills/diagnosing-superpowers/prompts/analyst-common.md +24 -0
- package/skills/diagnosing-superpowers/prompts/cost-and-time.md +12 -0
- package/skills/diagnosing-superpowers/prompts/plan-adherence.md +15 -0
- package/skills/diagnosing-superpowers/prompts/quality-evidence.md +11 -0
- package/skills/diagnosing-superpowers/prompts/repeated-work.md +19 -0
- package/skills/diagnosing-superpowers/prompts/request-conflicts.md +11 -0
- package/skills/diagnosing-superpowers/prompts/scrub-audit.md +20 -0
- package/skills/diagnosing-superpowers/prompts/scrub.md +16 -0
- package/skills/diagnosing-superpowers/prompts/similar-session.md +30 -0
- package/skills/diagnosing-superpowers/prompts/skill-timeline.md +16 -0
- package/skills/diagnosing-superpowers/prompts/stumbles.md +16 -0
- package/skills/diagnosing-superpowers/references/context-safety.md +14 -0
- package/skills/diagnosing-superpowers/references/github-issues.md +39 -0
- package/skills/diagnosing-superpowers/references/redaction-policy.md +22 -0
- package/skills/diagnosing-superpowers/references/session-discovery.md +20 -0
- package/skills/diagnosing-superpowers/templates/bundle-README.md +51 -0
- package/skills/diagnosing-superpowers/templates/case.md +57 -0
- package/skills/diagnosing-superpowers/templates/issue.md +45 -0
- package/skills/diagnosing-superpowers/templates/report.md +76 -0
- package/skills/{superpower-dispatching-parallel-agents → dispatching-parallel-agents}/SKILL.md +31 -31
- package/skills/executing-plans/SKILL.md +227 -0
- package/skills/executing-plans/scripts/task-done +52 -0
- package/skills/executing-plans/scripts/task-start +28 -0
- package/skills/{superpower-finishing-a-development-branch → finishing-a-development-branch}/SKILL.md +18 -18
- package/skills/{superpower-receiving-code-review → receiving-code-review}/SKILL.md +39 -39
- package/skills/{superpower-requesting-code-review → requesting-code-review}/SKILL.md +11 -11
- package/skills/{superpower-requesting-code-review → requesting-code-review}/code-reviewer.md +15 -7
- package/skills/subagent-driven-development/SKILL.md +355 -0
- package/skills/{superpower-subagent-driven-development → subagent-driven-development}/implementer-prompt.md +10 -10
- package/skills/subagent-driven-development/re-review-prompt.md +83 -0
- package/skills/{superpower-subagent-driven-development → subagent-driven-development}/scripts/review-package +8 -1
- package/skills/subagent-driven-development/scripts/sdd-workspace +82 -0
- package/skills/{superpower-subagent-driven-development → subagent-driven-development}/scripts/task-brief +3 -1
- package/skills/{superpower-subagent-driven-development → subagent-driven-development}/task-reviewer-prompt.md +27 -27
- package/skills/{superpower-systematic-debugging → systematic-debugging}/CREATION-LOG.md +9 -9
- package/skills/{superpower-systematic-debugging → systematic-debugging}/SKILL.md +8 -8
- package/skills/{superpower-systematic-debugging → systematic-debugging}/condition-based-waiting.md +9 -9
- package/skills/{superpower-systematic-debugging → systematic-debugging}/defense-in-depth.md +1 -1
- package/skills/{superpower-systematic-debugging → systematic-debugging}/find-polluter.sh +4 -4
- package/skills/{superpower-systematic-debugging → systematic-debugging}/root-cause-tracing.md +2 -2
- package/skills/{superpower-systematic-debugging → systematic-debugging}/test-pressure-1.md +1 -1
- package/skills/{superpower-systematic-debugging → systematic-debugging}/test-pressure-3.md +1 -1
- package/skills/{superpower-test-driven-development → test-driven-development}/SKILL.md +16 -14
- package/skills/{superpower-test-driven-development → test-driven-development}/writing-good-tests.md +29 -29
- package/skills/{superpower-using-git-worktrees → using-git-worktrees}/SKILL.md +12 -12
- package/skills/{superpower-using-superpowers → using-superpowers}/SKILL.md +8 -12
- package/skills/{superpower-using-superpowers → using-superpowers}/references/dsh-tools.md +8 -8
- package/skills/{superpower-verification-before-completion → verification-before-completion}/SKILL.md +17 -17
- package/skills/writing-plans/SKILL.md +167 -0
- package/skills/{superpower-writing-skills → writing-skills}/SKILL.md +75 -73
- package/skills/{superpower-writing-skills → writing-skills}/persuasion-principles.md +10 -10
- package/skills/{superpower-writing-skills → writing-skills}/testing-skills-with-subagents.md +53 -53
- package/skills/superpower-executing-plans/SKILL.md +0 -64
- package/skills/superpower-subagent-driven-development/SKILL.md +0 -347
- package/skills/superpower-subagent-driven-development/re-review-prompt.md +0 -83
- package/skills/superpower-subagent-driven-development/scripts/sdd-workspace +0 -40
- package/skills/superpower-using-superpowers/references/antigravity-tools.md +0 -23
- package/skills/superpower-using-superpowers/references/codex-tools.md +0 -108
- package/skills/superpower-using-superpowers/references/gemini-tools.md +0 -63
- package/skills/superpower-using-superpowers/references/hermes-tools.md +0 -56
- package/skills/superpower-using-superpowers/references/pi-tools.md +0 -16
- package/skills/superpower-writing-plans/SKILL.md +0 -160
- package/skills/superpower-writing-plans/plan-document-reviewer-prompt.md +0 -49
- package/skills/superpower-writing-skills/anthropic-best-practices.md +0 -1146
- package/skills/superpower-writing-skills/examples/CLAUDE_MD_TESTING.md +0 -188
- /package/skills/{superpower-brainstorming → brainstorming}/scripts/frame-template.html +0 -0
- /package/skills/{superpower-brainstorming → brainstorming}/scripts/helper.js +0 -0
- /package/skills/{superpower-brainstorming → brainstorming}/scripts/stop-server.sh +0 -0
- /package/skills/{superpower-systematic-debugging → systematic-debugging}/condition-based-waiting-example.ts +0 -0
- /package/skills/{superpower-systematic-debugging → systematic-debugging}/test-academic.md +0 -0
- /package/skills/{superpower-systematic-debugging → systematic-debugging}/test-pressure-2.md +0 -0
- /package/skills/{superpower-writing-skills → writing-skills}/graphviz-conventions.dot +0 -0
- /package/skills/{superpower-writing-skills → writing-skills}/render-graphs.js +0 -0
|
@@ -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., `superpower-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 `superpower-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("superpower-brainstorming")
|
|
32
|
-
skill_view("superpower-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,16 +0,0 @@
|
|
|
1
|
-
# Pi Tool Mapping
|
|
2
|
-
|
|
3
|
-
Skills speak in actions ("dispatch a subagent", "create a todo", "read a file"). On Pi these resolve to the tools below.
|
|
4
|
-
|
|
5
|
-
| Action skills request | Pi equivalent |
|
|
6
|
-
| --- | --- |
|
|
7
|
-
| Dispatch a subagent (`Subagent (general-purpose):` template) | Use an installed subagent tool such as `subagent` from `pi-subagents` if available |
|
|
8
|
-
| Task tracking ("create a todo", "mark complete") | Use an installed todo/task tool if available, otherwise track tasks in the plan or `TODO.md` |
|
|
9
|
-
|
|
10
|
-
## Subagents
|
|
11
|
-
|
|
12
|
-
Pi core does not ship a standard subagent tool. The `pi-subagents` package is a strong optional companion and provides a `subagent` tool with single-agent, chain, parallel, async, forked-context, and resume/status workflows. If no subagent tool is available, do not fabricate `Task` calls; execute sequentially in the current session or explain that the optional subagent capability is not installed.
|
|
13
|
-
|
|
14
|
-
## Task lists
|
|
15
|
-
|
|
16
|
-
Pi core does not ship a standard task-list tool. If a todo/task extension is installed, use its documented tool. Otherwise use Superpowers plan files, checklists in Markdown, or a repo-local `TODO.md` for task tracking. Older Superpowers docs may refer to `TodoWrite`; treat that as the task-tracking action above.
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: superpower-writing-plans
|
|
3
|
-
description: "当已具备清晰的需求规格或多步骤任务说明且尚未开始编码时使用,用于把需求拆解为结构清晰、粒度可控、可直接执行、可测试与可验证的完整实施计划"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# 编写计划
|
|
7
|
-
|
|
8
|
-
## 概述
|
|
9
|
-
|
|
10
|
-
假设执行工程师对当前代码库零背景、品味存疑,为其编写全面、可落地的实施计划。需完整记录其所需的一切信息:每个任务涉及哪些文件、代码、测试、需要查阅的文档,以及如何验证。将整体计划拆解为粒度极细的小任务。遵循 DRY、YAGNI、TDD,频繁提交。
|
|
11
|
-
|
|
12
|
-
假定对方是能力扎实的开发者,但对我们的工具链与问题域几乎一无所知,且不擅长良好的测试设计。
|
|
13
|
-
|
|
14
|
-
**开始时声明:** “我将使用 writing-plans 技能来创建实施计划。”
|
|
15
|
-
|
|
16
|
-
**上下文:** 如在隔离的 worktree 中工作,该 worktree 应在执行时通过 `superpower-using-git-worktrees` 技能创建。
|
|
17
|
-
|
|
18
|
-
**计划保存路径:** `docs/superpowers/plans/YYYY-MM-DD-<feature-name>.md`
|
|
19
|
-
- (如用户已指定计划存放位置,则以用户偏好为准)
|
|
20
|
-
|
|
21
|
-
## 范围检查
|
|
22
|
-
|
|
23
|
-
若需求规格涵盖多个独立子系统,理应在头脑风暴阶段就已拆分为子项目规格。若未拆分,建议将其拆为多份独立计划——每个子系统一份。每份计划都应能独立产出可运行、可测试的软件。
|
|
24
|
-
|
|
25
|
-
## 文件结构
|
|
26
|
-
|
|
27
|
-
在定义任务之前,先梳理清楚将创建或修改哪些文件,以及每个文件的职责。这是锁定拆解方案的关键环节。
|
|
28
|
-
|
|
29
|
-
- 设计边界清晰、接口明确的单元。每个文件只承担单一、明确的职责。
|
|
30
|
-
- 人对能一次性完整装入上下文的代码推理最准确,聚焦的文件也更利于可靠地编辑。优先选择小而聚焦的文件,而非承载过多职责的大文件。
|
|
31
|
-
- 会一同变更的文件应放在一起。按职责拆分,而非按技术分层。
|
|
32
|
-
- 在现有代码库中遵循既有模式。若项目本身采用大文件结构,不要擅自重构;但若你正修改的文件已过于臃肿,在计划中安排一次拆分是合理的。
|
|
33
|
-
|
|
34
|
-
该结构将直接决定任务如何拆解。每个任务都应产出自洽、独立有意义的变更。
|
|
35
|
-
|
|
36
|
-
## 任务规模控制
|
|
37
|
-
|
|
38
|
-
任务是具备完整测试闭环、值得独立评审的最小单元。划分任务边界时:将初始化、配置、脚手架与文档等步骤归入真正需要其产物的任务中;仅在评审者可能对相邻两个任务做出不同评审结论(一个通过、一个驳回)时才进行拆分。每个任务结束时都应产出可独立测试的交付物。
|
|
39
|
-
|
|
40
|
-
## 细粒度任务拆解
|
|
41
|
-
|
|
42
|
-
**每一步只做一件事(2-5 分钟):**
|
|
43
|
-
- “编写失败的测试”——一步
|
|
44
|
-
- “运行测试并确认其失败”——一步
|
|
45
|
-
- “编写刚好让测试通过的最小实现”——一步
|
|
46
|
-
- “运行测试并确认其通过”——一步
|
|
47
|
-
- “提交”——一步
|
|
48
|
-
|
|
49
|
-
## 计划文档头部
|
|
50
|
-
|
|
51
|
-
**每份计划必须以此头部开头:**
|
|
52
|
-
|
|
53
|
-
```markdown
|
|
54
|
-
# [功能名称] 实施计划
|
|
55
|
-
|
|
56
|
-
> **面向 Agent 执行者:** 必需子技能:使用 superpower-subagent-driven-development(推荐)或 superpower-executing-plans 按任务逐项执行本计划。步骤使用复选框(`- [ ]`)语法进行跟踪。
|
|
57
|
-
|
|
58
|
-
**目标:** [一句话描述本计划构建的内容]
|
|
59
|
-
|
|
60
|
-
**架构:** [2-3 句话说明实现思路]
|
|
61
|
-
|
|
62
|
-
**技术栈:** [关键技术/依赖库]
|
|
63
|
-
|
|
64
|
-
**规格:** [本计划所实现的规格/设计文档路径——计划论证以规格为准,规格随计划一同流转,执行者需同时阅读两者]
|
|
65
|
-
|
|
66
|
-
## 全局约束
|
|
67
|
-
|
|
68
|
-
[规格中的项目级全局要求——版本基线、依赖限制、命名与文案规范、平台要求等——每项一行,数值与表述须与规格原文完全一致。所有任务的需求默认包含本节约束。]
|
|
69
|
-
|
|
70
|
-
---
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
## 任务结构
|
|
74
|
-
|
|
75
|
-
````markdown
|
|
76
|
-
### 任务 N:[组件名称]
|
|
77
|
-
|
|
78
|
-
**文件:**
|
|
79
|
-
- 新建:`exact/path/to/file.py`
|
|
80
|
-
- 修改:`exact/path/to/existing.py:123-145`
|
|
81
|
-
- 测试:`tests/exact/path/to/test.py`
|
|
82
|
-
|
|
83
|
-
**接口:**
|
|
84
|
-
- 依赖输入:[本任务依赖的前置任务产出——精确签名]
|
|
85
|
-
- 对外产出:[后续任务所依赖的内容——精确的函数名、参数与返回类型。任务执行者仅可见当前任务;通过本块了解相邻任务使用的名称与类型。]
|
|
86
|
-
|
|
87
|
-
- [ ] **步骤 1:编写失败的测试**
|
|
88
|
-
|
|
89
|
-
```python
|
|
90
|
-
def test_specific_behavior():
|
|
91
|
-
result = function(input)
|
|
92
|
-
assert result == expected
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
- [ ] **步骤 2:运行测试并确认其失败**
|
|
96
|
-
|
|
97
|
-
运行:`pytest tests/path/test.py::test_name -v`
|
|
98
|
-
预期:FAIL,提示 "function not defined"
|
|
99
|
-
|
|
100
|
-
- [ ] **步骤 3:编写最小实现**
|
|
101
|
-
|
|
102
|
-
```python
|
|
103
|
-
def function(input):
|
|
104
|
-
return expected
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
- [ ] **步骤 4:运行测试并确认其通过**
|
|
108
|
-
|
|
109
|
-
运行:`pytest tests/path/test.py::test_name -v`
|
|
110
|
-
预期:PASS
|
|
111
|
-
|
|
112
|
-
- [ ] **步骤 5:提交**
|
|
113
|
-
|
|
114
|
-
```bash
|
|
115
|
-
git add tests/path/test.py src/path/file.py
|
|
116
|
-
git commit -m "feat: add specific feature"
|
|
117
|
-
```
|
|
118
|
-
````
|
|
119
|
-
|
|
120
|
-
## 禁止占位符
|
|
121
|
-
|
|
122
|
-
每个步骤都必须包含工程师所需的实际内容。以下写法均属于**计划缺陷**——切勿出现:
|
|
123
|
-
- “TBD”、“TODO”、“后续实现”、“细节待补充”
|
|
124
|
-
- “添加适当的错误处理”/“添加校验”/“处理边界情况”
|
|
125
|
-
- “为上述内容编写测试”(未给出实际测试代码)
|
|
126
|
-
- “与任务 N 类似”(应重复贴出代码——工程师可能乱序阅读任务)
|
|
127
|
-
- 只描述要做什么、未说明如何做的步骤(代码类步骤必须包含代码块)
|
|
128
|
-
- 引用未在任何任务中定义的类型、函数或方法
|
|
129
|
-
|
|
130
|
-
## 自检
|
|
131
|
-
|
|
132
|
-
完成计划初稿后,以全新视角重新审视规格,并逐项核对计划。这份清单需由你亲自执行——无需分发给子代理。
|
|
133
|
-
|
|
134
|
-
**1. 规格覆盖度:** 逐节浏览规格中的每项要求,能否为每一项找到对应的实现任务?列出所有遗漏。
|
|
135
|
-
|
|
136
|
-
**2. 占位符扫描:** 在计划中搜索危险信号——即“禁止占位符”一节列出的所有模式,发现即修复。
|
|
137
|
-
|
|
138
|
-
**3. 类型一致性:** 后续任务中使用的类型、方法签名与属性名是否与前置任务中的定义一致?例如任务 3 中叫 `clearLayers()` 的函数,在任务 7 中写成 `clearFullLayers()` 即为缺陷。
|
|
139
|
-
|
|
140
|
-
如发现问题,直接原地修复,无需重新走一轮完整复审。若发现某项规格需求未对应任何任务,则补上该任务。
|
|
141
|
-
|
|
142
|
-
## 执行交接
|
|
143
|
-
|
|
144
|
-
保存计划后,提供执行方式选项:
|
|
145
|
-
|
|
146
|
-
**“计划已完成并保存至 `docs/superpowers/plans/<filename>.md`。两种执行方式:**
|
|
147
|
-
|
|
148
|
-
**1. 子代理驱动(推荐)**——每个任务分发全新子代理,任务间进行评审,迭代更快
|
|
149
|
-
|
|
150
|
-
**2. 内联执行**——在当前会话中使用 executing-plans 批量执行,设置检查点
|
|
151
|
-
|
|
152
|
-
**请选择哪种方式?”**
|
|
153
|
-
|
|
154
|
-
**若选择子代理驱动:**
|
|
155
|
-
- **必需子技能:** 使用 superpower-subagent-driven-development
|
|
156
|
-
- 每个任务一个全新子代理 + 两阶段评审
|
|
157
|
-
|
|
158
|
-
**若选择内联执行:**
|
|
159
|
-
- **必需子技能:** 使用 superpower-executing-plans
|
|
160
|
-
- 批量执行并在检查点进行评审
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
# 计划文档评审提示词模板
|
|
2
|
-
|
|
3
|
-
在派发计划文档评审子代理时使用此模板。
|
|
4
|
-
|
|
5
|
-
**目的:** 校验计划是否完整、是否与规格一致、任务拆解是否合理。
|
|
6
|
-
|
|
7
|
-
**派发时机:** 完整计划编写完成后。
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
Subagent (general-purpose):
|
|
11
|
-
description: "评审计划文档"
|
|
12
|
-
prompt: |
|
|
13
|
-
你是计划文档评审员。校验该计划是否完整且已达到可进入实施的状态。
|
|
14
|
-
|
|
15
|
-
**待评审计划:** [PLAN_FILE_PATH]
|
|
16
|
-
**参考规格:** [SPEC_FILE_PATH]
|
|
17
|
-
|
|
18
|
-
## 检查项
|
|
19
|
-
|
|
20
|
-
| 类别 | 检查点 |
|
|
21
|
-
|----------|------------------|
|
|
22
|
-
| 完整性 | 是否存在 TODO、占位符、未完成的任务、缺失的步骤 |
|
|
23
|
-
| 规格一致性 | 计划是否覆盖规格要求,无明显范围蔓延 |
|
|
24
|
-
| 任务拆解 | 任务边界是否清晰,步骤是否可落地执行 |
|
|
25
|
-
| 可实施性 | 工程师能否按此计划推进而不被卡住 |
|
|
26
|
-
|
|
27
|
-
## 判定标准
|
|
28
|
-
|
|
29
|
-
**仅标记会在实际实施中造成实质问题的缺陷。**
|
|
30
|
-
实现方向错误或导致实施者卡住属于问题。
|
|
31
|
-
措辞细节、风格偏好以及“锦上添花”类建议不算问题。
|
|
32
|
-
|
|
33
|
-
除非存在严重缺口——如规格中的需求缺失、
|
|
34
|
-
步骤相互矛盾、存在占位内容、或任务描述过于模糊无法执行——否则应予通过。
|
|
35
|
-
|
|
36
|
-
## 输出格式
|
|
37
|
-
|
|
38
|
-
## 计划评审
|
|
39
|
-
|
|
40
|
-
**状态:** 已通过 | 发现问题
|
|
41
|
-
|
|
42
|
-
**问题(如有):**
|
|
43
|
-
- [任务 X,步骤 Y]:[具体问题] - [对实施的影响]
|
|
44
|
-
|
|
45
|
-
**建议(仅供参考,不阻塞通过):**
|
|
46
|
-
- [改进建议]
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
**评审返回:** 状态、问题(如有)、建议
|