cc-mirror 1.0.3 → 1.1.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.
- package/README.md +168 -98
- package/dist/cc-mirror.mjs +807 -287
- package/dist/skills/multi-agent-orchestrator/SKILL.md +391 -0
- package/dist/skills/multi-agent-orchestrator/references/code-review.md +266 -0
- package/dist/skills/multi-agent-orchestrator/references/data-analysis.md +315 -0
- package/dist/skills/multi-agent-orchestrator/references/devops.md +309 -0
- package/dist/skills/multi-agent-orchestrator/references/documentation.md +310 -0
- package/dist/skills/multi-agent-orchestrator/references/domains/code-review.md +301 -0
- package/dist/skills/multi-agent-orchestrator/references/domains/data-analysis.md +347 -0
- package/dist/skills/multi-agent-orchestrator/references/domains/devops.md +340 -0
- package/dist/skills/multi-agent-orchestrator/references/domains/documentation.md +343 -0
- package/dist/skills/multi-agent-orchestrator/references/domains/project-management.md +370 -0
- package/dist/skills/multi-agent-orchestrator/references/domains/research.md +322 -0
- package/dist/skills/multi-agent-orchestrator/references/domains/software-development.md +269 -0
- package/dist/skills/multi-agent-orchestrator/references/domains/testing.md +313 -0
- package/dist/skills/multi-agent-orchestrator/references/examples.md +377 -0
- package/dist/skills/multi-agent-orchestrator/references/guide.md +327 -0
- package/dist/skills/multi-agent-orchestrator/references/patterns.md +441 -0
- package/dist/skills/multi-agent-orchestrator/references/project-management.md +345 -0
- package/dist/skills/multi-agent-orchestrator/references/research.md +285 -0
- package/dist/skills/multi-agent-orchestrator/references/software-development.md +242 -0
- package/dist/skills/multi-agent-orchestrator/references/testing.md +282 -0
- package/dist/skills/multi-agent-orchestrator/references/tools.md +454 -0
- package/dist/tui.mjs +1063 -405
- package/package.json +2 -2
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
# Project Management Orchestration Patterns
|
|
2
|
+
|
|
3
|
+
## Table of Contents
|
|
4
|
+
1. [Epic Breakdown](#epic-breakdown)
|
|
5
|
+
2. [Sprint Planning](#sprint-planning)
|
|
6
|
+
3. [Progress Tracking](#progress-tracking)
|
|
7
|
+
4. [Dependency Management](#dependency-management)
|
|
8
|
+
5. [Team Coordination](#team-coordination)
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Epic Breakdown
|
|
13
|
+
|
|
14
|
+
### Pattern: Hierarchical Decomposition
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
User Request: "Break down the authentication epic"
|
|
18
|
+
|
|
19
|
+
Phase 1: EXPLORE
|
|
20
|
+
└─ Explore agent: Understand requirements, existing system
|
|
21
|
+
|
|
22
|
+
Phase 2: PLAN
|
|
23
|
+
└─ Plan agent: Design high-level feature breakdown
|
|
24
|
+
|
|
25
|
+
Phase 3: FAN-OUT (Parallel story creation)
|
|
26
|
+
├─ Agent A: User stories for login/logout
|
|
27
|
+
├─ Agent B: User stories for registration
|
|
28
|
+
├─ Agent C: User stories for password management
|
|
29
|
+
├─ Agent D: User stories for session management
|
|
30
|
+
└─ Agent E: User stories for OAuth integration
|
|
31
|
+
|
|
32
|
+
Phase 4: REDUCE
|
|
33
|
+
└─ General-purpose agent: Organize into coherent backlog
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Task Management Implementation:**
|
|
37
|
+
```
|
|
38
|
+
# Create epic
|
|
39
|
+
TaskCreate(subject="Epic: User Authentication", description="Complete auth system")
|
|
40
|
+
|
|
41
|
+
# Create stories
|
|
42
|
+
TaskCreate(subject="Story: Login flow", description="...")
|
|
43
|
+
TaskCreate(subject="Story: Registration", description="...")
|
|
44
|
+
TaskCreate(subject="Story: Password reset", description="...")
|
|
45
|
+
|
|
46
|
+
# Set dependencies
|
|
47
|
+
TaskUpdate(taskId="3", addBlockedBy=["2"]) # Reset after registration
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Pattern: Vertical Slice Breakdown
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
Phase 1: EXPLORE
|
|
54
|
+
└─ Explore agent: Map feature touchpoints (UI, API, DB)
|
|
55
|
+
|
|
56
|
+
Phase 2: FAN-OUT (Slice by user value)
|
|
57
|
+
├─ Agent A: Define slice 1 (minimal viable feature)
|
|
58
|
+
├─ Agent B: Define slice 2 (enhanced feature)
|
|
59
|
+
└─ Agent C: Define slice 3 (complete feature)
|
|
60
|
+
|
|
61
|
+
Phase 3: PIPELINE
|
|
62
|
+
└─ General-purpose agent: Estimate, prioritize, sequence
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Pattern: Spike-First Breakdown
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
Phase 1: EXPLORE
|
|
69
|
+
└─ Explore agent: Identify unknowns and risks
|
|
70
|
+
|
|
71
|
+
Phase 2: FAN-OUT (Parallel spikes)
|
|
72
|
+
├─ Agent A: Technical spike - feasibility
|
|
73
|
+
├─ Agent B: Technical spike - performance
|
|
74
|
+
└─ Agent C: UX spike - user research
|
|
75
|
+
|
|
76
|
+
Phase 3: REDUCE
|
|
77
|
+
└─ General-purpose agent: Use spike findings to refine breakdown
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Sprint Planning
|
|
83
|
+
|
|
84
|
+
### Pattern: Capacity-Based Planning
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
User Request: "Plan the next sprint"
|
|
88
|
+
|
|
89
|
+
Phase 1: FAN-OUT (Gather context)
|
|
90
|
+
├─ Explore agent: Review backlog priority
|
|
91
|
+
├─ Explore agent: Check team capacity
|
|
92
|
+
├─ Explore agent: Review blockers and dependencies
|
|
93
|
+
└─ Explore agent: Check carryover from last sprint
|
|
94
|
+
|
|
95
|
+
Phase 2: REDUCE
|
|
96
|
+
└─ Plan agent: Propose sprint scope
|
|
97
|
+
|
|
98
|
+
Phase 3: FAN-OUT (Task breakdown)
|
|
99
|
+
├─ Agent A: Break down story 1 into tasks
|
|
100
|
+
├─ Agent B: Break down story 2 into tasks
|
|
101
|
+
└─ Agent C: Break down story 3 into tasks
|
|
102
|
+
|
|
103
|
+
Phase 4: PIPELINE
|
|
104
|
+
└─ General-purpose agent: Finalize sprint backlog
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**Task Structure:**
|
|
108
|
+
```
|
|
109
|
+
# Sprint-level task
|
|
110
|
+
TaskCreate(subject="Sprint 14: Auth Implementation", description="...")
|
|
111
|
+
|
|
112
|
+
# Stories within sprint
|
|
113
|
+
TaskCreate(subject="Login API endpoint", description="...")
|
|
114
|
+
TaskCreate(subject="Login UI component", description="...")
|
|
115
|
+
TaskUpdate(taskId="2", addBlockedBy=["1"]) # UI needs API first
|
|
116
|
+
|
|
117
|
+
# Sub-tasks
|
|
118
|
+
TaskCreate(subject="Write login validation", description="...")
|
|
119
|
+
TaskCreate(subject="Add rate limiting", description="...")
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Pattern: Risk-Adjusted Planning
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
Phase 1: FAN-OUT
|
|
126
|
+
├─ Agent A: Identify technical risks
|
|
127
|
+
├─ Agent B: Identify dependency risks
|
|
128
|
+
└─ Agent C: Identify scope risks
|
|
129
|
+
|
|
130
|
+
Phase 2: REDUCE
|
|
131
|
+
└─ Plan agent: Adjust estimates with risk buffer
|
|
132
|
+
|
|
133
|
+
Phase 3: PIPELINE
|
|
134
|
+
└─ General-purpose agent: Create contingency tasks
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Progress Tracking
|
|
140
|
+
|
|
141
|
+
### Pattern: Multi-Dimension Status
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
User Request: "What's the project status?"
|
|
145
|
+
|
|
146
|
+
Phase 1: FAN-OUT (Parallel status gathering)
|
|
147
|
+
├─ Agent A: Task completion status (from TaskList)
|
|
148
|
+
├─ Agent B: Blocker analysis
|
|
149
|
+
├─ Agent C: Timeline vs plan
|
|
150
|
+
├─ Agent D: Quality metrics
|
|
151
|
+
└─ Agent E: Risk status
|
|
152
|
+
|
|
153
|
+
Phase 2: REDUCE
|
|
154
|
+
└─ General-purpose agent: Executive status summary
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**Using TaskList:**
|
|
158
|
+
```
|
|
159
|
+
# Get current state
|
|
160
|
+
TaskList() # Returns all tasks with status
|
|
161
|
+
|
|
162
|
+
# Update progress
|
|
163
|
+
TaskUpdate(taskId="5", addComment={
|
|
164
|
+
author: "agent-id",
|
|
165
|
+
content: "50% complete, blocked on API review"
|
|
166
|
+
})
|
|
167
|
+
|
|
168
|
+
# Mark complete
|
|
169
|
+
TaskUpdate(taskId="5", status="resolved")
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Pattern: Burndown Tracking
|
|
173
|
+
|
|
174
|
+
```
|
|
175
|
+
Phase 1: EXPLORE
|
|
176
|
+
└─ Explore agent: Calculate completed vs remaining work
|
|
177
|
+
|
|
178
|
+
Phase 2: PIPELINE
|
|
179
|
+
├─ General-purpose agent: Project completion trajectory
|
|
180
|
+
├─ General-purpose agent: Identify velocity trends
|
|
181
|
+
└─ General-purpose agent: Flag at-risk items
|
|
182
|
+
|
|
183
|
+
Phase 3: REDUCE
|
|
184
|
+
└─ General-purpose agent: Burndown report
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
### Pattern: Blocker Resolution
|
|
188
|
+
|
|
189
|
+
```
|
|
190
|
+
Phase 1: EXPLORE
|
|
191
|
+
└─ Explore agent: Identify all blocked tasks
|
|
192
|
+
|
|
193
|
+
Phase 2: FAN-OUT (Parallel resolution paths)
|
|
194
|
+
├─ Agent A: Investigate blocker 1
|
|
195
|
+
├─ Agent B: Investigate blocker 2
|
|
196
|
+
└─ Agent C: Investigate blocker 3
|
|
197
|
+
|
|
198
|
+
Phase 3: REDUCE
|
|
199
|
+
└─ General-purpose agent: Resolution plan, escalation needs
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## Dependency Management
|
|
205
|
+
|
|
206
|
+
### Pattern: Dependency Graph Construction
|
|
207
|
+
|
|
208
|
+
```
|
|
209
|
+
User Request: "Map project dependencies"
|
|
210
|
+
|
|
211
|
+
Phase 1: EXPLORE
|
|
212
|
+
└─ Explore agent: List all tasks and their relationships
|
|
213
|
+
|
|
214
|
+
Phase 2: FAN-OUT
|
|
215
|
+
├─ Agent A: Map technical dependencies
|
|
216
|
+
├─ Agent B: Map team/resource dependencies
|
|
217
|
+
└─ Agent C: Map external dependencies
|
|
218
|
+
|
|
219
|
+
Phase 3: REDUCE
|
|
220
|
+
└─ General-purpose agent: Dependency graph, critical path
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
**Implementation:**
|
|
224
|
+
```
|
|
225
|
+
# Create dependency chain
|
|
226
|
+
TaskCreate(subject="Database schema", description="...")
|
|
227
|
+
TaskCreate(subject="API models", description="...")
|
|
228
|
+
TaskCreate(subject="API endpoints", description="...")
|
|
229
|
+
TaskCreate(subject="Frontend integration", description="...")
|
|
230
|
+
|
|
231
|
+
TaskUpdate(taskId="2", addBlockedBy=["1"])
|
|
232
|
+
TaskUpdate(taskId="3", addBlockedBy=["2"])
|
|
233
|
+
TaskUpdate(taskId="4", addBlockedBy=["3"])
|
|
234
|
+
|
|
235
|
+
# Cross-team dependency
|
|
236
|
+
TaskCreate(subject="External API access", description="Waiting on partner")
|
|
237
|
+
TaskUpdate(taskId="3", addBlockedBy=["5"]) # Blocked by external
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### Pattern: Critical Path Analysis
|
|
241
|
+
|
|
242
|
+
```
|
|
243
|
+
Phase 1: EXPLORE
|
|
244
|
+
└─ Explore agent: Map all task dependencies
|
|
245
|
+
|
|
246
|
+
Phase 2: PIPELINE
|
|
247
|
+
├─ General-purpose agent: Calculate path lengths
|
|
248
|
+
├─ General-purpose agent: Identify critical path
|
|
249
|
+
└─ General-purpose agent: Find parallel opportunities
|
|
250
|
+
|
|
251
|
+
Phase 3: REDUCE
|
|
252
|
+
└─ General-purpose agent: Optimization recommendations
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
### Pattern: Dependency Resolution
|
|
256
|
+
|
|
257
|
+
```
|
|
258
|
+
Phase 1: FAN-OUT
|
|
259
|
+
├─ Agent A: Identify circular dependencies
|
|
260
|
+
├─ Agent B: Identify unnecessary dependencies
|
|
261
|
+
└─ Agent C: Identify dependency bottlenecks
|
|
262
|
+
|
|
263
|
+
Phase 2: PIPELINE
|
|
264
|
+
└─ General-purpose agent: Restructure to unblock work
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
## Team Coordination
|
|
270
|
+
|
|
271
|
+
### Pattern: Work Distribution
|
|
272
|
+
|
|
273
|
+
```
|
|
274
|
+
User Request: "Assign work for this sprint"
|
|
275
|
+
|
|
276
|
+
Phase 1: FAN-OUT
|
|
277
|
+
├─ Explore agent: Analyze task requirements
|
|
278
|
+
├─ Explore agent: Review team skills/capacity
|
|
279
|
+
└─ Explore agent: Check current assignments
|
|
280
|
+
|
|
281
|
+
Phase 2: REDUCE
|
|
282
|
+
└─ Plan agent: Optimal assignment recommendations
|
|
283
|
+
|
|
284
|
+
Phase 3: FAN-OUT (Parallel task assignment)
|
|
285
|
+
├─ Agent A: Create task assignments for dev 1
|
|
286
|
+
├─ Agent B: Create task assignments for dev 2
|
|
287
|
+
└─ Agent C: Create task assignments for dev 3
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### Pattern: Handoff Coordination
|
|
291
|
+
|
|
292
|
+
```
|
|
293
|
+
Phase 1: EXPLORE
|
|
294
|
+
└─ Explore agent: Identify tasks requiring handoffs
|
|
295
|
+
|
|
296
|
+
Phase 2: PIPELINE
|
|
297
|
+
├─ General-purpose agent: Document handoff requirements
|
|
298
|
+
├─ General-purpose agent: Create handoff checklist
|
|
299
|
+
└─ General-purpose agent: Schedule coordination points
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
### Pattern: Multi-Team Sync
|
|
303
|
+
|
|
304
|
+
```
|
|
305
|
+
Phase 1: FAN-OUT
|
|
306
|
+
├─ Agent A: Gather Team A status
|
|
307
|
+
├─ Agent B: Gather Team B status
|
|
308
|
+
└─ Agent C: Identify cross-team dependencies
|
|
309
|
+
|
|
310
|
+
Phase 2: REDUCE
|
|
311
|
+
└─ General-purpose agent: Cross-team status, blockers, needs
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
---
|
|
315
|
+
|
|
316
|
+
## TodoWrite Integration
|
|
317
|
+
|
|
318
|
+
For session-based project tracking:
|
|
319
|
+
```
|
|
320
|
+
TodoWrite([
|
|
321
|
+
{content: "Review current backlog", status: "in_progress", activeForm: "Reviewing backlog"},
|
|
322
|
+
{content: "Identify priorities", status: "pending", activeForm: "Identifying priorities"},
|
|
323
|
+
{content: "Break down into tasks", status: "pending", activeForm: "Breaking down tasks"},
|
|
324
|
+
{content: "Set dependencies", status: "pending", activeForm: "Setting dependencies"},
|
|
325
|
+
{content: "Assign and communicate", status: "pending", activeForm: "Assigning work"}
|
|
326
|
+
])
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
## Task vs Todo Selection
|
|
330
|
+
|
|
331
|
+
| Scenario | Use TaskCreate | Use TodoWrite |
|
|
332
|
+
|----------|---------------|---------------|
|
|
333
|
+
| Multi-session project | Yes | No |
|
|
334
|
+
| Quick session work | No | Yes |
|
|
335
|
+
| Team visibility needed | Yes | No |
|
|
336
|
+
| Dependencies to track | Yes | Maybe |
|
|
337
|
+
| Persistent record | Yes | No |
|
|
338
|
+
|
|
339
|
+
## Best Practices
|
|
340
|
+
|
|
341
|
+
1. **Break down early** - Large tasks are hard to track
|
|
342
|
+
2. **Set dependencies explicitly** - Prevents blocked work
|
|
343
|
+
3. **Update status frequently** - Real-time visibility
|
|
344
|
+
4. **Comment on blockers** - Context for resolution
|
|
345
|
+
5. **Close completed tasks immediately** - Accurate progress
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
# Research Orchestration Patterns
|
|
2
|
+
|
|
3
|
+
## Table of Contents
|
|
4
|
+
1. [Codebase Exploration](#codebase-exploration)
|
|
5
|
+
2. [Technical Investigation](#technical-investigation)
|
|
6
|
+
3. [Dependency Analysis](#dependency-analysis)
|
|
7
|
+
4. [Documentation Research](#documentation-research)
|
|
8
|
+
5. [Competitive Analysis](#competitive-analysis)
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Codebase Exploration
|
|
13
|
+
|
|
14
|
+
### Pattern: Breadth-First Discovery
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
User Request: "Help me understand this codebase"
|
|
18
|
+
|
|
19
|
+
Phase 1: FAN-OUT (Parallel surface scan)
|
|
20
|
+
├─ Explore agent: Project structure, entry points
|
|
21
|
+
├─ Explore agent: Package.json/requirements/build files
|
|
22
|
+
├─ Explore agent: README, docs folder
|
|
23
|
+
└─ Explore agent: Test structure and patterns
|
|
24
|
+
|
|
25
|
+
Phase 2: REDUCE
|
|
26
|
+
└─ General-purpose agent: Synthesize codebase overview
|
|
27
|
+
|
|
28
|
+
Phase 3: FAN-OUT (Deep dive areas of interest)
|
|
29
|
+
├─ Explore agent: Deep dive area 1
|
|
30
|
+
├─ Explore agent: Deep dive area 2
|
|
31
|
+
└─ Explore agent: Deep dive area 3
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Pattern: Feature Tracing
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
User Request: "How does user authentication work?"
|
|
38
|
+
|
|
39
|
+
Phase 1: EXPLORE
|
|
40
|
+
└─ Explore agent: Find auth-related files (grep patterns)
|
|
41
|
+
|
|
42
|
+
Phase 2: PIPELINE (Follow the flow)
|
|
43
|
+
├─ Explore agent: Entry point (login route/component)
|
|
44
|
+
├─ Explore agent: Middleware/validation layer
|
|
45
|
+
├─ Explore agent: Session/token handling
|
|
46
|
+
└─ Explore agent: Database/storage layer
|
|
47
|
+
|
|
48
|
+
Phase 3: REDUCE
|
|
49
|
+
└─ General-purpose agent: Document complete auth flow
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Pattern: Impact Analysis
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
User Request: "What would break if I change UserService?"
|
|
56
|
+
|
|
57
|
+
Phase 1: EXPLORE
|
|
58
|
+
└─ Explore agent: Find UserService definition and interface
|
|
59
|
+
|
|
60
|
+
Phase 2: FAN-OUT
|
|
61
|
+
├─ Explore agent: Find all imports of UserService
|
|
62
|
+
├─ Explore agent: Find all usages of each method
|
|
63
|
+
└─ Explore agent: Find tests depending on UserService
|
|
64
|
+
|
|
65
|
+
Phase 3: REDUCE
|
|
66
|
+
└─ General-purpose agent: Impact report with risk assessment
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Technical Investigation
|
|
72
|
+
|
|
73
|
+
### Pattern: Root Cause Analysis
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
User Request: "Why is the API slow?"
|
|
77
|
+
|
|
78
|
+
Phase 1: FAN-OUT (Parallel hypothesis generation)
|
|
79
|
+
├─ Explore agent: Check database query patterns
|
|
80
|
+
├─ Explore agent: Check API middleware chain
|
|
81
|
+
├─ Explore agent: Check external service calls
|
|
82
|
+
└─ Explore agent: Check caching implementation
|
|
83
|
+
|
|
84
|
+
Phase 2: REDUCE
|
|
85
|
+
└─ General-purpose agent: Ranked hypotheses with evidence
|
|
86
|
+
|
|
87
|
+
Phase 3: PIPELINE (Validate top hypothesis)
|
|
88
|
+
└─ General-purpose agent: Instrument/test to confirm
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Pattern: Technology Evaluation
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
User Request: "Should we use Redis or Memcached?"
|
|
95
|
+
|
|
96
|
+
Phase 1: FAN-OUT (Parallel research)
|
|
97
|
+
├─ Agent A (WebSearch): Redis features, use cases, benchmarks
|
|
98
|
+
├─ Agent B (WebSearch): Memcached features, use cases, benchmarks
|
|
99
|
+
└─ Explore agent: Current caching patterns in codebase
|
|
100
|
+
|
|
101
|
+
Phase 2: REDUCE
|
|
102
|
+
└─ Plan agent: Comparison matrix, recommendation with rationale
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Pattern: Bug Archaeology
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
User Request: "When did this bug get introduced?"
|
|
109
|
+
|
|
110
|
+
Phase 1: EXPLORE
|
|
111
|
+
└─ Explore agent: Identify relevant files and functions
|
|
112
|
+
|
|
113
|
+
Phase 2: BACKGROUND
|
|
114
|
+
└─ Background agent: Git bisect or log analysis
|
|
115
|
+
|
|
116
|
+
Phase 3: PIPELINE
|
|
117
|
+
└─ General-purpose agent: Timeline of changes, root cause commit
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Dependency Analysis
|
|
123
|
+
|
|
124
|
+
### Pattern: Dependency Graph
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
User Request: "Map all dependencies for the auth module"
|
|
128
|
+
|
|
129
|
+
Phase 1: EXPLORE
|
|
130
|
+
└─ Explore agent: Find auth module entry points
|
|
131
|
+
|
|
132
|
+
Phase 2: FAN-OUT (Parallel tracing)
|
|
133
|
+
├─ Explore agent: Trace internal dependencies
|
|
134
|
+
├─ Explore agent: Trace external package dependencies
|
|
135
|
+
└─ Explore agent: Trace database/service dependencies
|
|
136
|
+
|
|
137
|
+
Phase 3: REDUCE
|
|
138
|
+
└─ General-purpose agent: Dependency graph visualization
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Pattern: Upgrade Impact
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
User Request: "What happens if we upgrade lodash?"
|
|
145
|
+
|
|
146
|
+
Phase 1: FAN-OUT
|
|
147
|
+
├─ Explore agent: Find all lodash usages
|
|
148
|
+
├─ Agent (WebSearch): lodash changelog, breaking changes
|
|
149
|
+
└─ Explore agent: Find tests covering lodash functionality
|
|
150
|
+
|
|
151
|
+
Phase 2: REDUCE
|
|
152
|
+
└─ General-purpose agent: Impact assessment, migration guide
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Pattern: Dead Code Detection
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
Phase 1: EXPLORE
|
|
159
|
+
└─ Explore agent: Build export/import graph
|
|
160
|
+
|
|
161
|
+
Phase 2: FAN-OUT
|
|
162
|
+
├─ Explore agent: Find unreferenced exports
|
|
163
|
+
├─ Explore agent: Find unused internal functions
|
|
164
|
+
└─ Explore agent: Find commented/disabled code
|
|
165
|
+
|
|
166
|
+
Phase 3: REDUCE
|
|
167
|
+
└─ General-purpose agent: Dead code report with safe removal list
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## Documentation Research
|
|
173
|
+
|
|
174
|
+
### Pattern: API Discovery
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
User Request: "Document all API endpoints"
|
|
178
|
+
|
|
179
|
+
Phase 1: EXPLORE
|
|
180
|
+
└─ Explore agent: Find route definitions (express routes, decorators, etc.)
|
|
181
|
+
|
|
182
|
+
Phase 2: MAP (Per endpoint)
|
|
183
|
+
├─ Agent A: Document endpoint group 1 (params, responses)
|
|
184
|
+
├─ Agent B: Document endpoint group 2
|
|
185
|
+
└─ Agent C: Document endpoint group 3
|
|
186
|
+
|
|
187
|
+
Phase 3: REDUCE
|
|
188
|
+
└─ General-purpose agent: Unified API documentation
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Pattern: Cross-Reference
|
|
192
|
+
|
|
193
|
+
```
|
|
194
|
+
User Request: "Find all documentation for the payment system"
|
|
195
|
+
|
|
196
|
+
Phase 1: FAN-OUT
|
|
197
|
+
├─ Explore agent: Search code comments
|
|
198
|
+
├─ Explore agent: Search markdown files
|
|
199
|
+
├─ Explore agent: Search wiki/confluence (if accessible)
|
|
200
|
+
└─ Explore agent: Search inline JSDoc/docstrings
|
|
201
|
+
|
|
202
|
+
Phase 2: REDUCE
|
|
203
|
+
└─ General-purpose agent: Consolidated documentation index
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## Competitive Analysis
|
|
209
|
+
|
|
210
|
+
### Pattern: Feature Comparison
|
|
211
|
+
|
|
212
|
+
```
|
|
213
|
+
User Request: "Compare our auth to Auth0"
|
|
214
|
+
|
|
215
|
+
Phase 1: FAN-OUT
|
|
216
|
+
├─ Explore agent: Document our auth capabilities
|
|
217
|
+
├─ Agent (WebSearch): Auth0 features and pricing
|
|
218
|
+
└─ Agent (WebSearch): Auth0 limitations and reviews
|
|
219
|
+
|
|
220
|
+
Phase 2: REDUCE
|
|
221
|
+
└─ Plan agent: Feature matrix, gap analysis
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### Pattern: Best Practices Research
|
|
225
|
+
|
|
226
|
+
```
|
|
227
|
+
User Request: "What are best practices for rate limiting?"
|
|
228
|
+
|
|
229
|
+
Phase 1: FAN-OUT
|
|
230
|
+
├─ Agent (WebSearch): Industry rate limiting patterns
|
|
231
|
+
├─ Agent (WebSearch): Framework-specific implementations
|
|
232
|
+
├─ Explore agent: Current rate limiting in codebase
|
|
233
|
+
└─ Agent (WebSearch): Case studies and failure modes
|
|
234
|
+
|
|
235
|
+
Phase 2: REDUCE
|
|
236
|
+
└─ General-purpose agent: Best practices guide with recommendations
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## Research Output Formats
|
|
242
|
+
|
|
243
|
+
### Investigation Report Template
|
|
244
|
+
|
|
245
|
+
```markdown
|
|
246
|
+
## Question
|
|
247
|
+
[Original question/request]
|
|
248
|
+
|
|
249
|
+
## Summary
|
|
250
|
+
[1-2 sentence answer]
|
|
251
|
+
|
|
252
|
+
## Evidence
|
|
253
|
+
1. [Finding 1 with file:line references]
|
|
254
|
+
2. [Finding 2 with file:line references]
|
|
255
|
+
|
|
256
|
+
## Analysis
|
|
257
|
+
[Interpretation of evidence]
|
|
258
|
+
|
|
259
|
+
## Recommendations
|
|
260
|
+
1. [Actionable recommendation]
|
|
261
|
+
|
|
262
|
+
## Open Questions
|
|
263
|
+
- [What wasn't answered]
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
### TodoWrite for Research
|
|
267
|
+
|
|
268
|
+
```
|
|
269
|
+
TodoWrite([
|
|
270
|
+
{content: "Define research scope and questions", status: "in_progress", activeForm: "Defining scope"},
|
|
271
|
+
{content: "Gather relevant sources and code", status: "pending", activeForm: "Gathering sources"},
|
|
272
|
+
{content: "Analyze findings", status: "pending", activeForm: "Analyzing findings"},
|
|
273
|
+
{content: "Synthesize conclusions", status: "pending", activeForm: "Synthesizing conclusions"},
|
|
274
|
+
{content: "Document recommendations", status: "pending", activeForm: "Documenting recommendations"}
|
|
275
|
+
])
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
## Agent Selection for Research
|
|
279
|
+
|
|
280
|
+
| Research Type | Primary Agent | Secondary Agents |
|
|
281
|
+
|---------------|---------------|------------------|
|
|
282
|
+
| Codebase questions | Explore | General-purpose for synthesis |
|
|
283
|
+
| External research | WebSearch-enabled | Explore for local context |
|
|
284
|
+
| Architecture | Plan | Explore for discovery |
|
|
285
|
+
| Impact analysis | Explore (parallel) | General-purpose for aggregation |
|