ma-agents 2.20.0 → 2.20.1

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 (370) hide show
  1. package/package.json +1 -1
  2. package/.cline/clinerules.md +0 -14
  3. package/.cline/skills/.ma-agents.json +0 -199
  4. package/.cline/skills/MANIFEST.yaml +0 -204
  5. package/.cline/skills/ai-audit-trail/SKILL.md +0 -23
  6. package/.cline/skills/cmake-best-practices/SKILL.md +0 -64
  7. package/.cline/skills/cmake-best-practices/examples/cmake.md +0 -59
  8. package/.cline/skills/code-documentation/SKILL.md +0 -57
  9. package/.cline/skills/code-documentation/examples/cpp.md +0 -29
  10. package/.cline/skills/code-documentation/examples/csharp.md +0 -28
  11. package/.cline/skills/code-documentation/examples/javascript_typescript.md +0 -28
  12. package/.cline/skills/code-documentation/examples/python.md +0 -57
  13. package/.cline/skills/code-review/SKILL.md +0 -59
  14. package/.cline/skills/commit-message/SKILL.md +0 -79
  15. package/.cline/skills/cpp-concurrency-safety/SKILL.md +0 -60
  16. package/.cline/skills/cpp-concurrency-safety/examples/concurrency.md +0 -73
  17. package/.cline/skills/cpp-const-correctness/SKILL.md +0 -63
  18. package/.cline/skills/cpp-const-correctness/examples/const_correctness.md +0 -54
  19. package/.cline/skills/cpp-memory-handling/SKILL.md +0 -42
  20. package/.cline/skills/cpp-memory-handling/examples/modern-cpp.md +0 -49
  21. package/.cline/skills/cpp-memory-handling/examples/smart-pointers.md +0 -46
  22. package/.cline/skills/cpp-modern-composition/SKILL.md +0 -64
  23. package/.cline/skills/cpp-modern-composition/examples/composition.md +0 -51
  24. package/.cline/skills/cpp-robust-interfaces/SKILL.md +0 -55
  25. package/.cline/skills/cpp-robust-interfaces/examples/interfaces.md +0 -56
  26. package/.cline/skills/create-hardened-docker-skill/SKILL.md +0 -637
  27. package/.cline/skills/create-hardened-docker-skill/scripts/create-all.sh +0 -489
  28. package/.cline/skills/docker-hardening-verification/SKILL.md +0 -28
  29. package/.cline/skills/docker-hardening-verification/scripts/verify-hardening.sh +0 -39
  30. package/.cline/skills/docker-image-signing/SKILL.md +0 -28
  31. package/.cline/skills/docker-image-signing/scripts/sign-image.sh +0 -33
  32. package/.cline/skills/document-revision-history/SKILL.md +0 -104
  33. package/.cline/skills/git-workflow-skill/SKILL.md +0 -194
  34. package/.cline/skills/git-workflow-skill/hooks/commit-msg +0 -61
  35. package/.cline/skills/git-workflow-skill/hooks/pre-commit +0 -38
  36. package/.cline/skills/git-workflow-skill/hooks/prepare-commit-msg +0 -56
  37. package/.cline/skills/git-workflow-skill/scripts/finish-feature.sh +0 -192
  38. package/.cline/skills/git-workflow-skill/scripts/install-hooks.sh +0 -55
  39. package/.cline/skills/git-workflow-skill/scripts/start-feature.sh +0 -110
  40. package/.cline/skills/git-workflow-skill/scripts/validate-workflow.sh +0 -229
  41. package/.cline/skills/js-ts-dependency-mgmt/SKILL.md +0 -49
  42. package/.cline/skills/js-ts-dependency-mgmt/examples/dependency_mgmt.md +0 -60
  43. package/.cline/skills/js-ts-security-skill/SKILL.md +0 -64
  44. package/.cline/skills/js-ts-security-skill/scripts/verify-security.sh +0 -136
  45. package/.cline/skills/logging-best-practices/SKILL.md +0 -50
  46. package/.cline/skills/logging-best-practices/docs/logging-standards.md +0 -29
  47. package/.cline/skills/logging-best-practices/examples/cpp.md +0 -36
  48. package/.cline/skills/logging-best-practices/examples/csharp.md +0 -49
  49. package/.cline/skills/logging-best-practices/examples/javascript.md +0 -77
  50. package/.cline/skills/logging-best-practices/examples/python.md +0 -57
  51. package/.cline/skills/opentelemetry-best-practices/SKILL.md +0 -34
  52. package/.cline/skills/opentelemetry-best-practices/docs/otel-standards.md +0 -37
  53. package/.cline/skills/opentelemetry-best-practices/examples/go.md +0 -32
  54. package/.cline/skills/opentelemetry-best-practices/examples/javascript.md +0 -58
  55. package/.cline/skills/opentelemetry-best-practices/examples/python.md +0 -37
  56. package/.cline/skills/python-dependency-mgmt/SKILL.md +0 -42
  57. package/.cline/skills/python-dependency-mgmt/examples/dependency_mgmt.md +0 -67
  58. package/.cline/skills/python-security-skill/SKILL.md +0 -56
  59. package/.cline/skills/python-security-skill/examples/security.md +0 -56
  60. package/.cline/skills/self-signed-cert/SKILL.md +0 -42
  61. package/.cline/skills/self-signed-cert/scripts/generate-cert.ps1 +0 -45
  62. package/.cline/skills/self-signed-cert/scripts/generate-cert.sh +0 -43
  63. package/.cline/skills/skill-creator/SKILL.md +0 -196
  64. package/.cline/skills/skill-creator/docs/output-patterns.md +0 -82
  65. package/.cline/skills/skill-creator/docs/workflows.md +0 -28
  66. package/.cline/skills/skill-creator/scripts/init_skill.py +0 -208
  67. package/.cline/skills/skill-creator/scripts/package_skill.py +0 -99
  68. package/.cline/skills/skill-creator/scripts/quick_validate.py +0 -113
  69. package/.cline/skills/test-accompanied-development/SKILL.md +0 -50
  70. package/.cline/skills/test-generator/SKILL.md +0 -73
  71. package/.cline/skills/vercel-react-best-practices/SKILL.md +0 -109
  72. package/.cline/skills/verify-hardened-docker-skill/SKILL.md +0 -442
  73. package/.cline/skills/verify-hardened-docker-skill/scripts/verify-docker-hardening.sh +0 -439
  74. package/.clinerules +0 -14
  75. package/.cursor/cursor.md +0 -14
  76. package/.cursor/skills/.ma-agents.json +0 -199
  77. package/.cursor/skills/MANIFEST.yaml +0 -204
  78. package/.cursor/skills/ai-audit-trail/SKILL.md +0 -23
  79. package/.cursor/skills/cmake-best-practices/SKILL.md +0 -64
  80. package/.cursor/skills/cmake-best-practices/examples/cmake.md +0 -59
  81. package/.cursor/skills/code-documentation/SKILL.md +0 -57
  82. package/.cursor/skills/code-documentation/examples/cpp.md +0 -29
  83. package/.cursor/skills/code-documentation/examples/csharp.md +0 -28
  84. package/.cursor/skills/code-documentation/examples/javascript_typescript.md +0 -28
  85. package/.cursor/skills/code-documentation/examples/python.md +0 -57
  86. package/.cursor/skills/code-review/SKILL.md +0 -43
  87. package/.cursor/skills/commit-message/SKILL.md +0 -79
  88. package/.cursor/skills/cpp-concurrency-safety/SKILL.md +0 -60
  89. package/.cursor/skills/cpp-concurrency-safety/examples/concurrency.md +0 -73
  90. package/.cursor/skills/cpp-const-correctness/SKILL.md +0 -63
  91. package/.cursor/skills/cpp-const-correctness/examples/const_correctness.md +0 -54
  92. package/.cursor/skills/cpp-memory-handling/SKILL.md +0 -42
  93. package/.cursor/skills/cpp-memory-handling/examples/modern-cpp.md +0 -49
  94. package/.cursor/skills/cpp-memory-handling/examples/smart-pointers.md +0 -46
  95. package/.cursor/skills/cpp-modern-composition/SKILL.md +0 -64
  96. package/.cursor/skills/cpp-modern-composition/examples/composition.md +0 -51
  97. package/.cursor/skills/cpp-robust-interfaces/SKILL.md +0 -55
  98. package/.cursor/skills/cpp-robust-interfaces/examples/interfaces.md +0 -56
  99. package/.cursor/skills/create-hardened-docker-skill/SKILL.md +0 -637
  100. package/.cursor/skills/create-hardened-docker-skill/scripts/create-all.sh +0 -489
  101. package/.cursor/skills/docker-hardening-verification/SKILL.md +0 -28
  102. package/.cursor/skills/docker-hardening-verification/scripts/verify-hardening.sh +0 -39
  103. package/.cursor/skills/docker-image-signing/SKILL.md +0 -28
  104. package/.cursor/skills/docker-image-signing/scripts/sign-image.sh +0 -33
  105. package/.cursor/skills/document-revision-history/SKILL.md +0 -104
  106. package/.cursor/skills/git-workflow-skill/SKILL.md +0 -194
  107. package/.cursor/skills/git-workflow-skill/hooks/commit-msg +0 -61
  108. package/.cursor/skills/git-workflow-skill/hooks/pre-commit +0 -38
  109. package/.cursor/skills/git-workflow-skill/hooks/prepare-commit-msg +0 -56
  110. package/.cursor/skills/git-workflow-skill/scripts/finish-feature.sh +0 -192
  111. package/.cursor/skills/git-workflow-skill/scripts/install-hooks.sh +0 -55
  112. package/.cursor/skills/git-workflow-skill/scripts/start-feature.sh +0 -110
  113. package/.cursor/skills/git-workflow-skill/scripts/validate-workflow.sh +0 -229
  114. package/.cursor/skills/js-ts-dependency-mgmt/SKILL.md +0 -49
  115. package/.cursor/skills/js-ts-dependency-mgmt/examples/dependency_mgmt.md +0 -60
  116. package/.cursor/skills/js-ts-security-skill/SKILL.md +0 -64
  117. package/.cursor/skills/js-ts-security-skill/scripts/verify-security.sh +0 -136
  118. package/.cursor/skills/logging-best-practices/SKILL.md +0 -50
  119. package/.cursor/skills/logging-best-practices/examples/cpp.md +0 -36
  120. package/.cursor/skills/logging-best-practices/examples/csharp.md +0 -49
  121. package/.cursor/skills/logging-best-practices/examples/javascript.md +0 -77
  122. package/.cursor/skills/logging-best-practices/examples/python.md +0 -57
  123. package/.cursor/skills/logging-best-practices/references/logging-standards.md +0 -29
  124. package/.cursor/skills/opentelemetry-best-practices/SKILL.md +0 -34
  125. package/.cursor/skills/opentelemetry-best-practices/examples/go.md +0 -32
  126. package/.cursor/skills/opentelemetry-best-practices/examples/javascript.md +0 -58
  127. package/.cursor/skills/opentelemetry-best-practices/examples/python.md +0 -37
  128. package/.cursor/skills/opentelemetry-best-practices/references/otel-standards.md +0 -37
  129. package/.cursor/skills/python-dependency-mgmt/SKILL.md +0 -42
  130. package/.cursor/skills/python-dependency-mgmt/examples/dependency_mgmt.md +0 -67
  131. package/.cursor/skills/python-security-skill/SKILL.md +0 -56
  132. package/.cursor/skills/python-security-skill/examples/security.md +0 -56
  133. package/.cursor/skills/self-signed-cert/SKILL.md +0 -42
  134. package/.cursor/skills/self-signed-cert/scripts/generate-cert.ps1 +0 -45
  135. package/.cursor/skills/self-signed-cert/scripts/generate-cert.sh +0 -43
  136. package/.cursor/skills/skill-creator/SKILL.md +0 -196
  137. package/.cursor/skills/skill-creator/references/output-patterns.md +0 -82
  138. package/.cursor/skills/skill-creator/references/workflows.md +0 -28
  139. package/.cursor/skills/skill-creator/scripts/init_skill.py +0 -208
  140. package/.cursor/skills/skill-creator/scripts/package_skill.py +0 -99
  141. package/.cursor/skills/skill-creator/scripts/quick_validate.py +0 -113
  142. package/.cursor/skills/test-accompanied-development/SKILL.md +0 -50
  143. package/.cursor/skills/test-generator/SKILL.md +0 -65
  144. package/.cursor/skills/vercel-react-best-practices/SKILL.md +0 -109
  145. package/.cursor/skills/verify-hardened-docker-skill/SKILL.md +0 -442
  146. package/.cursor/skills/verify-hardened-docker-skill/scripts/verify-docker-hardening.sh +0 -439
  147. package/.gemini/gemini.md +0 -14
  148. package/.gemini/skills/.ma-agents.json +0 -199
  149. package/.gemini/skills/MANIFEST.yaml +0 -204
  150. package/.gemini/skills/ai-audit-trail/SKILL.md +0 -23
  151. package/.gemini/skills/cmake-best-practices/SKILL.md +0 -64
  152. package/.gemini/skills/cmake-best-practices/examples/cmake.md +0 -59
  153. package/.gemini/skills/code-documentation/SKILL.md +0 -57
  154. package/.gemini/skills/code-documentation/examples/cpp.md +0 -29
  155. package/.gemini/skills/code-documentation/examples/csharp.md +0 -28
  156. package/.gemini/skills/code-documentation/examples/javascript_typescript.md +0 -28
  157. package/.gemini/skills/code-documentation/examples/python.md +0 -57
  158. package/.gemini/skills/code-review/SKILL.md +0 -43
  159. package/.gemini/skills/commit-message/SKILL.md +0 -79
  160. package/.gemini/skills/cpp-concurrency-safety/SKILL.md +0 -60
  161. package/.gemini/skills/cpp-concurrency-safety/examples/concurrency.md +0 -73
  162. package/.gemini/skills/cpp-const-correctness/SKILL.md +0 -63
  163. package/.gemini/skills/cpp-const-correctness/examples/const_correctness.md +0 -54
  164. package/.gemini/skills/cpp-memory-handling/SKILL.md +0 -42
  165. package/.gemini/skills/cpp-memory-handling/examples/modern-cpp.md +0 -49
  166. package/.gemini/skills/cpp-memory-handling/examples/smart-pointers.md +0 -46
  167. package/.gemini/skills/cpp-modern-composition/SKILL.md +0 -64
  168. package/.gemini/skills/cpp-modern-composition/examples/composition.md +0 -51
  169. package/.gemini/skills/cpp-robust-interfaces/SKILL.md +0 -55
  170. package/.gemini/skills/cpp-robust-interfaces/examples/interfaces.md +0 -56
  171. package/.gemini/skills/create-hardened-docker-skill/SKILL.md +0 -637
  172. package/.gemini/skills/create-hardened-docker-skill/scripts/create-all.sh +0 -489
  173. package/.gemini/skills/docker-hardening-verification/SKILL.md +0 -28
  174. package/.gemini/skills/docker-hardening-verification/scripts/verify-hardening.sh +0 -39
  175. package/.gemini/skills/docker-image-signing/SKILL.md +0 -28
  176. package/.gemini/skills/docker-image-signing/scripts/sign-image.sh +0 -33
  177. package/.gemini/skills/document-revision-history/SKILL.md +0 -104
  178. package/.gemini/skills/git-workflow-skill/SKILL.md +0 -194
  179. package/.gemini/skills/git-workflow-skill/hooks/commit-msg +0 -61
  180. package/.gemini/skills/git-workflow-skill/hooks/pre-commit +0 -38
  181. package/.gemini/skills/git-workflow-skill/hooks/prepare-commit-msg +0 -56
  182. package/.gemini/skills/git-workflow-skill/scripts/finish-feature.sh +0 -192
  183. package/.gemini/skills/git-workflow-skill/scripts/install-hooks.sh +0 -55
  184. package/.gemini/skills/git-workflow-skill/scripts/start-feature.sh +0 -110
  185. package/.gemini/skills/git-workflow-skill/scripts/validate-workflow.sh +0 -229
  186. package/.gemini/skills/js-ts-dependency-mgmt/SKILL.md +0 -49
  187. package/.gemini/skills/js-ts-dependency-mgmt/examples/dependency_mgmt.md +0 -60
  188. package/.gemini/skills/js-ts-security-skill/SKILL.md +0 -64
  189. package/.gemini/skills/js-ts-security-skill/scripts/verify-security.sh +0 -136
  190. package/.gemini/skills/logging-best-practices/SKILL.md +0 -50
  191. package/.gemini/skills/logging-best-practices/examples/cpp.md +0 -36
  192. package/.gemini/skills/logging-best-practices/examples/csharp.md +0 -49
  193. package/.gemini/skills/logging-best-practices/examples/javascript.md +0 -77
  194. package/.gemini/skills/logging-best-practices/examples/python.md +0 -57
  195. package/.gemini/skills/logging-best-practices/references/logging-standards.md +0 -29
  196. package/.gemini/skills/opentelemetry-best-practices/SKILL.md +0 -34
  197. package/.gemini/skills/opentelemetry-best-practices/examples/go.md +0 -32
  198. package/.gemini/skills/opentelemetry-best-practices/examples/javascript.md +0 -58
  199. package/.gemini/skills/opentelemetry-best-practices/examples/python.md +0 -37
  200. package/.gemini/skills/opentelemetry-best-practices/references/otel-standards.md +0 -37
  201. package/.gemini/skills/python-dependency-mgmt/SKILL.md +0 -42
  202. package/.gemini/skills/python-dependency-mgmt/examples/dependency_mgmt.md +0 -67
  203. package/.gemini/skills/python-security-skill/SKILL.md +0 -56
  204. package/.gemini/skills/python-security-skill/examples/security.md +0 -56
  205. package/.gemini/skills/self-signed-cert/SKILL.md +0 -42
  206. package/.gemini/skills/self-signed-cert/scripts/generate-cert.ps1 +0 -45
  207. package/.gemini/skills/self-signed-cert/scripts/generate-cert.sh +0 -43
  208. package/.gemini/skills/skill-creator/SKILL.md +0 -196
  209. package/.gemini/skills/skill-creator/references/output-patterns.md +0 -82
  210. package/.gemini/skills/skill-creator/references/workflows.md +0 -28
  211. package/.gemini/skills/skill-creator/scripts/init_skill.py +0 -208
  212. package/.gemini/skills/skill-creator/scripts/package_skill.py +0 -99
  213. package/.gemini/skills/skill-creator/scripts/quick_validate.py +0 -113
  214. package/.gemini/skills/test-accompanied-development/SKILL.md +0 -50
  215. package/.gemini/skills/test-generator/SKILL.md +0 -65
  216. package/.gemini/skills/vercel-react-best-practices/SKILL.md +0 -109
  217. package/.gemini/skills/verify-hardened-docker-skill/SKILL.md +0 -442
  218. package/.gemini/skills/verify-hardened-docker-skill/scripts/verify-docker-hardening.sh +0 -439
  219. package/.github/copilot/copilot.md +0 -14
  220. package/.github/copilot/skills/.ma-agents.json +0 -199
  221. package/.github/copilot/skills/MANIFEST.yaml +0 -204
  222. package/.github/copilot/skills/ai-audit-trail/SKILL.md +0 -23
  223. package/.github/copilot/skills/cmake-best-practices/SKILL.md +0 -64
  224. package/.github/copilot/skills/cmake-best-practices/examples/cmake.md +0 -59
  225. package/.github/copilot/skills/code-documentation/SKILL.md +0 -57
  226. package/.github/copilot/skills/code-documentation/examples/cpp.md +0 -29
  227. package/.github/copilot/skills/code-documentation/examples/csharp.md +0 -28
  228. package/.github/copilot/skills/code-documentation/examples/javascript_typescript.md +0 -28
  229. package/.github/copilot/skills/code-documentation/examples/python.md +0 -57
  230. package/.github/copilot/skills/code-review/SKILL.md +0 -43
  231. package/.github/copilot/skills/commit-message/SKILL.md +0 -79
  232. package/.github/copilot/skills/cpp-concurrency-safety/SKILL.md +0 -60
  233. package/.github/copilot/skills/cpp-concurrency-safety/examples/concurrency.md +0 -73
  234. package/.github/copilot/skills/cpp-const-correctness/SKILL.md +0 -63
  235. package/.github/copilot/skills/cpp-const-correctness/examples/const_correctness.md +0 -54
  236. package/.github/copilot/skills/cpp-memory-handling/SKILL.md +0 -42
  237. package/.github/copilot/skills/cpp-memory-handling/examples/modern-cpp.md +0 -49
  238. package/.github/copilot/skills/cpp-memory-handling/examples/smart-pointers.md +0 -46
  239. package/.github/copilot/skills/cpp-modern-composition/SKILL.md +0 -64
  240. package/.github/copilot/skills/cpp-modern-composition/examples/composition.md +0 -51
  241. package/.github/copilot/skills/cpp-robust-interfaces/SKILL.md +0 -55
  242. package/.github/copilot/skills/cpp-robust-interfaces/examples/interfaces.md +0 -56
  243. package/.github/copilot/skills/create-hardened-docker-skill/SKILL.md +0 -637
  244. package/.github/copilot/skills/create-hardened-docker-skill/scripts/create-all.sh +0 -489
  245. package/.github/copilot/skills/docker-hardening-verification/SKILL.md +0 -28
  246. package/.github/copilot/skills/docker-hardening-verification/scripts/verify-hardening.sh +0 -39
  247. package/.github/copilot/skills/docker-image-signing/SKILL.md +0 -28
  248. package/.github/copilot/skills/docker-image-signing/scripts/sign-image.sh +0 -33
  249. package/.github/copilot/skills/document-revision-history/SKILL.md +0 -104
  250. package/.github/copilot/skills/git-workflow-skill/SKILL.md +0 -194
  251. package/.github/copilot/skills/git-workflow-skill/hooks/commit-msg +0 -61
  252. package/.github/copilot/skills/git-workflow-skill/hooks/pre-commit +0 -38
  253. package/.github/copilot/skills/git-workflow-skill/hooks/prepare-commit-msg +0 -56
  254. package/.github/copilot/skills/git-workflow-skill/scripts/finish-feature.sh +0 -192
  255. package/.github/copilot/skills/git-workflow-skill/scripts/install-hooks.sh +0 -55
  256. package/.github/copilot/skills/git-workflow-skill/scripts/start-feature.sh +0 -110
  257. package/.github/copilot/skills/git-workflow-skill/scripts/validate-workflow.sh +0 -229
  258. package/.github/copilot/skills/js-ts-dependency-mgmt/SKILL.md +0 -49
  259. package/.github/copilot/skills/js-ts-dependency-mgmt/examples/dependency_mgmt.md +0 -60
  260. package/.github/copilot/skills/js-ts-security-skill/SKILL.md +0 -64
  261. package/.github/copilot/skills/js-ts-security-skill/scripts/verify-security.sh +0 -136
  262. package/.github/copilot/skills/logging-best-practices/SKILL.md +0 -50
  263. package/.github/copilot/skills/logging-best-practices/examples/cpp.md +0 -36
  264. package/.github/copilot/skills/logging-best-practices/examples/csharp.md +0 -49
  265. package/.github/copilot/skills/logging-best-practices/examples/javascript.md +0 -77
  266. package/.github/copilot/skills/logging-best-practices/examples/python.md +0 -57
  267. package/.github/copilot/skills/logging-best-practices/references/logging-standards.md +0 -29
  268. package/.github/copilot/skills/opentelemetry-best-practices/SKILL.md +0 -34
  269. package/.github/copilot/skills/opentelemetry-best-practices/examples/go.md +0 -32
  270. package/.github/copilot/skills/opentelemetry-best-practices/examples/javascript.md +0 -58
  271. package/.github/copilot/skills/opentelemetry-best-practices/examples/python.md +0 -37
  272. package/.github/copilot/skills/opentelemetry-best-practices/references/otel-standards.md +0 -37
  273. package/.github/copilot/skills/python-dependency-mgmt/SKILL.md +0 -42
  274. package/.github/copilot/skills/python-dependency-mgmt/examples/dependency_mgmt.md +0 -67
  275. package/.github/copilot/skills/python-security-skill/SKILL.md +0 -56
  276. package/.github/copilot/skills/python-security-skill/examples/security.md +0 -56
  277. package/.github/copilot/skills/self-signed-cert/SKILL.md +0 -42
  278. package/.github/copilot/skills/self-signed-cert/scripts/generate-cert.ps1 +0 -45
  279. package/.github/copilot/skills/self-signed-cert/scripts/generate-cert.sh +0 -43
  280. package/.github/copilot/skills/skill-creator/SKILL.md +0 -196
  281. package/.github/copilot/skills/skill-creator/references/output-patterns.md +0 -82
  282. package/.github/copilot/skills/skill-creator/references/workflows.md +0 -28
  283. package/.github/copilot/skills/skill-creator/scripts/init_skill.py +0 -208
  284. package/.github/copilot/skills/skill-creator/scripts/package_skill.py +0 -99
  285. package/.github/copilot/skills/skill-creator/scripts/quick_validate.py +0 -113
  286. package/.github/copilot/skills/test-accompanied-development/SKILL.md +0 -50
  287. package/.github/copilot/skills/test-generator/SKILL.md +0 -65
  288. package/.github/copilot/skills/vercel-react-best-practices/SKILL.md +0 -109
  289. package/.github/copilot/skills/verify-hardened-docker-skill/SKILL.md +0 -442
  290. package/.github/copilot/skills/verify-hardened-docker-skill/scripts/verify-docker-hardening.sh +0 -439
  291. package/.kilocode/kilocode.md +0 -14
  292. package/.kilocode/skills/.ma-agents.json +0 -199
  293. package/.kilocode/skills/MANIFEST.yaml +0 -204
  294. package/.kilocode/skills/ai-audit-trail/SKILL.md +0 -23
  295. package/.kilocode/skills/cmake-best-practices/SKILL.md +0 -64
  296. package/.kilocode/skills/cmake-best-practices/examples/cmake.md +0 -59
  297. package/.kilocode/skills/code-documentation/SKILL.md +0 -57
  298. package/.kilocode/skills/code-documentation/examples/cpp.md +0 -29
  299. package/.kilocode/skills/code-documentation/examples/csharp.md +0 -28
  300. package/.kilocode/skills/code-documentation/examples/javascript_typescript.md +0 -28
  301. package/.kilocode/skills/code-documentation/examples/python.md +0 -57
  302. package/.kilocode/skills/code-review/SKILL.md +0 -43
  303. package/.kilocode/skills/commit-message/SKILL.md +0 -79
  304. package/.kilocode/skills/cpp-concurrency-safety/SKILL.md +0 -60
  305. package/.kilocode/skills/cpp-concurrency-safety/examples/concurrency.md +0 -73
  306. package/.kilocode/skills/cpp-const-correctness/SKILL.md +0 -63
  307. package/.kilocode/skills/cpp-const-correctness/examples/const_correctness.md +0 -54
  308. package/.kilocode/skills/cpp-memory-handling/SKILL.md +0 -42
  309. package/.kilocode/skills/cpp-memory-handling/examples/modern-cpp.md +0 -49
  310. package/.kilocode/skills/cpp-memory-handling/examples/smart-pointers.md +0 -46
  311. package/.kilocode/skills/cpp-modern-composition/SKILL.md +0 -64
  312. package/.kilocode/skills/cpp-modern-composition/examples/composition.md +0 -51
  313. package/.kilocode/skills/cpp-robust-interfaces/SKILL.md +0 -55
  314. package/.kilocode/skills/cpp-robust-interfaces/examples/interfaces.md +0 -56
  315. package/.kilocode/skills/create-hardened-docker-skill/SKILL.md +0 -637
  316. package/.kilocode/skills/create-hardened-docker-skill/scripts/create-all.sh +0 -489
  317. package/.kilocode/skills/docker-hardening-verification/SKILL.md +0 -28
  318. package/.kilocode/skills/docker-hardening-verification/scripts/verify-hardening.sh +0 -39
  319. package/.kilocode/skills/docker-image-signing/SKILL.md +0 -28
  320. package/.kilocode/skills/docker-image-signing/scripts/sign-image.sh +0 -33
  321. package/.kilocode/skills/document-revision-history/SKILL.md +0 -104
  322. package/.kilocode/skills/git-workflow-skill/SKILL.md +0 -194
  323. package/.kilocode/skills/git-workflow-skill/hooks/commit-msg +0 -61
  324. package/.kilocode/skills/git-workflow-skill/hooks/pre-commit +0 -38
  325. package/.kilocode/skills/git-workflow-skill/hooks/prepare-commit-msg +0 -56
  326. package/.kilocode/skills/git-workflow-skill/scripts/finish-feature.sh +0 -192
  327. package/.kilocode/skills/git-workflow-skill/scripts/install-hooks.sh +0 -55
  328. package/.kilocode/skills/git-workflow-skill/scripts/start-feature.sh +0 -110
  329. package/.kilocode/skills/git-workflow-skill/scripts/validate-workflow.sh +0 -229
  330. package/.kilocode/skills/js-ts-dependency-mgmt/SKILL.md +0 -49
  331. package/.kilocode/skills/js-ts-dependency-mgmt/examples/dependency_mgmt.md +0 -60
  332. package/.kilocode/skills/js-ts-security-skill/SKILL.md +0 -64
  333. package/.kilocode/skills/js-ts-security-skill/scripts/verify-security.sh +0 -136
  334. package/.kilocode/skills/logging-best-practices/SKILL.md +0 -50
  335. package/.kilocode/skills/logging-best-practices/examples/cpp.md +0 -36
  336. package/.kilocode/skills/logging-best-practices/examples/csharp.md +0 -49
  337. package/.kilocode/skills/logging-best-practices/examples/javascript.md +0 -77
  338. package/.kilocode/skills/logging-best-practices/examples/python.md +0 -57
  339. package/.kilocode/skills/logging-best-practices/references/logging-standards.md +0 -29
  340. package/.kilocode/skills/opentelemetry-best-practices/SKILL.md +0 -34
  341. package/.kilocode/skills/opentelemetry-best-practices/examples/go.md +0 -32
  342. package/.kilocode/skills/opentelemetry-best-practices/examples/javascript.md +0 -58
  343. package/.kilocode/skills/opentelemetry-best-practices/examples/python.md +0 -37
  344. package/.kilocode/skills/opentelemetry-best-practices/references/otel-standards.md +0 -37
  345. package/.kilocode/skills/python-dependency-mgmt/SKILL.md +0 -42
  346. package/.kilocode/skills/python-dependency-mgmt/examples/dependency_mgmt.md +0 -67
  347. package/.kilocode/skills/python-security-skill/SKILL.md +0 -56
  348. package/.kilocode/skills/python-security-skill/examples/security.md +0 -56
  349. package/.kilocode/skills/self-signed-cert/SKILL.md +0 -42
  350. package/.kilocode/skills/self-signed-cert/scripts/generate-cert.ps1 +0 -45
  351. package/.kilocode/skills/self-signed-cert/scripts/generate-cert.sh +0 -43
  352. package/.kilocode/skills/skill-creator/SKILL.md +0 -196
  353. package/.kilocode/skills/skill-creator/references/output-patterns.md +0 -82
  354. package/.kilocode/skills/skill-creator/references/workflows.md +0 -28
  355. package/.kilocode/skills/skill-creator/scripts/init_skill.py +0 -208
  356. package/.kilocode/skills/skill-creator/scripts/package_skill.py +0 -99
  357. package/.kilocode/skills/skill-creator/scripts/quick_validate.py +0 -113
  358. package/.kilocode/skills/test-accompanied-development/SKILL.md +0 -50
  359. package/.kilocode/skills/test-generator/SKILL.md +0 -65
  360. package/.kilocode/skills/vercel-react-best-practices/SKILL.md +0 -109
  361. package/.kilocode/skills/verify-hardened-docker-skill/SKILL.md +0 -442
  362. package/.kilocode/skills/verify-hardened-docker-skill/scripts/verify-docker-hardening.sh +0 -439
  363. package/lib/bmad-cache/tea/.github/CODE_OF_CONDUCT.md +0 -128
  364. package/lib/bmad-cache/tea/.github/FUNDING.yaml +0 -15
  365. package/lib/bmad-cache/tea/.github/ISSUE_TEMPLATE/config.yaml +0 -11
  366. package/lib/bmad-cache/tea/.github/ISSUE_TEMPLATE/feature_request.md +0 -70
  367. package/lib/bmad-cache/tea/.github/ISSUE_TEMPLATE/issue.md +0 -61
  368. package/lib/bmad-cache/tea/.github/workflows/docs.yaml +0 -66
  369. package/lib/bmad-cache/tea/.github/workflows/manual-release.yaml +0 -195
  370. package/lib/bmad-cache/tea/.github/workflows/quality.yaml +0 -114
