superkit-mcp-server 1.2.4 → 1.2.5

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 (161) hide show
  1. package/ARCHITECTURE.md +102 -102
  2. package/README.md +71 -71
  3. package/SUPERKIT.md +168 -168
  4. package/agents/code-archaeologist.md +106 -106
  5. package/agents/coder.md +90 -90
  6. package/agents/data-engineer.md +28 -28
  7. package/agents/devops-engineer.md +242 -242
  8. package/agents/git-manager.md +203 -203
  9. package/agents/orchestrator.md +420 -420
  10. package/agents/penetration-tester.md +188 -188
  11. package/agents/performance-optimizer.md +187 -187
  12. package/agents/planner.md +270 -270
  13. package/agents/qa-automation-engineer.md +103 -103
  14. package/agents/quant-developer.md +32 -32
  15. package/agents/reviewer.md +100 -100
  16. package/agents/scout.md +222 -222
  17. package/agents/tester.md +274 -274
  18. package/agents/ui-designer.md +208 -208
  19. package/build/index.js +88 -45
  20. package/build/tools/todoTools.js +39 -39
  21. package/build/tools/validators/__tests__/apiSchema.test.js +23 -23
  22. package/build/tools/validators/__tests__/convertRules.test.js +5 -5
  23. package/build/tools/validators/__tests__/frontendDesign.test.js +12 -12
  24. package/build/tools/validators/__tests__/geoChecker.test.js +19 -19
  25. package/build/tools/validators/__tests__/mobileAudit.test.js +12 -12
  26. package/build/tools/validators/__tests__/reactPerformanceChecker.test.js +17 -17
  27. package/build/tools/validators/__tests__/securityScan.test.js +6 -6
  28. package/build/tools/validators/__tests__/seoChecker.test.js +16 -16
  29. package/build/tools/validators/__tests__/typeCoverage.test.js +14 -14
  30. package/commands/README.md +122 -122
  31. package/commands/ask.toml +72 -72
  32. package/commands/brainstorm.toml +119 -119
  33. package/commands/chat.toml +77 -77
  34. package/commands/code-preview.toml +37 -37
  35. package/commands/code.toml +28 -28
  36. package/commands/content.toml +200 -200
  37. package/commands/cook.toml +77 -77
  38. package/commands/copywrite.toml +131 -131
  39. package/commands/db.toml +192 -192
  40. package/commands/debug.toml +166 -166
  41. package/commands/design.toml +158 -158
  42. package/commands/dev-rules.toml +14 -14
  43. package/commands/do.toml +117 -117
  44. package/commands/doc-rules.toml +14 -14
  45. package/commands/docs.toml +148 -148
  46. package/commands/fix.toml +440 -440
  47. package/commands/fullstack.toml +175 -175
  48. package/commands/git.toml +235 -235
  49. package/commands/help.toml +84 -84
  50. package/commands/integrate.toml +127 -127
  51. package/commands/journal.toml +136 -136
  52. package/commands/kit-setup.toml +40 -40
  53. package/commands/mcp.toml +183 -183
  54. package/commands/orchestration.toml +15 -15
  55. package/commands/plan.toml +206 -172
  56. package/commands/pm.toml +148 -148
  57. package/commands/pr.toml +50 -50
  58. package/commands/project.toml +32 -32
  59. package/commands/research.toml +117 -117
  60. package/commands/review-pr.toml +63 -63
  61. package/commands/review.toml +190 -190
  62. package/commands/scout-ext.toml +97 -97
  63. package/commands/scout.toml +79 -79
  64. package/commands/screenshot.toml +65 -65
  65. package/commands/session.toml +102 -102
  66. package/commands/skill.toml +384 -384
  67. package/commands/status.toml +22 -22
  68. package/commands/team.toml +56 -56
  69. package/commands/test.toml +164 -164
  70. package/commands/ticket.toml +70 -70
  71. package/commands/use.toml +106 -106
  72. package/commands/video.toml +83 -83
  73. package/commands/watzup.toml +71 -71
  74. package/commands/workflow.toml +14 -14
  75. package/package.json +35 -35
  76. package/skills/meta/README.md +30 -30
  77. package/skills/meta/api-design/SKILL.md +134 -134
  78. package/skills/meta/code-review/SKILL.md +44 -44
  79. package/skills/meta/code-review/checklists/pre-merge.md +25 -25
  80. package/skills/meta/code-review/workflows/architecture-pass.md +26 -26
  81. package/skills/meta/code-review/workflows/performance-pass.md +27 -27
  82. package/skills/meta/code-review/workflows/security-pass.md +29 -29
  83. package/skills/meta/compound-docs/SKILL.md +133 -133
  84. package/skills/meta/debug/SKILL.md +40 -40
  85. package/skills/meta/debug/templates/bug-report.template.md +31 -31
  86. package/skills/meta/debug/workflows/reproduce-issue.md +20 -20
  87. package/skills/meta/docker/SKILL.md +126 -126
  88. package/skills/meta/examples/supabase/SKILL.md +46 -46
  89. package/skills/meta/examples/supabase/references/best-practices.md +319 -319
  90. package/skills/meta/examples/supabase/references/common-patterns.md +373 -373
  91. package/skills/meta/examples/supabase/templates/migration-template.sql +49 -49
  92. package/skills/meta/examples/supabase/templates/rls-policy-template.sql +77 -77
  93. package/skills/meta/examples/supabase/workflows/debugging.md +260 -260
  94. package/skills/meta/examples/supabase/workflows/migration-workflow.md +211 -211
  95. package/skills/meta/examples/supabase/workflows/rls-policies.md +244 -244
  96. package/skills/meta/examples/supabase/workflows/schema-design.md +321 -321
  97. package/skills/meta/file-todos/SKILL.md +88 -88
  98. package/skills/meta/mobile/SKILL.md +140 -140
  99. package/skills/meta/nextjs/SKILL.md +101 -101
  100. package/skills/meta/performance/SKILL.md +130 -130
  101. package/skills/meta/react-patterns/SKILL.md +83 -83
  102. package/skills/meta/security/SKILL.md +114 -114
  103. package/skills/meta/session-resume/SKILL.md +96 -96
  104. package/skills/meta/tailwind/SKILL.md +139 -139
  105. package/skills/meta/testing/SKILL.md +43 -43
  106. package/skills/meta/testing/references/vitest-patterns.md +45 -45
  107. package/skills/meta/testing/templates/component-test.template.tsx +37 -37
  108. package/skills/tech/alpha-vantage/SKILL.md +142 -142
  109. package/skills/tech/alpha-vantage/references/commodities.md +153 -153
  110. package/skills/tech/alpha-vantage/references/economic-indicators.md +158 -158
  111. package/skills/tech/alpha-vantage/references/forex-crypto.md +154 -154
  112. package/skills/tech/alpha-vantage/references/fundamentals.md +223 -223
  113. package/skills/tech/alpha-vantage/references/intelligence.md +138 -138
  114. package/skills/tech/alpha-vantage/references/options.md +93 -93
  115. package/skills/tech/alpha-vantage/references/technical-indicators.md +374 -374
  116. package/skills/tech/alpha-vantage/references/time-series.md +157 -157
  117. package/skills/tech/financial-modeling/SKILL.md +18 -18
  118. package/skills/tech/financial-modeling/skills/3-statements/SKILL.md +368 -368
  119. package/skills/tech/financial-modeling/skills/3-statements/references/formatting.md +118 -118
  120. package/skills/tech/financial-modeling/skills/3-statements/references/formulas.md +292 -292
  121. package/skills/tech/financial-modeling/skills/3-statements/references/sec-filings.md +125 -125
  122. package/skills/tech/financial-modeling/skills/dcf-model/SKILL.md +1210 -1210
  123. package/skills/tech/financial-modeling/skills/dcf-model/TROUBLESHOOTING.md +40 -40
  124. package/skills/tech/financial-modeling/skills/dcf-model/requirements.txt +8 -8
  125. package/skills/tech/financial-modeling/skills/dcf-model/scripts/validate_dcf.py +292 -292
  126. package/skills/tech/financial-modeling/skills/lbo-model/SKILL.md +236 -236
  127. package/skills/tech/financial-modeling/skills/merger-model/SKILL.md +108 -108
  128. package/skills/workflows/README.md +203 -203
  129. package/skills/workflows/adr.md +174 -174
  130. package/skills/workflows/changelog.md +74 -74
  131. package/skills/workflows/compound.md +323 -323
  132. package/skills/workflows/compound_health.md +74 -74
  133. package/skills/workflows/create-agent-skill.md +138 -138
  134. package/skills/workflows/cycle.md +144 -144
  135. package/skills/workflows/deploy-docs.md +84 -84
  136. package/skills/workflows/development-rules.md +42 -42
  137. package/skills/workflows/doc.md +95 -95
  138. package/skills/workflows/documentation-management.md +34 -34
  139. package/skills/workflows/explore.md +146 -146
  140. package/skills/workflows/generate_command.md +106 -106
  141. package/skills/workflows/heal-skill.md +97 -97
  142. package/skills/workflows/housekeeping.md +229 -229
  143. package/skills/workflows/kit-setup.md +102 -102
  144. package/skills/workflows/map-codebase.md +78 -78
  145. package/skills/workflows/orchestration-protocol.md +43 -43
  146. package/skills/workflows/plan-compound.md +439 -439
  147. package/skills/workflows/plan_review.md +269 -269
  148. package/skills/workflows/primary-workflow.md +37 -37
  149. package/skills/workflows/promote_pattern.md +86 -86
  150. package/skills/workflows/release-docs.md +82 -82
  151. package/skills/workflows/report-bug.md +135 -135
  152. package/skills/workflows/reproduce-bug.md +118 -118
  153. package/skills/workflows/resolve_pr.md +133 -133
  154. package/skills/workflows/resolve_todo.md +128 -128
  155. package/skills/workflows/review-compound.md +376 -376
  156. package/skills/workflows/skill-review.md +127 -127
  157. package/skills/workflows/specs.md +257 -257
  158. package/skills/workflows/triage-sprint.md +102 -102
  159. package/skills/workflows/triage.md +152 -152
  160. package/skills/workflows/work.md +399 -399
  161. package/skills/workflows/xcode-test.md +93 -93
