ma-agents 3.4.6 → 3.4.8

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 (576) hide show
  1. package/.opencode/skills/.ma-agents.json +48 -167
  2. package/.opencode/skills/MANIFEST.yaml +0 -128
  3. package/.opencode/skills/add-sprint/.gitkeep +0 -0
  4. package/.opencode/skills/add-sprint/SKILL.md +207 -0
  5. package/.opencode/skills/add-sprint/bmad-skill-manifest.yaml +3 -0
  6. package/.opencode/skills/add-to-sprint/.gitkeep +0 -0
  7. package/.opencode/skills/add-to-sprint/SKILL.md +189 -0
  8. package/.opencode/skills/add-to-sprint/bmad-skill-manifest.yaml +3 -0
  9. package/.opencode/skills/bmad-advanced-elicitation/SKILL.md +137 -0
  10. package/.opencode/skills/bmad-advanced-elicitation/methods.csv +51 -0
  11. package/.opencode/skills/bmad-agent-analyst/SKILL.md +56 -0
  12. package/.opencode/skills/bmad-agent-analyst/bmad-skill-manifest.yaml +11 -0
  13. package/.opencode/skills/bmad-agent-architect/SKILL.md +52 -0
  14. package/.opencode/skills/bmad-agent-architect/bmad-skill-manifest.yaml +11 -0
  15. package/.opencode/skills/bmad-agent-dev/SKILL.md +62 -0
  16. package/.opencode/skills/bmad-agent-dev/bmad-skill-manifest.yaml +11 -0
  17. package/.opencode/skills/bmad-agent-pm/SKILL.md +57 -0
  18. package/.opencode/skills/bmad-agent-pm/bmad-skill-manifest.yaml +11 -0
  19. package/.opencode/skills/bmad-agent-qa/SKILL.md +59 -0
  20. package/.opencode/skills/bmad-agent-qa/bmad-skill-manifest.yaml +11 -0
  21. package/.opencode/skills/bmad-agent-quick-flow-solo-dev/SKILL.md +51 -0
  22. package/.opencode/skills/bmad-agent-quick-flow-solo-dev/bmad-skill-manifest.yaml +11 -0
  23. package/.opencode/skills/bmad-agent-sm/SKILL.md +53 -0
  24. package/.opencode/skills/bmad-agent-sm/bmad-skill-manifest.yaml +11 -0
  25. package/.opencode/skills/bmad-agent-tech-writer/SKILL.md +55 -0
  26. package/.opencode/skills/bmad-agent-tech-writer/bmad-skill-manifest.yaml +11 -0
  27. package/.opencode/skills/bmad-agent-tech-writer/explain-concept.md +20 -0
  28. package/.opencode/skills/bmad-agent-tech-writer/mermaid-gen.md +20 -0
  29. package/.opencode/skills/bmad-agent-tech-writer/validate-doc.md +19 -0
  30. package/.opencode/skills/bmad-agent-tech-writer/write-document.md +20 -0
  31. package/.opencode/skills/bmad-agent-ux-designer/SKILL.md +53 -0
  32. package/.opencode/skills/bmad-agent-ux-designer/bmad-skill-manifest.yaml +11 -0
  33. package/.opencode/skills/bmad-brainstorming/SKILL.md +6 -0
  34. package/.opencode/skills/bmad-brainstorming/brain-methods.csv +62 -0
  35. package/.opencode/skills/bmad-brainstorming/steps/step-01-session-setup.md +214 -0
  36. package/.opencode/skills/bmad-brainstorming/steps/step-01b-continue.md +124 -0
  37. package/.opencode/skills/bmad-brainstorming/steps/step-02a-user-selected.md +229 -0
  38. package/.opencode/skills/bmad-brainstorming/steps/step-02b-ai-recommended.md +239 -0
  39. package/.opencode/skills/bmad-brainstorming/steps/step-02c-random-selection.md +211 -0
  40. package/.opencode/skills/bmad-brainstorming/steps/step-02d-progressive-flow.md +266 -0
  41. package/.opencode/skills/bmad-brainstorming/steps/step-03-technique-execution.md +401 -0
  42. package/.opencode/skills/bmad-brainstorming/steps/step-04-idea-organization.md +305 -0
  43. package/.opencode/skills/bmad-brainstorming/template.md +15 -0
  44. package/.opencode/skills/bmad-brainstorming/workflow.md +53 -0
  45. package/.opencode/skills/bmad-check-implementation-readiness/SKILL.md +6 -0
  46. package/.opencode/skills/bmad-check-implementation-readiness/steps/step-01-document-discovery.md +179 -0
  47. package/.opencode/skills/bmad-check-implementation-readiness/steps/step-02-prd-analysis.md +168 -0
  48. package/.opencode/skills/bmad-check-implementation-readiness/steps/step-03-epic-coverage-validation.md +169 -0
  49. package/.opencode/skills/bmad-check-implementation-readiness/steps/step-04-ux-alignment.md +129 -0
  50. package/.opencode/skills/bmad-check-implementation-readiness/steps/step-05-epic-quality-review.md +241 -0
  51. package/.opencode/skills/bmad-check-implementation-readiness/steps/step-06-final-assessment.md +126 -0
  52. package/.opencode/skills/bmad-check-implementation-readiness/templates/readiness-report-template.md +4 -0
  53. package/.opencode/skills/bmad-check-implementation-readiness/workflow.md +49 -0
  54. package/.opencode/skills/bmad-cis-design-thinking/SKILL.md +6 -0
  55. package/.opencode/skills/bmad-cis-design-thinking/bmad-skill-manifest.yaml +1 -0
  56. package/.opencode/skills/bmad-cis-design-thinking/design-methods.csv +31 -0
  57. package/.opencode/skills/bmad-cis-design-thinking/template.md +111 -0
  58. package/.opencode/skills/bmad-cis-design-thinking/workflow.md +242 -0
  59. package/.opencode/skills/bmad-cis-innovation-strategy/SKILL.md +6 -0
  60. package/.opencode/skills/bmad-cis-innovation-strategy/bmad-skill-manifest.yaml +1 -0
  61. package/.opencode/skills/bmad-cis-innovation-strategy/innovation-frameworks.csv +31 -0
  62. package/.opencode/skills/bmad-cis-innovation-strategy/template.md +189 -0
  63. package/.opencode/skills/bmad-cis-innovation-strategy/workflow.md +315 -0
  64. package/.opencode/skills/bmad-cis-problem-solving/SKILL.md +6 -0
  65. package/.opencode/skills/bmad-cis-problem-solving/bmad-skill-manifest.yaml +1 -0
  66. package/.opencode/skills/bmad-cis-problem-solving/solving-methods.csv +31 -0
  67. package/.opencode/skills/bmad-cis-problem-solving/template.md +165 -0
  68. package/.opencode/skills/bmad-cis-problem-solving/workflow.md +291 -0
  69. package/.opencode/skills/bmad-cis-storytelling/SKILL.md +6 -0
  70. package/.opencode/skills/bmad-cis-storytelling/bmad-skill-manifest.yaml +1 -0
  71. package/.opencode/skills/bmad-cis-storytelling/story-types.csv +26 -0
  72. package/.opencode/skills/bmad-cis-storytelling/template.md +113 -0
  73. package/.opencode/skills/bmad-cis-storytelling/workflow.md +321 -0
  74. package/.opencode/skills/bmad-code-review/SKILL.md +6 -0
  75. package/.opencode/skills/bmad-code-review/steps/step-01-gather-context.md +62 -0
  76. package/.opencode/skills/bmad-code-review/steps/step-02-review.md +34 -0
  77. package/.opencode/skills/bmad-code-review/steps/step-03-triage.md +49 -0
  78. package/.opencode/skills/bmad-code-review/steps/step-04-present.md +129 -0
  79. package/.opencode/skills/bmad-code-review/workflow.md +55 -0
  80. package/.opencode/skills/bmad-correct-course/SKILL.md +6 -0
  81. package/.opencode/skills/bmad-correct-course/checklist.md +288 -0
  82. package/.opencode/skills/bmad-correct-course/workflow.md +267 -0
  83. package/.opencode/skills/bmad-create-architecture/SKILL.md +6 -0
  84. package/.opencode/skills/bmad-create-architecture/architecture-decision-template.md +12 -0
  85. package/.opencode/skills/bmad-create-architecture/data/domain-complexity.csv +13 -0
  86. package/.opencode/skills/bmad-create-architecture/data/project-types.csv +7 -0
  87. package/.opencode/skills/bmad-create-architecture/steps/step-01-init.md +153 -0
  88. package/.opencode/skills/bmad-create-architecture/steps/step-01b-continue.md +173 -0
  89. package/.opencode/skills/bmad-create-architecture/steps/step-02-context.md +224 -0
  90. package/.opencode/skills/bmad-create-architecture/steps/step-03-starter.md +329 -0
  91. package/.opencode/skills/bmad-create-architecture/steps/step-04-decisions.md +318 -0
  92. package/.opencode/skills/bmad-create-architecture/steps/step-05-patterns.md +359 -0
  93. package/.opencode/skills/bmad-create-architecture/steps/step-06-structure.md +379 -0
  94. package/.opencode/skills/bmad-create-architecture/steps/step-07-validation.md +359 -0
  95. package/.opencode/skills/bmad-create-architecture/steps/step-08-complete.md +76 -0
  96. package/.opencode/skills/bmad-create-architecture/workflow.md +38 -0
  97. package/.opencode/skills/bmad-create-epics-and-stories/SKILL.md +6 -0
  98. package/.opencode/skills/bmad-create-epics-and-stories/steps/step-01-validate-prerequisites.md +255 -0
  99. package/.opencode/skills/bmad-create-epics-and-stories/steps/step-02-design-epics.md +212 -0
  100. package/.opencode/skills/bmad-create-epics-and-stories/steps/step-03-create-stories.md +255 -0
  101. package/.opencode/skills/bmad-create-epics-and-stories/steps/step-04-final-validation.md +131 -0
  102. package/.opencode/skills/bmad-create-epics-and-stories/templates/epics-template.md +61 -0
  103. package/.opencode/skills/bmad-create-epics-and-stories/workflow.md +53 -0
  104. package/.opencode/skills/bmad-create-prd/SKILL.md +6 -0
  105. package/.opencode/skills/bmad-create-prd/data/domain-complexity.csv +15 -0
  106. package/.opencode/skills/bmad-create-prd/data/prd-purpose.md +197 -0
  107. package/.opencode/skills/bmad-create-prd/data/project-types.csv +11 -0
  108. package/.opencode/skills/bmad-create-prd/steps-c/step-01-init.md +178 -0
  109. package/.opencode/skills/bmad-create-prd/steps-c/step-01b-continue.md +161 -0
  110. package/.opencode/skills/bmad-create-prd/steps-c/step-02-discovery.md +208 -0
  111. package/.opencode/skills/bmad-create-prd/steps-c/step-02b-vision.md +142 -0
  112. package/.opencode/skills/bmad-create-prd/steps-c/step-02c-executive-summary.md +158 -0
  113. package/.opencode/skills/bmad-create-prd/steps-c/step-03-success.md +214 -0
  114. package/.opencode/skills/bmad-create-prd/steps-c/step-04-journeys.md +201 -0
  115. package/.opencode/skills/bmad-create-prd/steps-c/step-05-domain.md +194 -0
  116. package/.opencode/skills/bmad-create-prd/steps-c/step-06-innovation.md +211 -0
  117. package/.opencode/skills/bmad-create-prd/steps-c/step-07-project-type.md +222 -0
  118. package/.opencode/skills/bmad-create-prd/steps-c/step-08-scoping.md +216 -0
  119. package/.opencode/skills/bmad-create-prd/steps-c/step-09-functional.md +219 -0
  120. package/.opencode/skills/bmad-create-prd/steps-c/step-10-nonfunctional.md +230 -0
  121. package/.opencode/skills/bmad-create-prd/steps-c/step-11-polish.md +221 -0
  122. package/.opencode/skills/bmad-create-prd/steps-c/step-12-complete.md +115 -0
  123. package/.opencode/skills/bmad-create-prd/templates/prd-template.md +10 -0
  124. package/.opencode/skills/bmad-create-prd/workflow.md +62 -0
  125. package/.opencode/skills/bmad-create-story/SKILL.md +6 -0
  126. package/.opencode/skills/bmad-create-story/checklist.md +357 -0
  127. package/.opencode/skills/bmad-create-story/discover-inputs.md +88 -0
  128. package/.opencode/skills/bmad-create-story/template.md +49 -0
  129. package/.opencode/skills/bmad-create-story/workflow.md +380 -0
  130. package/.opencode/skills/bmad-create-ux-design/SKILL.md +6 -0
  131. package/.opencode/skills/bmad-create-ux-design/steps/step-01-init.md +135 -0
  132. package/.opencode/skills/bmad-create-ux-design/steps/step-01b-continue.md +127 -0
  133. package/.opencode/skills/bmad-create-ux-design/steps/step-02-discovery.md +190 -0
  134. package/.opencode/skills/bmad-create-ux-design/steps/step-03-core-experience.md +217 -0
  135. package/.opencode/skills/bmad-create-ux-design/steps/step-04-emotional-response.md +220 -0
  136. package/.opencode/skills/bmad-create-ux-design/steps/step-05-inspiration.md +235 -0
  137. package/.opencode/skills/bmad-create-ux-design/steps/step-06-design-system.md +253 -0
  138. package/.opencode/skills/bmad-create-ux-design/steps/step-07-defining-experience.md +255 -0
  139. package/.opencode/skills/bmad-create-ux-design/steps/step-08-visual-foundation.md +225 -0
  140. package/.opencode/skills/bmad-create-ux-design/steps/step-09-design-directions.md +225 -0
  141. package/.opencode/skills/bmad-create-ux-design/steps/step-10-user-journeys.md +242 -0
  142. package/.opencode/skills/bmad-create-ux-design/steps/step-11-component-strategy.md +249 -0
  143. package/.opencode/skills/bmad-create-ux-design/steps/step-12-ux-patterns.md +238 -0
  144. package/.opencode/skills/bmad-create-ux-design/steps/step-13-responsive-accessibility.md +265 -0
  145. package/.opencode/skills/bmad-create-ux-design/steps/step-14-complete.md +171 -0
  146. package/.opencode/skills/bmad-create-ux-design/ux-design-template.md +13 -0
  147. package/.opencode/skills/bmad-create-ux-design/workflow.md +36 -0
  148. package/.opencode/skills/bmad-dev-story/SKILL.md +6 -0
  149. package/.opencode/skills/bmad-dev-story/checklist.md +80 -0
  150. package/.opencode/skills/bmad-dev-story/workflow.md +450 -0
  151. package/.opencode/skills/bmad-distillator/SKILL.md +178 -0
  152. package/.opencode/skills/bmad-distillator/agents/distillate-compressor.md +116 -0
  153. package/.opencode/skills/bmad-distillator/agents/round-trip-reconstructor.md +68 -0
  154. package/.opencode/skills/bmad-distillator/resources/compression-rules.md +51 -0
  155. package/.opencode/skills/bmad-distillator/resources/distillate-format-reference.md +227 -0
  156. package/.opencode/skills/bmad-distillator/resources/splitting-strategy.md +78 -0
  157. package/.opencode/skills/bmad-distillator/scripts/analyze_sources.py +300 -0
  158. package/.opencode/skills/bmad-distillator/scripts/tests/test_analyze_sources.py +204 -0
  159. package/.opencode/skills/bmad-document-project/SKILL.md +6 -0
  160. package/.opencode/skills/bmad-document-project/checklist.md +245 -0
  161. package/.opencode/skills/bmad-document-project/documentation-requirements.csv +12 -0
  162. package/.opencode/skills/bmad-document-project/instructions.md +128 -0
  163. package/.opencode/skills/bmad-document-project/templates/deep-dive-template.md +345 -0
  164. package/.opencode/skills/bmad-document-project/templates/index-template.md +169 -0
  165. package/.opencode/skills/bmad-document-project/templates/project-overview-template.md +103 -0
  166. package/.opencode/skills/bmad-document-project/templates/project-scan-report-schema.json +160 -0
  167. package/.opencode/skills/bmad-document-project/templates/source-tree-template.md +135 -0
  168. package/.opencode/skills/bmad-document-project/workflow.md +27 -0
  169. package/.opencode/skills/bmad-document-project/workflows/deep-dive-instructions.md +299 -0
  170. package/.opencode/skills/bmad-document-project/workflows/deep-dive-workflow.md +34 -0
  171. package/.opencode/skills/bmad-document-project/workflows/full-scan-instructions.md +1107 -0
  172. package/.opencode/skills/bmad-document-project/workflows/full-scan-workflow.md +34 -0
  173. package/.opencode/skills/bmad-domain-research/SKILL.md +6 -0
  174. package/.opencode/skills/bmad-domain-research/domain-steps/step-01-init.md +137 -0
  175. package/.opencode/skills/bmad-domain-research/domain-steps/step-02-domain-analysis.md +229 -0
  176. package/.opencode/skills/bmad-domain-research/domain-steps/step-03-competitive-landscape.md +238 -0
  177. package/.opencode/skills/bmad-domain-research/domain-steps/step-04-regulatory-focus.md +206 -0
  178. package/.opencode/skills/bmad-domain-research/domain-steps/step-05-technical-trends.md +234 -0
  179. package/.opencode/skills/bmad-domain-research/domain-steps/step-06-research-synthesis.md +444 -0
  180. package/.opencode/skills/bmad-domain-research/research.template.md +29 -0
  181. package/.opencode/skills/bmad-domain-research/workflow.md +49 -0
  182. package/.opencode/skills/bmad-edit-prd/SKILL.md +6 -0
  183. package/.opencode/skills/bmad-edit-prd/steps-e/step-e-01-discovery.md +242 -0
  184. package/.opencode/skills/bmad-edit-prd/steps-e/step-e-01b-legacy-conversion.md +204 -0
  185. package/.opencode/skills/bmad-edit-prd/steps-e/step-e-02-review.md +245 -0
  186. package/.opencode/skills/bmad-edit-prd/steps-e/step-e-03-edit.md +250 -0
  187. package/.opencode/skills/bmad-edit-prd/steps-e/step-e-04-complete.md +165 -0
  188. package/.opencode/skills/bmad-edit-prd/workflow.md +63 -0
  189. package/.opencode/skills/bmad-editorial-review-prose/SKILL.md +86 -0
  190. package/.opencode/skills/bmad-editorial-review-structure/SKILL.md +179 -0
  191. package/.opencode/skills/bmad-generate-project-context/SKILL.md +6 -0
  192. package/.opencode/skills/bmad-generate-project-context/project-context-template.md +21 -0
  193. package/.opencode/skills/bmad-generate-project-context/steps/step-01-discover.md +186 -0
  194. package/.opencode/skills/bmad-generate-project-context/steps/step-02-generate.md +321 -0
  195. package/.opencode/skills/bmad-generate-project-context/steps/step-03-complete.md +278 -0
  196. package/.opencode/skills/bmad-generate-project-context/workflow.md +43 -0
  197. package/.opencode/skills/bmad-help/SKILL.md +73 -0
  198. package/.opencode/skills/bmad-index-docs/SKILL.md +66 -0
  199. package/.opencode/skills/bmad-init/SKILL.md +100 -0
  200. package/.opencode/skills/bmad-init/resources/core-module.yaml +25 -0
  201. package/.opencode/skills/bmad-init/scripts/bmad_init.py +593 -0
  202. package/.opencode/skills/bmad-init/scripts/tests/test_bmad_init.py +329 -0
  203. package/.opencode/skills/bmad-ma-agent-cyber/.gitkeep +0 -0
  204. package/.opencode/skills/bmad-ma-agent-cyber/SKILL.md +49 -0
  205. package/.opencode/skills/bmad-ma-agent-cyber/bmad-skill-manifest.yaml +11 -0
  206. package/.opencode/skills/bmad-ma-agent-devops/.gitkeep +0 -0
  207. package/.opencode/skills/bmad-ma-agent-devops/SKILL.md +49 -0
  208. package/.opencode/skills/bmad-ma-agent-devops/bmad-skill-manifest.yaml +11 -0
  209. package/.opencode/skills/bmad-ma-agent-mil498/.gitkeep +0 -0
  210. package/.opencode/skills/bmad-ma-agent-mil498/SKILL.md +53 -0
  211. package/.opencode/skills/bmad-ma-agent-mil498/bmad-skill-manifest.yaml +11 -0
  212. package/.opencode/skills/bmad-ma-agent-ml/.gitkeep +0 -0
  213. package/.opencode/skills/bmad-ma-agent-ml/SKILL.md +59 -0
  214. package/.opencode/skills/bmad-ma-agent-ml/bmad-skill-manifest.yaml +11 -0
  215. package/.opencode/skills/bmad-ma-agent-sre/.gitkeep +0 -0
  216. package/.opencode/skills/bmad-ma-agent-sre/SKILL.md +49 -0
  217. package/.opencode/skills/bmad-ma-agent-sre/bmad-skill-manifest.yaml +11 -0
  218. package/.opencode/skills/bmad-market-research/SKILL.md +6 -0
  219. package/.opencode/skills/bmad-market-research/research.template.md +29 -0
  220. package/.opencode/skills/bmad-market-research/steps/step-01-init.md +184 -0
  221. package/.opencode/skills/bmad-market-research/steps/step-02-customer-behavior.md +239 -0
  222. package/.opencode/skills/bmad-market-research/steps/step-03-customer-pain-points.md +251 -0
  223. package/.opencode/skills/bmad-market-research/steps/step-04-customer-decisions.md +261 -0
  224. package/.opencode/skills/bmad-market-research/steps/step-05-competitive-analysis.md +173 -0
  225. package/.opencode/skills/bmad-market-research/steps/step-06-research-completion.md +478 -0
  226. package/.opencode/skills/bmad-market-research/workflow.md +49 -0
  227. package/.opencode/skills/bmad-party-mode/SKILL.md +6 -0
  228. package/.opencode/skills/bmad-party-mode/steps/step-01-agent-loading.md +138 -0
  229. package/.opencode/skills/bmad-party-mode/steps/step-02-discussion-orchestration.md +187 -0
  230. package/.opencode/skills/bmad-party-mode/steps/step-03-graceful-exit.md +167 -0
  231. package/.opencode/skills/bmad-party-mode/workflow.md +190 -0
  232. package/.opencode/skills/bmad-product-brief/SKILL.md +87 -0
  233. package/.opencode/skills/bmad-product-brief/agents/artifact-analyzer.md +60 -0
  234. package/.opencode/skills/bmad-product-brief/agents/opportunity-reviewer.md +44 -0
  235. package/.opencode/skills/bmad-product-brief/agents/skeptic-reviewer.md +44 -0
  236. package/.opencode/skills/bmad-product-brief/agents/web-researcher.md +49 -0
  237. package/.opencode/skills/bmad-product-brief/bmad-manifest.json +17 -0
  238. package/.opencode/skills/bmad-product-brief/prompts/contextual-discovery.md +57 -0
  239. package/.opencode/skills/bmad-product-brief/prompts/draft-and-review.md +86 -0
  240. package/.opencode/skills/bmad-product-brief/prompts/finalize.md +75 -0
  241. package/.opencode/skills/bmad-product-brief/prompts/guided-elicitation.md +70 -0
  242. package/.opencode/skills/bmad-product-brief/resources/brief-template.md +60 -0
  243. package/.opencode/skills/bmad-qa-generate-e2e-tests/SKILL.md +6 -0
  244. package/.opencode/skills/bmad-qa-generate-e2e-tests/checklist.md +33 -0
  245. package/.opencode/skills/bmad-qa-generate-e2e-tests/workflow.md +136 -0
  246. package/.opencode/skills/bmad-quick-dev/SKILL.md +6 -0
  247. package/.opencode/skills/bmad-quick-dev/spec-template.md +88 -0
  248. package/.opencode/skills/bmad-quick-dev/step-01-clarify-and-route.md +64 -0
  249. package/.opencode/skills/bmad-quick-dev/step-02-plan.md +35 -0
  250. package/.opencode/skills/bmad-quick-dev/step-03-implement.md +37 -0
  251. package/.opencode/skills/bmad-quick-dev/step-04-review.md +49 -0
  252. package/.opencode/skills/bmad-quick-dev/step-05-present.md +63 -0
  253. package/.opencode/skills/bmad-quick-dev/step-oneshot.md +49 -0
  254. package/.opencode/skills/bmad-quick-dev/workflow.md +79 -0
  255. package/.opencode/skills/bmad-retrospective/SKILL.md +6 -0
  256. package/.opencode/skills/bmad-retrospective/workflow.md +1479 -0
  257. package/.opencode/skills/bmad-review-adversarial-general/SKILL.md +37 -0
  258. package/.opencode/skills/bmad-review-edge-case-hunter/SKILL.md +67 -0
  259. package/.opencode/skills/bmad-shard-doc/SKILL.md +105 -0
  260. package/.opencode/skills/bmad-sprint-planning/SKILL.md +6 -0
  261. package/.opencode/skills/bmad-sprint-planning/checklist.md +33 -0
  262. package/.opencode/skills/bmad-sprint-planning/sprint-status-template.yaml +56 -0
  263. package/.opencode/skills/bmad-sprint-planning/workflow.md +263 -0
  264. package/.opencode/skills/bmad-sprint-status/SKILL.md +6 -0
  265. package/.opencode/skills/bmad-sprint-status/workflow.md +261 -0
  266. package/.opencode/skills/bmad-technical-research/SKILL.md +6 -0
  267. package/.opencode/skills/bmad-technical-research/research.template.md +29 -0
  268. package/.opencode/skills/bmad-technical-research/technical-steps/step-01-init.md +137 -0
  269. package/.opencode/skills/bmad-technical-research/technical-steps/step-02-technical-overview.md +239 -0
  270. package/.opencode/skills/bmad-technical-research/technical-steps/step-03-integration-patterns.md +248 -0
  271. package/.opencode/skills/bmad-technical-research/technical-steps/step-04-architectural-patterns.md +202 -0
  272. package/.opencode/skills/bmad-technical-research/technical-steps/step-05-implementation-research.md +233 -0
  273. package/.opencode/skills/bmad-technical-research/technical-steps/step-06-research-synthesis.md +487 -0
  274. package/.opencode/skills/bmad-technical-research/workflow.md +50 -0
  275. package/.opencode/skills/bmad-validate-prd/SKILL.md +6 -0
  276. package/.opencode/skills/bmad-validate-prd/data/domain-complexity.csv +15 -0
  277. package/.opencode/skills/bmad-validate-prd/data/prd-purpose.md +197 -0
  278. package/.opencode/skills/bmad-validate-prd/data/project-types.csv +11 -0
  279. package/.opencode/skills/bmad-validate-prd/steps-v/step-v-01-discovery.md +221 -0
  280. package/.opencode/skills/bmad-validate-prd/steps-v/step-v-02-format-detection.md +188 -0
  281. package/.opencode/skills/bmad-validate-prd/steps-v/step-v-02b-parity-check.md +206 -0
  282. package/.opencode/skills/bmad-validate-prd/steps-v/step-v-03-density-validation.md +171 -0
  283. package/.opencode/skills/bmad-validate-prd/steps-v/step-v-04-brief-coverage-validation.md +211 -0
  284. package/.opencode/skills/bmad-validate-prd/steps-v/step-v-05-measurability-validation.md +225 -0
  285. package/.opencode/skills/bmad-validate-prd/steps-v/step-v-06-traceability-validation.md +214 -0
  286. package/.opencode/skills/bmad-validate-prd/steps-v/step-v-07-implementation-leakage-validation.md +202 -0
  287. package/.opencode/skills/bmad-validate-prd/steps-v/step-v-08-domain-compliance-validation.md +240 -0
  288. package/.opencode/skills/bmad-validate-prd/steps-v/step-v-09-project-type-validation.md +260 -0
  289. package/.opencode/skills/bmad-validate-prd/steps-v/step-v-10-smart-validation.md +206 -0
  290. package/.opencode/skills/bmad-validate-prd/steps-v/step-v-11-holistic-quality-validation.md +261 -0
  291. package/.opencode/skills/bmad-validate-prd/steps-v/step-v-12-completeness-validation.md +239 -0
  292. package/.opencode/skills/bmad-validate-prd/steps-v/step-v-13-report-complete.md +229 -0
  293. package/.opencode/skills/bmad-validate-prd/workflow.md +62 -0
  294. package/.opencode/skills/cleanup-done/.gitkeep +0 -0
  295. package/.opencode/skills/cleanup-done/SKILL.md +159 -0
  296. package/.opencode/skills/cleanup-done/bmad-skill-manifest.yaml +3 -0
  297. package/.opencode/skills/create-bug-story/.gitkeep +0 -0
  298. package/.opencode/skills/create-bug-story/SKILL.md +263 -0
  299. package/.opencode/skills/create-bug-story/bmad-skill-manifest.yaml +3 -0
  300. package/.opencode/skills/cyber-generate-certs/.gitkeep +0 -0
  301. package/.opencode/skills/cyber-generate-certs/SKILL.md +27 -0
  302. package/.opencode/skills/cyber-generate-certs/bmad-skill-manifest.yaml +3 -0
  303. package/.opencode/skills/cyber-immunity-estimation/.gitkeep +0 -0
  304. package/.opencode/skills/cyber-immunity-estimation/SKILL.md +29 -0
  305. package/.opencode/skills/cyber-immunity-estimation/bmad-skill-manifest.yaml +3 -0
  306. package/.opencode/skills/cyber-security-audit/.gitkeep +0 -0
  307. package/.opencode/skills/cyber-security-audit/SKILL.md +27 -0
  308. package/.opencode/skills/cyber-security-audit/bmad-skill-manifest.yaml +3 -0
  309. package/.opencode/skills/cyber-vault-secrets/.gitkeep +0 -0
  310. package/.opencode/skills/cyber-vault-secrets/SKILL.md +28 -0
  311. package/.opencode/skills/cyber-vault-secrets/bmad-skill-manifest.yaml +3 -0
  312. package/.opencode/skills/cyber-verify-docker-users/.gitkeep +0 -0
  313. package/.opencode/skills/cyber-verify-docker-users/SKILL.md +23 -0
  314. package/.opencode/skills/cyber-verify-docker-users/bmad-skill-manifest.yaml +3 -0
  315. package/.opencode/skills/cyber-verify-image-signature/.gitkeep +0 -0
  316. package/.opencode/skills/cyber-verify-image-signature/SKILL.md +22 -0
  317. package/.opencode/skills/cyber-verify-image-signature/bmad-skill-manifest.yaml +3 -0
  318. package/.opencode/skills/cyber-vulnerability-scan/.gitkeep +0 -0
  319. package/.opencode/skills/cyber-vulnerability-scan/SKILL.md +28 -0
  320. package/.opencode/skills/cyber-vulnerability-scan/bmad-skill-manifest.yaml +3 -0
  321. package/.opencode/skills/devops-configure-infrastructure/.gitkeep +0 -0
  322. package/.opencode/skills/devops-configure-infrastructure/SKILL.md +27 -0
  323. package/.opencode/skills/devops-configure-infrastructure/bmad-skill-manifest.yaml +3 -0
  324. package/.opencode/skills/devops-disconnected-deployment/.gitkeep +0 -0
  325. package/.opencode/skills/devops-disconnected-deployment/SKILL.md +27 -0
  326. package/.opencode/skills/devops-disconnected-deployment/bmad-skill-manifest.yaml +3 -0
  327. package/.opencode/skills/devops-docker-compose-setup/.gitkeep +0 -0
  328. package/.opencode/skills/devops-docker-compose-setup/SKILL.md +26 -0
  329. package/.opencode/skills/devops-docker-compose-setup/bmad-skill-manifest.yaml +3 -0
  330. package/.opencode/skills/devops-manage-helm/.gitkeep +0 -0
  331. package/.opencode/skills/devops-manage-helm/SKILL.md +28 -0
  332. package/.opencode/skills/devops-manage-helm/bmad-skill-manifest.yaml +3 -0
  333. package/.opencode/skills/devops-sign-docker-image/.gitkeep +0 -0
  334. package/.opencode/skills/devops-sign-docker-image/SKILL.md +24 -0
  335. package/.opencode/skills/devops-sign-docker-image/bmad-skill-manifest.yaml +3 -0
  336. package/.opencode/skills/generate-backlog/.gitkeep +0 -0
  337. package/.opencode/skills/generate-backlog/SKILL.md +183 -0
  338. package/.opencode/skills/generate-backlog/bmad-skill-manifest.yaml +3 -0
  339. package/.opencode/skills/mil498-ocd/.gitkeep +0 -0
  340. package/.opencode/skills/mil498-ocd/SKILL.md +30 -0
  341. package/.opencode/skills/mil498-ocd/bmad-skill-manifest.yaml +5 -0
  342. package/.opencode/skills/mil498-ocd/prompts/01-discover-project-artifacts.md +26 -0
  343. package/.opencode/skills/mil498-ocd/prompts/02-load-template.md +10 -0
  344. package/.opencode/skills/mil498-ocd/prompts/03-generate-document.md +90 -0
  345. package/.opencode/skills/mil498-ocd/prompts/04-validate.md +14 -0
  346. package/.opencode/skills/mil498-ocd/prompts/05-review.md +15 -0
  347. package/.opencode/skills/mil498-ocd/prompts/06-save.md +15 -0
  348. package/.opencode/skills/mil498-ocd/template.md +169 -0
  349. package/.opencode/skills/mil498-sdd/.gitkeep +0 -0
  350. package/.opencode/skills/mil498-sdd/SKILL.md +30 -0
  351. package/.opencode/skills/mil498-sdd/bmad-skill-manifest.yaml +5 -0
  352. package/.opencode/skills/mil498-sdd/prompts/01-discover-project-artifacts.md +50 -0
  353. package/.opencode/skills/mil498-sdd/prompts/02-load-template.md +10 -0
  354. package/.opencode/skills/mil498-sdd/prompts/03-generate-document.md +98 -0
  355. package/.opencode/skills/mil498-sdd/prompts/04-validate.md +16 -0
  356. package/.opencode/skills/mil498-sdd/prompts/05-review.md +15 -0
  357. package/.opencode/skills/mil498-sdd/prompts/06-save.md +19 -0
  358. package/.opencode/skills/mil498-sdd/template.md +163 -0
  359. package/.opencode/skills/mil498-sdp/.gitkeep +0 -0
  360. package/.opencode/skills/mil498-sdp/SKILL.md +30 -0
  361. package/.opencode/skills/mil498-sdp/bmad-skill-manifest.yaml +5 -0
  362. package/.opencode/skills/mil498-sdp/prompts/01-discover-project-artifacts.md +32 -0
  363. package/.opencode/skills/mil498-sdp/prompts/02-load-template.md +10 -0
  364. package/.opencode/skills/mil498-sdp/prompts/03-generate-document.md +187 -0
  365. package/.opencode/skills/mil498-sdp/prompts/04-validate.md +13 -0
  366. package/.opencode/skills/mil498-sdp/prompts/05-review.md +15 -0
  367. package/.opencode/skills/mil498-sdp/prompts/06-save.md +14 -0
  368. package/.opencode/skills/mil498-sdp/template.md +307 -0
  369. package/.opencode/skills/mil498-srs/.gitkeep +0 -0
  370. package/.opencode/skills/mil498-srs/SKILL.md +30 -0
  371. package/.opencode/skills/mil498-srs/bmad-skill-manifest.yaml +5 -0
  372. package/.opencode/skills/mil498-srs/prompts/01-discover-project-artifacts.md +42 -0
  373. package/.opencode/skills/mil498-srs/prompts/02-load-template.md +10 -0
  374. package/.opencode/skills/mil498-srs/prompts/03-generate-document.md +100 -0
  375. package/.opencode/skills/mil498-srs/prompts/04-validate.md +16 -0
  376. package/.opencode/skills/mil498-srs/prompts/05-review.md +15 -0
  377. package/.opencode/skills/mil498-srs/prompts/06-save.md +18 -0
  378. package/.opencode/skills/mil498-srs/template.md +219 -0
  379. package/.opencode/skills/mil498-ssdd/.gitkeep +0 -0
  380. package/.opencode/skills/mil498-ssdd/SKILL.md +32 -0
  381. package/.opencode/skills/mil498-ssdd/bmad-skill-manifest.yaml +5 -0
  382. package/.opencode/skills/mil498-ssdd/prompts/01-discover-project-artifacts.md +32 -0
  383. package/.opencode/skills/mil498-ssdd/prompts/02-load-template.md +10 -0
  384. package/.opencode/skills/mil498-ssdd/prompts/03-csci-discovery-interview.md +43 -0
  385. package/.opencode/skills/mil498-ssdd/prompts/04-generate-document.md +96 -0
  386. package/.opencode/skills/mil498-ssdd/prompts/05-validate.md +14 -0
  387. package/.opencode/skills/mil498-ssdd/prompts/06-review.md +16 -0
  388. package/.opencode/skills/mil498-ssdd/prompts/07-save.md +16 -0
  389. package/.opencode/skills/mil498-ssdd/template.md +154 -0
  390. package/.opencode/skills/mil498-sss/.gitkeep +0 -0
  391. package/.opencode/skills/mil498-sss/SKILL.md +31 -0
  392. package/.opencode/skills/mil498-sss/bmad-skill-manifest.yaml +5 -0
  393. package/.opencode/skills/mil498-sss/prompts/01-discover-project-artifacts.md +31 -0
  394. package/.opencode/skills/mil498-sss/prompts/02-load-template.md +10 -0
  395. package/.opencode/skills/mil498-sss/prompts/03-generate-document.md +108 -0
  396. package/.opencode/skills/mil498-sss/prompts/04-validate.md +16 -0
  397. package/.opencode/skills/mil498-sss/prompts/05-review.md +15 -0
  398. package/.opencode/skills/mil498-sss/prompts/06-save.md +15 -0
  399. package/.opencode/skills/mil498-sss/template.md +225 -0
  400. package/.opencode/skills/mil498-std/.gitkeep +0 -0
  401. package/.opencode/skills/mil498-std/SKILL.md +30 -0
  402. package/.opencode/skills/mil498-std/bmad-skill-manifest.yaml +5 -0
  403. package/.opencode/skills/mil498-std/prompts/01-discover-project-artifacts.md +42 -0
  404. package/.opencode/skills/mil498-std/prompts/02-load-template.md +10 -0
  405. package/.opencode/skills/mil498-std/prompts/03-generate-document.md +117 -0
  406. package/.opencode/skills/mil498-std/prompts/04-validate.md +15 -0
  407. package/.opencode/skills/mil498-std/prompts/05-review.md +15 -0
  408. package/.opencode/skills/mil498-std/prompts/06-save.md +15 -0
  409. package/.opencode/skills/mil498-std/template.md +188 -0
  410. package/.opencode/skills/ml-advise/.gitkeep +0 -0
  411. package/.opencode/skills/ml-advise/SKILL.md +76 -0
  412. package/.opencode/skills/ml-advise/bmad-skill-manifest.yaml +3 -0
  413. package/.opencode/skills/ml-advise/skill.json +7 -0
  414. package/.opencode/skills/ml-analysis/.gitkeep +0 -0
  415. package/.opencode/skills/ml-analysis/SKILL.md +60 -0
  416. package/.opencode/skills/ml-analysis/bmad-skill-manifest.yaml +3 -0
  417. package/.opencode/skills/ml-analysis/skill.json +7 -0
  418. package/.opencode/skills/ml-architecture/.gitkeep +0 -0
  419. package/.opencode/skills/ml-architecture/SKILL.md +55 -0
  420. package/.opencode/skills/ml-architecture/bmad-skill-manifest.yaml +3 -0
  421. package/.opencode/skills/ml-architecture/skill.json +7 -0
  422. package/.opencode/skills/ml-detailed-design/.gitkeep +0 -0
  423. package/.opencode/skills/ml-detailed-design/SKILL.md +67 -0
  424. package/.opencode/skills/ml-detailed-design/bmad-skill-manifest.yaml +3 -0
  425. package/.opencode/skills/ml-detailed-design/skill.json +7 -0
  426. package/.opencode/skills/ml-eda/.gitkeep +0 -0
  427. package/.opencode/skills/ml-eda/SKILL.md +56 -0
  428. package/.opencode/skills/ml-eda/bmad-skill-manifest.yaml +3 -0
  429. package/.opencode/skills/ml-eda/scripts/baseline_classifier.py +522 -0
  430. package/.opencode/skills/ml-eda/scripts/class_weights_calculator.py +295 -0
  431. package/.opencode/skills/ml-eda/scripts/clustering_explorer.py +383 -0
  432. package/.opencode/skills/ml-eda/scripts/eda_analyzer.py +654 -0
  433. package/.opencode/skills/ml-eda/skill.json +7 -0
  434. package/.opencode/skills/ml-experiment/.gitkeep +0 -0
  435. package/.opencode/skills/ml-experiment/SKILL.md +74 -0
  436. package/.opencode/skills/ml-experiment/assets/advanced_trainer_configs.py +430 -0
  437. package/.opencode/skills/ml-experiment/assets/quick_trainer_setup.py +233 -0
  438. package/.opencode/skills/ml-experiment/assets/template_datamodule.py +219 -0
  439. package/.opencode/skills/ml-experiment/assets/template_gnn_module.py +341 -0
  440. package/.opencode/skills/ml-experiment/assets/template_lightning_module.py +158 -0
  441. package/.opencode/skills/ml-experiment/bmad-skill-manifest.yaml +3 -0
  442. package/.opencode/skills/ml-experiment/skill.json +7 -0
  443. package/.opencode/skills/ml-hparam/.gitkeep +0 -0
  444. package/.opencode/skills/ml-hparam/SKILL.md +81 -0
  445. package/.opencode/skills/ml-hparam/bmad-skill-manifest.yaml +3 -0
  446. package/.opencode/skills/ml-hparam/skill.json +7 -0
  447. package/.opencode/skills/ml-ideation/.gitkeep +0 -0
  448. package/.opencode/skills/ml-ideation/SKILL.md +50 -0
  449. package/.opencode/skills/ml-ideation/bmad-skill-manifest.yaml +3 -0
  450. package/.opencode/skills/ml-ideation/scripts/validate_ml_prd.py +287 -0
  451. package/.opencode/skills/ml-ideation/skill.json +7 -0
  452. package/.opencode/skills/ml-infra/.gitkeep +0 -0
  453. package/.opencode/skills/ml-infra/SKILL.md +58 -0
  454. package/.opencode/skills/ml-infra/bmad-skill-manifest.yaml +3 -0
  455. package/.opencode/skills/ml-infra/skill.json +7 -0
  456. package/.opencode/skills/ml-retrospective/.gitkeep +0 -0
  457. package/.opencode/skills/ml-retrospective/SKILL.md +63 -0
  458. package/.opencode/skills/ml-retrospective/bmad-skill-manifest.yaml +3 -0
  459. package/.opencode/skills/ml-retrospective/skill.json +7 -0
  460. package/.opencode/skills/ml-revision/.gitkeep +0 -0
  461. package/.opencode/skills/ml-revision/SKILL.md +82 -0
  462. package/.opencode/skills/ml-revision/bmad-skill-manifest.yaml +3 -0
  463. package/.opencode/skills/ml-revision/skill.json +7 -0
  464. package/.opencode/skills/ml-techspec/.gitkeep +0 -0
  465. package/.opencode/skills/ml-techspec/SKILL.md +80 -0
  466. package/.opencode/skills/ml-techspec/bmad-skill-manifest.yaml +3 -0
  467. package/.opencode/skills/ml-techspec/skill.json +7 -0
  468. package/.opencode/skills/modify-sprint/.gitkeep +0 -0
  469. package/.opencode/skills/modify-sprint/SKILL.md +322 -0
  470. package/.opencode/skills/modify-sprint/bmad-skill-manifest.yaml +3 -0
  471. package/.opencode/skills/prioritize-backlog/.gitkeep +0 -0
  472. package/.opencode/skills/prioritize-backlog/SKILL.md +195 -0
  473. package/.opencode/skills/prioritize-backlog/bmad-skill-manifest.yaml +3 -0
  474. package/.opencode/skills/project-context-expansion/.gitkeep +0 -0
  475. package/.opencode/skills/project-context-expansion/SKILL.md +238 -0
  476. package/.opencode/skills/project-context-expansion/bmad-skill-manifest.yaml +3 -0
  477. package/.opencode/skills/remove-from-sprint/.gitkeep +0 -0
  478. package/.opencode/skills/remove-from-sprint/SKILL.md +163 -0
  479. package/.opencode/skills/remove-from-sprint/bmad-skill-manifest.yaml +3 -0
  480. package/.opencode/skills/sprint-status-view/.gitkeep +0 -0
  481. package/.opencode/skills/sprint-status-view/SKILL.md +263 -0
  482. package/.opencode/skills/sprint-status-view/bmad-skill-manifest.yaml +3 -0
  483. package/.opencode/skills/sre-check-deployment-status/.gitkeep +0 -0
  484. package/.opencode/skills/sre-check-deployment-status/SKILL.md +32 -0
  485. package/.opencode/skills/sre-check-deployment-status/bmad-skill-manifest.yaml +3 -0
  486. package/.opencode/skills/sre-check-secrets/.gitkeep +0 -0
  487. package/.opencode/skills/sre-check-secrets/SKILL.md +23 -0
  488. package/.opencode/skills/sre-check-secrets/bmad-skill-manifest.yaml +3 -0
  489. package/.opencode/skills/sre-check-system-status/.gitkeep +0 -0
  490. package/.opencode/skills/sre-check-system-status/SKILL.md +27 -0
  491. package/.opencode/skills/sre-check-system-status/bmad-skill-manifest.yaml +3 -0
  492. package/.opencode/skills/sre-day-2-ops/.gitkeep +0 -0
  493. package/.opencode/skills/sre-day-2-ops/SKILL.md +26 -0
  494. package/.opencode/skills/sre-day-2-ops/bmad-skill-manifest.yaml +3 -0
  495. package/.opencode/skills/sre-deployment-strategies/.gitkeep +0 -0
  496. package/.opencode/skills/sre-deployment-strategies/SKILL.md +28 -0
  497. package/.opencode/skills/sre-deployment-strategies/bmad-skill-manifest.yaml +3 -0
  498. package/.opencode/skills/sre-fix-deployments/.gitkeep +0 -0
  499. package/.opencode/skills/sre-fix-deployments/SKILL.md +25 -0
  500. package/.opencode/skills/sre-fix-deployments/bmad-skill-manifest.yaml +3 -0
  501. package/.opencode/skills/sre-gitops-status/.gitkeep +0 -0
  502. package/.opencode/skills/sre-gitops-status/SKILL.md +25 -0
  503. package/.opencode/skills/sre-gitops-status/bmad-skill-manifest.yaml +3 -0
  504. package/.roo/skills/.ma-agents.json +48 -167
  505. package/.roo/skills/MANIFEST.yaml +0 -128
  506. package/bin/cli.js +20 -6
  507. package/lib/agents.js +5 -50
  508. package/lib/bmad.js +4 -1
  509. package/lib/installer.js +13 -5
  510. package/package.json +1 -1
  511. package/.opencode/skills/ai-audit-trail/SKILL.md +0 -23
  512. package/.opencode/skills/auto-bug-detection/SKILL.md +0 -169
  513. package/.opencode/skills/cmake-best-practices/SKILL.md +0 -64
  514. package/.opencode/skills/cmake-best-practices/examples/cmake.md +0 -59
  515. package/.opencode/skills/code-documentation/SKILL.md +0 -57
  516. package/.opencode/skills/code-documentation/examples/cpp.md +0 -29
  517. package/.opencode/skills/code-documentation/examples/csharp.md +0 -28
  518. package/.opencode/skills/code-documentation/examples/javascript_typescript.md +0 -28
  519. package/.opencode/skills/code-documentation/examples/python.md +0 -57
  520. package/.opencode/skills/code-review/SKILL.md +0 -43
  521. package/.opencode/skills/commit-message/SKILL.md +0 -79
  522. package/.opencode/skills/cpp-best-practices/SKILL.md +0 -234
  523. package/.opencode/skills/cpp-best-practices/examples/modern-idioms.md +0 -189
  524. package/.opencode/skills/cpp-best-practices/examples/naming-and-organization.md +0 -102
  525. package/.opencode/skills/cpp-concurrency-safety/SKILL.md +0 -60
  526. package/.opencode/skills/cpp-concurrency-safety/examples/concurrency.md +0 -73
  527. package/.opencode/skills/cpp-const-correctness/SKILL.md +0 -63
  528. package/.opencode/skills/cpp-const-correctness/examples/const_correctness.md +0 -54
  529. package/.opencode/skills/cpp-memory-handling/SKILL.md +0 -42
  530. package/.opencode/skills/cpp-memory-handling/examples/modern-cpp.md +0 -49
  531. package/.opencode/skills/cpp-memory-handling/examples/smart-pointers.md +0 -46
  532. package/.opencode/skills/cpp-modern-composition/SKILL.md +0 -64
  533. package/.opencode/skills/cpp-modern-composition/examples/composition.md +0 -51
  534. package/.opencode/skills/cpp-robust-interfaces/SKILL.md +0 -55
  535. package/.opencode/skills/cpp-robust-interfaces/examples/interfaces.md +0 -56
  536. package/.opencode/skills/create-hardened-docker-skill/SKILL.md +0 -637
  537. package/.opencode/skills/create-hardened-docker-skill/scripts/create-all.sh +0 -489
  538. package/.opencode/skills/csharp-best-practices/SKILL.md +0 -278
  539. package/.opencode/skills/docker-hardening-verification/SKILL.md +0 -28
  540. package/.opencode/skills/docker-hardening-verification/scripts/verify-hardening.sh +0 -39
  541. package/.opencode/skills/docker-image-signing/SKILL.md +0 -28
  542. package/.opencode/skills/docker-image-signing/scripts/sign-image.sh +0 -33
  543. package/.opencode/skills/document-revision-history/SKILL.md +0 -104
  544. package/.roo/skills/ai-audit-trail/SKILL.md +0 -23
  545. package/.roo/skills/auto-bug-detection/SKILL.md +0 -169
  546. package/.roo/skills/cmake-best-practices/SKILL.md +0 -64
  547. package/.roo/skills/cmake-best-practices/examples/cmake.md +0 -59
  548. package/.roo/skills/code-documentation/SKILL.md +0 -57
  549. package/.roo/skills/code-documentation/examples/cpp.md +0 -29
  550. package/.roo/skills/code-documentation/examples/csharp.md +0 -28
  551. package/.roo/skills/code-documentation/examples/javascript_typescript.md +0 -28
  552. package/.roo/skills/code-documentation/examples/python.md +0 -57
  553. package/.roo/skills/code-review/SKILL.md +0 -43
  554. package/.roo/skills/commit-message/SKILL.md +0 -79
  555. package/.roo/skills/cpp-best-practices/SKILL.md +0 -234
  556. package/.roo/skills/cpp-best-practices/examples/modern-idioms.md +0 -189
  557. package/.roo/skills/cpp-best-practices/examples/naming-and-organization.md +0 -102
  558. package/.roo/skills/cpp-concurrency-safety/SKILL.md +0 -60
  559. package/.roo/skills/cpp-concurrency-safety/examples/concurrency.md +0 -73
  560. package/.roo/skills/cpp-const-correctness/SKILL.md +0 -63
  561. package/.roo/skills/cpp-const-correctness/examples/const_correctness.md +0 -54
  562. package/.roo/skills/cpp-memory-handling/SKILL.md +0 -42
  563. package/.roo/skills/cpp-memory-handling/examples/modern-cpp.md +0 -49
  564. package/.roo/skills/cpp-memory-handling/examples/smart-pointers.md +0 -46
  565. package/.roo/skills/cpp-modern-composition/SKILL.md +0 -64
  566. package/.roo/skills/cpp-modern-composition/examples/composition.md +0 -51
  567. package/.roo/skills/cpp-robust-interfaces/SKILL.md +0 -55
  568. package/.roo/skills/cpp-robust-interfaces/examples/interfaces.md +0 -56
  569. package/.roo/skills/create-hardened-docker-skill/SKILL.md +0 -637
  570. package/.roo/skills/create-hardened-docker-skill/scripts/create-all.sh +0 -489
  571. package/.roo/skills/csharp-best-practices/SKILL.md +0 -278
  572. package/.roo/skills/docker-hardening-verification/SKILL.md +0 -28
  573. package/.roo/skills/docker-hardening-verification/scripts/verify-hardening.sh +0 -39
  574. package/.roo/skills/docker-image-signing/SKILL.md +0 -28
  575. package/.roo/skills/docker-image-signing/scripts/sign-image.sh +0 -33
  576. package/.roo/skills/document-revision-history/SKILL.md +0 -104
