oh-my-customcode 0.9.2 → 0.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/README.md +25 -30
  2. package/dist/cli/index.js +1315 -568
  3. package/dist/index.js +234 -17
  4. package/package.json +1 -1
  5. package/templates/.claude/agents/arch-documenter.md +7 -71
  6. package/templates/.claude/agents/arch-speckit-agent.md +21 -108
  7. package/templates/.claude/agents/be-express-expert.md +8 -58
  8. package/templates/.claude/agents/be-nestjs-expert.md +6 -38
  9. package/templates/.claude/agents/be-springboot-expert.md +11 -56
  10. package/templates/.claude/agents/db-postgres-expert.md +10 -80
  11. package/templates/.claude/agents/db-redis-expert.md +10 -75
  12. package/templates/.claude/agents/db-supabase-expert.md +12 -48
  13. package/templates/.claude/agents/de-airflow-expert.md +8 -45
  14. package/templates/.claude/agents/de-dbt-expert.md +8 -46
  15. package/templates/.claude/agents/de-kafka-expert.md +10 -10
  16. package/templates/.claude/agents/de-pipeline-expert.md +9 -69
  17. package/templates/.claude/agents/de-snowflake-expert.md +9 -62
  18. package/templates/.claude/agents/de-spark-expert.md +10 -54
  19. package/templates/.claude/agents/fe-svelte-agent.md +5 -41
  20. package/templates/.claude/agents/fe-vercel-agent.md +9 -41
  21. package/templates/.claude/agents/fe-vuejs-agent.md +7 -42
  22. package/templates/.claude/agents/lang-java21-expert.md +11 -37
  23. package/templates/.claude/agents/mgr-claude-code-bible.md +22 -207
  24. package/templates/.claude/agents/mgr-creator.md +7 -88
  25. package/templates/.claude/agents/mgr-gitnerd.md +8 -76
  26. package/templates/.claude/agents/mgr-sauron.md +27 -20
  27. package/templates/.claude/agents/mgr-supplier.md +11 -96
  28. package/templates/.claude/agents/mgr-sync-checker.md +9 -70
  29. package/templates/.claude/agents/mgr-updater.md +9 -79
  30. package/templates/.claude/agents/qa-engineer.md +8 -72
  31. package/templates/.claude/agents/qa-planner.md +2 -3
  32. package/templates/.claude/agents/qa-writer.md +6 -76
  33. package/templates/.claude/agents/sys-memory-keeper.md +13 -87
  34. package/templates/.claude/agents/sys-naggy.md +9 -62
  35. package/templates/.claude/agents/tool-bun-expert.md +7 -52
  36. package/templates/.claude/agents/tool-npm-expert.md +6 -64
  37. package/templates/.claude/agents/tool-optimizer.md +7 -60
  38. package/templates/.claude/rules/MAY-optimization.md +16 -80
  39. package/templates/.claude/rules/MUST-agent-design.md +29 -134
  40. package/templates/.claude/rules/MUST-agent-identification.md +9 -88
  41. package/templates/.claude/rules/MUST-continuous-improvement.md +10 -117
  42. package/templates/.claude/rules/MUST-intent-transparency.md +14 -171
  43. package/templates/.claude/rules/MUST-language-policy.md +11 -46
  44. package/templates/.claude/rules/MUST-orchestrator-coordination.md +82 -425
  45. package/templates/.claude/rules/MUST-parallel-execution.md +33 -405
  46. package/templates/.claude/rules/MUST-permissions.md +14 -68
  47. package/templates/.claude/rules/MUST-safety.md +11 -57
  48. package/templates/.claude/rules/MUST-sync-verification.md +49 -205
  49. package/templates/.claude/rules/MUST-tool-identification.md +21 -134
  50. package/templates/.claude/rules/SHOULD-agent-teams.md +22 -166
  51. package/templates/.claude/rules/SHOULD-ecomode.md +15 -123
  52. package/templates/.claude/rules/SHOULD-error-handling.md +19 -88
  53. package/templates/.claude/rules/SHOULD-hud-statusline.md +9 -89
  54. package/templates/.claude/rules/SHOULD-interaction.md +18 -87
  55. package/templates/.claude/rules/SHOULD-memory-integration.md +25 -118
  56. package/templates/.claude/skills/dev-lead-routing/SKILL.md +70 -243
  57. package/templates/.claude/skills/springboot-best-practices/SKILL.md +180 -319
  58. package/templates/.codex/agents/arch-documenter.md +7 -71
  59. package/templates/.codex/agents/arch-speckit-agent.md +21 -108
  60. package/templates/.codex/agents/be-express-expert.md +8 -58
  61. package/templates/.codex/agents/be-nestjs-expert.md +6 -38
  62. package/templates/.codex/agents/be-springboot-expert.md +11 -56
  63. package/templates/.codex/agents/db-postgres-expert.md +10 -80
  64. package/templates/.codex/agents/db-redis-expert.md +10 -75
  65. package/templates/.codex/agents/db-supabase-expert.md +12 -48
  66. package/templates/.codex/agents/de-airflow-expert.md +8 -45
  67. package/templates/.codex/agents/de-dbt-expert.md +8 -46
  68. package/templates/.codex/agents/de-kafka-expert.md +10 -10
  69. package/templates/.codex/agents/de-pipeline-expert.md +9 -69
  70. package/templates/.codex/agents/de-snowflake-expert.md +9 -62
  71. package/templates/.codex/agents/de-spark-expert.md +10 -54
  72. package/templates/.codex/agents/fe-svelte-agent.md +5 -41
  73. package/templates/.codex/agents/fe-vercel-agent.md +9 -41
  74. package/templates/.codex/agents/fe-vuejs-agent.md +7 -42
  75. package/templates/.codex/agents/infra-aws-expert.md +1 -1
  76. package/templates/.codex/agents/infra-docker-expert.md +1 -1
  77. package/templates/.codex/agents/lang-java21-expert.md +11 -37
  78. package/templates/.codex/agents/mgr-claude-code-bible.md +25 -210
  79. package/templates/.codex/agents/mgr-creator.md +7 -88
  80. package/templates/.codex/agents/mgr-gitnerd.md +8 -76
  81. package/templates/.codex/agents/mgr-sauron.md +30 -23
  82. package/templates/.codex/agents/mgr-supplier.md +11 -96
  83. package/templates/.codex/agents/mgr-sync-checker.md +12 -73
  84. package/templates/.codex/agents/mgr-updater.md +9 -79
  85. package/templates/.codex/agents/qa-engineer.md +8 -72
  86. package/templates/.codex/agents/qa-planner.md +2 -3
  87. package/templates/.codex/agents/qa-writer.md +6 -76
  88. package/templates/.codex/agents/sys-memory-keeper.md +13 -87
  89. package/templates/.codex/agents/sys-naggy.md +9 -62
  90. package/templates/.codex/agents/tool-bun-expert.md +7 -52
  91. package/templates/.codex/agents/tool-npm-expert.md +6 -64
  92. package/templates/.codex/agents/tool-optimizer.md +7 -60
  93. package/templates/.codex/rules/MAY-optimization.md +16 -80
  94. package/templates/.codex/rules/MUST-agent-design.md +29 -134
  95. package/templates/.codex/rules/MUST-agent-identification.md +9 -88
  96. package/templates/.codex/rules/MUST-continuous-improvement.md +10 -117
  97. package/templates/.codex/rules/MUST-intent-transparency.md +14 -171
  98. package/templates/.codex/rules/MUST-language-policy.md +11 -46
  99. package/templates/.codex/rules/MUST-orchestrator-coordination.md +82 -425
  100. package/templates/.codex/rules/MUST-parallel-execution.md +33 -405
  101. package/templates/.codex/rules/MUST-permissions.md +14 -68
  102. package/templates/.codex/rules/MUST-safety.md +11 -57
  103. package/templates/.codex/rules/MUST-sync-verification.md +58 -214
  104. package/templates/.codex/rules/MUST-tool-identification.md +22 -135
  105. package/templates/.codex/rules/SHOULD-agent-teams.md +22 -166
  106. package/templates/.codex/rules/SHOULD-ecomode.md +15 -123
  107. package/templates/.codex/rules/SHOULD-error-handling.md +19 -88
  108. package/templates/.codex/rules/SHOULD-hud-statusline.md +9 -89
  109. package/templates/.codex/rules/SHOULD-interaction.md +18 -87
  110. package/templates/.codex/rules/SHOULD-memory-integration.md +25 -118
  111. package/templates/.codex/skills/dev-lead-routing/SKILL.md +70 -243
  112. package/templates/.codex/skills/springboot-best-practices/SKILL.md +180 -319
