superpowers-mcp 4.3.1 → 5.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.
Files changed (31) hide show
  1. package/README.md +22 -0
  2. package/README.zh-TW.md +22 -0
  3. package/out/server.js +12 -12
  4. package/package.json +2 -2
  5. package/skills/brainstorming/SKILL.md +79 -11
  6. package/skills/brainstorming/scripts/frame-template.html +214 -0
  7. package/skills/brainstorming/scripts/helper.js +88 -0
  8. package/skills/brainstorming/scripts/server.cjs +354 -0
  9. package/skills/brainstorming/scripts/start-server.sh +148 -0
  10. package/skills/brainstorming/scripts/stop-server.sh +56 -0
  11. package/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
  12. package/skills/brainstorming/visual-companion.md +287 -0
  13. package/skills/dispatching-parallel-agents/SKILL.md +2 -0
  14. package/skills/executing-plans/SKILL.md +7 -21
  15. package/skills/finishing-a-development-branch/SKILL.md +93 -42
  16. package/skills/requesting-code-review/SKILL.md +8 -10
  17. package/skills/requesting-code-review/code-reviewer.md +107 -85
  18. package/skills/subagent-driven-development/SKILL.md +39 -2
  19. package/skills/subagent-driven-development/code-quality-reviewer-prompt.md +8 -3
  20. package/skills/subagent-driven-development/implementer-prompt.md +36 -1
  21. package/skills/systematic-debugging/CREATION-LOG.md +1 -1
  22. package/skills/systematic-debugging/root-cause-tracing.md +1 -1
  23. package/skills/using-git-worktrees/SKILL.md +95 -98
  24. package/skills/using-superpowers/SKILL.md +22 -0
  25. package/skills/using-superpowers/references/codex-tools.md +59 -0
  26. package/skills/using-superpowers/references/copilot-tools.md +42 -0
  27. package/skills/using-superpowers/references/gemini-tools.md +51 -0
  28. package/skills/writing-plans/SKILL.md +54 -18
  29. package/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
  30. package/skills/writing-skills/SKILL.md +2 -2
  31. package/skills/writing-skills/anthropic-best-practices.md +2 -2
@@ -1,111 +1,133 @@
1
- # Code Review Agent
1
+ # Code Reviewer Prompt Template
2
2
 
3
- You are reviewing code changes for production readiness.
3
+ Use this template when dispatching a code reviewer subagent.
4
4
 
5
- **Your task:**
6
- 1. Review {WHAT_WAS_IMPLEMENTED}
7
- 2. Compare against {PLAN_OR_REQUIREMENTS}
8
- 3. Check code quality, architecture, testing
9
- 4. Categorize issues by severity
10
- 5. Assess production readiness
5
+ **Purpose:** Review completed work against requirements and code quality standards before it cascades into more work.
11
6
 
