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.
Files changed (25) hide show
  1. package/README.md +168 -98
  2. package/dist/cc-mirror.mjs +807 -287
  3. package/dist/skills/multi-agent-orchestrator/SKILL.md +391 -0
  4. package/dist/skills/multi-agent-orchestrator/references/code-review.md +266 -0
  5. package/dist/skills/multi-agent-orchestrator/references/data-analysis.md +315 -0
  6. package/dist/skills/multi-agent-orchestrator/references/devops.md +309 -0
  7. package/dist/skills/multi-agent-orchestrator/references/documentation.md +310 -0
  8. package/dist/skills/multi-agent-orchestrator/references/domains/code-review.md +301 -0
  9. package/dist/skills/multi-agent-orchestrator/references/domains/data-analysis.md +347 -0
  10. package/dist/skills/multi-agent-orchestrator/references/domains/devops.md +340 -0
  11. package/dist/skills/multi-agent-orchestrator/references/domains/documentation.md +343 -0
  12. package/dist/skills/multi-agent-orchestrator/references/domains/project-management.md +370 -0
  13. package/dist/skills/multi-agent-orchestrator/references/domains/research.md +322 -0
  14. package/dist/skills/multi-agent-orchestrator/references/domains/software-development.md +269 -0
  15. package/dist/skills/multi-agent-orchestrator/references/domains/testing.md +313 -0
  16. package/dist/skills/multi-agent-orchestrator/references/examples.md +377 -0
  17. package/dist/skills/multi-agent-orchestrator/references/guide.md +327 -0
  18. package/dist/skills/multi-agent-orchestrator/references/patterns.md +441 -0
  19. package/dist/skills/multi-agent-orchestrator/references/project-management.md +345 -0
  20. package/dist/skills/multi-agent-orchestrator/references/research.md +285 -0
  21. package/dist/skills/multi-agent-orchestrator/references/software-development.md +242 -0
  22. package/dist/skills/multi-agent-orchestrator/references/testing.md +282 -0
  23. package/dist/skills/multi-agent-orchestrator/references/tools.md +454 -0
  24. package/dist/tui.mjs +1063 -405
  25. package/package.json +2 -2
