cc-mirror 1.4.0 → 1.4.2

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 CHANGED
@@ -141,22 +141,22 @@ mclaude # Launch Mirror Claude variant
141
141
 
142
142
  ```bash
143
143
  # Create & manage variants
144
- cc-mirror create # Full configuration wizard
145
- cc-mirror quick [options] # Fast setup with defaults
146
- cc-mirror list # List all variants
147
- cc-mirror update [name] # Update one or all variants
148
- cc-mirror remove <name> # Delete a variant
149
- cc-mirror doctor # Health check all variants
144
+ npx cc-mirror create # Full configuration wizard
145
+ npx cc-mirror quick [options] # Fast setup with defaults
146
+ npx cc-mirror list # List all variants
147
+ npx cc-mirror update [name] # Update one or all variants
148
+ npx cc-mirror remove <name> # Delete a variant
149
+ npx cc-mirror doctor # Health check all variants
150
150
 
151
151
  # Task management (team mode)
152
- cc-mirror tasks # List open tasks
153
- cc-mirror tasks show <id> # Show task details
154
- cc-mirror tasks create # Create new task
155
- cc-mirror tasks update <id> # Update task
156
- cc-mirror tasks delete <id> # Delete task
157
- cc-mirror tasks archive <id> # Archive task
158
- cc-mirror tasks clean # Bulk cleanup
159
- cc-mirror tasks graph # Visualize dependencies
152
+ npx cc-mirror tasks # List open tasks
153
+ npx cc-mirror tasks show <id> # Show task details
154
+ npx cc-mirror tasks create # Create new task
155
+ npx cc-mirror tasks update <id> # Update task
156
+ npx cc-mirror tasks delete <id> # Delete task
157
+ npx cc-mirror tasks archive <id> # Archive task
158
+ npx cc-mirror tasks clean # Bulk cleanup
159
+ npx cc-mirror tasks graph # Visualize dependencies
160
160
 
161
161
  # Launch your variant
162
162
  zai # Run Z.ai variant
@@ -204,10 +204,10 @@ Enable multi-agent collaboration with shared task management:
204
204
 
205
205
  ```bash
206
206
  # Enable on any variant
207
- cc-mirror create --provider zai --name zai-team --enable-team-mode
207
+ npx cc-mirror create --provider zai --name zai-team --enable-team-mode
208
208
 
209
209
  # Mirror Claude has team mode by default
210
- cc-mirror quick --provider mirror --name mclaude
210
+ npx cc-mirror quick --provider mirror --name mclaude
211
211
  ```
212
212
 
213
213
  Team mode enables: `TaskCreate`, `TaskGet`, `TaskUpdate`, `TaskList` tools plus an **orchestrator skill** that teaches Claude effective multi-agent coordination patterns.
@@ -218,24 +218,24 @@ Manage team tasks from the command line:
218
218
 
219
219
  ```bash
220
220
  # List open tasks
221
- cc-mirror tasks
221
+ npx cc-mirror tasks
222
222
 
223
223
  # View across all teams
224
- cc-mirror tasks --all
224
+ npx cc-mirror tasks --all
225
225
 
226
226
  # Create and update tasks
227
- cc-mirror tasks create --subject "Add auth" --description "JWT implementation"
228
- cc-mirror tasks update 5 --status resolved --add-comment "Done"
227
+ npx cc-mirror tasks create --subject "Add auth" --description "JWT implementation"
228
+ npx cc-mirror tasks update 5 --status resolved --add-comment "Done"
229
229
 
230
230
  # Cleanup resolved tasks
231
- cc-mirror tasks clean --resolved --dry-run
232
- cc-mirror tasks clean --resolved --force
231
+ npx cc-mirror tasks clean --resolved --dry-run
232
+ npx cc-mirror tasks clean --resolved --force
233
233
 
234
234
  # Archive instead of delete (preserves task history)
235
- cc-mirror tasks archive 5
235
+ npx cc-mirror tasks archive 5
236
236
 
237
237
  # Visualize dependency graph
238
- cc-mirror tasks graph
238
+ npx cc-mirror tasks graph
239
239
  ```
240
240
 
241
241
  ### Project-Scoped Tasks (v1.2.0+)
@@ -101,8 +101,8 @@ WHAT IS CC-MIRROR?
101
101
  config, theme, and settings.
102
102
 
103
103
  QUICK START
104
- cc-mirror quick # Fast setup: provider + key \u2192 done
105
- cc-mirror create # Full wizard with all options
104
+ npx cc-mirror quick # Fast setup: provider + key \u2192 done
105
+ npx cc-mirror create # Full wizard with all options
106
106
 
107
107
  COMMANDS
108
108
  create [options] Create a new variant
@@ -135,10 +135,10 @@ OPTIONS (advanced)
135
135
  --shell-env Write env vars to shell profile (Z.ai)
136
136
 
137
137
  EXAMPLES
138
- cc-mirror quick --provider zai
139
- cc-mirror create --provider minimax --brand minimax
140
- cc-mirror update zai
141
- cc-mirror doctor
138
+ npx cc-mirror quick --provider zai
139
+ npx cc-mirror create --provider minimax --brand minimax
140
+ npx cc-mirror update zai
141
+ npx cc-mirror doctor
142
142
 
143
143
  LEARN MORE
144
144
  https://github.com/numman-ali/cc-mirror
@@ -5934,10 +5934,10 @@ function parseIds(value) {
5934
5934
  }
5935
5935
  function showTasksHelp() {
5936
5936
  console.log(`
5937
- cc-mirror tasks - Manage team tasks
5937
+ npx cc-mirror tasks - Manage team tasks
5938
5938
 
5939
5939
  USAGE:
5940
- cc-mirror tasks [operation] [id] [options]
5940
+ npx cc-mirror tasks [operation] [id] [options]
5941
5941
 
