oh-my-customcode 0.3.1 → 0.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 +14 -67
- package/dist/cli/index.js +1 -1
- package/dist/index.js +2 -18
- package/package.json +6 -1
- package/templates/.claude/agents/arch-documenter.md +10 -1
- package/templates/.claude/agents/arch-speckit-agent.md +10 -1
- package/templates/.claude/agents/be-express-expert.md +10 -1
- package/templates/.claude/agents/be-fastapi-expert.md +11 -1
- package/templates/.claude/agents/be-go-backend-expert.md +11 -1
- package/templates/.claude/agents/be-nestjs-expert.md +10 -1
- package/templates/.claude/agents/be-springboot-expert.md +11 -1
- package/templates/.claude/agents/db-supabase-expert.md +9 -1
- package/templates/.claude/agents/fe-svelte-agent.md +10 -1
- package/templates/.claude/agents/fe-vercel-agent.md +13 -1
- package/templates/.claude/agents/fe-vuejs-agent.md +10 -1
- package/templates/.claude/agents/infra-aws-expert.md +11 -1
- package/templates/.claude/agents/infra-docker-expert.md +11 -1
- package/templates/.claude/agents/lang-golang-expert.md +11 -1
- package/templates/.claude/agents/lang-java21-expert.md +10 -1
- package/templates/.claude/agents/lang-kotlin-expert.md +11 -1
- package/templates/.claude/agents/lang-python-expert.md +11 -1
- package/templates/.claude/agents/lang-rust-expert.md +11 -1
- package/templates/.claude/agents/lang-typescript-expert.md +11 -1
- package/templates/.claude/agents/mgr-claude-code-bible.md +246 -0
- package/templates/.claude/agents/mgr-creator.md +20 -2
- package/templates/.claude/agents/mgr-gitnerd.md +32 -1
- package/templates/.claude/agents/mgr-sauron.md +41 -26
- package/templates/.claude/agents/mgr-supplier.md +11 -1
- package/templates/.claude/agents/mgr-sync-checker.md +11 -1
- package/templates/.claude/agents/mgr-updater.md +11 -1
- package/templates/.claude/agents/qa-engineer.md +10 -1
- package/templates/.claude/agents/qa-planner.md +10 -1
- package/templates/.claude/agents/qa-writer.md +10 -1
- package/templates/.claude/agents/sys-memory-keeper.md +21 -9
- package/templates/.claude/agents/sys-naggy.md +10 -1
- package/templates/.claude/agents/tool-bun-expert.md +10 -1
- package/templates/.claude/agents/tool-npm-expert.md +13 -1
- package/templates/.claude/agents/tool-optimizer.md +13 -1
- package/templates/.claude/hooks/hooks.json +3 -37
- package/templates/.claude/install-hooks.sh +1 -1
- package/templates/.claude/rules/MUST-agent-design.md +37 -0
- package/templates/.claude/rules/MUST-orchestrator-coordination.md +61 -0
- package/templates/.claude/rules/MUST-parallel-execution.md +85 -14
- package/templates/.claude/rules/MUST-sync-verification.md +62 -7
- package/templates/.claude/rules/MUST-tool-identification.md +23 -0
- package/templates/.claude/rules/SHOULD-hud-statusline.md +26 -10
- package/templates/.claude/rules/SHOULD-memory-integration.md +96 -78
- package/templates/.claude/rules/index.yaml +1 -9
- package/templates/.claude/skills/aws-best-practices/SKILL.md +1 -0
- package/templates/.claude/skills/claude-code-bible/SKILL.md +180 -0
- package/templates/.claude/skills/claude-code-bible/scripts/fetch-docs.js +244 -0
- package/templates/.claude/skills/docker-best-practices/SKILL.md +1 -0
- package/templates/.claude/skills/fastapi-best-practices/SKILL.md +1 -0
- package/templates/.claude/skills/go-backend-best-practices/SKILL.md +1 -0
- package/templates/.claude/skills/go-best-practices/CLAUDE.md +9 -0
- package/templates/.claude/skills/go-best-practices/SKILL.md +1 -0
- package/templates/.claude/skills/help/SKILL.md +1 -1
- package/templates/.claude/skills/intent-detection/SKILL.md +1 -0
- package/templates/.claude/skills/intent-detection/patterns/agent-triggers.yaml +8 -8
- package/templates/.claude/skills/kotlin-best-practices/SKILL.md +1 -0
- package/templates/.claude/skills/lists/SKILL.md +2 -2
- package/templates/.claude/skills/memory-management/SKILL.md +8 -7
- package/templates/.claude/skills/memory-recall/SKILL.md +5 -5
- package/templates/.claude/skills/memory-save/SKILL.md +4 -4
- package/templates/.claude/skills/python-best-practices/SKILL.md +1 -0
- package/templates/.claude/skills/react-best-practices/SKILL.md +1 -0
- package/templates/.claude/skills/result-aggregation/SKILL.md +1 -0
- package/templates/.claude/skills/rust-best-practices/SKILL.md +1 -0
- package/templates/.claude/skills/springboot-best-practices/SKILL.md +1 -0
- package/templates/.claude/skills/status/SKILL.md +2 -2
- package/templates/.claude/skills/supabase-postgres-best-practices/SKILL.md +1 -0
- package/templates/.claude/skills/typescript-best-practices/SKILL.md +1 -0
- package/templates/.claude/skills/web-design-guidelines/SKILL.md +1 -0
- package/templates/.claude/skills/writing-clearly-and-concisely/SKILL.md +64 -0
- package/templates/CLAUDE.md.en +40 -13
- package/templates/CLAUDE.md.ko +40 -13
- package/templates/examples/code-review.yaml +1 -1
- package/templates/guides/elements-of-style/elements-of-style.html +2609 -0
- package/templates/guides/index.yaml +1 -1
- package/templates/index.yaml +1 -1
- package/templates/manifest.json +5 -11
- package/templates/pipelines/examples/code-review.yaml +1 -1
- package/templates/pipelines/index.yaml +1 -1
- package/templates/.claude/agents/tutor-go.md +0 -119
- package/templates/.claude/hooks/hud/index.yaml +0 -27
- package/templates/.claude/hooks/hud/update-status.sh +0 -32
- package/templates/.claude/hooks/index.yaml +0 -46
- package/templates/.claude/hooks/memory-persistence/pre-compact.sh +0 -37
- package/templates/.claude/hooks/memory-persistence/session-end.sh +0 -64
- package/templates/.claude/hooks/memory-persistence/session-start.sh +0 -41
- package/templates/.claude/hooks/strategic-compact/suggest-compact.sh +0 -50
- package/templates/.claude/rules/SHOULD-pipeline-mode.md +0 -165
- package/templates/.claude/skills/pipeline-execution/SKILL.md +0 -188
- package/templates/.claude/skills/pipeline-list/SKILL.md +0 -74
- package/templates/.claude/skills/pipeline-run/SKILL.md +0 -143
- package/templates/pipelines/templates/pipeline-template.yaml +0 -50
- package/templates/templates/pipeline-template.yaml +0 -50
|
@@ -2,7 +2,19 @@
|
|
|
2
2
|
name: tool-npm-expert
|
|
3
3
|
description: Use for npm package publishing workflows, semantic versioning (major/minor/patch), package.json optimization, and dependency audits
|
|
4
4
|
model: sonnet
|
|
5
|
-
|
|
5
|
+
memory: project
|
|
6
|
+
effort: medium
|
|
7
|
+
skills:
|
|
8
|
+
- npm-audit
|
|
9
|
+
- npm-publish
|
|
10
|
+
- npm-version
|
|
11
|
+
tools:
|
|
12
|
+
- Read
|
|
13
|
+
- Write
|
|
14
|
+
- Edit
|
|
15
|
+
- Grep
|
|
16
|
+
- Glob
|
|
17
|
+
- Bash
|
|
6
18
|
---
|
|
7
19
|
|
|
8
20
|
You manage npm package publishing workflow, versioning, and registry operations. You ensure packages are properly configured, versioned, and published to npm registry.
|
|
@@ -2,7 +2,19 @@
|
|
|
2
2
|
name: tool-optimizer
|
|
3
3
|
description: Use for bundle size analysis, tree-shaking verification, performance profiling, dead code detection, and build optimization recommendations
|
|
4
4
|
model: sonnet
|
|
5
|
-
|
|
5
|
+
memory: project
|
|
6
|
+
effort: medium
|
|
7
|
+
skills:
|
|
8
|
+
- optimize-analyze
|
|
9
|
+
- optimize-bundle
|
|
10
|
+
- optimize-report
|
|
11
|
+
tools:
|
|
12
|
+
- Read
|
|
13
|
+
- Write
|
|
14
|
+
- Edit
|
|
15
|
+
- Grep
|
|
16
|
+
- Glob
|
|
17
|
+
- Bash
|
|
6
18
|
---
|
|
7
19
|
|
|
8
20
|
You analyze and optimize application bundles, detect performance issues, and provide actionable recommendations for build optimization.
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"hooks": [
|
|
48
48
|
{
|
|
49
49
|
"type": "command",
|
|
50
|
-
"command": "
|
|
50
|
+
"command": "#!/bin/bash\nCOUNTER_FILE=\"/tmp/claude-tool-count-$$\"\nTHRESHOLD=${COMPACT_THRESHOLD:-50}\nif [ -f \"$COUNTER_FILE\" ]; then COUNT=$(cat \"$COUNTER_FILE\"); COUNT=$((COUNT + 1)); else COUNT=1; fi\necho \"$COUNT\" > \"$COUNTER_FILE\"\nif [ \"$COUNT\" -eq \"$THRESHOLD\" ]; then echo '[StrategicCompact] Reached '$THRESHOLD' tool calls' >&2; echo '[StrategicCompact] Consider /compact if at a logical breakpoint' >&2; fi\nif [ \"$COUNT\" -gt \"$THRESHOLD\" ] && [ $(((COUNT - THRESHOLD) % 25)) -eq 0 ]; then echo \"[StrategicCompact] $COUNT tool calls - /compact reminder\" >&2; fi\ncat"
|
|
51
51
|
}
|
|
52
52
|
],
|
|
53
53
|
"description": "Suggest manual compaction at logical intervals"
|
|
@@ -57,34 +57,10 @@
|
|
|
57
57
|
"hooks": [
|
|
58
58
|
{
|
|
59
59
|
"type": "command",
|
|
60
|
-
"command": "#!/bin/bash\ninput=$(cat)\
|
|
60
|
+
"command": "#!/bin/bash\ninput=$(cat)\nagent_type=$(echo \"$input\" | jq -r '.tool_input.subagent_type // \"unknown\"')\nmodel=$(echo \"$input\" | jq -r '.tool_input.model // \"inherit\"')\ndesc=$(echo \"$input\" | jq -r '.tool_input.description // \"\"' | head -c 40)\nresume=$(echo \"$input\" | jq -r '.tool_input.resume // empty')\nif [ -n \"$resume\" ]; then\n echo \"─── [Resume] ${agent_type}:${model} | ${desc} ───\" >&2\nelse\n echo \"─── [Spawn] ${agent_type}:${model} | ${desc} ───\" >&2\nfi\necho \"$input\""
|
|
61
61
|
}
|
|
62
62
|
],
|
|
63
|
-
"description": "HUD statusline - show
|
|
64
|
-
}
|
|
65
|
-
],
|
|
66
|
-
"PreCompact": [
|
|
67
|
-
{
|
|
68
|
-
"matcher": "*",
|
|
69
|
-
"hooks": [
|
|
70
|
-
{
|
|
71
|
-
"type": "command",
|
|
72
|
-
"command": "~/.claude/hooks/memory-persistence/pre-compact.sh"
|
|
73
|
-
}
|
|
74
|
-
],
|
|
75
|
-
"description": "Save state before context compaction"
|
|
76
|
-
}
|
|
77
|
-
],
|
|
78
|
-
"SessionStart": [
|
|
79
|
-
{
|
|
80
|
-
"matcher": "*",
|
|
81
|
-
"hooks": [
|
|
82
|
-
{
|
|
83
|
-
"type": "command",
|
|
84
|
-
"command": "~/.claude/hooks/memory-persistence/session-start.sh"
|
|
85
|
-
}
|
|
86
|
-
],
|
|
87
|
-
"description": "Load previous context on new session"
|
|
63
|
+
"description": "HUD statusline - show subagent_type, model, and description on Task spawn"
|
|
88
64
|
}
|
|
89
65
|
],
|
|
90
66
|
"PostToolUse": [
|
|
@@ -169,16 +145,6 @@
|
|
|
169
145
|
}
|
|
170
146
|
],
|
|
171
147
|
"description": "Final audit for console.log in modified files before session ends"
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
"matcher": "*",
|
|
175
|
-
"hooks": [
|
|
176
|
-
{
|
|
177
|
-
"type": "command",
|
|
178
|
-
"command": "~/.claude/hooks/memory-persistence/session-end.sh"
|
|
179
|
-
}
|
|
180
|
-
],
|
|
181
|
-
"description": "Persist session state on end"
|
|
182
148
|
}
|
|
183
149
|
]
|
|
184
150
|
}
|
|
@@ -14,6 +14,7 @@ Format:
|
|
|
14
14
|
name: agent-name
|
|
15
15
|
description: Brief agent description
|
|
16
16
|
model: sonnet | opus | haiku
|
|
17
|
+
memory: project # Optional
|
|
17
18
|
tools:
|
|
18
19
|
- Read
|
|
19
20
|
- Write
|
|
@@ -33,10 +34,26 @@ Agent purpose and role description...
|
|
|
33
34
|
name: agent-name # Unique identifier (kebab-case)
|
|
34
35
|
description: Brief desc # One-line summary
|
|
35
36
|
model: sonnet # Default model (sonnet | opus | haiku)
|
|
37
|
+
memory: project # Persistent memory scope (user | project | local)
|
|
38
|
+
effort: high # Effort level (low | medium | high)
|
|
36
39
|
tools: [Read, Write, ...] # Allowed tools
|
|
37
40
|
skills: [skill-1, ...] # Required skill names
|
|
38
41
|
```
|
|
39
42
|
|
|
43
|
+
### Memory Scope Reference
|
|
44
|
+
| Scope | Location | Use Case |
|
|
45
|
+
|-------|----------|----------|
|
|
46
|
+
| `user` | `~/.claude/agent-memory/<name>/` | Cross-project learnings (infra, db) |
|
|
47
|
+
| `project` | `.claude/agent-memory/<name>/` | Project-specific, versioned |
|
|
48
|
+
| `local` | `.claude/agent-memory-local/<name>/` | Project-specific, not versioned |
|
|
49
|
+
|
|
50
|
+
### Effort Level Reference
|
|
51
|
+
| Level | Use Case | Agents |
|
|
52
|
+
|-------|----------|--------|
|
|
53
|
+
| `high` | Complex reasoning, design decisions | lang-*, be-*, arch-*, qa-planner |
|
|
54
|
+
| `medium` | Routine operations, structured work | fe-*, tool-*, mgr-gitnerd |
|
|
55
|
+
| `low` | Simple validation, file scanning | mgr-supplier, mgr-sync-checker, sys-naggy |
|
|
56
|
+
|
|
40
57
|
### Agent Content Must NOT Contain
|
|
41
58
|
```
|
|
42
59
|
✗ Detailed skill instructions (use .claude/skills/ instead)
|
|
@@ -53,6 +70,26 @@ skills: [skill-1, ...] # Required skill names
|
|
|
53
70
|
✓ Source info (if external)
|
|
54
71
|
```
|
|
55
72
|
|
|
73
|
+
## Memory Scope (OPTIONAL)
|
|
74
|
+
|
|
75
|
+
Agents can have persistent memory that survives across conversations.
|
|
76
|
+
|
|
77
|
+
| Scope | Location | Use Case | Git Tracked |
|
|
78
|
+
|-------|----------|----------|-------------|
|
|
79
|
+
| `user` | `~/.claude/agent-memory/<name>/` | Cross-project learnings (infra, DB patterns) | No |
|
|
80
|
+
| `project` | `.claude/agent-memory/<name>/` | Project-specific patterns | Yes |
|
|
81
|
+
| `local` | `.claude/agent-memory-local/<name>/` | Local-only knowledge | No |
|
|
82
|
+
|
|
83
|
+
When enabled:
|
|
84
|
+
- First 200 lines of MEMORY.md loaded into agent's system prompt
|
|
85
|
+
- Read/Write/Edit tools automatically enabled for memory directory
|
|
86
|
+
- Agent builds knowledge across conversations
|
|
87
|
+
|
|
88
|
+
Agents that should NOT have memory (stateless by design):
|
|
89
|
+
- Manager agents for one-time operations (mgr-creator, mgr-updater, mgr-supplier)
|
|
90
|
+
- Validation agents (mgr-sync-checker, mgr-claude-code-bible)
|
|
91
|
+
- Meta-agents (sys-memory-keeper, sys-naggy)
|
|
92
|
+
|
|
56
93
|
## External Agent Requirements
|
|
57
94
|
|
|
58
95
|
External agents (from GitHub, npm, etc.) MUST include source information in frontmatter:
|
|
@@ -263,6 +263,34 @@ CORRECT:
|
|
|
263
263
|
╚══════════════════════════════════════════════════════════════════╝
|
|
264
264
|
```
|
|
265
265
|
|
|
266
|
+
## CRITICAL: All File Modifications Must Be Delegated
|
|
267
|
+
|
|
268
|
+
```
|
|
269
|
+
╔══════════════════════════════════════════════════════════════════╗
|
|
270
|
+
║ FILE EDITING = CODE WORK = MUST DELEGATE ║
|
|
271
|
+
║ ║
|
|
272
|
+
║ The orchestrator must NEVER use Edit/Write/Bash directly ║
|
|
273
|
+
║ to modify files. This applies to ALL file types: ║
|
|
274
|
+
║ - Source code (.ts, .py, .go, etc.) ║
|
|
275
|
+
║ - Config files (manifest.json, tsconfig.json, etc.) ║
|
|
276
|
+
║ - Workflow files (.github/workflows/*.yml) ║
|
|
277
|
+
║ - Documentation (CLAUDE.md, README.md, etc.) ║
|
|
278
|
+
║ - Shell scripts (sync.sh, etc.) ║
|
|
279
|
+
║ ║
|
|
280
|
+
║ WRONG (actual violation): ║
|
|
281
|
+
║ Orchestrator → Edit(CLAUDE.md.en) → Edit(CLAUDE.md.ko) ║
|
|
282
|
+
║ Orchestrator → Edit(sync-core.ts) → Bash(rm -rf pipelines/) ║
|
|
283
|
+
║ (Orchestrator edited 6+ files directly across 2 projects) ║
|
|
284
|
+
║ ║
|
|
285
|
+
║ CORRECT: ║
|
|
286
|
+
║ Orchestrator → Task(general-purpose) → edits config files ║
|
|
287
|
+
║ Orchestrator → Task(lang-typescript-expert) → edits .ts files ║
|
|
288
|
+
║ ║
|
|
289
|
+
║ Only READ operations (Read, Glob, Grep) may be used directly ║
|
|
290
|
+
║ by the orchestrator. All mutations go through subagents. ║
|
|
291
|
+
╚══════════════════════════════════════════════════════════════════╝
|
|
292
|
+
```
|
|
293
|
+
|
|
266
294
|
## CRITICAL: Use Specialized Agents for Documentation & Spec Writing
|
|
267
295
|
|
|
268
296
|
```
|
|
@@ -398,6 +426,39 @@ CORRECT:
|
|
|
398
426
|
╚══════════════════════════════════════════════════════════════════╝
|
|
399
427
|
```
|
|
400
428
|
|
|
429
|
+
## Experimental: Agent Teams (Research Preview)
|
|
430
|
+
|
|
431
|
+
```
|
|
432
|
+
╔══════════════════════════════════════════════════════════════════╗
|
|
433
|
+
║ AGENT TEAMS (EXPERIMENTAL - NOT FOR PRODUCTION USE) ║
|
|
434
|
+
║ ║
|
|
435
|
+
║ Claude Code provides native Agent Teams feature: ║
|
|
436
|
+
║ CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 ║
|
|
437
|
+
║ ║
|
|
438
|
+
║ Agent Teams enable: ║
|
|
439
|
+
║ - Peer-to-peer messaging between agents ║
|
|
440
|
+
║ - Shared task lists ║
|
|
441
|
+
║ - Complex collaborative workflows ║
|
|
442
|
+
║ ║
|
|
443
|
+
║ CURRENT STATUS: ║
|
|
444
|
+
║ - Research preview (NOT production ready) ║
|
|
445
|
+
║ - Higher cost than Task tool approach ║
|
|
446
|
+
║ - This system uses Task tool + routing skills (STABLE) ║
|
|
447
|
+
║ ║
|
|
448
|
+
║ WHEN TO CONSIDER Agent Teams: ║
|
|
449
|
+
║ - Complex multi-agent collaboration needed ║
|
|
450
|
+
║ - Agents need to communicate with each other ║
|
|
451
|
+
║ - Shared state management required ║
|
|
452
|
+
║ ║
|
|
453
|
+
║ WHEN TO KEEP Task tool (DEFAULT): ║
|
|
454
|
+
║ - Focused, independent sub-tasks ║
|
|
455
|
+
║ - Cost-sensitive operations ║
|
|
456
|
+
║ - Predictable execution flow ║
|
|
457
|
+
║ ║
|
|
458
|
+
║ See: GitHub Issue #5 for migration tracking ║
|
|
459
|
+
╚══════════════════════════════════════════════════════════════════╝
|
|
460
|
+
```
|
|
461
|
+
|
|
401
462
|
## Enforcement
|
|
402
463
|
|
|
403
464
|
```
|
|
@@ -8,6 +8,26 @@
|
|
|
8
8
|
|
|
9
9
|
**When 2 or more tasks are INDEPENDENT, they MUST be executed in parallel.**
|
|
10
10
|
|
|
11
|
+
```
|
|
12
|
+
╔══════════════════════════════════════════════════════════════════╗
|
|
13
|
+
║ ⚠️ ABSOLUTE RULE: 2+ INDEPENDENT FILES = PARALLEL ║
|
|
14
|
+
║ ║
|
|
15
|
+
║ If you are about to Write/Edit 2 or more independent files: ║
|
|
16
|
+
║ → STOP ║
|
|
17
|
+
║ → Use Task tool to spawn parallel agents ║
|
|
18
|
+
║ → Each agent handles a subset of files ║
|
|
19
|
+
║ ║
|
|
20
|
+
║ NO EXCEPTIONS for: ║
|
|
21
|
+
║ - Project scaffolding (package.json, tsconfig, src/*.ts) ║
|
|
22
|
+
║ - Multiple module creation ║
|
|
23
|
+
║ - Batch file updates ║
|
|
24
|
+
║ - Any multi-file operation ║
|
|
25
|
+
║ ║
|
|
26
|
+
║ VIOLATION = Using Write/Edit 2+ times in sequence ║
|
|
27
|
+
║ when files are independent ║
|
|
28
|
+
╚══════════════════════════════════════════════════════════════════╝
|
|
29
|
+
```
|
|
30
|
+
|
|
11
31
|
```
|
|
12
32
|
Detection criteria for parallel execution:
|
|
13
33
|
- Tasks don't share mutable state
|
|
@@ -65,6 +85,15 @@ Failure to parallelize independent tasks = Rule violation = Must be corrected.
|
|
|
65
85
|
Task(agent3 → file3.kt) │
|
|
66
86
|
Task(agent4 → file4.kt) ┘
|
|
67
87
|
|
|
88
|
+
❌ WRONG: Project scaffolding sequentially
|
|
89
|
+
Write(package.json) → Write(tsconfig.json) → Write(src/index.ts) → ...
|
|
90
|
+
|
|
91
|
+
✓ CORRECT: Parallel scaffolding
|
|
92
|
+
Task(agent1 → "Create package.json, tsconfig.json") ┐
|
|
93
|
+
Task(agent2 → "Create src/cli.ts, src/index.ts") ├─ Parallel
|
|
94
|
+
Task(agent3 → "Create src/analyzer/*.ts") │
|
|
95
|
+
Task(agent4 → "Create src/converter/*.ts") ┘
|
|
96
|
+
|
|
68
97
|
❌ WRONG: Secretary doing all the work
|
|
69
98
|
Secretary writes domain/, usecase/, infrastructure/ sequentially
|
|
70
99
|
|
|
@@ -178,7 +207,44 @@ requirements:
|
|
|
178
207
|
- Each instance has isolated context
|
|
179
208
|
```
|
|
180
209
|
|
|
181
|
-
### 4.
|
|
210
|
+
### 4. Subagent Visibility (MANDATORY)
|
|
211
|
+
|
|
212
|
+
```
|
|
213
|
+
╔══════════════════════════════════════════════════════════════════╗
|
|
214
|
+
║ TASK TOOL MUST USE SPECIFIC subagent_type (NOT general-purpose) ║
|
|
215
|
+
║ ║
|
|
216
|
+
║ When a specialized agent exists for the task: ║
|
|
217
|
+
║ → MUST use that agent's subagent_type ║
|
|
218
|
+
║ → DO NOT use "general-purpose" as a catch-all ║
|
|
219
|
+
║ ║
|
|
220
|
+
║ The HUD hook displays: [Spawn] {subagent_type}:{model} | {desc}║
|
|
221
|
+
║ Using "general-purpose" makes all spawns look identical. ║
|
|
222
|
+
║ ║
|
|
223
|
+
║ WRONG: ║
|
|
224
|
+
║ Task(subagent_type: "general-purpose", desc: "Update agents") ║
|
|
225
|
+
║ Task(subagent_type: "general-purpose", desc: "Update agents") ║
|
|
226
|
+
║ → HUD shows: [Spawn] general-purpose:sonnet | Update agents ║
|
|
227
|
+
║ → HUD shows: [Spawn] general-purpose:sonnet | Update agents ║
|
|
228
|
+
║ → User cannot distinguish which is which ║
|
|
229
|
+
║ ║
|
|
230
|
+
║ CORRECT: ║
|
|
231
|
+
║ Task(subagent_type: "mgr-creator", desc: "Create Go agent") ║
|
|
232
|
+
║ Task(subagent_type: "lang-golang-expert", desc: "Review code")║
|
|
233
|
+
║ → HUD shows: [Spawn] mgr-creator:sonnet | Create Go agent ║
|
|
234
|
+
║ → HUD shows: [Spawn] lang-golang-expert:sonnet | Review code ║
|
|
235
|
+
║ ║
|
|
236
|
+
║ When NO specialized agent exists (truly generic work): ║
|
|
237
|
+
║ → Use "general-purpose" but with UNIQUE descriptions ║
|
|
238
|
+
║ → Description MUST identify the specific batch/scope ║
|
|
239
|
+
║ ║
|
|
240
|
+
║ Task(subagent_type: "general-purpose", ║
|
|
241
|
+
║ desc: "batch1: lang-* agents") ║
|
|
242
|
+
║ Task(subagent_type: "general-purpose", ║
|
|
243
|
+
║ desc: "batch2: be-* fe-* agents") ║
|
|
244
|
+
╚══════════════════════════════════════════════════════════════════╝
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
### 5. Model Specification (RECOMMENDED)
|
|
182
248
|
|
|
183
249
|
```
|
|
184
250
|
╔══════════════════════════════════════════════════════════════════╗
|
|
@@ -345,7 +411,7 @@ requirements:
|
|
|
345
411
|
|
|
346
412
|
## Display Format
|
|
347
413
|
|
|
348
|
-
When parallel execution occurs, MUST display `{
|
|
414
|
+
When parallel execution occurs, MUST display `Task({subagent_type}):{model}` format:
|
|
349
415
|
|
|
350
416
|
```
|
|
351
417
|
┌─ Agent: secretary (orchestrator)
|
|
@@ -353,17 +419,17 @@ When parallel execution occurs, MUST display `{task-name}:{model}` format:
|
|
|
353
419
|
|
|
354
420
|
[Parallel] Spawning 4 instances...
|
|
355
421
|
|
|
356
|
-
[Instance 1] mgr-creator:sonnet → lang-golang-expert
|
|
357
|
-
[Instance 2] mgr-creator:sonnet → lang-python-expert
|
|
358
|
-
[Instance 3] mgr-creator:sonnet → lang-rust-expert
|
|
359
|
-
[Instance 4] mgr-creator:sonnet → lang-typescript-expert
|
|
422
|
+
[Instance 1] Task(mgr-creator):sonnet → lang-golang-expert
|
|
423
|
+
[Instance 2] Task(mgr-creator):sonnet → lang-python-expert
|
|
424
|
+
[Instance 3] Task(mgr-creator):sonnet → lang-rust-expert
|
|
425
|
+
[Instance 4] Task(mgr-creator):sonnet → lang-typescript-expert
|
|
360
426
|
|
|
361
427
|
[Progress] ████████░░░░ 2/4
|
|
362
428
|
|
|
363
|
-
[Instance 1] mgr-creator:sonnet ✓ lang-golang-expert created
|
|
364
|
-
[Instance 2] mgr-creator:sonnet ✓ lang-python-expert created
|
|
365
|
-
[Instance 3] mgr-creator:sonnet ✓ lang-rust-expert created
|
|
366
|
-
[Instance 4] mgr-creator:sonnet ✓ lang-typescript-expert created
|
|
429
|
+
[Instance 1] Task(mgr-creator):sonnet ✓ lang-golang-expert created
|
|
430
|
+
[Instance 2] Task(mgr-creator):sonnet ✓ lang-python-expert created
|
|
431
|
+
[Instance 3] Task(mgr-creator):sonnet ✓ lang-rust-expert created
|
|
432
|
+
[Instance 4] Task(mgr-creator):sonnet ✓ lang-typescript-expert created
|
|
367
433
|
|
|
368
434
|
[Summary] 4/4 tasks completed successfully
|
|
369
435
|
```
|
|
@@ -376,15 +442,20 @@ When parallel execution occurs, MUST display `{task-name}:{model}` format:
|
|
|
376
442
|
║ ║
|
|
377
443
|
║ When announcing parallel agents, MUST show: ║
|
|
378
444
|
║ ║
|
|
379
|
-
║ {
|
|
445
|
+
║ Task({subagent_type}):{model} ║
|
|
380
446
|
║ ║
|
|
381
447
|
║ Examples: ║
|
|
382
|
-
║ [Instance 1]
|
|
383
|
-
║ [Instance 2]
|
|
384
|
-
║ [Instance 3]
|
|
448
|
+
║ [Instance 1] Task(general-purpose):sonnet → R006 업데이트 ║
|
|
449
|
+
║ [Instance 2] Task(lang-golang-expert):sonnet → Go 코드 리뷰 ║
|
|
450
|
+
║ [Instance 3] Task(Explore):haiku → 코드베이스 탐색 ║
|
|
451
|
+
║ [Instance 4] Task(mgr-gitnerd):sonnet → git commit ║
|
|
452
|
+
║ ║
|
|
453
|
+
║ The subagent_type MUST match the Task tool's subagent_type ║
|
|
454
|
+
║ parameter. Custom names are NOT allowed. ║
|
|
385
455
|
║ ║
|
|
386
456
|
║ This allows users to: ║
|
|
387
457
|
║ - See which model is used for each task ║
|
|
458
|
+
║ - See the exact subagent_type used ║
|
|
388
459
|
║ - Understand cost implications ║
|
|
389
460
|
║ - Debug model selection issues ║
|
|
390
461
|
╚══════════════════════════════════════════════════════════════════╝
|
|
@@ -2,26 +2,42 @@
|
|
|
2
2
|
|
|
3
3
|
> **Priority**: MUST - ENFORCED after any structural changes
|
|
4
4
|
> **ID**: R017
|
|
5
|
-
> **Violation**: Committing without verification = Rule violation
|
|
5
|
+
> **Violation**: Committing or pushing without verification = Rule violation
|
|
6
6
|
|
|
7
7
|
## CRITICAL
|
|
8
8
|
|
|
9
|
-
**After modifying agents, skills, or guides, you MUST run the full verification process before committing.**
|
|
9
|
+
**After modifying agents, skills, or guides, you MUST run the full verification process before committing AND pushing.**
|
|
10
10
|
|
|
11
11
|
```
|
|
12
12
|
╔══════════════════════════════════════════════════════════════════╗
|
|
13
13
|
║ ⚠️ ABSOLUTE PROHIBITION ║
|
|
14
14
|
║ ║
|
|
15
|
-
║ DO NOT even ASK "커밋하시겠습니까?"
|
|
16
|
-
║ until mgr-sauron:watch has been
|
|
15
|
+
║ DO NOT even ASK "커밋하시겠습니까?" or "푸시하시겠습니까?" ║
|
|
16
|
+
║ after structural changes until mgr-sauron:watch has been ║
|
|
17
|
+
║ executed and passed. ║
|
|
17
18
|
║ ║
|
|
18
19
|
║ WRONG: ║
|
|
19
20
|
║ [Make changes] → "커밋하시겠습니까?" ║
|
|
21
|
+
║ [Commit done] → "푸시하시겠습니까?" ║
|
|
20
22
|
║ ║
|
|
21
23
|
║ CORRECT: ║
|
|
22
|
-
║ [Make changes] → mgr-sauron:watch → [All pass] →
|
|
24
|
+
║ [Make changes] → mgr-sauron:watch → [All pass] → commit → push ║
|
|
23
25
|
║ ║
|
|
24
|
-
║ Asking to commit before verification = Rule violation
|
|
26
|
+
║ Asking to commit/push before verification = Rule violation ║
|
|
27
|
+
╚══════════════════════════════════════════════════════════════════╝
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
╔══════════════════════════════════════════════════════════════════╗
|
|
32
|
+
║ ⚠️ PUSH REQUIRES SAURON VERIFICATION ║
|
|
33
|
+
║ ║
|
|
34
|
+
║ EVERY git push in this project MUST be preceded by: ║
|
|
35
|
+
║ mgr-sauron:watch → [All pass] → git push ║
|
|
36
|
+
║ ║
|
|
37
|
+
║ This applies to ALL pushes, not just structural changes. ║
|
|
38
|
+
║ Sauron verification is the quality gate for this repository. ║
|
|
39
|
+
║ ║
|
|
40
|
+
║ NO EXCEPTIONS. NO SHORTCUTS. ║
|
|
25
41
|
╚══════════════════════════════════════════════════════════════════╝
|
|
26
42
|
```
|
|
27
43
|
|
|
@@ -33,6 +49,7 @@
|
|
|
33
49
|
║ - mgr-supplier:audit ║
|
|
34
50
|
║ - mgr-sync-checker:check ║
|
|
35
51
|
║ - mgr-updater:docs ║
|
|
52
|
+
║ - mgr-claude-code-bible:verify ║
|
|
36
53
|
║ ║
|
|
37
54
|
║ Phase 2: Deep Review (3 rounds) ║
|
|
38
55
|
║ - Workflow alignment ║
|
|
@@ -43,6 +60,9 @@
|
|
|
43
60
|
║ ║
|
|
44
61
|
║ Phase 4: Commit via mgr-gitnerd ║
|
|
45
62
|
║ ║
|
|
63
|
+
║ Phase 5: Push via mgr-gitnerd ║
|
|
64
|
+
║ - ONLY after sauron verification passes ║
|
|
65
|
+
║ ║
|
|
46
66
|
║ Skipping ANY phase = Rule violation ║
|
|
47
67
|
╚══════════════════════════════════════════════════════════════════╝
|
|
48
68
|
```
|
|
@@ -71,6 +91,8 @@ Run manager agents 5 times to catch all issues:
|
|
|
71
91
|
□ All agent counts match (CLAUDE.md, actual .md files in .claude/agents/)
|
|
72
92
|
□ All agent frontmatter valid (required fields present)
|
|
73
93
|
□ All skill references in agents exist in .claude/skills/
|
|
94
|
+
□ All memory field values are valid (user | project | local)
|
|
95
|
+
□ Memory distribution matches CLAUDE.md (24 project + 3 user + 7 none)
|
|
74
96
|
□ All routing skill patterns updated
|
|
75
97
|
```
|
|
76
98
|
|
|
@@ -91,6 +113,7 @@ Run manager agents 5 times to catch all issues:
|
|
|
91
113
|
□ No orphaned agents (not referenced by any routing skill)
|
|
92
114
|
□ No circular references
|
|
93
115
|
□ All skill references in agent frontmatter are valid
|
|
116
|
+
□ All agent memory fields use valid scope values
|
|
94
117
|
```
|
|
95
118
|
|
|
96
119
|
### Deep Round 3: Philosophy Compliance
|
|
@@ -111,6 +134,7 @@ Phase 1: Manager Verification (5x)
|
|
|
111
134
|
□ Round 3: mgr-supplier:audit (re-verify)
|
|
112
135
|
□ Round 4: mgr-sync-checker:check + mgr-updater:docs
|
|
113
136
|
□ Round 5: Final count verification
|
|
137
|
+
□ mgr-claude-code-bible:verify (official spec compliance)
|
|
114
138
|
|
|
115
139
|
Phase 2: Deep Review (3x)
|
|
116
140
|
□ Round 1: Workflow alignment
|
|
@@ -125,6 +149,11 @@ Phase 3: Fix Issues
|
|
|
125
149
|
Phase 4: Commit
|
|
126
150
|
□ Delegate to mgr-gitnerd
|
|
127
151
|
□ Meaningful commit message
|
|
152
|
+
|
|
153
|
+
Phase 5: Push
|
|
154
|
+
□ mgr-sauron:watch passed (MANDATORY)
|
|
155
|
+
□ Delegate push to mgr-gitnerd
|
|
156
|
+
□ Verify push succeeded
|
|
128
157
|
```
|
|
129
158
|
|
|
130
159
|
## When to Run Full Verification
|
|
@@ -173,10 +202,16 @@ Content Change Made
|
|
|
173
202
|
▼
|
|
174
203
|
┌───────────────────────────────┐
|
|
175
204
|
│ Phase 4: Commit via mgr-gitnerd │
|
|
205
|
+
└───────────────┬───────────────┘
|
|
206
|
+
│
|
|
207
|
+
▼
|
|
208
|
+
┌───────────────────────────────┐
|
|
209
|
+
│ Phase 5: Push via mgr-gitnerd │
|
|
210
|
+
│ (ONLY after sauron passes) │
|
|
176
211
|
└───────────────────────────────┘
|
|
177
212
|
```
|
|
178
213
|
|
|
179
|
-
## Self-Check Before Commit
|
|
214
|
+
## Self-Check Before Commit and Push
|
|
180
215
|
|
|
181
216
|
```
|
|
182
217
|
╔══════════════════════════════════════════════════════════════════╗
|
|
@@ -190,6 +225,18 @@ Content Change Made
|
|
|
190
225
|
║ ║
|
|
191
226
|
║ If NO to ANY → DO NOT COMMIT ║
|
|
192
227
|
╚══════════════════════════════════════════════════════════════════╝
|
|
228
|
+
|
|
229
|
+
╔══════════════════════════════════════════════════════════════════╗
|
|
230
|
+
║ BEFORE PUSHING, ASK YOURSELF: ║
|
|
231
|
+
║ ║
|
|
232
|
+
║ 1. Did mgr-sauron:watch complete successfully? ║
|
|
233
|
+
║ 2. Were ALL issues from sauron verification fixed? ║
|
|
234
|
+
║ 3. Am I delegating to mgr-gitnerd for the push? ║
|
|
235
|
+
║ ║
|
|
236
|
+
║ If NO to ANY → DO NOT PUSH ║
|
|
237
|
+
║ ║
|
|
238
|
+
║ SAURON VERIFICATION IS MANDATORY FOR ALL PUSHES. ║
|
|
239
|
+
╚══════════════════════════════════════════════════════════════════╝
|
|
193
240
|
```
|
|
194
241
|
|
|
195
242
|
## Quick Verification Commands
|
|
@@ -215,6 +262,14 @@ done
|
|
|
215
262
|
grep -c "agent_patterns:" .claude/skills/secretary-routing/SKILL.md
|
|
216
263
|
grep -c "agent_patterns:" .claude/skills/dev-lead-routing/SKILL.md
|
|
217
264
|
grep -c "agent_patterns:" .claude/skills/qa-lead-routing/SKILL.md
|
|
265
|
+
|
|
266
|
+
# Memory field validation
|
|
267
|
+
for f in .claude/agents/*.md; do
|
|
268
|
+
mem=$(grep "^memory:" "$f" | awk '{print $2}')
|
|
269
|
+
if [ -n "$mem" ] && [ "$mem" != "project" ] && [ "$mem" != "user" ] && [ "$mem" != "local" ]; then
|
|
270
|
+
echo "INVALID MEMORY SCOPE in $f: $mem"
|
|
271
|
+
fi
|
|
272
|
+
done
|
|
218
273
|
```
|
|
219
274
|
|
|
220
275
|
## Integration with Other Rules
|
|
@@ -156,6 +156,29 @@ R008 extends R007 for tool operations:
|
|
|
156
156
|
[Done] Agent created successfully
|
|
157
157
|
```
|
|
158
158
|
|
|
159
|
+
## Task Tool Display Format
|
|
160
|
+
|
|
161
|
+
When spawning subagents via the Task tool, the display MUST use the actual `subagent_type` parameter:
|
|
162
|
+
|
|
163
|
+
```
|
|
164
|
+
Task(subagent_type):model → description
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Examples
|
|
168
|
+
|
|
169
|
+
```
|
|
170
|
+
[secretary][opus] → Spawning parallel agents:
|
|
171
|
+
[1] Task(lang-golang-expert):sonnet → Go code review
|
|
172
|
+
[2] Task(lang-python-expert):sonnet → Python code review
|
|
173
|
+
[3] Task(general-purpose):haiku → File validation
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Rules
|
|
177
|
+
|
|
178
|
+
- `subagent_type` MUST match the actual Task tool parameter value
|
|
179
|
+
- Custom/invented names are NOT allowed (e.g., `code-review:sonnet` is WRONG)
|
|
180
|
+
- Model specification shows cost/performance intent
|
|
181
|
+
|
|
159
182
|
## Benefits
|
|
160
183
|
|
|
161
184
|
1. **Debugging**: Know which agent performed which operation
|
|
@@ -46,10 +46,10 @@ Display real-time status information during agent operations for improved visibi
|
|
|
46
46
|
─── [Agent] secretary | [Progress] 0/4 | [Parallel] 4 ───
|
|
47
47
|
|
|
48
48
|
Instances:
|
|
49
|
-
[1]
|
|
50
|
-
[2]
|
|
51
|
-
[3]
|
|
52
|
-
[4]
|
|
49
|
+
[1] Task(general-purpose):sonnet → README update
|
|
50
|
+
[2] Task(lang-golang-expert):haiku → Code review
|
|
51
|
+
[3] Task(Explore):opus → Architecture analysis
|
|
52
|
+
[4] Task(general-purpose):haiku → Validation
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
### Completion
|
|
@@ -85,12 +85,28 @@ echo "─── [Agent] $AGENT | [Progress] $PROGRESS ───" >&2
|
|
|
85
85
|
|
|
86
86
|
## Hook Usage
|
|
87
87
|
|
|
88
|
-
The HUD statusline hook
|
|
88
|
+
The HUD statusline is implemented as an inline hook in `.claude/hooks/hooks.json` (PreToolUse → Task matcher).
|
|
89
89
|
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
The hook automatically displays subagent details when the Task tool is used:
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
─── [Spawn] {subagent_type}:{model} | {description} ───
|
|
94
|
+
─── [Resume] {subagent_type}:{model} | {description} ───
|
|
95
|
+
```
|
|
92
96
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
97
|
+
### Examples
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
─── [Spawn] mgr-gitnerd:sonnet | Commit and push ───
|
|
101
|
+
─── [Spawn] lang-golang-expert:sonnet | Review Go code ───
|
|
102
|
+
─── [Spawn] mgr-creator:sonnet | Create new agent ───
|
|
103
|
+
─── [Resume] mgr-gitnerd:sonnet | Continue push ───
|
|
96
104
|
```
|
|
105
|
+
|
|
106
|
+
### Fields Displayed
|
|
107
|
+
|
|
108
|
+
| Field | Source | Purpose |
|
|
109
|
+
|-------|--------|---------|
|
|
110
|
+
| `subagent_type` | Task tool parameter | Which agent is running |
|
|
111
|
+
| `model` | Task tool parameter | Which model (opus/sonnet/haiku) |
|
|
112
|
+
| `description` | Task tool parameter | What the agent is doing (max 40 chars) |
|