@allthingsclaude/blueprints 0.2.0 → 0.3.0-beta.10

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 (66) hide show
  1. package/README.md +80 -12
  2. package/content/agents/audit.md +40 -25
  3. package/content/agents/bootstrap.md +25 -5
  4. package/content/agents/changelog.md +350 -0
  5. package/content/agents/cleanup.md +155 -0
  6. package/content/agents/commit.md +235 -0
  7. package/content/agents/debug.md +198 -0
  8. package/content/agents/docs.md +344 -0
  9. package/content/agents/{optimize.md → dry.md} +38 -15
  10. package/content/agents/explain.md +195 -0
  11. package/content/agents/finalize.md +20 -5
  12. package/content/agents/handoff.md +11 -5
  13. package/content/agents/imagine.md +2 -2
  14. package/content/agents/implement.md +54 -16
  15. package/content/agents/migrate.md +330 -0
  16. package/content/agents/parallelize.md +21 -4
  17. package/content/agents/plan.md +35 -5
  18. package/content/agents/refactor.md +156 -0
  19. package/content/agents/release.md +502 -0
  20. package/content/agents/research-codebase.md +160 -18
  21. package/content/agents/research-docs.md +135 -19
  22. package/content/agents/research-web.md +149 -19
  23. package/content/agents/secure.md +351 -0
  24. package/content/agents/storyboard.md +11 -5
  25. package/content/agents/test.md +181 -0
  26. package/content/commands/audit.md +15 -24
  27. package/content/commands/auto.md +361 -0
  28. package/content/commands/bootstrap.md +2 -2
  29. package/content/commands/brainstorm.md +63 -9
  30. package/content/commands/challenge.md +7 -0
  31. package/content/commands/changelog.md +50 -0
  32. package/content/commands/cleanup.md +14 -301
  33. package/content/commands/commit.md +45 -0
  34. package/content/commands/critique.md +7 -0
  35. package/content/commands/debug.md +9 -251
  36. package/content/commands/docs.md +48 -0
  37. package/content/commands/dry.md +48 -0
  38. package/content/commands/explain.md +12 -309
  39. package/content/commands/finalize.md +3 -3
  40. package/content/commands/flush.md +9 -14
  41. package/content/commands/handoff.md +1 -1
  42. package/content/commands/implement.md +5 -5
  43. package/content/commands/kickoff.md +7 -4
  44. package/content/commands/migrate.md +54 -0
  45. package/content/commands/parallelize.md +2 -2
  46. package/content/commands/pickup.md +1 -1
  47. package/content/commands/plan.md +2 -2
  48. package/content/commands/refactor.md +21 -379
  49. package/content/commands/release.md +63 -0
  50. package/content/commands/research.md +1 -1
  51. package/content/commands/secure.md +51 -0
  52. package/content/commands/storyboard.md +3 -3
  53. package/content/commands/test.md +15 -201
  54. package/content/commands/verify.md +7 -0
  55. package/dist/cli.js +47 -15
  56. package/dist/cli.js.map +1 -1
  57. package/dist/index.d.ts +1 -1
  58. package/dist/index.d.ts.map +1 -1
  59. package/dist/index.js +1 -1
  60. package/dist/index.js.map +1 -1
  61. package/dist/installer.d.ts +29 -4
  62. package/dist/installer.d.ts.map +1 -1
  63. package/dist/installer.js +120 -17
  64. package/dist/installer.js.map +1 -1
  65. package/package.json +5 -1
  66. package/content/commands/optimize.md +0 -338