@@ -1,439 +1,439 @@
1
- ---
2
- description: (Compound) Transform feature descriptions into well-structured project plans with solution search and pattern checks.
3
- ---
4
-
5
- # /plan-compound - Research and Plan Before Building
6
-
7
- Transform feature descriptions, bug reports, or improvement ideas into well-structured plans that follow project conventions and best practices.
8
-
9
- > **Why plan first?** Research before coding prevents building the wrong thing. A 30-minute plan saves hours of rework.
10
- >
11
- > **Note:** This is the Compound version with solution search and pattern checks. For quick planning, use `/plan`.
12
-
13
-
14
- ## When To Use
15
-
16
- - Before any feature taking >2 hours
17
- - For bugs requiring investigation
18
- - When exploring unfamiliar codebase areas
19
- - Before architectural changes
20
-
21
- ---
22
-
23
- ## Workflow
24
-
25
- ### Step 0: Search Existing Solutions (MANDATORY)
26
-
27
- > [!CAUTION]
28
- > **BLOCKING STEP.** You MUST complete this before proceeding. Skipping wastes time re-solving known problems.
29
-
30
- **Run the auto-searcher:**
31
- ```bash
32
- // turbo
33
- Call MCP `call_tool_logger_manager` { action: "logWorkflow", name: "/plan", outcome: "success" }
34
- Call MCP `call_tool_compound_manager` { action: "search", terms: [ "{keyword1}" "{keyword2}"] }
35
- ```
36
-
37
- **See also:** `skills/compound-docs/SKILL.md` for advanced searching and pattern promotion.
38
-
39
- **Output required:**
40
- Copy the **table** AND the **update command** from the script output into your plan.
41
-
42
- **If relevant solutions found:**
43
- 1. List them in the plan under "## Prior Solutions"
44
- 2. Execute the update command to track usage:
45
- ```bash
46
- // turbo
47
- Call MCP `call_tool_compound_manager` { action: "updateRef", files: ["{paths from search output}"] }
48
- ```
49
-
50
- ---
51
-
52
- #### ⛔ VALIDATION CHECKPOINT
53
-
54
- Before proceeding to Step 0.5, confirm:
55
-
56
- - [ ] Ran MCP `call_tool_compound_manager` { action: "search" } with relevant keywords?
57
- - [ ] Reviewed all matching solutions (or confirmed none found)?
58
- - [ ] Ran MCP `call_tool_compound_manager` { action: "updateRef" } if reusing any solution?
59
-
60
- **If any box is unchecked:** Complete it now. Do NOT proceed.
61
-
62
- ---
63
-
64
- ### Step 0.5: Check Active Specs
65
-
66
- Before creating a standalone plan, check if this work belongs to an active spec:
67
-
68
- ```bash
69
- ls docs/specs/*/README.md 2>/dev/null | grep -v templates
70
- ```
71
-
72
- **If active spec found:**
73
- 1. Read `docs/specs/{name}/00-START-HERE.md` for context
74
- 2. Determine if this plan belongs to the spec
75
- 3. If yes, create plan in `docs/specs/{name}/plans/{phase}-{description}.md`
76
- 4. Link to parent spec in plan header
77
- 5. Reference current phase from spec's `03-tasks.md`
78
-
79
- **If no active spec (or work is unrelated):** Proceed with standalone plan in `plans/`.
80
-
81
- > [!TIP]
82
- > Use `/specs` first if this is multi-week work that should have its own specification.
83
-
84
- ### Step 0.6: Pattern Awareness (MANDATORY)
85
-
86
- > [!CAUTION]
87
- > **BLOCKING STEP.** Before creating your plan, review the critical patterns to avoid reinventing solutions to known problems.
88
-
89
- ```bash
90
- # Quick review of critical patterns
91
- cat docs/solutions/patterns/critical-patterns.md | grep "^### Pattern"
92
- ```
93
-
94
- **Key patterns to consider during planning:**
95
- - Pattern #9: Rigorous Planning (Multi-Order Thinking)
96
- - Pattern #10: Atomic State Transitions
97
- - Pattern #3: Actionable Items → Todo Files
98
-
99
- **Why this matters:** These patterns exist because the same mistakes were made 3+ times. Consulting them now prevents wasted effort.
100
-
101
- ---
102
-
103
- ### Step 1: Clarify Requirements
104
-
105
- If the request is vague, ask clarifying questions:
106
-
107
- ```
108
- Before I create a plan, I have some questions:
109
-
110
- 1. What problem does this solve for users?
111
- 2. Are there any constraints (timeline, tech stack, etc.)?
112
- 3. Should this integrate with existing features?
113
- ```
114
-
115
- **Do not proceed until requirements are clear.**
116
-
117
- ### Step 2: Research Phase
118
-
119
- Gather context from multiple sources in parallel:
120
-
121
- **Codebase Research:**
122
- - [ ] Find similar implementations in the codebase
123
- - [ ] Identify relevant files and patterns
124
- - [ ] Check for existing utilities/helpers to reuse
125
- - [ ] Review related tests for expected behavior
126
-
127
- **Documentation Research:**
128
- - [ ] Check project README, CLAUDE.md, or GEMINI.md
129
- - [ ] Review any existing docs for the feature area
130
- - [ ] Look for team conventions and standards
131
-
132
- **External Research:**
133
- - [ ] Find best practices for this type of feature
134
- - [ ] Check framework documentation for recommended approaches
135
- - [ ] Look for common pitfalls to avoid
136
-
137
- **Reference Collection:**
138
- Document all findings with specific references:
139
- - File paths: `src/services/auth.ts:42`
140
- - URLs: `https://docs.example.com/auth`
141
- - Issues: `#123`, `#456`
142
-
143
- ### Step 3: Analyze and Identify Gaps
144
-
145
- Review collected research for:
146
-
147
- - [ ] Edge cases not covered
148
- - [ ] Potential conflicts with existing code
149
- - [ ] Missing dependencies
150
- - [ ] Security considerations
151
- - [ ] Performance implications
152
-
153
- ### Step 3.5: Deep Analysis (Think Hard)
154
-
155
- > [!IMPORTANT]
156
- > Don't rush to solutions. Invest time in rigorous analysis now to avoid costly surprises later.
157
-
158
- **Multi-Order Thinking:**
159
- - [ ] **1st order:** What does this change directly affect?
160
- - [ ] **2nd order:** What depends on those affected things?
161
- - [ ] **3rd order:** What cascading effects could occur?
162
- - [ ] **4th order:** Could this affect unrelated systems through shared dependencies?
163
-
164
- **Long-Term Implications:**
165
- - [ ] How will this age in 6 months? 1 year?
166
- - [ ] Does this create technical debt or reduce it?
167
- - [ ] Is this approach reversible if we're wrong?
168
- - [ ] Will future maintainers understand the "why"?
169
-
170
- **Edge Cases (Leave No Stone Unturned):**
171
- - [ ] Empty/null/undefined inputs
172
- - [ ] Boundary conditions (min, max, exactly-at-limit)
173
- - [ ] Concurrent/race conditions
174
- - [ ] Failure modes (network, database, external services)
175
- - [ ] User behavior extremes (fast clicking, back button, refresh)
176
- - [ ] Data migration scenarios
177
- - [ ] Rollback scenarios
178
-
179
- **Stakeholder Impact Analysis:**
180
- - [ ] **End Users:** Will this change behavior they rely on? UX disruption?
181
- - [ ] **Other Developers:** Breaking API changes? Documentation needs?
182
- - [ ] **Operations/Support:** New failure modes? Monitoring/alerting updates?
183
- - [ ] **Downstream Systems:** Integrations affected? Consumer contracts broken?
184
- - [ ] **Business Stakeholders:** Timeline/scope implications? Resource needs?
185
- - [ ] **Security/Compliance:** Data handling changes? Audit requirements?
186
-
187
- ### Step 4: Choose Detail Level
188
-
189
- **📄 MINIMAL** - Simple bugs, small improvements
190
- ```markdown
191
- ## Problem
192
- [Brief description]
193
-
194
- ## Solution
195
- [Approach]
196
-
197
- ## Acceptance Criteria
198
- - [ ] Requirement 1
199
- - [ ] Requirement 2
200
- ```
201
-
202
- **📋 STANDARD** - Most features
203
- ```markdown
204
- ## Overview
205
- [Comprehensive description]
206
-
207
- ## Problem Statement
208
- [Why this matters]
209
-
210
- ## Proposed Solution
211
- [Technical approach with code examples]
212
-
213
- ## Acceptance Criteria
214
- - [ ] Detailed requirements
215
-
216
- ## Technical Considerations
217
- - Dependencies
218
- - Risks
219
- - Alternatives considered
220
-
221
- ## References
222
- - [Links to research]
223
- ```
224
-
225
- **📚 DETAILED** - Complex features, architectural changes
226
- All of STANDARD plus:
227
- - Implementation phases
228
- - Rollback strategy
229
- - Migration plan
230
- - Testing strategy
231
- - Monitoring requirements
232
-
233
- ### Step 5.5: Register Architectural Decisions
234
-
235
- > [!IMPORTANT]
236
- > If your plan makes long-term architectural choices (library swaps, schema changes,
237
- > pattern adoptions), create ADRs to persist them.
238
-
239
- **Triggers for ADR creation:**
240
- - Choosing between competing technologies/libraries
241
- - Defining new patterns or conventions
242
- - Making breaking changes with long-term impact
243
- - Decisions that future developers need to understand "why"
244
-
245
- **If architectural decision made:**
246
- ```bash
247
- # Get next ADR ID
248
- next_id=$(printf "%03d" $(( $(ls -1 docs/decisions/*.md 2>/dev/null | xargs -n1 basename | grep -E '^[0-9]{3}-' | wc -l) + 1 )))
249
- cp docs/decisions/adr-template.md docs/decisions/${next_id}-{decision-slug}.md
250
- ```
251
-
252
- **Link in plan:**
253
- Add `## Architectural Decisions: ADR-{NNN}` section referencing the new ADR.
254
-
255
- ### Step 5.9: Create Plan Document
256
-
257
- Create plan file: `plans/{feature-name}.md`
258
-
259
- **Structure:**
260
- ```markdown
261
- # {Feature Title}
262
-
263
- > Created: {DATE}
264
- > Status: Draft
265
-
266
- ## Summary
267
- [One-paragraph overview]
268
-
269
- ## Problem Statement
270
- [What problem this solves]
271
-
272
- ## Research Findings
273
-
274
- ### Codebase Patterns
275
- [Relevant existing code with file:line references]
276
-
277
- ### Best Practices
278
- [External research findings]
279
-
280
- ## Proposed Solution
281
-
282
- ### Approach
283
- [Technical approach]
284
-
285
- ### Code Examples
286
- \`\`\`{language}
287
- // Example implementation
288
- \`\`\`
289
-
290
- ## Acceptance Criteria
291
- - [ ] Criterion 1
292
- - [ ] Criterion 2
293
-
294
- ## Acceptance Criteria & Testing (Nyquist Validation Layer)
295
- > **Important:** Map each requirement to a specific automated test or manual verification command *before* execution.
296
- - [ ] Criterion 1 -> `npm test -- -t "criterion 1"`
297
- - [ ] Criterion 2 -> `pytest -k "criterion_2"`
298
- - [ ] Test scaffolding required: [List tests that need to be created]
299
-
300
- ## Technical Considerations
301
-
302
- ### Dependencies
303
- - [Required packages/services]
304
-
305
- ### Risks
306
- - [Potential issues]
307
-
308
- ### Alternatives Considered
309
- - [Other approaches and why rejected]
310
-
311
- ## Implementation Steps
312
-
313
- Tasks tracked in [03-tasks.md](../03-tasks.md#phase-{N}).
314
-
315
- **Approach:**
316
- - Task 1: [Technical details]
317
- - Task 2: [Technical details]
318
-
319
- ## References
320
- - [Research links]
321
- - [Related issues]
322
- ```
323
-
324
- ### Step 6: Create Plans Directory (if needed)
325
-
326
- ```bash
327
- mkdir -p plans
328
- ```
329
-
330
- ### Step 7: Offer Next Steps
331
-
332
- ```
333
- ✓ Plan created: plans/{feature-name}.md
334
-
335
- What's next?
336
- 1. Start work - Execute this plan with /work
337
- 2. Review plan - Get feedback before starting
338
- 3. Refine plan - Add more detail
339
- 4. Nothing for now
340
- ```
341
-
342
- ### Step 8: Create Todos for Deferred Scope
343
-
344
- > [!IMPORTANT]
345
- > If the plan identifies "out of scope" or "future work" items, create todo files for them NOW.
346
-
347
- **Check for deferred items:**
348
- - [ ] Did you mark anything as "out of scope"?
349
- - [ ] Are there "nice to have" features for later?
350
- - [ ] Did research reveal related improvements?
351
-
352
- **If YES:**
353
- ```bash
354
- # Create todo for each deferred item
355
- Call MCP `call_tool_todo_manager` { action: "create", priority: "p3", title: "{description}", description: "TODO description" }
356
- "Deferred item from plan {feature-name}. This feature was identified as valuable but out of scope for the initial implementation." \
357
- "Implement feature" "Verify functionality"
358
- ```
359
-
360
- **Before adding plan references to the todo:**
361
-
362
- > [!CAUTION]
363
- > Verify referential integrity to prevent dead links.
364
-
365
- **If referencing this plan in the todo:**
366
- ```bash
367
- # Verify the plan file exists
368
- if [ ! -f "plans/{feature-name}.md" ]; then
369
- echo "❌ ERROR: Plan file does not exist. Cannot create reference."
370
- exit 1
371
- fi
372
- ```
373
-
374
- **Alternative references** (if plan was not persisted):
375
- - Specs: `../docs/specs/{name}/README.md`
376
- - Solutions: `../docs/solutions/{category}/{solution-name}.md`
377
- - ADRs: `../docs/decisions/{nnn}-{decision}.md`
378
-
379
- **See also:** `skills/file-todos/SKILL.md` for full todo management workflows.
380
-
381
- ---
382
-
383
- ### Phase 5: Completion & Handoff
384
-
385
- #### Step 1: Establish Terminal UI State
386
-
387
- > [!IMPORTANT]
388
- > **Visual Completion Signal**
389
- > Call `task_boundary` one last time to signal completion in the user's UI. This prevents the "task" from appearing active after you've finished.
390
-
391
- ```javascript
392
- await task_boundary({
393
- TaskName: "[COMPLETED] Planning: {Feature Name}",
394
- TaskStatus: "Plan created and ready for review or execution.",
395
- Mode: "VERIFICATION",
396
- TaskSummary: "Completed planning for {feature}. Created comprehensive plan with acceptance criteria, research findings, and implementation steps."
397
- });
398
- ```
399
-
400
- #### Step 2: Mandatory Handoff
401
-
402
- > [!IMPORTANT]
403
- > **Exit Transition**
404
- > Do not stop here. Offer the user clear paths to the next logical workflow.
405
-
406
- ```bash
407
- ✓ Plan created: plans/{feature-name}.md
408
-
409
- Next steps:
410
- 1. /plan_review - Get feedback on plan quality before execution
411
- 2. /work - Start implementing (if plan is simple and you're confident)
412
- 3. Refine plan - Add more detail based on additional research
413
- 4. Create todos - For any deferred scope identified
414
- ```
415
-
416
- ---
417
-
418
- ## Quality Guidelines
419
-
420
- **Good plans have:**
421
- - ✅ Clear problem statement (not just "what" but "why")
422
- - ✅ Research with specific file references
423
- - ✅ Concrete acceptance criteria (testable)
424
- - ✅ Code examples following existing patterns
425
- - ✅ Considered alternatives
426
-
427
- **Avoid:**
428
- - ❌ Vague requirements ("make it better")
429
- - ❌ No research ("just do X")
430
- - ❌ Missing acceptance criteria
431
- - ❌ Ignoring existing patterns
432
-
433
- ---
434
-
435
- ## References
436
-
437
- - Plans directory: `plans/`
438
- - Execute plans: `/work`
439
- - Triage deferred items: `/triage`
1
+ ---
2
+ description: (Compound) Transform feature descriptions into well-structured project plans with solution search and pattern checks.
3
+ ---
4
+
5
+ # /plan-compound - Research and Plan Before Building
6
+
7
+ Transform feature descriptions, bug reports, or improvement ideas into well-structured plans that follow project conventions and best practices.
8
+
9
+ > **Why plan first?** Research before coding prevents building the wrong thing. A 30-minute plan saves hours of rework.
10
+ >
11
+ > **Note:** This is the Compound version with solution search and pattern checks. For quick planning, use `/plan`.
12
+
13
+
14
+ ## When To Use
15
+
16
+ - Before any feature taking >2 hours
17
+ - For bugs requiring investigation
18
+ - When exploring unfamiliar codebase areas
19
+ - Before architectural changes
20
+
21
+ ---
22
+
23
+ ## Workflow
24
+
25
+ ### Step 0: Search Existing Solutions (MANDATORY)
26
+
27
+ > [!CAUTION]
28
+ > **BLOCKING STEP.** You MUST complete this before proceeding. Skipping wastes time re-solving known problems.
29
+
30
+ **Run the auto-searcher:**
31
+ ```bash
32
+ // turbo
33
+ Call MCP `call_tool_logger_manager` { action: "logWorkflow", name: "/plan", outcome: "success" }
34
+ Call MCP `call_tool_compound_manager` { action: "search", terms: [ "{keyword1}" "{keyword2}"] }
35
+ ```
36
+
37
+ **See also:** `skills/compound-docs/SKILL.md` for advanced searching and pattern promotion.
38
+
39
+ **Output required:**
40
+ Copy the **table** AND the **update command** from the script output into your plan.
41
+
42
+ **If relevant solutions found:**
43
+ 1. List them in the plan under "## Prior Solutions"
44
+ 2. Execute the update command to track usage:
45
+ ```bash
46
+ // turbo
47
+ Call MCP `call_tool_compound_manager` { action: "updateRef", files: ["{paths from search output}"] }
48
+ ```
49
+
50
+ ---
51
+
52
+ #### ⛔ VALIDATION CHECKPOINT
53
+
54
+ Before proceeding to Step 0.5, confirm:
55
+
56
+ - [ ] Ran MCP `call_tool_compound_manager` { action: "search" } with relevant keywords?
57
+ - [ ] Reviewed all matching solutions (or confirmed none found)?
58
+ - [ ] Ran MCP `call_tool_compound_manager` { action: "updateRef" } if reusing any solution?
59
+
60
+ **If any box is unchecked:** Complete it now. Do NOT proceed.
61
+
62
+ ---
63
+
64
+ ### Step 0.5: Check Active Specs
65
+
66
+ Before creating a standalone plan, check if this work belongs to an active spec:
67
+
68
+ ```bash
69
+ ls docs/specs/*/README.md 2>/dev/null | grep -v templates
70
+ ```
71
+
72
+ **If active spec found:**
73
+ 1. Read `docs/specs/{name}/00-START-HERE.md` for context
74
+ 2. Determine if this plan belongs to the spec
75
+ 3. If yes, create plan in `docs/specs/{name}/plans/{phase}-{description}.md`
76
+ 4. Link to parent spec in plan header
77
+ 5. Reference current phase from spec's `03-tasks.md`
78
+
79
+ **If no active spec (or work is unrelated):** Proceed with standalone plan in `plans/`.
80
+
81
+ > [!TIP]
82
+ > Use `/specs` first if this is multi-week work that should have its own specification.
83
+
84
+ ### Step 0.6: Pattern Awareness (MANDATORY)
85
+
86
+ > [!CAUTION]
87
+ > **BLOCKING STEP.** Before creating your plan, review the critical patterns to avoid reinventing solutions to known problems.
88
+
89
+ ```bash
90
+ # Quick review of critical patterns
91
+ cat docs/solutions/patterns/critical-patterns.md | grep "^### Pattern"
92
+ ```
93
+
94
+ **Key patterns to consider during planning:**
95
+ - Pattern #9: Rigorous Planning (Multi-Order Thinking)
96
+ - Pattern #10: Atomic State Transitions
97
+ - Pattern #3: Actionable Items → Todo Files
98
+
99
+ **Why this matters:** These patterns exist because the same mistakes were made 3+ times. Consulting them now prevents wasted effort.
100
+
101
+ ---
102
+
103
+ ### Step 1: Clarify Requirements
104
+
105
+ If the request is vague, ask clarifying questions:
106
+
107
+ ```
108
+ Before I create a plan, I have some questions:
109
+
110
+ 1. What problem does this solve for users?
111
+ 2. Are there any constraints (timeline, tech stack, etc.)?
112
+ 3. Should this integrate with existing features?
113
+ ```
114
+
115
+ **Do not proceed until requirements are clear.**
116
+
117
+ ### Step 2: Research Phase
118
+
119
+ Gather context from multiple sources in parallel:
120
+
121
+ **Codebase Research:**
122
+ - [ ] Find similar implementations in the codebase
123
+ - [ ] Identify relevant files and patterns
124
+ - [ ] Check for existing utilities/helpers to reuse
125
+ - [ ] Review related tests for expected behavior
126
+
127
+ **Documentation Research:**
128
+ - [ ] Check project README, CLAUDE.md, or GEMINI.md
129
+ - [ ] Review any existing docs for the feature area
130
+ - [ ] Look for team conventions and standards
131
+
132
+ **External Research:**
133
+ - [ ] Find best practices for this type of feature
134
+ - [ ] Check framework documentation for recommended approaches
135
+ - [ ] Look for common pitfalls to avoid
136
+
137
+ **Reference Collection:**
138
+ Document all findings with specific references:
139
+ - File paths: `src/services/auth.ts:42`
140
+ - URLs: `https://docs.example.com/auth`
141
+ - Issues: `#123`, `#456`
142
+
143
+ ### Step 3: Analyze and Identify Gaps
144
+
145
+ Review collected research for:
146
+
147
+ - [ ] Edge cases not covered
148
+ - [ ] Potential conflicts with existing code
149
+ - [ ] Missing dependencies
150
+ - [ ] Security considerations
151
+ - [ ] Performance implications
152
+
153
+ ### Step 3.5: Deep Analysis (Think Hard)
154
+
155
+ > [!IMPORTANT]
156
+ > Don't rush to solutions. Invest time in rigorous analysis now to avoid costly surprises later.
157
+
158
+ **Multi-Order Thinking:**
159
+ - [ ] **1st order:** What does this change directly affect?
160
+ - [ ] **2nd order:** What depends on those affected things?
161
+ - [ ] **3rd order:** What cascading effects could occur?
162
+ - [ ] **4th order:** Could this affect unrelated systems through shared dependencies?
163
+
164
+ **Long-Term Implications:**
165
+ - [ ] How will this age in 6 months? 1 year?
166
+ - [ ] Does this create technical debt or reduce it?
167
+ - [ ] Is this approach reversible if we're wrong?
168
+ - [ ] Will future maintainers understand the "why"?
169
+
170
+ **Edge Cases (Leave No Stone Unturned):**
171
+ - [ ] Empty/null/undefined inputs
172
+ - [ ] Boundary conditions (min, max, exactly-at-limit)
173
+ - [ ] Concurrent/race conditions
174
+ - [ ] Failure modes (network, database, external services)
175
+ - [ ] User behavior extremes (fast clicking, back button, refresh)
176
+ - [ ] Data migration scenarios
177
+ - [ ] Rollback scenarios
178
+
179
+ **Stakeholder Impact Analysis:**
180
+ - [ ] **End Users:** Will this change behavior they rely on? UX disruption?
181
+ - [ ] **Other Developers:** Breaking API changes? Documentation needs?
182
+ - [ ] **Operations/Support:** New failure modes? Monitoring/alerting updates?
183
+ - [ ] **Downstream Systems:** Integrations affected? Consumer contracts broken?
184
+ - [ ] **Business Stakeholders:** Timeline/scope implications? Resource needs?
185
+ - [ ] **Security/Compliance:** Data handling changes? Audit requirements?
186
+
187
+ ### Step 4: Choose Detail Level
188
+
189
+ **📄 MINIMAL** - Simple bugs, small improvements
190
+ ```markdown
191
+ ## Problem
192
+ [Brief description]
193
+
194
+ ## Solution
195
+ [Approach]
196
+
197
+ ## Acceptance Criteria
198
+ - [ ] Requirement 1
199
+ - [ ] Requirement 2
200
+ ```
201
+
202
+ **📋 STANDARD** - Most features
203
+ ```markdown
204
+ ## Overview
205
+ [Comprehensive description]
206
+
207
+ ## Problem Statement
208
+ [Why this matters]
209
+
210
+ ## Proposed Solution
211
+ [Technical approach with code examples]
212
+
213
+ ## Acceptance Criteria
214
+ - [ ] Detailed requirements
215
+
216
+ ## Technical Considerations
217
+ - Dependencies
218
+ - Risks
219
+ - Alternatives considered
220
+
221
+ ## References
222
+ - [Links to research]
223
+ ```
224
+
225
+ **📚 DETAILED** - Complex features, architectural changes
226
+ All of STANDARD plus:
227
+ - Implementation phases
228
+ - Rollback strategy
229
+ - Migration plan
230
+ - Testing strategy
231
+ - Monitoring requirements
232
+
233
+ ### Step 5.5: Register Architectural Decisions
234
+
235
+ > [!IMPORTANT]
236
+ > If your plan makes long-term architectural choices (library swaps, schema changes,
237
+ > pattern adoptions), create ADRs to persist them.
238
+
239
+ **Triggers for ADR creation:**
240
+ - Choosing between competing technologies/libraries
241
+ - Defining new patterns or conventions
242
+ - Making breaking changes with long-term impact
243
+ - Decisions that future developers need to understand "why"
244
+
245
+ **If architectural decision made:**
246
+ ```bash
247
+ # Get next ADR ID
248
+ next_id=$(printf "%03d" $(( $(ls -1 docs/decisions/*.md 2>/dev/null | xargs -n1 basename | grep -E '^[0-9]{3}-' | wc -l) + 1 )))
249
+ cp docs/decisions/adr-template.md docs/decisions/${next_id}-{decision-slug}.md
250
+ ```
251
+
252
+ **Link in plan:**
253
+ Add `## Architectural Decisions: ADR-{NNN}` section referencing the new ADR.
254
+
255
+ ### Step 5.9: Create Plan Document
256
+
257
+ Create plan file: `plans/{feature-name}.md`
258
+
259
+ **Structure:**
260
+ ```markdown
261
+ # {Feature Title}
262
+
263
+ > Created: {DATE}
264
+ > Status: Draft
265
+
266
+ ## Summary
267
+ [One-paragraph overview]
268
+
269
+ ## Problem Statement
270
+ [What problem this solves]
271
+
272
+ ## Research Findings
273
+
274
+ ### Codebase Patterns
275
+ [Relevant existing code with file:line references]
276
+
277
+ ### Best Practices
278
+ [External research findings]
279
+
280
+ ## Proposed Solution
281
+
282
+ ### Approach
283
+ [Technical approach]
284
+
285
+ ### Code Examples
286
+ \`\`\`{language}
287
+ // Example implementation
288
+ \`\`\`
289
+
290
+ ## Acceptance Criteria
291
+ - [ ] Criterion 1
292
+ - [ ] Criterion 2
293
+
294
+ ## Acceptance Criteria & Testing (Nyquist Validation Layer)
295
+ > **Important:** Map each requirement to a specific automated test or manual verification command *before* execution.
296
+ - [ ] Criterion 1 -> `npm test -- -t "criterion 1"`
297
+ - [ ] Criterion 2 -> `pytest -k "criterion_2"`
298
+ - [ ] Test scaffolding required: [List tests that need to be created]
299
+
300
+ ## Technical Considerations
301
+
302
+ ### Dependencies
303
+ - [Required packages/services]
304
+
305
+ ### Risks
306
+ - [Potential issues]
307
+
308
+ ### Alternatives Considered
309
+ - [Other approaches and why rejected]
310
+
311
+ ## Implementation Steps
312
+
313
+ Tasks tracked in [03-tasks.md](../03-tasks.md#phase-{N}).
314
+
315
+ **Approach:**
316
+ - Task 1: [Technical details]
317
+ - Task 2: [Technical details]
318
+
319
+ ## References
320
+ - [Research links]
321
+ - [Related issues]
322
+ ```
323
+
324
+ ### Step 6: Create Plans Directory (if needed)
325
+
326
+ ```bash
327
+ mkdir -p plans
328
+ ```
329
+
330
+ ### Step 7: Offer Next Steps
331
+
332
+ ```
333
+ ✓ Plan created: plans/{feature-name}.md
334
+
335
+ What's next?
336
+ 1. Start work - Execute this plan with /work
337
+ 2. Review plan - Get feedback before starting
338
+ 3. Refine plan - Add more detail
339
+ 4. Nothing for now
340
+ ```
341
+
342
+ ### Step 8: Create Todos for Deferred Scope
343
+
344
+ > [!IMPORTANT]
345
+ > If the plan identifies "out of scope" or "future work" items, create todo files for them NOW.
346
+
347
+ **Check for deferred items:**
348
+ - [ ] Did you mark anything as "out of scope"?
349
+ - [ ] Are there "nice to have" features for later?
350
+ - [ ] Did research reveal related improvements?
351
+
352
+ **If YES:**
353
+ ```bash
354
+ # Create todo for each deferred item
355
+ Call MCP `call_tool_todo_manager` { action: "create", priority: "p3", title: "{description}", description: "TODO description" }
356
+ "Deferred item from plan {feature-name}. This feature was identified as valuable but out of scope for the initial implementation." \
357
+ "Implement feature" "Verify functionality"
358
+ ```
359
+
360
+ **Before adding plan references to the todo:**
361
+
362
+ > [!CAUTION]
363
+ > Verify referential integrity to prevent dead links.
364
+
365
+ **If referencing this plan in the todo:**
366
+ ```bash
367
+ # Verify the plan file exists
368
+ if [ ! -f "plans/{feature-name}.md" ]; then
369
+ echo "❌ ERROR: Plan file does not exist. Cannot create reference."
370
+ exit 1
371
+ fi
372
+ ```
373
+
374
+ **Alternative references** (if plan was not persisted):
375
+ - Specs: `../docs/specs/{name}/README.md`
376
+ - Solutions: `../docs/solutions/{category}/{solution-name}.md`
377
+ - ADRs: `../docs/decisions/{nnn}-{decision}.md`
378
+
379
+ **See also:** `skills/file-todos/SKILL.md` for full todo management workflows.
380
+
381
+ ---
382
+
383
+ ### Phase 5: Completion & Handoff
384
+
385
+ #### Step 1: Establish Terminal UI State
386
+
387
+ > [!IMPORTANT]
388
+ > **Visual Completion Signal**
389
+ > Call `task_boundary` one last time to signal completion in the user's UI. This prevents the "task" from appearing active after you've finished.
390
+
391
+ ```javascript
392
+ await task_boundary({
393
+ TaskName: "[COMPLETED] Planning: {Feature Name}",
394
+ TaskStatus: "Plan created and ready for review or execution.",
395
+ Mode: "VERIFICATION",
396
+ TaskSummary: "Completed planning for {feature}. Created comprehensive plan with acceptance criteria, research findings, and implementation steps."
397
+ });
398
+ ```
399
+
400
+ #### Step 2: Mandatory Handoff
401
+
402
+ > [!IMPORTANT]
403
+ > **Exit Transition**
404
+ > Do not stop here. Offer the user clear paths to the next logical workflow.
405
+
406
+ ```bash
407
+ ✓ Plan created: plans/{feature-name}.md
408
+
409
+ Next steps:
410
+ 1. /plan_review - Get feedback on plan quality before execution
411
+ 2. /work - Start implementing (if plan is simple and you're confident)
412
+ 3. Refine plan - Add more detail based on additional research
413
+ 4. Create todos - For any deferred scope identified
414
+ ```
415
+
416
+ ---
417
+
418
+ ## Quality Guidelines
419
+
420
+ **Good plans have:**
421
+ - ✅ Clear problem statement (not just "what" but "why")
422
+ - ✅ Research with specific file references
423
+ - ✅ Concrete acceptance criteria (testable)
424
+ - ✅ Code examples following existing patterns
425
+ - ✅ Considered alternatives
426
+
427
+ **Avoid:**
428
+ - ❌ Vague requirements ("make it better")
429
+ - ❌ No research ("just do X")
430
+ - ❌ Missing acceptance criteria
431
+ - ❌ Ignoring existing patterns
432
+
433
+ ---
434
+
435
+ ## References
436
+
437
+ - Plans directory: `plans/`
438
+ - Execute plans: `/work`
439
+ - Triage deferred items: `/triage`