@@ -0,0 +1,322 @@
1
+ # Research Orchestration Patterns
2
+
3
+ ```
4
+ ┌─────────────────────────────────────────────────────────────┐
5
+ │ │
6
+ │ Discovery is where great work begins. │
7
+ │ Explore broadly, synthesize clearly, answer confidently. │
8
+ │ │
9
+ └─────────────────────────────────────────────────────────────┘
10
+ ```
11
+
12
+ > **Load when**: Codebase exploration, technical investigation, dependency analysis, documentation research
13
+ > **Common patterns**: Breadth-First Discovery, Feature Tracing, Root Cause Analysis
14
+
15
+ ## Table of Contents
16
+
17
+ 1. [Codebase Exploration](#codebase-exploration)
18
+ 2. [Technical Investigation](#technical-investigation)
19
+ 3. [Dependency Analysis](#dependency-analysis)
20
+ 4. [Documentation Research](#documentation-research)
21
+ 5. [Competitive Analysis](#competitive-analysis)
22
+
23
+ ---
24
+
25
+ ## Codebase Exploration
26
+
27
+ ### Pattern: Breadth-First Discovery
28
+
29
+ ```
30
+ User Request: "Help me understand this codebase"
31
+
32
+ Phase 1: FAN-OUT (Parallel surface scan)
33
+ ├─ Explore agent: Project structure, entry points
34
+ ├─ Explore agent: Package.json/requirements/build files
35
+ ├─ Explore agent: README, docs folder
36
+ └─ Explore agent: Test structure and patterns
37
+
38
+ Phase 2: REDUCE
39
+ └─ General-purpose agent: Synthesize codebase overview
40
+
41
+ Phase 3: FAN-OUT (Deep dive areas of interest)
42
+ ├─ Explore agent: Deep dive area 1
43
+ ├─ Explore agent: Deep dive area 2
44
+ └─ Explore agent: Deep dive area 3
45
+ ```
46
+
47
+ ### Pattern: Feature Tracing
48
+
49
+ ```
50
+ User Request: "How does user authentication work?"
51
+
52
+ Phase 1: EXPLORE
53
+ └─ Explore agent: Find auth-related files (grep patterns)
54
+
55
+ Phase 2: PIPELINE (Follow the flow)
56
+ ├─ Explore agent: Entry point (login route/component)
57
+ ├─ Explore agent: Middleware/validation layer
58
+ ├─ Explore agent: Session/token handling
59
+ └─ Explore agent: Database/storage layer
60
+
61
+ Phase 3: REDUCE
62
+ └─ General-purpose agent: Document complete auth flow
63
+ ```
64
+
65
+ ### Pattern: Impact Analysis
66
+
67
+ ```
68
+ User Request: "What would break if I change UserService?"
69
+
70
+ Phase 1: EXPLORE
71
+ └─ Explore agent: Find UserService definition and interface
72
+
73
+ Phase 2: FAN-OUT
74
+ ├─ Explore agent: Find all imports of UserService
75
+ ├─ Explore agent: Find all usages of each method
76
+ └─ Explore agent: Find tests depending on UserService
77
+
78
+ Phase 3: REDUCE
79
+ └─ General-purpose agent: Impact report with risk assessment
80
+ ```
81
+
82
+ ---
83
+
84
+ ## Technical Investigation
85
+
86
+ ### Pattern: Root Cause Analysis
87
+
88
+ ```
89
+ User Request: "Why is the API slow?"
90
+
91
+ Phase 1: FAN-OUT (Parallel hypothesis generation)
92
+ ├─ Explore agent: Check database query patterns
93
+ ├─ Explore agent: Check API middleware chain
94
+ ├─ Explore agent: Check external service calls
95
+ └─ Explore agent: Check caching implementation
96
+
97
+ Phase 2: REDUCE
98
+ └─ General-purpose agent: Ranked hypotheses with evidence
99
+
100
+ Phase 3: PIPELINE (Validate top hypothesis)
101
+ └─ General-purpose agent: Instrument/test to confirm
102
+ ```
103
+
104
+ ### Pattern: Technology Evaluation
105
+
106
+ ```
107
+ User Request: "Should we use Redis or Memcached?"
108
+
109
+ Phase 1: FAN-OUT (Parallel research)
110
+ ├─ Agent A (WebSearch): Redis features, use cases, benchmarks
111
+ ├─ Agent B (WebSearch): Memcached features, use cases, benchmarks
112
+ └─ Explore agent: Current caching patterns in codebase
113
+
114
+ Phase 2: REDUCE
115
+ └─ Plan agent: Comparison matrix, recommendation with rationale
116
+ ```
117
+
118
+ ### Pattern: Bug Archaeology
119
+
120
+ ```
121
+ User Request: "When did this bug get introduced?"
122
+
123
+ Phase 1: EXPLORE
124
+ └─ Explore agent: Identify relevant files and functions
125
+
126
+ Phase 2: BACKGROUND
127
+ └─ Background agent: Git bisect or log analysis
128
+
129
+ Phase 3: PIPELINE
130
+ └─ General-purpose agent: Timeline of changes, root cause commit
131
+ ```
132
+
133
+ ---
134
+
135
+ ## Dependency Analysis
136
+
137
+ ### Pattern: Dependency Graph
138
+
139
+ ```
140
+ User Request: "Map all dependencies for the auth module"
141
+
142
+ Phase 1: EXPLORE
143
+ └─ Explore agent: Find auth module entry points
144
+
145
+ Phase 2: FAN-OUT (Parallel tracing)
146
+ ├─ Explore agent: Trace internal dependencies
147
+ ├─ Explore agent: Trace external package dependencies
148
+ └─ Explore agent: Trace database/service dependencies
149
+
150
+ Phase 3: REDUCE
151
+ └─ General-purpose agent: Dependency graph visualization
152
+ ```
153
+
154
+ ### Pattern: Upgrade Impact
155
+
156
+ ```
157
+ User Request: "What happens if we upgrade lodash?"
158
+
159
+ Phase 1: FAN-OUT
160
+ ├─ Explore agent: Find all lodash usages
161
+ ├─ Agent (WebSearch): lodash changelog, breaking changes
162
+ └─ Explore agent: Find tests covering lodash functionality
163
+
164
+ Phase 2: REDUCE
165
+ └─ General-purpose agent: Impact assessment, migration guide
166
+ ```
167
+
168
+ ### Pattern: Dead Code Detection
169
+
170
+ ```
171
+ Phase 1: EXPLORE
172
+ └─ Explore agent: Build export/import graph
173
+
174
+ Phase 2: FAN-OUT
175
+ ├─ Explore agent: Find unreferenced exports
176
+ ├─ Explore agent: Find unused internal functions
177
+ └─ Explore agent: Find commented/disabled code
178
+
179
+ Phase 3: REDUCE
180
+ └─ General-purpose agent: Dead code report with safe removal list
181
+ ```
182
+
183
+ ---
184
+
185
+ ## Documentation Research
186
+
187
+ ### Pattern: API Discovery
188
+
189
+ ```
190
+ User Request: "Document all API endpoints"
191
+
192
+ Phase 1: EXPLORE
193
+ └─ Explore agent: Find route definitions (express routes, decorators, etc.)
194
+
195
+ Phase 2: MAP (Per endpoint)
196
+ ├─ Agent A: Document endpoint group 1 (params, responses)
197
+ ├─ Agent B: Document endpoint group 2
198
+ └─ Agent C: Document endpoint group 3
199
+
200
+ Phase 3: REDUCE
201
+ └─ General-purpose agent: Unified API documentation
202
+ ```
203
+
204
+ ### Pattern: Cross-Reference
205
+
206
+ ```
207
+ User Request: "Find all documentation for the payment system"
208
+
209
+ Phase 1: FAN-OUT
210
+ ├─ Explore agent: Search code comments
211
+ ├─ Explore agent: Search markdown files
212
+ ├─ Explore agent: Search wiki/confluence (if accessible)
213
+ └─ Explore agent: Search inline JSDoc/docstrings
214
+
215
+ Phase 2: REDUCE
216
+ └─ General-purpose agent: Consolidated documentation index
217
+ ```
218
+
219
+ ---
220
+
221
+ ## Competitive Analysis
222
+
223
+ ### Pattern: Feature Comparison
224
+
225
+ ```
226
+ User Request: "Compare our auth to Auth0"
227
+
228
+ Phase 1: FAN-OUT
229
+ ├─ Explore agent: Document our auth capabilities
230
+ ├─ Agent (WebSearch): Auth0 features and pricing
231
+ └─ Agent (WebSearch): Auth0 limitations and reviews
232
+
233
+ Phase 2: REDUCE
234
+ └─ Plan agent: Feature matrix, gap analysis
235
+ ```
236
+
237
+ ### Pattern: Best Practices Research
238
+
239
+ ```
240
+ User Request: "What are best practices for rate limiting?"
241
+
242
+ Phase 1: FAN-OUT
243
+ ├─ Agent (WebSearch): Industry rate limiting patterns
244
+ ├─ Agent (WebSearch): Framework-specific implementations
245
+ ├─ Explore agent: Current rate limiting in codebase
246
+ └─ Agent (WebSearch): Case studies and failure modes
247
+
248
+ Phase 2: REDUCE
249
+ └─ General-purpose agent: Best practices guide with recommendations
250
+ ```
251
+
252
+ ---
253
+
254
+ ## Research Output Formats
255
+
256
+ ### Investigation Report Template
257
+
258
+ ```markdown
259
+ ## Question
260
+
261
+ [Original question/request]
262
+
263
+ ## Summary
264
+
265
+ [1-2 sentence answer]
266
+
267
+ ## Evidence
268
+
269
+ 1. [Finding 1 with file:line references]
270
+ 2. [Finding 2 with file:line references]
271
+
272
+ ## Analysis
273
+
274
+ [Interpretation of evidence]
275
+
276
+ ## Recommendations
277
+
278
+ 1. [Actionable recommendation]
279
+
280
+ ## Open Questions
281
+
282
+ - [What wasn't answered]
283
+ ```
284
+
285
+ ### Task Management for Research
286
+
287
+ For research tasks, structure as exploration followed by synthesis:
288
+
289
+ ```python
290
+ # Create research tasks
291
+ TaskCreate(subject="Define research scope", description="Clarify questions, identify sources...")
292
+ TaskCreate(subject="Explore area 1", description="Search for patterns in auth module...")
293
+ TaskCreate(subject="Explore area 2", description="Search for patterns in API layer...")
294
+ TaskCreate(subject="Explore area 3", description="Search for patterns in database...")
295
+ TaskCreate(subject="Synthesize findings", description="Aggregate discoveries, form conclusions...")
296
+
297
+ # Exploration can run in parallel, synthesis waits
298
+ TaskUpdate(taskId="2", addBlockedBy=["1"])
299
+ TaskUpdate(taskId="3", addBlockedBy=["1"])
300
+ TaskUpdate(taskId="4", addBlockedBy=["1"])
301
+ TaskUpdate(taskId="5", addBlockedBy=["2", "3", "4"])
302
+
303
+ # Spawn Explore agents in parallel
304
+ Task(subagent_type="Explore", prompt="TaskId 2: Find auth patterns...")
305
+ Task(subagent_type="Explore", prompt="TaskId 3: Find API patterns...")
306
+ Task(subagent_type="Explore", prompt="TaskId 4: Find database patterns...")
307
+ ```
308
+
309
+ ## Agent Selection for Research
310
+
311
+ | Research Type | Primary Agent | Secondary Agents |
312
+ | ------------------ | ------------------ | ------------------------------- |
313
+ | Codebase questions | Explore | General-purpose for synthesis |
314
+ | External research | WebSearch-enabled | Explore for local context |
315
+ | Architecture | Plan | Explore for discovery |
316
+ | Impact analysis | Explore (parallel) | General-purpose for aggregation |
317
+
318
+ ---
319
+
320
+ ```
321
+ ─── ◈ Research ──────────────────────────
322
+ ```
@@ -0,0 +1,269 @@
1
+ # Software Development Orchestration Patterns
2
+
3
+ ```
4
+ ┌─────────────────────────────────────────────────────────────┐
5
+ │ │
6
+ │ Building software is what we do best. │
7
+ │ Features, fixes, refactors — all orchestrated elegantly. │
8
+ │ │
9
+ └─────────────────────────────────────────────────────────────┘
10
+ ```
11
+
12
+ > **Load when**: Feature implementation, bug fixes, refactoring, migrations, greenfield development
13
+ > **Common patterns**: Plan-Parallel-Integrate, Diagnose-Hypothesize-Fix, Map-Analyze-Transform
14
+
15
+ ## Table of Contents
16
+
17
+ 1. [Feature Implementation](#feature-implementation)
18
+ 2. [Bug Fixing](#bug-fixing)
19
+ 3. [Refactoring](#refactoring)
20
+ 4. [Migration](#migration)
21
+ 5. [Greenfield Development](#greenfield-development)
22
+
23
+ ---
24
+
25
+ ## Feature Implementation
26
+
27
+ ### Pattern: Plan-Parallel-Integrate
28
+
29
+ ```
30
+ User Request: "Add user authentication"
31
+
32
+ Phase 1: PIPELINE (Research → Plan)
33
+ ├─ Explore agent: Find existing auth patterns, user models, middleware
34
+ └─ Plan agent: Design auth architecture using findings
35
+
36
+ Phase 2: FAN-OUT (Parallel Implementation)
37
+ ├─ Agent A: Implement user model + database schema
38
+ ├─ Agent B: Implement JWT/session middleware
39
+ ├─ Agent C: Implement login/logout routes
40
+ └─ Agent D: Implement frontend auth components
41
+
42
+ Phase 3: PIPELINE (Integration)
43
+ └─ General-purpose agent: Wire components, add tests, verify flow
44
+ ```
45
+
46
+ **Task breakdown:**
47
+
48
+ ```
49
+ TaskCreate("Design authentication architecture")
50
+ TaskCreate("Implement user model and schema")
51
+ TaskCreate("Build auth middleware")
52
+ TaskCreate("Create auth API routes")
53
+ TaskCreate("Build frontend auth UI")
54
+ TaskCreate("Integration testing")
55
+
56
+ # Dependencies
57
+ Task 2-5 blocked by Task 1
58
+ Task 6 blocked by Tasks 2-5
59
+ ```
60
+
61
+ ### Pattern: Vertical Slice
62
+
63
+ For full-stack features, implement one complete slice first:
64
+
65
+ ```
66
+ Phase 1: Single complete flow
67
+ └─ General-purpose agent: DB → API → UI for one use case
68
+
69
+ Phase 2: FAN-OUT expansion
70
+ ├─ Agent A: Additional DB operations
71
+ ├─ Agent B: Additional API endpoints
72
+ └─ Agent C: Additional UI components
73
+ ```
74
+
75
+ ---
76
+
77
+ ## Bug Fixing
78
+
79
+ ### Pattern: Diagnose-Hypothesize-Fix
80
+
81
+ ```
82
+ User Request: "Users can't log in after password reset"
83
+
84
+ Phase 1: FAN-OUT (Parallel Diagnosis)
85
+ ├─ Explore agent: Search error logs, recent changes to auth
86
+ ├─ Explore agent: Find password reset flow implementation
87
+ └─ Explore agent: Check session/token handling
88
+
89
+ Phase 2: PIPELINE (Analysis)
90
+ └─ General-purpose agent: Synthesize findings, form hypotheses
91
+
92
+ Phase 3: SPECULATIVE (If cause unclear)
93
+ ├─ Agent A: Test hypothesis 1 (token expiry issue)
94
+ ├─ Agent B: Test hypothesis 2 (session invalidation)
95
+ └─ Agent C: Test hypothesis 3 (password hash mismatch)
96
+
97
+ Phase 4: PIPELINE
98
+ └─ General-purpose agent: Implement fix, add regression test
99
+ ```
100
+
101
+ ### Pattern: Reproduction-First
102
+
103
+ ```
104
+ Phase 1: Reproduce
105
+ └─ General-purpose agent: Create minimal reproduction case
106
+
107
+ Phase 2: Bisect (if needed)
108
+ └─ Background agent: Git bisect to find breaking commit
109
+
110
+ Phase 3: Fix
111
+ └─ General-purpose agent: Implement and verify fix
112
+ ```
113
+
114
+ ---
115
+
116
+ ## Refactoring
117
+
118
+ ### Pattern: Map-Analyze-Transform
119
+
120
+ ```
121
+ User Request: "Refactor callback-based code to async/await"
122
+
123
+ Phase 1: MAP (Find all instances)
124
+ └─ Explore agent: Find all callback patterns in codebase
125
+
126
+ Phase 2: FAN-OUT (Analyze impact)
127
+ ├─ Agent A: Analyze module A dependencies
128
+ ├─ Agent B: Analyze module B dependencies
129
+ └─ Agent C: Analyze module C dependencies
130
+
131
+ Phase 3: PIPELINE (Safe transformation)
132
+ ├─ Plan agent: Design migration order (leaf nodes first)
133
+ └─ General-purpose agent: Transform files in dependency order
134
+ ```
135
+
136
+ ### Pattern: Strangler Fig
137
+
138
+ For large refactors, wrap old with new:
139
+
140
+ ```
141
+ Phase 1: Create parallel implementation
142
+ ├─ Agent A: Build new abstraction layer
143
+ └─ Agent B: Implement new pattern alongside old
144
+
145
+ Phase 2: Gradual migration
146
+ └─ General-purpose agents: Migrate consumers one by one
147
+
148
+ Phase 3: Cleanup
149
+ └─ General-purpose agent: Remove old implementation
150
+ ```
151
+
152
+ ---
153
+
154
+ ## Migration
155
+
156
+ ### Pattern: Schema-Data-Code
157
+
158
+ ```
159
+ User Request: "Migrate from MongoDB to PostgreSQL"
160
+
161
+ Phase 1: FAN-OUT (Analysis)
162
+ ├─ Explore agent: Document all MongoDB schemas
163
+ ├─ Explore agent: Find all database queries
164
+ └─ Explore agent: Identify data transformation needs
165
+
166
+ Phase 2: PIPELINE (Schema)
167
+ └─ General-purpose agent: Create PostgreSQL schemas, migrations
168
+
169
+ Phase 3: FAN-OUT (Code updates)
170
+ ├─ Agent A: Update user-related queries
171
+ ├─ Agent B: Update product-related queries
172
+ └─ Agent C: Update order-related queries
173
+
174
+ Phase 4: PIPELINE (Data migration)
175
+ └─ General-purpose agent: Write and run data migration scripts
176
+ ```
177
+
178
+ ### Pattern: Version Upgrade
179
+
180
+ ```
181
+ User Request: "Upgrade React from v17 to v18"
182
+
183
+ Phase 1: EXPLORE
184
+ └─ Explore agent: Find breaking changes, deprecated APIs used
185
+
186
+ Phase 2: MAP-REDUCE
187
+ ├─ Agent A: Update component files batch 1
188
+ ├─ Agent B: Update component files batch 2
189
+ └─ Agent C: Update component files batch 3
190
+ → Aggregate: Collect all breaking changes found
191
+
192
+ Phase 3: PIPELINE
193
+ ├─ General-purpose agent: Fix breaking changes
194
+ └─ Background agent: Run full test suite
195
+ ```
196
+
197
+ ---
198
+
199
+ ## Greenfield Development
200
+
201
+ ### Pattern: Scaffold-Parallel-Integrate
202
+
203
+ ```
204
+ User Request: "Build a REST API for task management"
205
+
206
+ Phase 1: PIPELINE (Foundation)
207
+ ├─ Plan agent: Design API architecture, endpoints, data models
208
+ └─ General-purpose agent: Scaffold project, setup tooling
209
+
210
+ Phase 2: FAN-OUT (Core features)
211
+ ├─ Agent A: User management (model, routes, auth)
212
+ ├─ Agent B: Task CRUD operations
213
+ ├─ Agent C: Project/workspace management
214
+ └─ Agent D: Shared middleware, utilities
215
+
216
+ Phase 3: FAN-OUT (Cross-cutting)
217
+ ├─ Agent A: Error handling, validation
218
+ ├─ Agent B: Logging, monitoring setup
219
+ └─ Agent C: API documentation
220
+
221
+ Phase 4: PIPELINE (Polish)
222
+ └─ General-purpose agent: Integration tests, final wiring
223
+ ```
224
+
225
+ ### Pattern: MVP-First
226
+
227
+ ```
228
+ Phase 1: Minimal viable implementation
229
+ └─ General-purpose agent: End-to-end flow, minimal features
230
+
231
+ Phase 2: BACKGROUND (Feedback loop)
232
+ ├─ User testing while...
233
+ └─ Background agents prepare next features
234
+
235
+ Phase 3: FAN-OUT (Feature expansion)
236
+ ├─ Multiple agents expand different features in parallel
237
+ ```
238
+
239
+ ---
240
+
241
+ ## Task Management Integration
242
+
243
+ For any software development task, create explicit tasks:
244
+
245
+ ```python
246
+ # Decompose the work
247
+ TaskCreate(subject="Analyze requirements", description="Understand codebase patterns, existing code...")
248
+ TaskCreate(subject="Design approach", description="Plan implementation strategy...")
249
+ TaskCreate(subject="Implement core functionality", description="Build the main feature...")
250
+ TaskCreate(subject="Add error handling", description="Handle edge cases, validation...")
251
+ TaskCreate(subject="Write tests", description="Unit and integration tests...")
252
+
253
+ # Set dependencies
254
+ TaskUpdate(taskId="2", addBlockedBy=["1"]) # Design after analysis
255
+ TaskUpdate(taskId="3", addBlockedBy=["2"]) # Implement after design
256
+ TaskUpdate(taskId="4", addBlockedBy=["3"]) # Error handling after core
257
+ TaskUpdate(taskId="5", addBlockedBy=["3"]) # Tests can parallel with error handling
258
+
259
+ # Spawn agents for unblocked tasks
260
+ Task(subagent_type="general-purpose", prompt="TaskId 1: Analyze requirements...")
261
+ ```
262
+
263
+ Agents mark tasks resolved immediately upon completion.
264
+
265
+ ---
266
+
267
+ ```
268
+ ─── ◈ Software Development ─────────────
269
+ ```