@allthingsclaude/blueprints 0.1.1
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.
- package/LICENSE +21 -0
- package/README.md +413 -0
- package/bin/cli.js +4 -0
- package/content/agents/audit.md +553 -0
- package/content/agents/bootstrap.md +386 -0
- package/content/agents/finalize.md +490 -0
- package/content/agents/handoff.md +207 -0
- package/content/agents/implement.md +350 -0
- package/content/agents/parallelize.md +484 -0
- package/content/agents/plan.md +309 -0
- package/content/agents/research-codebase.md +33 -0
- package/content/agents/research-docs.md +34 -0
- package/content/agents/research-web.md +34 -0
- package/content/commands/audit.md +54 -0
- package/content/commands/bootstrap.md +46 -0
- package/content/commands/brainstorm.md +76 -0
- package/content/commands/challenge.md +26 -0
- package/content/commands/cleanup.md +326 -0
- package/content/commands/critique.md +34 -0
- package/content/commands/debug.md +283 -0
- package/content/commands/explain.md +340 -0
- package/content/commands/finalize.md +49 -0
- package/content/commands/flush.md +29 -0
- package/content/commands/handoff.md +46 -0
- package/content/commands/implement.md +67 -0
- package/content/commands/kickoff.md +65 -0
- package/content/commands/parallelize.md +118 -0
- package/content/commands/pickup.md +30 -0
- package/content/commands/plan.md +38 -0
- package/content/commands/refactor.md +406 -0
- package/content/commands/research.md +58 -0
- package/content/commands/test.md +229 -0
- package/content/commands/verify.md +16 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +150 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/installer.d.ts +49 -0
- package/dist/installer.d.ts.map +1 -0
- package/dist/installer.js +125 -0
- package/dist/installer.js.map +1 -0
- package/package.json +64 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Load handoff document and continue from previous session
|
|
3
|
+
argument-hint: [optional: specific task or focus area]
|
|
4
|
+
author: "@markoradak"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Load Handoff and Continue
|
|
8
|
+
|
|
9
|
+
Loading the handoff document from your previous session:
|
|
10
|
+
|
|
11
|
+
@.claude/temp/HANDOFF.md
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Your Focus
|
|
16
|
+
|
|
17
|
+
$ARGUMENTS
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Next Actions
|
|
22
|
+
|
|
23
|
+
Based on the handoff document above, I will:
|
|
24
|
+
|
|
25
|
+
1. **Summarize the current state** - Quick overview of what was in progress
|
|
26
|
+
2. **Identify next steps** - Prioritized actions from the handoff
|
|
27
|
+
3. **Verify environment** - Check that files mentioned are accessible
|
|
28
|
+
4. **Ask for direction** - Confirm which task you'd like to tackle first
|
|
29
|
+
|
|
30
|
+
Let's pick up where we left off. What would you like to focus on?
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Create a plan document from conversation findings
|
|
3
|
+
argument-hint: {NAME} [optional: additional context]
|
|
4
|
+
author: "@markoradak"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Create Plan Document
|
|
8
|
+
|
|
9
|
+
I'll create a structured plan document based on our conversation findings.
|
|
10
|
+
|
|
11
|
+
## Current Session Context
|
|
12
|
+
|
|
13
|
+
**Working Directory**: !`pwd`
|
|
14
|
+
|
|
15
|
+
**Git Status**:
|
|
16
|
+
!`git status --short`
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Plan Name & Context
|
|
21
|
+
|
|
22
|
+
$ARGUMENTS
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Generating Plan
|
|
27
|
+
|
|
28
|
+
Launching the plan agent to analyze our conversation and generate `.claude/temp/PLAN_{NAME}.md`...
|
|
29
|
+
|
|
30
|
+
The agent will:
|
|
31
|
+
- ✅ Summarize key findings from our discussion
|
|
32
|
+
- ✅ Identify the problem/opportunity
|
|
33
|
+
- ✅ Propose implementation approach
|
|
34
|
+
- ✅ Break down tasks into actionable steps
|
|
35
|
+
- ✅ Note technical considerations and constraints
|
|
36
|
+
- ✅ List relevant files and references
|
|
37
|
+
|
|
38
|
+
Use the Task tool to launch the plan agent (subagent_type="general-purpose") which will autonomously generate the plan document.
|
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Safely refactor code with DRY analysis, pattern extraction, and validation
|
|
3
|
+
argument-hint: [operation] [target] (e.g., "dry-check", "rename:old:new", "extract:ComponentName")
|
|
4
|
+
author: "@markoradak"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Refactor Assistant
|
|
8
|
+
|
|
9
|
+
I'll help you safely refactor code with a focus on DRY principles, pattern extraction, and thorough validation.
|
|
10
|
+
|
|
11
|
+
## Current State
|
|
12
|
+
|
|
13
|
+
**Working Directory**: !`pwd`
|
|
14
|
+
|
|
15
|
+
**Branch**: !`git branch --show-current`
|
|
16
|
+
|
|
17
|
+
**Status**:
|
|
18
|
+
!`git status --short`
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Refactoring Request
|
|
23
|
+
|
|
24
|
+
$ARGUMENTS
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Refactoring Operations
|
|
29
|
+
|
|
30
|
+
### `dry-check` or no argument
|
|
31
|
+
Analyze codebase for DRY violations and duplication opportunities.
|
|
32
|
+
|
|
33
|
+
### `rename:oldName:newName`
|
|
34
|
+
Safely rename a function, component, variable, or type across the codebase.
|
|
35
|
+
|
|
36
|
+
### `extract:Name`
|
|
37
|
+
Extract repeated code into a reusable function, component, or hook.
|
|
38
|
+
|
|
39
|
+
### `inline:Name`
|
|
40
|
+
Inline a function/component that's only used once or adds unnecessary abstraction.
|
|
41
|
+
|
|
42
|
+
### `move:source:destination`
|
|
43
|
+
Move a function/component to a different file with all imports updated.
|
|
44
|
+
|
|
45
|
+
### `consolidate:pattern`
|
|
46
|
+
Find and consolidate similar implementations into one.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## DRY Analysis Framework
|
|
51
|
+
|
|
52
|
+
### Duplication Categories
|
|
53
|
+
|
|
54
|
+
**1. Exact Duplication**
|
|
55
|
+
- Copy-pasted code blocks
|
|
56
|
+
- Identical functions in different files
|
|
57
|
+
- Repeated component structures
|
|
58
|
+
|
|
59
|
+
**2. Structural Duplication**
|
|
60
|
+
- Same pattern with different values
|
|
61
|
+
- Similar functions with minor variations
|
|
62
|
+
- Components that differ only in props
|
|
63
|
+
|
|
64
|
+
**3. Logical Duplication**
|
|
65
|
+
- Same business logic in multiple places
|
|
66
|
+
- Repeated validation patterns
|
|
67
|
+
- Similar error handling
|
|
68
|
+
|
|
69
|
+
**4. Data Duplication**
|
|
70
|
+
- Repeated constants/magic values
|
|
71
|
+
- Similar type definitions
|
|
72
|
+
- Duplicate API endpoint definitions
|
|
73
|
+
|
|
74
|
+
### Detection Strategy
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
# Find similar code blocks (requires manual review)
|
|
78
|
+
# Look for repeated patterns
|
|
79
|
+
grep -rn "pattern" src/ --include="*.ts" --include="*.tsx"
|
|
80
|
+
|
|
81
|
+
# Find duplicate function names
|
|
82
|
+
grep -rn "function functionName\|const functionName" src/
|
|
83
|
+
|
|
84
|
+
# Find similar component structures
|
|
85
|
+
grep -rn "className=\"similar-class\"" src/
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## DRY Check Output Format
|
|
91
|
+
|
|
92
|
+
```markdown
|
|
93
|
+
# DRY Analysis Report
|
|
94
|
+
|
|
95
|
+
**Scanned**: [X] files
|
|
96
|
+
**Duplications Found**: [Y] instances
|
|
97
|
+
**Estimated Lines Saveable**: [Z]
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## High Priority (Extract Immediately)
|
|
102
|
+
|
|
103
|
+
### 1. [Duplication Name]
|
|
104
|
+
|
|
105
|
+
**Type**: Exact / Structural / Logical
|
|
106
|
+
|
|
107
|
+
**Occurrences**:
|
|
108
|
+
- `src/components/A.tsx:23-45` (22 lines)
|
|
109
|
+
- `src/components/B.tsx:67-89` (22 lines)
|
|
110
|
+
- `src/pages/C.tsx:12-34` (22 lines)
|
|
111
|
+
|
|
112
|
+
**Current Code** (from first occurrence):
|
|
113
|
+
```typescript
|
|
114
|
+
// Repeated code block
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**Proposed Extraction**:
|
|
118
|
+
|
|
119
|
+
**New File**: `src/lib/extracted.ts` or `src/components/Shared.tsx`
|
|
120
|
+
|
|
121
|
+
```typescript
|
|
122
|
+
// Extracted reusable code
|
|
123
|
+
export function extractedFunction() {
|
|
124
|
+
// ...
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
**Refactored Usage**:
|
|
129
|
+
```typescript
|
|
130
|
+
import { extractedFunction } from '@/lib/extracted'
|
|
131
|
+
|
|
132
|
+
// Use it
|
|
133
|
+
extractedFunction()
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
**Impact**:
|
|
137
|
+
- Lines removed: [X]
|
|
138
|
+
- Files affected: [Y]
|
|
139
|
+
- Maintainability: Improved (single source of truth)
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Medium Priority (Consider Extracting)
|
|
144
|
+
|
|
145
|
+
### 2. [Duplication Name]
|
|
146
|
+
|
|
147
|
+
**Type**: Structural
|
|
148
|
+
|
|
149
|
+
**Occurrences**: 2 places
|
|
150
|
+
|
|
151
|
+
**Pattern**:
|
|
152
|
+
```typescript
|
|
153
|
+
// Similar structure, different values
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
**Options**:
|
|
157
|
+
1. **Extract with parameters**: Create function with configurable parts
|
|
158
|
+
2. **Leave as-is**: If variations are likely to diverge
|
|
159
|
+
3. **Create factory**: If generating similar structures
|
|
160
|
+
|
|
161
|
+
**Recommendation**: [Which option and why]
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## Low Priority (Monitor)
|
|
166
|
+
|
|
167
|
+
### 3. [Duplication Name]
|
|
168
|
+
|
|
169
|
+
**Note**: Only 2 occurrences, may diverge in future
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Type/Interface Duplication
|
|
174
|
+
|
|
175
|
+
| Type | Locations | Recommendation |
|
|
176
|
+
|------|-----------|----------------|
|
|
177
|
+
| `UserData` | `types/user.ts`, `api/users.ts` | Consolidate to `types/user.ts` |
|
|
178
|
+
| `ApiResponse` | 5 different files | Create shared `types/api.ts` |
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## Constants Duplication
|
|
183
|
+
|
|
184
|
+
| Value | Occurrences | Recommendation |
|
|
185
|
+
|-------|-------------|----------------|
|
|
186
|
+
| `"api/v1"` | 12 files | Extract to `lib/constants.ts` |
|
|
187
|
+
| `3000` | 4 files | Extract as `DEFAULT_PORT` |
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## Summary
|
|
192
|
+
|
|
193
|
+
| Priority | Count | Lines Saveable |
|
|
194
|
+
|----------|-------|----------------|
|
|
195
|
+
| High | X | ~Y lines |
|
|
196
|
+
| Medium | X | ~Y lines |
|
|
197
|
+
| Low | X | ~Y lines |
|
|
198
|
+
|
|
199
|
+
**Total Potential Reduction**: ~[Z] lines ([N]% of codebase)
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
## Recommended Actions
|
|
204
|
+
|
|
205
|
+
1. [ ] Extract [high priority item 1]
|
|
206
|
+
2. [ ] Extract [high priority item 2]
|
|
207
|
+
3. [ ] Consolidate types to shared location
|
|
208
|
+
4. [ ] Create constants file for repeated values
|
|
209
|
+
|
|
210
|
+
Would you like me to perform any of these extractions?
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## Rename Operation
|
|
216
|
+
|
|
217
|
+
### Safety Protocol
|
|
218
|
+
|
|
219
|
+
1. **Find all references** (not just text matches):
|
|
220
|
+
- Variable/function declarations
|
|
221
|
+
- Import statements
|
|
222
|
+
- Type references
|
|
223
|
+
- String literals (if component name)
|
|
224
|
+
- Test files
|
|
225
|
+
- Documentation/comments
|
|
226
|
+
|
|
227
|
+
2. **Validate scope**:
|
|
228
|
+
- Is this a local or exported symbol?
|
|
229
|
+
- Are there name conflicts with new name?
|
|
230
|
+
- Will imports need updating?
|
|
231
|
+
|
|
232
|
+
3. **Execute rename**:
|
|
233
|
+
- Update declaration
|
|
234
|
+
- Update all usages
|
|
235
|
+
- Update imports/exports
|
|
236
|
+
- Update related test files
|
|
237
|
+
|
|
238
|
+
4. **Verify**:
|
|
239
|
+
- Run typecheck
|
|
240
|
+
- Run lint
|
|
241
|
+
- Run related tests
|
|
242
|
+
|
|
243
|
+
### Rename Output
|
|
244
|
+
|
|
245
|
+
```markdown
|
|
246
|
+
# Rename: `oldName` -> `newName`
|
|
247
|
+
|
|
248
|
+
## Scope Analysis
|
|
249
|
+
|
|
250
|
+
**Symbol Type**: [function/component/type/variable]
|
|
251
|
+
**Defined In**: `src/lib/file.ts:23`
|
|
252
|
+
**Exported**: [Yes/No]
|
|
253
|
+
|
|
254
|
+
## References Found
|
|
255
|
+
|
|
256
|
+
| File | Line | Context |
|
|
257
|
+
|------|------|---------|
|
|
258
|
+
| `src/lib/file.ts` | 23 | Definition |
|
|
259
|
+
| `src/components/A.tsx` | 5 | Import |
|
|
260
|
+
| `src/components/A.tsx` | 34 | Usage |
|
|
261
|
+
| `src/tests/file.test.ts` | 12 | Test |
|
|
262
|
+
|
|
263
|
+
**Total**: [X] references in [Y] files
|
|
264
|
+
|
|
265
|
+
## Changes to Make
|
|
266
|
+
|
|
267
|
+
### `src/lib/file.ts`
|
|
268
|
+
- Line 23: `export function oldName` -> `export function newName`
|
|
269
|
+
|
|
270
|
+
### `src/components/A.tsx`
|
|
271
|
+
- Line 5: `import { oldName }` -> `import { newName }`
|
|
272
|
+
- Line 34: `oldName()` -> `newName()`
|
|
273
|
+
|
|
274
|
+
## Verification Plan
|
|
275
|
+
|
|
276
|
+
1. [ ] Apply all changes
|
|
277
|
+
2. [ ] Run `pnpm typecheck`
|
|
278
|
+
3. [ ] Run `pnpm lint`
|
|
279
|
+
4. [ ] Run `pnpm test [related]`
|
|
280
|
+
|
|
281
|
+
Proceed with rename?
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
## Extract Operation
|
|
287
|
+
|
|
288
|
+
### Extraction Checklist
|
|
289
|
+
|
|
290
|
+
1. **Identify boundaries**:
|
|
291
|
+
- What are the inputs?
|
|
292
|
+
- What are the outputs?
|
|
293
|
+
- What are the side effects?
|
|
294
|
+
|
|
295
|
+
2. **Choose location**:
|
|
296
|
+
- Same file (private helper)?
|
|
297
|
+
- `lib/` (utility function)?
|
|
298
|
+
- `components/` (React component)?
|
|
299
|
+
- `hooks/` (custom hook)?
|
|
300
|
+
|
|
301
|
+
3. **Define interface**:
|
|
302
|
+
- Function signature
|
|
303
|
+
- Props interface (for components)
|
|
304
|
+
- Return type
|
|
305
|
+
|
|
306
|
+
4. **Extract and replace**:
|
|
307
|
+
- Create new function/component
|
|
308
|
+
- Replace original code with call
|
|
309
|
+
- Update imports
|
|
310
|
+
|
|
311
|
+
5. **Verify**:
|
|
312
|
+
- Types match at call sites
|
|
313
|
+
- Behavior unchanged
|
|
314
|
+
- Tests pass
|
|
315
|
+
|
|
316
|
+
### Extract Output
|
|
317
|
+
|
|
318
|
+
```markdown
|
|
319
|
+
# Extract: `NewComponentName`
|
|
320
|
+
|
|
321
|
+
## Source Analysis
|
|
322
|
+
|
|
323
|
+
**Extracting from**: `src/components/Large.tsx:45-78`
|
|
324
|
+
**Reason**: [DRY violation / Reusability / Clarity]
|
|
325
|
+
|
|
326
|
+
## Extracted Code
|
|
327
|
+
|
|
328
|
+
**New File**: `src/components/NewComponentName.tsx`
|
|
329
|
+
|
|
330
|
+
```typescript
|
|
331
|
+
interface NewComponentNameProps {
|
|
332
|
+
// Inferred from usage
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
export function NewComponentName({ ... }: NewComponentNameProps) {
|
|
336
|
+
// Extracted code
|
|
337
|
+
}
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
## Updated Original
|
|
341
|
+
|
|
342
|
+
**File**: `src/components/Large.tsx`
|
|
343
|
+
|
|
344
|
+
```typescript
|
|
345
|
+
import { NewComponentName } from './NewComponentName'
|
|
346
|
+
|
|
347
|
+
// ...
|
|
348
|
+
<NewComponentName {...props} />
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
## Other Usages to Update
|
|
352
|
+
|
|
353
|
+
- `src/components/Other.tsx:34` - Same pattern exists
|
|
354
|
+
- `src/pages/Page.tsx:56` - Similar code
|
|
355
|
+
|
|
356
|
+
Proceed with extraction?
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
---
|
|
360
|
+
|
|
361
|
+
## Validation Requirements
|
|
362
|
+
|
|
363
|
+
After ANY refactoring operation:
|
|
364
|
+
|
|
365
|
+
```bash
|
|
366
|
+
# Type check - MUST pass
|
|
367
|
+
pnpm typecheck
|
|
368
|
+
|
|
369
|
+
# Lint - MUST pass
|
|
370
|
+
pnpm lint
|
|
371
|
+
|
|
372
|
+
# Tests - MUST pass
|
|
373
|
+
pnpm test:run
|
|
374
|
+
|
|
375
|
+
# Build - Should pass
|
|
376
|
+
pnpm build
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
**If any fail**: Revert changes and investigate.
|
|
380
|
+
|
|
381
|
+
---
|
|
382
|
+
|
|
383
|
+
## Refactoring Principles
|
|
384
|
+
|
|
385
|
+
### DO
|
|
386
|
+
- Extract when 3+ occurrences exist
|
|
387
|
+
- Keep extracted units focused (single responsibility)
|
|
388
|
+
- Name clearly based on purpose
|
|
389
|
+
- Maintain backwards compatibility when possible
|
|
390
|
+
- Test before and after
|
|
391
|
+
|
|
392
|
+
### DON'T
|
|
393
|
+
- Extract prematurely (wait for patterns to emerge)
|
|
394
|
+
- Create abstractions for 1-2 usages
|
|
395
|
+
- Mix concerns in extracted units
|
|
396
|
+
- Change behavior during refactoring
|
|
397
|
+
- Skip validation steps
|
|
398
|
+
|
|
399
|
+
### DRY Balance
|
|
400
|
+
- **Too DRY**: Over-abstracted, hard to understand
|
|
401
|
+
- **Too WET**: Maintenance nightmare, inconsistencies
|
|
402
|
+
- **Just Right**: Clear abstractions, obvious where to change things
|
|
403
|
+
|
|
404
|
+
---
|
|
405
|
+
|
|
406
|
+
Analyze the refactoring request and execute the appropriate operation. Use Grep to find patterns, Read to understand context, Edit to make changes, and Bash to validate. Always show the plan before executing.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Activate a specialized research agent (codebase/web/docs) to investigate specific topics
|
|
3
|
+
argument-hint: [topic or question to research]
|
|
4
|
+
author: "@markoradak"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Research Assistant
|
|
8
|
+
|
|
9
|
+
I'll intelligently route your research query to the appropriate specialized agent.
|
|
10
|
+
|
|
11
|
+
## Query
|
|
12
|
+
|
|
13
|
+
$ARGUMENTS
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Routing Logic
|
|
18
|
+
|
|
19
|
+
Analyze the query to determine the best research agent:
|
|
20
|
+
|
|
21
|
+
**Use `codebase-research` agent when:**
|
|
22
|
+
- Query mentions "in this codebase", "how does X work here", "where is X implemented"
|
|
23
|
+
- Looking for files, components, functions, or code patterns
|
|
24
|
+
- Understanding architecture, structure, or current implementation
|
|
25
|
+
- Keywords: "explore", "find in code", "how does our", "where is", "codebase structure"
|
|
26
|
+
|
|
27
|
+
**Use `docs-research` agent when:**
|
|
28
|
+
- Query mentions specific library/framework APIs (React, Next.js, Prisma, tRPC, etc.)
|
|
29
|
+
- Looking for package documentation or how to use a dependency
|
|
30
|
+
- Questions about official API references
|
|
31
|
+
- Keywords: "library docs", "API reference", "how to use [library]", "documentation for"
|
|
32
|
+
- Check package.json first to see if mentioned library is a project dependency
|
|
33
|
+
|
|
34
|
+
**Use `web-research` agent when:**
|
|
35
|
+
- Query asks for "latest", "best practices", "how to do X in 2025"
|
|
36
|
+
- Looking for online tutorials, guides, or examples
|
|
37
|
+
- Researching industry standards or modern approaches
|
|
38
|
+
- No specific library mentioned, or general "how to" questions
|
|
39
|
+
- Keywords: "research online", "best practices", "modern approach", "latest", "tutorial"
|
|
40
|
+
|
|
41
|
+
**Default to `codebase-research`** if the query is ambiguous and could apply to understanding existing code.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Execution
|
|
46
|
+
|
|
47
|
+
Based on the query above, determine which agent to use and launch it with the Task tool:
|
|
48
|
+
|
|
49
|
+
- `subagent_type="codebase-research"` for codebase exploration
|
|
50
|
+
- `subagent_type="docs-research"` for library documentation
|
|
51
|
+
- `subagent_type="web-research"` for web searching
|
|
52
|
+
|
|
53
|
+
Pass the full query as the prompt to the agent.
|
|
54
|
+
|
|
55
|
+
**Note**: You can also manually specify the agent type by prefixing your query:
|
|
56
|
+
- `/research codebase: where is authentication handled`
|
|
57
|
+
- `/research web: tailwind grid best practices 2025`
|
|
58
|
+
- `/research docs: tRPC mutation error handling`
|