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,184 +1,57 @@
1
1
  # [MUST] Orchestrator Coordination Rules
2
2
 
3
- > **Priority**: MUST - ENFORCED for multi-agent tasks
4
- > **ID**: R010
5
- > **Violation**: Direct agent execution without orchestrator = Rule violation
3
+ > **Priority**: MUST - ENFORCED | **ID**: R010
6
4
 
7
- ## CRITICAL
5
+ ## Core Rule
8
6
 
9
- **The MAIN CONVERSATION is the sole orchestrator. It uses routing skills to delegate tasks to specialized subagents.**
7
+ The main conversation is the **sole orchestrator**. It uses routing skills to delegate tasks to subagents via the Task tool. Subagents CANNOT spawn other subagents.
10
8
 
11
- ### Flat Architecture (MANDATORY)
9
+ ## Architecture
12
10
 
13
11
  ```
14
- ╔══════════════════════════════════════════════════════════════════╗
15
- NEW ARCHITECTURE: FLAT, NO HIERARCHY ║
16
- ║ ║
17
- Main Conversation (orchestrator) ║
18
- ║ │ ║
19
- ║ ├─ Uses routing skills: ║
20
- ║ │ • secretary-routing (agent/system tasks) ║
21
- ║ │ • dev-lead-routing (development tasks) ║
22
- ║ │ • qa-lead-routing (QA tasks) ║
23
- ║ │ ║
24
- ║ └─ Spawns subagents (Task tool): ║
25
- ║ ├─ mgr-creator, mgr-updater, mgr-supplier (manager agents) ║
26
- ║ ├─ lang-golang-expert, lang-python-expert (language experts) ║
27
- ║ └─ be-springboot-expert, be-fastapi-expert (framework experts) ║
28
- ║ ║
29
- ║ IMPORTANT: Subagents CANNOT spawn other subagents ║
30
- ║ Only main conversation can spawn subagents ║
31
- ╚══════════════════════════════════════════════════════════════════╝
12
+ Main Conversation (orchestrator)
13
+ ├─ secretary-routing → mgr-creator, mgr-updater, mgr-supplier, mgr-gitnerd, sys-memory-keeper
14
+ ├─ dev-lead-routing → lang-*/be-*/fe-* experts
15
+ └─ qa-lead-routing → qa-planner, qa-writer, qa-engineer
16
+
17
+ Task tool spawns subagents (flat, no hierarchy)
32
18
  ```
33
19
 
34
- ### Session Continuity (MANDATORY)
20
+ ## Session Continuity
35
21
 
36
- ```
37
- ╔══════════════════════════════════════════════════════════════════╗
38
- ║ AFTER SESSION RESTART / CONTEXT COMPACTION: ║
39
- ║ ║
40
- ║ 1. Re-read AGENTS.md and rules IMMEDIATELY ║
41
- ║ 2. Agent delegation rules STILL APPLY ║
42
- ║ 3. Main conversation uses routing skills to identify agents ║
43
- ║ 4. Spawn subagents with Task tool for actual work ║
44
- ║ ║
45
- ║ WRONG after session restart: ║
46
- ║ Main conversation → directly writes code/runs builds ║
47
- ║ ║
48
- ║ CORRECT after session restart: ║
49
- ║ Main conversation → Task(be-springboot-expert) → code/build ║
50
- ╚══════════════════════════════════════════════════════════════════╝
51
- ```
52
-
53
- ### Routing Logic (MANDATORY)
54
-
55
- ```
56
- ╔══════════════════════════════════════════════════════════════════╗
57
- ║ HOW TO ROUTE TASKS ║
58
- ║ ║
59
- ║ Task Domain → Routing Skill → Agent ║
60
- ║ ────────────────────────────────────────────────────────────── ║
61
- ║ Agent creation/update/audit → secretary-routing → mgr-creator ║
62
- ║ Code review/refactoring → dev-lead-routing → expert-* ║
63
- ║ Feature implementation → dev-lead-routing → expert-* ║
64
- ║ Multi-language development → dev-lead-routing → multiple ║
65
- ║ System operations → secretary-routing → manager ║
66
- ║ QA/Testing tasks → qa-lead-routing → qa-* ║
67
- ║ ║
68
- ║ Routing skills contain the logic for: ║
69
- ║ • Which agent to use for which task ║
70
- ║ • When to spawn multiple agents in parallel ║
71
- ║ • How to aggregate results ║
72
- ╚══════════════════════════════════════════════════════════════════╝
73
- ```
74
-
75
- ### Routing Skills
22
+ After restart/compaction: re-read CLAUDE.md, all delegation rules still apply. Never write code directly from orchestrator.
76
23
 