@@ -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
- ```
@@ -1,64 +0,0 @@
1
- ---
2
- name: C++ Modern Composition
3
- description: Replace legacy C patterns with STL, Ranges, and modern C++ abstractions (C++14+).
4
- ---
5
- # C++ Modern Composition (Core Guidelines Section STL, CPL, ES)
6
-
7
- This skill forces the transition from legacy "C-style" C++ to modern, declarative, and safer C++ idioms.
8
-
9
- ## Policies
10
-
11
- ### 1. STL Algorithms over Manual Loops
12
- * **Rule**: Never write a raw `for` or `while` loop for operations supported by `<algorithm>` or `<numeric>`.
13
- * **Action**:
14
- - Use `std::any_of`, `std::all_of`, `std::find_if`, `std::transform`, `std::accumulate`.
15
- - In C++20 projects, prefer `std::ranges` versions.
16
- * **Rationale**: Reduces "off-by-one" errors and improves intent readability.
17
-
18
- ### 2. Eradicate C-style Casts and Macros
19
- * **Rule**: Ban `(type)value` and `#define` for logic/constants.
20
- * **Action**:
21
- - Use `static_cast`, `reinterpret_cast`, or `const_cast`.
22
- - Replace macros with `constexpr` variables or `inline` functions/templates.
23
- * **Rationale**: Named casts are searchable and safer; `constexpr` respects namespaces and scopes.
24
-
25
- ### 3. Universal Initialization
26
- * **Rule**: Prefer `{}` initialization to avoid the "Most Vexing Parse".
27
- * **Action**: Use `auto x = Type{args...};` or `Type x{args...};`.
28
- * **Rationale**: Prevents narrowing conversions (e.g., `int x{3.5}` is a compiler error, while `int x = 3.5` is not).
29
-
30
- ### 4. Zero Raw Memory Manipulation
31
- * **Rule**: Ban `memset`, `memcpy`, and `malloc`.
32
- * **Action**:
33
- - Use `std::fill`, `std::copy`, or `container.assign()`.
34
- - Use `std::vector` or `std::array` instead of raw arrays.
35
- * **Rationale**: Standard containers are bounds-checked (via `.at()`) and manage their own memory.
36
-
37
- ## Examples
38
-
39
- ### Before (C-style C++)
40
- ```cpp
41
- #define MAX_BUFFER 1024
42
- int arr[MAX_BUFFER];
43
- memset(arr, 0, sizeof(arr));
44
-
45
- bool found = false;
46
- for (int i = 0; i < MAX_BUFFER; ++i) {
47
- if (arr[i] == (int)someFloat) {
48
- found = true;
49
- break;
50
- }
51
- }
52
- ```
53
-
54
- ### After (Modern C++)
55
- ```cpp
56
- constexpr size_t MaxBuffer = 1024;
57
- std::array<int, MaxBuffer> arr;
58
- arr.fill(0);
59
-
60
- auto target = static_cast<int>(someFloat);
61
- bool found = std::any_of(arr.begin(), arr.end(), [target](int v) {
62
- return v == target;
63
- });
64
- ```
@@ -1,51 +0,0 @@
1
- # Modern Composition Examples (C++14+)
2
-
3
- ### 1. Data Transformation (Transform)
4
- **Legacy:**
5
- ```cpp
6
- std::vector<int> inputs = {1, 2, 3};
7
- std::vector<int> outputs;
8
- for (size_t i = 0; i < inputs.size(); ++i) {
9
- outputs.push_back(inputs[i] * 2);
10
- }
11
- ```
12
-
13
- **Modern (C++14):**
14
- ```cpp
15
- std::vector<int> inputs = {1, 2, 3};
16
- std::vector<int> outputs;
17
- outputs.reserve(inputs.size());
18
- std::transform(inputs.begin(), inputs.end(), std::back_inserter(outputs),
19
- [](int n) { return n * 2; });
20
- ```
21
-
22
- ### 2. Summation and Reduction (Accumulate)
23
- **Modern (C++14):**
24
- ```cpp
25
- #include <numeric>
26
-
27
- std::vector<double> prices = {10.5, 20.0, 5.25};
28
- double total = std::accumulate(prices.begin(), prices.end(), 0.0);
29
- ```
30
-
31
- ### 3. Safe Narrowing Protection
32
- **Logic:**
33
- ```cpp
34
- double d = 7.9;
35
- // int i{d}; // Error: narrowing conversion from 'double' to 'int'
36
- int i = static_cast<int>(d); // Explicit and safe
37
- ```
38
-
39
- ### 4. Replacing Function Macros
40
- **Legacy:**
41
- ```cpp
42
- #define SQUARE(x) ((x)*(x))
43
- ```
44
-
45
- **Modern (C++14):**
46
- ```cpp
47
- template<typename T>
48
- constexpr T square(T t) {
49
- return t * t;
50
- }
51
- ```
@@ -1,55 +0,0 @@
1
- ---
2
- name: C++ Robust Interfaces
3
- description: Enforce contract-based design and strong typing in C++ interfaces (C++14+).
4
- ---
5
- # C++ Robust Interfaces (Core Guidelines Section I & E)
6
-
7
- This skill ensures that C++ interfaces follow contract-based design principles to improve safety, clarity, and maintainability.
8
-
9
- ## Policies
10
-
11
- ### 1. Make Interfaces Explicit
12
- * **Rule**: Functions must explicitly state their requirements (pre-conditions) and guarantees (post-conditions).
13
- * **Action**: Use `Expects()` and `Ensures()` (from GSL) or standardized comments if GSL is unavailable.
14
- * **Rationale**: Detects integration bugs at the call site rather than deep in the implementation.
15
-
16
- ### 2. Strong Typing over Primitive Types
17
- * **Rule**: Avoid "Boolean Blindness" and `void*`.
18
- * **Action**:
19
- - Use `enum class` for options instead of `bool`.
20
- - Use `std::chrono` for time instead of `int`.
21
- - Use specific types/structs instead of a long list of primitive arguments.
22
-
23
- ### 3. Clear Ownership and Lifetime
24
- * **Rule**: A raw pointer (`T*`) in an interface **must never** represent ownership.
25
- * **Action**:
26
- - Use `gsl::not_null<T*>` for pointers that cannot be null.
27
- - Use `std::unique_ptr` or `std::shared_ptr` ONLY if the function is participating in ownership/lifetime management.
28
- - Prefer `T&` for arguments that must exist and aren't owned by the callee.
29
-
30
- ### 4. Sequence Safety
31
- * **Rule**: Never pass an array as a raw pointer + size.
32
- * **Action**:
33
- - Use `gsl::span<T>` (C++14/17 via GSL) or `std::span<T>` (C++20).
34
- - Use `std::string_view` for read-only strings.
35
-
36
- ## Examples
37
-
38
- ### Before (Fragile Interface)
39
- ```cpp
40
- // What does 'flag' mean? Is data allowed to be null? Is it an array?
41
- void processData(char* data, int size, bool flag);
42
- ```
43
-
44
- ### After (Robust Interface)
45
- ```cpp
46
- #include <gsl/gsl>
47
-
48
- enum class ProcessingMode { Fast, Thorough };
49
-
50
- // Explicit contract: data must not be null, size is handled by span
51
- void processData(gsl::span<const char> data, ProcessingMode mode) {
52
- Expects(!data.empty());
53
- // ...
54
- }
55
- ```
@@ -1,56 +0,0 @@
1
- # Robust Interface Examples (C++14+)
2
-
3
- ### 1. Avoiding Boolean Blindness
4
- **Incorrect:**
5
- ```cpp
6
- void setWindowVisible(bool visible, bool animate);
7
- // Call site: setWindowVisible(true, false); // What is false?
8
- ```
9
-
10
- **Correct (C++14):**
11
- ```cpp
12
- enum class Visibility { Visible, Hidden };
13
- enum class Animation { Enabled, Disabled };
14
-
15
- void setWindowVisible(Visibility v, Animation a);
16
- // Call site: setWindowVisible(Visibility::Visible, Animation::Disabled);
17
- ```
18
-
19
- ### 2. Contract-Based Validation
20
- Using GSL (Guidelines Support Library) style:
21
-
22
- ```cpp
23
- #include <gsl/gsl>
24
-
25
- class User {
26
- public:
27
- // Ensure name is never null or empty
28
- void setName(gsl::not_null<const char*> name) {
29
- Expects(std::strlen(name) > 0);
30
- this->name = name;
31
- }
32
- private:
33
- std::string name;
34
- };
35
- ```
36
-
37
- ### 3. Safe Sequences with Span
38
- Replaces pointer + length pairs which are prone to buffer overflows.
39
-
40
- ```cpp
41
- #include <gsl/gsl> // Use gsl::span in C++14
42
-
43
- float calculateAverage(gsl::span<const float> values) {
44
- Expects(!values.empty());
45
-
46
- float sum = 0.0f;
47
- for (float v : values) {
48
- sum += v;
49
- }
50
- return sum / values.size();
51
- }
52
-
53
- // Usage:
54
- // float arr[] = {1, 2, 3};
55
- // calculateAverage(arr); // Automatic conversion to span
56
- ```