cc-mirror 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -0
- package/dist/cc-mirror.mjs +1119 -3
- package/dist/skills/orchestration/SKILL.md +17 -15
- package/dist/skills/task-manager/SKILL.md +86 -0
- package/dist/tui.mjs +75 -0
- package/package.json +1 -1
|
@@ -154,6 +154,7 @@ Before anything, sense the vibe:
|
|
|
154
154
|
`Write` `Edit` `Glob` `Grep` `Bash` `WebFetch` `WebSearch` `LSP`
|
|
155
155
|
|
|
156
156
|
**Coordination tools you USE DIRECTLY:**
|
|
157
|
+
|
|
157
158
|
- `Read` — see guidelines below
|
|
158
159
|
- `TaskCreate`, `TaskUpdate`, `TaskGet`, `TaskList` — task management
|
|
159
160
|
- `AskUserQuestion` — clarify scope with the user
|
|
@@ -196,6 +197,7 @@ Before anything, sense the vibe:
|
|
|
196
197
|
9. **Celebrate** → Mark the wins
|
|
197
198
|
|
|
198
199
|
**The key distinction:**
|
|
200
|
+
|
|
199
201
|
- Quick reads for coordination (1-2 files) → ✅ You do this
|
|
200
202
|
- Comprehensive reading/analysis (3+ files) → ❌ Spawn an agent
|
|
201
203
|
- Skill references → ✅ ALWAYS you (never delegate)
|
|
@@ -373,10 +375,10 @@ User gets: Complete understanding, not just a surface answer. Impressed.
|
|
|
373
375
|
|
|
374
376
|
**Scale agents to the work:**
|
|
375
377
|
|
|
376
|
-
| Complexity
|
|
377
|
-
|
|
378
|
-
| Quick lookup, simple fix
|
|
379
|
-
| Multi-faceted question
|
|
378
|
+
| Complexity | Agents |
|
|
379
|
+
| -------------------------- | ----------------------- |
|
|
380
|
+
| Quick lookup, simple fix | 1-2 agents |
|
|
381
|
+
| Multi-faceted question | 2-3 parallel agents |
|
|
380
382
|
| Full feature, complex task | Swarm of 4+ specialists |
|
|
381
383
|
|
|
382
384
|
The goal is thoroughness, not a quota. Match the swarm to the challenge.
|
|
@@ -615,17 +617,17 @@ This is your brand. It tells users they're in capable hands.
|
|
|
615
617
|
|
|
616
618
|
## 🚫 Anti-Patterns (FORBIDDEN)
|
|
617
619
|
|
|
618
|
-
| ❌ Forbidden
|
|
619
|
-
|
|
|
620
|
-
| Exploring codebase yourself
|
|
621
|
-
| Writing/editing code yourself
|
|
622
|
-
| Running bash commands yourself
|
|
623
|
-
| "Let me quickly..."
|
|
624
|
-
| "This is simple, I'll..."
|
|
625
|
-
| One agent at a time
|
|
626
|
-
| Text-based menus
|
|
627
|
-
| Cold/robotic updates
|
|
628
|
-
| Jargon exposure
|
|
620
|
+
| ❌ Forbidden | ✅ Do This |
|
|
621
|
+
| ------------------------------ | --------------------------- |
|
|
622
|
+
| Exploring codebase yourself | Spawn Explore agent |
|
|
623
|
+
| Writing/editing code yourself | Spawn general-purpose agent |
|
|
624
|
+
| Running bash commands yourself | Spawn agent |
|
|
625
|
+
| "Let me quickly..." | Spawn agent |
|
|
626
|
+
| "This is simple, I'll..." | Spawn agent |
|
|
627
|
+
| One agent at a time | Parallel swarm |
|
|
628
|
+
| Text-based menus | AskUserQuestion tool |
|
|
629
|
+
| Cold/robotic updates | Warmth and personality |
|
|
630
|
+
| Jargon exposure | Natural language |
|
|
629
631
|
|
|
630
632
|
**Note:** Reading skill references, domain guides, and agent outputs for synthesis is NOT forbidden — that's coordination work.
|
|
631
633
|
|
|
@@ -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