@@ -1,189 +0,0 @@
1
- # Modern C++ Idioms Examples
2
-
3
- ## C++17: Structured Bindings and std::optional
4
-
5
- ```cpp
6
- #include <map>
7
- #include <optional>
8
- #include <string>
9
-
10
- // Structured bindings — prefer over .first/.second
11
- std::map<std::string, int> scores = {{"Alice", 95}, {"Bob", 87}};
12
- for (const auto& [name, score] : scores) {
13
- // name and score are directly named — no .first/.second
14
- }
15
-
16
- // std::optional — no more nullptr sentinels or bool out-parameters
17
- std::optional<std::string> findUser(int id) {
18
- if (id == 42) return "Alice";
19
- return std::nullopt; // Not found — explicit, type-safe
20
- }
21
-
22
- void example() {
23
- if (const auto user = findUser(42); user.has_value()) {
24
- // C++17 if-with-initializer keeps 'user' scoped tightly
25
- doSomethingWith(*user);
26
- }
27
- }
28
- ```
29
-
30
- ## C++17: std::variant for Sum Types
31
-
32
- ```cpp
33
- #include <variant>
34
- #include <string>
35
-
36
- struct Success { std::string message; };
37
- struct NotFound { int id; };
38
- struct PermissionDenied { std::string reason; };
39
-
40
- using LookupResult = std::variant<Success, NotFound, PermissionDenied>;
41
-
42
- LookupResult lookup(int id) {
43
- if (id == 0) return NotFound{id};
44
- if (id < 0) return PermissionDenied{"negative ids reserved"};
45
- return Success{"found item " + std::to_string(id)};
46
- }
47
-
48
- void handle(const LookupResult& result) {
49
- std::visit([](const auto& v) {
50
- using T = std::decay_t<decltype(v)>;
51
- if constexpr (std::is_same_v<T, Success>) {
52
- log(v.message);
53
- } else if constexpr (std::is_same_v<T, NotFound>) {
54
- log("not found: " + std::to_string(v.id));
55
- } else {
56
- log("denied: " + v.reason);
57
- }
58
- }, result);
59
- }
60
- ```
61
-
62
- ## C++20: Concepts
63
-
64
- ```cpp
65
- #include <concepts>
66
- #include <iostream>
67
- #include <vector>
68
-
69
- // Before concepts: SFINAE was required — hard to read and debug
70
- // After concepts: clear, readable constraints
71
-
72
- template<std::integral T>
73
- T clamp(T value, T lo, T hi) {
74
- return std::max(lo, std::min(value, hi));
75
- }
76
-
77
- // Custom concept
78
- template<typename T>
79
- concept Printable = requires(T t) {
80
- { t.toString() } -> std::convertible_to<std::string>;
81
- };
82
-
83
- template<Printable T>
84
- void printAll(const std::vector<T>& items) {
85
- for (const auto& item : items) {
86
- std::cout << item.toString() << '\n';
87
- }
88
- }
89
- ```
90
-
91
- ## C++20: Ranges
92
-
93
- ```cpp
94
- #include <algorithm>
95
- #include <iostream>
96
- #include <ranges>
97
- #include <vector>
98
- #include <string>
99
-
100
- void modernRanges() {
101
- std::vector<int> numbers = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
102
-
103
- // Chain range adaptors — lazy, composable, readable
104
- auto evenSquares = numbers
105
- | std::views::filter([](int n) { return n % 2 == 0; })
106
- | std::views::transform([](int n) { return n * n; });
107
-
108
- // Iterate result without materializing an intermediate container
109
- for (int v : evenSquares) {
110
- std::cout << v << '\n'; // 4 16 36 64 100
111
- }
112
-
113
- // Sorting with ranges — no begin/end iterator boilerplate
114
- std::vector<std::string> names = {"Charlie", "Alice", "Bob"};
115
- std::ranges::sort(names);
116
- }
117
- ```
118
-
119
- ## C++23: std::expected for Error Handling
120
-
121
- ```cpp
122
- #include <expected>
123
- #include <string>
124
- #include <fstream>
125
-
126
- enum class ParseError { InvalidFormat, EmptyInput, Overflow };
127
-
128
- // Return expected<T, E> instead of throwing for anticipated failures
129
- std::expected<int, ParseError> parsePositiveInt(std::string_view input) {
130
- if (input.empty()) return std::unexpected(ParseError::EmptyInput);
131
- int result = 0;
132
- for (char c : input) {
133
- if (c < '0' || c > '9') return std::unexpected(ParseError::InvalidFormat);
134
- result = result * 10 + (c - '0');
135
- if (result < 0) return std::unexpected(ParseError::Overflow);
136
- }
137
- return result;
138
- }
139
-
140
- void usage() {
141
- const auto result = parsePositiveInt("123");
142
- if (result) {
143
- std::println("Parsed: {}", *result);
144
- } else {
145
- // Handle error without try/catch — expected path, not exceptional
146
- switch (result.error()) {
147
- case ParseError::InvalidFormat: std::println("invalid format"); break;
148
- case ParseError::EmptyInput: std::println("empty input"); break;
149
- case ParseError::Overflow: std::println("overflow"); break;
150
- }
151
- }
152
- }
153
- ```
154
-
155
- ## Class Design: Rule of Zero
156
-
157
- ```cpp
158
- #include <memory>
159
- #include <string>
160
- #include <vector>
161
-
162
- // Good: Rule of Zero — all members manage themselves
163
- class Document {
164
- public:
165
- explicit Document(std::string title) : title_(std::move(title)) {}
166
-
167
- void addSection(std::string content) {
168
- sections_.emplace_back(std::move(content));
169
- }
170
-
171
- private:
172
- std::string title_; // manages its own lifetime
173
- std::vector<std::string> sections_; // manages its own lifetime
174
- // No destructor, no copy/move definitions needed — compiler generates correct ones
175
- };
176
-
177
- // Bad: unnecessary manual resource management
178
- class BadDocument {
179
- public:
180
- BadDocument(const char* title) {
181
- title_ = new char[strlen(title) + 1]; // raw new — avoid this
182
- strcpy(title_, title);
183
- }
184
- ~BadDocument() { delete[] title_; } // manual cleanup — fragile
185
- // Must also define copy ctor, copy assign, move ctor, move assign correctly...
186
- private:
187
- char* title_;
188
- };
189
- ```
@@ -1,102 +0,0 @@
1
- # Naming and Organization Examples
2
-
3
- ## Naming Conventions
4
-
5
- ```cpp
6
- // File: user_account.h
7
- #pragma once
8
-
9
- #include <string>
10
- #include <string_view>
11
- #include <optional>
12
-
13
- namespace myapp::domain {
14
-
15
- // Types use PascalCase
16
- class UserAccount {
17
- public:
18
- // Constants use UPPER_SNAKE_CASE
19
- static constexpr int MAX_NAME_LENGTH = 128;
20
-
21
- // Constructors and methods use camelCase
22
- explicit UserAccount(std::string_view userName, int accountId);
23
-
24
- // Const member function — does not modify the object
25
- [[nodiscard]] std::string_view getUserName() const;
26
- [[nodiscard]] int getAccountId() const;
27
-
28
- // Mutating method
29
- void setUserName(std::string_view newName);
30
-
31
- private:
32
- // Private members use camelCase with trailing underscore
33
- std::string userName_;
34
- int accountId_;
35
- };
36
-
37
- } // namespace myapp::domain
38
- ```
39
-
40
- ## Header Organization
41
-
42
- ```cpp
43
- // File: connection_pool.cpp
44
-
45
- // 1. Project headers first
46
- #include "connection_pool.h"
47
- #include "network/socket.h"
48
-
49
- // 2. Third-party headers
50
- #include <boost/asio.hpp>
51
-
52
- // 3. Standard library
53
- #include <algorithm>
54
- #include <chrono>
55
- #include <memory>
56
- #include <vector>
57
-
58
- namespace myapp::network {
59
- // ...
60
- } // namespace myapp::network
61
- ```
62
-
63
- ## Forward Declarations to Reduce Coupling
64
-
65
- ```cpp
66
- // File: request_handler.h
67
- #pragma once
68
-
69
- // Forward declare instead of including the full header
70
- namespace myapp::domain {
71
- class UserAccount;
72
- }
73
-
74
- namespace myapp::network {
75
-
76
- class RequestHandler {
77
- public:
78
- // Only a reference/pointer is needed here — forward declaration is sufficient
79
- void handle(const myapp::domain::UserAccount& user);
80
- };
81
-
82
- } // namespace myapp::network
83
- ```
84
-
85
- ## Namespace Usage
86
-
87
- ```cpp
88
- // Good: deeply nested namespace matching directory structure
89
- namespace myapp::network::http {
90
-
91
- class Client {
92
- // ...
93
- };
94
-
95
- } // namespace myapp::network::http
96
-
97
- // Avoid in headers — pollutes every translation unit that includes this header:
98
- // using namespace std; // BAD in headers
99
-
100
- // OK in .cpp files, restricted to file scope:
101
- // using namespace myapp::network::http;
102
- ```
@@ -1,60 +0,0 @@
1
- ---
2
- name: C++ Safety-First Concurrency
3
- description: Enforce safe multi-threading patterns using RAII locking and task-based parallelism (C++14+).
4
- ---
5
- # C++ Safety-First Concurrency (Core Guidelines Section CP)
6
-
7
- This skill prevents common multi-threading defects like data races, deadlocks, and shared-state corruption.
8
-
9
- ## Policies
10
-
11
- ### 1. RAII Locking Only
12
- * **Rule**: Never call `mutex.lock()` or `mutex.unlock()` manually.
13
- * **Action**:
14
- - Use `std::lock_guard` for single mutexes.
15
- - Use `std::unique_lock` if you need deferred locking or condition variables.
16
- - Use `std::scoped_lock` (C++17) for multiple mutexes to avoid deadlocks.
17
- * **Rationale**: Ensures locks are released even if an exception is thrown.
18
-
19
- ### 2. Task-Based Parallelism
20
- * **Rule**: Prefer tasks (`std::async`, `std::packaged_task`, `std::future`) over raw threads (`std::thread`).
21
- * **Action**: Use `auto result = std::async(std::launch::async, func, args...);`
22
- * **Rationale**: Automates thread management and handles value return/exception propagation naturally.
23
-
24
- ### 3. Minimize Shared Mutable State
25
- * **Rule**: Data should ideally be either "Thread-Local" or "Read-Only".
26
- * **Action**:
27
- - Pass data to threads by value where possible.
28
- - Use `const` for data shared between threads.
29
- - Group mutexes with the data they protect (e.g., in a struct).
30
- * **Rationale**: If data isn't shared or isn't mutable, it cannot have a race condition.
31
-
32
- ### 4. Never Sleep/Wait without a Condition
33
- * **Rule**: Avoid `std::this_thread::sleep_for` for synchronization.
34
- * **Action**: Use `std::condition_variable` with a predicate to wait for work.
35
- * **Rationale**: Sleeping is inefficient and bug-prone; condition variables are precise and responsive.
36
-
37
- ## Examples
38
-
39
- ### Before (Dangerous Concurrency)
40
- ```cpp
41
- std::mutex mtx;
42
- int sharedData = 0;
43
-
44
- void worker() {
45
- mtx.lock();
46
- sharedData++;
47
- mtx.unlock(); // What if an exception happened above?
48
- }
49
- ```
50
-
51
- ### After (Safe Concurrency)
52
- ```cpp
53
- std::mutex mtx;
54
- int sharedData = 0;
55
-
56
- void worker() {
57
- std::lock_guard<std::mutex> lock(mtx);
58
- sharedData++;
59
- } // Lock automatically released here
60
- ```
@@ -1,73 +0,0 @@
1
- # Concurrency Safety Examples (C++14+)
2
-
3
- ### 1. Task-Based Parallelism (Async)
4
- Avoids manual thread joining and handles return values safely.
5
-
6
- ```cpp
7
- #include <future>
8
- #include <vector>
9
- #include <numeric>
10
-
11
- int computeLargeSum(const std::vector<int>& data) {
12
- auto part1 = std::async(std::launch::async, [&data]() {
13
- return std::accumulate(data.begin(), data.begin() + data.size()/2, 0);
14
- });
15
-
16
- auto part2 = std::accumulate(data.begin() + data.size()/2, data.end(), 0);
17
-
18
- return part1.get() + part2;
19
- }
20
- ```
21
-
22
- ### 2. Multi-Lock Safety (C++17 scoped_lock)
23
- Prevents deadlocks when acquiring multiple resources.
24
-
25
- ```cpp
26
- #include <mutex>
27
-
28
- struct Account {
29
- std::mutex mtx;
30
- double balance;
31
- };
32
-
33
- void transfer(Account& from, Account& to, double amount) {
34
- // Acquire both locks simultaneously in a deadlock-free manner
35
- std::scoped_lock lock(from.mtx, to.mtx);
36
-
37
- if (from.balance >= amount) {
38
- from.balance -= amount;
39
- to.balance += amount;
40
- }
41
- }
42
- ```
43
-
44
- ### 3. Condition Variables with Predicates
45
- Always use a predicate to protect against "spurious wakeups."
46
-
47
- ```cpp
48
- #include <mutex>
49
- #include <condition_variable>
50
- #include <queue>
51
-
52
- std::queue<int> workQueue;
53
- std::mutex workMtx;
54
- std::condition_variable workCv;
55
- bool finished = false;
56
-
57
- void consumer() {
58
- while (true) {
59
- std::unique_lock<std::mutex> lock(workMtx);
60
-
61
- // Wait until there is work OR we are finished
62
- workCv.wait(lock, []{ return !workQueue.empty() || finished; });
63
-
64
- if (workQueue.empty() && finished) break;
65
-
66
- int task = workQueue.front();
67
- workQueue.pop();
68
- lock.unlock(); // Release lock before processing
69
-
70
- process(task);
71
- }
72
- }
73
- ```
@@ -1,63 +0,0 @@
1
- ---
2
- name: C++ Const-Correctness & Logic
3
- description: Enforce immutability-by-default and push logic to compile-time using constexpr (C++14+).
4
- ---
5
- # C++ Const-Correctness & Logic (Core Guidelines Section Con & ES)
6
-
7
- This skill ensures that C++ code is "immutable by default," reducing side effects and enabling better compiler optimizations.
8
-
9
- ## Policies
10
-
11
- ### 1. By Default, Make Objects Immutable
12
- * **Rule**: Declare all variables `const` unless they *must* be modified.
13
- * **Action**:
14
- - Use `const auto x = ...;` instead of `auto x = ...;`.
15
- - Use `const` for function results that won't be modified.
16
- * **Rationale**: Prevents accidental state mutation and improves code reasoning.
17
-
18
- ### 2. Const Member Functions
19
- * **Rule**: Any member function that does not modify the object's observable state must be `const`.
20
- * **Action**: Append `const` to the function signature: `T getValue() const { ... }`.
21
- * **Rationale**: Necessary for calling functions on `const` objects and `const&` parameters.
22
-
23
- ### 3. Compute at Compile-Time (`constexpr`)
24
- * **Rule**: Prefer `constexpr` for any value or simple logic that *can* be computed at compile-time.
25
- * **Action**:
26
- - Use `constexpr` for constants.
27
- - Declare mathematical or configuration functions as `constexpr` (C++14 allows complex logic in `constexpr`).
28
- * **Rationale**: Moves work from runtime to compile-time, reducing binary size and execution time.
29
-
30
- ### 4. Consistent Parameter Logic
31
- * **Rule**: Avoid passing by value for large types; avoid passing by non-const reference unless it's an "out" or "in-out" parameter.
32
- * **Action**:
33
- - **In parameters**: Pass cheap types (int, double, pointers, `string_view`) by value. Pass large types by `const&`.
34
- - **Out/In-out parameters**: Pass by `T&`.
35
- - **Sinks**: Pass by `T&&` (rvalue reference).
36
-
37
- ## Examples
38
-
39
- ### Before (Mutable/Runtime Logic)
40
- ```cpp
41
- int getMultiplier(int x) {
42
- return x * 10;
43
- }
44
-
45
- void process() {
46
- auto data = loadData();
47
- auto mult = getMultiplier(5); // mutable by accident
48
- data.apply(mult);
49
- }
50
- ```
51
-
52
- ### After (Const/Compile-time Logic)
53
- ```cpp
54
- constexpr int getMultiplier(int x) {
55
- return x * 10;
56
- }
57
-
58
- void process() {
59
- const auto data = loadData(); // data won't change
60
- constexpr auto mult = getMultiplier(5); // computed at compile time
61
- data.apply(mult);
62
- }
63
- ```
@@ -1,54 +0,0 @@
1
- # Const-Correctness Examples (C++14+)
2
-
3
- ### 1. Complex Const Initialization (Lambda)
4
- Sometimes you need to conditionally initialize a variable, but you want it to be `const` afterward.
5
-
6
- **Modern (C++14):**
7
- ```cpp
8
- const auto path = []() {
9
- if (auto env = std::getenv("APP_PATH")) {
10
- return std::string(env);
11
- }
12
- return std::string("/default/path");
13
- }(); // Immediately invoked lambda
14
- ```
15
-
16
- ### 2. Const-Correct Member Functions
17
- Ensure getters and inspectors are `const`.
18
-
19
- ```cpp
20
- class Config {
21
- int timeout = 30;
22
- public:
23
- // This is an inspector, must be const
24
- int getTimeout() const { return timeout; }
25
-
26
- // This is a mutator, cannot be const
27
- void setTimeout(int t) { timeout = t; }
28
- };
29
- ```
30
-
31
- ### 3. C++14 constexpr Logic
32
- C++14 expanded `constexpr` significantly (loops, branches allowed).
33
-
34
- ```cpp
35
- constexpr int fibonacci(int n) {
36
- if (n <= 1) return n;
37
- int a = 0, b = 1;
38
- for (int i = 2; i <= n; ++i) {
39
- int next = a + b;
40
- a = b;
41
- b = next;
42
- }
43
- return b;
44
- }
45
-
46
- // Result is computed by the compiler
47
- constexpr int fib10 = fibonacci(10);
48
- ```
49
-
50
- ### 4. Parameter Passing Guide
51
- - `void f(int)` : Fast to copy (Value)
52
- - `void f(const LargeObject&)` : Expensive to copy (Const Ref)
53
- - `void f(LargeObject&)` : I will modify this (Ref)
54
- - `void f(LargeObject&&)` : I will MOVE/OWN this (Rvalue Ref)
@@ -1,42 +0,0 @@
1
- ---
2
- name: C++ Safe Memory Handling
3
- description: Enforces Modern C++ practices (RAII, Smart Pointers) to prevent memory leaks, dangling pointers, and buffer overflows.
4
- ---
5
- # C++ Safe Memory Handling
6
-
7
- Guidelines for writing robust, memory-safe C++ code by leveraging Modern C++ features and RAII principles.
8
-
9
- ## Mandatory Policies
10
-
11
- ### 1. Smart Pointers by Default
12
- You MUST use smart pointers for all heap allocations.
13
- - Use `std::unique_ptr` for exclusive ownership. This is the preferred default.
14
- - Use `std::shared_ptr` only when multiple objects share ownership of a resource.
15
- - Use `std::weak_ptr` to break circular dependencies or for non-owning references that must be checked for validity.
16
-
17
- ### 2. Forbid raw new/delete
18
- You MUST NOT use raw `new` and `delete` operators.
19
- - Use `std::make_unique` (C++14+) or `std::make_shared` to allocate objects on the heap.
20
- - Exceptions are only allowed within low-level custom container implementations, which must be encapsulated.
21
-
22
- ### 3. Prefer Value Semantics
23
- Always prefer stack-allocated objects and value semantics over pointer-based indirection unless heap allocation is strictly necessary (e.g., polymorphism, very large objects, or dynamic lifetimes).
24
-
25
- ### 4. RAII for All Resources
26
- Every resource (file handles, sockets, mutexes, memory) MUST be managed by an object whose constructor acquires the resource and destructor releases it. Never rely on manual cleanup blocks.
27
-
28
- ### 5. Standard Containers
29
- NEVER use raw buffers or manually managed arrays.
30
- - Use `std::vector` for dynamic arrays.
31
- - Use `std::string` for text.
32
- - Use `std::array` (C++11) for fixed-size stack arrays.
33
- - Access elements using `.at()` if bounds checking is required for security-critical logic.
34
-
35
- ## Critical Rules
36
- - **No Dangling Pointers**: Never return a pointer or reference to a local stack-allocated variable.
37
- - **Rule of Zero/Five**: Follow the "Rule of Zero" (prefer components that handle their own resource management). If manual management is needed, correctly implement the "Rule of Five".
38
- - **Nullable Checks**: Always check pointers (even smart ones) for `nullptr` before dereferencing if there is any chance they could be empty.
39
-
40
- ## Resources
41
- - [Modern C++ Examples](file:///skills/cpp-memory-handling/examples/modern-cpp.md)
42
- - [Smart Pointer Reference](file:///skills/cpp-memory-handling/examples/smart-pointers.md)
@@ -1,49 +0,0 @@
1
- # Modern C++ Safe Memory Examples
2
-
3
- Demonstrating RAII and safe resource management in modern C++.
4
-
5
- ## RAII Resource Management
6
-
7
- ```cpp
8
- #include <iostream>
9
- #include <fstream>
10
- #include <vector>
11
- #include <memory>
12
-
13
- class FileHandler {
14
- public:
15
- FileHandler(const std::string& filename) : file(filename) {
16
- if (!file.is_open()) throw std::runtime_error("Could not open file");
17
- }
18
- // Destructor automatically closes the file
19
- ~FileHandler() { if (file.is_open()) file.close(); }
20
-
21
- void write(const std::string& data) { file << data; }
22
-
23
- private:
24
- std::ofstream file;
25
- };
26
-
27
- void log_data(const std::string& message) {
28
- // RAII handles lifetime. No manual close needed.
29
- FileHandler handler("app.log");
30
- handler.write(message);
31
- }
32
- ```
33
-
34
- ## Vector vs Raw Arrays
35
-
36
- ```cpp
37
- // BAD: Manual memory management
38
- void bad_array() {
39
- int* arr = new int[100];
40
- // ... logic ...
41
- delete[] arr; // Manual cleanup is error-prone
42
- }
43
-
44
- // GOOD: Automatic memory management
45
- void safe_vector() {
46
- std::vector<int> arr(100);
47
- // Vector manages its own heap memory. RAII cleans up at scope exit.
48
- }
49
- ```
@@ -1,46 +0,0 @@
1
- # C++ Smart Pointer Reference
2
-
3
- Guidelines for selecting and using smart pointers correctly.
4
-
5
- ## unique_ptr (Preferred Default)
6
- - Represents **exclusive ownership**.
7
- - Zero runtime overhead compared to raw pointers.
8
-
9
- ```cpp
10
- #include <memory>
11
-
12
- class Widget { /* ... */ };
13
-
14
- void exclusive_use() {
15
- // Use make_unique for safety and efficiency
16
- auto widget = std::make_unique<Widget>();
17
-
18
- // Ownership can be moved but not copied
19
- std::unique_ptr<Widget> other = std::move(widget);
20
- }
21
- ```
22
-
23
- ## shared_ptr (For Shared Ownership)
24
- - Use only when **multiple** owners truly exist.
25
- - Reference counting has small overhead.
26
-
27
- ```cpp
28
- void shared_use() {
29
- auto shared_widget = std::make_shared<Widget>();
30
-
31
- auto owner1 = shared_widget; // Count = 2
32
- auto owner2 = shared_widget; // Count = 3
33
- }
34
- ```
35
-
36
- ## weak_ptr (Breaking Cycles)
37
- - Non-owning reference. Must be locked before use.
38
-
39
- ```cpp
40
- void weak_use(std::weak_ptr<Widget> weak_widget) {
41
- if (auto shared = weak_widget.lock()) {
42
- // Resource is still alive
43
- shared->do_something();
44
- }
45
- }
46
- ```