superpowers-mcp 4.3.2 → 5.1.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 (31) hide show
  1. package/README.md +13 -2
  2. package/README.zh-TW.md +13 -2
  3. package/out/server.js +12 -12
  4. package/package.json +2 -2
  5. package/skills/brainstorming/SKILL.md +79 -11
  6. package/skills/brainstorming/scripts/frame-template.html +1 -1
  7. package/skills/brainstorming/scripts/helper.js +7 -12
  8. package/skills/brainstorming/scripts/server.cjs +1 -1
  9. package/skills/brainstorming/scripts/start-server.sh +1 -1
  10. package/skills/brainstorming/scripts/stop-server.sh +1 -1
  11. package/skills/brainstorming/spec-document-reviewer-prompt.md +1 -1
  12. package/skills/brainstorming/visual-companion.md +1 -1
  13. package/skills/dispatching-parallel-agents/SKILL.md +2 -0
  14. package/skills/executing-plans/SKILL.md +7 -21
  15. package/skills/finishing-a-development-branch/SKILL.md +93 -42
  16. package/skills/requesting-code-review/SKILL.md +8 -10
  17. package/skills/requesting-code-review/code-reviewer.md +107 -85
  18. package/skills/subagent-driven-development/SKILL.md +39 -2
  19. package/skills/subagent-driven-development/code-quality-reviewer-prompt.md +8 -3
  20. package/skills/subagent-driven-development/implementer-prompt.md +36 -1
  21. package/skills/systematic-debugging/CREATION-LOG.md +1 -1
  22. package/skills/systematic-debugging/root-cause-tracing.md +1 -1
  23. package/skills/using-git-worktrees/SKILL.md +95 -98
  24. package/skills/using-superpowers/SKILL.md +22 -0
  25. package/skills/using-superpowers/references/codex-tools.md +59 -0
  26. package/skills/using-superpowers/references/copilot-tools.md +42 -0
  27. package/skills/using-superpowers/references/gemini-tools.md +51 -0
  28. package/skills/writing-plans/SKILL.md +54 -18
  29. package/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
  30. package/skills/writing-skills/SKILL.md +2 -2
  31. package/skills/writing-skills/anthropic-best-practices.md +2 -2
@@ -1,104 +1,117 @@
1
1
  ---
2
2
  name: using-git-worktrees
3
- description: Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
3
+ description: Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback
4
4
  ---
5
5
 
6
6
  # Using Git Worktrees
7
7
 
8
8
  ## Overview
9
9
 
10
- Git worktrees create isolated workspaces sharing the same repository, allowing work on multiple branches simultaneously without switching.
10
+ Ensure work happens in an isolated workspace. Prefer your platform's native worktree tools. Fall back to manual git worktrees only when no native tool is available.
11
11
 
12
- **Core principle:** Systematic directory selection + safety verification = reliable isolation.
12
+ **Core principle:** Detect existing isolation first. Then use native tools. Then fall back to git. Never fight the harness.
13
13
 
14
14
  **Announce at start:** "I'm using the using-git-worktrees skill to set up an isolated workspace."
15
15
 
16
- ## Directory Selection Process
16
+ ## Step 0: Detect Existing Isolation
17
17
 
18
- Follow this priority order:
19
-
20
- ### 1. Check Existing Directories
18
+ **Before creating anything, check if you are already in an isolated workspace.**
21
19
 
22
20
  ```bash
23
- # Check in priority order
24
- ls -d .worktrees 2>/dev/null # Preferred (hidden)
25
- ls -d worktrees 2>/dev/null # Alternative
21
+ GIT_DIR=$(cd "$(git rev-parse --git-dir)" 2>/dev/null && pwd -P)
22
+ GIT_COMMON=$(cd "$(git rev-parse --git-common-dir)" 2>/dev/null && pwd -P)
23
+ BRANCH=$(git branch --show-current)
26
24
  ```
27
25
 
28
- **If found:** Use that directory. If both exist, `.worktrees` wins.
29
-
30
- ### 2. Check CLAUDE.md
26
+ **Submodule guard:** `GIT_DIR != GIT_COMMON` is also true inside git submodules. Before concluding "already in a worktree," verify you are not in a submodule:
31
27
 