12
- ## What Was Implemented
7
+ ```
8
+ Task tool (general-purpose):
9
+ description: "Review code changes"
10
+ prompt: |
11
+ You are a Senior Code Reviewer with expertise in software architecture,
12
+ design patterns, and best practices. Your job is to review completed work
13
+ against its plan or requirements and identify issues before they cascade.
13
14
 
14
- {DESCRIPTION}
15
+ ## What Was Implemented
15
16
 
16
- ## Requirements/Plan
17
+ {DESCRIPTION}
17
18
 
18
- {PLAN_REFERENCE}
19
+ ## Requirements / Plan
19
20
 
20
- ## Git Range to Review
21
+ {PLAN_OR_REQUIREMENTS}
21
22
 
22
- **Base:** {BASE_SHA}
23
- **Head:** {HEAD_SHA}
23
+ ## Git Range to Review
24
24
 
25
- ```bash
26
- git diff --stat {BASE_SHA}..{HEAD_SHA}
27
- git diff {BASE_SHA}..{HEAD_SHA}
28
- ```
25
+ **Base:** {BASE_SHA}
26
+ **Head:** {HEAD_SHA}
29
27
 
30
- ## Review Checklist
31
-
32
- **Code Quality:**
33
- - Clean separation of concerns?
34
- - Proper error handling?
35
- - Type safety (if applicable)?
36
- - DRY principle followed?
37
- - Edge cases handled?
38
-
39
- **Architecture:**
40
- - Sound design decisions?
41
- - Scalability considerations?
42
- - Performance implications?
43
- - Security concerns?
44
-
45
- **Testing:**
46
- - Tests actually test logic (not mocks)?
47
- - Edge cases covered?
48
- - Integration tests where needed?
49
- - All tests passing?
50
-
51
- **Requirements:**
52
- - All plan requirements met?
53
- - Implementation matches spec?
54
- - No scope creep?
55
- - Breaking changes documented?
56
-
57
- **Production Readiness:**
58
- - Migration strategy (if schema changes)?
59
- - Backward compatibility considered?
60
- - Documentation complete?
61
- - No obvious bugs?
62
-
63
- ## Output Format
28
+ ```bash
29
+ git diff --stat {BASE_SHA}..{HEAD_SHA}
30
+ git diff {BASE_SHA}..{HEAD_SHA}
31
+ ```
64
32
 
65
- ### Strengths
66
- [What's well done? Be specific.]
33
+ ## What to Check
67
34
 
68
- ### Issues
35
+ **Plan alignment:**
36
+ - Does the implementation match the plan / requirements?
37
+ - Are deviations justified improvements, or problematic departures?
38
+ - Is all planned functionality present?
69
39
 
70
- #### Critical (Must Fix)
71
- [Bugs, security issues, data loss risks, broken functionality]
40
+ **Code quality:**
41
+ - Clean separation of concerns?
42
+ - Proper error handling?
43
+ - Type safety where applicable?
44
+ - DRY without premature abstraction?
45
+ - Edge cases handled?
72
46
 
73
- #### Important (Should Fix)
74
- [Architecture problems, missing features, poor error handling, test gaps]
47
+ **Architecture:**
48
+ - Sound design decisions?
49
+ - Reasonable scalability and performance?
50
+ - Security concerns?
51
+ - Integrates cleanly with surrounding code?
75
52
 
76
- #### Minor (Nice to Have)
77
- [Code style, optimization opportunities, documentation improvements]
53
+ **Testing:**
54
+ - Tests verify real behavior, not mocks?
55
+ - Edge cases covered?
56
+ - Integration tests where they matter?
57
+ - All tests passing?
78
58
 
79
- **For each issue:**
80
- - File:line reference
81
- - What's wrong
82
- - Why it matters
83
- - How to fix (if not obvious)
59
+ **Production readiness:**
60
+ - Migration strategy if schema changed?
61
+ - Backward compatibility considered?
62
+ - Documentation complete?
63
+ - No obvious bugs?
84
64
 
85
- ### Recommendations
86
- [Improvements for code quality, architecture, or process]
65
+ ## Calibration
87
66
 
88
- ### Assessment
67
+ Categorize issues by actual severity. Not everything is Critical.
68
+ Acknowledge what was done well before listing issues — accurate praise
69
+ helps the implementer trust the rest of the feedback.
70
+
71
+ If you find significant deviations from the plan, flag them specifically
72
+ so the implementer can confirm whether the deviation was intentional.
73
+ If you find issues with the plan itself rather than the implementation,
74
+ say so.
75
+
76
+ ## Output Format
77
+
78
+ ### Strengths
79
+ [What's well done? Be specific.]
80
+
81
+ ### Issues
89
82
 
90
- **Ready to merge?** [Yes/No/With fixes]
83
+ #### Critical (Must Fix)
84
+ [Bugs, security issues, data loss risks, broken functionality]
91
85
 
92
- **Reasoning:** [Technical assessment in 1-2 sentences]
86
+ #### Important (Should Fix)
87
+ [Architecture problems, missing features, poor error handling, test gaps]
93
88
 
94
- ## Critical Rules
89
+ #### Minor (Nice to Have)
90
+ [Code style, optimization opportunities, documentation polish]
91
+
92
+ For each issue:
93
+ - File:line reference
94
+ - What's wrong
95
+ - Why it matters
96
+ - How to fix (if not obvious)
97
+
98
+ ### Recommendations
99
+ [Improvements for code quality, architecture, or process]
100
+
101
+ ### Assessment
102
+
103
+ **Ready to merge?** [Yes | No | With fixes]
104
+
105
+ **Reasoning:** [1-2 sentence technical assessment]
106
+
107
+ ## Critical Rules
108
+
109
+ **DO:**
110
+ - Categorize by actual severity
111
+ - Be specific (file:line, not vague)
112
+ - Explain WHY each issue matters
113
+ - Acknowledge strengths
114
+ - Give a clear verdict
115
+
116
+ **DON'T:**
117
+ - Say "looks good" without checking
118
+ - Mark nitpicks as Critical
119
+ - Give feedback on code you didn't actually read
120
+ - Be vague ("improve error handling")
121
+ - Avoid giving a clear verdict
122
+ ```
95
123
 
96
- **DO:**
97
- - Categorize by actual severity (not everything is Critical)
98
- - Be specific (file:line, not vague)
99
- - Explain WHY issues matter
100
- - Acknowledge strengths
101
- - Give clear verdict
124
+ **Placeholders:**
125
+ - `{DESCRIPTION}` — brief summary of what was built
126
+ - `{PLAN_OR_REQUIREMENTS}` — what it should do (plan file path, task text, or requirements)
127
+ - `{BASE_SHA}` — starting commit
128
+ - `{HEAD_SHA}` — ending commit
102
129
 
