oh-my-agent-commandcode 0.0.0-stage → 20.38.3

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,123 @@
1
+ # oma-observability Checklist
2
+
3
+ > Consolidated verification checklist. Run before shipping observability changes to production.
4
+ > Each item: action; criterion; priority.
5
+ > Source files live under `resources/` from the skill root.
6
+
7
+ ## Priority legend
8
+
9
+ - **P0**: block ship; do not merge or deploy without this
10
+ - **P1**: must-before-prod; complete before promoting to production
11
+ - **P2**: this-sprint; schedule and close within the current sprint
12
+
13
+ ---
14
+
15
+ ## Section 1: Setup validation (pre-commit / pre-merge)
16
+
17
+ - [ ] Pin OTel spec version and semconv version in `standards.md` header; must match deployed SDK version (P0)
18
+ - [ ] Define `service.name`, `service.namespace`, `service.version` on every instrumented service OTel Resource; all three attributes present and non-empty (P0)
19
+ - [ ] Define `deployment.environment`, `cloud.provider`, `cloud.region`, `cloud.availability_zone` on every OTel Resource; required for region-dimension pivot in incident forensics (P0)
20
+ - [ ] Define `host.id`, `k8s.pod.name`, `k8s.node.name`, `k8s.cluster.name`, `container.id` on every Kubernetes workload Resource; required for server-dimension pivot (P0)
21
+ - [ ] Configure W3C Trace Context (`traceparent`) as default propagator; every outbound HTTP/gRPC call must forward the header; confirm by checking `trace_id` consistency across service log streams (P0)
22
+ - [ ] Verify W3C Baggage carries only allowed keys; `tenant.id`, feature flag state, deployment SHA, region hint are allowed; user email, session tokens, and credentials are prohibited per `standards.md §W3C Baggage` (P0)
23
+ - [ ] Strip or validate inbound baggage at ingress gateway; external callers must not inject arbitrary baggage into internal services (P0)
24
+ - [ ] Use only stable semconv groups (`service.*`, `host.*`, `cloud.*`, `k8s.*`, `http.*`, `db.*`, `network.*` core, `error.*`) for production SLO inputs; Development-tier attributes (`tls.*`, `network.connection.*`) must not feed SLOs (P0)
25
+ - [ ] Configure `memory_limiter` processor as the first processor in every Collector pipeline; `limit_percentage: 75`, `spike_limit_percentage: 20` (P0)
26
+ - [ ] Place `memory_limiter` before `batch` in pipeline order; prevents OOM crash under burst (P0)
27
+ - [ ] Validate that OTLP transport choice matches topology; gRPC port 4317 for pod-to-pod; HTTP port 4318 for browser SDKs and proxy-traversal paths (P1)
28
+ - [ ] Verify UDP StatsD datagrams fit within path MTU; max 1472 B on standard Ethernet IPv4; use Unix Domain Socket (`unixgram`) for same-host paths (P1)
29
+ - [ ] Version all observability artifacts in git; dashboards, alert rules, SLO definitions, and Collector configs must be applied via CI/CD, not edited in the UI (P1)
30
+
31
+ ---
32
+
33
+ ## Section 2: Pre-production readiness
34
+
35
+ - [ ] Confirm matrix coverage gaps are identified and acknowledged; every uncovered cell in `matrix.md` has an explicit N/A rationale or a remediation plan (P1)
36
+ - [ ] Set cardinality budget per service; alert at 80% of budget (default 5 000 series/service); configure `count({job="<service>"}) > 4000` alert (P1)
37
+ - [ ] Allow-list metric attributes explicitly in the OTel SDK View; use `attribute_keys` to prevent unbounded label sets; never let raw `url.full`, `user.id`, `request.id`, `trace.id`, or `error.message` appear as metric labels (P0)
38
+ - [ ] Normalize high-cardinality route labels; apply `transform` processor to replace numeric path segments with `/_` (e.g., `/users/42` → `/users/_`) (P1)
39
+ - [ ] Define per-tenant sampling policy when multi-tenant; enterprise tenants may require 100% error retention + dedicated pipeline; free-tier tenants use probabilistic baseline (P1)
40
+ - [ ] Configure four-tier tenant isolation strategy; select Tier (soft label / routing / dedicated-collector / dedicated-backend) per tenant compliance obligation and document the decision (P1)
41
+ - [ ] Propagate `tenant.id` via W3C Baggage on all spans, logs, and metrics in multi-tenant services; use the canonical key `tenant.id`; do not use `customer_id`, `org_id`, or `account_id` as synonyms (P1)
42
+ - [ ] Verify `tenant.region` drives data residency routing; EU and KR tenants must have telemetry routed to compliant regional Collector pipelines before reaching a cross-region backend (P0)
43
+ - [ ] Configure two-tier Collector topology for Kubernetes; DaemonSet agent (hostmetrics, filelog, kubeletstats, k8sattributes) forwarding to Deployment gateway (batch, tail_sampling, exporters) (P1)
44
+ - [ ] Deploy loadbalancing exporter upstream of tail_sampling processor; consistent hash by `trace_id` ensures complete traces arrive at the same gateway replica (P0)
45
+ - [ ] Confirm `exception.type`, `exception.message`, `exception.stacktrace`, `code.function.name`, `code.file.path`, `code.line.number` are populated on every ERROR span or on exception LogRecords joinable by `trace_id`/`span_id`; `span.recordException(e)` remains valid for atomicity, but the span-event form is deprecated since semconv 1.40 — set `OTEL_SEMCONV_EXCEPTION_SIGNAL_OPT_IN=logs/dup` during migration (P0)
46
+ - [ ] Confirm IP address logging is masked or hashed before long-term retention; IP addresses are personal data under GDPR Art. 4(1) and PIPA; apply prefix truncation or HMAC+salt at pipeline ingress (P0)
47
+
48
+ ---
49
+
50
+ ## Section 3: Production operations
51
+
52
+ - [ ] Scrape OTel Collector self-metrics (`otelcol_*`) from a separate Prometheus instance or second Collector; Collector failures must not destroy their own observability (P0)
53
+ - [ ] Check pipeline health per hop/exporter and implement completed synthetic backend-delivery probes where end-to-end verification is required; set policy-aware thresholds and monitor probe job freshness (`meta-observability.md §A6`) (P0)
54
+ - [ ] Alert on exporter send failures above 1%; `rate(otelcol_exporter_send_failed_spans[5m]) / rate(otelcol_exporter_sent_spans[5m]) > 0.01` for 5 minutes (P0)
55
+ - [ ] Alert on `otelcol_receiver_refused_spans > 0` sustained for 2 minutes; indicates queue full or parse failures (P0)
56
+ - [ ] Alert on Collector heap usage exceeding 75% of container memory limit; `otelcol_process_runtime_heap_alloc_bytes > 0.75 * container_limit` (P0)
57
+ - [ ] Configure NTP or chrony on all host VMs and Kubernetes nodes; clock drift must stay below 100 ms for reliable trace waterfall ordering (P0)
58
+ - [ ] Alert on node clock drift exceeding 100 ms; `node_clock_drift_ms > 100` for 5 minutes triggers waterfall inversion risk (P0)
59
+ - [ ] Emit `node_clock_drift_ms` from each host via chrony textfile collector or node exporter; required for the clock drift alert to fire (P1)
60
+ - [ ] Configure tail_sampling policy with 100% error + 100% high-latency + 5-10% probabilistic baseline; gateway Collector only; `decision_wait: 30s` to buffer all spans (P1)
61
+ - [ ] Apply exporter retry configuration; `initial_interval: 5s`, `max_interval: 30s`, `max_elapsed_time: 300s`, `queue_size: 1000` to handle transient backend unavailability without infinite queue growth (P1)
62
+ - [ ] Scrape Fluent Bit self-metrics at `:2020/api/v1/metrics/prometheus`; monitor `fluentbit_output_errors_total` alongside `otelcol_*` for unified pipeline health view (P1)
63
+ - [ ] Publish a meta-observability Grafana dashboard; must include pipeline delivery ratio panels, receiver accepted vs refused, exporter sent vs failed, queue depth, heap usage, clock drift heatmap, and top cardinality metrics table (P1)
64
+ - [ ] Enforce retention policy per signal; metrics: 15d full-res / 90d 5m / 2y 1h; operational logs: 7d / 30d / 90d; sampled traces: 30d; profiles: 14d (P1)
65
+
66
+ ---
67
+
68
+ ## Section 4: Incident forensics readiness
69
+
70
+ - [ ] Verify all MRA resource attributes are present on every signal before production; `service.name`, `service.namespace`, `service.version`, `deployment.environment`, `cloud.*`, `host.id`, `k8s.*`, `container.id` (P0)
71
+ - [ ] Confirm `trace_id` appears on every structured log record; log-trace join is impossible without it; set via OTel SDK current span context (P0)
72
+ - [ ] Confirm `span_id` appears on every structured log record alongside `trace_id`; required for sub-trace log correlation (P0)
73
+ - [ ] Inject `request_id` at the API gateway; propagate as `x-request-id` header; log on every record; expose to end user for support tickets (P1)
74
+ - [ ] Verify metric exemplars are enabled and linked to `trace_id`; required for metric-to-trace pivot in Step 2 of the 6-dimension narrowing flow (P1)
75
+ - [ ] Confirm the 6-dimension narrowing flow can execute in under 15 minutes; run a tabletop drill: symptom capture → trace_id acquisition → region → server → service → layer → code → cross-signal validation (P1)
76
+ - [ ] Validate vendor query patterns are documented for all backends in use; Honeycomb, Datadog, Grafana Tempo, Jaeger, Sentry, Elastic query syntax must be accessible during an incident (P1)
77
+ - [ ] Test log-trace join by `trace_id` across at least two services in the production environment; the join must return matching records within the same request's span (P1)
78
+ - [ ] Confirm release marker log events include `service.name`, `service.version`, `deployment.environment`, and deployment SHA; without markers, Step 5 release correlation in the forensics playbook is blind (P0)
79
+
80
+ ---
81
+
82
+ ## Section 5: Compliance & Audit
83
+
84
+ - [ ] Map audit record classes to approved retention and erasure/legal-hold rules; configure tamper protection and WORM only when the selected obligation requires it (P0)
85
+ - [ ] Implement a scheduled retention check against the approved per-class policy, including legal holds and eligible deletion; alert on a policy violation (P0)
86
+ - [ ] Include all six mandatory audit event categories; authentication, authorization, data access, administrative, security events, system events; before claiming SOC 2 or ISO 27001 compliance (P0)
87
+ - [ ] Carry required attributes on every audit event; `user.id` (pseudonymized), `actor.type`, `action`, `resource.type`, `resource.id`, `event.outcome` (P0)
88
+ - [ ] Implement PII redaction at pipeline ingestion; apply Collector `transform` processor to scrub or hash PII fields before they reach any storage backend (P0)
89
+ - [ ] Enforce GDPR storage limitation; raw personal data must not exceed the retention period justified by the processing purpose; default operational logs ≤ 7 days raw (P0)
90
+ - [ ] Isolate record classes where their storage/access controls differ; personal audit records remain subject to privacy rules and documented erasure/retention exceptions (P0)
91
+ - [ ] Sign a Data Processing Agreement (DPA) with every observability vendor that receives personal data; required before routing production telemetry to SaaS backends (P0)
92
+ - [ ] Classify personal data and document permitted destinations, applicable GDPR Chapter V/PIPA Art.28-8 transfer grounds, safeguards, and any stricter residency contract before export; enforce the approved server-side policy (P0)
93
+ - [ ] Store pseudonymization keys separately from pseudonymized telemetry data; GDPR Art. 32 requires independent access control and audit trail for the key store (P1)
94
+ - [ ] Verify `user.id` and `user.email` are never used as metric labels; cardinality explosion and PII in TSDB are a double violation; use `filter` processor to drop any datapoint carrying these attributes (P0)
95
+
96
+ ---
97
+
98
+ ## Section 6: SLO & Release gate
99
+
100
+ - [ ] Define SLO with error budget policy for every user-facing service; SLO target, SLA target (SLA < SLO), 28-day rolling window, and burn-rate alert thresholds (P1)
101
+ - [ ] Implement multi-window burn-rate alerts; fast burn: 2% budget in 1 hour; slow burn: 5% budget in 6 hours; both required to avoid alert fatigue and missed slow leaks (P1)
102
+ - [ ] Store SLO definitions in OpenSLO YAML in git; treated as code; PR review required for any SLO target change (P1)
103
+ - [ ] Select SLI source from stable signals; mesh RED metrics or L7 application metrics preferred; log-based SLI is acceptable only as a fallback for un-instrumented services (P1)
104
+ - [ ] Configure canary analysis (Flagger or Argo Rollouts) to use SLI metrics as promotion gates; success rate threshold and latency p99 threshold both required (P1)
105
+ - [ ] Add memory saturation metric as a custom Flagger analysis gate; OOMKilled pods may not fail the success rate threshold before crashing; `container_memory_working_set_bytes` gate prevents silent OOM canary progression (P1)
106
+ - [ ] Emit `service.version` on all metrics, logs, and spans at deploy time; required for before/after comparison in canary analysis and in Step 3c of incident forensics (P0)
107
+ - [ ] Emit a structured release marker event at every deployment; must carry `service.name`, `service.version`, `deployment.environment`, deployment strategy, and deployment SHA (P0)
108
+ - [ ] Record SLO burn-rate threshold crossings as immutable audit events; provides compliance evidence for availability breach; cross-ref `signals/audit.md` (P1)
109
+ - [ ] Define rollback criteria and document the rollback procedure; include metric recovery verification steps in the runbook (P1)
110
+
111
+ ---
112
+
113
+ ## Section 7: Recovery
114
+
115
+ - [ ] Document Collector queue backpressure remediation runbook; steps: identify via `otelcol_processor_queued_retry_send_queue_length`, scale gateway Collector replicas, check vendor rate limits (P1)
116
+ - [ ] Document clock drift remediation procedure; `chronyc makestep` for immediate re-sync; escalation to PTP for sub-millisecond requirements; check NTP source reachability if drift persists (P1)
117
+ - [ ] Document cardinality bomb mitigation procedure; identify offending metric with `topk(10, count({__name__!=""}) by (__name__))`, add `filter` processor to drop offending label, or `transform` processor to remove the label value (P1)
118
+ - [ ] Document Collector OOM recovery path; verify `memory_limiter` is configured; if OOM still reached, increase container memory limit or reduce `limit_percentage`; never disable `memory_limiter` (P1)
119
+ - [ ] Document vendor fallback plan for observability backend outage; identify secondary backend or local Collector buffering strategy; `sending_queue` with `queue_size` provides short-term buffering (P2)
120
+ - [ ] Document PII incident response procedure; GDPR Art. 33 breach notification to supervisory authority within 72 hours; identify affected telemetry stores, scope the affected data subjects, and engage DPO (P0)
121
+ - [ ] Document audit log retention violation response; verify S3/GCS Object Lock policy; confirm `retention_period` in log backend matches 7y; restore from backup if records were prematurely deleted (P0)
122
+ - [ ] Test Flagger auto-rollback by injecting a synthetic error rate above the failure threshold in a staging environment; verify rollback completes before the `progressDeadlineSeconds` expires (P2)
123
+ - [ ] Validate that `memory_limiter` refused spans alert fires before Collector OOM; run a controlled load test; confirm `otelcol_processor_memory_limiter_refused_spans > 0` alert fires and data loss stops short of crash (P2)
@@ -0,0 +1,448 @@
1
+ # oma-observability Examples
2
+
3
+ > End-to-end walkthroughs demonstrating the skill's value.
4
+ > Each scenario ties multiple files together into a single executable story.
5
+
6
+ ---
7
+
8
+ ## Scenario 1: Greenfield: OSS Full-Stack on Kubernetes
9
+
10
+ **Situation:** Series A startup, new k8s cluster. Team wants OTel-native metrics + logs + traces + Grafana
11
+ dashboards at zero licensing cost.
12
+
13
+ **Intent:** `setup`
14
+
15
+ **Files referenced:** `vendor-categories.md §(a)`, `transport/collector-topology.md §2`, `observability-as-code.md §5`, `checklist.md`
16
+
17
+ ### Walkthrough
18
+
19
+ 1. Invoke `/oma-observability "set up OTel stack on k8s"`.
20
+ 2. Intent classifier routes to `setup`.
21
+ 3. `vendor-categories.md §(a) OSS Full-Stack` selects **Grafana LGTM+** (Mimir, Loki, Tempo, Grafana)
22
+ for a team already familiar with Grafana dashboards.
23
+ 4. `transport/collector-topology.md §2 Two-Tier Hybrid` determines the deployment pattern:
24
+ DaemonSet agent per node + Deployment gateway.
25
+
26
+ **Agent CRD; DaemonSet (node-level collection):**
27
+
28
+ ```yaml
29
+ apiVersion: opentelemetry.io/v1beta1
30
+ kind: OpenTelemetryCollector
31
+ metadata:
32
+ name: otel-agent
33
+ namespace: observability
34
+ spec:
35
+ mode: daemonset
36
+ config:
37
+ receivers:
38
+ hostmetrics:
39
+ collection_interval: 30s
40
+ scrapers: { cpu: {}, memory: {}, filesystem: {} }
41
+ filelog:
42
+ include: [/var/log/pods/*/*/*.log]
43
+ include_file_path: true
44
+ kubeletstats:
45
+ collection_interval: 20s
46
+ auth_type: serviceAccount
47
+ processors:
48
+ memory_limiter: # mandatory: first processor in every pipeline
49
+ limit_mib: 400
50
+ check_interval: 1s
51
+ k8sattributes:
52
+ extract:
53
+ metadata: [k8s.pod.name, k8s.namespace.name, k8s.node.name]
54
+ exporters:
55
+ otlp:
56
+ endpoint: otel-gateway.observability.svc:4317
57
+ service:
58
+ pipelines:
59
+ metrics:
60
+ receivers: [hostmetrics, kubeletstats]
61
+ processors: [memory_limiter, k8sattributes]
62
+ exporters: [otlp]
63
+ logs:
64
+ receivers: [filelog]
65
+ processors: [memory_limiter, k8sattributes]
66
+ exporters: [otlp]
67
+ ```
68
+
69
+ **Gateway CRD; Deployment (batching, `mode: deployment`, 2 replicas):**
70
+
71
+ ```yaml
72
+ # Key fields only — full config in observability-as-code.md §5
73
+ spec:
74
+ mode: deployment
75
+ replicas: 2
76
+ config:
77
+ receivers:
78
+ otlp: { protocols: { grpc: { endpoint: 0.0.0.0:4317 } } }
79
+ processors:
80
+ memory_limiter: { check_interval: 1s, limit_percentage: 75 }
81
+ batch: {}
82
+ exporters:
83
+ otlphttp/tempo: { endpoint: http://tempo.observability.svc:4318 }
84
+ prometheusremotewrite: { endpoint: http://mimir.observability.svc:9009/api/v1/push }
85
+ loki: { endpoint: http://loki.observability.svc:3100/loki/api/v1/push }
86
+ service:
87
+ pipelines:
88
+ traces: { receivers: [otlp], processors: [memory_limiter, batch], exporters: [otlphttp/tempo] }
89
+ metrics: { receivers: [otlp], processors: [memory_limiter, batch], exporters: [prometheusremotewrite] }
90
+ logs: { receivers: [otlp], processors: [memory_limiter, batch], exporters: [loki] }
91
+ ```
92
+
93
+ 5. Collector config is committed to git and applied via Argo CD app-of-apps per `observability-as-code.md §7`.
94
+ 6. Validation checklist (from `checklist.md §1, §3`):
95
+ - [ ] `memory_limiter` is the first processor in every pipeline
96
+ - [ ] NTP drift < 100 ms on all nodes (`chronyc tracking`)
97
+ - [ ] Cardinality budget set before first data ingest
98
+ - [ ] Gateway has `≥ 2` replicas with PodDisruptionBudget
99
+
100
+ **Outcome:** 9 pods, 2 services, first trace visible in Grafana Tempo within 15 minutes of `kubectl apply`.
101
+
102
+ ---
103
+
104
+ ## Scenario 2: Incident Forensics: Payment Service 5xx Spike
105
+
106
+ **Situation:** "ap-northeast-2 payment service 5xx spike at 14:20 UTC"; alert fires with no `trace_id`
107
+ provided. On-call SRE must localize root cause in under 15 minutes.
108
+
109
+ **Intent:** `investigate`
110
+
111
+ **Files referenced:** `incident-forensics.md §3–§5 Scenario A`, `boundaries/slo.md §7`, `signals/traces.md`, `signals/logs.md §7`, `boundaries/release.md`
112
+
113
+ ### Walkthrough
114
+
115
+ 1. **Alert source:** multi-window burn-rate alert from `boundaries/slo.md §7` fires; 2 % budget
116
+ consumed in 1 h at 14.4× rate. `severity: critical`.
117
+ 2. Invoke `/oma-observability --investigate "5xx spike in ap-northeast-2"`.
118
+ 3. Router routes to `incident-forensics.md §3 Six-Dimension Narrowing Flow`.
119
+
120
+ **Step 1; Acquire `trace_id` via metric exemplar (`incident-forensics.md §2`):**
121
+
122
+ ```promql
123
+ histogram_quantile(0.99,
124
+ sum by (le, service_name) (
125
+ rate(http_server_request_duration_seconds_bucket{
126
+ deployment_environment="prod",
127
+ cloud_region="ap-northeast-2"
128
+ }[5m])
129
+ )
130
+ )
131
+ # Click a spike data point → Grafana Mimir exemplar panel shows trace_id link
132
+ ```
133
+
134
+ Exemplar retrieved: `trace_id = 9a3f1c8e2b7d4e50a1c3f9d2b8e7a4c0`.
135
+
136
+ **Step 2; Six-dimension narrowing:**
137
+
138
+ | Dimension | Finding |
139
+ |-----------|---------|
140
+ | Region | `cloud.region = ap-northeast-2` only. `ap-southeast-1` healthy. Single-region blast radius. |
141
+ | Server | Errors on 3 of 6 pods, all on `k8s.node.name = ip-10-0-2-11.ec2.internal`. |
142
+ | Service | Earliest ERROR span: `service.name = payments-checkout`, `service.version = v2.4.1`. |
143
+ | Layer | `span.kind = CLIENT`, `db.system = redis`; L7 DB call, not a network-layer issue. |
144
+ | Code | `exception.type = TimeoutException`, `exception.message = "Redis pool exhausted after 5000ms"`, `code.function.name = processPayment`, `code.line.number = 287`. |
145
+
146
+ **Step 3; Cross-signal validation (`incident-forensics.md §4`):**
147
+
148
+ ```
149
+ # Grafana Tempo — TraceQL lookup
150
+ { trace:id = "9a3f1c8e2b7d4e50a1c3f9d2b8e7a4c0" }
151
+
152
+ # Filter logs by trace_id to find correlated warnings
153
+ # Loki LogQL
154
+ {service_name="payments-checkout"} | json | trace_id="9a3f1c8e2b7d4e50a1c3f9d2b8e7a4c0"
155
+ ```
156
+
157
+ Logs reveal: `WARN: connection pool at capacity (256/256)` at 14:21. Redis
158
+ `redis_pool_active_connections / redis_pool_max_connections` metric at 100 %.
159
+
160
+ **Step 4; Release correlation:**
161
+
162
+ `service.version = v2.4.1` deployed at 13:57 UTC; 25 minutes before incident.
163
+ Changelog: Redis connection pool reduced from 512 → 256 in this version.
164
+
165
+ **Step 5; Remediation:**
166
+
167
+ Flagger canary analysis `successRate` already < 99 % → auto-rollback to `v2.4.0` triggers
168
+ per `boundaries/release.md §Flagger Canary CR`. Error rate returns to baseline in 3 minutes.
169
+ Deployment event chain preserved in `signals/audit.md` for post-mortem.
170
+
171
+ ---
172
+
173
+ ## Scenario 3: Multi-Tenant Cost Attribution
174
+
175
+ **Situation:** B2B SaaS now has 50+ tenants. CFO asks: "Which tenants cost most to serve, and
176
+ how does our observability bill break down per customer?"
177
+
178
+ **Intent:** `route` + `tune`
179
+
180
+ **Files referenced:** `boundaries/multi-tenant.md §7`, `signals/cost.md §3–§4`, `vendor-categories.md §(f)`, `meta-observability.md §Cardinality Guardrails`
181
+
182
+ ### Walkthrough
183
+
184
+ 1. Tag every pod at deploy time with `tenant.id`; applied via Helm values or admission webhook
185
+ per `boundaries/multi-tenant.md §7`:
186
+
187
+ ```yaml
188
+ metadata:
189
+ labels:
190
+ tenant.id: "acme-corp"
191
+ tenant.tier: "enterprise"
192
+ ```
193
+
194
+ 2. Deploy OpenCost (CNCF Incubating) with Prometheus scrape per `signals/cost.md §3`:
195
+
196
+ ```yaml
197
+ # OTel Collector gateway — OpenCost scrape
198
+ receivers:
199
+ prometheus:
200
+ config:
201
+ scrape_configs:
202
+ - job_name: opencost
203
+ scrape_interval: 60s
204
+ static_configs:
205
+ - targets: ["opencost.opencost.svc.cluster.local:9003"]
206
+ ```
207
+
208
+ 3. Obtain daily per-tenant cost from the OpenCost Allocation API using a 24-hour
209
+ window and aggregation by the verified workload-label mapping. The stock
210
+ `/metrics` endpoint does not emit `opencost_workload_cost_total`. See
211
+ `signals/cost.md §5` for the CPU/RAM price-times-allocation PromQL and the
212
+ distinction between official gauges, window allocations, and team-implemented
213
+ cumulative cost counters. Include storage/network/shared costs before billing.
214
+
215
+ 4. Cardinality guard: keep top-1 000 tenants labeled, bucket overflow as `"other"` to prevent
216
+ TSDB series explosion (`meta-observability.md §Cardinality Guardrails`, `boundaries/multi-tenant.md §13`):
217
+
218
+ ```yaml
219
+ # OTel Collector transform processor — cardinality cap
220
+ processors:
221
+ transform/cardinality:
222
+ metric_statements:
223
+ - context: datapoint
224
+ statements:
225
+ - set(attributes["tenant_id"], "other")
226
+ where attributes["tenant_id"] not in ${env:TOP_TENANT_LIST}
227
+ ```
228
+
229
+ 5. Per-tier sampling policy at the gateway to control observability bill per tenant
230
+ (`boundaries/multi-tenant.md §5`): `enterprise` = 100 %, `pro` = 20 %, `free` = 2 %.
231
+ Full `tail_sampling` YAML (with `and` sub-policies) lives in `transport/sampling-recipes.md §4`.
232
+
233
+ 6. Include the observability bill itself: instrument the collector pipeline with throughput counters
234
+ per `tenant.id` to apportion Grafana Cloud / Datadog usage proportionally
235
+ (`signals/cost.md §4`, `vendor-categories.md §(f)`).
236
+
237
+ **Outcome:** Identified 3 free-tier tenants consuming 40 % of egress cost. Applied egress rate
238
+ limit at collector ingress (`boundaries/multi-tenant.md §11 Noisy Neighbor Protection`).
239
+ Those tenants were moved to a stricter free-tier cap, reducing monthly egress spend by 35 %.
240
+
241
+ ---
242
+
243
+ ## Scenario 4: Migrating off Fluentd to Fluent Bit
244
+
245
+ **Situation:** Legacy Fluentd DaemonSet is consuming 400 MB RAM per node vs. Fluent Bit's typical
246
+ 80 MB in this measured workload. Use the CNCF migration guide as an informative conversion reference; Fluentd remains Graduated. Team needs zero-downtime
247
+ migration with log parity verification before decommission.
248
+
249
+ **Intent:** `migrate`
250
+
251
+ **Files referenced:** `vendor-categories.md §(h)`, `signals/logs.md §6`, `transport/collector-topology.md §2`, `observability-as-code.md §3`
252
+
253
+ ### Walkthrough
254
+
255
+ 1. Invoke `/oma-observability --migrate "Fluentd to Fluent Bit"`.
256
+ 2. Router routes to `vendor-categories.md §(h) Log Pipeline` → **Fluent Bit** (CNCF Graduated,
257
+ C runtime). Convert Fluentd syntax/plugins/routes and validate them; configuration is not drop-in compatible.
258
+
259
+ **Migration phases (zero-downtime):**
260
+
261
+ **Phase 1; Dual-send:** Deploy Fluent Bit DaemonSet alongside the existing Fluentd DaemonSet.
262
+ Fluent Bit ships logs to the same backend; Fluentd continues as primary. Confirm both streams
263
+ reach the backend without duplicates by comparing log record counts.
264
+
265
+ ```ini
266
+ # Fluent Bit DaemonSet — core pipeline (fluent-bit.conf)
267
+ [INPUT]
268
+ Name tail
269
+ Path /var/log/pods/*/*/*.log
270
+ Parser cri
271
+ Tag kube.*
272
+ Mem_Buf_Limit 5MB
273
+
274
+ [FILTER]
275
+ Name kubernetes
276
+ Match kube.*
277
+ Merge_Log On
278
+ Labels On
279
+
280
+ [OUTPUT]
281
+ Name opentelemetry
282
+ Match kube.*
283
+ Host otel-gateway.observability.svc
284
+ Port 4318
285
+ Logs_uri /v1/logs
286
+ ```
287
+
288
+ **Phase 2; Parity verification:** query log record count per `service.name` in both pipelines
289
+ over a 1-hour window. Expect < 0.1 % divergence accounting for timing windows.
290
+
291
+ ```promql
292
+ # Fluent Bit throughput
293
+ sum by (service_name) (rate(fluentbit_output_proc_records_total[1h]))
294
+
295
+ # Fluentd throughput (comparison)
296
+ sum by (service_name) (rate(fluentd_output_emit_records_total[1h]))
297
+ ```
298
+
299
+ **Phase 3; Decommission Fluentd:** after the agreed parity window, remove the
300
+ Fluentd DaemonSet from its GitOps/Helm desired state and reconcile through its
301
+ owner. A DaemonSet has no replica count and cannot be scaled to zero. For an
302
+ unmanaged DaemonSet, deletion after verified cutover is the removal action:
303
+
304
+ ```bash
305
+ kubectl delete daemonset fluentd -n logging
306
+ ```
307
+
308
+ 3. Commit Fluent Bit ConfigMap and DaemonSet manifests to git; apply via Argo CD per
309
+ `observability-as-code.md §7`.
310
+ 4. Validate with `otelcol validate` on the gateway config; run `promtool check rules` on any
311
+ log-based alerting rules.
312
+
313
+ **Outcome:** Node-level log collection RAM drops from 400 MB (Fluentd/Ruby) to ~80 MB (Fluent Bit/C),
314
+ a 5× reduction typical per the CNCF 2025-10 guide. CPU overhead at steady state also reduces by
315
+ ~60 %. No log gaps observed during the dual-send window.
316
+
317
+ ---
318
+
319
+ ## Scenario 5: SLO with Burn-Rate Alerts (GitOps End-to-End)
320
+
321
+ **Situation:** Platform team adopts the SLO practice for the checkout service. Target: 99.9 %
322
+ availability on a 28-day rolling window. Everything must be versioned in git and applied
323
+ via Argo CD; no manual UI edits.
324
+
325
+ **Intent:** `alert`
326
+
327
+ **Files referenced:** `boundaries/slo.md §5, §7, §8`, `observability-as-code.md §4, §6, §7`, `boundaries/release.md`
328
+
329
+ ### Walkthrough
330
+
331
+ 1. Define the SLO as OpenSLO YAML and commit to the observability repo (`boundaries/slo.md §5`):
332
+
333
+ ```yaml
334
+ apiVersion: openslo/v1
335
+ kind: SLO
336
+ metadata:
337
+ name: checkout-availability
338
+ spec:
339
+ service: checkout
340
+ budgetingMethod: Occurrences
341
+ timeWindow:
342
+ - duration: 28d
343
+ isRolling: true
344
+ objectives:
345
+ - target: 0.999
346
+ indicator:
347
+ metadata:
348
+ name: checkout-success-ratio
349
+ spec:
350
+ ratioMetric:
351
+ counter: false # queries return window counts, not monotonic counters
352
+ good:
353
+ metricSource:
354
+ type: Prometheus
355
+ spec:
356
+ query: sum(increase(http_requests_total{service="checkout",status=~"2..|3.."}[28d]))
357
+ total:
358
+ metricSource:
359
+ type: Prometheus
360
+ spec:
361
+ query: sum(increase(http_requests_total{service="checkout"}[28d]))
362
+ ```
363
+
364
+ The v1 structure follows <https://openslo.com/specification/>.
365
+ `metricSource.spec` is implementation-defined: verify the chosen consumer's
366
+ Prometheus adapter, window evaluation, and counter semantics. This example
367
+ does not imply Sloth or Pyrra directly accepts OpenSLO; native definitions
368
+ require a verified adapter/conversion if OpenSLO is the input.
369
+
370
+ 2. Define the equivalent SLO in Sloth native YAML (`observability-as-code.md §4.2`) and generate its PrometheusRule. Do not pass the OpenSLO document directly unless a verified adapter converts it:
371
+
372
+ ```bash
373
+ sloth generate -i sloth/checkout-slo.yaml | kubectl apply -f -
374
+ ```
375
+
376
+ 3. The generated `PrometheusRule` includes multi-window burn-rate alerts from `boundaries/slo.md §7`
377
+ and `observability-as-code.md §6`:
378
+
379
+ ```yaml
380
+ # Fast burn — 2 % budget in 1 h (14.4× rate), gated by 5 m short window → page
381
+ - alert: CheckoutSLOBurnRateFast
382
+ expr: |
383
+ (sum(rate(http_requests_total{service="checkout",status=~"5.."}[1h]))
384
+ / sum(rate(http_requests_total{service="checkout"}[1h]))) / (1 - 0.999) > 14.4
385
+ and
386
+ (sum(rate(http_requests_total{service="checkout",status=~"5.."}[5m]))
387
+ / sum(rate(http_requests_total{service="checkout"}[5m]))) / (1 - 0.999) > 14.4
388
+ for: 2m
389
+ labels: { severity: critical, slo: checkout-availability }
390
+ annotations:
391
+ summary: "Checkout SLO fast burn: budget exhausting in < 1h"
392
+
393
+ # Slow burn — 5 % budget in 6 h (6× rate), gated by 30 m → ticket
394
+ # Full PromQL in observability-as-code.md §6 and boundaries/slo.md §7.4
395
+ ```
396
+
397
+ 4. GitOps commit flow (`observability-as-code.md §7`):
398
+
399
+ ```
400
+ git PR (checkout-slo.yaml + PrometheusRule)
401
+ → CI: promtool check rules alerts/checkout-slo-burn-rate.yaml
402
+ → CI: promtool test rules alerts/checkout_slo_test.yaml
403
+ → peer review (SRE CODEOWNERS approval)
404
+ → merge to main
405
+ → Argo CD sync → Prometheus Operator applies PrometheusRule to cluster
406
+ ```
407
+
408
+ 5. Validate via synthetic error injection:
409
+
410
+ ```bash
411
+ # Inject 20 % error rate for 3 minutes to trigger fast-burn alert
412
+ kubectl run error-injector --image=curlimages/curl --restart=Never -- \
413
+ sh -c 'for i in $(seq 1 200); do curl -s -o /dev/null -w "%{http_code}" \
414
+ http://checkout-api/error-inject; done'
415
+ ```
416
+
417
+ Fast-burn alert fires in < 2 minutes.
418
+
419
+ 6. Error budget policy (`boundaries/slo.md §8`):
420
+
421
+ | Budget remaining | Action |
422
+ |-----------------|--------|
423
+ | > 50 % | Normal feature velocity |
424
+ | 25–50 % | Review reliability vs feature ratio |
425
+ | < 25 % | Reliability sprint |
426
+ | 0 % exhausted | Deploy freeze until budget recovers |
427
+
428
+ When budget reaches 0 %, Flagger canary promotion gates use the same SLI error rate to block
429
+ new deploys (`boundaries/release.md`).
430
+
431
+ ---
432
+
433
+ ## Appendix: Vendor Query Cross-Reference
434
+
435
+ From `incident-forensics.md §4`; trace lookup by `trace_id` across backends:
436
+
437
+ | Vendor | Query syntax |
438
+ |--------|-------------|
439
+ | Grafana Tempo | `{ trace:id = "4bf92f3577b34da6a3ce929d0e0e4736" }` |
440
+ | Honeycomb | `trace:4bf92f3577b34da6a3ce929d0e0e4736` |
441
+ | Datadog APM | `@trace_id:4bf92f3577b34da6a3ce929d0e0e4736` |
442
+ | Jaeger HTTP API | `GET /api/traces/4bf92f3577b34da6a3ce929d0e0e4736` |
443
+ | Elastic APM | `trace.id: "4bf92f3577b34da6a3ce929d0e0e4736"` |
444
+ | Sentry | `trace_id:4bf92f3577b34da6a3ce929d0e0e4736` |
445
+
446
+ ---
447
+
448
+ Code and YAML snippets are illustrative excerpts. Use the referenced resources for full configuration.