5942
5942
  OPERATIONS:
5943
5943
  list List tasks (default if no operation specified)
@@ -5990,13 +5990,13 @@ CLEAN OPTIONS:
5990
5990
  --force Skip confirmation
5991
5991
 
5992
5992
  EXAMPLES:
5993
- cc-mirror tasks # List open tasks
5994
- cc-mirror tasks --status all # List all tasks
5995
- cc-mirror tasks show 5 # Show task #5
5996
- cc-mirror tasks create --subject "Fix bug" --description "..."
5997
- cc-mirror tasks update 5 --status resolved
5998
- cc-mirror tasks delete 5 --force
5999
- cc-mirror tasks clean --resolved --dry-run
5993
+ npx cc-mirror tasks # List open tasks
5994
+ npx cc-mirror tasks --status all # List all tasks
5995
+ npx cc-mirror tasks show 5 # Show task #5
5996
+ npx cc-mirror tasks create --subject "Fix bug" --description "..."
5997
+ npx cc-mirror tasks update 5 --status resolved
5998
+ npx cc-mirror tasks delete 5 --force
5999
+ npx cc-mirror tasks clean --resolved --dry-run
6000
6000
  `);
6001
6001
  }
6002
6002
  async function runTasksCommand({ opts }) {
@@ -6016,7 +6016,7 @@ async function runTasksCommand({ opts }) {
6016
6016
  switch (operation) {
6017
6017
  case "show": {
6018
6018
  if (!taskId) {
6019
- console.error("Error: Task ID required. Usage: cc-mirror tasks show <id>");
6019
+ console.error("Error: Task ID required. Usage: npx cc-mirror tasks show <id>");
6020
6020
  process.exitCode = 1;
6021
6021
  return;
6022
6022
  }
@@ -6045,7 +6045,7 @@ async function runTasksCommand({ opts }) {
6045
6045
  }
6046
6046
  case "update": {
6047
6047
  if (!taskId) {
6048
- console.error("Error: Task ID required. Usage: cc-mirror tasks update <id>");
6048
+ console.error("Error: Task ID required. Usage: npx cc-mirror tasks update <id>");
6049
6049
  process.exitCode = 1;
6050
6050
  return;
6051
6051
  }
@@ -6070,7 +6070,7 @@ async function runTasksCommand({ opts }) {
6070
6070
  }
6071
6071
  case "delete": {
6072
6072
  if (!taskId) {
6073
- console.error("Error: Task ID required. Usage: cc-mirror tasks delete <id>");
6073
+ console.error("Error: Task ID required. Usage: npx cc-mirror tasks delete <id>");
6074
6074
  process.exitCode = 1;
6075
6075
  return;
6076
6076
  }
@@ -6135,7 +6135,7 @@ async function runTasksCommand({ opts }) {
6135
6135
  }
6136
6136
  default:
6137
6137
  console.error(`Unknown operation: ${operation}`);
6138
- console.error('Run "cc-mirror tasks --help" for usage.');
6138
+ console.error('Run "npx cc-mirror tasks --help" for usage.');
6139
6139
  process.exitCode = 1;
6140
6140
  }
6141
6141
  }
@@ -270,6 +270,79 @@ Create src/routes/auth.ts with:
270
270
  )
271
271
  ```
272
272
 
273
+ ### Model Selection
274
+
275
+ Choose the right model for each agent's task:
276
+
277
+ ```
278
+ ┌─────────────────────────────────────────────────────────────┐
279
+ │ HAIKU (model="haiku") — The Errand Runner │
280
+ │ │
281
+ │ Spawn many of these. They're fast and cheap. │
282
+ │ │
283
+ │ • Fetch files, grep for patterns, find things │
284
+ │ • Simple lookups and searches │
285
+ │ • Gather raw information for you to synthesize │
286
+ │ • Mechanical tasks with no judgment calls │
287
+ │ • Run 5-10 in parallel to explore quickly │
288
+ │ │
289
+ ├─────────────────────────────────────────────────────────────┤
290
+ │ SONNET (model="sonnet") — The Capable Worker │
291
+ │ │
292
+ │ Smart, but needs clear direction. Like a junior-mid dev. │
293
+ │ │
294
+ │ • Well-structured implementation tasks │
295
+ │ • Research: reading docs, understanding APIs │
296
+ │ • Following established patterns in a codebase │
297
+ │ • Semi-difficult analysis with clear scope │
298
+ │ • Test generation, documentation │
299
+ │ • When the task is clear and you've defined what to do │
300
+ │ │
301
+ ├─────────────────────────────────────────────────────────────┤
302
+ │ OPUS (model="opus") — The Critical Thinker │
303
+ │ │
304
+ │ Thinks for itself. Trust its judgment. │
305
+ │ │
306
+ │ • Ambiguous or underspecified problems │
307
+ │ • Architectural decisions and design trade-offs │
308
+ │ • Complex debugging requiring reasoning across systems │
309
+ │ • Security review, vulnerability assessment │
310
+ │ • When you need creative problem-solving │
311
+ │ • Tasks where quality of thinking matters most │
312
+ │ • When the path forward isn't obvious │
313
+ │ │
314
+ └─────────────────────────────────────────────────────────────┘
315
+ ```
316
+
317
+ **Example with model selection:**
318
+
319
+ ```
320
+ # Gather info - spawn haiku wildly
321
+ Task(subagent_type="Explore", description="Find auth files", prompt="...", model="haiku", run_in_background=True)
322
+ Task(subagent_type="Explore", description="Find user routes", prompt="...", model="haiku", run_in_background=True)
323
+ Task(subagent_type="Explore", description="Find middleware", prompt="...", model="haiku", run_in_background=True)
324
+
325
+ # Clear implementation task - sonnet
326
+ Task(
327
+ subagent_type="general-purpose",
328
+ description="Implement login route",
329
+ prompt="Create POST /login following the pattern in src/routes/users.ts...",
330
+ model="sonnet",
331
+ run_in_background=True
332
+ )
333
+
334
+ # Needs judgment and critical thinking - opus
335
+ Task(
336
+ subagent_type="general-purpose",
337
+ description="Design auth architecture",
338
+ prompt="Analyze the codebase and recommend the best auth approach...",
339
+ model="opus",
340
+ run_in_background=True
341
+ )
342
+ ```
343
+
344
+ **Always pass `model` explicitly.** Haiku for gathering, sonnet for well-defined work, opus when you need real thinking.
345
+
273
346
  ---
