@complexthings/superpowers-agent 9.2.1 → 10.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 (193) hide show
  1. package/.agents/skills/claude-handoff/SKILL.md +18 -0
  2. package/.agents/skills/code-review/SKILL.md +89 -0
  3. package/.agents/skills/{improve-codebase-architecture → codebase-design}/DEEPENING.md +1 -1
  4. package/.agents/skills/{improve-codebase-architecture/INTERFACE-DESIGN.md → codebase-design/DESIGN-IT-TWICE.md} +3 -3
  5. package/.agents/skills/codebase-design/SKILL.md +114 -0
  6. package/.agents/skills/design-an-interface/SKILL.md +94 -0
  7. package/.agents/skills/{diagnose → diagnosing-bugs}/SKILL.md +29 -12
  8. package/.agents/skills/{grill-with-docs → domain-modeling}/CONTEXT-FORMAT.md +1 -4
  9. package/.agents/skills/domain-modeling/SKILL.md +74 -0
  10. package/.agents/skills/fable-mode/SKILL.md +95 -0
  11. package/.agents/skills/git-guardrails-claude-code/SKILL.md +95 -0
  12. package/.agents/skills/git-guardrails-claude-code/scripts/block-dangerous-git.sh +25 -0
  13. package/.agents/skills/grill-me/SKILL.md +7 -0
  14. package/.agents/skills/grill-with-docs/SKILL.md +3 -86
  15. package/.agents/skills/grilling/SKILL.md +14 -0
  16. package/.agents/skills/handoff/SKILL.md +2 -1
  17. package/.agents/skills/i-have-adhd/SKILL.md +120 -0
  18. package/.agents/skills/implement/SKILL.md +11 -0
  19. package/.agents/skills/improve-codebase-architecture/HTML-REPORT.md +3 -3
  20. package/.agents/skills/improve-codebase-architecture/SKILL.md +13 -28
  21. package/.agents/skills/loop-me/SKILL.md +32 -0
  22. package/.agents/skills/prototype/SKILL.md +1 -1
  23. package/.agents/skills/qa/SKILL.md +130 -0
  24. package/.agents/skills/request-refactor-plan/SKILL.md +68 -0
  25. package/.agents/skills/research/SKILL.md +12 -0
  26. package/.agents/skills/resolving-merge-conflicts/SKILL.md +14 -0
  27. package/.agents/skills/scaffold-exercises/SKILL.md +106 -0
  28. package/.agents/skills/setup-matt-pocock-skills/SKILL.md +11 -9
  29. package/.agents/skills/setup-matt-pocock-skills/domain.md +2 -2
  30. package/.agents/skills/setup-matt-pocock-skills/issue-tracker-github.md +23 -0
  31. package/.agents/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +23 -0
  32. package/.agents/skills/setup-matt-pocock-skills/issue-tracker-local.md +11 -0
  33. package/.agents/skills/skill-creator/LICENSE.txt +202 -0
  34. package/.agents/skills/skill-creator/SKILL.md +485 -0
  35. package/.agents/skills/skill-creator/agents/analyzer.md +274 -0
  36. package/.agents/skills/skill-creator/agents/comparator.md +202 -0
  37. package/.agents/skills/skill-creator/agents/grader.md +223 -0
  38. package/.agents/skills/skill-creator/assets/eval_review.html +146 -0
  39. package/.agents/skills/skill-creator/eval-viewer/generate_review.py +471 -0
  40. package/.agents/skills/skill-creator/eval-viewer/viewer.html +1325 -0
  41. package/.agents/skills/skill-creator/references/schemas.md +430 -0
  42. package/.agents/skills/skill-creator/scripts/__init__.py +0 -0
  43. package/.agents/skills/skill-creator/scripts/__pycache__/__init__.cpython-314.pyc +0 -0
  44. package/.agents/skills/skill-creator/scripts/__pycache__/run_eval.cpython-314.pyc +0 -0
  45. package/.agents/skills/skill-creator/scripts/__pycache__/utils.cpython-314.pyc +0 -0
  46. package/.agents/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
  47. package/.agents/skills/skill-creator/scripts/generate_report.py +326 -0
  48. package/.agents/skills/skill-creator/scripts/improve_description.py +247 -0
  49. package/.agents/skills/skill-creator/scripts/package_skill.py +136 -0
  50. package/.agents/skills/skill-creator/scripts/quick_validate.py +103 -0
  51. package/.agents/skills/skill-creator/scripts/run_eval.py +310 -0
  52. package/.agents/skills/skill-creator/scripts/run_loop.py +328 -0
  53. package/.agents/skills/skill-creator/scripts/utils.py +47 -0
  54. package/.agents/skills/tdd/SKILL.md +17 -90
  55. package/.agents/skills/tdd/tests.md +16 -0
  56. package/.agents/skills/teach/GLOSSARY-FORMAT.md +35 -0
  57. package/.agents/skills/teach/LEARNING-RECORD-FORMAT.md +46 -0
  58. package/.agents/skills/teach/MISSION-FORMAT.md +31 -0
  59. package/.agents/skills/teach/RESOURCES-FORMAT.md +32 -0
  60. package/.agents/skills/teach/SKILL.md +140 -0
  61. package/.agents/skills/{to-prd → to-spec}/SKILL.md +11 -12
  62. package/.agents/skills/to-tickets/SKILL.md +114 -0
  63. package/.agents/skills/triage/AGENT-BRIEF.md +40 -1
  64. package/.agents/skills/triage/OUT-OF-SCOPE.md +5 -1
  65. package/.agents/skills/triage/SKILL.md +20 -11
  66. package/.agents/skills/wayfinder/SKILL.md +127 -0
  67. package/.agents/skills/writing-great-skills/GLOSSARY.md +201 -0
  68. package/.agents/skills/writing-great-skills/SKILL.md +83 -0
  69. package/.agents/superpowers-agent +103 -222
  70. package/.agents/superpowers-bootstrap.md +3 -3
  71. package/.agents/templates/AGENTS.md.template +11 -34
  72. package/.agents/templates/SUPERPOWERS.md.template +4 -4
  73. package/.github/copilot-instructions.md +23 -99
  74. package/.github/hooks/rtk-rewrite.json +22 -0
  75. package/AGENTS.md +7 -6
  76. package/README.md +53 -174
  77. package/package.json +1 -1
  78. package/skills/collaboration/brainstorming/SKILL.md +39 -139
  79. package/skills/collaboration/brainstorming/skill.json +2 -2
  80. package/skills/collaboration/leveraging-cli-tools/SKILL.md +70 -71
  81. package/skills/collaboration/leveraging-cli-tools/references/copilot-instructions.md +30 -0
  82. package/skills/collaboration/leveraging-cli-tools/scripts/setup-ponytail.sh +185 -0
  83. package/skills/collaboration/leveraging-cli-tools/scripts/setup-rtk.sh +217 -0
  84. package/skills/collaboration/leveraging-cli-tools/skill.json +1 -1
  85. package/skills/meta/create-skill-json/SKILL.md +4 -4
  86. package/skills/meta/create-skill-json/skill.json +1 -1
  87. package/skills/meta/create-skill-json/test-scenarios.md +1 -1
  88. package/skills/setup-skills/SKILL.md +18 -11
  89. package/skills/setup-skills/skill.json +8 -0
  90. package/.agents/skills/caveman/SKILL.md +0 -49
  91. package/.agents/skills/improve-codebase-architecture/LANGUAGE.md +0 -53
  92. package/.agents/skills/karpathy-guidelines/SKILL.md +0 -75
  93. package/.agents/skills/review/SKILL.md +0 -78
  94. package/.agents/skills/tdd/deep-modules.md +0 -33
  95. package/.agents/skills/tdd/interface-design.md +0 -31
  96. package/.agents/skills/tdd/refactoring.md +0 -10
  97. package/.agents/skills/to-issues/SKILL.md +0 -83
  98. package/.agents/skills/zoom-out/SKILL.md +0 -7
  99. package/skills/architecture/ABOUT.md +0 -20
  100. package/skills/architecture/preserving-productive-tensions/SKILL.md +0 -146
  101. package/skills/architecture/preserving-productive-tensions/skill.json +0 -9
  102. package/skills/collaboration/brainstorming/spec-document-reviewer-prompt.md +0 -50
  103. package/skills/collaboration/brainstorming/visual-companion.md +0 -277
  104. package/skills/collaboration/dispatching-parallel-agents/SKILL.md +0 -174
  105. package/skills/collaboration/dispatching-parallel-agents/skill.json +0 -9
  106. package/skills/collaboration/executing-plans/SKILL.md +0 -130
  107. package/skills/collaboration/executing-plans/skill.json +0 -9
  108. package/skills/collaboration/finishing-a-development-branch/SKILL.md +0 -261
  109. package/skills/collaboration/finishing-a-development-branch/skill.json +0 -9
  110. package/skills/collaboration/leveraging-cli-tools/scripts/slim.py +0 -167
  111. package/skills/collaboration/receiving-code-review/SKILL.md +0 -233
  112. package/skills/collaboration/receiving-code-review/skill.json +0 -9
  113. package/skills/collaboration/requesting-code-review/SKILL.md +0 -110
  114. package/skills/collaboration/requesting-code-review/code-reviewer.md +0 -146
  115. package/skills/collaboration/requesting-code-review/skill.json +0 -12
  116. package/skills/collaboration/subagent-driven-development/SKILL.md +0 -255
  117. package/skills/collaboration/subagent-driven-development/code-quality-reviewer-prompt.md +0 -26
  118. package/skills/collaboration/subagent-driven-development/implementer-prompt.md +0 -113
  119. package/skills/collaboration/subagent-driven-development/skill.json +0 -15
  120. package/skills/collaboration/subagent-driven-development/spec-reviewer-prompt.md +0 -61
  121. package/skills/collaboration/using-git-worktrees/SKILL.md +0 -366
  122. package/skills/collaboration/using-git-worktrees/skill.json +0 -9
  123. package/skills/collaboration/writing-plans/SKILL.md +0 -121
  124. package/skills/collaboration/writing-plans/plan-document-reviewer-prompt.md +0 -52
  125. package/skills/collaboration/writing-plans/skill.json +0 -9
  126. package/skills/debugging/defense-in-depth/SKILL.md +0 -380
  127. package/skills/debugging/defense-in-depth/skill.json +0 -9
  128. package/skills/debugging/root-cause-tracing/SKILL.md +0 -361
  129. package/skills/debugging/root-cause-tracing/find-polluter.sh +0 -63
  130. package/skills/debugging/root-cause-tracing/skill.json +0 -12
  131. package/skills/debugging/systematic-debugging/SKILL.md +0 -299
  132. package/skills/debugging/systematic-debugging/condition-based-waiting-example.ts +0 -158
  133. package/skills/debugging/systematic-debugging/condition-based-waiting.md +0 -115
  134. package/skills/debugging/systematic-debugging/defense-in-depth.md +0 -122
  135. package/skills/debugging/systematic-debugging/find-polluter.sh +0 -63
  136. package/skills/debugging/systematic-debugging/root-cause-tracing.md +0 -169
  137. package/skills/debugging/systematic-debugging/skill.json +0 -9
  138. package/skills/debugging/systematic-debugging/test-academic.md +0 -14
  139. package/skills/debugging/systematic-debugging/test-pressure-1.md +0 -58
  140. package/skills/debugging/systematic-debugging/test-pressure-2.md +0 -68
  141. package/skills/debugging/systematic-debugging/test-pressure-3.md +0 -69
  142. package/skills/debugging/verification-before-completion/SKILL.md +0 -143
  143. package/skills/debugging/verification-before-completion/skill.json +0 -9
  144. package/skills/finding-skills/SKILL.md +0 -101
  145. package/skills/finding-skills/skill.json +0 -8
  146. package/skills/meta/create-agents-md/SKILL.md +0 -182
  147. package/skills/meta/create-agents-md/skill.json +0 -9
  148. package/skills/meta/creating-prompts/SKILL.md +0 -349
  149. package/skills/meta/creating-prompts/examples/do-example.md +0 -65
  150. package/skills/meta/creating-prompts/examples/plan-example.md +0 -75
  151. package/skills/meta/creating-prompts/examples/refine-example.md +0 -65
  152. package/skills/meta/creating-prompts/examples/research-example.md +0 -63
  153. package/skills/meta/creating-prompts/scripts/get-next-number.sh +0 -27
  154. package/skills/meta/creating-prompts/skill.json +0 -20
  155. package/skills/meta/creating-prompts/templates/do-template.md +0 -59
  156. package/skills/meta/creating-prompts/templates/plan-template.md +0 -58
  157. package/skills/meta/creating-prompts/templates/refine-template.md +0 -54
  158. package/skills/meta/creating-prompts/templates/research-template.md +0 -56
  159. package/skills/meta/using-superpowers/SKILL.md +0 -108
  160. package/skills/meta/using-superpowers/skill.json +0 -5
  161. package/skills/meta/writing-prompts/SKILL.md +0 -122
  162. package/skills/meta/writing-prompts/references/platforms.md +0 -114
  163. package/skills/meta/writing-prompts/skill.json +0 -9
  164. package/skills/problem-solving/ABOUT.md +0 -40
  165. package/skills/problem-solving/collision-zone-thinking/SKILL.md +0 -188
  166. package/skills/problem-solving/collision-zone-thinking/references/historical-examples.md +0 -393
  167. package/skills/problem-solving/collision-zone-thinking/skill.json +0 -9
  168. package/skills/problem-solving/inversion-exercise/SKILL.md +0 -174
  169. package/skills/problem-solving/inversion-exercise/skill.json +0 -9
  170. package/skills/problem-solving/meta-pattern-recognition/SKILL.md +0 -116
  171. package/skills/problem-solving/meta-pattern-recognition/skill.json +0 -9
  172. package/skills/problem-solving/scale-game/SKILL.md +0 -222
  173. package/skills/problem-solving/scale-game/skill.json +0 -9
  174. package/skills/problem-solving/simplification-cascades/SKILL.md +0 -113
  175. package/skills/problem-solving/simplification-cascades/skill.json +0 -9
  176. package/skills/problem-solving/when-stuck/SKILL.md +0 -69
  177. package/skills/problem-solving/when-stuck/skill.json +0 -9
  178. package/skills/research/ABOUT.md +0 -20
  179. package/skills/research/tracing-knowledge-lineages/SKILL.md +0 -241
  180. package/skills/research/tracing-knowledge-lineages/skill.json +0 -9
  181. package/skills/testing/condition-based-waiting/SKILL.md +0 -359
  182. package/skills/testing/condition-based-waiting/example.ts +0 -158
  183. package/skills/testing/condition-based-waiting/skill.json +0 -12
  184. package/skills/testing/test-driven-development/SKILL.md +0 -434
  185. package/skills/testing/test-driven-development/skill.json +0 -9
  186. package/skills/testing/testing-anti-patterns/SKILL.md +0 -298
  187. package/skills/testing/testing-anti-patterns/skill.json +0 -9
  188. package/skills/testing/verification-before-completion/SKILL.md +0 -246
  189. package/skills/testing/verification-before-completion/skill.json +0 -10
  190. package/skills/using-a-skill/SKILL.md +0 -101
  191. package/skills/using-a-skill/skill.json +0 -8
  192. /package/.agents/skills/{diagnose → diagnosing-bugs}/scripts/hitl-loop.template.sh +0 -0
  193. /package/.agents/skills/{grill-with-docs → domain-modeling}/ADR-FORMAT.md +0 -0
