@complexthings/superpowers-agent 8.1.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.
- package/.agents/docs/SUPERPOWERS.md +108 -0
- package/.agents/prompts/001-copilot-tool-mapping-do/001-copilot-tool-mapping-do.md +116 -0
- package/.agents/prompts/001-copilot-tool-mapping-do/SUMMARY.md +72 -0
- package/.agents/prompts/001-copilot-tool-mapping-do/copilot-tool-mapping-do-output.md +83 -0
- package/.agents/prompts/001-release-management-do/001-release-management-do.md +161 -0
- package/.agents/prompts/001-release-management-do/SUMMARY.md +19 -0
- package/.agents/prompts/001-release-management-do/completed/001-release-management-do.md +161 -0
- package/.agents/prompts/002-pull-command-do/SUMMARY.md +28 -0
- package/.agents/prompts/002-pull-command-do/completed/002-pull-command-do.md +122 -0
- package/.agents/prompts/002-pull-command-do/pull-command-do-output.md +174 -0
- package/.agents/prompts/command_updates_prompt.md +69 -0
- package/.agents/prompts/current_prompt.md +8 -0
- package/.agents/prompts/refactor.prompt.md +57 -0
- package/.agents/skills/.gitkeep +0 -0
- package/.agents/superpowers-agent +355 -0
- package/.agents/superpowers-bootstrap.md +42 -0
- package/.agents/templates/AGENTS.md.template +40 -0
- package/.agents/templates/SUPERPOWERS.md.template +108 -0
- package/.agents/templates/TOOLS.md.template +15 -0
- package/.github/workflows/main.yaml +32 -0
- package/AGENTS.md +60 -0
- package/LICENSE +21 -0
- package/README.md +724 -0
- package/hooks/hooks.json +15 -0
- package/hooks/session-start.sh +27 -0
- package/package.json +51 -0
- package/skills/architecture/ABOUT.md +20 -0
- package/skills/architecture/preserving-productive-tensions/SKILL.md +146 -0
- package/skills/architecture/preserving-productive-tensions/skill.json +9 -0
- package/skills/collaboration/brainstorming/SKILL.md +166 -0
- package/skills/collaboration/brainstorming/skill.json +9 -0
- package/skills/collaboration/brainstorming/spec-document-reviewer-prompt.md +50 -0
- package/skills/collaboration/brainstorming/visual-companion.md +277 -0
- package/skills/collaboration/dispatching-parallel-agents/SKILL.md +174 -0
- package/skills/collaboration/dispatching-parallel-agents/skill.json +9 -0
- package/skills/collaboration/executing-plans/SKILL.md +130 -0
- package/skills/collaboration/executing-plans/skill.json +9 -0
- package/skills/collaboration/finishing-a-development-branch/SKILL.md +261 -0
- package/skills/collaboration/finishing-a-development-branch/skill.json +9 -0
- package/skills/collaboration/leveraging-cli-tools/SKILL.md +132 -0
- package/skills/collaboration/leveraging-cli-tools/skill.json +9 -0
- package/skills/collaboration/receiving-code-review/SKILL.md +233 -0
- package/skills/collaboration/receiving-code-review/skill.json +9 -0
- package/skills/collaboration/requesting-code-review/SKILL.md +110 -0
- package/skills/collaboration/requesting-code-review/code-reviewer.md +146 -0
- package/skills/collaboration/requesting-code-review/skill.json +12 -0
- package/skills/collaboration/subagent-driven-development/SKILL.md +255 -0
- package/skills/collaboration/subagent-driven-development/code-quality-reviewer-prompt.md +26 -0
- package/skills/collaboration/subagent-driven-development/implementer-prompt.md +113 -0
- package/skills/collaboration/subagent-driven-development/skill.json +15 -0
- package/skills/collaboration/subagent-driven-development/spec-reviewer-prompt.md +61 -0
- package/skills/collaboration/using-git-worktrees/SKILL.md +366 -0
- package/skills/collaboration/using-git-worktrees/skill.json +9 -0
- package/skills/collaboration/writing-plans/SKILL.md +121 -0
- package/skills/collaboration/writing-plans/plan-document-reviewer-prompt.md +52 -0
- package/skills/collaboration/writing-plans/skill.json +9 -0
- package/skills/debugging/defense-in-depth/SKILL.md +380 -0
- package/skills/debugging/defense-in-depth/skill.json +9 -0
- package/skills/debugging/root-cause-tracing/SKILL.md +361 -0
- package/skills/debugging/root-cause-tracing/find-polluter.sh +63 -0
- package/skills/debugging/root-cause-tracing/skill.json +12 -0
- package/skills/debugging/systematic-debugging/SKILL.md +299 -0
- package/skills/debugging/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/skills/debugging/systematic-debugging/condition-based-waiting.md +115 -0
- package/skills/debugging/systematic-debugging/defense-in-depth.md +122 -0
- package/skills/debugging/systematic-debugging/find-polluter.sh +63 -0
- package/skills/debugging/systematic-debugging/root-cause-tracing.md +169 -0
- package/skills/debugging/systematic-debugging/skill.json +9 -0
- package/skills/debugging/systematic-debugging/test-academic.md +14 -0
- package/skills/debugging/systematic-debugging/test-pressure-1.md +58 -0
- package/skills/debugging/systematic-debugging/test-pressure-2.md +68 -0
- package/skills/debugging/systematic-debugging/test-pressure-3.md +69 -0
- package/skills/debugging/verification-before-completion/SKILL.md +143 -0
- package/skills/debugging/verification-before-completion/skill.json +9 -0
- package/skills/finding-skills/SKILL.md +101 -0
- package/skills/finding-skills/skill.json +8 -0
- package/skills/meta/create-skill-json/SKILL.md +370 -0
- package/skills/meta/create-skill-json/skill.json +9 -0
- package/skills/meta/create-skill-json/test-scenarios.md +29 -0
- package/skills/meta/creating-prompts/SKILL.md +349 -0
- package/skills/meta/creating-prompts/examples/do-example.md +65 -0
- package/skills/meta/creating-prompts/examples/plan-example.md +75 -0
- package/skills/meta/creating-prompts/examples/refine-example.md +65 -0
- package/skills/meta/creating-prompts/examples/research-example.md +63 -0
- package/skills/meta/creating-prompts/scripts/get-next-number.sh +27 -0
- package/skills/meta/creating-prompts/skill.json +20 -0
- package/skills/meta/creating-prompts/templates/do-template.md +59 -0
- package/skills/meta/creating-prompts/templates/plan-template.md +58 -0
- package/skills/meta/creating-prompts/templates/refine-template.md +54 -0
- package/skills/meta/creating-prompts/templates/research-template.md +56 -0
- package/skills/meta/using-superpowers/SKILL.md +122 -0
- package/skills/meta/using-superpowers/skill.json +5 -0
- package/skills/meta/writing-prompts/SKILL.md +345 -0
- package/skills/meta/writing-prompts/skill.json +9 -0
- package/skills/problem-solving/ABOUT.md +40 -0
- package/skills/problem-solving/collision-zone-thinking/SKILL.md +188 -0
- package/skills/problem-solving/collision-zone-thinking/references/historical-examples.md +393 -0
- package/skills/problem-solving/collision-zone-thinking/skill.json +9 -0
- package/skills/problem-solving/inversion-exercise/SKILL.md +174 -0
- package/skills/problem-solving/inversion-exercise/skill.json +9 -0
- package/skills/problem-solving/meta-pattern-recognition/SKILL.md +116 -0
- package/skills/problem-solving/meta-pattern-recognition/skill.json +9 -0
- package/skills/problem-solving/scale-game/SKILL.md +222 -0
- package/skills/problem-solving/scale-game/skill.json +9 -0
- package/skills/problem-solving/simplification-cascades/SKILL.md +113 -0
- package/skills/problem-solving/simplification-cascades/skill.json +9 -0
- package/skills/problem-solving/when-stuck/SKILL.md +69 -0
- package/skills/problem-solving/when-stuck/skill.json +9 -0
- package/skills/research/ABOUT.md +20 -0
- package/skills/research/tracing-knowledge-lineages/SKILL.md +241 -0
- package/skills/research/tracing-knowledge-lineages/skill.json +9 -0
- package/skills/setup-skills/SKILL.md +47 -0
- package/skills/testing/condition-based-waiting/SKILL.md +359 -0
- package/skills/testing/condition-based-waiting/example.ts +158 -0
- package/skills/testing/condition-based-waiting/skill.json +12 -0
- package/skills/testing/test-driven-development/SKILL.md +434 -0
- package/skills/testing/test-driven-development/skill.json +9 -0
- package/skills/testing/testing-anti-patterns/SKILL.md +298 -0
- package/skills/testing/testing-anti-patterns/skill.json +9 -0
- package/skills/testing/verification-before-completion/SKILL.md +246 -0
- package/skills/testing/verification-before-completion/skill.json +10 -0
- package/skills/using-a-skill/SKILL.md +101 -0
- package/skills/using-a-skill/skill.json +8 -0
package/hooks/hooks.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# SessionStart hook for superpowers plugin
|
|
3
|
+
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
# Check if superpowers-agent is available
|
|
7
|
+
if ! command -v superpowers-agent &> /dev/null; then
|
|
8
|
+
echo '{"hookSpecificOutput": {"hookEventName": "SessionStart", "additionalContext": ""}}'
|
|
9
|
+
exit 0
|
|
10
|
+
fi
|
|
11
|
+
# Use superpowers-agent to load the using-a-skill content
|
|
12
|
+
using_superpowers_content=$(superpowers-agent use-skill using-superpowers 2>&1 || echo "Error: Unable to load using-superpowers. Run: superpowers-agent bootstrap")
|
|
13
|
+
|
|
14
|
+
# Escape outputs for JSON
|
|
15
|
+
using_superpowers_escaped=$(echo "$using_superpowers_content" | sed 's/\\/\\\\/g' | sed 's/"/\\"/g' | awk '{printf "%s\\n", $0}')
|
|
16
|
+
|
|
17
|
+
# Output context injection as JSON
|
|
18
|
+
cat <<EOF
|
|
19
|
+
{
|
|
20
|
+
"hookSpecificOutput": {
|
|
21
|
+
"hookEventName": "SessionStart",
|
|
22
|
+
"additionalContext": "<EXTREMELY_IMPORTANT>\nYou have superpowers.\n\n**Below is the full content of your 'using-superpowers' skill - your introduction to using skills.:**\n\n${using_superpowers_escaped}\n\n\n</EXTREMELY_IMPORTANT>"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
EOF
|
|
26
|
+
|
|
27
|
+
exit 0
|
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@complexthings/superpowers-agent",
|
|
3
|
+
"version": "8.1.0",
|
|
4
|
+
"description": "Superpowers agent CLI — skills system for AI coding agents",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"superpowers-agent": ".agents/superpowers-agent",
|
|
8
|
+
"superpowers": ".agents/superpowers-agent"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
".agents/superpowers-agent",
|
|
12
|
+
".agents/templates",
|
|
13
|
+
".agents/docs",
|
|
14
|
+
".agents/skills",
|
|
15
|
+
".agents/prompts",
|
|
16
|
+
".agents/plans",
|
|
17
|
+
".agents/superpowers-bootstrap.md",
|
|
18
|
+
"skills",
|
|
19
|
+
"hooks",
|
|
20
|
+
".github",
|
|
21
|
+
"AGENTS.md",
|
|
22
|
+
"README.md",
|
|
23
|
+
"LICENSE"
|
|
24
|
+
],
|
|
25
|
+
"engines": {
|
|
26
|
+
"node": "^20 || ^22 || ^24"
|
|
27
|
+
},
|
|
28
|
+
"scripts": {
|
|
29
|
+
"postinstall": "node .agents/superpowers-agent bootstrap --no-update 2>/dev/null || true"
|
|
30
|
+
},
|
|
31
|
+
"author": {
|
|
32
|
+
"name": "Greg Harvell",
|
|
33
|
+
"email": "greg.harvell@complexthings.com",
|
|
34
|
+
"url": "https://github.com/complexthings"
|
|
35
|
+
},
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "https://github.com/complexthings/superpowers.git"
|
|
39
|
+
},
|
|
40
|
+
"bugs": {
|
|
41
|
+
"url": "https://github.com/complexthings/superpowers/issues"
|
|
42
|
+
},
|
|
43
|
+
"license": "MIT",
|
|
44
|
+
"keywords": [
|
|
45
|
+
"superpowers",
|
|
46
|
+
"ai-agent",
|
|
47
|
+
"skills",
|
|
48
|
+
"cli",
|
|
49
|
+
"coding-agent"
|
|
50
|
+
]
|
|
51
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Architecture Skills - Attribution
|
|
2
|
+
|
|
3
|
+
This skill was derived from agent patterns in the [Amplifier](https://github.com/microsoft/amplifier) project.
|
|
4
|
+
|
|
5
|
+
**Source Repository:**
|
|
6
|
+
- Name: Amplifier
|
|
7
|
+
- URL: https://github.com/microsoft/amplifier
|
|
8
|
+
- Commit: 2adb63f858e7d760e188197c8e8d4c1ef721e2a6
|
|
9
|
+
- Date: 2025-10-10
|
|
10
|
+
|
|
11
|
+
## Skills Derived from Amplifier Agents
|
|
12
|
+
|
|
13
|
+
**From ambiguity-guardian agent:**
|
|
14
|
+
- preserving-productive-tensions - Recognizing when disagreements reveal valuable context, preserving multiple valid approaches instead of forcing premature resolution
|
|
15
|
+
|
|
16
|
+
## What Was Adapted
|
|
17
|
+
|
|
18
|
+
The ambiguity-guardian agent preserves productive contradictions and navigates uncertainty as valuable features of knowledge. This skill extracts the core pattern-recognition capability: distinguishing when tensions should be preserved (context-dependent trade-offs) vs resolved (clear technical superiority).
|
|
19
|
+
|
|
20
|
+
Adapted as scannable guide with symptom-based triggers ("going back and forth", "keep changing mind") and practical preservation patterns (configuration, parallel implementations, documented trade-offs).
|
|
@@ -0,0 +1,146 @@
|
|
|
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
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: brainstorming
|
|
3
|
+
description: "You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Brainstorming Ideas Into Designs
|
|
7
|
+
|
|
8
|
+
Help turn ideas into fully formed designs and specs through natural collaborative dialogue.
|
|
9
|
+
|
|
10
|
+
Start by understanding the current project context, then ask questions one at a time to refine the idea. Once you understand what you're building, present the design and get user approval.
|
|
11
|
+
|
|
12
|
+
<HARD-GATE>
|
|
13
|
+
Do NOT invoke any implementation skill, write any code, scaffold any project, or take any implementation action until you have presented a design and the user has approved it. This applies to EVERY project regardless of perceived simplicity.
|
|
14
|
+
</HARD-GATE>
|
|
15
|
+
|
|
16
|
+
## Anti-Pattern: "This Is Too Simple To Need A Design"
|
|
17
|
+
|
|
18
|
+
Every project goes through this process. A todo list, a single-function utility, a config change — all of them. "Simple" projects are where unexamined assumptions cause the most wasted work. The design can be short (a few sentences for truly simple projects), but you MUST present it and get approval.
|
|
19
|
+
|
|
20
|
+
## Checklist
|
|
21
|
+
|
|
22
|
+
You MUST create a task for each of these items and complete them in order:
|
|
23
|
+
|
|
24
|
+
1. **Explore project context** — check files, docs, recent commits
|
|
25
|
+
2. **Offer visual companion** (if topic will involve visual questions) — this is its own message, not combined with a clarifying question. See the Visual Companion section below.
|
|
26
|
+
3. **Ask clarifying questions** — one at a time, understand purpose/constraints/success criteria
|
|
27
|
+
4. **Propose 2-3 approaches** — with trade-offs and your recommendation
|
|
28
|
+
5. **Present design** — in sections scaled to their complexity, get user approval after each section
|
|
29
|
+
6. **Write design doc** — save to `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md` and commit
|
|
30
|
+
7. **Spec review loop** — dispatch spec-document-reviewer subagent with precisely crafted review context (never your session history); fix issues and re-dispatch until approved (max 5 iterations, then surface to human)
|
|
31
|
+
8. **User reviews written spec** — ask user to review the spec file before proceeding
|
|
32
|
+
9. **Transition to implementation** — invoke writing-plans skill to create implementation plan
|
|
33
|
+
|
|
34
|
+
## Process Flow
|
|
35
|
+
|
|
36
|
+
```dot
|
|
37
|
+
digraph brainstorming {
|
|
38
|
+
"Explore project context" [shape=box];
|
|
39
|
+
"Visual questions ahead?" [shape=diamond];
|
|
40
|
+
"Offer Visual Companion\n(own message, no other content)" [shape=box];
|
|
41
|
+
"Ask clarifying questions" [shape=box];
|
|
42
|
+
"Propose 2-3 approaches" [shape=box];
|
|
43
|
+
"Present design sections" [shape=box];
|
|
44
|
+
"User approves design?" [shape=diamond];
|
|
45
|
+
"Write design doc" [shape=box];
|
|
46
|
+
"Spec review loop" [shape=box];
|
|
47
|
+
"Spec review passed?" [shape=diamond];
|
|
48
|
+
"User reviews spec?" [shape=diamond];
|
|
49
|
+
"Invoke writing-plans skill" [shape=doublecircle];
|
|
50
|
+
|
|
51
|
+
"Explore project context" -> "Visual questions ahead?";
|
|
52
|
+
"Visual questions ahead?" -> "Offer Visual Companion\n(own message, no other content)" [label="yes"];
|
|
53
|
+
"Visual questions ahead?" -> "Ask clarifying questions" [label="no"];
|
|
54
|
+
"Offer Visual Companion\n(own message, no other content)" -> "Ask clarifying questions";
|
|
55
|
+
"Ask clarifying questions" -> "Propose 2-3 approaches";
|
|
56
|
+
"Propose 2-3 approaches" -> "Present design sections";
|
|
57
|
+
"Present design sections" -> "User approves design?";
|
|
58
|
+
"User approves design?" -> "Present design sections" [label="no, revise"];
|
|
59
|
+
"User approves design?" -> "Write design doc" [label="yes"];
|
|
60
|
+
"Write design doc" -> "Spec review loop";
|
|
61
|
+
"Spec review loop" -> "Spec review passed?";
|
|
62
|
+
"Spec review passed?" -> "Spec review loop" [label="issues found,\nfix and re-dispatch"];
|
|
63
|
+
"Spec review passed?" -> "User reviews spec?" [label="approved"];
|
|
64
|
+
"User reviews spec?" -> "Write design doc" [label="changes requested"];
|
|
65
|
+
"User reviews spec?" -> "Invoke writing-plans skill" [label="approved"];
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**The terminal state is invoking writing-plans.** Do NOT invoke frontend-design, mcp-builder, or any other implementation skill. The ONLY skill you invoke after brainstorming is writing-plans.
|
|
70
|
+
|
|
71
|
+
## The Process
|
|
72
|
+
|
|
73
|
+
**Understanding the idea:**
|
|
74
|
+
|
|
75
|
+
- Check out the current project state first (files, docs, recent commits)
|
|
76
|
+
- Before asking detailed questions, assess scope: if the request describes multiple independent subsystems (e.g., "build a platform with chat, file storage, billing, and analytics"), flag this immediately. Don't spend questions refining details of a project that needs to be decomposed first.
|
|
77
|
+
- If the project is too large for a single spec, help the user decompose into sub-projects: what are the independent pieces, how do they relate, what order should they be built? Then brainstorm the first sub-project through the normal design flow. Each sub-project gets its own spec → plan → implementation cycle.
|
|
78
|
+
- For appropriately-scoped projects, ask questions one at a time to refine the idea
|
|
79
|
+
- Prefer multiple choice questions when possible, but open-ended is fine too
|
|
80
|
+
- Only one question per message — if a topic needs more exploration, break it into multiple questions
|
|
81
|
+
- Focus on understanding: purpose, constraints, success criteria
|
|
82
|
+
|
|
83
|
+
**Exploring approaches:**
|
|
84
|
+
|
|
85
|
+
- Propose 2-3 different approaches with trade-offs
|
|
86
|
+
- Present options conversationally with your recommendation and reasoning
|
|
87
|
+
- Lead with your recommended option and explain why
|
|
88
|
+
|
|
89
|
+
**Presenting the design:**
|
|
90
|
+
|
|
91
|
+
- Once you believe you understand what you're building, present the design
|
|
92
|
+
- Scale each section to its complexity: a few sentences if straightforward, up to 200-300 words if nuanced
|
|
93
|
+
- Ask after each section whether it looks right so far
|
|
94
|
+
- Cover: architecture, components, data flow, error handling, testing
|
|
95
|
+
- Be ready to go back and clarify if something doesn't make sense
|
|
96
|
+
|
|
97
|
+
**Design for isolation and clarity:**
|
|
98
|
+
|
|
99
|
+
- Break the system into smaller units that each have one clear purpose, communicate through well-defined interfaces, and can be understood and tested independently
|
|
100
|
+
- For each unit, you should be able to answer: what does it do, how do you use it, and what does it depend on?
|
|
101
|
+
- Can someone understand what a unit does without reading its internals? Can you change the internals without breaking consumers? If not, the boundaries need work.
|
|
102
|
+
- Smaller, well-bounded units are also easier to work with — you reason better about code you can hold in context at once, and edits are more reliable when files are focused. When a file grows large, that's often a signal that it's doing too much.
|
|
103
|
+
|
|
104
|
+
**Working in existing codebases:**
|
|
105
|
+
|
|
106
|
+
- Explore the current structure before proposing changes. Follow existing patterns.
|
|
107
|
+
- Where existing code has problems that affect the work (e.g., a file that's grown too large, unclear boundaries, tangled responsibilities), include targeted improvements as part of the design — the way a good developer improves code they're working in.
|
|
108
|
+
- Don't propose unrelated refactoring. Stay focused on what serves the current goal.
|
|
109
|
+
|
|
110
|
+
## After the Design
|
|
111
|
+
|
|
112
|
+
**Documentation:**
|
|
113
|
+
|
|
114
|
+
- Write the validated design (spec) to `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md`
|
|
115
|
+
- (User preferences for spec location override this default)
|
|
116
|
+
- Use elements-of-style:writing-clearly-and-concisely skill if available
|
|
117
|
+
- Commit the design document to git
|
|
118
|
+
|
|
119
|
+
**Spec Review Loop:**
|
|
120
|
+
|
|
121
|
+
After writing the spec document:
|
|
122
|
+
|
|
123
|
+
1. Dispatch spec-document-reviewer subagent (see `spec-document-reviewer-prompt.md`)
|
|
124
|
+
2. If issues found: fix, re-dispatch, repeat until approved
|
|
125
|
+
3. If loop exceeds 5 iterations, surface to human for guidance
|
|
126
|
+
|
|
127
|
+
**User Review Gate:**
|
|
128
|
+
|
|
129
|
+
After the spec review loop passes, ask the user to review the written spec before proceeding:
|
|
130
|
+
|
|
131
|
+
> "Spec written and committed to `<path>`. Please review it and let me know if you want to make any changes before we start writing out the implementation plan."
|
|
132
|
+
|
|
133
|
+
Wait for the user's response. If they request changes, make them and re-run the spec review loop. Only proceed once the user approves.
|
|
134
|
+
|
|
135
|
+
**Implementation:**
|
|
136
|
+
|
|
137
|
+
- Invoke the writing-plans skill to create a detailed implementation plan
|
|
138
|
+
- Do NOT invoke any other skill. writing-plans is the next step.
|
|
139
|
+
|
|
140
|
+
## Key Principles
|
|
141
|
+
|
|
142
|
+
- **One question at a time** — Don't overwhelm with multiple questions
|
|
143
|
+
- **Multiple choice preferred** — Easier to answer than open-ended when possible
|
|
144
|
+
- **YAGNI ruthlessly** — Remove unnecessary features from all designs
|
|
145
|
+
- **Explore alternatives** — Always propose 2-3 approaches before settling
|
|
146
|
+
- **Incremental validation** — Present design, get approval before moving on
|
|
147
|
+
- **Be flexible** — Go back and clarify when something doesn't make sense
|
|
148
|
+
|
|
149
|
+
## Visual Companion
|
|
150
|
+
|
|
151
|
+
A browser-based companion for showing mockups, diagrams, and visual options during brainstorming. Available as a tool — not a mode. Accepting the companion means it's available for questions that benefit from visual treatment; it does NOT mean every question goes through the browser.
|
|
152
|
+
|
|
153
|
+
**Offering the companion:** When you anticipate that upcoming questions will involve visual content (mockups, layouts, diagrams), offer it once for consent as its own standalone message:
|
|
154
|
+
|
|
155
|
+
> "Some of what we're working on might be easier to explain if I can show it to you in a web browser. I can put together mockups, diagrams, comparisons, and other visuals as we go. This feature is still new and can be token-intensive. Want to try it? (Requires opening a local URL)"
|
|
156
|
+
|
|
157
|
+
**This offer MUST be its own message.** Do not combine it with clarifying questions, context summaries, or any other content. Wait for the user's response before continuing. If they decline, proceed with text-only brainstorming.
|
|
158
|
+
|
|
159
|
+
**Per-question decision:** Even after the user accepts, decide FOR EACH QUESTION whether to use the browser or the terminal. The test: **would the user understand this better by seeing it than reading it?**
|
|
160
|
+
|
|
161
|
+
- **Use the browser** for content that IS visual — mockups, wireframes, layout comparisons, architecture diagrams, side-by-side visual designs
|
|
162
|
+
- **Use the terminal** for content that is text — requirements questions, conceptual choices, tradeoff lists, A/B/C/D text options, scope decisions
|
|
163
|
+
|
|
164
|
+
A question about a UI topic is not automatically a visual question. "What does personality mean in this context?" is a conceptual question — use the terminal. "Which wizard layout works better?" is a visual question — use the browser.
|
|
165
|
+
|
|
166
|
+
If the user agrees to the companion, read the detailed guide before proceeding: `visual-companion.md`
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|