@@ -1,215 +1,38 @@
1
1
  # [MUST] Sync Verification Rules
2
2
 
3
- > **Priority**: MUST - ENFORCED after any structural changes
4
- > **ID**: R017
5
- > **Violation**: Committing or pushing without verification = Rule violation
3
+ > **Priority**: MUST - ENFORCED | **ID**: R017
6
4
 
7
- ## CRITICAL
5
+ ## Core Rule
8
6
 
9
- **After modifying agents, skills, or guides, you MUST run the full verification process before committing AND pushing.**
7
+ After modifying agents, skills, or guides: run full verification before committing AND pushing. Never ask to commit/push before `mgr-sauron:watch` passes.
10
8
 
11
- ```
12
- ╔══════════════════════════════════════════════════════════════════╗
13
- ║ ⚠️ ABSOLUTE PROHIBITION ║
14
- ║ ║
15
- ║ DO NOT even ASK "커밋하시겠습니까?" or "푸시하시겠습니까?" ║
16
- ║ after structural changes until mgr-sauron:watch has been ║
17
- ║ executed and passed. ║
18
- ║ ║
19
- ║ WRONG: ║
20
- ║ [Make changes] → "커밋하시겠습니까?" ║
21
- ║ [Commit done] → "푸시하시겠습니까?" ║
22
- ║ ║
23
- ║ CORRECT: ║
24
- ║ [Make changes] → mgr-sauron:watch → [All pass] → commit → push ║
25
- ║ ║
26
- ║ Asking to commit/push before verification = Rule violation ║
27
- ╚══════════════════════════════════════════════════════════════════╝
28
- ```
9
+ Every `git push` requires: `mgr-sauron:watch` → all pass → `git push`
29
10
 
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. ║
41
- ╚══════════════════════════════════════════════════════════════════╝
42
- ```
11
+ ## Verification Phases
43
12
 
44
- ```
45
- ╔══════════════════════════════════════════════════════════════════╗
46
- ║ MANDATORY VERIFICATION PROCESS: ║
47
- ║ ║
48
- ║ Phase 1: Manager Agent Verification (5 rounds) ║
49
- ║ - mgr-supplier:audit ║
50
- ║ - mgr-sync-checker:check ║
51
- ║ - mgr-updater:docs ║
52
- ║ - mgr-claude-code-bible:verify ║
53
- ║ ║
54
- ║ Phase 2: Deep Review (3 rounds) ║
55
- ║ - Workflow alignment ║
56
- ║ - Reference verification ║
57
- ║ - Philosophy compliance ║
58
- ║ ║
59
- ║ Phase 3: Fix all issues ║
60
- ║ ║
61
- ║ Phase 4: Commit via mgr-gitnerd ║
62
- ║ ║
63
- ║ Phase 5: Push via mgr-gitnerd ║
64
- ║ - ONLY after sauron verification passes ║
65
- ║ ║
66
- ║ Skipping ANY phase = Rule violation ║
67
- ╚══════════════════════════════════════════════════════════════════╝
68
- ```
13
+ ### Phase 1: Manager Verification (5 rounds)
69
14
 
70
- ## Phase 1: Manager Agent Verification (5 Rounds)
15
+ | Round | Actions |
16
+ |-------|---------|
17
+ | 1-2 | mgr-supplier:audit, mgr-sync-checker:check, fix issues |
18
+ | 3-4 | Re-verify + mgr-updater:docs, fix remaining |
19
+ | 5 | Final: all counts match, frontmatter valid, skill refs exist, memory scopes valid, routing patterns updated |
71
20
 
72
- Run manager agents 5 times to catch all issues:
21
+ Also run: mgr-claude-code-bible:verify (official spec compliance)
73
22
 
74
- ### Round 1-2: Basic Sync
75
- ```
76
- □ mgr-supplier:audit - Check all agent dependencies
77
- □ mgr-sync-checker:check - Verify registry synchronization
78
- □ Fix any issues found
79
- ```
23
+ ### Phase 2: Deep Review (3 rounds)
80
24
 
81
- ### Round 3-4: Deep Sync
82
- ```
83
- mgr-supplier:audit - Re-verify after fixes
84
- mgr-sync-checker:check - Re-verify registries
85
- mgr-updater:docs - Check documentation sync
86
- □ Fix any remaining issues
87
- ```
25
+ | Round | Focus |
26
+ |-------|-------|
27
+ | 1 | Workflow alignment: routing skills have complete agent mappings |
28
+ | 2 | References: no orphans, no circular refs, valid skill/memory refs |
29
+ | 3 | Philosophy: R006 separation, R009 parallel, R010 delegation, R007/R008 identification |
88
30
 
89
- ### Round 5: Final Verification
90
- ```
91
- □ All agent counts match (CLAUDE.md, actual .md files in .claude/agents/)
92
- □ All agent frontmatter valid (required fields present)
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)
96
- □ All routing skill patterns updated
97
- ```
98
-
99
- ## Phase 2: Deep Review (3 Rounds)
100
-
101
- ### Deep Round 1: Workflow Alignment
102
- ```
103
- □ Agent creation workflow documented and functional
104
- □ Development workflow uses proper routing skills
105
- □ Deployment workflow defined (if applicable)
106
- □ All routing skills have complete agent pattern mappings
107
- ```
108
-
109
- ### Deep Round 2: Reference Verification
110
- ```
111
- □ All routing skills properly reference their managed agents
112
- □ All rules are properly referenced
113
- □ No orphaned agents (not referenced by any routing skill)
114
- □ No circular references
115
- □ All skill references in agent frontmatter are valid
116
- □ All agent memory fields use valid scope values
117
- ```
118
-
119
- ### Deep Round 3: Philosophy Compliance
120
- ```
121
- □ R006: Separation of concerns (agent file = role only, no details)
122
- □ R009: Parallel execution enabled for main conversation
123
- □ R010: Multi-agent tasks use routing skills and Task tool
124
- □ R007/R008: Agent/tool identification documented
125
- □ All MUST rules enforced, SHOULD rules recommended
126
- ```
127
-
128
- ## Verification Checklist Summary
129
-
130
- ```
131
- Phase 1: Manager Verification (5x)
132
- □ Round 1: mgr-supplier:audit
133
- □ Round 2: mgr-sync-checker:check
134
- □ Round 3: mgr-supplier:audit (re-verify)
135
- □ Round 4: mgr-sync-checker:check + mgr-updater:docs
136
- □ Round 5: Final count verification
137
- □ mgr-claude-code-bible:verify (official spec compliance)
138
-
139
- Phase 2: Deep Review (3x)
140
- □ Round 1: Workflow alignment
141
- □ Round 2: Reference verification
142
- □ Round 3: Philosophy compliance
143
-
144
- Phase 3: Fix Issues
145
- □ All issues from Phase 1 fixed
146
- □ All issues from Phase 2 fixed
147
- □ Re-run verification if major fixes made
148
-
149
- Phase 4: Commit
150
- □ Delegate to mgr-gitnerd
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
157
- ```
31
+ ### Phase 3: Fix all discovered issues
158
32
 
159
- ## When to Run Full Verification
33
+ ### Phase 4: Commit via mgr-gitnerd
160
34
 
161
- | Action | Full Verification Required |
162
- |--------|---------------------------|
163
- | Create new agent | **YES** |
164
- | Rename agent | **YES** |
165
- | Delete agent | **YES** |
166
- | Modify agent frontmatter | **YES** |
167
- | Add/modify skill | **YES** |
168
- | Add/modify guide | **YES** |
169
- | Change routing skill patterns | **YES** |
170
- | Update rules | **YES** |
171
-
172
- ## Workflow Diagram
173
-
174
- ```
175
- Content Change Made
176
-
177
-
178
- ┌───────────────────────────────┐
179
- │ Phase 1: Manager Verification │
180
- │ (5 rounds) │
181
- │ mgr-supplier → mgr-sync-checker → │
182
- │ mgr-updater │
183
- └───────────────┬───────────────┘
184
-
185
-
186
- ┌───────────────────────────────┐
187
- │ Phase 2: Deep Review │
188
- │ (3 rounds) │
189
- │ Workflow → References → │
190
- │ Philosophy │
191
- └───────────────┬───────────────┘
192
-
193
- ┌───────┴───────┐
194
- ▼ ▼
195
- [Issues Found] [All Clean]
196
- │ │
197
- ▼ │
198
- Fix Issues │
199
- │ │
200
- └───────┬───────┘
201
-
202
-
203
- ┌───────────────────────────────┐
204
- │ Phase 4: Commit via mgr-gitnerd │
205
- └───────────────┬───────────────┘
206
-
207
-
208
- ┌───────────────────────────────┐
209
- │ Phase 5: Push via mgr-gitnerd │
210
- │ (ONLY after sauron passes) │
211
- └───────────────────────────────┘
212
- ```
35
+ ### Phase 5: Push via mgr-gitnerd (only after sauron passes)
213
36
 
214
37
  ## Self-Check Before Commit and Push
215
38
 
@@ -239,6 +62,10 @@ Content Change Made
239
62
  ╚══════════════════════════════════════════════════════════════════╝
240
63
  ```
