@nst173/superpowers-ccg 1.3.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 (97) hide show
  1. package/.agent/skills/brainstorming/SKILL.md +26 -0
  2. package/.agent/skills/coordinating-multi-model-work/SKILL.md +29 -0
  3. package/.agent/skills/executing-plans/SKILL.md +27 -0
  4. package/.agent/skills/using-superpowers/SKILL.md +29 -0
  5. package/.agent/skills/verifying-before-completion/SKILL.md +20 -0
  6. package/.agent/skills/writing-plans/SKILL.md +29 -0
  7. package/.cursor/agents/code-reviewer.md +22 -0
  8. package/.cursor/commands/brainstorm.md +11 -0
  9. package/.cursor/commands/execute-plan.md +12 -0
  10. package/.cursor/commands/write-plan.md +11 -0
  11. package/.cursor/hook-scripts/after-file-edit.mjs +3 -0
  12. package/.cursor/hook-scripts/before-shell-execution.mjs +3 -0
  13. package/.cursor/hook-scripts/session-end.mjs +3 -0
  14. package/.cursor/hooks.json +21 -0
  15. package/.cursor/mcp.json +20 -0
  16. package/.cursor/rules/checkpoint-protocol.mdc +11 -0
  17. package/.cursor/rules/orchestrator-routing.mdc +12 -0
  18. package/.cursor/rules/token-discipline.mdc +12 -0
  19. package/.cursor/skills/brainstorming/SKILL.md +26 -0
  20. package/.cursor/skills/coordinating-multi-model-work/SKILL.md +29 -0
  21. package/.cursor/skills/executing-plans/SKILL.md +27 -0
  22. package/.cursor/skills/using-superpowers/SKILL.md +29 -0
  23. package/.cursor/skills/verifying-before-completion/SKILL.md +20 -0
  24. package/.cursor/skills/writing-plans/SKILL.md +29 -0
  25. package/AGENTS.md +23 -0
  26. package/CLAUDE.md +78 -0
  27. package/GEMINI.md +27 -0
  28. package/LICENSE +21 -0
  29. package/README.md +171 -0
  30. package/agents/code-reviewer.md +54 -0
  31. package/cli/superpowers-ccg.mjs +8 -0
  32. package/commands/brainstorm.md +6 -0
  33. package/commands/execute-plan.md +6 -0
  34. package/commands/write-plan.md +6 -0
  35. package/config/antigravity/mcp_config.example.json +26 -0
  36. package/hooks/hooks.json +37 -0
  37. package/hooks/pre-tool-use-task.sh +4 -0
  38. package/hooks/run-hook.cmd +19 -0
  39. package/hooks/session-start.sh +72 -0
  40. package/hooks/user-prompt-submit.sh +31 -0
  41. package/package.json +56 -0
  42. package/skills/EVALUATION.md +201 -0
  43. package/skills/brainstorming/SKILL.md +120 -0
  44. package/skills/coordinating-multi-model-work/GATE.md +36 -0
  45. package/skills/coordinating-multi-model-work/INTEGRATION.md +51 -0
  46. package/skills/coordinating-multi-model-work/SKILL.md +51 -0
  47. package/skills/coordinating-multi-model-work/checkpoints.md +31 -0
  48. package/skills/coordinating-multi-model-work/cross-validation.md +37 -0
  49. package/skills/coordinating-multi-model-work/prompts/codex-base.md +40 -0
  50. package/skills/coordinating-multi-model-work/prompts/gemini-base.md +41 -0
  51. package/skills/coordinating-multi-model-work/review-chain.md +25 -0
  52. package/skills/coordinating-multi-model-work/routing-decision.md +50 -0
  53. package/skills/debugging-systematically/CREATION-LOG.md +119 -0
  54. package/skills/debugging-systematically/SKILL.md +325 -0
  55. package/skills/debugging-systematically/condition-based-waiting-example.ts +158 -0
  56. package/skills/debugging-systematically/condition-based-waiting.md +115 -0
  57. package/skills/debugging-systematically/defense-in-depth.md +122 -0
  58. package/skills/debugging-systematically/find-polluter.sh +63 -0
  59. package/skills/debugging-systematically/root-cause-tracing.md +169 -0
  60. package/skills/debugging-systematically/test-academic.md +14 -0
  61. package/skills/debugging-systematically/test-pressure-1.md +58 -0
  62. package/skills/debugging-systematically/test-pressure-2.md +68 -0
  63. package/skills/debugging-systematically/test-pressure-3.md +69 -0
  64. package/skills/developing-with-subagents/SKILL.md +51 -0
  65. package/skills/developing-with-subagents/code-quality-reviewer-prompt.md +30 -0
  66. package/skills/developing-with-subagents/implementer-prompt.md +41 -0
  67. package/skills/developing-with-subagents/spec-reviewer-prompt.md +25 -0
  68. package/skills/dispatching-parallel-agents/SKILL.md +195 -0
  69. package/skills/executing-plans/SKILL.md +67 -0
  70. package/skills/finishing-development-branches/SKILL.md +208 -0
  71. package/skills/practicing-test-driven-development/SKILL.md +346 -0
  72. package/skills/practicing-test-driven-development/testing-anti-patterns.md +299 -0
  73. package/skills/receiving-code-review/SKILL.md +221 -0
  74. package/skills/requesting-code-review/SKILL.md +127 -0
  75. package/skills/requesting-code-review/code-reviewer.md +146 -0
  76. package/skills/shared/multi-model-integration-section.md +32 -0
  77. package/skills/shared/protocol-threshold.md +46 -0
  78. package/skills/shared/supplementary-tools.md +132 -0
  79. package/skills/shared/task-format-reference.md +83 -0
  80. package/skills/using-git-worktrees/SKILL.md +225 -0
  81. package/skills/using-superpowers/SKILL.md +101 -0
  82. package/skills/verifying-before-completion/SKILL.md +159 -0
  83. package/skills/writing-plans/SKILL.md +55 -0
  84. package/skills/writing-skills/CHECKLIST.md +92 -0
  85. package/skills/writing-skills/SKILL.md +111 -0
  86. package/skills/writing-skills/STRUCTURE.md +208 -0
  87. package/skills/writing-skills/TESTING.md +155 -0
  88. package/skills/writing-skills/anthropic-best-practices.md +1150 -0
  89. package/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
  90. package/skills/writing-skills/graphviz-conventions.dot +172 -0
  91. package/skills/writing-skills/persuasion-principles.md +187 -0
  92. package/skills/writing-skills/render-graphs.js +168 -0
  93. package/skills/writing-skills/testing-skills-with-subagents.md +384 -0
  94. package/src/cli.mjs +165 -0
  95. package/src/constants.mjs +7 -0
  96. package/src/install.mjs +186 -0
  97. package/src/io.mjs +81 -0