@@ -0,0 +1,48 @@
1
+ ---
2
+ description: Generate or update project documentation
3
+ argument-hint: [readme | api | architecture | file path or component to document]
4
+ author: "@markoradak"
5
+ ---
6
+
7
+ # Generate Documentation
8
+
9
+ I'll analyze your codebase and generate or update documentation.
10
+
11
+ > **When to use**: You need to create or update documentation — READMEs, API references, architecture overviews, or inline docstrings. Use `/explain` when you want to understand code yourself rather than document it for others.
12
+
13
+ ## Current Context
14
+
15
+ **Working Directory**: !`pwd`
16
+
17
+ **Project**:
18
+ !`ls README* 2>/dev/null; ls docs/ 2>/dev/null | head -10; echo "---"; cat package.json 2>/dev/null | head -5`
19
+
20
+ **Existing Docs**:
21
+ !`find . -maxdepth 3 -name "*.md" -not -path "*/node_modules/*" -not -path "*/.git/*" 2>/dev/null | head -15`
22
+
23
+ ---
24
+
25
+ ## Documentation Target
26
+
27
+ $ARGUMENTS
28
+
29
+ ---
30
+
31
+ ## Launching Documentation Agent
32
+
33
+ The docs agent will:
34
+ - Analyze the codebase structure, exports, and public interfaces
35
+ - Read existing documentation to understand current state
36
+ - Identify gaps between code and documentation
37
+ - Generate accurate, well-structured documentation
38
+ - Use real code examples from the codebase (not invented ones)
39
+ - Preserve existing documentation where it's still accurate
40
+
41
+ **Workflows**:
42
+ - `readme` — Generate or update the project README
43
+ - `api` — Document public APIs, endpoints, or exported functions
44
+ - `architecture` — Create an architecture overview with diagrams
45
+ - `[file or component]` — Generate docs for a specific file or component
46
+ - No arguments — Scan for documentation gaps and suggest what to document
47
+
48
+ Use the Task tool to launch the docs agent (subagent_type="docs") with the documentation target and any additional context.
@@ -0,0 +1,48 @@
1
+ ---
2
+ description: Eliminate DRY violations without changing behavior
3
+ argument-hint: [optional: file/folder path, "functions" | "components" | "hooks" | "types" | "constants"]
4
+ author: "@markoradak"
5
+ ---
6
+
7
+ # DRY Optimization
8
+
9
+ I'll find and eliminate DRY violations across your codebase while guaranteeing identical behavior.
10
+
11
+ > **When to use**: You suspect duplicated code and want to consolidate it. Use `/cleanup` to remove unused/dead code, `/refactor` for renames, moves, or extractions, or `/audit` to review changes before committing.
12
+
13
+ ## Current State
14
+
15
+ **Working Directory**: !`pwd`
16
+
17
+ **Branch**: !`git branch --show-current 2>/dev/null || echo "Not a git repository"`
18
+
19
+ **Status**:
20
+ !`git status --short`
21
+
22
+ **Files to Analyze**:
23
+ !`find . -maxdepth 5 -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" 2>/dev/null | grep -v node_modules | wc -l` source files
24
+
25
+ ---
26
+
27
+ ## Focus Area
28
+
29
+ $ARGUMENTS
30
+
31
+ ---
32
+
33
+ ## Launching DRY Agent
34
+
35
+ The DRY agent will:
36
+ - Detect your toolchain and capture a baseline (typecheck, lint, tests, build)
37
+ - Scan for exact, structural, and logical duplications
38
+ - Present a prioritized report with line counts and savings estimates
39
+ - Apply optimizations one at a time (with your approval)
40
+ - Validate after each change — revert immediately on failure
41
+ - Guarantee zero behavior change
42
+
43
+ **Scoping options**:
44
+ - No argument → Full source scan
45
+ - `functions` / `components` / `hooks` / `types` / `constants` → Category-specific scan
46
+ - File/folder path → Scoped deep scan
47
+
48
+ Use the Task tool to launch the DRY agent (subagent_type="dry") which will capture the baseline, scan for DRY violations, present a prioritized report, and — with user approval — apply optimizations one at a time with validation after each change.
@@ -4,7 +4,7 @@ argument-hint: [file path, component name, feature, or concept to explain]
4
4
  author: "@markoradak"
5
5
  ---
6
6
 
7
- # Code Explainer
7
+ # Explain Code
8
8
 
9
9
  I'll provide a detailed, educational explanation of the code, architecture, or feature you're interested in.
10
10
 
@@ -23,318 +23,21 @@ $ARGUMENTS
23
23
 
24
24
  ---
25
25
 
26
- ## Explanation Framework
26
+ ## Launching Explanation Agent
27
27
 
28
- Based on what you want to understand, I'll provide explanations at different levels:
28
+ Launching the explain agent to analyze the code and generate a comprehensive explanation...
29
29
 
