hero-mmt-kit 1.0.0

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 (79) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/LICENSE +21 -0
  3. package/README.md +158 -0
  4. package/bin/hero-mmt-kit.js +70 -0
  5. package/package.json +35 -0
  6. package/presets/enterprise.json +3 -0
  7. package/presets/small-team.json +3 -0
  8. package/presets/solo.json +3 -0
  9. package/skills.manifest.json +72 -0
  10. package/src/detect.cjs +43 -0
  11. package/src/discover.cjs +159 -0
  12. package/src/doctor.cjs +130 -0
  13. package/src/init.cjs +114 -0
  14. package/src/integrations.cjs +93 -0
  15. package/src/links.cjs +37 -0
  16. package/src/merge.cjs +61 -0
  17. package/src/profile-config.cjs +28 -0
  18. package/src/render.cjs +27 -0
  19. package/src/skills.cjs +107 -0
  20. package/src/update.cjs +75 -0
  21. package/src/util.cjs +56 -0
  22. package/src/workflow-state.cjs +65 -0
  23. package/templates/.hero-mmt-kit/session.schema.json +15 -0
  24. package/templates/AGENTS.md.tmpl +16 -0
  25. package/templates/CLAUDE.md.tmpl +23 -0
  26. package/templates/common/.claude/hooks/git-guard.cjs +57 -0
  27. package/templates/common/.claude/hooks/session-bridge.cjs +43 -0
  28. package/templates/common/.claude/hooks/stop-reminder.cjs +43 -0
  29. package/templates/common/.claude/settings.json +27 -0
  30. package/templates/docs/ACTIVE_STATE.md +41 -0
  31. package/templates/docs/BROWNFIELD_DISCOVERY.md +45 -0
  32. package/templates/docs/DESIGN_STANDARDS.md +86 -0
  33. package/templates/docs/INTERACTION_PATTERNS.md +58 -0
  34. package/templates/docs/PERFORMANCE_STANDARDS.md +31 -0
  35. package/templates/docs/SECURITY_STANDARDS.md +38 -0
  36. package/templates/docs/templates/DESIGN_BRIEF.md +44 -0
  37. package/templates/docs/templates/PRD_AI_FEATURE.md +87 -0
  38. package/templates/skills/NOTICE +69 -0
  39. package/templates/skills/brainstorming/SKILL.md +161 -0
  40. package/templates/skills/brainstorming/scripts/frame-template.html +214 -0
  41. package/templates/skills/brainstorming/scripts/helper.js +88 -0
  42. package/templates/skills/brainstorming/scripts/server.cjs +354 -0
  43. package/templates/skills/brainstorming/scripts/start-server.sh +148 -0
  44. package/templates/skills/brainstorming/scripts/stop-server.sh +56 -0
  45. package/templates/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
  46. package/templates/skills/brainstorming/visual-companion.md +287 -0
  47. package/templates/skills/dispatching-parallel-agents/SKILL.md +186 -0
  48. package/templates/skills/executing-plans/SKILL.md +72 -0
  49. package/templates/skills/finishing-a-development-branch/SKILL.md +253 -0
  50. package/templates/skills/hero-coding/SKILL.md +69 -0
  51. package/templates/skills/hero-planning/SKILL.md +64 -0
  52. package/templates/skills/hero-reviewing/SKILL.md +66 -0
  53. package/templates/skills/hero-security/SKILL.md +425 -0
  54. package/templates/skills/hero-strict/SKILL.md +77 -0
  55. package/templates/skills/hero-unit-test/SKILL.md +79 -0
  56. package/templates/skills/receiving-code-review/SKILL.md +213 -0
  57. package/templates/skills/requesting-code-review/SKILL.md +108 -0
  58. package/templates/skills/requesting-code-review/code-reviewer.md +168 -0
  59. package/templates/skills/subagent-driven-development/SKILL.md +269 -0
  60. package/templates/skills/subagent-driven-development/code-quality-reviewer-prompt.md +34 -0
  61. package/templates/skills/subagent-driven-development/implementer-prompt.md +121 -0
  62. package/templates/skills/subagent-driven-development/scripts/review-package.sh +38 -0
  63. package/templates/skills/subagent-driven-development/scripts/sdd-workspace.sh +25 -0
  64. package/templates/skills/subagent-driven-development/scripts/task-brief.sh +58 -0
  65. package/templates/skills/subagent-driven-development/spec-reviewer-prompt.md +76 -0
  66. package/templates/skills/systematic-debugging/SKILL.md +296 -0
  67. package/templates/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  68. package/templates/skills/systematic-debugging/condition-based-waiting.md +115 -0
  69. package/templates/skills/systematic-debugging/defense-in-depth.md +122 -0
  70. package/templates/skills/systematic-debugging/find-polluter.sh +63 -0
  71. package/templates/skills/systematic-debugging/root-cause-tracing.md +169 -0
  72. package/templates/skills/test-driven-development/SKILL.md +371 -0
  73. package/templates/skills/test-driven-development/testing-anti-patterns.md +299 -0
  74. package/templates/skills/using-git-worktrees/SKILL.md +206 -0
  75. package/templates/skills/using-hero/SKILL.md +54 -0
  76. package/templates/skills/using-superpowers/SKILL.md +119 -0
  77. package/templates/skills/verification-before-completion/SKILL.md +139 -0
  78. package/templates/skills/writing-plans/SKILL.md +173 -0
  79. package/templates/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
