oh-my-customcode 0.1.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.
Files changed (237) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +287 -0
  3. package/dist/cli/index.js +13299 -0
  4. package/dist/index.js +927 -0
  5. package/package.json +74 -0
  6. package/templates/.claude/contexts/dev.md +20 -0
  7. package/templates/.claude/contexts/ecomode.md +63 -0
  8. package/templates/.claude/contexts/index.yaml +41 -0
  9. package/templates/.claude/contexts/research.md +28 -0
  10. package/templates/.claude/contexts/review.md +23 -0
  11. package/templates/.claude/hooks/hooks.json +185 -0
  12. package/templates/.claude/hooks/hud/index.yaml +27 -0
  13. package/templates/.claude/hooks/hud/update-status.sh +32 -0
  14. package/templates/.claude/hooks/index.yaml +46 -0
  15. package/templates/.claude/hooks/memory-persistence/pre-compact.sh +37 -0
  16. package/templates/.claude/hooks/memory-persistence/session-end.sh +64 -0
  17. package/templates/.claude/hooks/memory-persistence/session-start.sh +41 -0
  18. package/templates/.claude/hooks/strategic-compact/suggest-compact.sh +50 -0
  19. package/templates/.claude/install-hooks.sh +100 -0
  20. package/templates/.claude/rules/MAY-optimization.md +93 -0
  21. package/templates/.claude/rules/MUST-agent-design.md +107 -0
  22. package/templates/.claude/rules/MUST-agent-identification.md +108 -0
  23. package/templates/.claude/rules/MUST-continuous-improvement.md +132 -0
  24. package/templates/.claude/rules/MUST-intent-transparency.md +199 -0
  25. package/templates/.claude/rules/MUST-language-policy.md +62 -0
  26. package/templates/.claude/rules/MUST-orchestrator-coordination.md +266 -0
  27. package/templates/.claude/rules/MUST-parallel-execution.md +341 -0
  28. package/templates/.claude/rules/MUST-permissions.md +84 -0
  29. package/templates/.claude/rules/MUST-safety.md +69 -0
  30. package/templates/.claude/rules/MUST-sync-verification.md +219 -0
  31. package/templates/.claude/rules/MUST-tool-identification.md +112 -0
  32. package/templates/.claude/rules/SHOULD-ecomode.md +145 -0
  33. package/templates/.claude/rules/SHOULD-error-handling.md +102 -0
  34. package/templates/.claude/rules/SHOULD-hud-statusline.md +89 -0
  35. package/templates/.claude/rules/SHOULD-interaction.md +103 -0
  36. package/templates/.claude/rules/SHOULD-memory-integration.md +114 -0
  37. package/templates/.claude/rules/SHOULD-pipeline-mode.md +165 -0
  38. package/templates/.claude/rules/index.yaml +125 -0
  39. package/templates/.claude/uninstall-hooks.sh +52 -0
  40. package/templates/CLAUDE.md.en +259 -0
  41. package/templates/CLAUDE.md.ko +259 -0
  42. package/templates/agents/index.yaml +237 -0
  43. package/templates/agents/infra-engineer/aws-expert/AGENT.md +47 -0
  44. package/templates/agents/infra-engineer/aws-expert/index.yaml +27 -0
  45. package/templates/agents/infra-engineer/docker-expert/AGENT.md +47 -0
  46. package/templates/agents/infra-engineer/docker-expert/index.yaml +27 -0
  47. package/templates/agents/manager/creator/AGENT.md +274 -0
  48. package/templates/agents/manager/creator/index.yaml +66 -0
  49. package/templates/agents/manager/gitnerd/AGENT.md +91 -0
  50. package/templates/agents/manager/gitnerd/index.yaml +55 -0
  51. package/templates/agents/manager/sauron/AGENT.md +153 -0
  52. package/templates/agents/manager/sauron/index.yaml +52 -0
  53. package/templates/agents/manager/supplier/AGENT.md +142 -0
  54. package/templates/agents/manager/supplier/index.yaml +31 -0
  55. package/templates/agents/manager/sync-checker/AGENT.md +34 -0
  56. package/templates/agents/manager/sync-checker/index.yaml +32 -0
  57. package/templates/agents/manager/updater/AGENT.md +125 -0
  58. package/templates/agents/manager/updater/index.yaml +31 -0
  59. package/templates/agents/orchestrator/dev-lead/AGENT.md +116 -0
  60. package/templates/agents/orchestrator/dev-lead/index.yaml +73 -0
  61. package/templates/agents/orchestrator/planner/AGENT.md +102 -0
  62. package/templates/agents/orchestrator/planner/index.yaml +38 -0
  63. package/templates/agents/orchestrator/qa-lead/AGENT.md +92 -0
  64. package/templates/agents/orchestrator/qa-lead/index.yaml +40 -0
  65. package/templates/agents/orchestrator/secretary/AGENT.md +132 -0
  66. package/templates/agents/orchestrator/secretary/index.yaml +55 -0
  67. package/templates/agents/qa-team/qa-engineer/AGENT.md +98 -0
  68. package/templates/agents/qa-team/qa-engineer/index.yaml +59 -0
  69. package/templates/agents/qa-team/qa-planner/AGENT.md +75 -0
  70. package/templates/agents/qa-team/qa-planner/index.yaml +47 -0
  71. package/templates/agents/qa-team/qa-writer/AGENT.md +98 -0
  72. package/templates/agents/qa-team/qa-writer/index.yaml +44 -0
  73. package/templates/agents/sw-architect/documenter/AGENT.md +120 -0
  74. package/templates/agents/sw-architect/documenter/index.yaml +39 -0
  75. package/templates/agents/sw-architect/speckit-agent/AGENT.md +127 -0
  76. package/templates/agents/sw-architect/speckit-agent/index.yaml +78 -0
  77. package/templates/agents/sw-engineer/backend/express-expert/AGENT.md +132 -0
  78. package/templates/agents/sw-engineer/backend/express-expert/index.yaml +36 -0
  79. package/templates/agents/sw-engineer/backend/fastapi-expert/AGENT.md +47 -0
  80. package/templates/agents/sw-engineer/backend/fastapi-expert/index.yaml +27 -0
  81. package/templates/agents/sw-engineer/backend/go-backend-expert/AGENT.md +47 -0
  82. package/templates/agents/sw-engineer/backend/go-backend-expert/index.yaml +27 -0
  83. package/templates/agents/sw-engineer/backend/nestjs-expert/AGENT.md +107 -0
  84. package/templates/agents/sw-engineer/backend/nestjs-expert/index.yaml +43 -0
  85. package/templates/agents/sw-engineer/backend/springboot-expert/AGENT.md +103 -0
  86. package/templates/agents/sw-engineer/backend/springboot-expert/index.yaml +69 -0
  87. package/templates/agents/sw-engineer/frontend/svelte-agent/AGENT.md +71 -0
  88. package/templates/agents/sw-engineer/frontend/svelte-agent/index.yaml +41 -0
  89. package/templates/agents/sw-engineer/frontend/vercel-agent/AGENT.md +67 -0
  90. package/templates/agents/sw-engineer/frontend/vercel-agent/index.yaml +43 -0
  91. package/templates/agents/sw-engineer/frontend/vuejs-agent/AGENT.md +71 -0
  92. package/templates/agents/sw-engineer/frontend/vuejs-agent/index.yaml +48 -0
  93. package/templates/agents/sw-engineer/language/golang-expert/AGENT.md +47 -0
  94. package/templates/agents/sw-engineer/language/golang-expert/index.yaml +27 -0
  95. package/templates/agents/sw-engineer/language/java21-expert/AGENT.md +122 -0
  96. package/templates/agents/sw-engineer/language/java21-expert/index.yaml +51 -0
  97. package/templates/agents/sw-engineer/language/kotlin-expert/AGENT.md +47 -0
  98. package/templates/agents/sw-engineer/language/kotlin-expert/index.yaml +27 -0
  99. package/templates/agents/sw-engineer/language/python-expert/AGENT.md +47 -0
  100. package/templates/agents/sw-engineer/language/python-expert/index.yaml +27 -0
  101. package/templates/agents/sw-engineer/language/rust-expert/AGENT.md +47 -0
  102. package/templates/agents/sw-engineer/language/rust-expert/index.yaml +27 -0
  103. package/templates/agents/sw-engineer/language/typescript-expert/AGENT.md +47 -0
  104. package/templates/agents/sw-engineer/language/typescript-expert/index.yaml +27 -0
  105. package/templates/agents/sw-engineer/tooling/bun-expert/AGENT.md +73 -0
  106. package/templates/agents/sw-engineer/tooling/bun-expert/index.yaml +46 -0
  107. package/templates/agents/sw-engineer/tooling/npm-expert/AGENT.md +160 -0
  108. package/templates/agents/sw-engineer/tooling/npm-expert/index.yaml +45 -0
  109. package/templates/agents/sw-engineer/tooling/optimizer/AGENT.md +170 -0
  110. package/templates/agents/sw-engineer/tooling/optimizer/index.yaml +45 -0
  111. package/templates/agents/system/memory-keeper/AGENT.md +126 -0
  112. package/templates/agents/system/memory-keeper/index.yaml +45 -0
  113. package/templates/agents/system/naggy/AGENT.md +72 -0
  114. package/templates/agents/system/naggy/index.yaml +35 -0
  115. package/templates/commands/COMMANDS.md +136 -0
  116. package/templates/commands/creator/agent.md +121 -0
  117. package/templates/commands/dev/refactor.md +126 -0
  118. package/templates/commands/dev/review.md +82 -0
  119. package/templates/commands/git/branch.yaml +8 -0
  120. package/templates/commands/git/commit.yaml +4 -0
  121. package/templates/commands/git/pr.yaml +4 -0
  122. package/templates/commands/git/status.yaml +4 -0
  123. package/templates/commands/git/sync.yaml +4 -0
  124. package/templates/commands/index.yaml +225 -0
  125. package/templates/commands/intent/explain.md +144 -0
  126. package/templates/commands/memory/recall.md +164 -0
  127. package/templates/commands/memory/save.md +128 -0
  128. package/templates/commands/naggy/add.yaml +8 -0
  129. package/templates/commands/naggy/done.yaml +8 -0
  130. package/templates/commands/naggy/list.yaml +4 -0
  131. package/templates/commands/naggy/priority.yaml +11 -0
  132. package/templates/commands/naggy/remind.yaml +4 -0
  133. package/templates/commands/npm/audit.yaml +62 -0
  134. package/templates/commands/npm/publish.yaml +52 -0
  135. package/templates/commands/npm/version.yaml +62 -0
  136. package/templates/commands/optimize/analyze.yaml +34 -0
  137. package/templates/commands/optimize/bundle.yaml +50 -0
  138. package/templates/commands/optimize/report.yaml +56 -0
  139. package/templates/commands/pipeline/list.md +81 -0
  140. package/templates/commands/pipeline/run.md +127 -0
  141. package/templates/commands/sauron/quick.yaml +4 -0
  142. package/templates/commands/sauron/report.yaml +4 -0
  143. package/templates/commands/sauron/watch.yaml +4 -0
  144. package/templates/commands/supplier/audit.md +133 -0
  145. package/templates/commands/supplier/fix.md +121 -0
  146. package/templates/commands/sync/agents.yaml +4 -0
  147. package/templates/commands/sync/check.yaml +4 -0
  148. package/templates/commands/sync/commands.yaml +4 -0
  149. package/templates/commands/sync/docs.yaml +4 -0
  150. package/templates/commands/sync/fix.yaml +4 -0
  151. package/templates/commands/system/help.md +137 -0
  152. package/templates/commands/system/lists.md +86 -0
  153. package/templates/commands/system/status.md +163 -0
  154. package/templates/commands/updater/docs.md +165 -0
  155. package/templates/commands/updater/external.md +214 -0
  156. package/templates/guides/aws/common-patterns.md +169 -0
  157. package/templates/guides/aws/index.yaml +26 -0
  158. package/templates/guides/aws/well-architected.md +143 -0
  159. package/templates/guides/claude-code/01-overview.md +42 -0
  160. package/templates/guides/claude-code/03-tools.md +107 -0
  161. package/templates/guides/claude-code/04-agent-skills.md +90 -0
  162. package/templates/guides/claude-code/05-agent-sdk.md +129 -0
  163. package/templates/guides/claude-code/06-mcp.md +165 -0
  164. package/templates/guides/claude-code/07-prompt-engineering.md +100 -0
  165. package/templates/guides/claude-code/08-testing.md +58 -0
  166. package/templates/guides/claude-code/09-guardrails.md +80 -0
  167. package/templates/guides/claude-code/10-monitoring.md +89 -0
  168. package/templates/guides/claude-code/index.yaml +51 -0
  169. package/templates/guides/docker/compose-best-practices.md +284 -0
  170. package/templates/guides/docker/dockerfile-best-practices.md +262 -0
  171. package/templates/guides/docker/index.yaml +26 -0
  172. package/templates/guides/fastapi/best-practices.md +232 -0
  173. package/templates/guides/fastapi/index.yaml +21 -0
  174. package/templates/guides/go-backend/index.yaml +26 -0
  175. package/templates/guides/go-backend/project-layout.md +243 -0
  176. package/templates/guides/go-backend/uber-style.md +212 -0
  177. package/templates/guides/golang/concurrency.md +282 -0
  178. package/templates/guides/golang/effective-go.md +309 -0
  179. package/templates/guides/golang/error-handling.md +250 -0
  180. package/templates/guides/golang/index.yaml +27 -0
  181. package/templates/guides/index.yaml +101 -0
  182. package/templates/guides/kotlin/coding-conventions.md +247 -0
  183. package/templates/guides/kotlin/idioms.md +234 -0
  184. package/templates/guides/kotlin/index.yaml +26 -0
  185. package/templates/guides/python/index.yaml +26 -0
  186. package/templates/guides/python/pep8-style-guide.md +202 -0
  187. package/templates/guides/python/zen-of-python.md +79 -0
  188. package/templates/guides/rust/error-handling.md +262 -0
  189. package/templates/guides/rust/index.yaml +26 -0
  190. package/templates/guides/rust/ownership.md +180 -0
  191. package/templates/guides/springboot/best-practices.md +361 -0
  192. package/templates/guides/springboot/index.yaml +22 -0
  193. package/templates/guides/typescript/advanced-types.md +225 -0
  194. package/templates/guides/typescript/index.yaml +26 -0
  195. package/templates/guides/typescript/type-system.md +219 -0
  196. package/templates/guides/web-design/accessibility.md +66 -0
  197. package/templates/guides/web-design/index.yaml +20 -0
  198. package/templates/guides/web-design/performance.md +102 -0
  199. package/templates/pipelines/examples/code-review.yaml +66 -0
  200. package/templates/pipelines/index.yaml +18 -0
  201. package/templates/pipelines/templates/pipeline-template.yaml +50 -0
  202. package/templates/skills/backend/fastapi-best-practices/SKILL.md +269 -0
  203. package/templates/skills/backend/fastapi-best-practices/index.yaml +25 -0
  204. package/templates/skills/backend/go-backend-best-practices/SKILL.md +337 -0
  205. package/templates/skills/backend/go-backend-best-practices/index.yaml +26 -0
  206. package/templates/skills/backend/springboot-best-practices/SKILL.md +356 -0
  207. package/templates/skills/backend/springboot-best-practices/index.yaml +27 -0
  208. package/templates/skills/development/go-best-practices/SKILL.md +202 -0
  209. package/templates/skills/development/go-best-practices/index.yaml +25 -0
  210. package/templates/skills/development/kotlin-best-practices/SKILL.md +255 -0
  211. package/templates/skills/development/kotlin-best-practices/index.yaml +27 -0
  212. package/templates/skills/development/python-best-practices/SKILL.md +221 -0
  213. package/templates/skills/development/python-best-practices/index.yaml +25 -0
  214. package/templates/skills/development/react-best-practices/SKILL.md +100 -0
  215. package/templates/skills/development/react-best-practices/index.yaml +39 -0
  216. package/templates/skills/development/rust-best-practices/SKILL.md +266 -0
  217. package/templates/skills/development/rust-best-practices/index.yaml +26 -0
  218. package/templates/skills/development/typescript-best-practices/SKILL.md +320 -0
  219. package/templates/skills/development/typescript-best-practices/index.yaml +28 -0
  220. package/templates/skills/development/vercel-deploy/SKILL.md +73 -0
  221. package/templates/skills/development/vercel-deploy/index.yaml +30 -0
  222. package/templates/skills/development/web-design-guidelines/SKILL.md +117 -0
  223. package/templates/skills/development/web-design-guidelines/index.yaml +34 -0
  224. package/templates/skills/index.yaml +129 -0
  225. package/templates/skills/infrastructure/aws-best-practices/SKILL.md +279 -0
  226. package/templates/skills/infrastructure/aws-best-practices/index.yaml +27 -0
  227. package/templates/skills/infrastructure/docker-best-practices/SKILL.md +274 -0
  228. package/templates/skills/infrastructure/docker-best-practices/index.yaml +26 -0
  229. package/templates/skills/orchestration/intent-detection/SKILL.md +214 -0
  230. package/templates/skills/orchestration/intent-detection/index.yaml +30 -0
  231. package/templates/skills/orchestration/intent-detection/patterns/agent-triggers.yaml +333 -0
  232. package/templates/skills/orchestration/pipeline-execution/SKILL.md +188 -0
  233. package/templates/skills/orchestration/pipeline-execution/index.yaml +27 -0
  234. package/templates/skills/system/memory-management/SKILL.md +194 -0
  235. package/templates/skills/system/memory-management/index.yaml +30 -0
  236. package/templates/skills/system/result-aggregation/SKILL.md +163 -0
  237. package/templates/skills/system/result-aggregation/index.yaml +36 -0