32
28
  ```bash
33
- grep -i "worktree.*director" CLAUDE.md 2>/dev/null
29
+ # If this returns a path, you're in a submodule, not a worktree — treat as normal repo
30
+ git rev-parse --show-superproject-working-tree 2>/dev/null
34
31
  ```
35
32
 
36
- **If preference specified:** Use it without asking.
33
+ **If `GIT_DIR != GIT_COMMON` (and not a submodule):** You are already in a linked worktree. Skip to Step 3 (Project Setup). Do NOT create another worktree.
37
34
 
38
- ### 3. Ask User
35
+ Report with branch state:
36
+ - On a branch: "Already in isolated workspace at `<path>` on branch `<name>`."
37
+ - Detached HEAD: "Already in isolated workspace at `<path>` (detached HEAD, externally managed). Branch creation needed at finish time."
39
38
 
40
- If no directory exists and no CLAUDE.md preference:
39
+ **If `GIT_DIR == GIT_COMMON` (or in a submodule):** You are in a normal repo checkout.
41
40
 
42
- ```
43
- No worktree directory found. Where should I create worktrees?
41
+ Has the user already indicated their worktree preference in your instructions? If not, ask for consent before creating a worktree:
44
42
 
45
- 1. .worktrees/ (project-local, hidden)
46
- 2. ~/.config/superpowers/worktrees/<project-name>/ (global location)
43
+ > "Would you like me to set up an isolated worktree? It protects your current branch from changes."
47
44
 
48
- Which would you prefer?
49
- ```
45
+ Honor any existing declared preference without asking. If the user declines consent, work in place and skip to Step 3.
46
+
47
+ ## Step 1: Create Isolated Workspace
48
+
49
+ **You have two mechanisms. Try them in this order.**
50
+
51
+ ### 1a. Native Worktree Tools (preferred)
52
+
53
+ The user has asked for an isolated workspace (Step 0 consent). Do you already have a way to create a worktree? It might be a tool with a name like `EnterWorktree`, `WorktreeCreate`, a `/worktree` command, or a `--worktree` flag. If you do, use it and skip to Step 3.
54
+
55
+ Native tools handle directory placement, branch creation, and cleanup automatically. Using `git worktree add` when you have a native tool creates phantom state your harness can't see or manage.
56
+
57
+ Only proceed to Step 1b if you have no native worktree tool available.
50
58
 
51
- ## Safety Verification
59
+ ### 1b. Git Worktree Fallback
52
60
 
53
- ### For Project-Local Directories (.worktrees or worktrees)
61
+ **Only use this if Step 1a does not apply** — you have no native worktree tool available. Create a worktree manually using git.
62
+
63
+ #### Directory Selection
64
+
65
+ Follow this priority order. Explicit user preference always beats observed filesystem state.
66
+
67
+ 1. **Check your instructions for a declared worktree directory preference.** If the user has already specified one, use it without asking.
68
+
69
+ 2. **Check for an existing project-local worktree directory:**
70
+ ```bash
71
+ ls -d .worktrees 2>/dev/null # Preferred (hidden)
72
+ ls -d worktrees 2>/dev/null # Alternative
73
+ ```
74
+ If found, use it. If both exist, `.worktrees` wins.
75
+
76
+ 3. **Check for an existing global directory:**
77
+ ```bash
78
+ project=$(basename "$(git rev-parse --show-toplevel)")
79
+ ls -d ~/.config/superpowers/worktrees/$project 2>/dev/null
80
+ ```
81
+ If found, use it (backward compatibility with legacy global path).
82
+
83
+ 4. **If there is no other guidance available**, default to `.worktrees/` at the project root.
84
+
85
+ #### Safety Verification (project-local directories only)
54
86
 
55
87
  **MUST verify directory is ignored before creating worktree:**
56
88
 
57
89
  ```bash
58
- # Check if directory is ignored (respects local, global, and system gitignore)
59
90
  git check-ignore -q .worktrees 2>/dev/null || git check-ignore -q worktrees 2>/dev/null
60
91
  ```
61
92
 
62
- **If NOT ignored:**
63
-
64
- Per Jesse's rule "Fix broken things immediately":
65
- 1. Add appropriate line to .gitignore
66
- 2. Commit the change
67
- 3. Proceed with worktree creation
93
+ **If NOT ignored:** Add to .gitignore, commit the change, then proceed.
68
94
 
69
95
  **Why critical:** Prevents accidentally committing worktree contents to repository.