@@ -1,146 +0,0 @@
1
- ---
2
- name: preserving-productive-tensions
3
- description: Recognizes when tensions between valid approaches are features rather than bugs, and preserves multiple valid approaches instead of forcing premature consensus. Invoke when oscillating between two approaches across messages, when stakeholders have conflicting but equally valid concerns, when someone says "just pick one" without a clear reason, when implementation approaches optimize for different legitimate priorities, or when forcing a choice would destroy flexibility that different contexts legitimately need. Helps agents avoid arbitrarily resolving disagreements just to "move forward" — premature consensus destroys context-dependent flexibility.
4
- metadata:
5
- version: 1.2.0
6
- ---
7
-
8
- # Preserving Productive Tensions
9
-
10
- ## Overview
11
-
12
- Some tensions aren't problems to solve — they're valuable information to preserve. When multiple approaches are genuinely valid in different contexts, forcing a choice destroys flexibility that different deployments or users need.
13
-
14
- **Core principle:** Preserve tensions that reveal context-dependence. Force resolution only when necessary.
15
-
16
- ## Recognizing Productive Tensions
17
-
18
- **A tension is productive when:**
19
- - Both approaches optimize for different valid priorities (cost vs latency, simplicity vs features)
20
- - The "better" choice depends on deployment context, not technical superiority
21
- - Different users/deployments would legitimately choose differently
22
- - The trade-off is real and won't disappear with clever engineering
23
- - Stakeholders have conflicting but equally valid concerns
24
-
25
- **A tension needs resolution when:**
26
- - Implementation cost of preserving both is prohibitive
27
- - The approaches fundamentally conflict (can't coexist)
28
- - There's clear technical superiority for this specific use case
29
- - It's a one-way door (choice locks architecture)
30
- - Preserving both adds complexity without value
31
-
32
- ## Symptom Check — Are You Forcing Resolution?
33
-
34
- Watch for these in your own reasoning:
35
-
36
- - "We need to pick one" — without stating why both can't be preserved
37
- - "I'll just go with X" — choosing based on your preference, not user/deployment context
38
- - Oscillating between A and B on consecutive messages — you're sensing a real tension, not making a mistake
39
- - Resolving a disagreement to "move forward" — consensus for consensus's sake destroys information
40
- - "Which is best?" — when the real answer is "it depends on your context"
41
-
42
- **All of these are STOP signals. Consider preserving the tension instead.**
43
-
44
- ## Preservation Patterns
45
-
46
- ### Pattern 1: Configuration
47
- Make the choice configurable rather than baked in:
48
-
49
- ```python
50
- class Config:
51
- mode: Literal["optimize_cost", "optimize_latency"]
52
- # Each mode gets a clean, simple implementation
53
- ```
54
-
55
- **When to use:** Both approaches are architecturally compatible; switching is a runtime decision.
56
-
57
- ### Pattern 2: Parallel Implementations
58
- Maintain both as separate, clean modules with a shared contract:
59
-
60
- ```python
61
- # processor/batch.py — optimizes for cost
62
- # processor/stream.py — optimizes for latency
63
- # Both implement: def process(data) -> Result
64
- ```
65
-
66
- **When to use:** Approaches diverge significantly but share the same interface.
67
-
68
- ### Pattern 3: Documented Trade-off
69
- Capture the tension explicitly in documentation or an ADR:
70
-
71
- ```markdown
72
- ## Unresolved Tension: Authentication Strategy
73
-
74
- **Option A: JWT** — Stateless, scales easily, but token revocation is hard
75
- **Option B: Sessions** — Easy revocation, but requires shared state
76
-
77
- **Why unresolved:** Different deployments need different trade-offs
78
- **Decision deferred to:** Deployment configuration
79
- **Review trigger:** If 80% of deployments choose one option
80
- ```
81
-
82
- **When to use:** Can't preserve both in code, but want to document the choice was deliberate and reversible.
83
-
84
- ## When to Force Resolution
85
-
86
- Force resolution when one of these is true:
87
-
88
- 1. **Implementation cost is prohibitive** — building and maintaining both would meaningfully slow development or the team lacks bandwidth
89
- 2. **Fundamental conflict** — approaches make contradictory architectural assumptions and can't cleanly coexist
90
- 3. **Clear technical superiority** — one approach objectively solves the constraints; not "I prefer X" but "X meets our requirements, Y doesn't"
91
- 4. **One-way door** — the choice locks architecture; migrating between options would be expensive
92
- 5. **Simplicity requires choice** — preserving both genuinely adds complexity and YAGNI applies
93
-
94
- When forcing resolution, state which of the above applies. "We need to pick one" is not a reason — it's a symptom of wanting to avoid the tension.
95
-
96
- **Ask explicitly:** "Should I pick one, or preserve both as options for different contexts?"
97
-
98
- ## Documentation Format
99
-
100
- When preserving a tension, document it clearly:
101
-
102
- ```markdown
103
- ## Tension: [Name]
104
-
105
- **Context:** [Why this tension exists]
106
-
107
- **Option A:** [Approach]
108
- - Optimizes for: [Priority]
109
- - Trade-off: [Cost]
110
- - Best when: [Context]
111
-
112
- **Option B:** [Approach]
113
- - Optimizes for: [Different priority]
114
- - Trade-off: [Different cost]
115
- - Best when: [Different context]
116
-
117
- **Preservation strategy:** [Configuration / Parallel / Documented]
118
-
119
- **Resolution trigger:** [Conditions that would justify forcing a choice]
120
- ```
121
-
122
- ## Examples
123
-
124
- ### Preserve — Context-dependent trade-off
125
- "Should we optimize for cost or latency in the inference pipeline?"
126
- - **Preserve:** Make it configurable — interactive use cases need latency, batch jobs need cost. Different deployments will choose differently.
127
-
128
- ### Resolve — Technical constraint settles it
129
- "Should we use SSE or WebSockets for real-time updates?"
130
- - **Resolve:** SSE — we only need server-to-client communication; WebSockets adds bidirectional complexity without value for this use case.
131
-
132
- ### Defer — Business decision, not technical
133
- "Should we support offline mode?"
134
- - **Defer to stakeholder:** Don't preserve both in code speculatively — ask who the users are and whether offline is part of the product promise.
135
-
136
- ### Preserve — Stakeholder disagreement reveals context
137
- A stakeholder wants strict input validation upfront; another wants lenient parsing that handles messy real-world data.
138
- - **Preserve:** Both are valid for different integration contexts. Offer a `strict` vs `lenient` mode rather than overruling either.
139
-
140
- ## Core Reminders
141
-
142
- - Oscillating between A and B is often a signal that both are right — for different contexts
143
- - Premature consensus destroys the flexibility that reveals context-dependence
144
- - Configuration beats forced choice (when the implementation overhead is low)
145
- - Document trade-offs so future engineers can revisit with better information
146
- - Forcing resolution is always valid — but state the reason explicitly
@@ -1,9 +0,0 @@
1
- {
2
- "version": "1.2.0",
3
- "name": "superpowers:architecture/preserving-productive-tensions",
4
- "title": "Preserving Productive Tensions",
5
- "aliases": [
6
- "preserving-productive-tensions",
7
- "architecture/preserving-productive-tensions"
8
- ]
9
- }
@@ -1,50 +0,0 @@
1
- # Spec Document Reviewer Prompt Template
2
-
3
- Use this template when dispatching a spec document reviewer subagent.
4
-
5
- **Purpose:** Verify the spec is complete, consistent, and ready for implementation planning.
6
-
7
- **Dispatch after:** Spec document is written to `docs/superpowers/specs/`
8
-
9
- ```
10
- Task tool (general-purpose):
11
- description: "Review spec document"
12
- prompt: |
13
- You are a spec document reviewer. Verify this spec is complete and ready for planning.
14
-
15
- **Spec to review:** [SPEC_FILE_PATH]
16
-
17
- ## What to Check
18
-
19
- | Category | What to Look For |
20
- |----------|------------------|
21
- | Completeness | TODOs, placeholders, "TBD", incomplete sections |
22
- | Coverage | Missing error handling, edge cases, integration points |
23
- | Consistency | Internal contradictions, conflicting requirements |
24
- | Clarity | Ambiguous requirements |
25
- | YAGNI | Unrequested features, over-engineering |
26
- | Scope | Focused enough for a single plan — not covering multiple independent subsystems |
27
- | Architecture | Units with clear boundaries, well-defined interfaces, independently understandable and testable |
28
-
29
- ## CRITICAL
30
-
31
- Look especially hard for:
32
- - Any TODO markers or placeholder text
33
- - Sections saying "to be defined later" or "will spec when X is done"
34
- - Sections noticeably less detailed than others
35
- - Units that lack clear boundaries or interfaces — can you understand what each unit does without reading its internals?
36
-
37
- ## Output Format
38
-
39
- ## Spec Review
40
-
41
- **Status:** ✅ Approved | ❌ Issues Found
42
-
43
- **Issues (if any):**
44
- - [Section X]: [specific issue] - [why it matters]
45
-
46
- **Recommendations (advisory):**
47
- - [suggestions that don't block approval]
48
- ```
49
-
50
- **Reviewer returns:** Status, Issues (if any), Recommendations
@@ -1,277 +0,0 @@
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, the user sees it in their browser and can click to select options. Selections are recorded to a `.events` file 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"}
41
- ```
42
-
43
- Save `screen_dir` from the response. Tell user to open the URL.
44
-
45
- **Finding connection info:** The server writes its startup JSON to `$SCREEN_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.
46
-
47
- **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.
48
-
49
- **Launching the server by platform:**
50
-
51
- **Claude Code / OpenCode:**
52
- ```bash
53
- # Default mode works — the script backgrounds the server itself
54
- scripts/start-server.sh --project-dir /path/to/project
55
- ```
56
-
57
- **Codex:**
58
- ```bash
59
- # Codex reaps background processes. The script auto-detects CODEX_CI and
60
- # switches to foreground mode. Run it normally — no extra flags needed.
61
- scripts/start-server.sh --project-dir /path/to/project
62
- ```
63
-
64
- **Gemini CLI:**
65
- ```bash
66
- # Use --foreground and set is_background: true on your shell tool call
67
- # so the process survives across turns
68
- scripts/start-server.sh --project-dir /path/to/project --foreground
69
- ```
70
-
71
- **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.
72
-
73
- If the URL is unreachable from your browser (common in remote/containerized setups), bind a non-loopback host:
74
-
75
- ```bash
76
- scripts/start-server.sh \
77
- --project-dir /path/to/project \
78
- --host 0.0.0.0 \
79
- --url-host localhost
80
- ```
81
-
82
- Use `--url-host` to control what hostname is printed in the returned URL JSON.
83
-
84
- ## The Loop
85
-
86
- 1. **Check server is alive**, then **write HTML** to a new file in `screen_dir`:
87
- - Before each write, check that `$SCREEN_DIR/.server-info` exists. If it doesn't (or `.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.
88
- - Use semantic filenames: `platform.html`, `visual-style.html`, `layout.html`
89
- - **Never reuse filenames** — each screen gets a fresh file
90
- - Use Write tool — **never use cat/heredoc** (dumps noise into terminal)
91
- - Server automatically serves the newest file
92
-
93
- 2. **Tell user what to expect and end your turn:**
94
- - Remind them of the URL (every step, not just first)
95
- - Give a brief text summary of what's on screen (e.g., "Showing 3 layout options for the homepage")
96
- - 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."
97
-
98
- 3. **On your next turn** — after the user responds in the terminal:
99
- - Read `$SCREEN_DIR/.events` if it exists — this contains the user's browser interactions (clicks, selections) as JSON lines
100
- - Merge with the user's terminal text to get the full picture
101
- - The terminal message is the primary feedback; `.events` provides structured interaction data
102
-
103
- 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.
104
-
105
- 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:
106
-
107
- ```html
108
- <!-- filename: waiting.html (or waiting-2.html, etc.) -->
109
- <div style="display:flex;align-items:center;justify-content:center;min-height:60vh">
110
- <p class="subtitle">Continuing in terminal...</p>
111
- </div>
112
- ```
113
-
114
- 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.
115
-
116
- 6. Repeat until done.
117
-
118
- ## Writing Content Fragments
119
-
120
- 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).
121
-
122
- **Minimal example:**
123
-
124
- ```html
125
- <h2>Which layout works better?</h2>
126
- <p class="subtitle">Consider readability and visual hierarchy</p>
127
-
128
- <div class="options">
129
- <div class="option" data-choice="a" onclick="toggleSelect(this)">
130
- <div class="letter">A</div>
131
- <div class="content">
132
- <h3>Single Column</h3>
133
- <p>Clean, focused reading experience</p>
134
- </div>
135
- </div>
136
- <div class="option" data-choice="b" onclick="toggleSelect(this)">
137
- <div class="letter">B</div>
138
- <div class="content">
139
- <h3>Two Column</h3>
140
- <p>Sidebar navigation with main content</p>
141
- </div>
142
- </div>
143
- </div>
144
- ```
145
-
146
- That's it. No `<html>`, no CSS, no `<script>` tags needed. The server provides all of that.
147
-
148
- ## CSS Classes Available
149
-
150
- The frame template provides these CSS classes for your content:
151
-
152
- ### Options (A/B/C choices)
153
-
154
- ```html
155
- <div class="options">
156
- <div class="option" data-choice="a" onclick="toggleSelect(this)">
157
- <div class="letter">A</div>
158
- <div class="content">
159
- <h3>Title</h3>
160
- <p>Description</p>
161
- </div>
162
- </div>
163
- </div>
164
- ```
165
-
166
- **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.
167
-
168
- ```html
169
- <div class="options" data-multiselect>
170
- <!-- same option markup — users can select/deselect multiple -->
171
- </div>
172
- ```
173
-
174
- ### Cards (visual designs)
175
-
176
- ```html
177
- <div class="cards">
178
- <div class="card" data-choice="design1" onclick="toggleSelect(this)">
179
- <div class="card-image"><!-- mockup content --></div>
180
- <div class="card-body">
181
- <h3>Name</h3>
182
- <p>Description</p>
183
- </div>
184
- </div>
185
- </div>
186
- ```
187
-
188
- ### Mockup container
189
-
190
- ```html
191
- <div class="mockup">
192
- <div class="mockup-header">Preview: Dashboard Layout</div>
193
- <div class="mockup-body"><!-- your mockup HTML --></div>
194
- </div>
195
- ```
196
-
197
- ### Split view (side-by-side)
198
-
199
- ```html
200
- <div class="split">
201
- <div class="mockup"><!-- left --></div>
202
- <div class="mockup"><!-- right --></div>
203
- </div>
204
- ```
205
-
206
- ### Pros/Cons
207
-
208
- ```html
209
- <div class="pros-cons">
210
- <div class="pros"><h4>Pros</h4><ul><li>Benefit</li></ul></div>
211
- <div class="cons"><h4>Cons</h4><ul><li>Drawback</li></ul></div>
212
- </div>
213
- ```
214
-
215
- ### Mock elements (wireframe building blocks)
216
-
217
- ```html
218
- <div class="mock-nav">Logo | Home | About | Contact</div>
219
- <div style="display: flex;">
220
- <div class="mock-sidebar">Navigation</div>
221
- <div class="mock-content">Main content area</div>
222
- </div>
223
- <button class="mock-button">Action Button</button>
224
- <input class="mock-input" placeholder="Input field">
225
- <div class="placeholder">Placeholder area</div>
226
- ```
227
-
228
- ### Typography and sections
229
-
230
- - `h2` — page title
231
- - `h3` — section heading
232
- - `.subtitle` — secondary text below title
233
- - `.section` — content block with bottom margin
234
- - `.label` — small uppercase label text
235
-
236
- ## Browser Events Format
237
-
238
- When the user clicks options in the browser, their interactions are recorded to `$SCREEN_DIR/.events` (one JSON object per line). The file is cleared automatically when you push a new screen.
239
-
240
- ```jsonl
241
- {"type":"click","choice":"a","text":"Option A - Simple Layout","timestamp":1706000101}
242
- {"type":"click","choice":"c","text":"Option C - Complex Grid","timestamp":1706000108}
243
- {"type":"click","choice":"b","text":"Option B - Hybrid","timestamp":1706000115}
244
- ```
245
-
246
- 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.
247
-
248
- If `.events` doesn't exist, the user didn't interact with the browser — use only their terminal text.
249
-
250
- ## Design Tips
251
-
252
- - **Scale fidelity to the question** — wireframes for layout, polish for polish questions
253
- - **Explain the question on each page** — "Which layout feels more professional?" not just "Pick one"
254
- - **Iterate before advancing** — if feedback changes current screen, write a new version
255
- - **2-4 options max** per screen
256
- - **Use real content when it matters** — for a photography portfolio, use actual images (Unsplash). Placeholder content obscures design issues.
257
- - **Keep mockups simple** — focus on layout and structure, not pixel-perfect design
258
-
259
- ## File Naming
260
-
261
- - Use semantic names: `platform.html`, `visual-style.html`, `layout.html`
262
- - Never reuse filenames — each screen must be a new file
263
- - For iterations: append version suffix like `layout-v2.html`, `layout-v3.html`
264
- - Server serves newest file by modification time
265
-
266
- ## Cleaning Up
267
-
268
- ```bash
269
- scripts/stop-server.sh $SCREEN_DIR
270
- ```
271
-
272
- If the session used `--project-dir`, mockup files persist in `.superpowers/brainstorm/` for later reference. Only `/tmp` sessions get deleted on stop.
273
-
274
- ## Reference
275
-
276
- - Frame template (CSS reference): `scripts/frame-template.html`
277
- - Helper script (client-side): `scripts/helper.js`
@@ -1,174 +0,0 @@
1
- ---
2
- name: dispatching-parallel-agents
3
- description: Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies. Invoke this skill whenever you have multiple unrelated problems, parallel research tasks, independent features, or concurrent investigations where agents can work simultaneously without interfering with each other.
4
- metadata:
5
- version: 1.3.0
6
- languages: all
7
- context: AI-assisted development (Claude Code or similar)
8
- ---
9
-
10
- # Dispatching Parallel Agents
11
-
12
- ## Overview
13
-
14
- When you have multiple independent tasks — different failing tests, separate research questions, unrelated features, distinct subsystems — handling them sequentially wastes time. Each task can be delegated to a focused agent working in isolation.
15
-
16
- **Core principle:** Dispatch one agent per independent problem domain. Let them work concurrently.
17
-
18
- **Key insight:** Agents work with isolated context. They never inherit your session's history — you construct exactly what they need. This keeps each agent focused on its task and preserves your own context for coordination work.
19
-
20
- ## When to Use
21
-
22
- ```mermaid
23
- flowchart TD
24
- A[Multiple independent tasks?] -->|yes| B[Are they independent?]
25
- B -->|no - related| C[Single agent handles all]
26
- B -->|yes| D[Can they run in parallel?]
27
- D -->|yes| E[Parallel dispatch]
28
- D -->|no - shared state| F[Sequential agents]
29
- ```
30
-
31
- **Use when:**
32
- - 2+ test files failing with different root causes
33
- - Multiple subsystems need investigation independently
34
- - Parallel research across different sources or topics
35
- - Independent features that don't share state
36
- - Each task can be understood without context from the others
37
-
38
- **Don't use when:**
39
- - Tasks are related (completing one reveals what the next needs)
40
- - Need to understand the full system state before acting
41
- - Agents would edit the same files or shared resources
42
- - Exploratory debugging where you don't know what's broken yet
43
-
44
- ## The Pattern
45
-
46
- ### 1. Identify Independent Domains
47
-
48
- Group tasks by what they involve and confirm they don't share state:
49
- - Task A: Tool approval flow tests
50
- - Task B: Batch completion behavior
51
- - Task C: Abort functionality
52
-
53
- Verify: fixing A doesn't affect B or C. If unsure, investigate one first.
54
-
55
- ### 2. Craft Focused, Self-Contained Agent Prompts
56
-
57
- Each agent prompt must include everything the agent needs — it has no access to your session's context. Include:
58
- - **Specific scope:** One test file, subsystem, or question
59
- - **Clear goal:** What does success look like?
60
- - **Relevant context:** Error messages, file contents, background
61
- - **Constraints:** What should the agent avoid touching?
62
- - **Expected output:** What should the agent return?
63
-
64
- ### 3. Dispatch in Parallel
65
-
66
- ```typescript
67
- // All three run concurrently — don't await between them
68
- Task("Fix agent-tool-abort.test.ts failures")
69
- Task("Fix batch-completion-behavior.test.ts failures")
70
- Task("Fix tool-approval-race-conditions.test.ts failures")
71
- ```
72
-
73
- For research tasks, the same applies:
74
- ```typescript
75
- Task("Research rate limiting patterns in REST APIs")
76
- Task("Research websocket reconnection strategies")
77
- Task("Research OAuth2 PKCE flow implementation")
78
- ```
79
-
80
- ### 4. Review and Integrate
81
-
82
- When agents return:
83
- - Read each summary
84
- - Verify fixes don't conflict with each other
85
- - Run the full test suite or integration check
86
- - Combine the results
87
-
88
- ## Writing Good Agent Prompts
89
-
90
- The quality of the prompt determines whether the agent succeeds. Because agents start with isolated context, you are responsible for giving them exactly what they need.
91
-
92
- **Debugging example:**
93
- ```markdown
94
- Fix the 3 failing tests in src/agents/agent-tool-abort.test.ts:
95
-
96
- 1. "should abort tool with partial output capture" - expects 'interrupted at' in message
97
- 2. "should handle mixed completed and aborted tools" - fast tool aborted instead of completed
98
- 3. "should properly track pendingToolCount" - expects 3 results but gets 0
99
-
100
- These are likely timing/race condition issues. Your task:
101
- 1. Read the test file and understand what each test verifies
102
- 2. Identify root cause — timing issues or actual bugs?
103
- 3. Fix by replacing arbitrary timeouts with event-based waiting,
104
- or fixing bugs in the abort implementation
105
- 4. Do NOT just increase timeouts — find the real issue
106
- 5. Do NOT change production code outside this domain
107
-
108
- Return: Summary of root cause and what you changed.
109
- ```
110
-
111
- **Research example:**
112
- ```markdown
113
- Research best practices for handling WebSocket reconnection in browser clients.
114
-
115
- Focus on:
116
- - Exponential backoff with jitter
117
- - Maximum retry limits
118
- - Detecting intentional vs. unintentional disconnects
119
- - Common pitfalls (memory leaks, event listener accumulation)
120
-
121
- Return: A concise summary of patterns with pros/cons for each.
122
- ```
123
-
124
- ## Common Mistakes
125
-
126
- | Problem | Bad | Good |
127
- |---|---|---|
128
- | Scope too broad | "Fix all the tests" | "Fix agent-tool-abort.test.ts" |
129
- | Missing context | "Fix the race condition" | Include error messages and test names |
130
- | No constraints | (none given) | "Do NOT change production code" |
131
- | Vague output | "Fix it" | "Return summary of root cause and changes" |
132
- | Assuming context | (no background) | Include relevant code snippets or file contents |
133
-
134
- ## When NOT to Dispatch in Parallel
135
-
136
- - **Related failures:** Fix one might fix others — investigate sequentially first
137
- - **Unknown breakage:** You don't know what's broken yet — explore first, then parallelize
138
- - **Shared state:** Agents would interfere (editing same files, consuming same resources)
139
- - **Dependent tasks:** Task B needs the output of Task A to know what to do
140
-
141
- ## Verification After Agents Return
142
-
143
- 1. **Review each summary** — understand what each agent changed and why
144
- 2. **Check for conflicts** — did any agents edit the same code?
145
- 3. **Run the full suite** — verify all fixes work together
146
- 4. **Spot check** — agents can make systematic errors; sample a few outputs
147
-
148
- ## Example: Debugging Session
149
-
150
- **Scenario:** 6 test failures across 3 files after a major refactoring
151
-
152
- | File | Failures | Root cause domain |
153
- |---|---|---|
154
- | `agent-tool-abort.test.ts` | 3 | Timing/race conditions |
155
- | `batch-completion-behavior.test.ts` | 2 | Event structure bug |
156
- | `tool-approval-race-conditions.test.ts` | 1 | Async execution timing |
157
-
158
- **Decision:** Three independent domains — abort logic is separate from batch completion, which is separate from race conditions.
159
-
160
- **Dispatch:** Three agents in parallel, each scoped to one file.
161
-
162
- **Results:**
163
- - Agent 1: Replaced arbitrary timeouts with event-based waiting
164
- - Agent 2: Fixed event structure bug (threadId in wrong location)
165
- - Agent 3: Added wait for async tool execution to complete
166
-
167
- **Integration:** All fixes independent, no conflicts, full suite green.
168
-
169
- ## Key Benefits
170
-
171
- 1. **Speed** — N problems solved in the time of 1
172
- 2. **Focus** — Each agent has narrow scope and less context to track
173
- 3. **Independence** — Agents don't interfere with each other
174
- 4. **Context preservation** — Your coordination context stays clean while agents work
@@ -1,9 +0,0 @@
1
- {
2
- "version": "1.1.0",
3
- "name": "superpowers:collaboration/dispatching-parallel-agents",
4
- "title": "Dispatching Parallel Agents",
5
- "aliases": [
6
- "dispatching-parallel-agents",
7
- "collaboration/dispatching-parallel-agents"
8
- ]
9
- }