274
347
 
275
348
  ## 🚀 The Orchestration Flow
@@ -43,12 +43,17 @@ Phase 2: REDUCE (Synthesize)
43
43
  **Implementation:**
44
44
 
45
45
  ```
46
- # All in single message for parallelism
47
- Task(subagent_type="Explore", prompt="Fetch PR #123 details, understand context and related issues")
48
- Task(subagent_type="general-purpose", prompt="Review code quality: patterns, readability, maintainability")
49
- Task(subagent_type="general-purpose", prompt="Review logic: correctness, edge cases, error handling")
50
- Task(subagent_type="general-purpose", prompt="Review security: injection, auth, data exposure")
51
- Task(subagent_type="general-purpose", prompt="Review performance: complexity, queries, memory")
46
+ # All in single message for parallelism (opus for reviews - critical thinking)
47
+ Task(subagent_type="Explore", prompt="Fetch PR #123 details, understand context and related issues",
48
+ model="haiku", run_in_background=True)
49
+ Task(subagent_type="general-purpose", prompt="Review code quality: patterns, readability, maintainability",
50
+ model="opus", run_in_background=True)
51
+ Task(subagent_type="general-purpose", prompt="Review logic: correctness, edge cases, error handling",
52
+ model="opus", run_in_background=True)
53
+ Task(subagent_type="general-purpose", prompt="Review security: injection, auth, data exposure",
54
+ model="opus", run_in_background=True)
55
+ Task(subagent_type="general-purpose", prompt="Review performance: complexity, queries, memory",
56
+ model="opus", run_in_background=True)
52
57
  ```
53
58
 
54
59
  ### Pattern: Contextual Deep-Dive