@@ -0,0 +1,199 @@
1
+ # [MUST] Intent Transparency Rules
2
+
3
+ > **Priority**: MUST - Required for user control
4
+ > **ID**: R015
5
+
6
+ ## Purpose
7
+
8
+ Ensure transparency when automatically detecting user intent and routing to agents. Users should always understand why a specific agent was chosen.
9
+
10
+ ## Detection Display (REQUIRED)
11
+
12
+ When intent is detected, display the reasoning:
13
+
14
+ ```
15
+ [Intent Detected]
16
+ ├── Input: "{user input}"
17
+ ├── Agent: {detected-agent}
18
+ ├── Confidence: {percentage}%
19
+ └── Reason: {explanation}
20
+ ```
21
+
22
+ ## Confidence Thresholds
23
+
24
+ | Confidence | Action |
25
+ |------------|--------|
26
+ | >= 90% | Auto-execute with display |
27
+ | 70-89% | Request confirmation |
28
+ | < 70% | List options for user to choose |
29
+
30
+ ## Detection Factors
31
+
32
+ Intent is detected using multiple factors:
33
+
34
+ ```yaml
35
+ factors:
36
+ keywords:
37
+ weight: 40
38
+ description: Language-specific keywords in input
39
+ example: "Go", "Python", "리뷰", "생성"
40
+
41
+ file_patterns:
42
+ weight: 30
43
+ description: File extensions mentioned or in context
44
+ example: "*.go", "main.py"
45
+
46
+ action_verbs:
47
+ weight: 20
48
+ description: Action words in user input
49
+ example: "review", "create", "fix", "리뷰", "생성"
50
+
51
+ context:
52
+ weight: 10
53
+ description: Recent conversation context
54
+ example: Previous agent used, current working directory
55
+ ```
56
+
57
+ ## High Confidence Display (>= 90%)
58
+
59
+ ```
60
+ [Intent Detected]
61
+ ├── Input: "Go 코드 리뷰해줘"
62
+ ├── Agent: golang-expert
63
+ ├── Confidence: 95%
64
+ └── Reason: "Go" keyword (40%) + "리뷰" action verb (55%)
65
+
66
+ Executing...
67
+ ```
68
+
69
+ ## Medium Confidence Display (70-89%)
70
+
71
+ ```
72
+ [Intent Detected]
73
+ ├── Input: "백엔드 코드 체크해줘"
74
+ ├── Agent: go-backend-expert (?)
75
+ ├── Confidence: 75%
76
+ └── Reason: "백엔드" keyword (40%) + "체크" action (35%)
77
+
78
+ Possible alternatives:
79
+ 1. go-backend-expert (75%)
80
+ 2. fastapi-expert (65%)
81
+ 3. springboot-expert (60%)
82
+
83
+ Proceed with go-backend-expert? [Y/n/1-3]
84
+ ```
85
+
86
+ ## Low Confidence Display (< 70%)
87
+
88
+ ```
89
+ [Intent Unclear]
90
+ ├── Input: "이 코드 좀 봐줘"
91
+ ├── Confidence: < 70%
92
+ └── Need more context
93
+
94
+ Available agents for code review:
95
+ 1. golang-expert (Go files)
96
+ 2. python-expert (Python files)
97
+ 3. typescript-expert (TypeScript files)
98
+ 4. rust-expert (Rust files)
99
+
100
+ Which agent should review the code? [1-4]
101
+ ```
102
+
103
+ ## Override Syntax
104
+
105
+ Users can explicitly specify an agent:
106
+
107
+ ```
108
+ @{agent-name} {command}
109
+ ```
110
+
111
+ Examples:
112
+ ```
113
+ @golang-expert review this code
114
+ @python-expert src/main.py 분석해줘
115
+ @secretary create a new agent
116
+ ```
117
+
118
+ Override bypasses intent detection:
119
+
120
+ ```
121
+ [Override] Agent explicitly specified: python-expert
122
+ Executing...
123
+ ```
124
+
125
+ ## Implementation
126
+
127
+ ### Secretary Workflow
128
+
129
+ ```
130
+ 1. Receive user input
131
+ 2. Check for explicit override (@agent)
132
+ 3. If no override:
133
+ a. Extract keywords, file patterns, action verbs
134
+ b. Match against agent triggers
135
+ c. Calculate confidence score
136
+ d. Display detection reasoning
137
+ e. Execute or request confirmation based on threshold
138
+ 4. Route to selected agent
139
+ ```
140
+
141
+ ### Detection Log
142
+
143
+ For debugging and transparency:
144
+
145
+ ```yaml
146
+ detection_log:
147
+ input: "Go 코드 리뷰해줘"
148
+ extracted:
149
+ keywords: ["Go"]
150
+ file_patterns: []
151
+ action_verbs: ["리뷰"]
152
+ matches:
153
+ - agent: golang-expert
154
+ score: 95
155
+ breakdown:
156
+ keyword_go: 40
157
+ action_review: 40
158
+ context: 15
159
+ selected: golang-expert
160
+ confidence: 95%
161
+ ```
162
+
163
+ ## Agent Triggers
164
+
165
+ Each agent has defined triggers in:
166
+ `skills/orchestration/intent-detection/patterns/agent-triggers.yaml`
167
+
168
+ ```yaml
169
+ agents:
170
+ golang-expert:
171
+ keywords: [go, golang, "go 언어"]
172
+ file_patterns: ["*.go", "go.mod", "go.sum"]
173
+ actions: [review, analyze, fix, optimize]
174
+ base_confidence: 40
175
+
176
+ python-expert:
177
+ keywords: [python, py, "파이썬"]
178
+ file_patterns: ["*.py", "requirements.txt", "pyproject.toml"]
179
+ actions: [review, analyze, fix, optimize]
180
+ base_confidence: 40
181
+ ```
182
+
183
+ ## Benefits
184
+
185
+ 1. **Transparency**: Users understand agent selection
186
+ 2. **Control**: Users can override or choose alternatives
187
+ 3. **Trust**: Clear reasoning builds user confidence
188
+ 4. **Learning**: Users learn which agents handle what
189
+ 5. **Debugging**: Clear logs for troubleshooting
190
+
191
+ ## Violations
192
+
193
+ Proceeding without displaying intent reasoning = Rule violation
194
+
195
+ The user must always know:
196
+ - Which agent was selected
197
+ - Why it was selected
198
+ - What confidence level
199
+ - How to override if needed
@@ -0,0 +1,62 @@
1
+ # [MUST] Language & Delegation Policy
2
+
3
+ > **Priority**: MUST - Never violate
4
+ > **ID**: R000
5
+
6
+ ## Core Principles
7
+
8
+ ### 1. User Input Language
9
+ ```
10
+ User prompts are in Korean.
11
+ Always understand and process Korean input.
12
+ ```
13
+
14
+ ### 2. Output Language
15
+
16
+ | Context | Language | Example |
17
+ |---------|----------|---------|
18
+ | User communication | Korean | 상태 보고, 질문, 설명 |
19
+ | Code | English | variables, functions, comments |
20
+ | File contents | English | .md, .yaml, configs |
21
+ | Commit messages | English | git commits |
22
+ | Error messages to user | Korean | 에러 설명, 해결 방안 |
23
+
24
+ ### 3. Delegation Model
25
+ ```
26
+ User does NOT directly edit files.
27
+ User delegates ALL file operations to AI agent.
28
+
29
+ User → (Korean prompt) → Agent → (file operations)
30
+ ```
31
+
32
+ ### 4. Context Efficiency
33
+ ```
34
+ All file contents in English for:
35
+ - Token efficiency
36
+ - Consistent parsing
37
+ - Universal compatibility
38
+ ```
39
+
40
+ ## Examples
41
+
42
+ ### Correct
43
+ ```
44
+ User: "새로운 에이전트를 만들어줘"
45
+ Agent: "에이전트를 생성하겠습니다." (Korean to user)
46
+ Agent writes AGENT.md in English
47
+ ```
48
+
49
+ ### Incorrect
50
+ ```
51
+ Agent writes: "# 에이전트 이름" in file ← Wrong
52
+ Agent writes: "# Agent Name" in file ← Correct
53
+ ```
54
+
55
+ ## File Naming
56
+
57
+ | Type | Convention | Example |
58
+ |------|------------|---------|
59
+ | Rules | `{PRIORITY}-{name}.md` | `MUST-safety.md` |
60
+ | Agents | `AGENT.md` | - |
61
+ | Skills | `SKILL.md` | - |
62
+ | Index | `index.yaml` | - |
@@ -0,0 +1,266 @@
1
+ # [MUST] Orchestrator Coordination Rules
2
+
3
+ > **Priority**: MUST - ENFORCED for multi-agent tasks
4
+ > **ID**: R010
5
+ > **Violation**: Direct agent execution without orchestrator = Rule violation
6
+
7
+ ## CRITICAL
8
+
9
+ **When a task requires multiple agents, the APPROPRIATE orchestrator MUST coordinate.**
10
+
11
+ ### Session Continuity (MANDATORY)
12
+
13
+ ```
14
+ ╔══════════════════════════════════════════════════════════════════╗
15
+ ║ AFTER SESSION RESTART / CONTEXT COMPACTION: ║
16
+ ║ ║
17
+ ║ 1. Re-read CLAUDE.md and rules IMMEDIATELY ║
18
+ ║ 2. Agent delegation rules STILL APPLY ║
19
+ ║ 3. Orchestrator must NOT execute work directly ║
20
+ ║ 4. Must spawn Task agents for actual work ║
21
+ ║ ║
22
+ ║ WRONG after session restart: ║
23
+ ║ dev-lead → directly runs Bash/Edit/Write ║
24
+ ║ ║
25
+ ║ CORRECT after session restart: ║
26
+ ║ dev-lead → Task(springboot-expert) → runs Bash/Edit/Write ║
27
+ ╚══════════════════════════════════════════════════════════════════╝
28
+ ```
29
+
30
+ ### Orchestrator Direct Action Prohibition (MANDATORY)
31
+
32
+ ```
33
+ ╔══════════════════════════════════════════════════════════════════╗
34
+ ║ ORCHESTRATORS (secretary, dev-lead) MUST NOT: ║
35
+ ║ ║
36
+ ║ ✗ Directly run Bash commands for code/build tasks ║
37
+ ║ ✗ Directly Edit/Write source code files ║
38
+ ║ ✗ Directly modify project configuration ║
39
+ ║ ║
40
+ ║ ORCHESTRATORS MUST: ║
41
+ ║ ║
42
+ ║ ✓ Analyze task and identify required agents ║
43
+ ║ ✓ Spawn Task agents with appropriate expert roles ║
44
+ ║ ✓ Aggregate results from spawned agents ║
45
+ ║ ✓ Report summary to user ║
46
+ ║ ║
47
+ ║ Only allowed direct tools: Read, Glob, Grep (for analysis) ║
48
+ ╚══════════════════════════════════════════════════════════════════╝
49
+ ```
50
+
51
+ ### Orchestrator Role Separation (MANDATORY)
52
+
53
+ ```
54
+ ╔══════════════════════════════════════════════════════════════════╗
55
+ ║ WHICH ORCHESTRATOR TO USE? ║
56
+ ║ ║
57
+ ║ Task Domain → Orchestrator ║
58
+ ║ ───────────────────────────────────────────────── ║
59
+ ║ Agent creation/update/audit → secretary ║
60
+ ║ Code review/refactoring → dev-lead ║
61
+ ║ Feature implementation → dev-lead ║
62
+ ║ Multi-language development → dev-lead ║
63
+ ║ Manager agent coordination → secretary ║
64
+ ║ SW/Backend engineer tasks → dev-lead ║
65
+ ║ ║
66
+ ║ WRONG: secretary directing kotlin-expert for code work ║
67
+ ║ RIGHT: dev-lead directing kotlin-expert for code work ║
68
+ ╚══════════════════════════════════════════════════════════════════╝
69
+ ```
70
+
71
+ ### Orchestrator Responsibilities
72
+
73
+ | Orchestrator | Supervises | Handles |
74
+ |--------------|------------|---------|
75
+ | **secretary** | manager/* (creator, updater, supplier, memory-keeper) | Agent management, system operations |
76
+ | **dev-lead** | sw-engineer/*, sw-engineer/backend/* | Development, code review, implementation |
77
+
78
+ ```
79
+ Multi-agent detection:
80
+ - Task spans multiple domains (frontend + backend)
81
+ - Task requires different expertise (golang + python)
82
+ - Task involves batch operations on different resources
83
+
84
+ If multi-agent needed → secretary MUST coordinate
85
+ ```
86
+
87
+ ## Coordination Flow
88
+
89
+ ```
90
+ CORRECT:
91
+ User Request
92
+
93
+
94
+ ┌─────────────────────────────┐
95
+ │ secretary (orchestrator) │
96
+ │ - Analyzes task │
97
+ │ - Identifies required agents│
98
+ │ - Plans execution │
99
+ └─────────────┬───────────────┘
100
+
101
+ ┌─────────┼─────────┐
102
+ ▼ ▼ ▼
103
+ [Agent-1] [Agent-2] [Agent-3]
104
+ │ │ │
105
+ └─────────┼─────────┘
106
+
107
+ ┌─────────────────────────────┐
108
+ │ secretary (orchestrator) │
109
+ │ - Aggregates results │
110
+ │ - Reports to user │
111
+ └─────────────────────────────┘
112
+
113
+ WRONG:
114
+ User Request
115
+
116
+
117
+ [Agent-1] → [Agent-2] → [Agent-3]
118
+ (No coordination, ad-hoc execution)
119
+ ```
120
+
121
+ ## Secretary Responsibilities
122
+
123
+ ```yaml
124
+ before_execution:
125
+ - Analyze user request
126
+ - Identify required agents
127
+ - Check agent availability
128
+ - Plan execution order (parallel vs sequential)
129
+ - Announce coordination plan
130
+
131
+ during_execution:
132
+ - Spawn agent instances
133
+ - Monitor progress
134
+ - Handle failures
135
+ - Coordinate dependencies
136
+
137
+ after_execution:
138
+ - Aggregate results
139
+ - Report summary to user
140
+ - Clean up resources
141
+ ```
142
+
143
+ ## Announcement Format
144
+
145
+ Secretary MUST announce before delegating:
146
+
147
+ ```
148
+ ┌─ Agent: secretary (orchestrator)
149
+ └─ Task: Coordinating multi-agent task
150
+
151
+ [Plan]
152
+ ├── Agent 1: golang-expert → Review Go code
153
+ ├── Agent 2: python-expert → Review Python code
154
+ └── Agent 3: typescript-expert → Review TS code
155
+
156
+ [Execution] Parallel (3 instances)
157
+
158
+ Spawning agents...
159
+ ```
160
+
161
+ ## When to Use Orchestrator
162
+
163
+ | Scenario | Orchestrator Required |
164
+ |----------|----------------------|
165
+ | Single domain, single file | No |
166
+ | Single domain, multiple files | Maybe (if parallel) |
167
+ | Multiple domains | **Yes** |
168
+ | Batch operations | **Yes** |
169
+ | Complex workflow | **Yes** |
170
+
171
+ ## Exception: Simple Tasks
172
+
173
+ Orchestrator NOT required for:
174
+ - Single file operations
175
+ - Single domain questions
176
+ - Direct tool usage (Read, Write, etc.)
177
+
178
+ These can be handled by the appropriate agent directly.
179
+
180
+ ## CRITICAL: Use Specialized Manager Agents
181
+
182
+ **When a task matches a manager agent's purpose, you MUST delegate to that agent.**
183
+
184
+ ```
185
+ ╔══════════════════════════════════════════════════════════════════╗
186
+ ║ MANAGER AGENT DELEGATION (MANDATORY) ║
187
+ ║ ║
188
+ ║ Task Type → Required Agent ║
189
+ ║ ───────────────────────────────────────────────── ║
190
+ ║ Create new agent → creator ║
191
+ ║ Update external agent → updater ║
192
+ ║ Audit dependencies → supplier ║
193
+ ║ Memory operations → memory-keeper ║
194
+ ║ ║
195
+ ║ DO NOT use general-purpose agents for these tasks. ║
196
+ ║ DO NOT have secretary do the work directly. ║
197
+ ╚══════════════════════════════════════════════════════════════════╝
198
+ ```
199
+
200
+ ### Correct Delegation Pattern
201
+
202
+ ```
203
+ User: "java21-expert 에이전트를 만들어줘"
204
+
205
+ WRONG:
206
+ secretary → Task(general-purpose) → creates files directly
207
+
208
+ CORRECT:
209
+ secretary → Task(creator agent role) → follows creator workflow
210
+ ```
211
+
212
+ ### Manager Agents Reference
213
+
214
+ | Agent | Location | Purpose |
215
+ |-------|----------|---------|
216
+ | creator | agents/manager/creator/ | Create new agents |
217
+ | updater | agents/manager/updater/ | Update external sources |
218
+ | supplier | agents/manager/supplier/ | Audit dependencies |
219
+ | gitnerd | agents/manager/gitnerd/ | Git operations (commit, push, PR) |
220
+ | sync-checker | agents/manager/sync-checker/ | Documentation sync verification |
221
+
222
+ ### System Agents Reference
223
+
224
+ | Agent | Location | Purpose |
225
+ |-------|----------|---------|
226
+ | memory-keeper | agents/system/memory-keeper/ | Memory operations |
227
+ | naggy | agents/system/naggy/ | TODO management |
228
+
229
+ ## CRITICAL: Git Operations Delegation
230
+
231
+ ```
232
+ ╔══════════════════════════════════════════════════════════════════╗
233
+ ║ GIT OPERATIONS MUST BE DELEGATED TO gitnerd ║
234
+ ║ ║
235
+ ║ WRONG: ║
236
+ ║ secretary/dev-lead → directly runs git commit/push ║
237
+ ║ ║
238
+ ║ CORRECT: ║
239
+ ║ secretary → Task(gitnerd) → git commit/push ║
240
+ ║ ║
241
+ ║ gitnerd handles: ║
242
+ ║ ✓ git commit (with proper message format) ║
243
+ ║ ✓ git push ║
244
+ ║ ✓ git branch operations ║
245
+ ║ ✓ PR creation ║
246
+ ║ ║
247
+ ║ This ensures: ║
248
+ ║ - Consistent commit message format ║
249
+ ║ - Safety checks before destructive operations ║
250
+ ║ - Proper Co-Authored-By attribution ║
251
+ ╚══════════════════════════════════════════════════════════════════╝
252
+ ```
253
+
254
+ ## Enforcement
255
+
256
+ ```
257
+ Violation examples:
258
+ ✗ Reviewing Go + Python + TypeScript without secretary
259
+ ✗ Creating multiple agents without coordination plan
260
+ ✗ Running parallel tasks without announcing execution plan
261
+
262
+ Correct examples:
263
+ ✓ Secretary announces plan, spawns agents, aggregates results
264
+ ✓ Clear execution plan with agent assignments
265
+ ✓ Progress updates during multi-agent execution
266
+ ```