@@ -0,0 +1,221 @@
1
+ ---
2
+ name: receiving-code-review
3
+ description: "Evaluates code review feedback with technical rigor before implementing suggestions. Use when: receiving review feedback, especially if unclear or technically questionable. Keywords: review feedback, code review response, technical evaluation"
4
+ ---
5
+
6
+ # Code Review Reception
7
+
8
+ ## Contents
9
+ - [Overview](#overview)
10
+ - [The Response Pattern](#the-response-pattern)
11
+ - [Forbidden Responses](#forbidden-responses)
12
+ - [Handling Unclear Feedback](#handling-unclear-feedback)
13
+ - [Technical Evaluation](#technical-evaluation)
14
+ - [Implementation Process](#implementation-process)
15
+
16
+ ## Overview
17
+
18
+ Code review requires technical evaluation, not emotional performance.
19
+
20
+ **Core principle:** Verify before implementing. Ask before assuming. Technical correctness over social comfort.
21
+
22
+ ## The Response Pattern
23
+
24
+ ```
25
+ WHEN receiving code review feedback:
26
+
27
+ 1. READ: Complete feedback without reacting
28
+ 2. UNDERSTAND: Restate requirement in own words (or ask)
29
+ 3. VERIFY: Check against codebase reality
30
+ 4. EVALUATE: Technically sound for THIS codebase?
31
+ 5. RESPOND: Technical acknowledgment or reasoned pushback
32
+ 6. IMPLEMENT: One item at a time, test each
33
+ ```
34
+
35
+ ## Forbidden Responses
36
+
37
+ **NEVER:**
38
+ - "You're absolutely right!" (explicit CLAUDE.md violation)
39
+ - "Great point!" / "Excellent feedback!" (performative)
40
+ - "Let me implement that now" (before verification)
41
+
42
+ **INSTEAD:**
43
+ - Restate the technical requirement
44
+ - Ask clarifying questions
45
+ - Push back with technical reasoning if wrong
46
+ - Just start working (actions > words)
47
+
48
+ ## Handling Unclear Feedback
49
+
50
+ ```
51
+ IF any item is unclear:
52
+ STOP - do not implement anything yet
53
+ ASK for clarification on unclear items
54
+
55
+ WHY: Items may be related. Partial understanding = wrong implementation.
56
+ ```
57
+
58
+ **Example:**
59
+ ```
60
+ your human partner: "Fix 1-6"
61
+ You understand 1,2,3,6. Unclear on 4,5.
62
+
63
+ ❌ WRONG: Implement 1,2,3,6 now, ask about 4,5 later
64
+ ✅ RIGHT: "I understand items 1,2,3,6. Need clarification on 4 and 5 before proceeding."
65
+ ```
66
+
67
+ ## Source-Specific Handling
68
+
69
+ ### From your human partner
70
+ - **Trusted** - implement after understanding
71
+ - **Still ask** if scope unclear
72
+ - **No performative agreement**
73
+ - **Skip to action** or technical acknowledgment
74
+
75
+ ### From External Reviewers
76
+ ```
77
+ BEFORE implementing:
78
+ 1. Check: Technically correct for THIS codebase?
79
+ 2. Check: Breaks existing functionality?
80
+ 3. Check: Reason for current implementation?
81
+ 4. Check: Works on all platforms/versions?
82
+ 5. Check: Does reviewer understand full context?
83
+
84
+ IF suggestion seems wrong:
85
+ Push back with technical reasoning
86
+
87
+ IF can't easily verify:
88
+ Say so: "I can't verify this without [X]. Should I [investigate/ask/proceed]?"
89
+
90
+ IF conflicts with your human partner's prior decisions:
91
+ Stop and discuss with your human partner first
92
+ ```
93
+
94
+ **your human partner's rule:** "External feedback - be skeptical, but check carefully"
95
+
96
+ ## YAGNI Check for "Professional" Features
97
+
98
+ ```
99
+ IF reviewer suggests "implementing properly":
100
+ grep codebase for actual usage
101
+
102
+ IF unused: "This endpoint isn't called. Remove it (YAGNI)?"
103
+ IF used: Then implement properly
104
+ ```
105
+
106
+ **your human partner's rule:** "You and reviewer both report to me. If we don't need this feature, don't add it."
107
+
108
+ ## Implementation Order
109
+
110
+ ```
111
+ FOR multi-item feedback:
112
+ 1. Clarify anything unclear FIRST
113
+ 2. Then implement in this order:
114
+ - Blocking issues (breaks, security)
115
+ - Simple fixes (typos, imports)
116
+ - Complex fixes (refactoring, logic)
117
+ 3. Test each fix individually
118
+ 4. Verify no regressions
119
+ ```
120
+
121
+ ## When To Push Back
122
+
123
+ Push back when:
124
+ - Suggestion breaks existing functionality
125
+ - Reviewer lacks full context
126
+ - Violates YAGNI (unused feature)
127
+ - Technically incorrect for this stack
128
+ - Legacy/compatibility reasons exist
129
+ - Conflicts with your human partner's architectural decisions
130
+
131
+ **How to push back:**
132
+ - Use technical reasoning, not defensiveness
133
+ - Ask specific questions
134
+ - Reference working tests/code
135
+ - Involve your human partner if architectural
136
+
137
+ **Signal if uncomfortable pushing back out loud:** "Strange things are afoot at the Circle K"
138
+
139
+ ## Acknowledging Correct Feedback
140
+
141
+ When feedback IS correct:
142
+ ```
143
+ ✅ "Fixed. [Brief description of what changed]"
144
+ ✅ "Good catch - [specific issue]. Fixed in [location]."
145
+ ✅ [Just fix it and show in the code]
146
+
147
+ ❌ "You're absolutely right!"
148
+ ❌ "Great point!"
149
+ ❌ "Thanks for catching that!"
150
+ ❌ "Thanks for [anything]"
151
+ ❌ ANY gratitude expression
152
+ ```
153
+
154
+ **Why no thanks:** Actions speak. Just fix it. The code itself shows you heard the feedback.
155
+
156
+ **If you catch yourself about to write "Thanks":** DELETE IT. State the fix instead.
157
+
158
+ ## Gracefully Correcting Your Pushback
159
+
160
+ If you pushed back and were wrong:
161
+ ```
162
+ ✅ "You were right - I checked [X] and it does [Y]. Implementing now."
163
+ ✅ "Verified this and you're correct. My initial understanding was wrong because [reason]. Fixing."
164
+
165
+ ❌ Long apology
166
+ ❌ Defending why you pushed back
167
+ ❌ Over-explaining
168
+ ```
169
+
170
+ State the correction factually and move on.
171
+
172
+ ## Common Mistakes
173
+
174
+ | Mistake | Fix |
175
+ |---------|-----|
176
+ | Performative agreement | State requirement or just act |
177
+ | Blind implementation | Verify against codebase first |
178
+ | Batch without testing | One at a time, test each |
179
+ | Assuming reviewer is right | Check if breaks things |
180
+ | Avoiding pushback | Technical correctness > comfort |
181
+ | Partial implementation | Clarify all items first |
182
+ | Can't verify, proceed anyway | State limitation, ask for direction |
183
+
184
+ ## Real Examples
185
+
186
+ **Performative Agreement (Bad):**
187
+ ```
188
+ Reviewer: "Remove legacy code"
189
+ ❌ "You're absolutely right! Let me remove that..."
190
+ ```
191
+
192
+ **Technical Verification (Good):**
193
+ ```
194
+ Reviewer: "Remove legacy code"
195
+ ✅ "Checking... build target is 10.15+, this API needs 13+. Need legacy for backward compat. Current impl has wrong bundle ID - fix it or drop pre-13 support?"
196
+ ```
197
+
198
+ **YAGNI (Good):**
199
+ ```
200
+ Reviewer: "Implement proper metrics tracking with database, date filters, CSV export"
201
+ ✅ "Grepped codebase - nothing calls this endpoint. Remove it (YAGNI)? Or is there usage I'm missing?"
202
+ ```
203
+
204
+ **Unclear Item (Good):**
205
+ ```
206
+ your human partner: "Fix items 1-6"
207
+ You understand 1,2,3,6. Unclear on 4,5.
208
+ ✅ "Understand 1,2,3,6. Need clarification on 4 and 5 before implementing."
209
+ ```
210
+
211
+ ## GitHub Thread Replies
212
+
213
+ When replying to inline review comments on GitHub, reply in the comment thread (`gh api repos/{owner}/{repo}/pulls/{pr}/comments/{id}/replies`), not as a top-level PR comment.
214
+
215
+ ## The Bottom Line
216
+
217
+ **External feedback = suggestions to evaluate, not orders to follow.**
218
+
219
+ Verify. Question. Then implement.
220
+
221
+ No performative agreement. Technical rigor always.
@@ -0,0 +1,127 @@
1
+ ---
2
+ name: requesting-code-review
3
+ description: "Dispatches code-reviewer subagent to catch issues before they cascade. Use when: completing tasks, implementing major features, before merging, or verifying work meets requirements. Keywords: code review, review request, quality check, PR review"
4
+ ---
5
+
6
+ # Requesting Code Review
7
+
8
+ Dispatch superpowers:code-reviewer subagent to catch issues before they cascade.
9
+
10
+ **Core principle:** Review early, review often.
11
+
12
+ ## Protocol Threshold (Required)
13
+
14
+ Follow `skills/shared/protocol-threshold.md`. The hook injects CP reminders automatically.
15
+
16
+ ## When to Request Review
17
+
18
+ **Mandatory:**
19
+
20
+ - After each task in subagent-driven development
21
+ - After completing major feature
22
+ - Before merge to main
23
+
24
+ **Optional but valuable:**
25
+
26
+ - When stuck (fresh perspective)
27
+ - Before refactoring (baseline check)
28
+ - After fixing complex bug
29
+
30
+ ## How to Request
31
+
32
+ **► CP3 (Quality Gate):** Before requesting review, apply `coordinating-multi-model-work/checkpoints.md`.
33
+
34
+ **1. Get git SHAs:**
35
+
36
+ ```bash
37
+ BASE_SHA=$(git rev-parse HEAD~1) # or origin/main
38
+ HEAD_SHA=$(git rev-parse HEAD)
39
+ ```
40
+
41
+ **2. Dispatch code-reviewer subagent:**
42
+
43
+ Use Task tool with superpowers:code-reviewer type, fill template at `code-reviewer.md`
44
+
45
+ **Note:** Code review is handled by the Opus reviewer agent directly. Opus reviews all code-changing paths.
46
+
47
+ **Placeholders:**
48
+
49
+ - `{WHAT_WAS_IMPLEMENTED}` - What you just built
50
+ - `{PLAN_OR_REQUIREMENTS}` - What it should do
51
+ - `{BASE_SHA}` - Starting commit
52
+ - `{HEAD_SHA}` - Ending commit
53
+ - `{DESCRIPTION}` - Brief summary
54
+
55
+ **3. Act on feedback:**
56
+
57
+ - Fix Critical issues immediately
58
+ - Fix Important issues before proceeding
59
+ - Note Minor issues for later
60
+ - Push back if reviewer is wrong (with reasoning)
61
+
62
+ ## Example
63
+
64
+ ```
65
+ [Just completed Task 2: Add verification function]
66
+
67
+ You: Let me request code review before proceeding.
68
+
69
+ BASE_SHA=$(git log --oneline | grep "Task 1" | head -1 | awk '{print $1}')
70
+ HEAD_SHA=$(git rev-parse HEAD)
71
+
72
+ [Dispatch superpowers:code-reviewer subagent]
73
+ WHAT_WAS_IMPLEMENTED: Verification and repair functions for conversation index
74
+ PLAN_OR_REQUIREMENTS: Task 2 from docs/plans/deployment-plan.md
75
+ BASE_SHA: a7981ec
76
+ HEAD_SHA: 3df7661
77
+ DESCRIPTION: Added verifyIndex() and repairIndex() with 4 issue types
78
+
79
+ [Subagent returns]:
80
+ Strengths: Clean architecture, real tests
81
+ Issues:
82
+ Important: Missing progress indicators
83
+ Minor: Magic number (100) for reporting interval
84
+ Assessment: Ready to proceed
85
+
86
+ You: [Fix progress indicators]
87
+ [Continue to Task 3]
88
+ ```
89
+
90
+ ## Integration with Workflows
91
+
92
+ **Subagent-Driven Development:**
93
+
94
+ - Review after EACH task
95
+ - Catch issues before they compound
96
+ - Fix before moving to next task
97
+
98
+ **Executing Plans:**
99
+
100
+ - Review after each batch (3 tasks)
101
+ - Get feedback, apply, continue
102
+
103
+ **Ad-Hoc Development:**
104
+
105
+ - Review before merge
106
+ - Review when stuck
107
+
108
+ ## Red Flags
109
+
110
+ **Never:**
111
+
112
+ - Skip review because "it's simple"
113
+ - Ignore Critical issues
114
+ - Proceed with unfixed Important issues
115
+ - Argue with valid technical feedback
116
+
117
+ **If reviewer wrong:**
118
+
119
+ - Push back with technical reasoning
120
+ - Show code/tests that prove it works
121
+ - Request clarification
122
+
123
+ See template at: requesting-code-review/code-reviewer.md
124
+
125
+ ## Multi-Model Code Review
126
+
127
+ See `skills/shared/multi-model-integration-section.md` for routing, invocation, and fallback rules.
@@ -0,0 +1,146 @@
1
+ # Code Review Agent
2
+
3
+ You are reviewing code changes for production readiness.
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
11
+
12
+ ## What Was Implemented
13
+
14
+ {DESCRIPTION}
15
+
16
+ ## Requirements/Plan
17
+
18
+ {PLAN_REFERENCE}
19
+
20
+ ## Git Range to Review
21
+
22
+ **Base:** {BASE_SHA}
23
+ **Head:** {HEAD_SHA}
24
+
25
+ ```bash
26
+ git diff --stat {BASE_SHA}..{HEAD_SHA}
27
+ git diff {BASE_SHA}..{HEAD_SHA}
28
+ ```
29
+
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
64
+
65
+ ### Strengths
66
+ [What's well done? Be specific.]
67
+
68
+ ### Issues
69
+
70
+ #### Critical (Must Fix)
71
+ [Bugs, security issues, data loss risks, broken functionality]
72
+
73
+ #### Important (Should Fix)
74
+ [Architecture problems, missing features, poor error handling, test gaps]
75
+
76
+ #### Minor (Nice to Have)
77
+ [Code style, optimization opportunities, documentation improvements]
78
+
79
+ **For each issue:**
80
+ - File:line reference
81
+ - What's wrong
82
+ - Why it matters
83
+ - How to fix (if not obvious)
84
+
85
+ ### Recommendations
86
+ [Improvements for code quality, architecture, or process]
87
+
88
+ ### Assessment
89
+
90
+ **Ready to merge?** [Yes/No/With fixes]
91
+
92
+ **Reasoning:** [Technical assessment in 1-2 sentences]
93
+
94
+ ## Critical Rules
95
+
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
102
+
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
109
+
110
+ ## Example Output
111
+
112
+ ```
113
+ ### Strengths
114
+ - Clean database schema with proper migrations (db.ts:15-42)
115
+ - Comprehensive test coverage (18 tests, all edge cases)
116
+ - Good error handling with fallbacks (summarizer.ts:85-92)
117
+
118
+ ### Issues
119
+
120
+ #### Important
121
+ 1. **Missing help text in CLI wrapper**
122
+ - File: index-conversations:1-31
123
+ - Issue: No --help flag, users won't discover --concurrency
124
+ - Fix: Add --help case with usage examples
125
+
126
+ 2. **Date validation missing**
127
+ - File: search.ts:25-27
128
+ - Issue: Invalid dates silently return no results
129
+ - Fix: Validate ISO format, throw error with example
130
+
131
+ #### Minor
132
+ 1. **Progress indicators**
133
+ - File: indexer.ts:130
134
+ - Issue: No "X of Y" counter for long operations
135
+ - Impact: Users don't know how long to wait
136
+
137
+ ### Recommendations
138
+ - Add progress reporting for user experience
139
+ - Consider config file for excluded projects (portability)
140
+
141
+ ### Assessment
142
+
143
+ **Ready to merge: With fixes**
144
+
145
+ **Reasoning:** Core implementation is solid with good architecture and tests. Important issues (help text, date validation) are easily fixed and don't affect core functionality.
146
+ ```
@@ -0,0 +1,32 @@
1
+ # Multi-Model Integration (Shared Reference)
2
+
3
+ All skills that invoke external models must follow this pattern.
4
+
5
+ **Related skill:** `superpowers-ccg:coordinating-multi-model-work`
6
+
7
+ ## Integration Steps
8
+
9
+ 1. Analyze the task domain using `coordinating-multi-model-work/routing-decision.md`.
10
+ 2. Reduce scope to one bounded task with a clear file set and verification command.
11
+ 3. Invoke exactly one worker for implementation:
12
+ - Backend and systems → `mcp__codex__codex`
13
+ - Frontend → `mcp__gemini__gemini`
14
+ 4. Reuse the same worker `SESSION_ID` for follow-up fixes on that task only.
15
+ 5. Use `CROSS_VALIDATION` only for architectural uncertainty or true multi-domain conflicts.
16
+ 6. Run the Opus review chain on the resulting artifact.
17
+
18
+ ## Invocation
19
+
20
+ - Use English prompts.
21
+ - Ask for `diff-or-questions`, not prose design output.
22
+ - Do not ask the worker for draft code that the orchestrator will re-implement.
23
+
24
+ ## Checkpoint Integration
25
+
26
+ - CP1: route the current bounded task
27
+ - CP2: narrow scope before escalating to cross-validation
28
+ - CP3: review the artifact, not the whole narrative
29
+
30
+ ## Fallback
31
+
32
+ If `Routing != CLAUDE` and the MCP call fails or times out, stop and follow `coordinating-multi-model-work/GATE.md`.
@@ -0,0 +1,46 @@
1
+ # Protocol Threshold (Shared Reference)
2
+
3
+ All skills that use checkpoints must follow the CP protocol injected by hooks.
4
+
5
+ ## Required Behavior
6
+
7
+ - Before the first Task call, output a standalone `[CP1 Assessment]` block.
8
+ - Before claiming completion or verification, output a standalone `[CP3 Assessment]` block.
9
+ - Keep both blocks minimal. The checkpoint is a gate, not a summary.
10
+
11
+ ## CP1 Assessment Format
12
+
13
+ ```text
14
+ [CP1 Assessment]
15
+ - Task type: [Frontend/Backend/Full-stack/Other]
16
+ - Complexity: [Trivial/Standard/Critical]
17
+ - Routing decision: [CLAUDE/CODEX/GEMINI/CROSS_VALIDATION]
18
+ - Rationale: [one sentence]
19
+ ```
20
+
21
+ Compact trivial form:
22
+
23
+ ```text
24
+ [CP1] Routing: CLAUDE | Trivial: <reason>
25
+ ```
26
+
27
+ ## CP3 Assessment Format
28
+
29
+ ```text
30
+ [CP3 Assessment]
31
+ - Task type: [Frontend/Backend/Full-stack/Other]
32
+ - Routing decision: [CLAUDE/CODEX/GEMINI/CROSS_VALIDATION]
33
+ - Rationale: [one sentence]
34
+ ```
35
+
36
+ Compact trivial form:
37
+
38
+ ```text
39
+ [CP3] Verified: <evidence>
40
+ ```
41
+
42
+ ## Checkpoint Logic
43
+
44
+ - **CP1:** decide routing and invoke the worker if needed
45
+ - **CP2:** trigger only on real uncertainty, stalled progress, or repeated failures
46
+ - **CP3:** verify the artifact and run the review chain
@@ -0,0 +1,132 @@
1
+ # Supplementary MCP Tools (Optional Enhancements)
2
+
3
+ Supplementary tools enhance Claude's orchestration capabilities. They are **optional** — all workflows work without them via native tool fallbacks. They do NOT replace the primary routing to Codex/Gemini.
4
+
5
+ **Design principle:** MCPs enhance performance, never block functionality. If unavailable, proceed with native tools.
6
+
7
+ ## Tool Reference
8
+
9
+ ### Grok Search / Tavily (`mcp__grok-search__web_search`, `mcp__grok-search__web_fetch`, `mcp__grok-search__web_map`)
10
+
11
+ **Purpose:** Web search and real-time information retrieval (Grok Search wraps Tavily).
12
+
13
+ **Tools:**
14
+ - `mcp__grok-search__web_search` — deep web search with Tavily-powered results
15
+ - `mcp__grok-search__web_fetch` — fetch and extract full page content as Markdown
16
+ - `mcp__grok-search__web_map` — map website structure by graph traversal
17
+ - `mcp__grok-search__get_sources` — retrieve source list for a search session
18
+
19
+ **Use when:**
20
+ - Research phase in brainstorming (current events, competitive analysis)
21
+ - Debugging: searching for known issues, error messages, library bugs
22
+ - Plan writing: gathering context about unfamiliar libraries/APIs
23
+ - Any task needing information beyond model knowledge cutoff
24
+
25
+ **Auto-triggers:** "search", "latest", "current trends", "find error solution", unknown error messages
26
+
27
+ **Fallback:** Built-in WebSearch / WebFetch (less structured)
28
+
29
+ ---
30
+
31
+ ### Sequential-Thinking (`mcp__mcp-sequentialthinking-tools__sequentialthinking_tools`)
32
+
33
+ **Purpose:** Multi-step structured reasoning for complex analysis.
34
+
35
+ **Use when:**
36
+ - Debugging spans 3+ components or layers
37
+ - Architectural analysis or system design decisions
38
+ - Cross-validation arbitration (divergent model outputs)
39
+ - Complex plan decomposition with interdependencies
40
+ - Hypothesis testing with multiple variables
41
+
42
+ **Auto-triggers:** "design", "architecture", "analyze tradeoffs", "complex problem", 3+ interacting parts
43
+
44
+ **Fallback:** Native reasoning (same quality, ~2x more tokens)
45
+
46
+ ---
47
+
48
+ ### Serena (`mcp__serena__*`)
49
+
50
+ **Purpose:** Semantic code understanding with project memory.
51
+
52
+ **Use when:**
53
+ - Symbol-aware navigation (find references, trace dependencies)
54
+ - Large codebase exploration (>10 files involved)
55
+ - Cross-session project memory and persistence
56
+ - Refactoring with dependency tracking
57
+
58
+ **Auto-triggers:** "refactor", "find all usages", "symbol tracking", file count >10
59
+
60
+ **Fallback:** Grep + Read + Glob (3x slower, same quality)
61
+
62
+ ---
63
+
64
+ ### Magic (`mcp__magic__*`)
65
+
66
+ **Purpose:** Modern UI component generation from 21st.dev patterns.
67
+
68
+ **Use when:**
69
+ - Generating frontend UI components (forms, navbars, modals, tables, cards)
70
+ - Design system integration with accessibility and responsiveness
71
+ - Complements Gemini MCP for frontend routing — use Magic for component patterns, Gemini for full-page layouts and styling
72
+
73
+ **Auto-triggers:** UI component requests, "button", "form", "modal", "card", "table"
74
+
75
+ **Fallback:** Gemini MCP handles all frontend work (Magic adds design-system patterns)
76
+
77
+ ---
78
+
79
+ ### Morphllm Fast-Apply (`mcp__morph-mcp__*`)
80
+
81
+ **Purpose:** Pattern-based bulk code editing with token efficiency.
82
+
83
+ **Use when:**
84
+ - Repeated edits across multiple files (style migration, framework updates)
85
+ - Pattern-driven transformations (rename patterns, enforce conventions)
86
+ - Bulk refactoring where semantic context is less important than pattern matching
87
+ - Token-efficient editing during plan execution
88
+
89
+ **Auto-triggers:** Multi-file pattern edits, framework migrations, style enforcement
90
+
91
+ **Fallback:** Edit tool (more manual, same result)
92
+
93
+ ## Composition Patterns
94
+
95
+ ### Research Phase (Brainstorming)
96
+ ```
97
+ Grok Search (gather info) → Sequential (analyze & decompose) → Design output
98
+ ```
99
+
100
+ ### Complex Debugging
101
+ ```
102
+ Sequential (decompose problem) → Grok Search (search known issues) → Serena (trace symbols) → Fix
103
+ ```
104
+
105
+ ### Plan Writing
106
+ ```
107
+ Sequential (architectural decomposition) → Grok Search (library docs) → Plan output
108
+ ```
109
+
110
+ ### Frontend Implementation
111
+ ```
112
+ Magic (component patterns) + Gemini MCP (full implementation) → Opus review
113
+ ```
114
+
115
+ ### Bulk Refactoring
116
+ ```
117
+ Serena (scope & analyze) → Morphllm (execute bulk edits) → Opus review
118
+ ```
119
+
120
+ ## Integration with Primary Routing
121
+
122
+ Supplementary tools operate at the **orchestrator level** — Claude uses them to enhance its own analysis before/alongside routing to Codex/Gemini.
123
+
124
+ ```
125
+ 1. Claude receives task
126
+ 2. [Optional] Use supplementary tools for research/analysis/planning
127
+ 3. Route implementation to Codex/Gemini (primary routing)
128
+ 4. [Optional] Use supplementary tools during review/integration
129
+ 5. Opus reviews
130
+ ```
131
+
132
+ **No fail-closed gate** for supplementary tools. If unavailable, proceed without them.