103
- **DON'T:**
104
- - Say "looks good" without checking
105
- - Mark nitpicks as Critical
106
- - Give feedback on code you didn't review
107
- - Be vague ("improve error handling")
108
- - Avoid giving a clear verdict
130
+ **Reviewer returns:** Strengths, Issues (Critical / Important / Minor), Recommendations, Assessment
109
131
 
110
132
  ## Example Output
111
133
 
@@ -7,8 +7,12 @@ description: Use when executing implementation plans with independent tasks in t
7
7
 
8
8
  Execute plan by dispatching fresh subagent per task, with two-stage review after each: spec compliance review first, then code quality review.
9
9
 
10
+ **Why subagents:** 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.
11
+
10
12
  **Core principle:** Fresh subagent per task + two-stage review (spec then quality) = high quality, fast iteration
11
13
 
14
+ **Continuous execution:** Do not pause to check in with your human partner between tasks. Execute all tasks from the plan without stopping. The only reasons to stop are: BLOCKED status you cannot resolve, ambiguity that genuinely prevents progress, or all tasks complete. "Should I continue?" prompts and progress summaries waste their time — they asked you to execute the plan, so execute it.
15
+
12
16
  ## When to Use
13
17
 
14
18
  ```dot
@@ -82,6 +86,39 @@ digraph process {
82
86
  }
83
87
  ```
84
88
 
89
+ ## Model Selection
90
+
91
+ Use the least powerful model that can handle each role to conserve cost and increase speed.
92
+
93
+ **Mechanical implementation tasks** (isolated functions, clear specs, 1-2 files): use a fast, cheap model. Most implementation tasks are mechanical when the plan is well-specified.
94
+
95
+ **Integration and judgment tasks** (multi-file coordination, pattern matching, debugging): use a standard model.
96
+
97
+ **Architecture, design, and review tasks**: use the most capable available model.
98
+
99
+ **Task complexity signals:**
100
+ - Touches 1-2 files with a complete spec → cheap model
101
+ - Touches multiple files with integration concerns → standard model
102
+ - Requires design judgment or broad codebase understanding → most capable model
103
+
104
+ ## Handling Implementer Status
105
+
106
+ Implementer subagents report one of four statuses. Handle each appropriately:
107
+
108
+ **DONE:** Proceed to spec compliance review.
109
+
110
+ **DONE_WITH_CONCERNS:** The implementer completed the work but flagged doubts. Read the concerns before proceeding. If the concerns are about correctness or scope, address them before review. If they're observations (e.g., "this file is getting large"), note them and proceed to review.
111
+
112
+ **NEEDS_CONTEXT:** The implementer needs information that wasn't provided. Provide the missing context and re-dispatch.
113
+
114
+ **BLOCKED:** The implementer cannot complete the task. Assess the blocker:
115
+ 1. If it's a context problem, provide more context and re-dispatch with the same model
116
+ 2. If the task requires more reasoning, re-dispatch with a more capable model
117
+ 3. If the task is too large, break it into smaller pieces
118
+ 4. If the plan itself is wrong, escalate to the human
119
+
120
+ **Never** ignore an escalation or force the same model to retry without changes. If the implementer said it's stuck, something needs to change.
121
+
85
122
  ## Prompt Templates
86
123
 
87
124
  - `./implementer-prompt.md` - Dispatch implementer subagent
