cc-mirror 1.1.2 → 1.1.4

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/dist/cc-mirror.mjs +294 -233
  2. package/dist/skills/orchestration/SKILL.md +491 -0
  3. package/dist/skills/{multi-agent-orchestrator → orchestration}/references/tools.md +90 -46
  4. package/dist/tui.mjs +533 -401
  5. package/package.json +1 -1
  6. package/dist/skills/multi-agent-orchestrator/SKILL.md +0 -391
  7. package/dist/skills/multi-agent-orchestrator/references/code-review.md +0 -266
  8. package/dist/skills/multi-agent-orchestrator/references/data-analysis.md +0 -315
  9. package/dist/skills/multi-agent-orchestrator/references/devops.md +0 -309
  10. package/dist/skills/multi-agent-orchestrator/references/documentation.md +0 -310
  11. package/dist/skills/multi-agent-orchestrator/references/project-management.md +0 -345
  12. package/dist/skills/multi-agent-orchestrator/references/research.md +0 -285
  13. package/dist/skills/multi-agent-orchestrator/references/software-development.md +0 -242
  14. package/dist/skills/multi-agent-orchestrator/references/testing.md +0 -282
  15. /package/dist/skills/{multi-agent-orchestrator → orchestration}/references/domains/code-review.md +0 -0
  16. /package/dist/skills/{multi-agent-orchestrator → orchestration}/references/domains/data-analysis.md +0 -0
  17. /package/dist/skills/{multi-agent-orchestrator → orchestration}/references/domains/devops.md +0 -0
  18. /package/dist/skills/{multi-agent-orchestrator → orchestration}/references/domains/documentation.md +0 -0
  19. /package/dist/skills/{multi-agent-orchestrator → orchestration}/references/domains/project-management.md +0 -0
  20. /package/dist/skills/{multi-agent-orchestrator → orchestration}/references/domains/research.md +0 -0
  21. /package/dist/skills/{multi-agent-orchestrator → orchestration}/references/domains/software-development.md +0 -0
  22. /package/dist/skills/{multi-agent-orchestrator → orchestration}/references/domains/testing.md +0 -0
  23. /package/dist/skills/{multi-agent-orchestrator → orchestration}/references/examples.md +0 -0
  24. /package/dist/skills/{multi-agent-orchestrator → orchestration}/references/guide.md +0 -0
  25. /package/dist/skills/{multi-agent-orchestrator → orchestration}/references/patterns.md +0 -0
