oh-my-agent-commandcode 0.0.0-stage → 20.38.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 (334) hide show
  1. package/README.md +35 -2
  2. package/filter-test-output.sh +52 -0
  3. package/mods/oma.ts +347 -0
  4. package/package.json +30 -4
  5. package/skills/_shared/conditional/experiment-ledger.md +28 -0
  6. package/skills/_shared/conditional/exploration-loop.md +22 -0
  7. package/skills/_shared/conditional/quality-score.md +33 -0
  8. package/skills/_shared/core/anti-ai-prose.md +191 -0
  9. package/skills/_shared/core/api-contracts/README.md +28 -0
  10. package/skills/_shared/core/api-contracts/template.md +90 -0
  11. package/skills/_shared/core/clarification-protocol.md +23 -0
  12. package/skills/_shared/core/code-intelligence.md +46 -0
  13. package/skills/_shared/core/collaboration-policy.md +28 -0
  14. package/skills/_shared/core/common-checklist.md +28 -0
  15. package/skills/_shared/core/context-budget.md +22 -0
  16. package/skills/_shared/core/context-loading.md +34 -0
  17. package/skills/_shared/core/difficulty-guide.md +26 -0
  18. package/skills/_shared/core/execution-policy.md +31 -0
  19. package/skills/_shared/core/lessons-learned.md +33 -0
  20. package/skills/_shared/core/prompt-structure.md +18 -0
  21. package/skills/_shared/core/quality-principles.md +11 -0
  22. package/skills/_shared/core/session-metrics.md +35 -0
  23. package/skills/_shared/core/skill-routing.md +39 -0
  24. package/skills/_shared/core/test-approach.md +54 -0
  25. package/skills/_shared/core/vendor-detection.md +52 -0
  26. package/skills/_shared/runtime/memory-protocol.md +118 -0
  27. package/skills/_shared/runtime/result-contract.md +64 -0
  28. package/skills/_shared/ui-interaction-quality.md +133 -0
  29. package/skills/oma-academic-writing/SKILL.md +181 -0
  30. package/skills/oma-academic-writing/resources/abstract-guide.md +51 -0
  31. package/skills/oma-academic-writing/resources/academic-verb-tiers.md +42 -0
  32. package/skills/oma-academic-writing/resources/anti-ai-checklist.md +52 -0
  33. package/skills/oma-academic-writing/resources/hedging-guide.md +132 -0
  34. package/skills/oma-academic-writing/resources/sentence-structure-reference.md +151 -0
  35. package/skills/oma-architecture/SKILL.md +203 -0
  36. package/skills/oma-architecture/resources/api-evolution.md +41 -0
  37. package/skills/oma-architecture/resources/checklist.md +42 -0
  38. package/skills/oma-architecture/resources/execution-protocol.md +115 -0
  39. package/skills/oma-architecture/resources/methodology-selection.md +92 -0
  40. package/skills/oma-architecture/resources/migration-patterns.md +28 -0
  41. package/skills/oma-architecture/resources/output-templates.md +111 -0
  42. package/skills/oma-architecture/resources/stakeholder-synthesis.md +80 -0
  43. package/skills/oma-backend/SKILL.md +202 -0
  44. package/skills/oma-backend/resources/checklist.md +45 -0
  45. package/skills/oma-backend/resources/error-playbook.md +97 -0
  46. package/skills/oma-backend/resources/execution-protocol.md +39 -0
  47. package/skills/oma-backend/resources/orm-reference.md +61 -0
  48. package/skills/oma-backend/variants/node/api-template.ts +315 -0
  49. package/skills/oma-backend/variants/node/snippets.md +475 -0
  50. package/skills/oma-backend/variants/node/stack.yaml +21 -0
  51. package/skills/oma-backend/variants/node/tech-stack.md +33 -0
  52. package/skills/oma-backend/variants/python/api-template.py +378 -0
  53. package/skills/oma-backend/variants/python/snippets.md +199 -0
  54. package/skills/oma-backend/variants/python/stack.yaml +18 -0
  55. package/skills/oma-backend/variants/python/tech-stack.md +45 -0
  56. package/skills/oma-backend/variants/rust/api-template.rs +635 -0
  57. package/skills/oma-backend/variants/rust/snippets.md +471 -0
  58. package/skills/oma-backend/variants/rust/stack.yaml +20 -0
  59. package/skills/oma-backend/variants/rust/tech-stack.md +36 -0
  60. package/skills/oma-backend/variants/stack.schema.json +73 -0
  61. package/skills/oma-brainstorm/SKILL.md +166 -0
  62. package/skills/oma-brainstorm/resources/triz-lite.md +117 -0
  63. package/skills/oma-coordination/SKILL.md +171 -0
  64. package/skills/oma-db/SKILL.md +201 -0
  65. package/skills/oma-db/resources/anti-patterns.md +177 -0
  66. package/skills/oma-db/resources/checklist.md +67 -0
  67. package/skills/oma-db/resources/document-templates.md +107 -0
  68. package/skills/oma-db/resources/error-playbook.md +50 -0
  69. package/skills/oma-db/resources/examples.md +170 -0
  70. package/skills/oma-db/resources/execution-protocol.md +127 -0
  71. package/skills/oma-db/resources/iso-controls.md +98 -0
  72. package/skills/oma-db/resources/migration-playbook.md +93 -0
  73. package/skills/oma-db/resources/query-tuning.md +57 -0
  74. package/skills/oma-db/resources/vector-db.md +159 -0
  75. package/skills/oma-debug/SKILL.md +146 -0
  76. package/skills/oma-debug/resources/bug-report-template.md +327 -0
  77. package/skills/oma-debug/resources/checklist.md +31 -0
  78. package/skills/oma-debug/resources/common-patterns.md +734 -0
  79. package/skills/oma-debug/resources/debugging-checklist.md +364 -0
  80. package/skills/oma-debug/resources/error-playbook.md +94 -0
  81. package/skills/oma-debug/resources/execution-protocol.md +40 -0
  82. package/skills/oma-design/SKILL.md +135 -0
  83. package/skills/oma-design/resources/asset-strategy.md +34 -0
  84. package/skills/oma-design/resources/checklist.md +63 -0
  85. package/skills/oma-design/resources/data-grid.md +48 -0
  86. package/skills/oma-design/resources/design-md-spec.md +107 -0
  87. package/skills/oma-design/resources/design-tokens.md +53 -0
  88. package/skills/oma-design/resources/error-playbook.md +18 -0
  89. package/skills/oma-design/resources/execution-protocol.md +95 -0
  90. package/skills/oma-design/resources/external-design-skills.md +130 -0
  91. package/skills/oma-design/resources/getdesign-fetcher.md +104 -0
  92. package/skills/oma-design/resources/product-interface-review.md +59 -0
  93. package/skills/oma-design/resources/redesign-protocol.md +52 -0
  94. package/skills/oma-design/resources/stitch-integration.md +244 -0
  95. package/skills/oma-dev-workflow/SKILL.md +375 -0
  96. package/skills/oma-dev-workflow/resources/affected-checks.py +58 -0
  97. package/skills/oma-dev-workflow/resources/api-workflows.md +58 -0
  98. package/skills/oma-dev-workflow/resources/database-patterns.md +107 -0
  99. package/skills/oma-dev-workflow/resources/i18n-patterns.md +63 -0
  100. package/skills/oma-dev-workflow/resources/release-coordination.md +240 -0
  101. package/skills/oma-dev-workflow/resources/tooling-profiles.md +217 -0
  102. package/skills/oma-dev-workflow/resources/troubleshooting.md +78 -0
  103. package/skills/oma-dev-workflow/resources/validation-pipeline.md +246 -0
  104. package/skills/oma-docs/SKILL.md +77 -0
  105. package/skills/oma-docs/resources/commands.md +76 -0
  106. package/skills/oma-explanation/SKILL.md +212 -0
  107. package/skills/oma-explanation/resources/document-structure.md +115 -0
  108. package/skills/oma-explanation/resources/draft-format.md +199 -0
  109. package/skills/oma-explanation/resources/html-contract.md +102 -0
  110. package/skills/oma-frontend/SKILL.md +227 -0
  111. package/skills/oma-frontend/resources/angular-rules.md +110 -0
  112. package/skills/oma-frontend/resources/checklist.md +76 -0
  113. package/skills/oma-frontend/resources/error-playbook.md +125 -0
  114. package/skills/oma-frontend/resources/execution-protocol.md +46 -0
  115. package/skills/oma-frontend/resources/snippets.md +354 -0
  116. package/skills/oma-frontend/resources/specialized-visual-implementation.md +193 -0
  117. package/skills/oma-frontend/resources/tailwind-rules.md +83 -0
  118. package/skills/oma-frontend/resources/tech-stack.md +156 -0
  119. package/skills/oma-hwp/SKILL.md +166 -0
  120. package/skills/oma-hwp/config/hwp-config.yaml +35 -0
  121. package/skills/oma-hwp/resources/balanced-tables.ts +39 -0
  122. package/skills/oma-hwp/resources/execution-protocol.md +145 -0
  123. package/skills/oma-hwp/resources/flatten-tables.ts +101 -0
  124. package/skills/oma-hwp/resources/package.json +13 -0
  125. package/skills/oma-hwp/resources/troubleshooting.md +70 -0
  126. package/skills/oma-hwp/resources/tsconfig.json +10 -0
  127. package/skills/oma-hwp/resources/turndown-plugin-gfm.d.ts +9 -0
  128. package/skills/oma-image/SKILL.md +142 -0
  129. package/skills/oma-image/config/image-config.yaml +70 -0
  130. package/skills/oma-image/resources/checklist.md +18 -0
  131. package/skills/oma-image/resources/execution-protocol.md +117 -0
  132. package/skills/oma-image/resources/invocation.md +105 -0
  133. package/skills/oma-image/resources/prompt-tips.md +71 -0
  134. package/skills/oma-image/resources/vendor-matrix.md +90 -0
  135. package/skills/oma-market/SKILL.md +142 -0
  136. package/skills/oma-market/resources/checklist.md +12 -0
  137. package/skills/oma-market/resources/error-playbook.md +12 -0
  138. package/skills/oma-market/resources/execution-protocol.md +60 -0
  139. package/skills/oma-market/resources/frameworks/pestel.md +101 -0
  140. package/skills/oma-market/resources/frameworks/porters-5f.md +90 -0
  141. package/skills/oma-market/resources/frameworks/swot.md +61 -0
  142. package/skills/oma-market/resources/intent-rules.md +35 -0
  143. package/skills/oma-market/resources/output-laws.md +53 -0
  144. package/skills/oma-mobile/SKILL.md +168 -0
  145. package/skills/oma-mobile/resources/checklist.md +77 -0
  146. package/skills/oma-mobile/resources/error-playbook.md +198 -0
  147. package/skills/oma-mobile/resources/execution-protocol.md +47 -0
  148. package/skills/oma-mobile/resources/screen-template.dart +331 -0
  149. package/skills/oma-mobile/resources/screen-template.swift +239 -0
  150. package/skills/oma-mobile/resources/screen-template.tsx +179 -0
  151. package/skills/oma-mobile/resources/tech-stack.md +69 -0
  152. package/skills/oma-mobile/variants/README.md +45 -0
  153. package/skills/oma-mobile/variants/flutter/api-template.dart +461 -0
  154. package/skills/oma-mobile/variants/flutter/snippets.md +1353 -0
  155. package/skills/oma-mobile/variants/flutter/stack.yaml +21 -0
  156. package/skills/oma-mobile/variants/flutter/tech-stack.md +201 -0
  157. package/skills/oma-mobile/variants/kotlin-android/api-template.kt +182 -0
  158. package/skills/oma-mobile/variants/kotlin-android/snippets.md +871 -0
  159. package/skills/oma-mobile/variants/kotlin-android/stack.yaml +32 -0
  160. package/skills/oma-mobile/variants/kotlin-android/tech-stack.md +159 -0
  161. package/skills/oma-mobile/variants/react-native/api-template.ts +531 -0
  162. package/skills/oma-mobile/variants/react-native/snippets.md +1014 -0
  163. package/skills/oma-mobile/variants/react-native/stack.yaml +22 -0
  164. package/skills/oma-mobile/variants/react-native/tech-stack.md +192 -0
  165. package/skills/oma-mobile/variants/stack.schema.json +68 -0
  166. package/skills/oma-mobile/variants/swift-ios/api-template.swift +165 -0
  167. package/skills/oma-mobile/variants/swift-ios/snippets.md +1028 -0
  168. package/skills/oma-mobile/variants/swift-ios/stack.yaml +25 -0
  169. package/skills/oma-mobile/variants/swift-ios/tech-stack.md +174 -0
  170. package/skills/oma-observability/SKILL.md +225 -0
  171. package/skills/oma-observability/resources/anti-patterns.md +555 -0
  172. package/skills/oma-observability/resources/boundaries/cross-application.md +348 -0
  173. package/skills/oma-observability/resources/boundaries/multi-tenant.md +290 -0
  174. package/skills/oma-observability/resources/boundaries/release.md +372 -0
  175. package/skills/oma-observability/resources/boundaries/slo.md +225 -0
  176. package/skills/oma-observability/resources/checklist.md +123 -0
  177. package/skills/oma-observability/resources/examples.md +448 -0
  178. package/skills/oma-observability/resources/execution-protocol.md +166 -0
  179. package/skills/oma-observability/resources/incident-forensics.md +348 -0
  180. package/skills/oma-observability/resources/intent-rules.md +307 -0
  181. package/skills/oma-observability/resources/layers/L3-network.md +281 -0
  182. package/skills/oma-observability/resources/layers/L4-transport.md +299 -0
  183. package/skills/oma-observability/resources/layers/L7-application/crash-analytics.md +359 -0
  184. package/skills/oma-observability/resources/layers/L7-application/mobile-rum.md +278 -0
  185. package/skills/oma-observability/resources/layers/L7-application/waf.md +246 -0
  186. package/skills/oma-observability/resources/layers/L7-application/web-rum.md +350 -0
  187. package/skills/oma-observability/resources/layers/mesh.md +368 -0
  188. package/skills/oma-observability/resources/matrix.md +177 -0
  189. package/skills/oma-observability/resources/meta-observability.md +605 -0
  190. package/skills/oma-observability/resources/observability-as-code.md +666 -0
  191. package/skills/oma-observability/resources/signals/audit.md +310 -0
  192. package/skills/oma-observability/resources/signals/cost.md +303 -0
  193. package/skills/oma-observability/resources/signals/logs.md +263 -0
  194. package/skills/oma-observability/resources/signals/metrics.md +478 -0
  195. package/skills/oma-observability/resources/signals/privacy.md +351 -0
  196. package/skills/oma-observability/resources/signals/profiles.md +245 -0
  197. package/skills/oma-observability/resources/signals/traces.md +360 -0
  198. package/skills/oma-observability/resources/standards.md +214 -0
  199. package/skills/oma-observability/resources/transport/collector-topology.md +308 -0
  200. package/skills/oma-observability/resources/transport/otlp-grpc-vs-http.md +256 -0
  201. package/skills/oma-observability/resources/transport/sampling-recipes.md +297 -0
  202. package/skills/oma-observability/resources/transport/udp-statsd-mtu.md +167 -0
  203. package/skills/oma-observability/resources/vendor-categories.md +352 -0
  204. package/skills/oma-orchestration/SKILL.md +302 -0
  205. package/skills/oma-orchestration/config/cli-config.yaml +92 -0
  206. package/skills/oma-orchestration/resources/memory-schema.md +232 -0
  207. package/skills/oma-orchestration/resources/subagent-prompt-template.md +30 -0
  208. package/skills/oma-orchestration/scripts/parallel-run.sh +6 -0
  209. package/skills/oma-orchestration/scripts/spawn-agent.sh +5 -0
  210. package/skills/oma-orchestration/scripts/verify.sh +20 -0
  211. package/skills/oma-orchestration/templates/backend-task.md +19 -0
  212. package/skills/oma-orchestration/templates/debug-task.md +16 -0
  213. package/skills/oma-orchestration/templates/frontend-task.md +18 -0
  214. package/skills/oma-orchestration/templates/mobile-task.md +18 -0
  215. package/skills/oma-orchestration/templates/qa-task.md +16 -0
  216. package/skills/oma-orchestration/templates/tasks-example.yaml +15 -0
  217. package/skills/oma-pdf/SKILL.md +162 -0
  218. package/skills/oma-pdf/config/pdf-config.yaml +27 -0
  219. package/skills/oma-pdf/resources/execution-protocol.md +127 -0
  220. package/skills/oma-pm/SKILL.md +157 -0
  221. package/skills/oma-pm/resources/error-playbook.md +75 -0
  222. package/skills/oma-pm/resources/examples.md +439 -0
  223. package/skills/oma-pm/resources/execution-protocol.md +62 -0
  224. package/skills/oma-pm/resources/iso-planning.md +110 -0
  225. package/skills/oma-pm/resources/plan-phase-protocol.md +66 -0
  226. package/skills/oma-pm/resources/task-template.json +86 -0
  227. package/skills/oma-qa/SKILL.md +141 -0
  228. package/skills/oma-qa/resources/checklist.md +339 -0
  229. package/skills/oma-qa/resources/error-playbook.md +98 -0
  230. package/skills/oma-qa/resources/execution-protocol.md +169 -0
  231. package/skills/oma-qa/resources/iso-quality.md +82 -0
  232. package/skills/oma-qa/resources/verify-ship-protocol.md +116 -0
  233. package/skills/oma-recap/SKILL.md +245 -0
  234. package/skills/oma-recap/resources/output-formats.md +83 -0
  235. package/skills/oma-refactor/SKILL.md +184 -0
  236. package/skills/oma-refactor/resources/definition.md +108 -0
  237. package/skills/oma-refactor/resources/governance.md +33 -0
  238. package/skills/oma-refactor/resources/hotspots.py +44 -0
  239. package/skills/oma-refactor/resources/measurement.md +93 -0
  240. package/skills/oma-scholar/SKILL.md +276 -0
  241. package/skills/oma-scholar/config/scholar-config.yaml +79 -0
  242. package/skills/oma-scholar/resources/api-endpoints.md +174 -0
  243. package/skills/oma-scholar/resources/checklist.md +92 -0
  244. package/skills/oma-scholar/resources/execution-protocol.md +224 -0
  245. package/skills/oma-scholar/resources/fallback-providers.md +143 -0
  246. package/skills/oma-scholar/resources/setup-openalex.md +85 -0
  247. package/skills/oma-scholar/resources/sidecar-spec.md +341 -0
  248. package/skills/oma-scholar/resources/upstream-spec-cache.md +972 -0
  249. package/skills/oma-scm/SKILL.md +103 -0
  250. package/skills/oma-scm/resources/cm-operations.md +56 -0
  251. package/skills/oma-scm/resources/codeowners-playbook.md +45 -0
  252. package/skills/oma-scm/resources/conventional-commits.md +108 -0
  253. package/skills/oma-scm/resources/merge-risk.md +76 -0
  254. package/skills/oma-scm/resources/onboarding-risk-signals.md +71 -0
  255. package/skills/oma-search/SKILL.md +125 -0
  256. package/skills/oma-search/resources/checklist.md +36 -0
  257. package/skills/oma-search/resources/error-playbook.md +66 -0
  258. package/skills/oma-search/resources/examples.md +80 -0
  259. package/skills/oma-search/resources/execution-protocol.md +86 -0
  260. package/skills/oma-search/resources/intent-rules.md +47 -0
  261. package/skills/oma-search/resources/trust-registry.md +53 -0
  262. package/skills/oma-security/SKILL.md +172 -0
  263. package/skills/oma-security/resources/artex.md +108 -0
  264. package/skills/oma-security/resources/ci.md +134 -0
  265. package/skills/oma-security/resources/cisco-source.md +108 -0
  266. package/skills/oma-security/resources/deepsec-config.md +45 -0
  267. package/skills/oma-security/resources/deepsec-matchers.md +35 -0
  268. package/skills/oma-security/resources/deepsec-scanning.md +45 -0
  269. package/skills/oma-security/resources/deepsec-setup.md +41 -0
  270. package/skills/oma-security/resources/findings-contract.md +408 -0
  271. package/skills/oma-security/resources/mcp-scanning.md +122 -0
  272. package/skills/oma-security/resources/skill-scanning.md +106 -0
  273. package/skills/oma-security/resources/validation.md +71 -0
  274. package/skills/oma-skill-creation/SKILL.md +84 -0
  275. package/skills/oma-skill-creation/resources/prompt-evaluation.md +36 -0
  276. package/skills/oma-skill-creation/resources/ssl-lite-template.md +108 -0
  277. package/skills/oma-skill-creation/resources/validation-checklist.md +101 -0
  278. package/skills/oma-slide/SKILL.md +277 -0
  279. package/skills/oma-slide/resources/animation-patterns.md +245 -0
  280. package/skills/oma-slide/resources/assets/deck-stage.js +514 -0
  281. package/skills/oma-slide/resources/assets/viewport-base.css +257 -0
  282. package/skills/oma-slide/resources/canva-integration.md +203 -0
  283. package/skills/oma-slide/resources/checklist.md +46 -0
  284. package/skills/oma-slide/resources/design-doctrine.md +260 -0
  285. package/skills/oma-slide/resources/fixed-stage.md +232 -0
  286. package/skills/oma-slide/resources/generation-protocol.md +393 -0
  287. package/skills/oma-slide/resources/native-pptx.md +84 -0
  288. package/skills/oma-slide/resources/selection-index.json +461 -0
  289. package/skills/oma-slide/resources/style-presets.LICENSE +10 -0
  290. package/skills/oma-slide/resources/style-presets.md +520 -0
  291. package/skills/oma-tf-infra/SKILL.md +201 -0
  292. package/skills/oma-tf-infra/resources/checklist.md +53 -0
  293. package/skills/oma-tf-infra/resources/cost-optimization.md +574 -0
  294. package/skills/oma-tf-infra/resources/error-playbook.md +68 -0
  295. package/skills/oma-tf-infra/resources/examples.md +38 -0
  296. package/skills/oma-tf-infra/resources/execution-protocol.md +129 -0
  297. package/skills/oma-tf-infra/resources/iso-42001-infra.md +229 -0
  298. package/skills/oma-tf-infra/resources/multi-cloud-examples.md +241 -0
  299. package/skills/oma-tf-infra/resources/policy-testing-examples.md +332 -0
  300. package/skills/oma-translation/SKILL.md +229 -0
  301. package/skills/oma-translation/resources/anti-ai-patterns.md +104 -0
  302. package/skills/oma-translation/resources/lang/_template.md +73 -0
  303. package/skills/oma-translation/resources/lang/en.md +123 -0
  304. package/skills/oma-translation/resources/lang/ja.md +274 -0
  305. package/skills/oma-translation/resources/lang/ko.md +228 -0
  306. package/skills/oma-translation/resources/lang/zh.md +285 -0
  307. package/skills/oma-translation/resources/style-skills.md +104 -0
  308. package/skills/oma-translation/resources/translation-rubric.md +126 -0
  309. package/skills/oma-video/SKILL.md +229 -0
  310. package/skills/oma-video/config/video-config.yaml +60 -0
  311. package/skills/oma-video/resources/checklist.md +26 -0
  312. package/skills/oma-video/resources/execution-protocol.md +122 -0
  313. package/skills/oma-video/resources/existing-media.md +185 -0
  314. package/skills/oma-video/resources/hyperframes-authoring/README.md +44 -0
  315. package/skills/oma-video/resources/hyperframes-authoring/demo.md +31 -0
  316. package/skills/oma-video/resources/hyperframes-authoring/explainer.md +10 -0
  317. package/skills/oma-video/resources/hyperframes-authoring/shorts.md +10 -0
  318. package/skills/oma-video/resources/motion-principles.md +81 -0
  319. package/skills/oma-video/resources/mpt/driver.py +301 -0
  320. package/skills/oma-video/resources/prompt-tips.md +75 -0
  321. package/skills/oma-video/resources/script-schema.md +81 -0
  322. package/skills/oma-video/resources/sound-design.md +127 -0
  323. package/skills/oma-video/resources/strudel/package.json +11 -0
  324. package/skills/oma-video/resources/strudel/page.html +87 -0
  325. package/skills/oma-video/resources/strudel/render.mjs +295 -0
  326. package/skills/oma-video/resources/vendor-matrix.md +124 -0
  327. package/skills/oma-voice/SKILL.md +249 -0
  328. package/skills/oma-voice/config/voice-config.yaml +30 -0
  329. package/skills/oma-voice/resources/audio-processing.md +119 -0
  330. package/skills/oma-voice/resources/checklist.md +47 -0
  331. package/skills/oma-voice/resources/execution-protocol.md +215 -0
  332. package/skills/oma-voice/resources/prompt-tips.md +43 -0
  333. package/skills/oma-voice/resources/voice-matrix.md +51 -0
  334. package/skills/oma-voice/resources/voicestudio.md +87 -0
