specialist-agent 1.5.0 → 1.7.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 (180) hide show
  1. package/.claude-plugin/marketplace.json +77 -0
  2. package/.claude-plugin/plugin.json +43 -0
  3. package/.codex/INSTALL.md +113 -0
  4. package/.cursor-plugin/marketplace.json +9 -0
  5. package/.cursor-plugin/plugin.json +35 -0
  6. package/.opencode/INSTALL.md +123 -0
  7. package/README.md +204 -263
  8. package/agents/analyst-lite.md +48 -0
  9. package/agents/analyst.md +391 -0
  10. package/agents/api-lite.md +43 -0
  11. package/agents/api.md +145 -0
  12. package/agents/cloud-lite.md +6 -1
  13. package/agents/cloud.md +26 -1
  14. package/agents/data-lite.md +6 -1
  15. package/agents/data.md +26 -1
  16. package/agents/debugger-lite.md +46 -0
  17. package/agents/debugger.md +406 -0
  18. package/agents/deps-lite.md +41 -0
  19. package/agents/deps.md +206 -0
  20. package/agents/designer-lite.md +6 -1
  21. package/agents/designer.md +26 -1
  22. package/agents/devops-lite.md +6 -1
  23. package/agents/devops.md +26 -1
  24. package/agents/docs-lite.md +42 -0
  25. package/agents/docs.md +197 -0
  26. package/agents/executor-lite.md +61 -0
  27. package/agents/executor.md +456 -0
  28. package/agents/explorer-lite.md +6 -1
  29. package/agents/explorer.md +26 -1
  30. package/agents/finance-lite.md +6 -1
  31. package/agents/finance.md +26 -1
  32. package/agents/i18n-lite.md +44 -0
  33. package/agents/i18n.md +198 -0
  34. package/agents/legal-lite.md +113 -0
  35. package/agents/legal.md +301 -0
  36. package/agents/memory.md +240 -0
  37. package/agents/orchestrator-lite.md +40 -0
  38. package/agents/orchestrator.md +387 -0
  39. package/agents/pair-lite.md +38 -0
  40. package/agents/pair.md +308 -0
  41. package/agents/perf-lite.md +42 -0
  42. package/agents/perf.md +141 -0
  43. package/agents/planner-lite.md +59 -0
  44. package/agents/planner.md +265 -0
  45. package/agents/refactor-lite.md +42 -0
  46. package/agents/refactor.md +178 -0
  47. package/agents/scout-lite.md +37 -0
  48. package/agents/scout.md +222 -0
  49. package/agents/security-lite.md +6 -1
  50. package/agents/security.md +26 -1
  51. package/agents/starter-lite.md +6 -1
  52. package/agents/starter.md +26 -1
  53. package/agents/tdd-lite.md +43 -0
  54. package/agents/tdd.md +317 -0
  55. package/agents/tester-lite.md +6 -1
  56. package/agents/tester.md +26 -1
  57. package/cli/index.mjs +636 -15
  58. package/hooks/after-review.mjs +130 -0
  59. package/hooks/after-task.mjs +117 -0
  60. package/hooks/before-plan.mjs +155 -0
  61. package/hooks/before-review.mjs +139 -0
  62. package/hooks/hooks.json +81 -0
  63. package/hooks/native/auto-dispatch.mjs +197 -0
  64. package/hooks/native/auto-format.mjs +193 -0
  65. package/hooks/native/security-config.json +31 -0
  66. package/hooks/native/security-guard.mjs +267 -0
  67. package/hooks/native/session-context.mjs +136 -0
  68. package/hooks/native/settings-template.json +50 -0
  69. package/hooks/native/utils.mjs +62 -0
  70. package/hooks/on-error.mjs +129 -0
  71. package/hooks/session-end.mjs +185 -0
  72. package/hooks/session-start.mjs +154 -0
  73. package/package.json +16 -3
  74. package/packs/nextjs/CLAUDE.md +1 -0
  75. package/packs/nextjs/agents/builder.md +49 -1
  76. package/packs/nextjs/agents/doctor.md +95 -4
  77. package/packs/nextjs/agents/migrator.md +49 -1
  78. package/packs/nextjs/agents/reviewer.md +118 -3
  79. package/packs/nextjs/agents-lite/builder.md +6 -1
  80. package/packs/nextjs/agents-lite/doctor.md +6 -1
  81. package/packs/nextjs/agents-lite/migrator.md +6 -1
  82. package/packs/nextjs/agents-lite/reviewer.md +6 -1
  83. package/packs/nextjs/skills/dev-create-component/SKILL.md +1 -1
  84. package/packs/nextjs/skills/dev-create-hook/SKILL.md +1 -1
  85. package/packs/nextjs/skills/dev-create-module/SKILL.md +1 -1
  86. package/packs/nextjs/skills/dev-create-service/SKILL.md +1 -1
  87. package/packs/nextjs/skills/dev-create-test/SKILL.md +1 -1
  88. package/packs/nextjs/skills/dev-generate-types/SKILL.md +1 -1
  89. package/packs/nextjs/skills/docs-onboard/SKILL.md +1 -1
  90. package/packs/nextjs/skills/migration-migrate-component/SKILL.md +1 -1
  91. package/packs/nextjs/skills/migration-migrate-module/SKILL.md +1 -1
  92. package/packs/nextjs/skills/review-check-architecture/SKILL.md +1 -1
  93. package/packs/nextjs/skills/review-fix-violations/SKILL.md +1 -1
  94. package/packs/nextjs/skills/review-review/SKILL.md +1 -1
  95. package/packs/react/CLAUDE.md +1 -0
  96. package/packs/react/agents/builder.md +49 -1
  97. package/packs/react/agents/doctor.md +132 -13
  98. package/packs/react/agents/migrator.md +49 -1
  99. package/packs/react/agents/reviewer.md +138 -9
  100. package/packs/react/agents-lite/builder.md +6 -1
  101. package/packs/react/agents-lite/doctor.md +6 -1
  102. package/packs/react/agents-lite/migrator.md +6 -1
  103. package/packs/react/agents-lite/reviewer.md +6 -1
  104. package/packs/react/skills/dev-create-component/SKILL.md +1 -1
  105. package/packs/react/skills/dev-create-hook/SKILL.md +1 -1
  106. package/packs/react/skills/dev-create-module/SKILL.md +1 -1
  107. package/packs/react/skills/dev-create-service/SKILL.md +1 -1
  108. package/packs/react/skills/dev-create-test/SKILL.md +1 -1
  109. package/packs/react/skills/dev-generate-types/SKILL.md +1 -1
  110. package/packs/react/skills/docs-onboard/SKILL.md +1 -1
  111. package/packs/react/skills/migration-migrate-component/SKILL.md +1 -1
  112. package/packs/react/skills/migration-migrate-module/SKILL.md +1 -1
  113. package/packs/react/skills/review-check-architecture/SKILL.md +1 -1
  114. package/packs/react/skills/review-fix-violations/SKILL.md +1 -1
  115. package/packs/react/skills/review-review/SKILL.md +1 -1
  116. package/packs/svelte/CLAUDE.md +1 -0
  117. package/packs/svelte/agents/builder.md +47 -1
  118. package/packs/svelte/agents/doctor.md +93 -4
  119. package/packs/svelte/agents/migrator.md +47 -1
  120. package/packs/svelte/agents/reviewer.md +116 -3
  121. package/packs/svelte/agents-lite/builder.md +6 -1
  122. package/packs/svelte/agents-lite/doctor.md +6 -1
  123. package/packs/svelte/agents-lite/migrator.md +6 -1
  124. package/packs/svelte/agents-lite/reviewer.md +6 -1
  125. package/packs/svelte/skills/dev-create-component/SKILL.md +1 -1
  126. package/packs/svelte/skills/dev-create-module/SKILL.md +1 -1
  127. package/packs/svelte/skills/dev-create-service/SKILL.md +1 -1
  128. package/packs/svelte/skills/dev-create-store/SKILL.md +1 -1
  129. package/packs/svelte/skills/dev-create-test/SKILL.md +1 -1
  130. package/packs/svelte/skills/dev-generate-types/SKILL.md +1 -1
  131. package/packs/svelte/skills/docs-onboard/SKILL.md +1 -1
  132. package/packs/svelte/skills/migration-migrate-component/SKILL.md +1 -1
  133. package/packs/svelte/skills/migration-migrate-module/SKILL.md +1 -1
  134. package/packs/svelte/skills/review-check-architecture/SKILL.md +1 -1
  135. package/packs/svelte/skills/review-fix-violations/SKILL.md +1 -1
  136. package/packs/svelte/skills/review-review/SKILL.md +1 -1
  137. package/packs/vue/CLAUDE.md +1 -0
  138. package/packs/vue/agents/builder.md +49 -1
  139. package/packs/vue/agents/doctor.md +132 -13
  140. package/packs/vue/agents/migrator.md +49 -1
  141. package/packs/vue/agents/reviewer.md +138 -9
  142. package/packs/vue/agents-lite/builder.md +6 -1
  143. package/packs/vue/agents-lite/doctor.md +6 -1
  144. package/packs/vue/agents-lite/migrator.md +6 -1
  145. package/packs/vue/agents-lite/reviewer.md +6 -1
  146. package/packs/vue/skills/dev-create-component/SKILL.md +1 -1
  147. package/packs/vue/skills/dev-create-composable/SKILL.md +1 -1
  148. package/packs/vue/skills/dev-create-module/SKILL.md +1 -1
  149. package/packs/vue/skills/dev-create-service/SKILL.md +1 -1
  150. package/packs/vue/skills/dev-create-test/SKILL.md +1 -1
  151. package/packs/vue/skills/dev-generate-types/SKILL.md +1 -1
  152. package/packs/vue/skills/docs-onboard/SKILL.md +1 -1
  153. package/packs/vue/skills/migration-migrate-component/SKILL.md +1 -1
  154. package/packs/vue/skills/migration-migrate-module/SKILL.md +1 -1
  155. package/packs/vue/skills/review-check-architecture/SKILL.md +1 -1
  156. package/packs/vue/skills/review-fix-violations/SKILL.md +1 -1
  157. package/packs/vue/skills/review-review/SKILL.md +1 -1
  158. package/skills/audit/SKILL.md +169 -0
  159. package/skills/brainstorm/SKILL.md +245 -0
  160. package/skills/checkpoint/SKILL.md +209 -0
  161. package/skills/debug/SKILL.md +210 -0
  162. package/skills/estimate/SKILL.md +145 -0
  163. package/skills/finish/SKILL.md +211 -0
  164. package/skills/health/SKILL.md +242 -0
  165. package/skills/learn/SKILL.md +260 -0
  166. package/skills/migrate-framework/SKILL.md +172 -0
  167. package/skills/onboard/SKILL.md +168 -0
  168. package/skills/plan/SKILL.md +132 -0
  169. package/skills/recall/SKILL.md +150 -0
  170. package/skills/remember/SKILL.md +158 -0
  171. package/skills/tdd/SKILL.md +156 -0
  172. package/skills/tutorial/SKILL.md +346 -0
  173. package/skills/verify/SKILL.md +168 -0
  174. package/skills/worktree/SKILL.md +168 -0
  175. package/skills/write-skill/SKILL.md +213 -0
  176. package/templates/industry/ecommerce.md +127 -0
  177. package/templates/industry/fintech.md +161 -0
  178. package/templates/industry/saas.md +134 -0
  179. package/templates/session-memory.json +48 -0
  180. package/templates/skill-template/SKILL.md +90 -0