30
- ### For a **File**:
31
- 1. **Purpose**: Why this file exists
32
- 2. **Structure**: How it's organized
33
- 3. **Key Components**: Main functions/classes/exports
34
- 4. **Data Flow**: How data moves through it
35
- 5. **Dependencies**: What it imports and why
36
- 6. **Usage**: Where and how it's used
30
+ Use the Task tool to launch the explain agent:
37
31
 
38
- ### For a **Component/Function**:
39
- 1. **Purpose**: What problem it solves
40
- 2. **Interface**: Inputs, outputs, props
41
- 3. **Implementation**: How it works step-by-step
42
- 4. **State Management**: What state it manages
43
- 5. **Side Effects**: External interactions
44
- 6. **Usage Examples**: How to use it
45
-
46
- ### For a **Feature**:
47
- 1. **Overview**: What the feature does
48
- 2. **Architecture**: Components involved
49
- 3. **Data Flow**: End-to-end flow
50
- 4. **Key Files**: Where the implementation lives
51
- 5. **Entry Points**: Where it starts
52
- 6. **Integration Points**: How it connects to rest of system
53
-
54
- ### For an **Architecture Concept**:
55
- 1. **Definition**: What the concept means
56
- 2. **Why It's Used**: Benefits in this project
57
- 3. **Implementation**: How it's applied here
58
- 4. **Examples**: Concrete examples from codebase
59
- 5. **Trade-offs**: Pros and cons
60
- 6. **Related Patterns**: Connected concepts
61
-
62
- ---
63
-
64
- ## Explanation Output Format
65
-
66
- ```markdown
67
- # Understanding: [Topic]
68
-
69
- ## Quick Summary
70
-
71
- [2-3 sentence overview for someone in a hurry]
72
-
73
- ---
74
-
75
- ## The Big Picture
76
-
77
- ### What Is This?
78
-
79
- [Plain English explanation of what this is and why it exists]
80
-
81
- ### Why Does It Matter?
82
-
83
- [Why this is important in the context of the project]
84
-
85
- ### Where Does It Fit?
86
-
87
- ```
88
- [ASCII diagram showing where this fits in the architecture]
89
-
90
- ┌─────────────────────────────────────────────┐
91
- │ Application │
92
- ├─────────────────────────────────────────────┤
93
- │ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
94
- │ │ UI │ → │ State │ → │ API │ │
95
- │ └─────────┘ └─────────┘ └─────────┘ │
96
- │ ↑ ↑ ↓ │
97
- │ └─────────────┴─────────────┘ │
98
- │ │
99
- │ [THIS COMPONENT] ←── You are here │
100
- └─────────────────────────────────────────────┘
101
- ```
102
-
103
- ---
104
-
105
- ## Deep Dive
106
-
107
- ### How It Works
108
-
109
- #### Step 1: [First thing that happens]
110
-
111
- ```typescript
112
- // Relevant code snippet with annotations
113
- const example = doThing() // <- This does X because Y
114
- ```
115
-
116
- **What's happening**: [Explanation]
117
-
118
- #### Step 2: [Second thing]
119
-
120
- ```typescript
121
- // Next relevant code
122
- ```
123
-
124
- **What's happening**: [Explanation]
125
-
126
- #### Step 3: [And so on...]
127
-
128
- ---
129
-
130
- ### Key Concepts
131
-
132
- #### [Concept 1 Name]
133
-
134
- **Definition**: [What it means]
135
-
136
- **In This Code**: [How it's applied]
137
-
138
- **Example**:
139
- ```typescript
140
- // Example from the actual codebase
141
- ```
142
-
143
- #### [Concept 2 Name]
144
-
145
- [Same structure...]
146
-
147
- ---
148
-
149
- ### Data Flow
150
-
151
- ```
152
- [Input]
153
-
154
- ┌───────────────┐
155
- │ [Process 1] │ "Transforms X into Y"
156
- └───────────────┘
157
-
158
- ┌───────────────┐
159
- │ [Process 2] │ "Validates and enriches"
160
- └───────────────┘
161
-
162
- ┌───────────────┐
163
- │ [Process 3] │ "Persists to database"
164
- └───────────────┘
165
-
166
- [Output]
167
- ```
168
-
169
- ---
170
-
171
- ### File Structure
172
-
173
- ```
174
- src/
175
- ├── feature/
176
- │ ├── components/ # UI components
177
- │ │ ├── Thing.tsx # [purpose] ← THIS FILE
178
- │ │ └── Other.tsx # [purpose]
179
- │ ├── hooks/ # Custom hooks
180
- │ │ └── useThing.ts # [purpose]
181
- │ ├── lib/ # Business logic
182
- │ │ └── thing.ts # [purpose]
183
- │ └── types/ # TypeScript types
184
- │ └── thing.ts # [purpose]
185
- ```
186
-
187
- ---
188
-
189
- ## Code Walkthrough
190
-
191
- ### `path/to/file.ts`
192
-
193
- ```typescript
194
- // Line 1-10: Imports
195
- import { x } from 'y' // We need X because...
196
-
197
- // Line 12-25: Types
198
- interface Props { // Defines what this component accepts
199
- name: string // The user's display name
200
- onSubmit: () => void // Called when form is submitted
201
- }
202
-
203
- // Line 27-50: Main Component
204
- export function Component({ name, onSubmit }: Props) {
205
- // Line 28: State setup
206
- const [value, setValue] = useState('') // Tracks input value
207
-
208
- // Line 31-35: Effect for side effects
209
- useEffect(() => {
210
- // This runs when X changes because we need to Y
211
- }, [dependency])
212
-
213
- // Line 37-45: Event handler
214
- const handleClick = () => {
215
- // Validates input, then calls onSubmit
216
- }
217
-
218
- // Line 47-60: Render
219
- return (
220
- // JSX that displays the UI
221
- )
222
- }
223
- ```
224
-
225
- ---
226
-
227
- ## Common Questions
228
-
229
- ### "Why is it done this way?"
230
-
231
- [Explain the reasoning behind key design decisions]
232
-
233
- ### "What would break if I changed X?"
234
-
235
- [Explain dependencies and ripple effects]
236
-
237
- ### "How do I modify this?"
238
-
239
- [Guide for making common changes]
240
-
241
- ### "Where should I add new feature Y?"
242
-
243
- [Point to the right location based on the architecture]
244
-
245
- ---
246
-
247
- ## Related Files
248
-
249
- | File | Relationship | Purpose |
250
- |------|--------------|---------|
251
- | `path/to/related.ts` | Imports from | Provides utility functions |
252
- | `path/to/parent.tsx` | Uses this | Parent component that renders this |
253
- | `path/to/types.ts` | Types from | Type definitions |
254
-
255
- ---
256
-
257
- ## Key Takeaways
258
-
259
- 1. **[Takeaway 1]**: [One sentence summary]
260
- 2. **[Takeaway 2]**: [One sentence summary]
261
- 3. **[Takeaway 3]**: [One sentence summary]
262
-
263
- ---
264
-
265
- ## Next Steps for Learning
266
-
267
- - [ ] Read `related/file.ts` to understand [concept]
268
- - [ ] Try modifying [small thing] to see how it works
269
- - [ ] Look at how [similar feature] is implemented
270
- - [ ] Check the tests in `__tests__/` for usage examples
271
- ```
272
-
273
- ---
274
-
275
- ## Explanation Depth Levels
276
-
277
- ### Quick (1-2 minutes to read)
278
- - Purpose and key points only
279
- - Good for: "What is this file?"
280
-
281
- ### Standard (5-10 minutes to read)
282
- - Full explanation with code walkthrough
283
- - Good for: "How does this work?"
284
-
285
- ### Deep (15+ minutes to read)
286
- - Architecture, history, design decisions
287
- - Good for: "I need to maintain/extend this"
288
-
289
- **Ask**: "Would you like a quick, standard, or deep explanation?"
290
-
291
- ---
292
-
293
- ## Visual Explanation Tools
294
-
295
- ### ASCII Architecture Diagrams
296
- ```
297
- ┌─────────────────────────────────────┐
298
- │ Frontend │
299
- │ ┌─────────┐ ┌─────────┐ │
300
- │ │ React │ ───→ │ Hooks │ │
301
- │ └─────────┘ └─────────┘ │
302
- └─────────────────────────────────────┘
303
-
304
- ↓ tRPC / REST
305
- ┌─────────────────────────────────────┐
306
- │ Backend │
307
- │ ┌─────────┐ ┌─────────┐ │
308
- │ │ Routes │ ───→ │ Prisma │ │
309
- │ └─────────┘ └─────────┘ │
310
- └─────────────────────────────────────┘
311
- ```
312
-
313
- ### Data Flow Arrows
314
- ```
315
- User Input → Validation → Transform → API Call → Response → UI Update
316
-
317
- Error Handling → Error Display
318
32
  ```