@@ -287,11 +292,15 @@ TaskCreate(subject="Synthesize review", description="Aggregate findings into rev
287
292
  # Synthesis blocked by analysis tasks
288
293
  TaskUpdate(taskId="5", addBlockedBy=["1", "2", "3", "4"])
289
294
 
290
- # Spawn parallel agents for analysis
291
- Task(subagent_type="general-purpose", prompt="TaskId 1: Analyze PR context...")
292
- Task(subagent_type="general-purpose", prompt="TaskId 2: Review code quality...")
293
- Task(subagent_type="general-purpose", prompt="TaskId 3: Check security...")
294
- Task(subagent_type="general-purpose", prompt="TaskId 4: Assess performance...")
295
+ # Spawn parallel agents for analysis (opus for reviews - critical thinking)
296
+ Task(subagent_type="Explore", prompt="TaskId 1: Analyze PR context...",
297
+ model="haiku", run_in_background=True)
298
+ Task(subagent_type="general-purpose", prompt="TaskId 2: Review code quality...",
299
+ model="opus", run_in_background=True)
300
+ Task(subagent_type="general-purpose", prompt="TaskId 3: Check security...",
301
+ model="opus", run_in_background=True)
302
+ Task(subagent_type="general-purpose", prompt="TaskId 4: Assess performance...",
303
+ model="opus", run_in_background=True)
295
304
  ```
296
305
 
297
306
  ---
@@ -326,10 +326,13 @@ TaskUpdate(taskId="4", addBlockedBy=["1"])
326
326
  TaskUpdate(taskId="5", addBlockedBy=["2", "3", "4"])
327
327
  TaskUpdate(taskId="6", addBlockedBy=["5"])
328
328
 
329
- # Spawn parallel analysis agents
330
- Task(subagent_type="general-purpose", prompt="TaskId 2: Explore distributions...")
331
- Task(subagent_type="general-purpose", prompt="TaskId 3: Analyze missing data...")
332
- Task(subagent_type="general-purpose", prompt="TaskId 4: Check data quality...")
329
+ # Spawn parallel analysis agents (haiku for data exploration)
330
+ Task(subagent_type="Explore", prompt="TaskId 2: Explore distributions...",
331
+ model="haiku", run_in_background=True)
332
+ Task(subagent_type="Explore", prompt="TaskId 3: Analyze missing data...",
333
+ model="haiku", run_in_background=True)
334
+ Task(subagent_type="Explore", prompt="TaskId 4: Check data quality...",
335
+ model="haiku", run_in_background=True)
333
336
  ```
334
337
 
335
338
  ## Best Practices
@@ -320,9 +320,11 @@ TaskUpdate(taskId="4", addBlockedBy=["2"]) # Can parallel with network
320
320
  TaskUpdate(taskId="5", addBlockedBy=["3", "4"])
321
321
  TaskUpdate(taskId="6", addBlockedBy=["5"])
322
322
 
323
- # Parallel infrastructure implementation
324
- Task(subagent_type="general-purpose", prompt="TaskId 3: Implement network changes...")
325
- Task(subagent_type="general-purpose", prompt="TaskId 4: Implement compute changes...")
323
+ # Parallel infrastructure implementation (sonnet for well-structured work)
324
+ Task(subagent_type="general-purpose", prompt="TaskId 3: Implement network changes...",
325
+ model="sonnet", run_in_background=True)
326
+ Task(subagent_type="general-purpose", prompt="TaskId 4: Implement compute changes...",
327
+ model="sonnet", run_in_background=True)
326
328
  ```
327
329
 
328
330
  ## Safety Principles
@@ -320,10 +320,13 @@ TaskUpdate(taskId="4", addBlockedBy=["1"])
320
320
  TaskUpdate(taskId="5", addBlockedBy=["2", "3", "4"])
321
321
  TaskUpdate(taskId="6", addBlockedBy=["5"])
322
322
 
323
- # Spawn parallel documentation agents
324
- Task(subagent_type="general-purpose", prompt="TaskId 2: Document API endpoints...")
325
- Task(subagent_type="general-purpose", prompt="TaskId 3: Document components...")
326
- Task(subagent_type="general-purpose", prompt="TaskId 4: Document utilities...")
323
+ # Spawn parallel documentation agents (sonnet for well-structured work)
324
+ Task(subagent_type="general-purpose", prompt="TaskId 2: Document API endpoints...",
325
+ model="sonnet", run_in_background=True)
326
+ Task(subagent_type="general-purpose", prompt="TaskId 3: Document components...",
327
+ model="sonnet", run_in_background=True)
328
+ Task(subagent_type="general-purpose", prompt="TaskId 4: Document utilities...",
329
+ model="sonnet", run_in_background=True)
327
330
  ```
328
331
 
329
332
  ## Output Formats
@@ -350,9 +350,11 @@ TaskUpdate(taskId="4", addBlockedBy=["2"])
350
350
  TaskUpdate(taskId="5", addBlockedBy=["3", "4"])
351
351
  TaskUpdate(taskId="6", addBlockedBy=["5"])
352
352
 
353
- # Parallel breakdown
354
- Task(subagent_type="general-purpose", prompt="TaskId 3: Break down Story A...")
355
- Task(subagent_type="general-purpose", prompt="TaskId 4: Break down Story B...")
353
+ # Parallel breakdown (sonnet for structured planning work)
354
+ Task(subagent_type="general-purpose", prompt="TaskId 3: Break down Story A...",
355
+ model="sonnet", run_in_background=True)
356
+ Task(subagent_type="general-purpose", prompt="TaskId 4: Break down Story B...",
357
+ model="sonnet", run_in_background=True)
356
358
  ```
357
359
 
358
360
  ## Best Practices
@@ -300,10 +300,13 @@ TaskUpdate(taskId="3", addBlockedBy=["1"])
300
300
  TaskUpdate(taskId="4", addBlockedBy=["1"])
301
301
  TaskUpdate(taskId="5", addBlockedBy=["2", "3", "4"])
302
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...")
303
+ # Spawn Explore agents in parallel (haiku swarm for fast exploration)
304
+ Task(subagent_type="Explore", prompt="TaskId 2: Find auth patterns...",
305
+ model="haiku", run_in_background=True)
306
+ Task(subagent_type="Explore", prompt="TaskId 3: Find API patterns...",
307
+ model="haiku", run_in_background=True)
308
+ Task(subagent_type="Explore", prompt="TaskId 4: Find database patterns...",
309
+ model="haiku", run_in_background=True)
307
310
  ```
308
311
 
309
312
  ## Agent Selection for Research
@@ -256,8 +256,9 @@ TaskUpdate(taskId="3", addBlockedBy=["2"]) # Implement after design
256
256
  TaskUpdate(taskId="4", addBlockedBy=["3"]) # Error handling after core
257
257
  TaskUpdate(taskId="5", addBlockedBy=["3"]) # Tests can parallel with error handling
258
258
 
259
- # Spawn agents for unblocked tasks
260
- Task(subagent_type="general-purpose", prompt="TaskId 1: Analyze requirements...")
259
+ # Spawn agents for unblocked tasks (haiku for analysis/exploration)
260
+ Task(subagent_type="Explore", prompt="TaskId 1: Analyze requirements...",
261
+ model="haiku", run_in_background=True)
261
262
  ```
262
263
 
263
264
  Agents mark tasks resolved immediately upon completion.
@@ -293,9 +293,11 @@ TaskUpdate(taskId="4", addBlockedBy=["2", "3"])
293
293
  TaskUpdate(taskId="5", addBlockedBy=["4"])
294
294
  TaskUpdate(taskId="6", addBlockedBy=["5"])
295
295
 
296
- # Parallel test generation
297
- Task(subagent_type="general-purpose", prompt="TaskId 2: Generate unit tests...")
298
- Task(subagent_type="general-purpose", prompt="TaskId 3: Generate integration tests...")
296
+ # Parallel test generation (sonnet for well-structured work)
297
+ Task(subagent_type="general-purpose", prompt="TaskId 2: Generate unit tests...",
298
+ model="sonnet", run_in_background=True)
299
+ Task(subagent_type="general-purpose", prompt="TaskId 3: Generate integration tests...",
300
+ model="sonnet", run_in_background=True)
299
301
  ```
300
302
 
301
303
  ## Test Execution Best Practices
@@ -36,16 +36,20 @@
36
36
 
37
37
  ### Execution
38
38
 
39
- ```python
39
+ ```
40
40
  # Phase 1: Gather context + parallel analysis (single message)
41
41
  Task(subagent_type="Explore", description="Get PR context",
42
- prompt="Fetch PR #123 details, understand what changed and why")
42
+ prompt="Fetch PR #123 details, understand what changed and why",
43
+ model="haiku", run_in_background=True)
43
44
  Task(subagent_type="general-purpose", description="Review quality",
44
- prompt="Review code quality: readability, patterns, maintainability")
45
+ prompt="Review code quality: readability, patterns, maintainability",
46
+ model="opus", run_in_background=True) # Critical thinking for review
45
47
  Task(subagent_type="general-purpose", description="Review security",
46
- prompt="Review security: injection, auth, data exposure risks")
48
+ prompt="Review security: injection, auth, data exposure risks",
49
+ model="opus", run_in_background=True) # Security needs judgment
47
50
  Task(subagent_type="general-purpose", description="Review performance",
48
- prompt="Review performance: complexity, queries, memory usage")
51
+ prompt="Review performance: complexity, queries, memory usage",
52
+ model="opus", run_in_background=True) # Performance analysis
49
53
  ```
50
54
 
51
55
  ### User Sees
@@ -91,26 +95,32 @@ Adds user profile editing with image upload capability.
91
95
 
92
96
  ### Execution
93
97
 
94
- ```python
95
- # Phase 1: Research (Pipeline)
98
+ ```
99
+ # Phase 1: Research (haiku for exploration)
96
100
  context = Task(subagent_type="Explore", description="Find styling patterns",
97
- prompt="Find existing theme/styling patterns, CSS architecture")
101
+ prompt="Find existing theme/styling patterns, CSS architecture",
102
+ model="haiku", run_in_background=True)
98
103
 
99
- # Phase 2: Plan
104
+ # Phase 2: Plan (opus for design decisions)
100
105
  plan = Task(subagent_type="Plan", description="Design dark mode",
101
- prompt=f"Given: {context}. Design dark mode implementation.")
106
+ prompt=f"Given: {context}. Design dark mode implementation.",
107
+ model="opus", run_in_background=True)
102
108
 
103
- # Phase 3: Implement (Fan-Out - single message)
109
+ # Phase 3: Implement (sonnet for well-structured work - single message)
104
110
  Task(subagent_type="general-purpose", description="Add CSS variables",
105
- prompt="Add dark theme CSS variables...")
111
+ prompt="Add dark theme CSS variables...",
112
+ model="sonnet", run_in_background=True)
106
113
  Task(subagent_type="general-purpose", description="Create toggle",
107
- prompt="Create theme toggle component...")
114
+ prompt="Create theme toggle component...",
115
+ model="sonnet", run_in_background=True)
108
116
  Task(subagent_type="general-purpose", description="Add persistence",
109
- prompt="Add localStorage persistence for theme preference...")
117
+ prompt="Add localStorage persistence for theme preference...",
118
+ model="sonnet", run_in_background=True)
110
119
 
111
- # Phase 4: Integration (Pipeline)
120
+ # Phase 4: Integration (sonnet for implementation)
112
121
  Task(subagent_type="general-purpose", description="Wire and test",
113
- prompt="Wire components together, test theme switching works")
122
+ prompt="Wire components together, test theme switching works",
123
+ model="sonnet", run_in_background=True)
114
124
  ```
