cc-mirror 1.3.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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)
@@ -0,0 +1,86 @@
1
+ ---
2
+ name: task-manager
3
+ description: CLI tool for managing team tasks outside of Claude Code's built-in tools. Use this skill when tasks need to be archived, bulk cleaned up, or when you need a high-level view of task dependencies. Triggers: (1) User asks to clean up or archive completed tasks, (2) Too many resolved tasks cluttering the list, (3) Need to visualize task dependencies, (4) Want to manage tasks via command line.
4
+ ---
5
+
6
+ # Task Manager CLI
7
+
8
+ You have access to `cc-mirror tasks` - a CLI for managing team tasks.
9
+
10
+ ## Auto-Detection
11
+
12
+ The CLI auto-detects your context:
13
+
14
+ - **Variant**: From `CLAUDE_CONFIG_DIR` environment variable
15
+ - **Team**: From current working directory (git root folder name)
16
+
17
+ No need to specify `--variant` or `--team` in most cases.
18
+
19
+ ## Commands
20
+
21
+ ```bash
22
+ # List tasks
23
+ cc-mirror tasks # Open tasks (default)
24
+ cc-mirror tasks --status all # All tasks
25
+
26
+ # View dependencies
27
+ cc-mirror tasks graph # Visual dependency tree
28
+
29
+ # Archive resolved tasks (preserves history)
30
+ cc-mirror tasks archive --resolved --dry-run # Preview
31
+ cc-mirror tasks archive --resolved # Execute
32
+
33
+ # Delete permanently (no history)
34
+ cc-mirror tasks clean --resolved --dry-run # Preview
35
+ cc-mirror tasks clean --resolved # Execute
36
+
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
41
+ ```
42
+
43
+ ## When to Use
44
+
45
+ Use `AskUserQuestion` to confirm with the user:
46
+
47
+ ```
48
+ When tasks are cluttering:
49
+ → "Archive resolved tasks?" (preserves in archive folder)
50
+ → "Delete resolved tasks?" (permanent removal)
51
+ → "Show task graph first?" (see dependencies)
52
+
53
+ When user wants to see other projects/teams:
54
+ → "Which team?" (then use --team flag)
55
+ → "Which variant?" (then use --variant flag)
56
+ → "All teams?" (then use --all flag)
57
+ ```
58
+
59
+ ## Viewing Other Teams/Variants
60
+
61
+ By default, commands target your current team. To view others:
62
+
63
+ ```bash
64
+ # Different team in same variant
65
+ cc-mirror tasks --team other-project
66
+
67
+ # Different variant
68
+ cc-mirror tasks --variant zai --team my-project
69
+
70
+ # All teams in current variant
71
+ cc-mirror tasks --all
72
+
73
+ # All variants, all teams
74
+ cc-mirror tasks --all-variants --all
75
+ ```
76
+
77
+ Ask the user which team/variant they want to view using `AskUserQuestion`.
78
+
79
+ ## Archive vs Delete
80
+
81
+ | Action | Command | Effect |
82
+ | ------- | -------------------- | ----------------------------------------- |
83
+ | Archive | `archive --resolved` | Moves to `archive/` folder with timestamp |
84
+ | Delete | `clean --resolved` | Permanently removes files |
85
+
86
+ **Prefer archive** - it preserves task history for future reference.
package/dist/tui.mjs CHANGED
@@ -2325,6 +2325,63 @@ var removeOrchestratorSkill = (configDir) => {
2325
2325
  return { status: "failed", message };
2326
2326
  }
2327
2327
  };