33
+ Task: subagent_type="explain"
34
+ prompt: "Explain the following: $ARGUMENTS
319
35
 
320
- ### State Transitions
36
+ Working directory context has been gathered above. Research the codebase thoroughly, read all relevant files, and produce a clear, educational explanation."
321
37
  ```
322
- [Initial] ──load──→ [Loading] ──success──→ [Ready]
323
-
324
- └──error──→ [Error] ──retry──→ [Loading]
325
- ```
326
-
327
- ---
328
-
329
- ## Explanation Best Practices
330
-
331
- 1. **Start with WHY** before HOW
332
- 2. **Use analogies** for complex concepts
333
- 3. **Show real code** from the codebase
334
- 4. **Highlight patterns** that repeat
335
- 5. **Connect to the big picture**
336
- 6. **Anticipate questions**
337
-
338
- ---
339
38
 
340
- Read the relevant files, analyze the structure, and provide a comprehensive explanation. Use Read to examine code, Grep to find related files, and Glob to understand file organization. Tailor the explanation depth to what seems most useful.
39
+ The agent will:
40
+ 1. **Find the code** — Locate the relevant files using Glob and Grep
41
+ 2. **Read the context** — Read the full implementation plus related files
42
+ 3. **Trace connections** — Follow imports, consumers, and test files
43
+ 4. **Build the explanation** — Structured walkthrough with visual aids and file:line references
@@ -12,7 +12,7 @@ I'll finalize your work session by updating plans, creating a comprehensive git
12
12
 