115
125
 
116
126
  ### User Sees
@@ -162,25 +172,30 @@ Try it: Click the moon/sun icon in the header.
162
172
 
163
173
  ### Execution
164
174
 
165
- ```python
166
- # Phase 1: Parallel diagnosis (Fan-Out - single message)
175
+ ```
176
+ # Phase 1: Parallel diagnosis (haiku swarm - single message)
167
177
  Task(subagent_type="Explore", description="Check logs",
168
- prompt="Search for login errors, password reset issues in logs")
178
+ prompt="Search for login errors, password reset issues in logs",
179
+ model="haiku", run_in_background=True)
169
180
  Task(subagent_type="Explore", description="Find reset flow",
170
- prompt="Find password reset implementation, trace the flow")
181
+ prompt="Find password reset implementation, trace the flow",
182
+ model="haiku", run_in_background=True)
171
183
  Task(subagent_type="Explore", description="Check session handling",
172
- prompt="How are sessions/tokens handled after password change?")
184
+ prompt="How are sessions/tokens handled after password change?",
185
+ model="haiku", run_in_background=True)
173
186
 
174
187
  # Phase 2: Synthesize (after results return)
175
188
  # Identify: Password reset invalidates session but doesn't clear cookie
176
189
 
177
- # Phase 3: Fix
190
+ # Phase 3: Fix (sonnet for implementation)
178
191
  Task(subagent_type="general-purpose", description="Fix session bug",
179
- prompt="Clear session cookie after password reset...")
192
+ prompt="Clear session cookie after password reset...",
193
+ model="sonnet", run_in_background=True)
180
194
 
181
- # Phase 4: Verify
195
+ # Phase 4: Verify (sonnet for test writing)
182
196
  Task(subagent_type="general-purpose", description="Add regression test",
183
- prompt="Add test for login after password reset...")
197
+ prompt="Add test for login after password reset...",
198
+ model="sonnet", run_in_background=True)
184
199
  ```
185
200
 
186
201
  ### User Sees
@@ -229,14 +244,17 @@ The flow now:
229
244
 
230
245
  ### Execution
231
246
 
232
- ```python
233
- # Phase 1: Parallel exploration (Fan-Out - single message)
247
+ ```
248
+ # Phase 1: Parallel exploration (haiku swarm - single message)
234
249
  Task(subagent_type="Explore", description="Project structure",
235
- prompt="Analyze project structure, entry points, build system")
250
+ prompt="Analyze project structure, entry points, build system",
251
+ model="haiku", run_in_background=True)
236
252
  Task(subagent_type="Explore", description="Core patterns",
237
- prompt="Identify core architectural patterns, frameworks used")
253
+ prompt="Identify core architectural patterns, frameworks used",
254
+ model="haiku", run_in_background=True)
238
255
  Task(subagent_type="Explore", description="Data flow",
239
- prompt="Trace main data flows, API structure, state management")
256
+ prompt="Trace main data flows, API structure, state management",
257
+ model="haiku", run_in_background=True)
240
258
  ```
241
259
 
242
260
  ### User Sees
@@ -294,27 +312,31 @@ Want me to dive deeper into any area?
294
312
 
295
313
  ### Execution
296
314
 
297
- ```python
298
- # Phase 1: Run tests in background
315
+ ```
316
+ # Phase 1: Run tests in background (sonnet for test execution)
299
317
  Task(subagent_type="general-purpose", description="Run tests",
300
318
  prompt="Run full test suite, report failures",
301
- run_in_background=True)
319
+ model="sonnet", run_in_background=True)
302
320
 