@@ -0,0 +1,287 @@
1
+ # Visual Companion Guide
2
+
3
+ Browser-based visual brainstorming companion for showing mockups, diagrams, and options.
4
+
5
+ ## When to Use
6
+
7
+ Decide per-question, not per-session. The test: **would the user understand this better by seeing it than reading it?**
8
+
9
+ **Use the browser** when the content itself is visual:
10
+
11
+ - **UI mockups** — wireframes, layouts, navigation structures, component designs
12
+ - **Architecture diagrams** — system components, data flow, relationship maps
13
+ - **Side-by-side visual comparisons** — comparing two layouts, two color schemes, two design directions
14
+ - **Design polish** — when the question is about look and feel, spacing, visual hierarchy
15
+ - **Spatial relationships** — state machines, flowcharts, entity relationships rendered as diagrams
16
+
17
+ **Use the terminal** when the content is text or tabular:
18
+
19
+ - **Requirements and scope questions** — "what does X mean?", "which features are in scope?"
20
+ - **Conceptual A/B/C choices** — picking between approaches described in words
21
+ - **Tradeoff lists** — pros/cons, comparison tables
22
+ - **Technical decisions** — API design, data modeling, architectural approach selection
23
+ - **Clarifying questions** — anything where the answer is words, not a visual preference
24
+
25
+ A question *about* a UI topic is not automatically a visual question. "What kind of wizard do you want?" is conceptual — use the terminal. "Which of these wizard layouts feels right?" is visual — use the browser.
26
+
27
+ ## How It Works
28
+
29
+ The server watches a directory for HTML files and serves the newest one to the browser. You write HTML content to `screen_dir`, the user sees it in their browser and can click to select options. Selections are recorded to `state_dir/events` that you read on your next turn.
30
+
31
+ **Content fragments vs full documents:** If your HTML file starts with `<!DOCTYPE` or `<html`, the server serves it as-is (just injects the helper script). Otherwise, the server automatically wraps your content in the frame template — adding the header, CSS theme, selection indicator, and all interactive infrastructure. **Write content fragments by default.** Only write full documents when you need complete control over the page.
32
+
33
+ ## Starting a Session
34
+
35
+ ```bash
36
+ # Start server with persistence (mockups saved to project)
37
+ scripts/start-server.sh --project-dir /path/to/project
38
+
39
+ # Returns: {"type":"server-started","port":52341,"url":"http://localhost:52341",
40
+ # "screen_dir":"/path/to/project/.superpowers/brainstorm/12345-1706000000/content",
41
+ # "state_dir":"/path/to/project/.superpowers/brainstorm/12345-1706000000/state"}
42
+ ```
43
+
44
+ Save `screen_dir` and `state_dir` from the response. Tell user to open the URL.
45
+
46
+ **Finding connection info:** The server writes its startup JSON to `$STATE_DIR/server-info`. If you launched the server in the background and didn't capture stdout, read that file to get the URL and port. When using `--project-dir`, check `<project>/.superpowers/brainstorm/` for the session directory.
47
+
48
+ **Note:** Pass the project root as `--project-dir` so mockups persist in `.superpowers/brainstorm/` and survive server restarts. Without it, files go to `/tmp` and get cleaned up. Remind the user to add `.superpowers/` to `.gitignore` if it's not already there.
49
+
50
+ **Launching the server by platform:**
51
+
52
+ **Claude Code (macOS / Linux):**
53
+ ```bash
54
+ # Default mode works — the script backgrounds the server itself
55
+ scripts/start-server.sh --project-dir /path/to/project
56
+ ```
57
+
58
+ **Claude Code (Windows):**
59
+ ```bash
60
+ # Windows auto-detects and uses foreground mode, which blocks the tool call.
61
+ # Use run_in_background: true on the Bash tool call so the server survives
62
+ # across conversation turns.
63
+ scripts/start-server.sh --project-dir /path/to/project
64
+ ```
65
+ When calling this via the Bash tool, set `run_in_background: true`. Then read `$STATE_DIR/server-info` on the next turn to get the URL and port.
66
+
67
+ **Codex:**
68
+ ```bash
69
+ # Codex reaps background processes. The script auto-detects CODEX_CI and
70
+ # switches to foreground mode. Run it normally — no extra flags needed.
71
+ scripts/start-server.sh --project-dir /path/to/project
72
+ ```
73
+
74
+ **Gemini CLI:**
75
+ ```bash
76
+ # Use --foreground and set is_background: true on your shell tool call
77
+ # so the process survives across turns
78
+ scripts/start-server.sh --project-dir /path/to/project --foreground
79
+ ```
80
+
81
+ **Other environments:** The server must keep running in the background across conversation turns. If your environment reaps detached processes, use `--foreground` and launch the command with your platform's background execution mechanism.
82
+
83
+ If the URL is unreachable from your browser (common in remote/containerized setups), bind a non-loopback host:
84
+
85
+ ```bash
86
+ scripts/start-server.sh \
87
+ --project-dir /path/to/project \
88
+ --host 0.0.0.0 \
89
+ --url-host localhost
90
+ ```
91
+
92
+ Use `--url-host` to control what hostname is printed in the returned URL JSON.
93
+
94
+ ## The Loop
95
+
96
+ 1. **Check server is alive**, then **write HTML** to a new file in `screen_dir`:
97
+ - Before each write, check that `$STATE_DIR/server-info` exists. If it doesn't (or `$STATE_DIR/server-stopped` exists), the server has shut down — restart it with `start-server.sh` before continuing. The server auto-exits after 30 minutes of inactivity.
98
+ - Use semantic filenames: `platform.html`, `visual-style.html`, `layout.html`
99
+ - **Never reuse filenames** — each screen gets a fresh file
100
+ - Use Write tool — **never use cat/heredoc** (dumps noise into terminal)
101
+ - Server automatically serves the newest file
102
+
103
+ 2. **Tell user what to expect and end your turn:**
104
+ - Remind them of the URL (every step, not just first)
105
+ - Give a brief text summary of what's on screen (e.g., "Showing 3 layout options for the homepage")
106
+ - Ask them to respond in the terminal: "Take a look and let me know what you think. Click to select an option if you'd like."
107
+
108
+ 3. **On your next turn** — after the user responds in the terminal:
109
+ - Read `$STATE_DIR/events` if it exists — this contains the user's browser interactions (clicks, selections) as JSON lines
110
+ - Merge with the user's terminal text to get the full picture
111
+ - The terminal message is the primary feedback; `state_dir/events` provides structured interaction data
112
+
113
+ 4. **Iterate or advance** — if feedback changes current screen, write a new file (e.g., `layout-v2.html`). Only move to the next question when the current step is validated.
114
+
115
+ 5. **Unload when returning to terminal** — when the next step doesn't need the browser (e.g., a clarifying question, a tradeoff discussion), push a waiting screen to clear the stale content:
116
+
117
+ ```html
118
+ <!-- filename: waiting.html (or waiting-2.html, etc.) -->
119
+ <div style="display:flex;align-items:center;justify-content:center;min-height:60vh">
120
+ <p class="subtitle">Continuing in terminal...</p>
121
+ </div>
122
+ ```
123
+
124
+ This prevents the user from staring at a resolved choice while the conversation has moved on. When the next visual question comes up, push a new content file as usual.
125
+
126
+ 6. Repeat until done.
127
+
128
+ ## Writing Content Fragments
129
+
130
+ Write just the content that goes inside the page. The server wraps it in the frame template automatically (header, theme CSS, selection indicator, and all interactive infrastructure).
131
+
132
+ **Minimal example:**
133
+
134
+ ```html
135
+ <h2>Which layout works better?</h2>
136
+ <p class="subtitle">Consider readability and visual hierarchy</p>
137
+
138
+ <div class="options">
139
+ <div class="option" data-choice="a" onclick="toggleSelect(this)">
140
+ <div class="letter">A</div>
141
+ <div class="content">
142
+ <h3>Single Column</h3>
143
+ <p>Clean, focused reading experience</p>
144
+ </div>
145
+ </div>
146
+ <div class="option" data-choice="b" onclick="toggleSelect(this)">
147
+ <div class="letter">B</div>
148
+ <div class="content">
149
+ <h3>Two Column</h3>
150
+ <p>Sidebar navigation with main content</p>
151
+ </div>
152
+ </div>
153
+ </div>
154
+ ```
155
+
156
+ That's it. No `<html>`, no CSS, no `<script>` tags needed. The server provides all of that.
157
+
158
+ ## CSS Classes Available
159
+
160
+ The frame template provides these CSS classes for your content:
161
+
162
+ ### Options (A/B/C choices)
163
+
164
+ ```html
165
+ <div class="options">
166
+ <div class="option" data-choice="a" onclick="toggleSelect(this)">
167
+ <div class="letter">A</div>
168
+ <div class="content">
169
+ <h3>Title</h3>
170
+ <p>Description</p>
171
+ </div>
172
+ </div>
173
+ </div>
174
+ ```
175
+
176
+ **Multi-select:** Add `data-multiselect` to the container to let users select multiple options. Each click toggles the item. The indicator bar shows the count.
177
+
178
+ ```html
179
+ <div class="options" data-multiselect>
180
+ <!-- same option markup — users can select/deselect multiple -->
181
+ </div>
182
+ ```
183
+
184
+ ### Cards (visual designs)
185
+
186
+ ```html
187
+ <div class="cards">
188
+ <div class="card" data-choice="design1" onclick="toggleSelect(this)">
189
+ <div class="card-image"><!-- mockup content --></div>
190
+ <div class="card-body">
191
+ <h3>Name</h3>
192
+ <p>Description</p>
193
+ </div>
194
+ </div>
195
+ </div>
196
+ ```
197
+
198
+ ### Mockup container
199
+
200
+ ```html
201
+ <div class="mockup">
202
+ <div class="mockup-header">Preview: Dashboard Layout</div>
203
+ <div class="mockup-body"><!-- your mockup HTML --></div>
204
+ </div>
205
+ ```
206
+
207
+ ### Split view (side-by-side)
208
+
209
+ ```html
210
+ <div class="split">
211
+ <div class="mockup"><!-- left --></div>
212
+ <div class="mockup"><!-- right --></div>
213
+ </div>
214
+ ```
215
+
216
+ ### Pros/Cons
217
+
218
+ ```html
219
+ <div class="pros-cons">
220
+ <div class="pros"><h4>Pros</h4><ul><li>Benefit</li></ul></div>
221
+ <div class="cons"><h4>Cons</h4><ul><li>Drawback</li></ul></div>
222
+ </div>
223
+ ```
224
+
225
+ ### Mock elements (wireframe building blocks)
226
+
227
+ ```html
228
+ <div class="mock-nav">Logo | Home | About | Contact</div>
229
+ <div style="display: flex;">
230
+ <div class="mock-sidebar">Navigation</div>
231
+ <div class="mock-content">Main content area</div>
232
+ </div>
233
+ <button class="mock-button">Action Button</button>
234
+ <input class="mock-input" placeholder="Input field">
235
+ <div class="placeholder">Placeholder area</div>
236
+ ```
237
+
238
+ ### Typography and sections
239
+
240
+ - `h2` — page title
241
+ - `h3` — section heading
242
+ - `.subtitle` — secondary text below title
243
+ - `.section` — content block with bottom margin
244
+ - `.label` — small uppercase label text
245
+
246
+ ## Browser Events Format
247
+
248
+ When the user clicks options in the browser, their interactions are recorded to `$STATE_DIR/events` (one JSON object per line). The file is cleared automatically when you push a new screen.
249
+
250
+ ```jsonl
251
+ {"type":"click","choice":"a","text":"Option A - Simple Layout","timestamp":1706000101}
252
+ {"type":"click","choice":"c","text":"Option C - Complex Grid","timestamp":1706000108}
253
+ {"type":"click","choice":"b","text":"Option B - Hybrid","timestamp":1706000115}
254
+ ```
255
+
256
+ The full event stream shows the user's exploration path — they may click multiple options before settling. The last `choice` event is typically the final selection, but the pattern of clicks can reveal hesitation or preferences worth asking about.
257
+
258
+ If `$STATE_DIR/events` doesn't exist, the user didn't interact with the browser — use only their terminal text.
259
+
260
+ ## Design Tips
261
+
262
+ - **Scale fidelity to the question** — wireframes for layout, polish for polish questions
263
+ - **Explain the question on each page** — "Which layout feels more professional?" not just "Pick one"
264
+ - **Iterate before advancing** — if feedback changes current screen, write a new version
265
+ - **2-4 options max** per screen
266
+ - **Use real content when it matters** — for a photography portfolio, use actual images (Unsplash). Placeholder content obscures design issues.
267
+ - **Keep mockups simple** — focus on layout and structure, not pixel-perfect design
268
+
269
+ ## File Naming
270
+
271
+ - Use semantic names: `platform.html`, `visual-style.html`, `layout.html`
272
+ - Never reuse filenames — each screen must be a new file
273
+ - For iterations: append version suffix like `layout-v2.html`, `layout-v3.html`
274
+ - Server serves newest file by modification time
275
+
276
+ ## Cleaning Up
277
+
278
+ ```bash
279
+ scripts/stop-server.sh $SESSION_DIR
280
+ ```
281
+
282
+ If the session used `--project-dir`, mockup files persist in `.superpowers/brainstorm/` for later reference. Only `/tmp` sessions get deleted on stop.
283
+
284
+ ## Reference
285
+
286
+ - Frame template (CSS reference): `scripts/frame-template.html`
287
+ - Helper script (client-side): `scripts/helper.js`
@@ -0,0 +1,186 @@
1
+ ---
2
+ name: dispatching-parallel-agents
3
+ description: Use for ad-hoc investigation/debugging with 2+ independent problem domains and no formal plan (e.g. unrelated test failures). If a plan or task list already exists, use subagent-driven-development instead.
4
+ ---
5
+
6
+ # Dispatching Parallel Agents
7
+
8
+ > Scope: no formal plan exists yet — independent investigation/debugging work (e.g. unrelated test failures across files). If you already have an implementation plan or task list, use `subagent-driven-development` instead; it adds review budget and model-tier selection on top of the same parallel-dispatch idea.
9
+
10
+ ## Overview
11
+
12
+ You delegate tasks to specialized agents with isolated context. By precisely crafting their instructions and context, you ensure they stay focused and succeed at their task. They should never inherit your session's context or history — you construct exactly what they need. This also preserves your own context for coordination work.
13
+
14
+ When you have multiple unrelated failures (different test files, different subsystems, different bugs), investigating them sequentially wastes time. Each investigation is independent and can happen in parallel.
15
+
16
+ **Core principle:** Dispatch one agent per independent problem domain. Let them work concurrently.
17
+
18
+ ## When to Use
19
+
20
+ ```dot
21
+ digraph when_to_use {
22
+ "Multiple failures?" [shape=diamond];
23
+ "Are they independent?" [shape=diamond];
24
+ "Single agent investigates all" [shape=box];
25
+ "One agent per problem domain" [shape=box];
26
+ "Can they work in parallel?" [shape=diamond];
27
+ "Sequential agents" [shape=box];
28
+ "Parallel dispatch" [shape=box];
29
+
30
+ "Multiple failures?" -> "Are they independent?" [label="yes"];
31
+ "Are they independent?" -> "Single agent investigates all" [label="no - related"];
32
+ "Are they independent?" -> "Can they work in parallel?" [label="yes"];
33
+ "Can they work in parallel?" -> "Parallel dispatch" [label="yes"];
34
+ "Can they work in parallel?" -> "Sequential agents" [label="no - shared state"];
35
+ }
36
+ ```
37
+
38
+ **Use when:**
39
+ - 3+ test files failing with different root causes
40
+ - Multiple subsystems broken independently
41
+ - Each problem can be understood without context from others
42
+ - No shared state between investigations
43
+
44
+ **Don't use when:**
45
+ - Failures are related (fix one might fix others)
46
+ - Need to understand full system state
47
+ - Agents would interfere with each other
48
+
49
+ ## The Pattern
50
+
51
+ ### 1. Identify Independent Domains
52
+
53
+ Group failures by what's broken:
54
+ - File A tests: Tool approval flow
55
+ - File B tests: Batch completion behavior
56
+ - File C tests: Abort functionality
57
+
58
+ Each domain is independent - fixing tool approval doesn't affect abort tests.
59
+
60
+ ### 2. Create Focused Agent Tasks
61
+
62
+ Each agent gets:
63
+ - **Specific scope:** One test file or subsystem
64
+ - **Clear goal:** Make these tests pass
65
+ - **Constraints:** Don't change other code
66
+ - **Expected output:** Summary of what you found and fixed
67
+
68
+ ### 3. Dispatch in Parallel
69
+
70
+ Multiple dispatch calls in one response = parallel execution. One per response = sequential.
71
+
72
+ ```typescript
73
+ // In Claude Code / AI environment
74
+ Task("Fix agent-tool-abort.test.ts failures")
75
+ Task("Fix batch-completion-behavior.test.ts failures")
76
+ Task("Fix tool-approval-race-conditions.test.ts failures")
77
+ // All three run concurrently
78
+ ```
79
+
80
+ ### 4. Review and Integrate
81
+
82
+ When agents return:
83
+ - Read each summary
84
+ - Verify fixes don't conflict
85
+ - Run full test suite
86
+ - Integrate all changes
87
+
88
+ ## Agent Prompt Structure
89
+
90
+ Good agent prompts are:
91
+ 1. **Focused** - One clear problem domain
92
+ 2. **Self-contained** - All context needed to understand the problem
93
+ 3. **Specific about output** - What should the agent return?
94
+
95
+ ```markdown
96
+ Fix the 3 failing tests in src/agents/agent-tool-abort.test.ts:
97
+
98
+ 1. "should abort tool with partial output capture" - expects 'interrupted at' in message
99
+ 2. "should handle mixed completed and aborted tools" - fast tool aborted instead of completed
100
+ 3. "should properly track pendingToolCount" - expects 3 results but gets 0
101
+
102
+ These are timing/race condition issues. Your task:
103
+
104
+ 1. Read the test file and understand what each test verifies
105
+ 2. Identify root cause - timing issues or actual bugs?
106
+ 3. Fix by:
107
+ - Replacing arbitrary timeouts with event-based waiting
108
+ - Fixing bugs in abort implementation if found
109
+ - Adjusting test expectations if testing changed behavior
110
+
111
+ Do NOT just increase timeouts - find the real issue.
112
+
113
+ Return: Summary of what you found and what you fixed.
114
+ ```
115
+
116
+ ## Common Mistakes
117
+
118
+ **❌ Too broad:** "Fix all the tests" - agent gets lost
119
+ **✅ Specific:** "Fix agent-tool-abort.test.ts" - focused scope
120
+
121
+ **❌ No context:** "Fix the race condition" - agent doesn't know where
122
+ **✅ Context:** Paste the error messages and test names
123
+
124
+ **❌ No constraints:** Agent might refactor everything
125
+ **✅ Constraints:** "Do NOT change production code" or "Fix tests only"
126
+
127
+ **❌ Vague output:** "Fix it" - you don't know what changed
128
+ **✅ Specific:** "Return summary of root cause and changes"
129
+
130
+ ## When NOT to Use
131
+
132
+ **Related failures:** Fixing one might fix others - investigate together first
133
+ **Need full context:** Understanding requires seeing entire system
134
+ **Exploratory debugging:** You don't know what's broken yet
135
+ **Shared state:** Agents would interfere (editing same files, using same resources)
136
+
137
+ ## Real Example from Session
138
+
139
+ **Scenario:** 6 test failures across 3 files after major refactoring
140
+
141
+ **Failures:**
142
+ - agent-tool-abort.test.ts: 3 failures (timing issues)
143
+ - batch-completion-behavior.test.ts: 2 failures (tools not executing)
144
+ - tool-approval-race-conditions.test.ts: 1 failure (execution count = 0)
145
+
146
+ **Decision:** Independent domains - abort logic separate from batch completion separate from race conditions
147
+
148
+ **Dispatch:**
149
+ ```
150
+ Agent 1 → Fix agent-tool-abort.test.ts
151
+ Agent 2 → Fix batch-completion-behavior.test.ts
152
+ Agent 3 → Fix tool-approval-race-conditions.test.ts
153
+ ```
154
+
155
+ **Results:**
156
+ - Agent 1: Replaced timeouts with event-based waiting
157
+ - Agent 2: Fixed event structure bug (threadId in wrong place)
158
+ - Agent 3: Added wait for async tool execution to complete
159
+
160
+ **Integration:** All fixes independent, no conflicts, full suite green
161
+
162
+ **Time saved:** 3 problems solved in parallel vs sequentially
163
+
164
+ ## Key Benefits
165
+
166
+ 1. **Parallelization** - Multiple investigations happen simultaneously
167
+ 2. **Focus** - Each agent has narrow scope, less context to track
168
+ 3. **Independence** - Agents don't interfere with each other
169
+ 4. **Speed** - 3 problems solved in time of 1
170
+
171
+ ## Verification
172
+
173
+ After agents return:
174
+ 1. **Review each summary** - Understand what changed
175
+ 2. **Check for conflicts** - Did agents edit same code?
176
+ 3. **Run full suite** - Verify all fixes work together
177
+ 4. **Spot check** - Agents can make systematic errors
178
+
179
+ ## Real-World Impact
180
+
181
+ From debugging session (2025-10-03):
182
+ - 6 failures across 3 files
183
+ - 3 agents dispatched in parallel
184
+ - All investigations completed concurrently
185
+ - All fixes integrated successfully
186
+ - Zero conflicts between agent changes
@@ -0,0 +1,72 @@
1
+ ---
2
+ name: executing-plans
3
+ description: Use when you have a written implementation plan to execute in a separate session with review checkpoints
4
+ ---
5
+
6
+ # Executing Plans
7
+
8
+ ## Overview
9
+
10
+ Load plan, review critically, execute all tasks, report when complete.
11
+
12
+ **Announce at start:** "I'm using the executing-plans skill to implement this plan."
13
+
14
+ **Note:** Tell your human partner that Superpowers works much better with access to subagents. The quality of its work will be significantly higher if run on a platform with subagent support (such as Claude Code or Codex). If subagents are available, use superpowers:subagent-driven-development instead of this skill.
15
+
16
+ ## The Process
17
+
18
+ ### Step 1: Load and Review Plan
19
+ 1. Read plan file
20
+ 2. Review critically - identify any questions or concerns about the plan
21
+ 3. If concerns: Raise them with your human partner before starting
22
+ 4. If no concerns: Create TodoWrite and proceed
23
+
24
+ ### Step 2: Execute Tasks
25
+
26
+ For each task:
27
+ 1. Mark as in_progress
28
+ 2. Follow each step exactly (plan has bite-sized steps)
29
+ 3. Run verifications as specified
30
+ 4. Mark as completed
31
+
32
+ After completing a task group (a set of related tasks that form a logical unit), checkpoint durable state: update `ACTIVE_STATE.md` and `.hero-mmt-kit/session.json`.
33
+
34
+ ### Step 3: Complete Development
35
+
36
+ After all tasks complete and verified:
37
+ - Announce: "I'm using the finishing-a-development-branch skill to complete this work."
38
+ - **REQUIRED SUB-SKILL:** Use superpowers:finishing-a-development-branch
39
+ - Follow that skill to verify tests, present options, execute choice
40
+
41
+ ## When to Stop and Ask for Help
42
+
43
+ **STOP executing immediately when:**
44
+ - Hit a blocker (missing dependency, test fails, instruction unclear)
45
+ - Plan has critical gaps preventing starting
46
+ - You don't understand an instruction
47
+ - Verification fails repeatedly
48
+
49
+ **Ask for clarification rather than guessing.**
50
+
51
+ ## When to Revisit Earlier Steps
52
+
53
+ **Return to Review (Step 1) when:**
54
+ - Partner updates the plan based on your feedback
55
+ - Fundamental approach needs rethinking
56
+
57
+ **Don't force through blockers** - stop and ask.
58
+
59
+ ## Remember
60
+ - Review plan critically first
61
+ - Follow plan steps exactly
62
+ - Don't skip verifications
63
+ - Reference skills when plan says to
64
+ - Stop when blocked, don't guess
65
+ - Never start implementation on main/master branch without explicit user consent
66
+
67
+ ## Integration
68
+
69
+ **Required workflow skills:**
70
+ - **superpowers:using-git-worktrees** - Ensures isolated workspace (creates one or verifies existing)
71
+ - **superpowers:writing-plans** - Creates the plan this skill executes
72
+ - **superpowers:finishing-a-development-branch** - Complete development after all tasks