@@ -1,285 +0,0 @@
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 |
@@ -1,242 +0,0 @@
1
- # Software Development Orchestration Patterns
2
-
3
- ## Table of Contents
4
- 1. [Feature Implementation](#feature-implementation)
5
- 2. [Bug Fixing](#bug-fixing)
6
- 3. [Refactoring](#refactoring)
7
- 4. [Migration](#migration)
8
- 5. [Greenfield Development](#greenfield-development)
9
-
10
- ---
11
-
12
- ## Feature Implementation
13
-
14
- ### Pattern: Plan-Parallel-Integrate
15
-
16
- ```
17
- User Request: "Add user authentication"
18
-
19
- Phase 1: PIPELINE (Research → Plan)
20
- ├─ Explore agent: Find existing auth patterns, user models, middleware
21
- └─ Plan agent: Design auth architecture using findings
22
-
23
- Phase 2: FAN-OUT (Parallel Implementation)
24
- ├─ Agent A: Implement user model + database schema
25
- ├─ Agent B: Implement JWT/session middleware
26
- ├─ Agent C: Implement login/logout routes
27
- └─ Agent D: Implement frontend auth components
28
-
29
- Phase 3: PIPELINE (Integration)
30
- └─ General-purpose agent: Wire components, add tests, verify flow
31
- ```
32
-
33
- **Task breakdown:**
34
- ```
35
- TaskCreate("Design authentication architecture")
36
- TaskCreate("Implement user model and schema")
37
- TaskCreate("Build auth middleware")
38
- TaskCreate("Create auth API routes")
39
- TaskCreate("Build frontend auth UI")
40
- TaskCreate("Integration testing")
41
-
42
- # Dependencies
43
- Task 2-5 blocked by Task 1
44
- Task 6 blocked by Tasks 2-5
45
- ```
46
-
47
- ### Pattern: Vertical Slice
48
-
49
- For full-stack features, implement one complete slice first:
50
-
51
- ```
52
- Phase 1: Single complete flow
53
- └─ General-purpose agent: DB → API → UI for one use case
54
-
55
- Phase 2: FAN-OUT expansion
56
- ├─ Agent A: Additional DB operations
57
- ├─ Agent B: Additional API endpoints
58
- └─ Agent C: Additional UI components
59
- ```
60
-
61
- ---
62
-
63
- ## Bug Fixing
64
-
65
- ### Pattern: Diagnose-Hypothesize-Fix
66
-
67
- ```
68
- User Request: "Users can't log in after password reset"
69
-
70
- Phase 1: FAN-OUT (Parallel Diagnosis)
71
- ├─ Explore agent: Search error logs, recent changes to auth
72
- ├─ Explore agent: Find password reset flow implementation
73
- └─ Explore agent: Check session/token handling
74
-
75
- Phase 2: PIPELINE (Analysis)
76
- └─ General-purpose agent: Synthesize findings, form hypotheses
77
-
78
- Phase 3: SPECULATIVE (If cause unclear)
79
- ├─ Agent A: Test hypothesis 1 (token expiry issue)
80
- ├─ Agent B: Test hypothesis 2 (session invalidation)
81
- └─ Agent C: Test hypothesis 3 (password hash mismatch)
82
-
83
- Phase 4: PIPELINE
84
- └─ General-purpose agent: Implement fix, add regression test
85
- ```
86
-
87
- ### Pattern: Reproduction-First
88
-
89
- ```
90
- Phase 1: Reproduce
91
- └─ General-purpose agent: Create minimal reproduction case
92
-
93
- Phase 2: Bisect (if needed)
94
- └─ Background agent: Git bisect to find breaking commit
95
-
96
- Phase 3: Fix
97
- └─ General-purpose agent: Implement and verify fix
98
- ```
99
-
100
- ---
101
-
102
- ## Refactoring
103
-
104
- ### Pattern: Map-Analyze-Transform
105
-
106
- ```
107
- User Request: "Refactor callback-based code to async/await"
108
-
109
- Phase 1: MAP (Find all instances)
110
- └─ Explore agent: Find all callback patterns in codebase
111
-
112
- Phase 2: FAN-OUT (Analyze impact)
113
- ├─ Agent A: Analyze module A dependencies
114
- ├─ Agent B: Analyze module B dependencies
115
- └─ Agent C: Analyze module C dependencies
116
-
117
- Phase 3: PIPELINE (Safe transformation)
118
- ├─ Plan agent: Design migration order (leaf nodes first)
119
- └─ General-purpose agent: Transform files in dependency order
120
- ```
121
-
122
- ### Pattern: Strangler Fig
123
-
124
- For large refactors, wrap old with new:
125
-
126
- ```
127
- Phase 1: Create parallel implementation
128
- ├─ Agent A: Build new abstraction layer
129
- └─ Agent B: Implement new pattern alongside old
130
-
131
- Phase 2: Gradual migration
132
- └─ General-purpose agents: Migrate consumers one by one
133
-
134
- Phase 3: Cleanup
135
- └─ General-purpose agent: Remove old implementation
136
- ```
137
-
138
- ---
139
-
140
- ## Migration
141
-
142
- ### Pattern: Schema-Data-Code
143
-
144
- ```
145
- User Request: "Migrate from MongoDB to PostgreSQL"
146
-
147
- Phase 1: FAN-OUT (Analysis)
148
- ├─ Explore agent: Document all MongoDB schemas
149
- ├─ Explore agent: Find all database queries
150
- └─ Explore agent: Identify data transformation needs
151
-
152
- Phase 2: PIPELINE (Schema)
153
- └─ General-purpose agent: Create PostgreSQL schemas, migrations
154
-
155
- Phase 3: FAN-OUT (Code updates)
156
- ├─ Agent A: Update user-related queries
157
- ├─ Agent B: Update product-related queries
158
- └─ Agent C: Update order-related queries
159
-
160
- Phase 4: PIPELINE (Data migration)
161
- └─ General-purpose agent: Write and run data migration scripts
162
- ```
163
-
164
- ### Pattern: Version Upgrade
165
-
166
- ```
167
- User Request: "Upgrade React from v17 to v18"
168
-
169
- Phase 1: EXPLORE
170
- └─ Explore agent: Find breaking changes, deprecated APIs used
171
-
172
- Phase 2: MAP-REDUCE
173
- ├─ Agent A: Update component files batch 1
174
- ├─ Agent B: Update component files batch 2
175
- └─ Agent C: Update component files batch 3
176
- → Aggregate: Collect all breaking changes found
177
-
178
- Phase 3: PIPELINE
179
- ├─ General-purpose agent: Fix breaking changes
180
- └─ Background agent: Run full test suite
181
- ```
182
-
183
- ---
184
-
185
- ## Greenfield Development
186
-
187
- ### Pattern: Scaffold-Parallel-Integrate
188
-
189
- ```
190
- User Request: "Build a REST API for task management"
191
-
192
- Phase 1: PIPELINE (Foundation)
193
- ├─ Plan agent: Design API architecture, endpoints, data models
194
- └─ General-purpose agent: Scaffold project, setup tooling
195
-
196
- Phase 2: FAN-OUT (Core features)
197
- ├─ Agent A: User management (model, routes, auth)
198
- ├─ Agent B: Task CRUD operations
199
- ├─ Agent C: Project/workspace management
200
- └─ Agent D: Shared middleware, utilities
201
-
202
- Phase 3: FAN-OUT (Cross-cutting)
203
- ├─ Agent A: Error handling, validation
204
- ├─ Agent B: Logging, monitoring setup
205
- └─ Agent C: API documentation
206
-
207
- Phase 4: PIPELINE (Polish)
208
- └─ General-purpose agent: Integration tests, final wiring
209
- ```
210
-
211
- ### Pattern: MVP-First
212
-
213
- ```
214
- Phase 1: Minimal viable implementation
215
- └─ General-purpose agent: End-to-end flow, minimal features
216
-
217
- Phase 2: BACKGROUND (Feedback loop)
218
- ├─ User testing while...
219
- └─ Background agents prepare next features
220
-
221
- Phase 3: FAN-OUT (Feature expansion)
222
- ├─ Multiple agents expand different features in parallel
223
- ```
224
-
225
- ---
226
-
227
- ## TodoWrite Integration
228
-
229
- For any software development task:
230
-
231
- ```
232
- TodoWrite([
233
- {content: "Analyze requirements and codebase", status: "in_progress", activeForm: "Analyzing requirements"},
234
- {content: "Design implementation approach", status: "pending", activeForm: "Designing approach"},
235
- {content: "Implement core functionality", status: "pending", activeForm: "Implementing core"},
236
- {content: "Add error handling and edge cases", status: "pending", activeForm: "Adding error handling"},
237
- {content: "Write tests", status: "pending", activeForm: "Writing tests"},
238
- {content: "Verify and cleanup", status: "pending", activeForm: "Verifying implementation"}
239
- ])
240
- ```
241
-
242
- Update status as work progresses. Mark completed IMMEDIATELY after finishing each task.