303
321
  # Continue with other work or wait
304
322
  result = TaskOutput(task_id="...", block=True)
305
323
 
306
- # Phase 2: Fix failures (Fan-Out if multiple)
324
+ # Phase 2: Fix failures (sonnet for fixes - single message)
307
325
  # If 3 failures found:
308
326
  Task(subagent_type="general-purpose", description="Fix test 1",
309
- prompt="Fix failing test in auth.test.ts...")
327
+ prompt="Fix failing test in auth.test.ts...",
328
+ model="sonnet", run_in_background=True)
310
329
  Task(subagent_type="general-purpose", description="Fix test 2",
311
- prompt="Fix failing test in api.test.ts...")
330
+ prompt="Fix failing test in api.test.ts...",
331
+ model="sonnet", run_in_background=True)
312
332
  Task(subagent_type="general-purpose", description="Fix test 3",
313
- prompt="Fix failing test in utils.test.ts...")
333
+ prompt="Fix failing test in utils.test.ts...",
334
+ model="sonnet", run_in_background=True)
314
335
 
315
- # Phase 3: Verify
336
+ # Phase 3: Verify (sonnet for test execution)
316
337
  Task(subagent_type="general-purpose", description="Re-run tests",
317
- prompt="Run test suite again to verify fixes")
338
+ prompt="Run test suite again to verify fixes",
339
+ model="sonnet", run_in_background=True)
318
340
  ````
319
341
 
320
342
  ### User Sees
@@ -66,7 +66,7 @@ TaskUpdate(taskId="3", addBlockedBy=["2"])
66
66
 
67
67
  # 3. Find unblocked tasks and spawn agents
68
68
  TaskList() # Find tasks with empty blockedBy
69
- Task(subagent_type="general-purpose", prompt="TaskId 1: Setup database...", run_in_background=True)
69
+ Task(subagent_type="general-purpose", prompt="TaskId 1: Setup database...", model="sonnet", run_in_background=True)
70
70
 
71
71
  # 4. Agents mark complete, repeat
72
72
  TaskUpdate(taskId="1", status="resolved")
@@ -91,10 +91,10 @@ Orchestrator
91
91
  **Implementation:**
92
92
 
93
93
  ```python
94
- # Single message with multiple background agents
95
- Task(subagent_type="Explore", prompt="Analyze auth module...", run_in_background=True)
96
- Task(subagent_type="Explore", prompt="Analyze database layer...", run_in_background=True)
97
- Task(subagent_type="Explore", prompt="Analyze API routes...", run_in_background=True)
94
+ # Single message with multiple background agents (haiku for fast exploration)
95
+ Task(subagent_type="Explore", prompt="Analyze auth module...", model="haiku", run_in_background=True)
96
+ Task(subagent_type="Explore", prompt="Analyze database layer...", model="haiku", run_in_background=True)
97
+ Task(subagent_type="Explore", prompt="Analyze API routes...", model="haiku", run_in_background=True)
98
98
  ```
99
99
 
100
100
  **Critical:** All Task calls MUST be in ONE message AND use `run_in_background=True`.
@@ -114,16 +114,16 @@ Agent A → output → Agent B → output → Agent C → final result
114
114
  **Implementation:**
115
115
 
116
116
  ```python
117
- # Step 1: Research (background, wait for notification)
118
- Task(subagent_type="Explore", prompt="Find all API endpoints...", run_in_background=True)
117
+ # Step 1: Research (haiku - fast exploration)
118
+ Task(subagent_type="Explore", prompt="Find all API endpoints...", model="haiku", run_in_background=True)
119
119
  # → Notification arrives with result1
120
120
 
121
- # Step 2: Plan (background, uses result1)
122
- Task(subagent_type="Plan", prompt=f"Given endpoints: {result1}, design...", run_in_background=True)
121
+ # Step 2: Plan (opus - needs critical thinking for design)
122
+ Task(subagent_type="Plan", prompt=f"Given endpoints: {result1}, design...", model="opus", run_in_background=True)
123
123
  # → Notification arrives with result2
124
124
 
125
- # Step 3: Implement (background, uses result2)
126
- Task(subagent_type="general-purpose", prompt=f"Implement this plan: {result2}", run_in_background=True)
125
+ # Step 3: Implement (sonnet - well-structured from plan)
126
+ Task(subagent_type="general-purpose", prompt=f"Implement this plan: {result2}", model="sonnet", run_in_background=True)
127
127
  ```
128
128
 
129
129
  ---
@@ -143,10 +143,10 @@ Input ──►├──► Agent B ──┼──► Aggregator → Final Resu
143
143
  **Implementation:**
144
144
 
145
145
  ```python
146
- # MAP: Launch parallel agents (single message)
147
- Task(subagent_type="general-purpose", prompt="Analyze file1.ts for security issues", run_in_background=True)
148
- Task(subagent_type="general-purpose", prompt="Analyze file2.ts for security issues", run_in_background=True)
149
- Task(subagent_type="general-purpose", prompt="Analyze file3.ts for security issues", run_in_background=True)
146
+ # MAP: Launch parallel agents (opus for security - needs critical thinking)
147
+ Task(subagent_type="general-purpose", prompt="Analyze file1.ts for security issues", model="opus", run_in_background=True)
148
+ Task(subagent_type="general-purpose", prompt="Analyze file2.ts for security issues", model="opus", run_in_background=True)
149
+ Task(subagent_type="general-purpose", prompt="Analyze file3.ts for security issues", model="opus", run_in_background=True)
150
150
 
151
151
  # REDUCE: Collect and synthesize
152
152
  results = [TaskOutput(task_id=id) for id in task_ids]
@@ -170,10 +170,10 @@ Problem ─├──► Approach B ──┼──► Evaluate → Best Solution
170
170
  **Implementation:**
171
171
 
172
172
  ```python