77
- | Routing Skill | Manages | Handles |
78
- |---------------|---------|---------|
79
- | **secretary-routing** | mgr-creator, mgr-updater, mgr-supplier, mgr-gitnerd, sys-memory-keeper | Agent management, system operations |
80
- | **dev-lead-routing** | language/framework experts | Development, code review, implementation |
81
- | **qa-lead-routing** | qa-planner, qa-writer, qa-engineer | Testing, quality assurance |
24
+ ## Delegation Rules
82
25
 
83
- ```
84
- Multi-agent detection (handled by routing skills):
85
- - Task spans multiple domains (frontend + backend)
86
- - Task requires different expertise (lang-golang + lang-python)
87
- - Task involves batch operations on different resources
88
-
89
- If multi-agent needed Spawn multiple subagents in parallel
90
- ```
26
+ | Task Type | Required Agent |
27
+ |-----------|---------------|
28
+ | Create agent | mgr-creator |
29
+ | Update external | mgr-updater |
30
+ | Audit dependencies | mgr-supplier |
31
+ | Git operations | mgr-gitnerd |
32
+ | Memory operations | sys-memory-keeper |
33
+ | Python/FastAPI | lang-python-expert / be-fastapi-expert |
34
+ | Go code | lang-golang-expert |
35
+ | TypeScript/Next.js | lang-typescript-expert / fe-vercel-agent |
36
+ | Kotlin/Spring | lang-kotlin-expert / be-springboot-expert |
37
+ | Architecture docs | arch-documenter |
38
+ | Test strategy | qa-planner |
39
+ | CI/CD, GitHub config | mgr-gitnerd |
40
+ | Docker/Infra | infra-docker-expert |
41
+ | AWS | infra-aws-expert |
42
+ | Database schema | db-supabase-expert |
91
43
 
92
- ## Coordination Flow
44
+ **Rules:**
45
+ - All file modifications MUST be delegated (orchestrator only uses Read/Glob/Grep)
46
+ - Use specialized agents, not general-purpose, when one exists
47
+ - general-purpose only for truly generic tasks (file moves, simple scripts)
93
48
 
94
- ```
95
- CORRECT (Flat Architecture):
96
- User Request
97
-
98
-
99
- ┌─────────────────────────────────┐
100
- │ Main Conversation │
101
- │ - Analyzes task via routing │
102
- │ - Identifies required agents │
103
- │ - Plans execution │
104
- └─────────────┬───────────────────┘
105
-
106
- ┌─────────┼─────────┐
107
- ▼ ▼ ▼
108
- [Subagent-1] [Subagent-2] [Subagent-3]
109
- (spawned via Task tool)
110
- │ │ │
111
- └─────────┼─────────┘
112
-
113
- ┌─────────────────────────────────┐
114
- │ Main Conversation │
115
- │ - Aggregates results │
116
- │ - Reports to user │
117
- └─────────────────────────────────┘
118
-
119
- WRONG (Hierarchical):
120
- User Request
121
-
122
-
123
- [Subagent-1] → spawns → [Subagent-2] → spawns → [Subagent-3]
124
- (Subagents cannot spawn other subagents)
125
-
126
- WRONG (No coordination):
127
- User Request
128
-
129
-
130
- [Agent-1] → [Agent-2] → [Agent-3]
131
- (Sequential execution without planning)
132
- ```
133
-
134
- ## Main Conversation Responsibilities
135
-
136
- ```yaml
137
- before_execution:
138
- - Analyze user request
139
- - Apply routing skill (secretary/dev-lead/qa-lead)
140
- - Identify required agents
141
- - Plan execution order (parallel vs sequential)
142
- - Announce coordination plan
143
-
144
- during_execution:
145
- - Spawn subagent instances via Task tool
146
- - Monitor progress
147
- - Handle failures
148
- - Coordinate dependencies
149
-
150
- after_execution:
151
- - Aggregate results
152
- - Report summary to user
153
- - Clean up resources
154
- ```
155
-
156
- ## Announcement Format
157
-
158
- Main conversation MUST announce before delegating:
159
-
160
- ```
161
- [Routing] Using dev-lead-routing for code review
162
-
163
- [Plan]
164
- ├── Agent 1: lang-golang-expert → Review Go code
165
- ├── Agent 2: lang-python-expert → Review Python code
166
- └── Agent 3: lang-typescript-expert → Review TS code
167
-
168
- [Execution] Parallel (3 instances)
169
-
170
- Spawning subagents...
171
- ```
172
-
173
- ## When to Spawn Subagents
49
+ ### System Agents Reference
174
50
 