13
13
  **Working Directory**: !`pwd`
14
14
 
15
- **Branch**: !`git branch --show-current`
15
+ **Branch**: !`git branch --show-current 2>/dev/null || echo "Not a git repository"`
16
16
 
17
17
  **Status**:
18
18
  !`git status --short`
@@ -21,7 +21,7 @@ I'll finalize your work session by updating plans, creating a comprehensive git
21
21
  !`git diff --stat`
22
22
 
23
23
  **Active Plans**:
24
- !`ls -1 .claude/temp/PLAN_*.md 2>/dev/null || echo "No active plans"`
24
+ !`ls -1 {{PLANS_DIR}}/PLAN_*.md 2>/dev/null || echo "No active plans"`
25
25
 
26
26
  ---
27
27
 
@@ -46,4 +46,4 @@ The finalize agent will systematically:
46
46
 
47
47
  **This will create a git commit with all your work.**
48
48
 
49
- Use the Task tool to launch the finalize agent (subagent_type="general-purpose") which will autonomously finalize your session and create the commit.
49
+ Use the Task tool to launch the finalize agent (subagent_type="finalize") which will autonomously finalize your session and create the commit.
@@ -1,29 +1,24 @@
1
1
  ---
2
- description: Flush all temporary files in .claude/temp
3
- argument-hint:
2
+ description: Flush all task artifacts from {{TASKS_DIR}}/
4
3
  author: "@markoradak"
5
4
  ---
6
5
 
7
- # Flush Temporary Files
6
+ # Flush Task Artifacts
8
7
 
9
- I'll flush all temporary files from `.claude/temp/`.
8
+ I'll flush all task artifacts from `{{TASKS_DIR}}/`.
10
9
 
11
10
  ## Current Contents
12
11
 
13
- !`ls -lh .claude/temp/ 2>/dev/null || echo "Temp directory is empty or doesn't exist"`
12
+ !`ls -lhR {{TASKS_DIR}}/ 2>/dev/null || echo "Tasks directory is empty or doesn't exist"`
14
13
 
15
14
  ---
16
15
 
17
- ## Flushing
16
+ ## Confirmation Required
18
17
 