173
- # Launch competing approaches (single message, all background)
174
- Task(subagent_type="general-purpose", prompt="Implement using recursive approach...", run_in_background=True)
175
- Task(subagent_type="general-purpose", prompt="Implement using iterative approach...", run_in_background=True)
176
- Task(subagent_type="general-purpose", prompt="Implement using memoization...", run_in_background=True)
173
+ # Launch competing approaches (sonnet for implementation)
174
+ Task(subagent_type="general-purpose", prompt="Implement using recursive approach...", model="sonnet", run_in_background=True)
175
+ Task(subagent_type="general-purpose", prompt="Implement using iterative approach...", model="sonnet", run_in_background=True)
176
+ Task(subagent_type="general-purpose", prompt="Implement using memoization...", model="sonnet", run_in_background=True)
177
177
 
178
178
  # Notifications arrive → Evaluate and select best
179
179
  ```
@@ -189,8 +189,8 @@ Long-running agents while continuing foreground work.
189
189
  **Implementation:**
190
190
 
191
191
  ```python
192
- # Launch background work
193
- Task(subagent_type="general-purpose", prompt="Run full test suite...", run_in_background=True)
192
+ # Launch background work (sonnet for test execution)
193
+ Task(subagent_type="general-purpose", prompt="Run full test suite...", model="sonnet", run_in_background=True)
194
194
 
195
195
  # Continue foreground work
196
196
  # ... do other tasks ...
@@ -271,13 +271,13 @@ results = [TaskOutput(id) for id in task_ids]
271
271
  ### Speculative + Pipeline
272
272
 
273
273
  ```python
274
- # Try multiple approaches (background)
275
- Task(subagent_type="general-purpose", prompt="Approach A...", run_in_background=True)
276
- Task(subagent_type="general-purpose", prompt="Approach B...", run_in_background=True)
274
+ # Try multiple approaches (sonnet for implementation)
275
+ Task(subagent_type="general-purpose", prompt="Approach A...", model="sonnet", run_in_background=True)
276
+ Task(subagent_type="general-purpose", prompt="Approach B...", model="sonnet", run_in_background=True)
277
277
 
278
278
  # Notifications arrive → Evaluate and continue with winner
279
279
  winner = evaluate(approach_a, approach_b)
280
- Task(subagent_type="general-purpose", prompt=f"Refine and complete: {winner}", run_in_background=True)
280
+ Task(subagent_type="general-purpose", prompt=f"Refine and complete: {winner}", model="sonnet", run_in_background=True)
281
281
  ```
282
282
 
283
283
  ---
@@ -307,7 +307,7 @@ if result.failed or result.incomplete:
307
307
  "content": f"Attempt 1 failed: {result.error}. Retrying with adjusted approach."
308
308
  })
309
309
 
310
- # Retry with more context (still background)
310
+ # Retry with more context (still background, same model as original)
311
311
  Task(subagent_type="general-purpose",
312
312
  prompt=f"""Previous attempt failed: {result.error}
313
313
 
@@ -315,6 +315,7 @@ if result.failed or result.incomplete:
315
315
  - [specific guidance based on failure]
316
316
 
317
317
  Original task: [task description]""",
318
+ model="sonnet",
318
319
  run_in_background=True)
319
320
  ```
320
321
 
@@ -375,9 +376,9 @@ for result in [result1, result2, result3]:
375
376
  "Found these relevant files: {all_files}"
376
377
  ```
377
378
 
378
- **Complex synthesis (spawn synthesis agent):**
379
+ **Complex synthesis (spawn synthesis agent - opus for judgment):**
379
380
 
380
- ```python
381
+ ```
381
382
  Task(subagent_type="general-purpose",
382
383
  prompt=f"""Synthesize these parallel review findings into a unified report:
383
384
 
@@ -398,6 +399,7 @@ Create a single PR review with:
398
399
  - Positive notes
399
400
 
400
401
  Prioritize by severity. Remove duplicates. Do not mention that multiple reviews were conducted.""",
402
+ model="opus",
401
403
  run_in_background=True)
402
404
  ```
403
405
 
@@ -413,7 +415,7 @@ if has_conflict(result1, result2):
413
415
  Approach A: {result1.summary}
414
416
  Approach B: {result2.summary}"
415
417
 
416
- # Option 2: Spawn resolution agent
418
+ # Option 2: Spawn resolution agent (opus for judgment)
417
419
  Task(subagent_type="general-purpose",
418
420
  prompt=f"""Two agents produced conflicting changes:
419
421
 
@@ -422,6 +424,7 @@ if has_conflict(result1, result2):
422
424
 
423
425
  Merge these changes, resolving conflicts by [priority rule].
424
426
  Ensure the final result is consistent.""",
427
+ model="opus",
425
428
  run_in_background=True)
426
429
  ```
427
430
 
@@ -201,10 +201,10 @@ Spawn an agent to handle work. This is how you delegate.
201
201
 
202
202
  **ALWAYS use `run_in_background=True`.** This is the foundation of powerful orchestration.
203
203
 