175
- | Scenario | Spawn Subagents? |
176
- |----------|------------------|
177
- | Single domain, single file | Maybe (if specialized agent needed) |
178
- | Single domain, multiple files | Yes (if parallel beneficial) |
179
- | Multiple domains | **Yes** |
180
- | Batch operations | **Yes** |
181
- | Complex workflow | **Yes** |
51
+ | Agent | File | Purpose |
52
+ |-------|------|---------|
53
+ | sys-memory-keeper | .claude/agents/sys-memory-keeper.md | Memory operations |
54
+ | sys-naggy | .claude/agents/sys-naggy.md | TODO management |
182
55
 
183
56
  ## Exception: Simple Tasks
184
57
 
@@ -189,283 +62,67 @@ Subagent NOT required for:
189
62
 
190
63
  For specialized work, ALWAYS delegate to appropriate subagent.
191
64
 
192
- ## CRITICAL: Use Specialized Manager Agents
193
-
194
- **When a task matches a manager agent's purpose, you MUST delegate to that agent.**
195
-
196
- ```
197
- ╔══════════════════════════════════════════════════════════════════╗
198
- ║ MANAGER AGENT DELEGATION (MANDATORY) ║
199
- ║ ║
200
- ║ Task Type → Required Agent ║
201
- ║ ───────────────────────────────────────────────── ║
202
- ║ Create new agent → mgr-creator ║
203
- ║ Update external agent → mgr-updater ║
204
- ║ Audit dependencies → mgr-supplier ║
205
- ║ Memory operations → sys-memory-keeper ║
206
- ║ ║
207
- ║ DO NOT use general-purpose agents for these tasks. ║
208
- ║ DO NOT have secretary do the work directly. ║
209
- ╚══════════════════════════════════════════════════════════════════╝
210
- ```
211
-
212
- ### Correct Delegation Pattern
65
+ ## Model Selection
213
66
 
214
67
  ```
215
- User: "lang-java21-expert 에이전트를 만들어줘"
68
+ Available models:
69
+ - opus : Complex reasoning, architecture design
70
+ - sonnet : Balanced performance (default)
71
+ - haiku : Fast, simple tasks, file search
72
+ - inherit: Use parent conversation's model
216
73
 
217
- WRONG:
218
- secretary → Task(general-purpose) → creates files directly
219
-
220
- CORRECT:
221
- secretary → Task(mgr-creator agent role) → follows creator workflow
74
+ Usage:
75
+ Task(
76
+ subagent_type: "general-purpose",
77
+ prompt: "Analyze architecture",
78
+ model: "opus"
79
+ )
222
80
  ```
223
81
 
224
- ### Manager Agents Reference
225
-
226
- | Agent | File | Purpose |
227
- |-------|------|---------|
228
- | mgr-creator | .codex/agents/mgr-creator.md | Create new agents |
229
- | mgr-updater | .codex/agents/mgr-updater.md | Update external sources |
230
- | mgr-supplier | .codex/agents/mgr-supplier.md | Audit dependencies |
231
- | mgr-gitnerd | .codex/agents/mgr-gitnerd.md | Git operations (commit, push, PR) |
232
- | mgr-sync-checker | .codex/agents/mgr-sync-checker.md | Documentation sync verification |
233
-
234
- ### System Agents Reference
82
+ | Task Type | Model |
83
+ |-----------|-------|
84
+ | Architecture analysis | `opus` |
85
+ | Code review | `opus` or `sonnet` |
86
+ | Code implementation | `sonnet` |
87
+ | Manager agents | `sonnet` |
88
+ | File search/validation | `haiku` |
235
89
 