@@ -93,7 +130,7 @@ digraph process {
93
130
  ```
94
131
  You: I'm using Subagent-Driven Development to execute this plan.
95
132
 
96
- [Read plan file once: docs/plans/feature-plan.md]
133
+ [Read plan file once: docs/superpowers/plans/feature-plan.md]
97
134
  [Extract all 5 tasks with full text and context]
98
135
  [Create TodoWrite with all tasks]
99
136
 
@@ -230,7 +267,7 @@ Done!
230
267
  ## Integration
231
268
 
232
269
  **Required workflow skills:**
233
- - **superpowers:using-git-worktrees** - REQUIRED: Set up isolated workspace before starting
270
+ - **superpowers:using-git-worktrees** - Ensures isolated workspace (creates one or verifies existing)
234
271
  - **superpowers:writing-plans** - Creates the plan this skill executes
235
272
  - **superpowers:requesting-code-review** - Code review template for reviewer subagents
236
273
  - **superpowers:finishing-a-development-branch** - Complete development after all tasks
@@ -7,14 +7,19 @@ Use this template when dispatching a code quality reviewer subagent.
7
7
  **Only dispatch after spec compliance review passes.**
8
8
 
9
9
  ```
10
- Task tool (superpowers:code-reviewer):
10
+ Task tool (general-purpose):
11
11
  Use template at requesting-code-review/code-reviewer.md
12
12
 
13
- WHAT_WAS_IMPLEMENTED: [from implementer's report]
13
+ DESCRIPTION: [task summary, from implementer's report]
14
14
  PLAN_OR_REQUIREMENTS: Task N from [plan-file]
15
15
  BASE_SHA: [commit before task]
16
16
  HEAD_SHA: [current commit]
17
- DESCRIPTION: [task summary]
18
17
  ```
19
18
 
19
+ **In addition to standard code quality concerns, the reviewer should check:**
20
+ - Does each file have one clear responsibility with a well-defined interface?
21
+ - Are units decomposed so they can be understood and tested independently?
22
+ - Is the implementation following the file structure from the plan?
23
+ - Did this implementation create new files that are already large, or significantly grow existing files? (Don't flag pre-existing file sizes — focus on what this change contributed.)
24
+
20
25
  **Code reviewer returns:** Strengths, Issues (Critical/Important/Minor), Assessment
@@ -41,6 +41,36 @@ Task tool (general-purpose):
41
41
  **While you work:** If you encounter something unexpected or unclear, **ask questions**.
42
42
  It's always OK to pause and clarify. Don't guess or make assumptions.
43
43
 
44
+ ## Code Organization
45
+
46
+ You reason best about code you can hold in context at once, and your edits are more
47
+ reliable when files are focused. Keep this in mind:
48
+ - Follow the file structure defined in the plan
49
+ - Each file should have one clear responsibility with a well-defined interface
50
+ - If a file you're creating is growing beyond the plan's intent, stop and report
51
+ it as DONE_WITH_CONCERNS — don't split files on your own without plan guidance
52
+ - If an existing file you're modifying is already large or tangled, work carefully
53
+ and note it as a concern in your report
54
+ - In existing codebases, follow established patterns. Improve code you're touching
55
+ the way a good developer would, but don't restructure things outside your task.
56
+
57
+ ## When You're in Over Your Head
58
+
59
+ It is always OK to stop and say "this is too hard for me." Bad work is worse than
60
+ no work. You will not be penalized for escalating.
61
+
62
+ **STOP and escalate when:**
63
+ - The task requires architectural decisions with multiple valid approaches
64
+ - You need to understand code beyond what was provided and can't find clarity
65
+ - You feel uncertain about whether your approach is correct
66
+ - The task involves restructuring existing code in ways the plan didn't anticipate
67
+ - You've been reading file after file trying to understand the system without progress
68
+
69
+ **How to escalate:** Report back with status BLOCKED or NEEDS_CONTEXT. Describe
70
+ specifically what you're stuck on, what you've tried, and what kind of help you need.
71
+ The controller can provide more context, re-dispatch with a more capable model,
72
+ or break the task into smaller pieces.
73
+
44
74
  ## Before Reporting Back: Self-Review
45
75
 
46
76
  Review your work with fresh eyes. Ask yourself:
@@ -70,9 +100,14 @@ Task tool (general-purpose):
70
100
  ## Report Format
71
101
 
72
102
  When done, report:
73
- - What you implemented
103
+ - **Status:** DONE | DONE_WITH_CONCERNS | BLOCKED | NEEDS_CONTEXT
104
+ - What you implemented (or what you attempted, if blocked)
74
105
  - What you tested and test results
75
106
  - Files changed
76
107
  - Self-review findings (if any)
77
108
  - Any issues or concerns
109
+
110
+ Use DONE_WITH_CONCERNS if you completed the work but have doubts about correctness.
111
+ Use BLOCKED if you cannot complete the task. Use NEEDS_CONTEXT if you need
112
+ information that wasn't provided. Never silently produce work you're unsure about.
78
113
  ```
@@ -4,7 +4,7 @@ Reference example of extracting, structuring, and bulletproofing a critical skil
4
4
 
5
5
  ## Source Material
6
6
 
7
- Extracted debugging framework from `/Users/jesse/.claude/CLAUDE.md`:
7
+ Extracted debugging framework from `~/.claude/CLAUDE.md`:
8
8
  - 4-phase systematic process (Investigation → Pattern Analysis → Hypothesis → Implementation)
9
9
  - Core mandate: ALWAYS find root cause, NEVER fix symptoms
10
10
  - Rules designed to resist time pressure and rationalization
@@ -33,7 +33,7 @@ digraph when_to_use {
33
33
 
34
34
  ### 1. Observe the Symptom
35
35
  ```
36
- Error: git init failed in /Users/jesse/project/packages/core
36
+ Error: git init failed in ~/project/packages/core
37
37
  ```
38
38
 
39
39
  ### 2. Find Immediate Cause