241
64
 
65
+ ## When Required
66
+
67
+ Any change to: agents, agent frontmatter, skills, guides, routing patterns, rules.
68
+
242
69
  ## Quick Verification Commands
243
70
 
244
71
  ```bash
@@ -270,12 +97,29 @@ for f in .claude/agents/*.md; do
270
97
  echo "INVALID MEMORY SCOPE in $f: $mem"
271
98
  fi
272
99
  done
273
- ```
274
100
 
275
- ## Integration with Other Rules
101
+ # Hook count check
102
+ ls .claude/hooks/*.json 2>/dev/null | wc -l
276
103
 
277
- | Rule | Integration |
278
- |------|-------------|
279
- | R009 (Parallel) | Verification checks can run in parallel |
280
- | R010 (Orchestrator) | Delegate commit to mgr-gitnerd |
281
- | R016 (Improvement) | Update this rule if new issues found |
104
+ # Context count check
105
+ ls .claude/contexts/*.md 2>/dev/null | wc -l
106
+
107
+ # Guide count check
108
+ find guides -mindepth 1 -maxdepth 1 -type d | wc -l
109
+
110
+ # Agent name accuracy (compare CLAUDE.md table with actual files)
111
+ # Extract agent names from files
112
+ ls .claude/agents/*.md | xargs -I{} basename {} .md | sort > /tmp/actual-agents.txt
113
+
114
+ # Slash command skill existence
115
+ for cmd in $(grep "^| \`/" CLAUDE.md | sed 's/.*`\///' | sed 's/`.*//' | sed 's/ .*//')
116
+ do
117
+ [ -d ".claude/skills/$cmd" ] || echo "MISSING SKILL: $cmd"
118
+ done
119
+
120
+ # Routing skill completeness check
121
+ ls -d .claude/skills/*-routing 2>/dev/null | xargs -I{} basename {} | sort
122
+
123
+ # Verify routing skill names in CLAUDE.md
124
+ grep -oP '(secretary|dev-lead|de-lead|qa-lead)-routing' CLAUDE.md | sort -u
125
+ ```
@@ -1,46 +1,17 @@
1
1
  # [MUST] Tool Usage Identification Rules
2
2
 
3
- > **Priority**: MUST - ENFORCED, NO EXCEPTIONS
4
- > **ID**: R008
5
- > **Violation**: Immediate correction required
3
+ > **Priority**: MUST - ENFORCED | **ID**: R008
6
4
 
7
- ## CRITICAL
5
+ ## Core Rule
8
6
 
9
- **EVERY tool call MUST be prefixed with agent and model identification. This is NON-NEGOTIABLE.**
7
+ Every tool call MUST be prefixed with agent and model identification:
10
8
 
11
9
  ```
12
- Before EVERY tool call, output:
13
10
  [agent-name][model] → Tool: <tool-name>
14
11
  [agent-name][model] → Target: <file/path/url>
15
12
  ```
16
13
 
17
- Failure to identify tool usage = Rule violation = Must be corrected immediately.
18
-
19
- ### Self-Check Before EVERY Tool Call
20
-
21
- ```
22
- ╔══════════════════════════════════════════════════════════════════╗
23
- ║ BEFORE INVOKING ANY TOOL, ASK YOURSELF: ║
24
- ║ ║
25
- ║ 1. Did I output the tool identification line with MODEL? ║
26
- ║ [agent-name][model] → Tool: <tool-name> ║
27
- ║ [agent-name][model] → Target: <target> ║
28
- ║ ║
29
- ║ 2. Am I about to call multiple tools in parallel? ║
30
- ║ → EACH tool needs its own identification line ║
31
- ║ → List all identifications BEFORE the tool calls ║
32
- ║ ║
33
- ║ If NO to #1 → STOP. Output identification FIRST. ║
34
- ╚══════════════════════════════════════════════════════════════════╝
35
- ```
36
-
37
- ### Model Values
38
-
39
- | Model | When to Use |
40
- |-------|-------------|
41
- | `opus` | Complex reasoning, architecture design |
42
- | `sonnet` | General tasks, code generation (default) |
43
- | `haiku` | Fast simple tasks, file search |
14
+ For parallel calls: list ALL identifications BEFORE the tool calls.
44
15
 
45
16
  ### Common Violations to Avoid
46
17
 
@@ -76,120 +47,36 @@ Failure to identify tool usage = Rule violation = Must be corrected immediately.
76
47
  <tool_call>Bash(cmd)</tool_call>
77
48
  ```
78
49
 
79
- ## Purpose
80
-
81
- Display which agent is using which tool for transparency and debugging. This extends R007 (Agent Identification) to cover tool operations.
82
-
83
- ## Tool Usage Format
50
+ ## Models
84
51
 
85
- When invoking a tool, prefix with agent and model identification:
86
-
87
- ```
88
- [agent-name][model] Tool: <tool-name>
89
- ```
90
-
91
- ### Examples
92
-
93
- ```
94
- [lang-golang-expert][sonnet] → Tool: Read
95
- [lang-golang-expert][sonnet] → Reading: src/main.go
96
-
97
- [mgr-supplier][haiku] → Tool: Glob
98
- [mgr-supplier][haiku] → Searching: .claude/agents/*.md
99
-
100
- [mgr-creator][sonnet] → Tool: Write
101
- [mgr-creator][sonnet] → Writing: .claude/agents/new-agent.md
102
- ```
103
-
104
- ## Extended Format (Verbose)
105
-
106
- For detailed tracking:
107
-
108
- ```
109
- ┌─ Agent: lang-golang-expert (sw-engineer)
110
- ├─ Model: sonnet
111
- ├─ Skill: go-best-practices
112
- ├─ Tool: Read
113
- └─ Target: src/main.go
114
- ```
52
+ | Model | Use |
53
+ |-------|-----|
54
+ | `opus` | Complex reasoning, architecture |
55
+ | `sonnet` | General tasks, code generation (default) |
56
+ | `haiku` | Fast simple tasks, file search |
115
57
 
116
58
  ## Tool Categories
117
59
 
118
- | Category | Tools | Format |
119
- |----------|-------|--------|
120
- | File Read | Read, Glob, Grep | `→ Reading:` / `→ Searching:` |
121
- | File Write | Write, Edit | `→ Writing:` / `→ Editing:` |
122
- | Network | WebFetch | `→ Fetching:` |
123
- | Execution | Bash, Task | `→ Running:` / `→ Spawning:` |
124
-
125
- ## When to Display
126
-
127
- | Situation | Display |
128
- |-----------|---------|
129
- | Reading files | Agent + file path |
130
- | Writing files | Agent + file path |
131
- | Searching | Agent + pattern |
132
- | Fetching URLs | Agent + URL |
133
- | Running commands | Agent + command |
60
+ | Category | Tools | Verb |
61
+ |----------|-------|------|
62
+ | File Read | Read, Glob, Grep | Reading / Searching |
63
+ | File Write | Write, Edit | Writing / Editing |
64
+ | Network | WebFetch | Fetching |
65
+ | Execution | Bash, Task | Running / Spawning |
134
66
 
135
- ## Simplified Format
136
-
137
- For inline operations:
67
+ ## Task Tool Format
138
68
 
139
69
  ```
140
- [mgr-supplier][haiku]Glob: .claude/agents/*.md
141
- [mgr-creator][sonnet] → Write: .claude/agents/new-agent.md
142
- [mgr-updater][sonnet] → WebFetch: https://github.com/...
70
+ Task(subagent_type):modeldescription
143
71
  ```
144
72
 
145
- ## Integration with R007
73
+ `subagent_type` MUST match actual Task tool parameter. Custom names not allowed.
146
74
 
147
- R008 extends R007 for tool operations:
75
+ ## Example
148
76
 
149
77
  ```
150
- ┌─ Agent: mgr-creator (manager)
151
- ├─ Model: sonnet
152
- └─ Task: Creating new agent
153
-
154
78
  [mgr-creator][sonnet] → Write: .claude/agents/new-agent.md
155
-
156
- [Done] Agent created successfully
157
- ```
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:
79
+ [secretary][opus] → Spawning:
171
80
  [1] Task(lang-golang-expert):sonnet → Go code review
172
81
  [2] Task(lang-python-expert):sonnet → Python code review
173
- [3] Task(general-purpose):haiku → File validation
174
82
  ```
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
-
182
- ## Benefits
183
-
184
- 1. **Debugging**: Know which agent performed which operation
185
- 2. **Transparency**: User sees all agent activities
186
- 3. **Audit Trail**: Track file changes by agent
187
- 4. **Error Attribution**: Identify which agent caused issues
188
-
189
- ## Implementation
190
-
191
- Agents should:
192
- 1. Identify themselves before tool operations
193
- 2. Include tool name and target
194
- 3. Use consistent format across all tools
195
- 4. Group related operations together
@@ -1,183 +1,39 @@
1
1
  # [SHOULD] Agent Teams Rules
2
2
 
3
- > **Priority**: SHOULD - Actively use when available
4
- > **ID**: R018
5
- > **Condition**: Agent Teams feature is enabled locally
6
-
7
- ## Purpose
8
-
9
- When Claude Code's Agent Teams feature is enabled on the local machine, actively leverage it for tasks that benefit from multi-agent collaboration, shared state, and peer-to-peer communication.
3
+ > **Priority**: SHOULD | **ID**: R018 | **Condition**: Agent Teams enabled locally
10
4
 
11
5
  ## Detection
12
6
 
13
- Agent Teams availability is determined by:
14
- - Environment variable: `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`
15
- - The presence of TeamCreate, SendMessage, TaskCreate/TaskList (team variants) tools
16
-
17
- When detected, Agent Teams becomes the **preferred coordination method** for qualifying tasks.
7
+ Available when `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` or TeamCreate/SendMessage tools present.
18
8
 
19
9
  ## Decision Matrix
20
10
 
21
- | Scenario | Task Tool | Agent Teams | Preferred |
22
- |----------|-----------|-------------|-----------|
23
- | Simple independent subtasks | Low cost | Overkill | **Task Tool** |
24
- | Multi-step with shared state | Limited | Native support | **Agent Teams** |
25
- | Research requiring discussion | No peer comm | Peer messaging | **Agent Teams** |
26
- | Cost-sensitive batch ops | Lower tokens | Higher tokens | **Task Tool** |
27
- | Complex debugging across modules | Isolated context | Shared context | **Agent Teams** |
28
- | Code review + fix cycle | Sequential | Collaborative | **Agent Teams** |
29
- | Single file operations | Fast | Overhead | **Task Tool** |
30
-
31
- ## When to Use Agent Teams
32
-
33
- ### SHOULD Use Agent Teams For
34
-
35
- ```
36
- Tasks requiring 3+ agents that need to coordinate
37
- Research tasks where agents need to share findings
38
- Debugging sessions spanning multiple modules
39
- Review + implementation cycles
40
- Any task where inter-agent communication adds value
41
- ```
42
-
43
- ### SHOULD Keep Task Tool For
44
-
45
- ```
46
- Independent parallel subtasks (no shared state)
47
- Single-agent delegations
48
- Cost-sensitive batch operations
49
- Simple file operations
50
- When Agent Teams is not available
51
- ```
52
-
53
- ## CRITICAL: Self-Check Before Spawning Task Tool
54
-
55
- ```
56
- ╔══════════════════════════════════════════════════════════════════╗
57
- ║ BEFORE USING TASK TOOL, ASK YOURSELF: ║
58
- ║ ║
59
- ║ 1. Is Agent Teams available? (TeamCreate tool exists?) ║
60
- ║ → YES: Continue to step 2 ║
61
- ║ → NO: Task tool is fine ║
62
- ║ ║
63
- ║ 2. Does this task qualify for Agent Teams? ║
64
- ║ - 3+ agents needed? ║
65
- ║ - Shared state or coordination required? ║
66
- ║ - Inter-agent communication adds value? ║
67
- ║ - Complex workflow (create + review + integrate)? ║
68
- ║ → ANY YES: MUST use Agent Teams ║
69
- ║ → ALL NO: Task tool is fine ║
70
- ║ ║
71
- ║ 3. Am I defaulting to Task tool out of habit? ║
72
- ║ → STOP. Evaluate honestly against the decision matrix. ║
73
- ║ ║
74
- ║ Using Task tool for Agent Teams-qualifying tasks ║
75
- ║ when Agent Teams is available = Rule violation ║
76
- ╚══════════════════════════════════════════════════════════════════╝
77
- ```
78
-
79
- ## Team Composition Guidelines
80
-
81
- ### Standard Team Patterns
82
-
83
- #### Research Team
84
- ```
85
- TeamCreate("research-team")
86
- +-- researcher-1: Explore codebase area A
87
- +-- researcher-2: Explore codebase area B
88
- +-- synthesizer: Aggregate findings
89
- ```
90
-
91
- #### Development Team
92
- ```
93
- TeamCreate("dev-team")
94
- +-- implementer: Write code
95
- +-- reviewer: Review changes
96
- +-- tester: Validate changes
97
- ```
98
-
99
- #### Debug Team
100
- ```
101
- TeamCreate("debug-team")
102
- +-- investigator-1: Trace issue in module A
103
- +-- investigator-2: Trace issue in module B
104
- +-- fixer: Apply fixes based on findings
105
- ```
106
-
107
- ### Team Lifecycle
108
-
109
- ```
110
- 1. TeamCreate -> Create team with purpose
111
- 2. TaskCreate -> Define tasks for team members
112
- 3. Task(team_name) -> Spawn team members
113
- 4. SendMessage -> Coordinate between members
114
- 5. TaskUpdate -> Track progress
115
- 6. SendMessage(shutdown_request) -> Graceful shutdown
116
- 7. TeamDelete -> Cleanup
117
- ```
118
-
119
- ## Fallback Behavior
11
+ | Scenario | Preferred |
12
+ |----------|-----------|
13
+ | Simple independent subtasks | Task Tool |
14
+ | Multi-step with shared state | Agent Teams |
15
+ | Research requiring discussion | Agent Teams |
16
+ | Cost-sensitive batch ops | Task Tool |
17
+ | Complex debugging across modules | Agent Teams |
18
+ | Code review + fix cycle | Agent Teams |
19
+ | Single file operations | Task Tool |
120
20
 
121
- When Agent Teams is NOT available:
122
- - All team-qualifying tasks fall back to Task tool
123
- - R009 (Parallel Execution) governs parallel spawning
124
- - R010 (Orchestrator Coordination) governs delegation
125
- - No degradation in capability, only in coordination richness
21
+ **Self-check before Task tool:** Is Agent Teams available? Does task need 3+ agents, shared state, or inter-agent communication? If yes, use Agent Teams.
126
22
 
127
- ```
128
- +------------------------------------------------------------------+
129
- | GRACEFUL DEGRADATION |
130
- | |
131
- | Agent Teams Available: |
132
- | Complex task -> TeamCreate -> coordinated agents |
133
- | |
134
- | Agent Teams NOT Available: |
135
- | Complex task -> Task tool -> parallel independent agents |
136
- | |
137
- | Both approaches produce results. |
138
- | Agent Teams adds coordination, not capability. |
139
- +------------------------------------------------------------------+
140
- ```
23
+ ## Team Patterns
141
24
 
142
- ## Integration with Existing Rules
25
+ - **Research**: researcher-1 + researcher-2 + synthesizer
26
+ - **Development**: implementer + reviewer + tester
27
+ - **Debug**: investigator-1 + investigator-2 + fixer
143
28
 
144
- | Rule | Integration |
145
- |------|-------------|
146
- | R009 (Parallel) | Task tool parallel = fallback when no Agent Teams |
147
- | R010 (Orchestrator) | Agent Teams = alternative coordination model |
148
- | R012 (HUD) | Team status displayed in HUD |
149
- | R013 (Ecomode) | Team communications respect ecomode |
29
+ ## Lifecycle
150
30
 
151
- ## Cost Awareness
31
+ TeamCreate TaskCreate → Task(spawn) → SendMessage(coordinate) → TaskUpdate → shutdown → cleanup
152
32
 
153
- Agent Teams consume more tokens due to:
154
- - Full context per team member
155
- - Inter-agent message passing
156
- - Shared task list overhead
33
+ ## Fallback
157
34
 
158
- ```
159
- Rule of thumb:
160
- If task takes < 3 minutes with Task tool -> Use Task tool
161
- If task needs inter-agent communication -> Use Agent Teams
162
- If unsure -> Default to Agent Teams when available, downgrade to Task tool only if clearly unqualified
163
- ```
35
+ When Agent Teams unavailable: use Task tool with R009/R010 rules. Both approaches produce results; Agent Teams adds coordination richness.
164
36
 
165
- ## Enforcement
37
+ ## Cost
166
38
 
167
- ```
168
- ╔══════════════════════════════════════════════════════════════════╗
169
- ║ VIOLATION EXAMPLES: ║
170
- ║ ║
171
- ║ ✗ Agent Teams available + 4 parallel Task() calls for ║
172
- ║ coordinated work (creating agents + guides + routing skill) ║
173
- ║ ✗ Spawning Task tool agents that need to share results ║
174
- ║ ✗ Defaulting to Task tool without checking Agent Teams first ║
175
- ║ ║
176
- ║ CORRECT EXAMPLES: ║
177
- ║ ║
178
- ║ ✓ TeamCreate → TaskCreate → spawn team members for ║
179
- ║ multi-file coordinated creation ║
180
- ║ ✓ Task tool for single independent delegation ║
181
- ║ ✓ Task tool when Agent Teams is not available ║
182
- ╚══════════════════════════════════════════════════════════════════╝
183
- ```
39
+ Agent Teams uses more tokens (full context per member + message passing). Use Task tool if task < 3 min or no inter-agent communication needed.