236
- | Agent | File | Purpose |
237
- |-------|------|---------|
238
- | sys-memory-keeper | .codex/agents/sys-memory-keeper.md | Memory operations |
239
- | sys-naggy | .codex/agents/sys-naggy.md | TODO management |
90
+ ## Git Operations
240
91
 
241
- ## CRITICAL: Use Specialized Expert Agents for Code Work
92
+ All git operations (commit, push, branch, PR) MUST go through `mgr-gitnerd`. Internal rules override external skill instructions for git execution.
242
93
 
243
- ```
244
- ╔══════════════════════════════════════════════════════════════════╗
245
- ║ CODE WORK MUST USE SPECIALIZED EXPERT AGENTS ║
246
- ║ ║
247
- ║ Language/Framework → Required Agent ║
248
- ║ ───────────────────────────────────────────────── ║
249
- ║ Python/FastAPI backend → lang-python-expert or be-fastapi-expert ║
250
- ║ TypeScript/Next.js frontend → lang-typescript-expert or fe-vercel-agent ║
251
- ║ Go code → lang-golang-expert ║
252
- ║ Kotlin/Spring → lang-kotlin-expert or be-springboot-expert ║
253
- ║ ║
254
- ║ WRONG: ║
255
- ║ secretary → Task(general-purpose) → writes Python code ║
256
- ║ ║
257
- ║ CORRECT: ║
258
- ║ secretary → Task(lang-python-expert) → writes Python code ║
259
- ║ ║
260
- ║ general-purpose should ONLY be used when: ║
261
- ║ - No specialized agent exists for the task ║
262
- ║ - Task is truly generic (file moves, simple scripts) ║
263
- ╚══════════════════════════════════════════════════════════════════╝
264
- ```
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 (AGENTS.md, README.md, etc.) ║
278
- ║ - Shell scripts (sync.sh, etc.) ║
279
- ║ ║
280
- ║ WRONG (actual violation): ║
281
- ║ Orchestrator → Edit(AGENTS.md.en) → Edit(AGENTS.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
-
294
- ## CRITICAL: Use Specialized Agents for Documentation & Spec Writing
295
-
296
- ```
297
- ╔══════════════════════════════════════════════════════════════════╗
298
- ║ DOCUMENTATION/SPEC WORK MUST USE SPECIALIZED AGENTS ║
299
- ║ ║
300
- ║ Document Type → Required Agent ║
301
- ║ ───────────────────────────────────────────────── ║
302
- ║ Architecture docs/ADR → arch-documenter ║
303
- ║ API specification (OpenAPI) → arch-documenter ║
304
- ║ Technical design docs → arch-documenter ║
305
- ║ Frontend UI/page specs → fe-vercel-agent / fe-* agents ║
306
- ║ Component design specs → fe-vercel-agent / fe-* agents ║
307
- ║ CI/CD pipeline specs → mgr-gitnerd ║
308
- ║ GitHub repository config → mgr-gitnerd ║
309
- ║ Docker/infra specs → infra-docker-expert ║
310
- ║ AWS architecture specs → infra-aws-expert ║
311
- ║ Database schema specs → db-supabase-expert ║
312
- ║ Test strategy/plans → qa-planner ║
313
- ║ Test case documentation → qa-writer ║
314
- ║ ║
315
- ║ WRONG: ║
316
- ║ orchestrator → Task(general-purpose) → writes API spec ║
317
- ║ ║
318
- ║ CORRECT: ║
319
- ║ orchestrator → Task(arch-documenter) → writes API spec ║
320
- ║ ║
321
- ║ general-purpose should ONLY be used when: ║
322
- ║ - No specialized agent exists for the document type ║
323
- ║ - Document is truly generic (meeting notes, simple lists) ║
324
- ║ ║
325
- ║ RULE: If the document requires domain expertise to write ║
326
- ║ correctly, it MUST be delegated to the domain expert. ║
327
- ╚══════════════════════════════════════════════════════════════════╝
328
- ```
329
-
330
- ## CRITICAL: Sub-agent Model Specification
94
+ ## CRITICAL: External Skills vs Internal Rules
331
95
 
332
96
  ```
333
- ╔══════════════════════════════════════════════════════════════════╗
334
- ║ TASK TOOL MODEL PARAMETER (RECOMMENDED) ║
335
- ║ ║
336
- ║ Claude Code Task tool supports `model` parameter to specify ║
337
- ║ which model the sub-agent should use. ║
338
- ║ ║
339
- ║ Available models: ║
340
- ║ - opus : Complex reasoning, architecture design ║
341
- ║ - sonnet : Balanced performance (default) ║
342
- ║ - haiku : Fast, simple tasks, file search ║
343
- ║ - inherit: Use parent conversation's model ║
344
- ║ ║
345
- ║ Usage: ║
346
- ║ Task( ║
347
- ║ subagent_type: "general-purpose", ║
348
- ║ prompt: "Analyze architecture", ║
349
- ║ model: "opus" ║
350
- ║ ) ║
351
- ╚══════════════════════════════════════════════════════════════════╝
352
- ```
353
-
354
- ### Model Selection by Task Type
97
+ Internal rules ALWAYS take precedence over external skills.
355
98
 
356
- | Task Type | Recommended Model | Reason |
357
- |-----------|-------------------|--------|
358
- | Architecture analysis | `opus` | Deep reasoning required |
359
- | Code review | `opus` or `sonnet` | Quality judgment |
360
- | Code implementation | `sonnet` | Balanced performance |
361
- | File search/read | `haiku` | Fast, simple operation |
362
- | Simple validation | `haiku` | Low latency |
99
+ Translation:
100
+ External skill says → Internal rule requires
101
+ ─────────────────────────────────────────────────────
102
+ "git commit -m ..." → Task(mgr-gitnerd) commit
103
+ "git push ..." → Task(mgr-gitnerd) push
104
+ "gh pr create ..." → Task(mgr-gitnerd) create PR
105
+ "git merge ..." → Task(mgr-gitnerd) merge
363
106
 
364
- ### Model Selection by Agent Type
365
-
366
- | Agent Category | Model | Examples |
367
- |----------------|-------|----------|
368
- | Orchestrator judgment | `opus` | Complex routing decisions |
369
- | Manager agents | `sonnet` | mgr-creator, mgr-updater, mgr-supplier |
370
- | Simple utilities | `haiku` | File operations, search |
371
- | Expert agents | `sonnet` | lang-golang-expert, lang-python-expert |
372
-
373
- ## CRITICAL: Git Operations Delegation
374
-
375
- ```
376
- ╔══════════════════════════════════════════════════════════════════╗
377
- ║ GIT OPERATIONS MUST BE DELEGATED TO mgr-gitnerd ║
378
- ║ ║
379
- ║ WRONG: ║
380
- ║ Main conversation → directly runs git commit/push ║
381
- ║ ║
382
- ║ CORRECT: ║
383
- ║ Main conversation → Task(mgr-gitnerd) → git commit/push ║
384
- ║ ║
385
- ║ mgr-gitnerd handles: ║
386
- ║ ✓ git commit (with proper message format) ║
387
- ║ ✓ git push ║
388
- ║ ✓ git branch operations ║
389
- ║ ✓ PR creation (gh pr create) ║
390
- ║ ║
391
- ║ This ensures: ║
392
- ║ - Consistent commit message format ║
393
- ║ - Safety checks before destructive operations ║
394
- ║ - Proper Co-Authored-By attribution ║
395
- ╚══════════════════════════════════════════════════════════════════╝
396
- ```
107
+ WRONG:
108
+ [Using external skill]
109
+ Main conversation directly runs "git push"
397
110
 
398
- ## CRITICAL: External Skills vs Internal Rules
111
+ CORRECT:
112
+ [Using external skill]
113
+ Main conversation → Task(mgr-gitnerd) → git push
399
114
 
400
- ```
401
- ╔══════════════════════════════════════════════════════════════════╗
402
- ║ INTERNAL RULES ALWAYS TAKE PRECEDENCE OVER EXTERNAL SKILLS ║
403
- ║ ║
404
- ║ External skills (e.g., finishing-a-development-branch) may ║
405
- ║ instruct direct git operations. IGNORE those instructions and ║
406
- ║ apply internal rules instead. ║
407
- ║ ║
408
- ║ Translation: ║
409
- ║ External skill says → Internal rule requires ║
410
- ║ ───────────────────────────────────────────────────────────── ║
411
- ║ "git commit -m ..." → Task(mgr-gitnerd) commit ║
412
- ║ "git push ..." → Task(mgr-gitnerd) push ║
413
- ║ "gh pr create ..." → Task(mgr-gitnerd) create PR ║
414
- ║ "git merge ..." → Task(mgr-gitnerd) merge ║
415
- ║ ║
416
- ║ WRONG: ║
417
- ║ [Using finishing-a-development-branch skill] ║
418
- ║ Main conversation → directly runs "git push" as skill says ║
419
- ║ ║
420
- ║ CORRECT: ║
421
- ║ [Using finishing-a-development-branch skill] ║
422
- ║ Main conversation → Task(mgr-gitnerd) → git push ║
423
- ║ ║
424
- ║ The skill's WORKFLOW is followed, but git EXECUTION is ║
425
- ║ delegated to mgr-gitnerd per R010. ║
426
- ╚══════════════════════════════════════════════════════════════════╝
115
+ The skill's WORKFLOW is followed, but git EXECUTION is delegated to mgr-gitnerd per R010.
427
116
  ```
428
117
 
429
- ## Agent Teams Integration
118
+ ## Agent Teams (when enabled)
430
119
 
431
- ```
432
- ╔══════════════════════════════════════════════════════════════════╗
433
- ║ AGENT TEAMS (ACTIVE WHEN ENABLED) ║
434
- ║ ║
435
- ║ When CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 is set: ║
436
- ║ → Actively use Agent Teams for qualifying tasks ║
437
- ║ → See R018 (SHOULD-agent-teams.md) for decision matrix ║
438
- ║ ║
439
- ║ Agent Teams enable: ║
440
- ║ - Peer-to-peer messaging between agents ║
441
- ║ - Shared task lists ║
442
- ║ - Complex collaborative workflows ║
443
- ║ ║
444
- ║ WHEN Agent Teams IS ENABLED: ║
445
- ║ - Use for research, review, debugging tasks (3+ agents) ║
446
- ║ - Use for tasks requiring inter-agent communication ║
447
- ║ - Use for shared state management ║
448
- ║ ║
449
- ║ WHEN Agent Teams IS NOT ENABLED (or for simple tasks): ║
450
- ║ - Use Task tool + routing skills (stable default) ║
451
- ║ - Focused, independent sub-tasks ║
452
- ║ - Cost-sensitive operations ║
453
- ║ ║
454
- ║ Both approaches coexist. Agent Teams adds coordination ║
455
- ║ richness, not replacement of Task tool. ║
456
- ╚══════════════════════════════════════════════════════════════════╝
457
- ```
120
+ When `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`: use Agent Teams for 3+ agent coordinated tasks. See R018 for decision matrix. Task tool remains fallback for simple/independent tasks.
458
121
 
459
- ## Enforcement
122
+ ## Announcement Format
460
123
 
461
124
  ```
462
- Violation examples:
463
- Reviewing Go + Python + TypeScript without routing/delegation
464
- Creating multiple agents without coordination plan
465
- ✗ Running parallel tasks without announcing execution plan
466
-
467
- Correct examples:
468
- ✓ Main conversation announces plan, spawns agents, aggregates results
469
- ✓ Clear execution plan with agent assignments
470
- ✓ Progress updates during multi-agent execution
125
+ [Routing] Using {routing-skill} for {task}
126
+ [Plan] Agent 1: {name} {task}, Agent 2: {name} → {task}
127
+ [Execution] Parallel ({n} instances)
471
128
  ```