2328
+ var TASK_MANAGER_SKILL_NAME = "task-manager";
2329
+ var findBundledTaskManagerSkillDir = () => {
2330
+ const thisFile = fileURLToPath(import.meta.url);
2331
+ const thisDir = path6.dirname(thisFile);
2332
+ const devPath = path6.join(thisDir, "..", "skills", TASK_MANAGER_SKILL_NAME);
2333
+ if (fs5.existsSync(devPath)) return devPath;
2334
+ const distPath = path6.join(thisDir, "skills", TASK_MANAGER_SKILL_NAME);
2335
+ if (fs5.existsSync(distPath)) return distPath;
2336
+ const distPath2 = path6.join(thisDir, "..", "skills", TASK_MANAGER_SKILL_NAME);
2337
+ if (fs5.existsSync(distPath2)) return distPath2;
2338
+ return null;
2339
+ };
2340
+ var installTaskManagerSkill = (configDir) => {
2341
+ const sourceDir = findBundledTaskManagerSkillDir();
2342
+ if (!sourceDir) {
2343
+ return { status: "failed", message: "bundled task-manager skill not found" };
2344
+ }
2345
+ const skillsDir = path6.join(configDir, "skills");
2346
+ const targetDir = path6.join(skillsDir, TASK_MANAGER_SKILL_NAME);
2347
+ const markerPath = path6.join(targetDir, MANAGED_MARKER);
2348
+ try {
2349
+ ensureDir2(skillsDir);
2350
+ if (fs5.existsSync(targetDir) && !fs5.existsSync(markerPath)) {
2351
+ return { status: "skipped", message: "existing skill is user-managed", path: targetDir };
2352
+ }
2353
+ if (fs5.existsSync(targetDir)) {
2354
+ fs5.rmSync(targetDir, { recursive: true, force: true });
2355
+ }
2356
+ copyDir(sourceDir, targetDir);
2357
+ fs5.writeFileSync(
2358
+ markerPath,
2359
+ JSON.stringify({ managedBy: "cc-mirror", updatedAt: (/* @__PURE__ */ new Date()).toISOString() }, null, 2)
2360
+ );
2361
+ return { status: "installed", path: targetDir };
2362
+ } catch (error) {
2363
+ const message = error instanceof Error ? error.message : String(error);
2364
+ return { status: "failed", message };
2365
+ }
2366
+ };
2367
+ var removeTaskManagerSkill = (configDir) => {
2368
+ const skillsDir = path6.join(configDir, "skills");
2369
+ const targetDir = path6.join(skillsDir, TASK_MANAGER_SKILL_NAME);
2370
+ const markerPath = path6.join(targetDir, MANAGED_MARKER);
2371
+ if (!fs5.existsSync(targetDir)) {
2372
+ return { status: "skipped", message: "skill not installed" };
2373
+ }
2374
+ if (!fs5.existsSync(markerPath)) {
2375
+ return { status: "skipped", message: "skill is user-managed, not removing" };
2376
+ }
2377
+ try {
2378
+ fs5.rmSync(targetDir, { recursive: true, force: true });
2379
+ return { status: "removed", path: targetDir };
2380
+ } catch (error) {
2381
+ const message = error instanceof Error ? error.message : String(error);
2382
+ return { status: "failed", message };
2383
+ }
2384
+ };
2328
2385
  var spawnAsync = (cmd, args) => {
2329
2386
  return new Promise((resolve) => {
2330
2387
  const child = spawn3(cmd, args, { stdio: "pipe" });
@@ -2535,6 +2592,12 @@ var TeamModeStep = class {
2535
2592
  } else if (skillResult.status === "failed") {
2536
2593
  state.notes.push(`Warning: orchestrator skill install failed: ${skillResult.message}`);
2537
2594
  }
2595
+ const taskSkillResult = installTaskManagerSkill(paths.configDir);
2596
+ if (taskSkillResult.status === "installed") {
2597
+ state.notes.push("Task manager skill installed");
2598
+ } else if (taskSkillResult.status === "failed") {
2599
+ state.notes.push(`Warning: task-manager skill install failed: ${taskSkillResult.message}`);
2600
+ }
2538
2601
  const systemPromptsDir = path8.join(paths.tweakDir, "system-prompts");
2539
2602
  const copiedFiles = copyTeamPackPrompts(systemPromptsDir);
2540
2603
  if (copiedFiles.length > 0) {
@@ -3980,6 +4043,12 @@ var TeamModeUpdateStep = class {
3980
4043
  } else if (skillResult.status === "failed") {
3981
4044
  state.notes.push(`Warning: orchestrator skill removal failed: ${skillResult.message}`);
3982
4045
  }
4046
+ const taskSkillResult = removeTaskManagerSkill(meta.configDir);
4047
+ if (taskSkillResult.status === "removed") {
4048
+ state.notes.push("Task manager skill removed");
4049
+ } else if (taskSkillResult.status === "failed") {
4050
+ state.notes.push(`Warning: task-manager skill removal failed: ${taskSkillResult.message}`);
4051
+ }
3983
4052
  }
3984
4053
  patchCli(ctx) {
3985
4054
  const { state, meta, paths } = ctx;
@@ -4038,6 +4107,12 @@ var TeamModeUpdateStep = class {
4038
4107
  } else if (skillResult.status === "failed") {
4039
4108
  state.notes.push(`Warning: orchestrator skill install failed: ${skillResult.message}`);
4040
4109
  }
4110
+ const taskSkillResult = installTaskManagerSkill(meta.configDir);
4111
+ if (taskSkillResult.status === "installed") {
4112
+ state.notes.push("Task manager skill installed");
4113
+ } else if (taskSkillResult.status === "failed") {
4114
+ state.notes.push(`Warning: task-manager skill install failed: ${taskSkillResult.message}`);
4115
+ }
4041
4116
  const systemPromptsDir = path17.join(meta.tweakDir, "system-prompts");
4042
4117
  const copiedFiles = copyTeamPackPrompts(systemPromptsDir);
4043
4118
  if (copiedFiles.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-mirror",
3
- "version": "1.3.0",
3
+ "version": "1.4.1",
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",