204
- ```python
205
- # Correct: Background agents (ALWAYS)
206
- Task(subagent_type="Explore", prompt="...", run_in_background=True)
207
- Task(subagent_type="general-purpose", prompt="...", run_in_background=True)
204
+ ```
205
+ # Correct: Background agents (ALWAYS) with explicit model
206
+ Task(subagent_type="Explore", prompt="...", model="haiku", run_in_background=True)
207
+ Task(subagent_type="general-purpose", prompt="...", model="sonnet", run_in_background=True)
208
208
  ```
209
209
 
210
210
  ### The Notification System
@@ -252,23 +252,23 @@ TaskOutput(task_id="abc123")
252
252
 
253
253
  ### Model Selection
254
254
 
255
- | Task Complexity | Model | Why |
256
- | ---------------------- | --------------- | ---------------------------- |
257
- | Simple search/patterns | `haiku` | Fast and cheap |
258
- | Standard exploration | `haiku` | Sufficient for most searches |
259
- | Complex exploration | `sonnet` | Needs reasoning |
260
- | Simple implementation | `haiku` | Pattern-based work |
261
- | Complex implementation | `sonnet` | Design decisions needed |
262
- | Architecture/planning | `sonnet`/`opus` | Complex trade-offs |
263
- | Security review | `sonnet` | Careful analysis |
255
+ | Task Type | Model | Why |
256
+ | -------------------------------- | -------- | ---------------------------------------- |
257
+ | Fetch files, grep, find things | `haiku` | Errand runner - spawn many in parallel |
258
+ | Gather info for synthesis | `haiku` | No judgment needed, just retrieval |
259
+ | Well-structured implementation | `sonnet` | Capable worker - needs clear direction |
260
+ | Research, reading docs | `sonnet` | Can follow patterns and instructions |
261
+ | Security review | `opus` | Critical thinking, trust its judgment |
262
+ | Architecture/design decisions | `opus` | Ambiguous, needs creative problem-solving|
263
+ | Complex debugging | `opus` | Reasoning across systems |
264
264
 
265
265
  ### Parallelism Strategy
266
266
 
267
- | Priority | Approach |
268
- | ------------ | ------------------------------------------------ |
269
- | **Speed** | Parallelize with sonnet, accept higher cost |
270
- | **Cost** | Sequential haiku where possible |
271
- | **Balanced** | Haiku for exploration, sonnet for implementation |
267
+ | Priority | Approach |
268
+ | ------------ | -------------------------------------------------- |
269
+ | **Speed** | Swarm of haiku for gathering, parallel sonnet work |
270
+ | **Cost** | Haiku wherever possible, sonnet only when needed |
271
+ | **Balanced** | Haiku to gather, sonnet to implement, opus to decide |
272
272
 
273
273
  ---
274
274
 
@@ -482,10 +482,11 @@ TaskUpdate(taskId="3", addBlockedBy=["2"])
482
482
  # 3. Find ready (task 1 is unblocked)
483
483
  TaskList()
484
484
 
485
- # 4. Spawn background agent (ALWAYS background)
485
+ # 4. Spawn background agent (ALWAYS background, explicit model)
486
486
  Task(subagent_type="general-purpose",
487
487
  description="Setup database",
488
488
  prompt="Create SQLite database with users table...",
489
+ model="sonnet",
489
490
  run_in_background=True)
490
491
 
491
492
  # 5. Update user and yield (or continue other work)
@@ -5,7 +5,7 @@ description: CLI tool for managing team tasks outside of Claude Code's built-in
5
5
 
6
6
  # Task Manager CLI
7
7
 
8
- You have access to `cc-mirror tasks` - a CLI for managing team tasks.
8
+ You have access to `npx cc-mirror tasks` - a CLI for managing team tasks.
9
9
 
10
10
  ## Auto-Detection
11
11
 
@@ -20,24 +20,24 @@ No need to specify `--variant` or `--team` in most cases.
20
20
 
21
21
  ```bash
22
22
  # List tasks
23
- cc-mirror tasks # Open tasks (default)
24
- cc-mirror tasks --status all # All tasks
23
+ npx cc-mirror tasks # Open tasks (default)
24
+ npx cc-mirror tasks --status all # All tasks
25
25
 
26
26
  # View dependencies
27
- cc-mirror tasks graph # Visual dependency tree
27
+ npx cc-mirror tasks graph # Visual dependency tree
28
28
 
29
29
  # Archive resolved tasks (preserves history)
30
- cc-mirror tasks archive --resolved --dry-run # Preview
31
- cc-mirror tasks archive --resolved # Execute
30
+ npx cc-mirror tasks archive --resolved --dry-run # Preview
31
+ npx cc-mirror tasks archive --resolved # Execute
32
32
 
33
33
  # Delete permanently (no history)
34
- cc-mirror tasks clean --resolved --dry-run # Preview
35
- cc-mirror tasks clean --resolved # Execute
34
+ npx cc-mirror tasks clean --resolved --dry-run # Preview
35
+ npx cc-mirror tasks clean --resolved # Execute
36
36
 
37
37
  # Single task operations
38
- cc-mirror tasks show <id> # View details
39
- cc-mirror tasks archive <id> # Archive one task
40
- cc-mirror tasks delete <id> # Delete one task
38
+ npx cc-mirror tasks show <id> # View details
39
+ npx cc-mirror tasks archive <id> # Archive one task
40
+ npx cc-mirror tasks delete <id> # Delete one task
41
41
  ```
42
42
 
43
43
  ## When to Use
@@ -62,16 +62,16 @@ By default, commands target your current team. To view others:
62
62
 
63
63
  ```bash
64
64
  # Different team in same variant
65
- cc-mirror tasks --team other-project
65
+ npx cc-mirror tasks --team other-project
66
66
 
67
67
  # Different variant
68
- cc-mirror tasks --variant zai --team my-project
68
+ npx cc-mirror tasks --variant zai --team my-project
69
69
 
70
70
  # All teams in current variant
71
- cc-mirror tasks --all
71
+ npx cc-mirror tasks --all
72
72
 
73
73
  # All variants, all teams
74
- cc-mirror tasks --all-variants --all
74
+ npx cc-mirror tasks --all-variants --all
75
75
  ```
76
76
 
77
77
  Ask the user which team/variant they want to view using `AskUserQuestion`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-mirror",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "type": "module",
5
5
  "description": "Create multiple isolated Claude Code variants with custom providers (Z.ai, MiniMax, OpenRouter, Claude Code Router)",
6
6
  "author": "Numman Ali",