@@ -0,0 +1,169 @@
1
+ ---
2
+ name: audit
3
+ description: "Use when you need a comprehensive code audit covering security, performance, architecture, and dependencies before a release, major refactor, or compliance review."
4
+ user-invocable: true
5
+ argument-hint: "[path or module]"
6
+ allowed-tools: Read, Bash, Glob, Grep
7
+ ---
8
+
9
+ # /audit — Multi-Agent Code Audit
10
+
11
+ Run a comprehensive audit that combines security, performance, architecture, and dependency analysis in one pass.
12
+
13
+ **Target:** $ARGUMENTS
14
+
15
+ ## When to Use
16
+
17
+ - Before a production release
18
+ - After a major refactor
19
+ - During compliance reviews (SOC2, ISO 27001)
20
+ - When onboarding to an unfamiliar codebase
21
+ - When technical debt feels unmanageable
22
+ - NOT for: single-file reviews (use `@reviewer` instead)
23
+
24
+ ## Workflow
25
+
26
+ ### Step 1: Scope Definition
27
+
28
+ Determine audit scope:
29
+
30
+ ```
31
+ IF $ARGUMENTS is a path → audit that path
32
+ IF $ARGUMENTS is a module name → find and audit the module
33
+ IF $ARGUMENTS is empty → audit entire project
34
+ ```
35
+
36
+ Read the project structure. Identify:
37
+ - Total files and lines of code
38
+ - Primary language and framework
39
+ - Test coverage indicators
40
+ - CI/CD configuration
41
+
42
+ ### Step 2: Security Audit
43
+
44
+ Check for OWASP Top 10 vulnerabilities:
45
+
46
+ | Check | What to Look For |
47
+ |-------|------------------|
48
+ | Injection | SQL/NoSQL injection, command injection, XSS |
49
+ | Auth | Hardcoded secrets, weak JWT config, missing CSRF |
50
+ | Access Control | Missing auth checks, IDOR, privilege escalation |
51
+ | Cryptography | Weak algorithms, plaintext passwords, missing encryption |
52
+ | Configuration | Debug mode in production, verbose errors, default credentials |
53
+ | Dependencies | Known CVEs in packages |
54
+ | Data Exposure | Sensitive data in logs, responses, or error messages |
55
+
56
+ Run if available:
57
+ ```bash
58
+ npm audit --json 2>/dev/null || true
59
+ npx eslint --format json $TARGET 2>/dev/null || true
60
+ ```
61
+
62
+ ### Step 3: Architecture Audit
63
+
64
+ Check structural integrity:
65
+
66
+ | Check | Criteria |
67
+ |-------|----------|
68
+ | Layer separation | Services don't import from components |
69
+ | Circular dependencies | No import cycles |
70
+ | Naming conventions | Consistent file/function naming |
71
+ | Type safety | TypeScript strict mode, no `any` abuse |
72
+ | Error handling | Try/catch at boundaries, custom error classes |
73
+ | API contracts | DTOs/schemas at boundaries |
74
+
75
+ ### Step 4: Performance Audit
76
+
77
+ Check for performance issues:
78
+
79
+ | Check | What to Look For |
80
+ |-------|------------------|
81
+ | Bundle size | Large imports, missing tree-shaking |
82
+ | N+1 queries | Database calls in loops |
83
+ | Memory leaks | Uncleaned listeners, subscriptions, timers |
84
+ | Rendering | Unnecessary re-renders, missing memoization |
85
+ | Network | Missing caching, redundant API calls |
86
+ | Assets | Unoptimized images, missing lazy loading |
87
+
88
+ ### Step 5: Dependency Audit
89
+
90
+ Check dependency health:
91
+
92
+ | Check | What to Look For |
93
+ |-------|------------------|
94
+ | Outdated | Major versions behind |
95
+ | Vulnerable | Known CVEs |
96
+ | Unused | Installed but not imported |
97
+ | Duplicate | Multiple versions of same package |
98
+ | License | Incompatible licenses (GPL in MIT project) |
99
+
100
+ Run if available:
101
+ ```bash
102
+ npx depcheck --json 2>/dev/null || true
103
+ ```
104
+
105
+ ### Step 6: Report Generation
106
+
107
+ Compile findings into a structured report with severity ratings.
108
+
109
+ ## Severity Levels
110
+
111
+ | Level | Description | Action |
112
+ |-------|-------------|--------|
113
+ | CRITICAL | Security vulnerability or data loss risk | Fix immediately |
114
+ | HIGH | Architecture violation or major performance issue | Fix before release |
115
+ | MEDIUM | Code quality issue or minor vulnerability | Fix in next sprint |
116
+ | LOW | Style issue or minor improvement | Fix when convenient |
117
+ | INFO | Observation or recommendation | Consider for future |
118
+
119
+ ## Verification Protocol
120
+
121
+ **Before claiming audit is complete:**
122
+
123
+ 1. All 4 audit domains were checked (security, architecture, performance, dependencies)
124
+ 2. Every finding has a severity level
125
+ 3. Every CRITICAL/HIGH finding has a specific remediation step
126
+ 4. Automated tools were run where available (npm audit, eslint, depcheck)
127
+ 5. Report includes line-level references for each finding
128
+
129
+ ## Anti-Rationalization
130
+
131
+ | Excuse | Reality |
132
+ |--------|---------|
133
+ | "No security issues found" | Absence of evidence is not evidence of absence. Did you check all OWASP categories? |
134
+ | "Architecture looks fine" | Did you trace actual imports, or just scan filenames? |
135
+ | "Dependencies are up to date" | Did you run `npm audit`? Check for unused deps? |
136
+ | "Performance seems okay" | Did you check for N+1 queries, memory leaks, bundle size? |
137
+ | "The codebase is too large to audit fully" | Scope down to critical paths (auth, payments, data). Never skip security. |
138
+
139
+ ## Rules
140
+
141
+ 1. **Check all 4 domains** — Skipping one defeats the purpose
142
+ 2. **Run automated tools** — Never skip `npm audit` or linting if available
143
+ 3. **Severity must be justified** — Every rating needs evidence
144
+ 4. **Remediation is required** — Findings without fix suggestions are useless
145
+ 5. **Line references are required** — Point to exact files and lines
146
+ 6. **Never assume safety** — Verify, don't trust
147
+
148
+ ## Output
149
+
150
+ ```
151
+ ──── /audit ────
152
+ Target: [path or module]
153
+ Scope: [X files, Y lines]
154
+
155
+ Security: [X critical, Y high, Z medium]
156
+ Architecture: [X high, Y medium]
157
+ Performance: [X high, Y medium]
158
+ Dependencies: [X vulnerable, Y outdated, Z unused]
159
+
160
+ Overall Score: [0-100]
161
+ Risk Level: [CRITICAL | HIGH | MEDIUM | LOW]
162
+
163
+ Top Findings:
164
+ 1. [CRITICAL] [description] — [file:line]
165
+ 2. [HIGH] [description] — [file:line]
166
+ 3. [HIGH] [description] — [file:line]
167
+
168
+ Full report: [inline below]
169
+ ```
@@ -0,0 +1,245 @@
1
+ ---
2
+ name: brainstorm
3
+ description: "Use when starting a complex feature, exploring unclear requirements, or needing to challenge assumptions before committing to a design — before /plan."
4
+ user-invocable: true
5
+ argument-hint: "[idea or feature description]"
6
+ allowed-tools: Read, Glob, Grep
7
+ ---
8
+
9
+ # /brainstorm — Socratic Brainstorming
10
+
11
+ Refine ideas through questioning before committing to a plan. Better questions lead to better designs.
12
+
13
+ **Target:** $ARGUMENTS
14
+
15
+ ## When to Use
16
+
17
+ - Complex features with multiple valid approaches
18
+ - Unclear or ambiguous requirements
19
+ - Greenfield design (no existing patterns to follow)
20
+ - When stakeholders disagree on direction
21
+ - Before `/plan` for COMPLEX tasks
22
+ - NOT for: bug fixes, trivial changes, tasks with clear specs
23
+
24
+ ## Workflow
25
+
26
+ ### Step 1: Discovery — Understand the Problem Space
27
+
28
+ Ask open-ended questions to map what's being built:
29
+
30
+ 1. **Read relevant code** — Ground the discussion in reality
31
+ 2. **Ask foundational questions:**
32
+ - "What problem does this solve for the user?"
33
+ - "Who are the primary users? Secondary users?"
34
+ - "What does success look like? How will we measure it?"
35
+ - "What's explicitly out of scope?"
36
+ - "Are there existing patterns in the codebase we should follow?"
37
+ 3. **Map the domain** — Identify entities, relationships, boundaries
38
+
39
+ **Output:**
40
+ ```markdown
41
+ ## Discovery
42
+
43
+ Problem: [clear problem statement]
44
+ Users: [who benefits]
45
+ Success criteria: [measurable outcomes]
46
+ Scope boundaries: [what's in, what's out]
47
+ Existing patterns: [relevant code already in the project]
48
+ ```
49
+
50
+ **BLOCKED** until problem space is understood.
51
+
52
+ ### Step 2: Clarification — Challenge Vague Terms
53
+
54
+ Force precision on ambiguous language:
55
+
56
+ 1. **Identify vague terms** — "fast", "scalable", "simple", "flexible"
57
+ 2. **Ask for specifics:**
58
+ - "When you say 'fast', what response time is acceptable?"
59
+ - "When you say 'scalable', how many concurrent users?"
60
+ - "What do you mean by 'simple'? Simple to use or simple to implement?"
61
+ 3. **Resolve contradictions** — "You want it fast AND fully validated?"
62
+ 4. **Document decisions** — Each clarification becomes a constraint
63
+
64
+ **Output:**
65
+ ```markdown
66
+ ## Clarifications
67
+
68
+ | Term | Clarified As |
69
+ |------|-------------|
70
+ | "fast" | < 200ms p95 response time |
71
+ | "scalable" | 10k concurrent users |
72
+ | "simple" | Minimal UI, max 3 clicks |
73
+ ```
74
+
75
+ **BLOCKED** until all vague terms are defined.
76
+
77
+ ### Step 3: Assumption Testing — Surface Hidden Premises
78
+
79
+ List and challenge implicit assumptions:
80
+
81
+ 1. **Extract assumptions from requirements:**
82
+ - "We're assuming users have accounts"
83
+ - "We're assuming the API is stable"
84
+ - "We're assuming this runs in the browser"
85
+ 2. **Test each assumption:**
86
+ - "What if this assumption is wrong?"
87
+ - "Is there evidence supporting this?"
88
+ - "What's the fallback if this changes?"
89
+ 3. **Classify assumptions:**
90
+ - **Validated** — Evidence exists
91
+ - **Risky** — No evidence, high impact if wrong
92
+ - **Safe** — Low impact even if wrong
93
+
94
+ **Output:**
95
+ ```markdown
96
+ ## Assumptions Tested
97
+
98
+ | # | Assumption | Status | Impact if Wrong |
99
+ |---|-----------|--------|-----------------|
100
+ | 1 | Users have accounts | Validated | HIGH |
101
+ | 2 | API response < 100ms | Risky | MEDIUM |
102
+ | 3 | Single timezone | Safe | LOW |
103
+
104
+ Risky assumptions to address: [list]
105
+ ```
106
+
107
+ **BLOCKED** until at least 5 assumptions are identified and tested.
108
+
109
+ ### Step 4: Alternative Generation — Explore Options
110
+
111
+ Generate multiple approaches:
112
+
113
+ 1. **Produce at least 3 alternatives:**
114
+ - **Approach A** — The obvious solution
115
+ - **Approach B** — The simpler alternative
116
+ - **Approach C** — The scalable/future-proof option
117
+ 2. **For each approach, document:**
118
+ - Description (2-3 sentences)
119
+ - Pros (concrete benefits)
120
+ - Cons (concrete drawbacks)
121
+ - Risk level (LOW/MEDIUM/HIGH)
122
+ - Estimated effort
123
+ 3. **Compare in table format**
124
+
125
+ **Output:**
126
+ ```markdown
127
+ ## Alternatives
128
+
129
+ | Aspect | Approach A | Approach B | Approach C |
130
+ |--------|-----------|-----------|-----------|
131
+ | Description | [desc] | [desc] | [desc] |
132
+ | Pros | [list] | [list] | [list] |
133
+ | Cons | [list] | [list] | [list] |
134
+ | Risk | MEDIUM | LOW | HIGH |
135
+ | Effort | ~2 days | ~1 day | ~4 days |
136
+
137
+ Recommendation: Approach [X] because [rationale]
138
+ ```
139
+
140
+ **BLOCKED** until 3+ alternatives with pros/cons exist.
141
+
142
+ ### Step 5: Convergence — Synthesize and Validate
143
+
144
+ Present the design for approval in digestible sections:
145
+
146
+ 1. **Synthesize chosen approach** into a design summary
147
+ 2. **Present in sections** — Each section gets user approval:
148
+ - Section 1: Problem & scope (approve?)
149
+ - Section 2: Technical approach (approve?)
150
+ - Section 3: Data model / API design (approve?)
151
+ - Section 4: Key decisions & trade-offs (approve?)
152
+ 3. **Document final design** — Ready for `/plan` handoff
153
+
154
+ **Output:**
155
+ ```markdown
156
+ ## Design Summary
157
+
158
+ ### Section 1: Problem & Scope ✓
159
+ [approved summary]
160
+
161
+ ### Section 2: Technical Approach ✓
162
+ [approved summary]
163
+
164
+ ### Section 3: Data Model ✓
165
+ [approved summary]
166
+
167
+ ### Section 4: Key Decisions ✓
168
+ [approved summary]
169
+ ```
170
+
171
+ ## Integration with @planner
172
+
173
+ ```
174
+ IF @planner classifies task as COMPLEX:
175
+ → Suggest /brainstorm before generating plan
176
+ → Use brainstorm output as input for design doc
177
+
178
+ IF user says "skip brainstorming" or "just plan":
179
+ → Skip directly to /plan
180
+
181
+ IF /brainstorm output exists:
182
+ → @planner uses it as foundation (don't re-ask questions)
183
+ ```
184
+
185
+ ## Verification Protocol
186
+
187
+ **Before claiming brainstorm is complete:**
188
+
189
+ 1. At least 3 alternatives were generated with pros/cons
190
+ 2. At least 5 assumptions were identified and tested
191
+ 3. All vague terms were clarified with measurable definitions
192
+ 4. User explicitly approved the design direction (section by section)
193
+ 5. Output is structured for direct handoff to `/plan`
194
+
195
+ ## Anti-Rationalization
196
+
197
+ | Excuse | Reality |
198
+ |--------|---------|
199
+ | "I already know the best approach" | You know ONE approach. Brainstorming reveals BETTER ones you haven't considered. |
200
+ | "The requirements are clear" | Clear to YOU is not clear to stakeholders. Test your assumptions. |
201
+ | "This is wasting time" | 10 minutes of questioning saves hours of wrong-direction implementation. |
202
+ | "Too many options will paralyze" | 3 options with clear pros/cons ENABLE informed decisions. Analysis paralysis comes from unclear options, not from having them. |
203
+ | "The user already decided" | Clarify what they DECIDED vs what they ASSUMED. Often they assumed more than they decided. |
204
+ | "Questions will frustrate the user" | Users prefer upfront questions over rework later. Frustration comes from building the wrong thing. |
205
+
206
+ ## Rules
207
+
208
+ 1. **Never skip assumption testing** — Hidden assumptions cause the biggest failures
209
+ 2. **Always generate 3+ alternatives** — One option is not a choice
210
+ 3. **Never proceed without user approval** — Design is collaborative
211
+ 4. **Keep questions focused** — No irrelevant tangents or philosophical debates
212
+ 5. **Ground in codebase** — Read actual files, don't hypothesize about code that exists
213
+ 6. **Output must be actionable** — Ready for `/plan` handoff, not abstract musings
214
+ 7. **Present in sections** — Digestible chunks, not a wall of text
215
+
216
+ ## Output
217
+
218
+ ```
219
+ ──── /brainstorm ────
220
+ Topic: $ARGUMENTS
221
+
222
+ Phase 1: Discovery
223
+ Questions asked: [N]
224
+ Problem defined: ✓
225
+
226
+ Phase 2: Clarification
227
+ Vague terms resolved: [N]
228
+
229
+ Phase 3: Assumptions
230
+ Identified: [N]
231
+ Validated: [N]
232
+ Risky: [N]
233
+
234
+ Phase 4: Alternatives
235
+ Generated: [N]
236
+ Recommended: Approach [X]
237
+
238
+ Phase 5: Design
239
+ Sections approved: [N/N]
240
+
241
+ ──── Brainstorm Summary ────
242
+ Design direction: [1-sentence summary]
243
+ Key decisions: [N]
244
+ Ready for: /plan $ARGUMENTS
245
+ ```
@@ -0,0 +1,209 @@
1
+ ---
2
+ name: checkpoint
3
+ description: "Use when about to start risky changes, before major refactors, or when you need a safe rollback point during multi-step implementations."
4
+ user-invocable: true
5
+ argument-hint: "[create|restore|list|clean] [name]"
6
+ allowed-tools: Bash
7
+ ---
8
+
9
+ # /checkpoint — Git Checkpoint Management
10
+
11
+ Create, restore, list, or clean git checkpoints.
12
+
13
+ **Command:** $ARGUMENTS
14
+
15
+ ## When to Use
16
+
17
+ - About to start a risky refactoring
18
+ - Before deleting or restructuring modules
19
+ - During multi-step implementations (checkpoint between steps)
20
+ - Before running destructive git operations
21
+ - NOT for: every small edit (too noisy)
22
+
23
+ ## Operations
24
+
25
+ ### Create Checkpoint
26
+
27
+ ```bash
28
+ /checkpoint create feature-auth
29
+ ```
30
+
31
+ **Workflow:**
32
+ 1. Stage all changes
33
+ 2. Commit with checkpoint message
34
+ 3. Create tag
35
+
36
+ ```bash
37
+ git add -A
38
+ git commit -m "checkpoint: [name]"
39
+ git tag checkpoint/[name]
40
+ ```
41
+
42
+ **Output:**
43
+ ```
44
+ ──── Checkpoint Created ────
45
+ Name: checkpoint/feature-auth
46
+ Commit: abc1234
47
+ Files: 5 changed
48
+ Time: 2024-01-15 14:30:22
49
+ ```
50
+
51
+ ### Create Restore Point
52
+
53
+ ```bash
54
+ /checkpoint restore-point
55
+ ```
56
+
57
+ Creates a timestamp-based restore point before major operations.
58
+
59
+ ```bash
60
+ git tag restore-point/$(date +%Y%m%d-%H%M%S)
61
+ ```
62
+
63
+ **Output:**
64
+ ```
65
+ ──── Restore Point Created ────
66
+ Tag: restore-point/20240115-143022
67
+ Use to rollback entire session if needed.
68
+ ```
69
+
70
+ ### List Checkpoints
71
+
72
+ ```bash
73
+ /checkpoint list
74
+ ```
75
+
76
+ ```bash
77
+ git tag -l "checkpoint/*" | sort -V
78
+ git tag -l "restore-point/*" | sort
79
+ ```
80
+
81
+ **Output:**
82
+ ```
83
+ ──── Checkpoints ────
84
+ Checkpoints:
85
+ checkpoint/task-1 (2024-01-15 14:20)
86
+ checkpoint/task-2 (2024-01-15 14:25)
87
+ checkpoint/feature-auth (2024-01-15 14:30)
88
+
89
+ Restore Points:
90
+ restore-point/20240115-141500
91
+ restore-point/20240115-143022
92
+ ```
93
+
94
+ ### Restore Checkpoint
95
+
96
+ ```bash
97
+ /checkpoint restore feature-auth
98
+ ```
99
+
100
+ **Warning:** This will discard uncommitted changes!
101
+
102
+ ```bash
103
+ # Confirm with user first
104
+ git reset --hard checkpoint/[name]
105
+ ```
106
+
107
+ **Output:**
108
+ ```
109
+ ──── Checkpoint Restored ────
110
+ Restored to: checkpoint/feature-auth
111
+ Commit: abc1234
112
+ Current state matches checkpoint.
113
+ ```
114
+
115
+ ### Full Rollback
116
+
117
+ ```bash
118
+ /checkpoint rollback 20240115-143022
119
+ ```
120
+
121
+ Rollback to a restore point (undoes all work since).
122
+
123
+ ```bash
124
+ git reset --hard restore-point/[timestamp]
125
+ ```
126
+
127
+ ### Clean Checkpoints
128
+
129
+ ```bash
130
+ /checkpoint clean
131
+ ```
132
+
133
+ Remove all checkpoint tags (keeps restore points).
134
+
135
+ ```bash
136
+ git tag -l "checkpoint/*" | xargs -n 1 git tag -d
137
+ ```
138
+
139
+ **Output:**
140
+ ```
141
+ ──── Checkpoints Cleaned ────
142
+ Removed: 5 checkpoint tags
143
+ Kept: 2 restore points
144
+ ```
145
+
146
+ ### Clean All
147
+
148
+ ```bash
149
+ /checkpoint clean-all
150
+ ```
151
+
152
+ Remove ALL checkpoints and restore points.
153
+
154
+ ```bash
155
+ git tag -l "checkpoint/*" | xargs -n 1 git tag -d
156
+ git tag -l "restore-point/*" | xargs -n 1 git tag -d
157
+ ```
158
+
159
+ ## Default Behavior
160
+
161
+ If no argument provided:
162
+ ```bash
163
+ /checkpoint
164
+ ```
165
+
166
+ Creates a timestamped checkpoint:
167
+ ```
168
+ checkpoint/auto-20240115-143022
169
+ ```
170
+
171
+ ## Usage in Workflow
172
+
173
+ ### Before Risky Changes
174
+ ```bash
175
+ /checkpoint restore-point
176
+ # Make risky changes
177
+ # If it fails:
178
+ /checkpoint rollback [timestamp]
179
+ ```
180
+
181
+ ### During Feature Development
182
+ ```bash
183
+ /checkpoint create step-1
184
+ # Work on step 2
185
+ /checkpoint create step-2
186
+ # If step 2 is wrong:
187
+ /checkpoint restore step-1
188
+ ```
189
+
190
+ ### After Session
191
+ ```bash
192
+ /checkpoint clean # Remove task checkpoints
193
+ # Keep restore points for safety
194
+ ```
195
+
196
+ ## Output
197
+
198
+ ```
199
+ ──── /checkpoint ────
200
+ Operation: [create|restore|list|clean]
201
+ [Operation details]
202
+ ```
203
+
204
+ ## Rules
205
+
206
+ 1. **Always confirm before restore** — Destructive operation
207
+ 2. **Create restore point before major work**
208
+ 3. **Clean checkpoints after successful completion**
209
+ 4. **Keep restore points until merge**