70
96
 
71
- ### For Global Directory (~/.config/superpowers/worktrees)
72
-
73
- No .gitignore verification needed - outside project entirely.
97
+ Global directories (`~/.config/superpowers/worktrees/`) need no verification.
74
98
 
75
- ## Creation Steps
76
-
77
- ### 1. Detect Project Name
99
+ #### Create the Worktree
78
100
 
79
101
  ```bash
80
102
  project=$(basename "$(git rev-parse --show-toplevel)")
81
- ```
82
103
 
83
- ### 2. Create Worktree
104
+ # Determine path based on chosen location
105
+ # For project-local: path="$LOCATION/$BRANCH_NAME"
106
+ # For global: path="~/.config/superpowers/worktrees/$project/$BRANCH_NAME"
84
107
 
85
- ```bash
86
- # Determine full path
87
- case $LOCATION in
88
- .worktrees|worktrees)
89
- path="$LOCATION/$BRANCH_NAME"
90
- ;;
91
- ~/.config/superpowers/worktrees/*)
92
- path="~/.config/superpowers/worktrees/$project/$BRANCH_NAME"
93
- ;;
94
- esac
95
-
96
- # Create worktree with new branch
97
108
  git worktree add "$path" -b "$BRANCH_NAME"
98
109
  cd "$path"
99
110
  ```
100
111
 
101
- ### 3. Run Project Setup
112
+ **Sandbox fallback:** If `git worktree add` fails with a permission error (sandbox denial), tell the user the sandbox blocked worktree creation and you're working in the current directory instead. Then run setup and baseline tests in place.
113
+
114
+ ## Step 3: Project Setup
102
115
 
103
116
  Auto-detect and run appropriate setup:
104
117
 
@@ -117,23 +130,20 @@ if [ -f pyproject.toml ]; then poetry install; fi
117
130
  if [ -f go.mod ]; then go mod download; fi
118
131
  ```
119
132
 
120
- ### 4. Verify Clean Baseline
133
+ ## Step 4: Verify Clean Baseline
121
134
 
122
- Run tests to ensure worktree starts clean:
135
+ Run tests to ensure workspace starts clean:
123
136
 
124
137
  ```bash
125
- # Examples - use project-appropriate command
126
- npm test
127
- cargo test
128
- pytest
129
- go test ./...
138
+ # Use project-appropriate command
139
+ npm test / cargo test / pytest / go test ./...
130
140
  ```
131
141
 
132
142
  **If tests fail:** Report failures, ask whether to proceed or investigate.
133
143
 
134
144
  **If tests pass:** Report ready.
135
145
 
136
- ### 5. Report Location
146
+ ### Report
137
147
 
138
148
  ```
139
149
  Worktree ready at <full-path>
@@ -145,16 +155,32 @@ Ready to implement <feature-name>
145
155
 
146
156
  | Situation | Action |
147
157
  |-----------|--------|
158
+ | Already in linked worktree | Skip creation (Step 0) |
159
+ | In a submodule | Treat as normal repo (Step 0 guard) |
160
+ | Native worktree tool available | Use it (Step 1a) |
161
+ | No native tool | Git worktree fallback (Step 1b) |
148
162
  | `.worktrees/` exists | Use it (verify ignored) |
149
163
  | `worktrees/` exists | Use it (verify ignored) |
150
164
  | Both exist | Use `.worktrees/` |
151
- | Neither exists | Check CLAUDE.md → Ask user |
165
+ | Neither exists | Check instruction file, then default `.worktrees/` |
166
+ | Global path exists | Use it (backward compat) |
152
167
  | Directory not ignored | Add to .gitignore + commit |
168
+ | Permission error on create | Sandbox fallback, work in place |
153
169
  | Tests fail during baseline | Report failures + ask |
154
170
  | No package.json/Cargo.toml | Skip dependency install |
155
171
 
156
172
  ## Common Mistakes
157
173
 
174
+ ### Fighting the harness
175
+
176
+ - **Problem:** Using `git worktree add` when the platform already provides isolation
177
+ - **Fix:** Step 0 detects existing isolation. Step 1a defers to native tools.
178
+
179
+ ### Skipping detection
180
+
181
+ - **Problem:** Creating a nested worktree inside an existing one
182
+ - **Fix:** Always run Step 0 before creating anything
183
+
158
184
  ### Skipping ignore verification