@@ -0,0 +1,734 @@
1
+ # Common Bug Patterns & Solutions
2
+
3
+ Quick reference guide for frequently encountered bugs and their fixes.
4
+
5
+ ---
6
+
7
+ ## Frontend Bugs
8
+
9
+ ### 1. Undefined/Null Errors
10
+
11
+ **Problem**: `Cannot read property 'X' of undefined`
12
+
13
+ ```typescript
14
+ // Crash when data not loaded yet
15
+ const name = user.profile.name;
16
+ ```
17
+
18
+ **Solutions**:
19
+
20
+ ```typescript
21
+ // Option 1: Optional chaining + nullish coalescing
22
+ const name = user?.profile?.name ?? 'Unknown';
23
+
24
+ // Option 2: Conditional rendering
25
+ {user?.profile && <div>{user.profile.name}</div>}
26
+
27
+ // Option 3: Early return
28
+ if (!user?.profile) return <div>Loading...</div>;
29
+ ```
30
+
31
+ ---
32
+
33
+ ### 2. Stale Closures in useEffect
34
+
35
+ **Problem**: Event handlers/callbacks use old state values
36
+
37
+ ```typescript
38
+ function Counter() {
39
+ const [count, setCount] = useState(0);
40
+
41
+ useEffect(() => {
42
+ const interval = setInterval(() => {
43
+ console.log(count); // Always logs 0!
44
+ }, 1000);
45
+ return () => clearInterval(interval);
46
+ }, []); // Missing dependency
47
+
48
+ return <button onClick={() => setCount(c => c + 1)}>+</button>;
49
+ }
50
+ ```
51
+
52
+ **Solutions**:
53
+
54
+ ```typescript
55
+ // Option 1: Include dependency
56
+ useEffect(() => {
57
+ const interval = setInterval(() => {
58
+ console.log(count); // Now updates!
59
+ }, 1000);
60
+ return () => clearInterval(interval);
61
+ }, [count]); // Dependency added
62
+
63
+ // Option 2: Use functional update
64
+ useEffect(() => {
65
+ const interval = setInterval(() => {
66
+ setCount(c => {
67
+ console.log(c); // Current value
68
+ return c;
69
+ });
70
+ }, 1000);
71
+ return () => clearInterval(interval);
72
+ }, []); // Can stay empty
73
+
74
+ // Option 3: Use ref for latest value
75
+ const countRef = useRef(count);
76
+ countRef.current = count;
77
+
78
+ useEffect(() => {
79
+ const interval = setInterval(() => {
80
+ console.log(countRef.current); // Latest value
81
+ }, 1000);
82
+ return () => clearInterval(interval);
83
+ }, []);
84
+ ```
85
+
86
+ ---
87
+
88
+ ### 3. Missing Cleanup in useEffect
89
+
90
+ **Problem**: Memory leaks from subscriptions/listeners
91
+
92
+ ```typescript
93
+ useEffect(() => {
94
+ const subscription = api.subscribe(data => setData(data));
95
+ // Missing cleanup!
96
+ }, []);
97
+ ```
98
+
99
+ **Solution**:
100
+
101
+ ```typescript
102
+ useEffect(() => {
103
+ const subscription = api.subscribe(data => setData(data));
104
+
105
+ return () => {
106
+ subscription.unsubscribe(); // Cleanup
107
+ };
108
+ }, []);
109
+ ```
110
+
111
+ **Common things that need cleanup**:
112
+ - Event listeners (`addEventListener`)
113
+ - Intervals (`setInterval`)
114
+ - Timeouts (`setTimeout`)
115
+ - Subscriptions (WebSockets, observables)
116
+ - API requests (cancellation tokens)
117
+
118
+ ---
119
+
120
+ ### 4. Race Conditions in Async Effects
121
+
122
+ **Problem**: Old requests overwrite new ones
123
+
124
+ ```typescript
125
+ useEffect(() => {
126
+ fetchUser(userId).then(setUser);
127
+ // If userId changes quickly, old responses arrive after new ones
128
+ }, [userId]);
129
+ ```
130
+
131
+ **Solution**:
132
+
133
+ ```typescript
134
+ useEffect(() => {
135
+ let cancelled = false;
136
+
137
+ fetchUser(userId).then(user => {
138
+ if (!cancelled) {
139
+ setUser(user);
140
+ }
141
+ });
142
+
143
+ return () => {
144
+ cancelled = true;
145
+ };
146
+ }, [userId]);
147
+ ```
148
+
149
+ ---
150
+
151
+ ### 5. Infinite Re-render Loops
152
+
153
+ **Problem**: Component re-renders infinitely
154
+
155
+ ```typescript
156
+ function Component() {
157
+ const [data, setData] = useState([]);
158
+
159
+ useEffect(() => {
160
+ setData([...data, 'new']); // Triggers effect again!
161
+ }, [data]); // Dependency causes loop
162
+
163
+ return <div>{data.length}</div>;
164
+ }
165
+ ```
166
+
167
+ **Solutions**:
168
+
169
+ ```typescript
170
+ // Option 1: Remove problematic dependency
171
+ useEffect(() => {
172
+ setData(prevData => [...prevData, 'new']);
173
+ }, []); // Empty deps - runs once
174
+
175
+ // Option 2: Use ref instead of state
176
+ const dataRef = useRef([]);
177
+
178
+ useEffect(() => {
179
+ dataRef.current = [...dataRef.current, 'new'];
180
+ }, []);
181
+
182
+ // Option 3: Add condition
183
+ useEffect(() => {
184
+ if (data.length === 0) { // Only run when empty
185
+ setData(['new']);
186
+ }
187
+ }, [data]);
188
+ ```
189
+
190
+ ---
191
+
192
+ ### 6. Key Prop Issues in Lists
193
+
194
+ **Problem**: List items reordering incorrectly
195
+
196
+ ```typescript
197
+ // Using index as key
198
+ {todos.map((todo, index) => (
199
+ <TodoItem key={index} todo={todo} />
200
+ ))}
201
+ ```
202
+
203
+ **Solution**:
204
+
205
+ ```typescript
206
+ // Use stable, unique ID
207
+ {todos.map(todo => (
208
+ <TodoItem key={todo.id} todo={todo} />
209
+ ))}
210
+
211
+ // Without a server ID, assign clientId when the item is created and persist it.
212
+ // Do not generate IDs during render.
213
+ {todos.map(todo => (
214
+ <TodoItem key={todo.clientId} todo={todo} />
215
+ ))}
216
+ ```
217
+
218
+ ---
219
+
220
+ ### 7. Form Input Controlled/Uncontrolled Switch
221
+
222
+ **Problem**: `Warning: A component is changing an uncontrolled input to be controlled`
223
+
224
+ ```typescript
225
+ const [value, setValue] = useState(); // undefined initially
226
+
227
+ <input value={value} onChange={e => setValue(e.target.value)} />
228
+ ```
229
+
230
+ **Solution**:
231
+
232
+ ```typescript
233
+ // Initialize with empty string
234
+ const [value, setValue] = useState('');
235
+
236
+ <input value={value} onChange={e => setValue(e.target.value)} />
237
+
238
+ // Or use defaultValue for uncontrolled
239
+ <input defaultValue="" onChange={e => console.log(e.target.value)} />
240
+ ```
241
+
242
+ ---
243
+
244
+ ## Backend Bugs
245
+
246
+ ### 1. SQL Injection
247
+
248
+ **Problem**: User input directly in SQL query
249
+
250
+ ```python
251
+ # DANGEROUS!
252
+ email = request.args.get('email')
253
+ query = f"SELECT * FROM users WHERE email = '{email}'"
254
+ db.execute(query)
255
+ # User can input: ' OR '1'='1
256
+ ```
257
+
258
+ **Solution**:
259
+
260
+ ```python
261
+ # Use parameterized queries
262
+ from sqlalchemy import text
263
+
264
+ email = request.args.get('email')
265
+ query = text("SELECT * FROM users WHERE email = :email")
266
+ result = db.execute(query, {"email": email})
267
+
268
+ # Or use ORM
269
+ user = db.query(User).filter(User.email == email).first()
270
+ ```
271
+
272
+ ---
273
+
274
+ ### 2. N+1 Query Problem
275
+
276
+ **Problem**: One query per item in a loop
277
+
278
+ ```python
279
+ # 1 query to get todos
280
+ todos = db.query(Todo).all()
281
+
282
+ # N queries (one per todo)
283
+ for todo in todos:
284
+ user = db.query(User).filter(User.id == todo.user_id).first()
285
+ print(f"{todo.title} by {user.name}")
286
+ ```
287
+
288
+ **Solution**:
289
+
290
+ ```python
291
+ # Use JOIN - single query
292
+ from sqlalchemy.orm import joinedload
293
+
294
+ todos = db.query(Todo).options(joinedload(Todo.user)).all()
295
+
296
+ for todo in todos:
297
+ print(f"{todo.title} by {todo.user.name}") # No extra query
298
+ ```
299
+
300
+ ---
301
+
302
+ ### 3. Missing Authentication Check
303
+
304
+ **Problem**: Protected endpoint accessible without auth
305
+
306
+ ```python
307
+ @app.get("/api/admin/users")
308
+ async def get_all_users(db: DatabaseDep):
309
+ return db.query(User).all() # Anyone can access!
310
+ ```
311
+
312
+ **Solution**:
313
+
314
+ ```python
315
+ @app.get("/api/admin/users")
316
+ async def get_all_users(
317
+ db: DatabaseDep,
318
+ current_user: User = Depends(get_current_user) # Require auth
319
+ ):
320
+ if current_user.role != "admin": # Check role
321
+ raise HTTPException(403, "Admin only")
322
+ return db.query(User).all()
323
+ ```
324
+
325
+ ---
326
+
327
+ ### 4. Missing Input Validation
328
+
329
+ **Problem**: Invalid data causes errors
330
+
331
+ ```python
332
+ @app.post("/api/users")
333
+ async def create_user(email: str, age: int):
334
+ # No validation!
335
+ user = User(email=email, age=age)
336
+ db.add(user)
337
+ db.commit()
338
+ ```
339
+
340
+ **Solution**:
341
+
342
+ ```python
343
+ from pydantic import BaseModel, EmailStr, Field
344
+
345
+ class UserCreate(BaseModel):
346
+ email: EmailStr # Validates email format
347
+ age: int = Field(ge=0, le=150) # Must be 0-150
348
+
349
+ @app.post("/api/users")
350
+ async def create_user(user: UserCreate):
351
+ # Pydantic validates automatically
352
+ db_user = User(**user.model_dump())
353
+ db.add(db_user)
354
+ db.commit()
355
+ ```
356
+
357
+ ---
358
+
359
+ ### 5. Unhandled Exceptions
360
+
361
+ **Problem**: Server crashes on error
362
+
363
+ ```python
364
+ @app.post("/api/todos")
365
+ async def create_todo(todo: TodoCreate, user: User = Depends(get_current_user)):
366
+ db_todo = Todo(**todo.model_dump(), user_id=user.id)
367
+ db.add(db_todo)
368
+ db.commit() # Could fail!
369
+ return db_todo
370
+ ```
371
+
372
+ **Solution**:
373
+
374
+ ```python
375
+ from fastapi import HTTPException
376
+
377
+ @app.post("/api/todos")
378
+ async def create_todo(todo: TodoCreate, user: User = Depends(get_current_user)):
379
+ try:
380
+ db_todo = Todo(**todo.model_dump(), user_id=user.id)
381
+ db.add(db_todo)
382
+ db.commit()
383
+ db.refresh(db_todo)
384
+ return db_todo
385
+ except IntegrityError as e:
386
+ db.rollback()
387
+ raise HTTPException(409, "Duplicate entry")
388
+ except Exception as e:
389
+ db.rollback()
390
+ logger.error(f"Failed to create todo: {e}")
391
+ raise HTTPException(500, "Internal server error")
392
+ ```
393
+
394
+ ---
395
+
396
+ ### 6. Missing CORS Configuration
397
+
398
+ **Problem**: Frontend can't call API
399
+
400
+ ```
401
+ Access to fetch at 'http://localhost:8000/api/todos' from origin
402
+ 'http://localhost:3000' has been blocked by CORS policy
403
+ ```
404
+
405
+ **Solution**:
406
+
407
+ ```python
408
+ from fastapi.middleware.cors import CORSMiddleware
409
+
410
+ app.add_middleware(
411
+ CORSMiddleware,
412
+ allow_origins=["http://localhost:3000"], # Frontend URL
413
+ allow_credentials=True,
414
+ allow_methods=["*"],
415
+ allow_headers=["*"],
416
+ )
417
+
418
+ # For production, be specific:
419
+ # allow_origins=["https://yourdomain.com"]
420
+ ```
421
+
422
+ ---
423
+
424
+ ### 7. Password Storage
425
+
426
+ **Problem**: Passwords stored in plain text
427
+
428
+ ```python
429
+ user = User(email=email, password=password) # NEVER DO THIS!
430
+ ```
431
+
432
+ **Solution**:
433
+
434
+ ```python
435
+ from passlib.context import CryptContext
436
+
437
+ pwd_context = CryptContext(schemes=["argon2", "bcrypt"], deprecated="auto")
438
+
439
+ # Hash before storing
440
+ password_hash = pwd_context.hash(password)
441
+ user = User(email=email, password_hash=password_hash)
442
+
443
+ # Verify on login
444
+ if not pwd_context.verify(plain_password, user.password_hash):
445
+ raise HTTPException(401, "Invalid credentials")
446
+ ```
447
+
448
+ ---
449
+
450
+ ## Mobile Bugs
451
+
452
+ ### 1. Memory Leaks in Flutter
453
+
454
+ **Problem**: Controllers not disposed
455
+
456
+ ```dart
457
+ class MyWidget extends StatefulWidget {
458
+ @override
459
+ _MyWidgetState createState() => _MyWidgetState();
460
+ }
461
+
462
+ class _MyWidgetState extends State<MyWidget> {
463
+ final controller = TextEditingController();
464
+
465
+ @override
466
+ Widget build(BuildContext context) {
467
+ return TextField(controller: controller);
468
+ }
469
+ // Missing dispose!
470
+ }
471
+ ```
472
+
473
+ **Solution**:
474
+
475
+ ```dart
476
+ class _MyWidgetState extends State<MyWidget> {
477
+ final controller = TextEditingController();
478
+
479
+ @override
480
+ void dispose() {
481
+ controller.dispose(); // Clean up
482
+ super.dispose();
483
+ }
484
+
485
+ @override
486
+ Widget build(BuildContext context) {
487
+ return TextField(controller: controller);
488
+ }
489
+ }
490
+ ```
491
+
492
+ ---
493
+
494
+ ### 2. Platform-Specific Code Not Checked
495
+
496
+ **Problem**: iOS-specific code crashes on Android
497
+
498
+ ```dart
499
+ // Crashes on Android
500
+ import 'dart:io' show Platform;
501
+
502
+ final deviceName = Platform.isIOS ? 'iPhone' : 'Unknown';
503
+ ```
504
+
505
+ **Solution**:
506
+
507
+ ```dart
508
+ import 'dart:io' show Platform;
509
+
510
+ final deviceName = Platform.isIOS
511
+ ? 'iPhone'
512
+ : Platform.isAndroid
513
+ ? 'Android'
514
+ : 'Unknown';
515
+
516
+ // Or use conditional imports
517
+ if (Platform.isIOS) {
518
+ // iOS-specific code
519
+ } else if (Platform.isAndroid) {
520
+ // Android-specific code
521
+ }
522
+ ```
523
+
524
+ ---
525
+
526
+ ## Performance Bugs
527
+
528
+ ### 1. Unnecessary Re-renders (React)
529
+
530
+ **Problem**: Component re-renders on every parent render
531
+
532
+ ```typescript
533
+ function Parent() {
534
+ const [count, setCount] = useState(0);
535
+
536
+ return (
537
+ <div>
538
+ <button onClick={() => setCount(c => c + 1)}>Count: {count}</button>
539
+ <ExpensiveChild data={someData} /> {/* Re-renders every time! */}
540
+ </div>
541
+ );
542
+ }
543
+ ```
544
+
545
+ **Solution**:
546
+
547
+ ```typescript
548
+ // Memoize the expensive component
549
+ const ExpensiveChild = React.memo(function ExpensiveChild({ data }) {
550
+ // Only re-renders when data changes
551
+ return <div>{/* expensive computation */}</div>;
552
+ });
553
+
554
+ // Or memoize the props
555
+ function Parent() {
556
+ const [count, setCount] = useState(0);
557
+ const memoizedData = useMemo(() => computeData(), []);
558
+
559
+ return (
560
+ <div>
561
+ <button onClick={() => setCount(c => c + 1)}>Count: {count}</button>
562
+ <ExpensiveChild data={memoizedData} />
563
+ </div>
564
+ );
565
+ }
566
+ ```
567
+
568
+ ---
569
+
570
+ ### 2. Large Bundle Size
571
+
572
+ **Problem**: Importing entire library
573
+
574
+ ```typescript
575
+ // Imports all of lodash (~70KB)
576
+ import _ from 'lodash';
577
+
578
+ const unique = _.uniq(array);
579
+ ```
580
+
581
+ **Solution**:
582
+
583
+ ```typescript
584
+ // Import only what you need
585
+ import uniq from 'lodash/uniq'; // ~2KB
586
+
587
+ const unique = uniq(array);
588
+
589
+ // Or use native methods
590
+ const unique = [...new Set(array)];
591
+ ```
592
+
593
+ ---
594
+
595
+ ## Security Bugs
596
+
597
+ ### 1. XSS (Cross-Site Scripting)
598
+
599
+ **Problem**: User input rendered as HTML
600
+
601
+ ```typescript
602
+ // Dangerous!
603
+ <div dangerouslySetInnerHTML={{ __html: userComment }} />
604
+ ```
605
+
606
+ **Solution**:
607
+
608
+ ```typescript
609
+ // React escapes by default
610
+ <div>{userComment}</div>
611
+
612
+ // If HTML needed, sanitize first
613
+ import DOMPurify from 'dompurify';
614
+
615
+ <div dangerouslySetInnerHTML={{
616
+ __html: DOMPurify.sanitize(userComment)
617
+ }} />
618
+ ```
619
+
620
+ ---
621
+
622
+ ### 2. Missing Rate Limiting
623
+
624
+ **Problem**: API can be abused
625
+
626
+ ```python
627
+ @app.post("/api/auth/login")
628
+ async def login(credentials: LoginRequest):
629
+ # No rate limiting - brute force possible!
630
+ ...
631
+ ```
632
+
633
+ **Solution**:
634
+
635
+ ```python
636
+ from slowapi import Limiter
637
+ from slowapi.util import get_remote_address
638
+
639
+ limiter = Limiter(key_func=get_remote_address)
640
+
641
+ @app.post("/api/auth/login")
642
+ @limiter.limit("5/minute") # Max 5 attempts per minute
643
+ async def login(request: Request, credentials: LoginRequest):
644
+ ...
645
+ ```
646
+
647
+ ---
648
+
649
+ ## Common Error Messages & Solutions
650
+
651
+ | Error | Likely Cause | Solution |
652
+ |-------|--------------|----------|
653
+ | `Cannot read property 'X' of undefined` | Accessing property before data loads | Add null check or optional chaining |
654
+ | `Maximum update depth exceeded` | Infinite re-render loop | Check useEffect dependencies |
655
+ | `Warning: Each child should have unique key` | Missing/duplicate keys in list | Use unique, stable IDs as keys |
656
+ | `401 Unauthorized` | Missing/invalid auth token | Check token in request headers |
657
+ | `403 Forbidden` | Insufficient permissions | Verify user role/permissions |
658
+ | `404 Not Found` | Wrong URL or resource doesn't exist | Check endpoint path and resource ID |
659
+ | `500 Internal Server Error` | Backend exception | Check server logs for stack trace |
660
+ | `CORS Error` | Cross-origin request blocked | Configure CORS middleware |
661
+ | `ERR_CONNECTION_REFUSED` | Server not running | Start the backend server |
662
+
663
+ ---
664
+
665
+ ## Quick Debugging Commands
666
+
667
+ ### Frontend
668
+ ```bash
669
+ # Check for errors
670
+ npm run lint
671
+
672
+ # Run tests
673
+ npm test
674
+
675
+ # Build and check bundle size
676
+ npm run build
677
+ npm run analyze
678
+
679
+ # Check for unused dependencies
680
+ npx depcheck
681
+ ```
682
+
683
+ ### Backend
684
+ ```bash
685
+ # Check for security issues
686
+ pip install safety
687
+ safety check
688
+
689
+ # Run tests with coverage
690
+ pytest --cov=app
691
+
692
+ # Check for SQL injection
693
+ bandit -r app/
694
+ ```
695
+
696
+ ### Mobile
697
+ ```bash
698
+ # Check for issues
699
+ flutter analyze
700
+
701
+ # Run tests
702
+ flutter test
703
+
704
+ # Check app size
705
+ flutter build apk --analyze-size
706
+ ```
707
+
708
+ ---
709
+
710
+ ## When to Use Each Agent
711
+
712
+ | Bug Type | Best Agent | Reason |
713
+ |----------|-----------|---------|
714
+ | Frontend crash | debug-investigator | Specializes in bug diagnosis |
715
+ | Backend API error | debug-investigator | Can trace through stack |
716
+ | Complex multi-domain | oma-coordination | Coordinates multiple agents |
717
+ | Security vulnerability | qa-reviewer | Security expertise |
718
+ | Performance bug (specific slowdown/regression) | debug-investigator | Root-cause diagnosis + fix (see §Performance Bugs) |
719
+ | Performance audit (broad review) | qa-reviewer | Profiling and audit tooling |
720
+ | New feature needed | Specialist agent | Not a bug, it's a feature |
721
+
722
+ ---
723
+
724
+ ## Prevention Tips
725
+
726
+ 1. **Write tests first** - Catch bugs before they ship
727
+ 2. **Use TypeScript** - Catch type errors at compile time
728
+ 3. **Enable strict mode** - More safety checks
729
+ 4. **Code review** - Second pair of eyes
730
+ 5. **Automated linting** - Enforce best practices
731
+ 6. **Error monitoring** - Sentry, LogRocket, etc.
732
+ 7. **User testing** - Real users find real bugs
733
+
734
+ ---