19
- Now I'll remove all files from `.claude/temp/`:
18
+ Before deleting, list all files in `{{TASKS_DIR}}/` to the user and ask for explicit confirmation.
20
19
 
21
- !`rm -rf .claude/temp/* 2>/dev/null && echo "✅ Flushed .claude/temp/" || echo "✅ Nothing to flush"`
20
+ If the user confirms, delete all files using Bash: `rm -rf {{TASKS_DIR}}/*`
22
21
 
23
- ## Verification
22
+ Then verify the directory is empty using Bash: `ls -lhR {{TASKS_DIR}}/ 2>/dev/null || echo "Tasks directory is now empty"`
24
23
 
25
- !`ls -lh .claude/temp/ 2>/dev/null || echo "Temp directory is now empty"`
26
-
27
- ---
28
-
29
- **Done!** All temporary handoffs, plans, and other temp files have been flushed.
24
+ **Do NOT delete anything without user confirmation.**
@@ -34,7 +34,7 @@ $ARGUMENTS
34
34
 
35
35
  ## Generating Handoff
36
36
 
37
- Launching the handoff agent to analyze your work session and generate `.claude/temp/HANDOFF.md`...
37
+ Launching the handoff agent to analyze your work session and generate `{{SESSIONS_DIR}}/HANDOFF.md`...
38
38
 
39
39
  The agent will:
40
40
  - ✅ Review recent commits and current changes
@@ -16,10 +16,10 @@ $ARGUMENTS
16
16
 
17
17
  ## Available Plans
18
18
 