159
185
 
160
186
  - **Problem:** Worktree contents get tracked, pollute git status
@@ -163,56 +189,27 @@ Ready to implement <feature-name>
163
189
  ### Assuming directory location
164
190
 
165
191
  - **Problem:** Creates inconsistency, violates project conventions
166
- - **Fix:** Follow priority: existing > CLAUDE.md > ask
192
+ - **Fix:** Follow priority: existing > global legacy > instruction file > default
167
193
 
168
194
  ### Proceeding with failing tests
169
195
 
170
196
  - **Problem:** Can't distinguish new bugs from pre-existing issues
171
197
  - **Fix:** Report failures, get explicit permission to proceed
172
198
 
173
- ### Hardcoding setup commands
174
-
175
- - **Problem:** Breaks on projects using different tools
176
- - **Fix:** Auto-detect from project files (package.json, etc.)
177
-
178
- ## Example Workflow
179
-
180
- ```
181
- You: I'm using the using-git-worktrees skill to set up an isolated workspace.
182
-
183
- [Check .worktrees/ - exists]
184
- [Verify ignored - git check-ignore confirms .worktrees/ is ignored]
185
- [Create worktree: git worktree add .worktrees/auth -b feature/auth]
186
- [Run npm install]
187
- [Run npm test - 47 passing]
188
-
189
- Worktree ready at /Users/jesse/myproject/.worktrees/auth
190
- Tests passing (47 tests, 0 failures)
191
- Ready to implement auth feature
192
- ```
193
-
194
199
  ## Red Flags
195
200
 
196
201
  **Never:**
202
+ - Create a worktree when Step 0 detects existing isolation
203
+ - Use `git worktree add` when you have a native worktree tool (e.g., `EnterWorktree`). This is the #1 mistake — if you have it, use it.
204
+ - Skip Step 1a by jumping straight to Step 1b's git commands
197
205
  - Create worktree without verifying it's ignored (project-local)
198
206
  - Skip baseline test verification
199
207
  - Proceed with failing tests without asking
200
- - Assume directory location when ambiguous
201
- - Skip CLAUDE.md check
202
208
 
203
209
  **Always:**
204
- - Follow directory priority: existing > CLAUDE.md > ask
210
+ - Run Step 0 detection first
211
+ - Prefer native tools over git fallback
212
+ - Follow directory priority: existing > global legacy > instruction file > default
205
213
  - Verify directory is ignored for project-local
206
214
  - Auto-detect and run project setup
207
215
  - Verify clean test baseline
208
-
209
- ## Integration
210
-
211
- **Called by:**
212
- - **brainstorming** (Phase 4) - REQUIRED when design is approved and implementation follows
213
- - **subagent-driven-development** - REQUIRED before executing any tasks
214
- - **executing-plans** - REQUIRED before executing any tasks
215
- - Any skill needing isolated workspace
216
-
217
- **Pairs with:**
218
- - **finishing-a-development-branch** - REQUIRED for cleanup after work complete
@@ -3,6 +3,10 @@ name: using-superpowers
3
3
  description: Use when starting any conversation - establishes how to find and use skills, requiring Skill tool invocation before ANY response including clarifying questions
4
4
  ---
5
5
 
6
+ <SUBAGENT-STOP>
7
+ If you were dispatched as a subagent to execute a specific task, skip this skill.
8
+ </SUBAGENT-STOP>
9
+
6
10
  <EXTREMELY-IMPORTANT>
7
11
  If you think there is even a 1% chance a skill might apply to what you are doing, you ABSOLUTELY MUST invoke the skill.
8
12
 
@@ -11,12 +15,30 @@ IF A SKILL APPLIES TO YOUR TASK, YOU DO NOT HAVE A CHOICE. YOU MUST USE IT.
11
15
  This is not negotiable. This is not optional. You cannot rationalize your way out of this.
12
16
  </EXTREMELY-IMPORTANT>
13
17
 
18
+ ## Instruction Priority
19
+
20
+ Superpowers skills override default system prompt behavior, but **user instructions always take precedence**:
21
+
22
+ 1. **User's explicit instructions** (CLAUDE.md, GEMINI.md, AGENTS.md, direct requests) — highest priority
23
+ 2. **Superpowers skills** — override default system behavior where they conflict
24
+ 3. **Default system prompt** — lowest priority
25
+
26
+ If CLAUDE.md, GEMINI.md, or AGENTS.md says "don't use TDD" and a skill says "always use TDD," follow the user's instructions. The user is in control.
27
+
14
28
  ## How to Access Skills
