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,274 @@
1
+ # Docker Best Practices Skill
2
+
3
+ > **Category**: Infrastructure
4
+ > **Source**: Internal (based on Docker Official Documentation)
5
+
6
+ ## Purpose
7
+
8
+ Apply Docker patterns for building optimized and secure container images.
9
+
10
+ ## Rules
11
+
12
+ ### 1. Layer Optimization
13
+
14
+ ```yaml
15
+ principles:
16
+ - Combine related RUN commands
17
+ - Sort multi-line arguments alphabetically
18
+ - Clean up in same layer
19
+
20
+ patterns: |
21
+ # GOOD: Single layer, clean cache
22
+ RUN apt-get update && apt-get install -y \
23
+ curl \
24
+ git \
25
+ vim \
26
+ && rm -rf /var/lib/apt/lists/*
27
+
28
+ # BAD: Multiple layers, cache remains
29
+ RUN apt-get update
30
+ RUN apt-get install -y curl
31
+ RUN apt-get install -y git
32
+ ```
33
+
34
+ ### 2. Multi-Stage Builds
35
+
36
+ ```yaml
37
+ purpose:
38
+ - Reduce final image size
39
+ - Separate build and runtime dependencies
40
+ - Security (no build tools in production)
41
+
42
+ pattern: |
43
+ # Build stage
44
+ FROM golang:1.21 AS builder
45
+ WORKDIR /app
46
+ COPY go.mod go.sum ./
47
+ RUN go mod download
48
+ COPY . .
49
+ RUN CGO_ENABLED=0 go build -o /app/server ./cmd/server
50
+
51
+ # Runtime stage
52
+ FROM gcr.io/distroless/static:nonroot
53
+ COPY --from=builder /app/server /server
54
+ USER nonroot:nonroot
55
+ ENTRYPOINT ["/server"]
56
+ ```
57
+
58
+ ### 3. Security
59
+
60
+ ```yaml
61
+ principles:
62
+ - Run as non-root user
63
+ - Pin base image versions
64
+ - Use minimal base images
65
+ - Don't store secrets in images
66
+
67
+ patterns: |
68
+ # Pin version with digest
69
+ FROM node:20-slim@sha256:abc123...
70
+
71
+ # Create non-root user
72
+ RUN groupadd -r appgroup && useradd -r -g appgroup appuser
73
+ USER appuser
74
+
75
+ # Use secrets mount (BuildKit)
76
+ RUN --mount=type=secret,id=npmrc,target=/root/.npmrc \
77
+ npm install
78
+
79
+ # .dockerignore for secrets
80
+ # .env
81
+ # *.pem
82
+ # credentials.json
83
+ ```
84
+
85
+ ### 4. Image Size Reduction
86
+
87
+ ```yaml
88
+ strategies:
89
+ - Use slim/alpine base images
90
+ - Remove build dependencies
91
+ - Use .dockerignore
92
+ - Multi-stage builds
93
+
94
+ minimal_bases:
95
+ distroless: "gcr.io/distroless/static"
96
+ alpine: "alpine:3.19"
97
+ slim: "debian:12-slim"
98
+
99
+ patterns: |
100
+ # Alpine for size
101
+ FROM python:3.12-alpine
102
+ RUN apk add --no-cache gcc musl-dev
103
+
104
+ # Distroless for security
105
+ FROM gcr.io/distroless/python3
106
+ COPY --from=builder /app /app
107
+ ```
108
+
109
+ ### 5. Cache Optimization
110
+
111
+ ```yaml
112
+ principles:
113
+ - Order from least to most frequently changing
114
+ - Copy dependency files first
115
+ - Use BuildKit cache mounts
116
+
117
+ patterns: |
118
+ # Copy dependency files first
119
+ COPY package.json package-lock.json ./
120
+ RUN npm ci
121
+
122
+ # Then copy source (changes frequently)
123
+ COPY . .
124
+ RUN npm run build
125
+
126
+ # BuildKit cache mount
127
+ RUN --mount=type=cache,target=/root/.cache/pip \
128
+ pip install -r requirements.txt
129
+ ```
130
+
131
+ ### 6. ENTRYPOINT vs CMD
132
+
133
+ ```yaml
134
+ entrypoint:
135
+ purpose: Main executable
136
+ form: exec form ["executable"]
137
+
138
+ cmd:
139
+ purpose: Default arguments
140
+ form: exec form ["arg1", "arg2"]
141
+
142
+ patterns: |
143
+ # Fixed command with variable args
144
+ ENTRYPOINT ["python", "app.py"]
145
+ CMD ["--port", "8080"]
146
+
147
+ # docker run myapp --port 3000
148
+ # Executes: python app.py --port 3000
149
+
150
+ # Flexible command
151
+ CMD ["python", "app.py"]
152
+
153
+ # docker run myapp bash
154
+ # Executes: bash
155
+ ```
156
+
157
+ ### 7. Health Checks
158
+
159
+ ```yaml
160
+ purpose: Container health monitoring
161
+ interval: how often to check
162
+ timeout: max time for check
163
+ retries: failures before unhealthy
164
+
165
+ pattern: |
166
+ HEALTHCHECK --interval=30s --timeout=3s --retries=3 \
167
+ CMD curl -f http://localhost:8080/health || exit 1
168
+ ```
169
+
170
+ ### 8. Docker Compose
171
+
172
+ ```yaml
173
+ best_practices:
174
+ - Use named volumes
175
+ - Define networks explicitly
176
+ - Use environment files
177
+ - Set resource limits
178
+
179
+ pattern: |
180
+ version: "3.8"
181
+
182
+ services:
183
+ app:
184
+ build:
185
+ context: .
186
+ target: production
187
+ environment:
188
+ - DATABASE_URL
189
+ env_file:
190
+ - .env
191
+ ports:
192
+ - "8080:8080"
193
+ depends_on:
194
+ db:
195
+ condition: service_healthy
196
+ deploy:
197
+ resources:
198
+ limits:
199
+ cpus: "1"
200
+ memory: 512M
201
+ networks:
202
+ - backend
203
+
204
+ db:
205
+ image: postgres:16-alpine
206
+ volumes:
207
+ - postgres_data:/var/lib/postgresql/data
208
+ healthcheck:
209
+ test: ["CMD-SHELL", "pg_isready -U postgres"]
210
+ interval: 10s
211
+ timeout: 5s
212
+ retries: 5
213
+ networks:
214
+ - backend
215
+
216
+ volumes:
217
+ postgres_data:
218
+
219
+ networks:
220
+ backend:
221
+ ```
222
+
223
+ ### 9. Common Patterns by Language
224
+
225
+ ```yaml
226
+ nodejs: |
227
+ FROM node:20-slim AS builder
228
+ WORKDIR /app
229
+ COPY package*.json ./
230
+ RUN npm ci --only=production
231
+
232
+ FROM gcr.io/distroless/nodejs20
233
+ WORKDIR /app
234
+ COPY --from=builder /app/node_modules ./node_modules
235
+ COPY . .
236
+ CMD ["server.js"]
237
+
238
+ python: |
239
+ FROM python:3.12-slim AS builder
240
+ WORKDIR /app
241
+ RUN pip install --user -r requirements.txt
242
+
243
+ FROM python:3.12-slim
244
+ WORKDIR /app
245
+ COPY --from=builder /root/.local /root/.local
246
+ COPY . .
247
+ ENV PATH=/root/.local/bin:$PATH
248
+ CMD ["python", "app.py"]
249
+
250
+ go: |
251
+ FROM golang:1.21 AS builder
252
+ WORKDIR /app
253
+ COPY go.* ./
254
+ RUN go mod download
255
+ COPY . .
256
+ RUN CGO_ENABLED=0 go build -o /server
257
+
258
+ FROM scratch
259
+ COPY --from=builder /server /server
260
+ ENTRYPOINT ["/server"]
261
+ ```
262
+
263
+ ## Application
264
+
265
+ When writing Dockerfiles:
266
+
267
+ 1. **Always** use multi-stage builds
268
+ 2. **Always** run as non-root user
269
+ 3. **Always** pin base image versions
270
+ 4. **Prefer** minimal base images
271
+ 5. **Order** layers for cache efficiency
272
+ 6. **Clean** package caches in same layer
273
+ 7. **Use** .dockerignore
274
+ 8. **Add** health checks
@@ -0,0 +1,26 @@
1
+ # Docker Best Practices Skill
2
+
3
+ metadata:
4
+ name: docker-best-practices
5
+ category: infrastructure
6
+ description: Docker patterns for optimized containerization
7
+
8
+ source:
9
+ type: internal
10
+ reference:
11
+ - https://docs.docker.com/
12
+ - https://docs.docker.com/develop/develop-images/dockerfile_best-practices/
13
+ - https://docs.docker.com/compose/compose-file/best-practices/
14
+
15
+ provides:
16
+ - Layer optimization
17
+ - Multi-stage builds
18
+ - Security best practices
19
+ - Image size reduction
20
+ - Cache optimization
21
+ - ENTRYPOINT vs CMD
22
+ - Health checks
23
+ - Docker Compose patterns
24
+
25
+ used_by:
26
+ - docker-expert
@@ -0,0 +1,214 @@
1
+ # Intent Detection Skill
2
+
3
+ > **Category**: Orchestration
4
+ > **Source**: Internal
5
+
6
+ ## Purpose
7
+
8
+ Automatically detect user intent and route to the appropriate agent with full transparency.
9
+
10
+ ## Detection Algorithm
11
+
12
+ ### 1. Input Analysis
13
+
14
+ ```
15
+ User Input: "Go 코드 리뷰해줘"
16
+
17
+
18
+ ┌─────────────────────────────┐
19
+ │ Tokenize & Extract │
20
+ ├─────────────────────────────┤
21
+ │ Keywords: ["Go"] │
22
+ │ Actions: ["리뷰"] │
23
+ │ File refs: [] │
24
+ │ Context: [] │
25
+ └─────────────────────────────┘
26
+ ```
27
+
28
+ ### 2. Pattern Matching
29
+
30
+ Match extracted tokens against agent triggers:
31
+
32
+ ```yaml
33
+ # For each agent in agent-triggers.yaml
34
+ match_score = 0
35
+
36
+ # Keyword match
37
+ for keyword in user_keywords:
38
+ if keyword in agent.keywords:
39
+ match_score += agent.keyword_weight (default: 40)
40
+
41
+ # Action match
42
+ for action in user_actions:
43
+ if action in agent.actions:
44
+ match_score += agent.action_weight (default: 40)
45
+
46
+ # File pattern match
47
+ for pattern in user_file_refs:
48
+ if matches(pattern, agent.file_patterns):
49
+ match_score += agent.file_weight (default: 30)
50
+
51
+ # Context bonus
52
+ if agent == recent_agent:
53
+ match_score += context_bonus (default: 10)
54
+ ```
55
+
56
+ ### 3. Confidence Calculation
57
+
58
+ ```
59
+ confidence = min(100, match_score)
60
+ ```
61
+
62
+ ### 4. Decision
63
+
64
+ ```
65
+ if confidence >= 90:
66
+ auto_execute()
67
+ elif confidence >= 70:
68
+ request_confirmation()
69
+ else:
70
+ list_options()
71
+ ```
72
+
73
+ ## Detection Patterns
74
+
75
+ ### Keyword Patterns
76
+
77
+ ```yaml
78
+ # Korean keywords
79
+ korean:
80
+ - "고" → go
81
+ - "파이썬" → python
82
+ - "러스트" → rust
83
+ - "타입스크립트" → typescript
84
+
85
+ # Action verbs (Korean)
86
+ actions_kr:
87
+ - "리뷰" → review
88
+ - "분석" → analyze
89
+ - "수정" → fix
90
+ - "생성" → create
91
+ - "만들어" → create
92
+ - "확인" → check
93
+ ```
94
+
95
+ ### File Pattern Matching
96
+
97
+ ```yaml
98
+ patterns:
99
+ go: ["*.go", "go.mod", "go.sum"]
100
+ python: ["*.py", "requirements.txt", "pyproject.toml", "setup.py"]
101
+ rust: ["*.rs", "Cargo.toml"]
102
+ typescript: ["*.ts", "*.tsx", "tsconfig.json"]
103
+ kotlin: ["*.kt", "*.kts", "build.gradle.kts"]
104
+ ```
105
+
106
+ ## Output Format
107
+
108
+ ### High Confidence
109
+
110
+ ```
111
+ [Intent Detected]
112
+ ├── Input: "Go 코드 리뷰해줘"
113
+ ├── Agent: golang-expert
114
+ ├── Confidence: 95%
115
+ └── Reason: "Go" keyword + "리뷰" action
116
+
117
+ ┌─ Agent: golang-expert (sw-engineer)
118
+ └─ Task: Code review
119
+ ```
120
+
121
+ ### Medium Confidence
122
+
123
+ ```
124
+ [Intent Detected]
125
+ ├── Input: "백엔드 API 확인해줘"
126
+ ├── Detected: go-backend-expert (?)
127
+ ├── Confidence: 78%
128
+ └── Alternatives available
129
+
130
+ Select agent:
131
+ 1. go-backend-expert (78%)
132
+ 2. fastapi-expert (72%)
133
+ 3. springboot-expert (68%)
134
+
135
+ Choice [1-3, or agent name]:
136
+ ```
137
+
138
+ ### Override
139
+
140
+ ```
141
+ [Override Detected]
142
+ ├── Input: "@python-expert review api.py"
143
+ ├── Agent: python-expert (explicit)
144
+ └── Bypassing intent detection
145
+
146
+ ┌─ Agent: python-expert (sw-engineer)
147
+ └─ Task: Review api.py
148
+ ```
149
+
150
+ ## Integration
151
+
152
+ ### With Secretary
153
+
154
+ ```
155
+ Secretary uses this skill to:
156
+ 1. Parse incoming user requests
157
+ 2. Detect intent and select agent
158
+ 3. Display reasoning
159
+ 4. Handle confirmations
160
+ 5. Route to selected agent
161
+ ```
162
+
163
+ ### With Agent Triggers
164
+
165
+ ```
166
+ Load triggers from:
167
+ skills/orchestration/intent-detection/patterns/agent-triggers.yaml
168
+
169
+ Each agent defines:
170
+ - keywords (language names, tech terms)
171
+ - file_patterns (extensions, config files)
172
+ - actions (supported actions)
173
+ - weights (scoring factors)
174
+ ```
175
+
176
+ ## Error Handling
177
+
178
+ ### No Match
179
+
180
+ ```
181
+ [Intent Unclear]
182
+ ├── Input: "도와줘"
183
+ ├── Confidence: < 30%
184
+ └── Too generic to detect intent
185
+
186
+ How can I help? Please be more specific:
187
+ - What type of task? (review, create, fix, ...)
188
+ - What language/technology? (Go, Python, ...)
189
+ - What file or project?
190
+ ```
191
+
192
+ ### Ambiguous Match
193
+
194
+ ```
195
+ [Intent Ambiguous]
196
+ ├── Input: "코드 리뷰"
197
+ ├── Top matches:
198
+ │ └── All experts: ~50% each
199
+ └── Need file context or language hint
200
+
201
+ Specify the language or provide a file path.
202
+ ```
203
+
204
+ ## Configuration
205
+
206
+ ```yaml
207
+ intent_detection:
208
+ enabled: true
209
+ auto_execute_threshold: 90
210
+ confirm_threshold: 70
211
+ show_reasoning: true
212
+ max_alternatives: 3
213
+ korean_support: true
214
+ ```
@@ -0,0 +1,30 @@
1
+ # Intent Detection Skill
2
+
3
+ metadata:
4
+ name: intent-detection
5
+ category: orchestration
6
+ description: Automatically detect user intent and route to appropriate agent
7
+
8
+ source:
9
+ type: internal
10
+
11
+ provides:
12
+ - Keyword extraction from user input
13
+ - Action verb detection (Korean + English)
14
+ - File pattern matching
15
+ - Agent matching with confidence scores
16
+ - Transparent reasoning display
17
+ - Override support (@agent syntax)
18
+
19
+ patterns:
20
+ location: ./patterns/agent-triggers.yaml
21
+
22
+ thresholds:
23
+ auto_execute: 90
24
+ confirm: 70
25
+ unclear: 30
26
+
27
+ used_by:
28
+ - secretary
29
+
30
+ rule: R015