19
- **Plans in .claude/temp/**:
20
- !`ls -1 .claude/temp/PLAN_*.md 2>/dev/null || echo "No plans found"`
19
+ **Plans in {{PLANS_DIR}}/**:
20
+ !`ls -1 {{PLANS_DIR}}/PLAN_*.md 2>/dev/null || echo "No plans found"`
21
21
 
22
- **Current Branch**: !`git branch --show-current`
22
+ **Current Branch**: !`git branch --show-current 2>/dev/null || echo "Not a git repository"`
23
23
 
24
24
  **Working Directory**: !`pwd`
25
25
 
@@ -31,7 +31,7 @@ Launching the **implement agent** which will work independently in a separate co
31
31
 
32
32
  ### What the Agent Will Do
33
33
 
34
- - ✅ Load `.claude/temp/PLAN_{NAME}.md`
34
+ - ✅ Load `{{PLANS_DIR}}/PLAN_{NAME}.md`
35
35
  - ✅ Parse all phases, tasks, and dependencies
36
36
  - ✅ Create comprehensive task tracking (TodoWrite)
37
37
  - ✅ Execute tasks systematically with validation
@@ -64,4 +64,4 @@ Use `/implement` when:
64
64
 
65
65
  ---
66
66
 
67
- Use the Task tool to launch the implement agent (subagent_type="general-purpose") with the plan name and any additional context from arguments.
67
+ Use the Task tool to launch the implement agent (subagent_type="implement") with the plan name and any additional context from arguments.
@@ -16,10 +16,13 @@ $ARGUMENTS
16
16
 
17
17
  ## Available Plans
18
18
 
19
- **Plans in .claude/temp/**:
20
- !`ls -1 .claude/temp/PLAN_*.md 2>/dev/null || echo "No plans found"`
19
+ **Active Plan**:
20
+ !`cat {{STATE_FILE}} 2>/dev/null || echo "No active plan set"`
21
21
 
22
- **Current Branch**: !`git branch --show-current`
22
+ **Plans in {{PLANS_DIR}}/**:
23
+ !`ls -1 {{PLANS_DIR}}/PLAN_*.md 2>/dev/null || echo "No plans found"`
24
+
25
+ **Current Branch**: !`git branch --show-current 2>/dev/null || echo "Not a git repository"`
23
26
 
24
27
  **Working Directory**: !`pwd`
25
28
 
@@ -52,7 +55,7 @@ I'll work through this plan collaboratively with you:
52
55
 
53
56
  Now let me load the plan and we'll get started together.
54
57
 
55
- Use Read to load `.claude/temp/PLAN_{NAME}.md`, display a comprehensive summary with:
58
+ Use Read to load `{{PLANS_DIR}}/PLAN_{NAME}.md`, display a comprehensive summary with:
56
59
  - Objective
57
60
  - Phases and task counts
58
61
  - Key files involved
@@ -0,0 +1,54 @@
1
+ ---
2
+ description: Upgrade dependencies or migrate between framework versions
3
+ argument-hint: [package@version, "all", or migration description]
4
+ author: "@markoradak"
5
+ ---
6
+
7
+ # Migration Assistant
8
+
9
+ I'll help you upgrade dependencies or migrate between framework versions safely.
10
+
11
+ > **When to use**: You need to upgrade a dependency, migrate to a new major version, or handle breaking changes. Use `/refactor` for structural code changes that aren't dependency-driven.
12
+
13
+ ## Current State
14
+
15
+ **Working Directory**: !`pwd`
16
+
17
+ **Branch**: !`git branch --show-current 2>/dev/null || echo "Not a git repository"`
18
+
19
+ **Status**:
20
+ !`git status --short`
21
+
22
+ **Current Dependencies**:
23
+ !`cat package.json 2>/dev/null | head -40`
24
+
25
+ **Lock File**:
26
+ !`ls pnpm-lock.yaml yarn.lock bun.lockb package-lock.json 2>/dev/null | head -1 || echo "No lock file found"`
27
+
28
+ ---
29
+
30
+ ## Migration Target
31
+
32
+ $ARGUMENTS
33
+
34
+ ---
35
+
36
+ ## Launching Migration Agent
37
+
38
+ The migration agent will:
39
+ - Identify current versions and target versions
40
+ - Research breaking changes and migration guides
41
+ - Capture a baseline (typecheck, lint, tests, build)
42
+ - Create a step-by-step migration plan
43
+ - Apply changes incrementally with validation after each step
44
+ - Update code to handle breaking API changes
45
+ - Verify the full test suite passes after migration
46
+
47
+ **Workflows**:
48
+ - `react@19` → Upgrade React to v19 with breaking change resolution
49
+ - `next@15` → Upgrade Next.js with migration guide steps
50
+ - `all` → Check all dependencies for available updates
51
+ - `typescript@5.5` → Upgrade TypeScript with new strict checks
52
+ - Description → Handle a described migration (e.g., "move from Jest to Vitest")
53
+
54
+ Use the Task tool to launch the migrate agent (subagent_type="migrate") with the migration target and any constraints.
@@ -12,10 +12,10 @@ I'll analyze your plan or task, identify parallelization opportunities, and spaw
12
12
 
13
13
  **Working Directory**: !`pwd`
14
14
 
15
- **Branch**: !`git branch --show-current`
15
+ **Branch**: !`git branch --show-current 2>/dev/null || echo "Not a git repository"`
16
16
 
17
17
  **Available Plans**:
18
- !`ls -1 .claude/temp/PLAN_*.md 2>/dev/null || echo "No plans found"`
18
+ !`ls -1 {{PLANS_DIR}}/PLAN_*.md 2>/dev/null || echo "No plans found"`
19
19
 
20
20
  ---
21
21
 
@@ -8,7 +8,7 @@ author: "@markoradak"
8
8
 
9
9
  Loading the handoff document from your previous session:
10
10
 
11
- @.claude/temp/HANDOFF.md
11
+ {{SESSIONS_DIR}}/HANDOFF.md
12
12
 
13
13
  ---
14
14
 
@@ -25,7 +25,7 @@ $ARGUMENTS
25
25
 
26
26
  ## Generating Plan
27
27
 
28
- Launching the plan agent to analyze our conversation and generate `.claude/temp/PLAN_{NAME}.md`...
28
+ Launching the plan agent to analyze our conversation and generate `{{PLANS_DIR}}/PLAN_{NAME}.md`...
29
29
 
30
30
  The agent will:
31
31
  - ✅ Summarize key findings from our discussion
@@ -35,4 +35,4 @@ The agent will:
35
35
  - ✅ Note technical considerations and constraints
36
36
  - ✅ List relevant files and references
37
37
 
38
- Use the Task tool to launch the plan agent (subagent_type="general-purpose") which will autonomously generate the plan document.
38
+ Use the Task tool to launch the plan agent (subagent_type="plan") which will autonomously generate the plan document.