15
29
 
16
30
  **In Claude Code:** Use the `Skill` tool. When you invoke a skill, its content is loaded and presented to you—follow it directly. Never use the Read tool on skill files.
17
31
 
32
+ **In Copilot CLI:** Use the `skill` tool. Skills are auto-discovered from installed plugins. The `skill` tool works the same as Claude Code's `Skill` tool.
33
+
34
+ **In Gemini CLI:** Skills activate via the `activate_skill` tool. Gemini loads skill metadata at session start and activates the full content on demand.
35
+
18
36
  **In other environments:** Check your platform's documentation for how skills are loaded.
19
37
 
38
+ ## Platform Adaptation
39
+
40
+ Skills use Claude Code tool names. Non-CC platforms: see `references/copilot-tools.md` (Copilot CLI), `references/codex-tools.md` (Codex) for tool equivalents. Gemini CLI users get the tool mapping loaded automatically via GEMINI.md.
41
+
20
42
  # Using Skills
21
43
 
22
44
  ## The Rule
@@ -0,0 +1,59 @@
1
+ # Codex Tool Mapping
2
+
3
+ Skills use Claude Code tool names. When you encounter these in a skill, use your platform equivalent:
4
+
5
+ | Skill references | Codex equivalent |
6
+ |-----------------|------------------|
7
+ | `Task` tool (dispatch subagent) | `spawn_agent` (see [Subagent dispatch requires multi-agent support](#subagent-dispatch-requires-multi-agent-support)) |
8
+ | Multiple `Task` calls (parallel) | Multiple `spawn_agent` calls |
9
+ | Task returns result | `wait_agent` |
10
+ | Task completes automatically | `close_agent` to free slot |
11
+ | `TodoWrite` (task tracking) | `update_plan` |
12
+ | `Skill` tool (invoke a skill) | Skills load natively — just follow the instructions |
13
+ | `Read`, `Write`, `Edit` (files) | Use your native file tools |
14
+ | `Bash` (run commands) | Use your native shell tools |
15
+
16
+ ## Subagent dispatch requires multi-agent support
17
+
18
+ Add to your Codex config (`~/.codex/config.toml`):
19
+
20
+ ```toml
21
+ [features]
22
+ multi_agent = true
23
+ ```
24
+
25
+ This enables `spawn_agent`, `wait_agent`, and `close_agent` for skills like `dispatching-parallel-agents` and `subagent-driven-development`.
26
+
27
+ Legacy note: Codex builds before `rust-v0.115.0` exposed spawned-agent
28
+ waiting as `wait`. Current Codex uses `wait_agent` for spawned agents. The
29
+ `wait` name now belongs to code-mode `exec/wait`, which resumes a yielded exec
30
+ cell by `cell_id`; it is not the spawned-agent result tool.
31
+
32
+ ## Environment Detection
33
+
34
+ Skills that create worktrees or finish branches should detect their
35
+ environment with read-only git commands before proceeding:
36
+
37
+ ```bash
38
+ GIT_DIR=$(cd "$(git rev-parse --git-dir)" 2>/dev/null && pwd -P)
39
+ GIT_COMMON=$(cd "$(git rev-parse --git-common-dir)" 2>/dev/null && pwd -P)
40
+ BRANCH=$(git branch --show-current)
41
+ ```
42
+
43
+ - `GIT_DIR != GIT_COMMON` → already in a linked worktree (skip creation)
44
+ - `BRANCH` empty → detached HEAD (cannot branch/push/PR from sandbox)
45
+
46
+ See `using-git-worktrees` Step 0 and `finishing-a-development-branch`
47
+ Step 1 for how each skill uses these signals.
48
+
49
+ ## Codex App Finishing
50
+
51
+ When the sandbox blocks branch/push operations (detached HEAD in an
52
+ externally managed worktree), the agent commits all work and informs
53
+ the user to use the App's native controls:
54
+
55
+ - **"Create branch"** — names the branch, then commit/push/PR via App UI
56
+ - **"Hand off to local"** — transfers work to the user's local checkout
57
+
58
+ The agent can still run tests, stage files, and output suggested branch
59
+ names, commit messages, and PR descriptions for the user to copy.
@@ -0,0 +1,42 @@
1
+ # Copilot CLI Tool Mapping
2
+
3
+ Skills use Claude Code tool names. When you encounter these in a skill, use your platform equivalent:
4
+
5
+ | Skill references | Copilot CLI equivalent |
6
+ |-----------------|----------------------|
7
+ | `Read` (file reading) | `view` |
8
+ | `Write` (file creation) | `create` |
9
+ | `Edit` (file editing) | `edit` |
10
+ | `Bash` (run commands) | `bash` |
11
+ | `Grep` (search file content) | `grep` |
12
+ | `Glob` (search files by name) | `glob` |
13
+ | `Skill` tool (invoke a skill) | `skill` |
14
+ | `WebFetch` | `web_fetch` |
15
+ | `Task` tool (dispatch subagent) | `task` with `agent_type: "general-purpose"` or `"explore"` |
16
+ | Multiple `Task` calls (parallel) | Multiple `task` calls |
17
+ | Task status/output | `read_agent`, `list_agents` |
18
+ | `TodoWrite` (task tracking) | `sql` with built-in `todos` table |
19
+ | `WebSearch` | No equivalent — use `web_fetch` with a search engine URL |
20
+ | `EnterPlanMode` / `ExitPlanMode` | No equivalent — stay in the main session |
21
+
22
+ ## Async shell sessions
23
+
24
+ Copilot CLI supports persistent async shell sessions, which have no direct Claude Code equivalent:
25
+
26
+ | Tool | Purpose |
27
+ |------|---------|
28
+ | `bash` with `async: true` | Start a long-running command in the background |
29
+ | `write_bash` | Send input to a running async session |
30
+ | `read_bash` | Read output from an async session |
31
+ | `stop_bash` | Terminate an async session |
32
+ | `list_bash` | List all active shell sessions |
33
+
34
+ ## Additional Copilot CLI tools
35
+
36
+ | Tool | Purpose |
37
+ |------|---------|
38
+ | `store_memory` | Persist facts about the codebase for future sessions |
39
+ | `report_intent` | Update the UI status line with current intent |
40
+ | `sql` | Query the session's SQLite database (todos, metadata) |
41
+ | `fetch_copilot_cli_documentation` | Look up Copilot CLI documentation |
42
+ | GitHub MCP tools (`github-mcp-server-*`) | Native GitHub API access (issues, PRs, code search) |
@@ -0,0 +1,51 @@
1
+ # Gemini CLI Tool Mapping
2
+
3
+ Skills use Claude Code tool names. When you encounter these in a skill, use your platform equivalent:
4
+
5
+ | Skill references | Gemini CLI equivalent |
6
+ |-----------------|----------------------|
7
+ | `Read` (file reading) | `read_file` |
8
+ | `Write` (file creation) | `write_file` |
9
+ | `Edit` (file editing) | `replace` |
10
+ | `Bash` (run commands) | `run_shell_command` |
11
+ | `Grep` (search file content) | `grep_search` |
12
+ | `Glob` (search files by name) | `glob` |
13
+ | `TodoWrite` (task tracking) | `write_todos` |
14
+ | `Skill` tool (invoke a skill) | `activate_skill` |
15
+ | `WebSearch` | `google_web_search` |
16
+ | `WebFetch` | `web_fetch` |
17
+ | `Task` tool (dispatch subagent) | `@agent-name` (see [Subagent support](#subagent-support)) |
18
+
19
+ ## Subagent support
20
+
21
+ Gemini CLI supports subagents natively via the `@` syntax. Use the built-in `@generalist` agent to dispatch any task — it has access to all tools and follows the prompt you provide.
22
+
23
+ When a skill says to dispatch a named agent type, use `@generalist` with the full prompt from the skill's prompt template:
24
+
25
+ | Skill instruction | Gemini CLI equivalent |
26
+ |-------------------|----------------------|
27
+ | `Task tool (superpowers:implementer)` | `@generalist` with the filled `implementer-prompt.md` template |
28
+ | `Task tool (superpowers:spec-reviewer)` | `@generalist` with the filled `spec-reviewer-prompt.md` template |
29
+ | `Task tool (superpowers:code-reviewer)` | `@code-reviewer` (bundled agent) or `@generalist` with the filled review prompt |
30
+ | `Task tool (superpowers:code-quality-reviewer)` | `@generalist` with the filled `code-quality-reviewer-prompt.md` template |
31
+ | `Task tool (general-purpose)` with inline prompt | `@generalist` with your inline prompt |
32
+
33
+ ### Prompt filling
34
+
35
+ Skills provide prompt templates with placeholders like `{WHAT_WAS_IMPLEMENTED}` or `[FULL TEXT of task]`. Fill all placeholders and pass the complete prompt as the message to `@generalist`. The prompt template itself contains the agent's role, review criteria, and expected output format — `@generalist` will follow it.
36
+
37
+ ### Parallel dispatch
38
+
39
+ Gemini CLI supports parallel subagent dispatch. When a skill asks you to dispatch multiple independent subagent tasks in parallel, request all of those `@generalist` or named subagent tasks together in the same prompt. Keep dependent tasks sequential, but do not serialize independent subagent tasks just to preserve a simpler history.
40
+
41
+ ## Additional Gemini CLI tools
42
+
43
+ These tools are available in Gemini CLI but have no Claude Code equivalent:
44
+
45
+ | Tool | Purpose |
46
+ |------|---------|
47
+ | `list_directory` | List files and subdirectories |
48
+ | `save_memory` | Persist facts to GEMINI.md across sessions |
49
+ | `ask_user` | Request structured input from the user |
50
+ | `tracker_create_task` | Rich task management (create, update, list, visualize) |
51
+ | `enter_plan_mode` / `exit_plan_mode` | Switch to read-only research mode before making changes |
@@ -13,9 +13,25 @@ Assume they are a skilled developer, but know almost nothing about our toolset o
13
13
 
14
14
  **Announce at start:** "I'm using the writing-plans skill to create the implementation plan."
15
15
 
16
- **Context:** This should be run in a dedicated worktree (created by brainstorming skill).
16
+ **Context:** If working in an isolated worktree, it should have been created via the `superpowers:using-git-worktrees` skill at execution time.
17
17
 
18
- **Save plans to:** `docs/plans/YYYY-MM-DD-<feature-name>.md`
18
+ **Save plans to:** `docs/superpowers/plans/YYYY-MM-DD-<feature-name>.md`
19
+ - (User preferences for plan location override this default)
20
+
21
+ ## Scope Check
22
+
23
+ If the spec covers multiple independent subsystems, it should have been broken into sub-project specs during brainstorming. If it wasn't, suggest breaking this into separate plans — one per subsystem. Each plan should produce working, testable software on its own.
24
+
25
+ ## File Structure
26
+
27
+ Before defining tasks, map out which files will be created or modified and what each one is responsible for. This is where decomposition decisions get locked in.
28
+
29
+ - Design units with clear boundaries and well-defined interfaces. Each file should have one clear responsibility.
30
+ - You reason best about code you can hold in context at once, and your edits are more reliable when files are focused. Prefer smaller, focused files over large ones that do too much.
31
+ - Files that change together should live together. Split by responsibility, not by technical layer.
32
+ - In existing codebases, follow established patterns. If the codebase uses large files, don't unilaterally restructure - but if a file you're modifying has grown unwieldy, including a split in the plan is reasonable.
33
+
34
+ This structure informs the task decomposition. Each task should produce self-contained changes that make sense independently.
19
35
 
20
36
  ## Bite-Sized Task Granularity
21
37
 
@@ -33,7 +49,7 @@ Assume they are a skilled developer, but know almost nothing about our toolset o
33
49
  ```markdown
34
50
  # [Feature Name] Implementation Plan
35
51
 
36
- > **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task.
52
+ > **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
37
53
 
38
54
  **Goal:** [One sentence describing what this builds]
39
55
 
@@ -54,7 +70,7 @@ Assume they are a skilled developer, but know almost nothing about our toolset o
54
70
  - Modify: `exact/path/to/existing.py:123-145`
55
71
  - Test: `tests/exact/path/to/test.py`
56
72
 
57
- **Step 1: Write the failing test**
73
+ - [ ] **Step 1: Write the failing test**
58
74
 
59
75
  ```python
60
76
  def test_specific_behavior():
@@ -62,24 +78,24 @@ def test_specific_behavior():
62
78
  assert result == expected
63
79
  ```
64
80
 
65
- **Step 2: Run test to verify it fails**
81
+ - [ ] **Step 2: Run test to verify it fails**
66
82
 
67
83
  Run: `pytest tests/path/test.py::test_name -v`
68
84
  Expected: FAIL with "function not defined"
69
85
 
70
- **Step 3: Write minimal implementation**
86
+ - [ ] **Step 3: Write minimal implementation**
71
87
 
72
88
  ```python
73
89
  def function(input):
74
90
  return expected
75
91
  ```
76
92
 
77
- **Step 4: Run test to verify it passes**
93
+ - [ ] **Step 4: Run test to verify it passes**
78
94
 
79
95
  Run: `pytest tests/path/test.py::test_name -v`
80
96
  Expected: PASS
81
97
 
82
- **Step 5: Commit**
98
+ - [ ] **Step 5: Commit**
83
99
 
84
100
  ```bash
85
101
  git add tests/path/test.py src/path/file.py
@@ -87,30 +103,50 @@ git commit -m "feat: add specific feature"
87
103
  ```
88
104
  ````
89
105
 
106
+ ## No Placeholders
107
+
108
+ Every step must contain the actual content an engineer needs. These are **plan failures** — never write them:
109
+ - "TBD", "TODO", "implement later", "fill in details"
110
+ - "Add appropriate error handling" / "add validation" / "handle edge cases"
111
+ - "Write tests for the above" (without actual test code)
112
+ - "Similar to Task N" (repeat the code — the engineer may be reading tasks out of order)
113
+ - Steps that describe what to do without showing how (code blocks required for code steps)
114
+ - References to types, functions, or methods not defined in any task
115
+
90
116
  ## Remember
91
117
  - Exact file paths always
92
- - Complete code in plan (not "add validation")
118
+ - Complete code in every step — if a step changes code, show the code
93
119
  - Exact commands with expected output
94
- - Reference relevant skills with @ syntax
95
120
  - DRY, YAGNI, TDD, frequent commits
96
121
 
122
+ ## Self-Review
123
+
124
+ After writing the complete plan, look at the spec with fresh eyes and check the plan against it. This is a checklist you run yourself — not a subagent dispatch.
125
+
126
+ **1. Spec coverage:** Skim each section/requirement in the spec. Can you point to a task that implements it? List any gaps.
127
+
128
+ **2. Placeholder scan:** Search your plan for red flags — any of the patterns from the "No Placeholders" section above. Fix them.
129
+
130
+ **3. Type consistency:** Do the types, method signatures, and property names you used in later tasks match what you defined in earlier tasks? A function called `clearLayers()` in Task 3 but `clearFullLayers()` in Task 7 is a bug.
131
+
132
+ If you find issues, fix them inline. No need to re-review — just fix and move on. If you find a spec requirement with no task, add the task.
133
+
97
134
  ## Execution Handoff
98
135
 
99
136
  After saving the plan, offer execution choice:
100
137
 
101
- **"Plan complete and saved to `docs/plans/<filename>.md`. Two execution options:**
138
+ **"Plan complete and saved to `docs/superpowers/plans/<filename>.md`. Two execution options:**
102
139
 
103
- **1. Subagent-Driven (this session)** - I dispatch fresh subagent per task, review between tasks, fast iteration
140
+ **1. Subagent-Driven (recommended)** - I dispatch a fresh subagent per task, review between tasks, fast iteration
104
141
 
105
- **2. Parallel Session (separate)** - Open new session with executing-plans, batch execution with checkpoints
142
+ **2. Inline Execution** - Execute tasks in this session using executing-plans, batch execution with checkpoints
106
143
 
107
144
  **Which approach?"**
108
145
 
109
146
  **If Subagent-Driven chosen:**
110
147
  - **REQUIRED SUB-SKILL:** Use superpowers:subagent-driven-development
111
- - Stay in this session
112
- - Fresh subagent per task + code review
148
+ - Fresh subagent per task + two-stage review
113
149
 
114
- **If Parallel Session chosen:**
115
- - Guide them to open new session in worktree
116
- - **REQUIRED SUB-SKILL:** New session uses superpowers:executing-plans
150
+ **If Inline Execution chosen:**
151
+ - **REQUIRED SUB-SKILL:** Use superpowers:executing-plans
152
+ - Batch execution with checkpoints for review