@mytechtoday/augment-extensions 0.1.2 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (316) hide show
  1. package/README.md +614 -39
  2. package/augment-extensions/coding-standards/bash/README.md +196 -0
  3. package/augment-extensions/coding-standards/bash/module.json +163 -0
  4. package/augment-extensions/coding-standards/bash/rules/naming-conventions.md +336 -0
  5. package/augment-extensions/coding-standards/bash/rules/universal-standards.md +289 -0
  6. package/augment-extensions/coding-standards/css/README.md +40 -0
  7. package/augment-extensions/coding-standards/css/examples/css-examples.css +550 -0
  8. package/augment-extensions/coding-standards/css/module.json +44 -0
  9. package/augment-extensions/coding-standards/css/rules/css-modern-features.md +448 -0
  10. package/augment-extensions/coding-standards/css/rules/css-standards.md +492 -0
  11. package/augment-extensions/coding-standards/html/README.md +40 -0
  12. package/augment-extensions/coding-standards/html/examples/html-examples.html +267 -0
  13. package/augment-extensions/coding-standards/html/examples/responsive-layout.html +505 -0
  14. package/augment-extensions/coding-standards/html/module.json +44 -0
  15. package/augment-extensions/coding-standards/html/rules/html-standards.md +349 -0
  16. package/augment-extensions/coding-standards/html-css-js/README.md +194 -0
  17. package/augment-extensions/coding-standards/html-css-js/examples/async-examples.js +487 -0
  18. package/augment-extensions/coding-standards/html-css-js/examples/css-examples.css +550 -0
  19. package/augment-extensions/coding-standards/html-css-js/examples/dom-examples.js +667 -0
  20. package/augment-extensions/coding-standards/html-css-js/examples/html-examples.html +267 -0
  21. package/augment-extensions/coding-standards/html-css-js/examples/javascript-examples.js +612 -0
  22. package/augment-extensions/coding-standards/html-css-js/examples/responsive-layout.html +505 -0
  23. package/augment-extensions/coding-standards/html-css-js/module.json +48 -0
  24. package/augment-extensions/coding-standards/html-css-js/rules/async-patterns.md +515 -0
  25. package/augment-extensions/coding-standards/html-css-js/rules/css-modern-features.md +448 -0
  26. package/augment-extensions/coding-standards/html-css-js/rules/css-standards.md +492 -0
  27. package/augment-extensions/coding-standards/html-css-js/rules/dom-manipulation.md +439 -0
  28. package/augment-extensions/coding-standards/html-css-js/rules/html-standards.md +349 -0
  29. package/augment-extensions/coding-standards/html-css-js/rules/javascript-standards.md +486 -0
  30. package/augment-extensions/coding-standards/html-css-js/rules/performance.md +463 -0
  31. package/augment-extensions/coding-standards/html-css-js/rules/tooling.md +543 -0
  32. package/augment-extensions/coding-standards/js/README.md +46 -0
  33. package/augment-extensions/coding-standards/js/examples/async-examples.js +487 -0
  34. package/augment-extensions/coding-standards/js/examples/dom-examples.js +667 -0
  35. package/augment-extensions/coding-standards/js/examples/javascript-examples.js +612 -0
  36. package/augment-extensions/coding-standards/js/module.json +49 -0
  37. package/augment-extensions/coding-standards/js/rules/async-patterns.md +515 -0
  38. package/augment-extensions/coding-standards/js/rules/dom-manipulation.md +439 -0
  39. package/augment-extensions/coding-standards/js/rules/javascript-standards.md +486 -0
  40. package/augment-extensions/coding-standards/js/rules/performance.md +463 -0
  41. package/augment-extensions/coding-standards/js/rules/tooling.md +543 -0
  42. package/augment-extensions/coding-standards/php/README.md +248 -0
  43. package/augment-extensions/coding-standards/php/examples/api-endpoint-example.php +204 -0
  44. package/augment-extensions/coding-standards/php/examples/cli-command-example.php +206 -0
  45. package/augment-extensions/coding-standards/php/examples/legacy-refactoring-example.php +234 -0
  46. package/augment-extensions/coding-standards/php/examples/web-application-example.php +211 -0
  47. package/augment-extensions/coding-standards/php/examples/woocommerce-extension-example.php +215 -0
  48. package/augment-extensions/coding-standards/php/examples/wordpress-plugin-example.php +189 -0
  49. package/augment-extensions/coding-standards/php/module.json +166 -0
  50. package/augment-extensions/coding-standards/php/rules/api-development.md +480 -0
  51. package/augment-extensions/coding-standards/php/rules/category-configuration.md +332 -0
  52. package/augment-extensions/coding-standards/php/rules/cli-tools.md +472 -0
  53. package/augment-extensions/coding-standards/php/rules/cms-integration.md +561 -0
  54. package/augment-extensions/coding-standards/php/rules/code-quality.md +402 -0
  55. package/augment-extensions/coding-standards/php/rules/documentation.md +425 -0
  56. package/augment-extensions/coding-standards/php/rules/ecommerce.md +627 -0
  57. package/augment-extensions/coding-standards/php/rules/error-handling.md +336 -0
  58. package/augment-extensions/coding-standards/php/rules/legacy-migration.md +677 -0
  59. package/augment-extensions/coding-standards/php/rules/naming-conventions.md +279 -0
  60. package/augment-extensions/coding-standards/php/rules/performance.md +392 -0
  61. package/augment-extensions/coding-standards/php/rules/psr-standards.md +186 -0
  62. package/augment-extensions/coding-standards/php/rules/security.md +358 -0
  63. package/augment-extensions/coding-standards/php/rules/testing.md +403 -0
  64. package/augment-extensions/coding-standards/php/rules/type-declarations.md +331 -0
  65. package/augment-extensions/coding-standards/php/rules/web-applications.md +426 -0
  66. package/augment-extensions/coding-standards/powershell/README.md +154 -0
  67. package/augment-extensions/coding-standards/powershell/examples/admin-example.ps1 +272 -0
  68. package/augment-extensions/coding-standards/powershell/examples/automation-example.ps1 +173 -0
  69. package/augment-extensions/coding-standards/powershell/examples/cloud-example.ps1 +243 -0
  70. package/augment-extensions/coding-standards/powershell/examples/cross-platform-example.ps1 +297 -0
  71. package/augment-extensions/coding-standards/powershell/examples/dsc-example.ps1 +224 -0
  72. package/augment-extensions/coding-standards/powershell/examples/legacy-migration-example.ps1 +340 -0
  73. package/augment-extensions/coding-standards/powershell/examples/module-example.psm1 +255 -0
  74. package/augment-extensions/coding-standards/powershell/module.json +165 -0
  75. package/augment-extensions/coding-standards/powershell/rules/administrative-tools.md +439 -0
  76. package/augment-extensions/coding-standards/powershell/rules/automation-scripts.md +240 -0
  77. package/augment-extensions/coding-standards/powershell/rules/cloud-orchestration.md +384 -0
  78. package/augment-extensions/coding-standards/powershell/rules/configuration-schema.md +383 -0
  79. package/augment-extensions/coding-standards/powershell/rules/cross-platform-scripts.md +482 -0
  80. package/augment-extensions/coding-standards/powershell/rules/dsc-configurations.md +296 -0
  81. package/augment-extensions/coding-standards/powershell/rules/error-handling.md +314 -0
  82. package/augment-extensions/coding-standards/powershell/rules/legacy-migrations.md +466 -0
  83. package/augment-extensions/coding-standards/powershell/rules/modules-functions.md +244 -0
  84. package/augment-extensions/coding-standards/powershell/rules/naming-conventions.md +266 -0
  85. package/augment-extensions/coding-standards/powershell/rules/performance-optimization.md +209 -0
  86. package/augment-extensions/coding-standards/powershell/rules/security-practices.md +314 -0
  87. package/augment-extensions/coding-standards/powershell/rules/testing-guidelines.md +268 -0
  88. package/augment-extensions/coding-standards/powershell/rules/universal-standards.md +197 -0
  89. package/augment-extensions/coding-standards/python/README.md +12 -8
  90. package/augment-extensions/coding-standards/python/examples/best-practices.py +373 -0
  91. package/augment-extensions/coding-standards/python/module.json +8 -4
  92. package/augment-extensions/coding-standards/python/rules/async-patterns.md +884 -0
  93. package/augment-extensions/coding-standards/python/rules/documentation.md +831 -0
  94. package/augment-extensions/coding-standards/python/rules/error-handling.md +855 -68
  95. package/augment-extensions/coding-standards/python/rules/testing.md +409 -0
  96. package/augment-extensions/coding-standards/python/rules/tooling.md +446 -0
  97. package/augment-extensions/coding-standards/python/rules/type-hints.md +115 -50
  98. package/augment-extensions/collections/html-css-js/README.md +82 -0
  99. package/augment-extensions/collections/html-css-js/collection.json +41 -0
  100. package/augment-extensions/domain-rules/database/README.md +161 -0
  101. package/augment-extensions/domain-rules/database/examples/flat-database-example.md +793 -0
  102. package/augment-extensions/domain-rules/database/examples/hybrid-database-example.md +1132 -0
  103. package/augment-extensions/domain-rules/database/examples/nosql-document-example.md +868 -0
  104. package/augment-extensions/domain-rules/database/examples/nosql-graph-example.md +805 -0
  105. package/augment-extensions/domain-rules/database/examples/relational-schema-example.md +621 -0
  106. package/augment-extensions/domain-rules/database/examples/vector-database-example.md +965 -0
  107. package/augment-extensions/domain-rules/database/module.json +28 -0
  108. package/augment-extensions/domain-rules/database/rules/flat-databases.md +624 -0
  109. package/augment-extensions/domain-rules/database/rules/nosql-databases.md +588 -0
  110. package/augment-extensions/domain-rules/database/rules/nosql-document-stores.md +856 -0
  111. package/augment-extensions/domain-rules/database/rules/nosql-graph-databases.md +778 -0
  112. package/augment-extensions/domain-rules/database/rules/nosql-key-value-stores.md +963 -0
  113. package/augment-extensions/domain-rules/database/rules/performance-optimization.md +1076 -0
  114. package/augment-extensions/domain-rules/database/rules/relational-databases.md +697 -0
  115. package/augment-extensions/domain-rules/database/rules/relational-indexing.md +671 -0
  116. package/augment-extensions/domain-rules/database/rules/relational-query-optimization.md +607 -0
  117. package/augment-extensions/domain-rules/database/rules/relational-schema-design.md +907 -0
  118. package/augment-extensions/domain-rules/database/rules/relational-transactions.md +783 -0
  119. package/augment-extensions/domain-rules/database/rules/security-standards.md +980 -0
  120. package/augment-extensions/domain-rules/database/rules/universal-best-practices.md +485 -0
  121. package/augment-extensions/domain-rules/database/rules/vector-databases.md +521 -0
  122. package/augment-extensions/domain-rules/database/rules/vector-embeddings.md +858 -0
  123. package/augment-extensions/domain-rules/database/rules/vector-indexing.md +934 -0
  124. package/augment-extensions/domain-rules/mcp/README.md +150 -0
  125. package/augment-extensions/domain-rules/mcp/examples/compressed-example.md +522 -0
  126. package/augment-extensions/domain-rules/mcp/examples/graph-augmented-example.md +520 -0
  127. package/augment-extensions/domain-rules/mcp/examples/hybrid-example.md +570 -0
  128. package/augment-extensions/domain-rules/mcp/examples/state-based-example.md +427 -0
  129. package/augment-extensions/domain-rules/mcp/examples/token-based-example.md +435 -0
  130. package/augment-extensions/domain-rules/mcp/examples/vector-based-example.md +502 -0
  131. package/augment-extensions/domain-rules/mcp/module.json +49 -0
  132. package/augment-extensions/domain-rules/mcp/rules/compressed-mcp.md +595 -0
  133. package/augment-extensions/domain-rules/mcp/rules/configuration.md +345 -0
  134. package/augment-extensions/domain-rules/mcp/rules/graph-augmented-mcp.md +687 -0
  135. package/augment-extensions/domain-rules/mcp/rules/hybrid-mcp.md +636 -0
  136. package/augment-extensions/domain-rules/mcp/rules/state-based-mcp.md +484 -0
  137. package/augment-extensions/domain-rules/mcp/rules/testing-validation.md +360 -0
  138. package/augment-extensions/domain-rules/mcp/rules/token-based-mcp.md +393 -0
  139. package/augment-extensions/domain-rules/mcp/rules/universal-rules.md +194 -0
  140. package/augment-extensions/domain-rules/mcp/rules/vector-based-mcp.md +625 -0
  141. package/augment-extensions/domain-rules/wordpress/README.md +163 -0
  142. package/augment-extensions/domain-rules/wordpress/module.json +32 -0
  143. package/augment-extensions/domain-rules/wordpress/rules/coding-standards.md +617 -0
  144. package/augment-extensions/domain-rules/wordpress/rules/directory-structure.md +270 -0
  145. package/augment-extensions/domain-rules/wordpress/rules/file-patterns.md +423 -0
  146. package/augment-extensions/domain-rules/wordpress/rules/gutenberg-blocks.md +493 -0
  147. package/augment-extensions/domain-rules/wordpress/rules/performance.md +568 -0
  148. package/augment-extensions/domain-rules/wordpress/rules/plugin-development.md +510 -0
  149. package/augment-extensions/domain-rules/wordpress/rules/project-detection.md +251 -0
  150. package/augment-extensions/domain-rules/wordpress/rules/rest-api.md +501 -0
  151. package/augment-extensions/domain-rules/wordpress/rules/security.md +564 -0
  152. package/augment-extensions/domain-rules/wordpress/rules/theme-development.md +388 -0
  153. package/augment-extensions/domain-rules/wordpress/rules/woocommerce.md +441 -0
  154. package/augment-extensions/domain-rules/wordpress-plugin/README.md +139 -0
  155. package/augment-extensions/domain-rules/wordpress-plugin/examples/ajax-plugin.md +1599 -0
  156. package/augment-extensions/domain-rules/wordpress-plugin/examples/custom-post-type-plugin.md +1727 -0
  157. package/augment-extensions/domain-rules/wordpress-plugin/examples/gutenberg-block-plugin.md +428 -0
  158. package/augment-extensions/domain-rules/wordpress-plugin/examples/gutenberg-block.md +422 -0
  159. package/augment-extensions/domain-rules/wordpress-plugin/examples/mvc-plugin.md +1623 -0
  160. package/augment-extensions/domain-rules/wordpress-plugin/examples/object-oriented-plugin.md +1343 -0
  161. package/augment-extensions/domain-rules/wordpress-plugin/examples/rest-endpoint.md +734 -0
  162. package/augment-extensions/domain-rules/wordpress-plugin/examples/settings-page-plugin.md +1350 -0
  163. package/augment-extensions/domain-rules/wordpress-plugin/examples/simple-procedural-plugin.md +503 -0
  164. package/augment-extensions/domain-rules/wordpress-plugin/examples/singleton-plugin.md +971 -0
  165. package/augment-extensions/domain-rules/wordpress-plugin/module.json +53 -0
  166. package/augment-extensions/domain-rules/wordpress-plugin/rules/activation-hooks.md +770 -0
  167. package/augment-extensions/domain-rules/wordpress-plugin/rules/admin-interface.md +874 -0
  168. package/augment-extensions/domain-rules/wordpress-plugin/rules/ajax-handlers.md +629 -0
  169. package/augment-extensions/domain-rules/wordpress-plugin/rules/asset-management.md +559 -0
  170. package/augment-extensions/domain-rules/wordpress-plugin/rules/context-providers.md +709 -0
  171. package/augment-extensions/domain-rules/wordpress-plugin/rules/cron-jobs.md +736 -0
  172. package/augment-extensions/domain-rules/wordpress-plugin/rules/database-management.md +1057 -0
  173. package/augment-extensions/domain-rules/wordpress-plugin/rules/documentation-standards.md +463 -0
  174. package/augment-extensions/domain-rules/wordpress-plugin/rules/frontend-functionality.md +478 -0
  175. package/augment-extensions/domain-rules/wordpress-plugin/rules/gutenberg-blocks.md +818 -0
  176. package/augment-extensions/domain-rules/wordpress-plugin/rules/internationalization.md +416 -0
  177. package/augment-extensions/domain-rules/wordpress-plugin/rules/migration.md +667 -0
  178. package/augment-extensions/domain-rules/wordpress-plugin/rules/performance-optimization.md +878 -0
  179. package/augment-extensions/domain-rules/wordpress-plugin/rules/plugin-architecture.md +693 -0
  180. package/augment-extensions/domain-rules/wordpress-plugin/rules/plugin-structure.md +352 -0
  181. package/augment-extensions/domain-rules/wordpress-plugin/rules/rest-api.md +818 -0
  182. package/augment-extensions/domain-rules/wordpress-plugin/rules/scaffolding-workflow.md +624 -0
  183. package/augment-extensions/domain-rules/wordpress-plugin/rules/security-best-practices.md +866 -0
  184. package/augment-extensions/domain-rules/wordpress-plugin/rules/testing-patterns.md +1165 -0
  185. package/augment-extensions/domain-rules/wordpress-plugin/rules/testing.md +414 -0
  186. package/augment-extensions/domain-rules/wordpress-plugin/rules/vscode-integration.md +751 -0
  187. package/augment-extensions/domain-rules/wordpress-plugin/rules/woocommerce-integration.md +949 -0
  188. package/augment-extensions/domain-rules/wordpress-plugin/rules/wordpress-org-submission.md +458 -0
  189. package/augment-extensions/examples/gutenberg-block-plugin/README.md +101 -0
  190. package/augment-extensions/examples/gutenberg-block-plugin/examples/testimonial-block.md +428 -0
  191. package/augment-extensions/examples/gutenberg-block-plugin/module.json +40 -0
  192. package/augment-extensions/examples/rest-api-plugin/README.md +98 -0
  193. package/augment-extensions/examples/rest-api-plugin/examples/task-manager-api.md +1299 -0
  194. package/augment-extensions/examples/rest-api-plugin/module.json +40 -0
  195. package/augment-extensions/examples/woocommerce-extension/README.md +98 -0
  196. package/augment-extensions/examples/woocommerce-extension/examples/product-customizer.md +763 -0
  197. package/augment-extensions/examples/woocommerce-extension/module.json +40 -0
  198. package/augment-extensions/workflows/beads/module.json +4 -3
  199. package/augment-extensions/workflows/database/README.md +195 -0
  200. package/augment-extensions/workflows/database/ai-prompt-testing.md +295 -0
  201. package/augment-extensions/workflows/database/examples/migration-example.md +498 -0
  202. package/augment-extensions/workflows/database/examples/optimization-example.md +496 -0
  203. package/augment-extensions/workflows/database/examples/schema-design-example.md +444 -0
  204. package/augment-extensions/workflows/database/module.json +42 -0
  205. package/augment-extensions/workflows/database/rules/data-migration.md +249 -0
  206. package/augment-extensions/workflows/database/rules/documentation-standards.md +339 -0
  207. package/augment-extensions/workflows/database/rules/migration-workflow.md +352 -0
  208. package/augment-extensions/workflows/database/rules/optimization-workflow.md +435 -0
  209. package/augment-extensions/workflows/database/rules/schema-design-workflow.md +535 -0
  210. package/augment-extensions/workflows/database/rules/testing-patterns.md +305 -0
  211. package/augment-extensions/workflows/database/rules/workflow.md +458 -0
  212. package/augment-extensions/workflows/openspec/module.json +4 -3
  213. package/augment-extensions/workflows/wordpress-plugin/README.md +232 -0
  214. package/augment-extensions/workflows/wordpress-plugin/ai-prompts.md +839 -0
  215. package/augment-extensions/workflows/wordpress-plugin/bead-decomposition-patterns.md +854 -0
  216. package/augment-extensions/workflows/wordpress-plugin/examples/complete-plugin-example.md +540 -0
  217. package/augment-extensions/workflows/wordpress-plugin/examples/custom-post-type-example.md +1083 -0
  218. package/augment-extensions/workflows/wordpress-plugin/examples/feature-addition-workflow.md +669 -0
  219. package/augment-extensions/workflows/wordpress-plugin/examples/plugin-creation-workflow.md +597 -0
  220. package/augment-extensions/workflows/wordpress-plugin/examples/secure-form-handler-example.md +925 -0
  221. package/augment-extensions/workflows/wordpress-plugin/examples/security-audit-workflow.md +752 -0
  222. package/augment-extensions/workflows/wordpress-plugin/examples/wordpress-org-submission-workflow.md +773 -0
  223. package/augment-extensions/workflows/wordpress-plugin/module.json +49 -0
  224. package/augment-extensions/workflows/wordpress-plugin/rules/best-practices.md +942 -0
  225. package/augment-extensions/workflows/wordpress-plugin/rules/development-workflow.md +702 -0
  226. package/augment-extensions/workflows/wordpress-plugin/rules/submission-workflow.md +728 -0
  227. package/augment-extensions/workflows/wordpress-plugin/rules/testing-workflow.md +775 -0
  228. package/augment-extensions/writing-standards/screenplay/README.md +171 -0
  229. package/augment-extensions/writing-standards/screenplay/examples/aaa-hollywood-scene.fountain +164 -0
  230. package/augment-extensions/writing-standards/screenplay/module.json +124 -0
  231. package/augment-extensions/writing-standards/screenplay/rules/universal-formatting.md +339 -0
  232. package/cli/MODULES.md +302 -0
  233. package/cli/dist/cli.js +142 -9
  234. package/cli/dist/cli.js.map +1 -1
  235. package/cli/dist/commands/catalog.d.ts +13 -0
  236. package/cli/dist/commands/catalog.d.ts.map +1 -0
  237. package/cli/dist/commands/catalog.js +104 -0
  238. package/cli/dist/commands/catalog.js.map +1 -0
  239. package/cli/dist/commands/gui.d.ts +6 -0
  240. package/cli/dist/commands/gui.d.ts.map +1 -0
  241. package/cli/dist/commands/gui.js +211 -0
  242. package/cli/dist/commands/gui.js.map +1 -0
  243. package/cli/dist/commands/init.d.ts.map +1 -1
  244. package/cli/dist/commands/init.js +12 -0
  245. package/cli/dist/commands/init.js.map +1 -1
  246. package/cli/dist/commands/install-rules.d.ts +14 -0
  247. package/cli/dist/commands/install-rules.d.ts.map +1 -0
  248. package/cli/dist/commands/install-rules.js +127 -0
  249. package/cli/dist/commands/install-rules.js.map +1 -0
  250. package/cli/dist/commands/link.d.ts.map +1 -1
  251. package/cli/dist/commands/link.js +9 -11
  252. package/cli/dist/commands/link.js.map +1 -1
  253. package/cli/dist/commands/list.d.ts.map +1 -1
  254. package/cli/dist/commands/list.js +11 -28
  255. package/cli/dist/commands/list.js.map +1 -1
  256. package/cli/dist/commands/mcp.d.ts +48 -0
  257. package/cli/dist/commands/mcp.d.ts.map +1 -0
  258. package/cli/dist/commands/mcp.js +229 -0
  259. package/cli/dist/commands/mcp.js.map +1 -0
  260. package/cli/dist/commands/self-remove.d.ts +7 -0
  261. package/cli/dist/commands/self-remove.d.ts.map +1 -0
  262. package/cli/dist/commands/self-remove.js +179 -0
  263. package/cli/dist/commands/self-remove.js.map +1 -0
  264. package/cli/dist/commands/show.d.ts.map +1 -1
  265. package/cli/dist/commands/show.js +42 -71
  266. package/cli/dist/commands/show.js.map +1 -1
  267. package/cli/dist/commands/skill.d.ts +67 -0
  268. package/cli/dist/commands/skill.d.ts.map +1 -0
  269. package/cli/dist/commands/skill.js +513 -0
  270. package/cli/dist/commands/skill.js.map +1 -0
  271. package/cli/dist/commands/unlink.d.ts +6 -0
  272. package/cli/dist/commands/unlink.d.ts.map +1 -0
  273. package/cli/dist/commands/unlink.js +115 -0
  274. package/cli/dist/commands/unlink.js.map +1 -0
  275. package/cli/dist/commands/validate.d.ts +6 -0
  276. package/cli/dist/commands/validate.d.ts.map +1 -0
  277. package/cli/dist/commands/validate.js +159 -0
  278. package/cli/dist/commands/validate.js.map +1 -0
  279. package/cli/dist/utils/catalog-sync.d.ts +22 -0
  280. package/cli/dist/utils/catalog-sync.d.ts.map +1 -0
  281. package/cli/dist/utils/catalog-sync.js +157 -0
  282. package/cli/dist/utils/catalog-sync.js.map +1 -0
  283. package/cli/dist/utils/character-count.d.ts +56 -0
  284. package/cli/dist/utils/character-count.d.ts.map +1 -0
  285. package/cli/dist/utils/character-count.js +190 -0
  286. package/cli/dist/utils/character-count.js.map +1 -0
  287. package/cli/dist/utils/documentation-validator.d.ts +18 -0
  288. package/cli/dist/utils/documentation-validator.d.ts.map +1 -0
  289. package/cli/dist/utils/documentation-validator.js +233 -0
  290. package/cli/dist/utils/documentation-validator.js.map +1 -0
  291. package/cli/dist/utils/install-rules.d.ts +32 -0
  292. package/cli/dist/utils/install-rules.d.ts.map +1 -0
  293. package/cli/dist/utils/install-rules.js +375 -0
  294. package/cli/dist/utils/install-rules.js.map +1 -0
  295. package/cli/dist/utils/mcp-integration.d.ts +70 -0
  296. package/cli/dist/utils/mcp-integration.d.ts.map +1 -0
  297. package/cli/dist/utils/mcp-integration.js +292 -0
  298. package/cli/dist/utils/mcp-integration.js.map +1 -0
  299. package/cli/dist/utils/module-system.d.ts +153 -0
  300. package/cli/dist/utils/module-system.d.ts.map +1 -0
  301. package/cli/dist/utils/module-system.js +528 -0
  302. package/cli/dist/utils/module-system.js.map +1 -0
  303. package/cli/dist/utils/modules-catalog.d.ts +33 -0
  304. package/cli/dist/utils/modules-catalog.d.ts.map +1 -0
  305. package/cli/dist/utils/modules-catalog.js +163 -0
  306. package/cli/dist/utils/modules-catalog.js.map +1 -0
  307. package/cli/dist/utils/rule-install-hooks.d.ts +19 -0
  308. package/cli/dist/utils/rule-install-hooks.d.ts.map +1 -0
  309. package/cli/dist/utils/rule-install-hooks.js +224 -0
  310. package/cli/dist/utils/rule-install-hooks.js.map +1 -0
  311. package/cli/dist/utils/skill-system.d.ts +95 -0
  312. package/cli/dist/utils/skill-system.d.ts.map +1 -0
  313. package/cli/dist/utils/skill-system.js +313 -0
  314. package/cli/dist/utils/skill-system.js.map +1 -0
  315. package/modules.md +534 -70
  316. package/package.json +12 -3
@@ -0,0 +1,340 @@
1
+ <#
2
+ .SYNOPSIS
3
+ Before/after migration example showing Windows PowerShell to PowerShell Core migration.
4
+
5
+ .DESCRIPTION
6
+ Complete example demonstrating:
7
+ - Migration from Windows PowerShell 5.1 to PowerShell 7.4+
8
+ - WMI to CIM cmdlet migration
9
+ - Deprecated feature replacement
10
+ - Cross-platform compatibility improvements
11
+ - Version detection and compatibility checks
12
+
13
+ This file shows BEFORE and AFTER versions of common patterns.
14
+
15
+ .NOTES
16
+ Migration Guide:
17
+ 1. Replace Get-WmiObject with Get-CimInstance
18
+ 2. Replace ConvertTo-SecureString -AsPlainText with SecureString
19
+ 3. Replace Windows-only cmdlets with cross-platform alternatives
20
+ 4. Add #Requires -Version 7.4 directive
21
+ 5. Test on target platforms (Windows, Linux, macOS)
22
+ #>
23
+
24
+ #region BEFORE: Windows PowerShell 5.1 Code
25
+
26
+ <#
27
+ # ❌ OLD: Windows PowerShell 5.1 - DO NOT USE
28
+
29
+ function Get-SystemInfoOld
30
+ {
31
+ param(
32
+ [string]$ComputerName = $env:COMPUTERNAME
33
+ )
34
+
35
+ # ❌ DEPRECATED: Get-WmiObject (removed in PowerShell Core)
36
+ $os = Get-WmiObject -Class Win32_OperatingSystem -ComputerName $ComputerName
37
+ $cpu = Get-WmiObject -Class Win32_Processor -ComputerName $ComputerName
38
+
39
+ # ❌ DEPRECATED: ConvertTo-SecureString -AsPlainText without -Force
40
+ $password = ConvertTo-SecureString "P@ssw0rd" -AsPlainText
41
+
42
+ # ❌ WINDOWS-ONLY: Get-EventLog (not available on Linux/macOS)
43
+ $events = Get-EventLog -LogName System -Newest 10
44
+
45
+ # ❌ BAD: No error handling
46
+ # ❌ BAD: No type constraints
47
+ # ❌ BAD: No CmdletBinding
48
+
49
+ return @{
50
+ OS = $os.Caption
51
+ CPU = $cpu.Name
52
+ Events = $events
53
+ }
54
+ }
55
+
56
+ function Set-UserPasswordOld
57
+ {
58
+ param(
59
+ $Username, # ❌ No type constraint
60
+ $Password # ❌ Plain text password parameter
61
+ )
62
+
63
+ # ❌ DEPRECATED: ConvertTo-SecureString -AsPlainText
64
+ $securePassword = ConvertTo-SecureString $Password -AsPlainText -Force
65
+
66
+ # ❌ No validation
67
+ # ❌ No error handling
68
+ # ❌ No ShouldProcess support
69
+
70
+ Set-ADAccountPassword -Identity $Username -NewPassword $securePassword
71
+ }
72
+
73
+ function Get-ServiceStatusOld
74
+ {
75
+ param($ServiceName) # ❌ No type constraint
76
+
77
+ # ❌ No error handling
78
+ # ❌ No validation
79
+ # ❌ No verbose output
80
+
81
+ $service = Get-Service $ServiceName
82
+ return $service.Status
83
+ }
84
+ #>
85
+
86
+ #endregion
87
+
88
+ #region AFTER: PowerShell 7.4+ Code
89
+
90
+ #Requires -Version 7.4
91
+
92
+ # ✅ NEW: PowerShell 7.4+ - RECOMMENDED
93
+
94
+ function Get-SystemInfoNew
95
+ {
96
+ [CmdletBinding()]
97
+ [OutputType([PSCustomObject])]
98
+ param(
99
+ [Parameter()]
100
+ [ValidateNotNullOrEmpty()]
101
+ [string]$ComputerName = $env:COMPUTERNAME
102
+ )
103
+
104
+ try
105
+ {
106
+ # ✅ GOOD: Get-CimInstance (cross-platform compatible)
107
+ $cimSession = if ($ComputerName -eq $env:COMPUTERNAME)
108
+ {
109
+ New-CimSession -ErrorAction Stop
110
+ }
111
+ else
112
+ {
113
+ New-CimSession -ComputerName $ComputerName -ErrorAction Stop
114
+ }
115
+
116
+ $os = Get-CimInstance -ClassName Win32_OperatingSystem -CimSession $cimSession -ErrorAction Stop
117
+ $cpu = Get-CimInstance -ClassName Win32_Processor -CimSession $cimSession -ErrorAction Stop | Select-Object -First 1
118
+
119
+ # ✅ GOOD: Cross-platform event log alternative
120
+ $events = if ($IsWindows)
121
+ {
122
+ # Use Get-WinEvent on Windows (more powerful than Get-EventLog)
123
+ Get-WinEvent -LogName System -MaxEvents 10 -ErrorAction SilentlyContinue
124
+ }
125
+ else
126
+ {
127
+ # Alternative for Linux/macOS
128
+ Write-Verbose "Event logs not available on this platform"
129
+ @()
130
+ }
131
+
132
+ # ✅ GOOD: Structured output with type
133
+ $result = [PSCustomObject]@{
134
+ ComputerName = $ComputerName
135
+ OperatingSystem = $os.Caption
136
+ OSVersion = $os.Version
137
+ Architecture = $os.OSArchitecture
138
+ Processor = $cpu.Name
139
+ ProcessorCores = $cpu.NumberOfCores
140
+ TotalMemoryGB = [math]::Round($os.TotalVisibleMemorySize / 1MB, 2)
141
+ FreeMemoryGB = [math]::Round($os.FreePhysicalMemory / 1MB, 2)
142
+ LastBootTime = $os.LastBootUpTime
143
+ RecentEvents = $events.Count
144
+ }
145
+
146
+ # ✅ GOOD: Clean up CIM session
147
+ Remove-CimSession -CimSession $cimSession -ErrorAction SilentlyContinue
148
+
149
+ return $result
150
+ }
151
+ catch
152
+ {
153
+ Write-Error "Failed to get system information: $_"
154
+ throw
155
+ }
156
+ }
157
+
158
+ function Set-UserPasswordNew
159
+ {
160
+ [CmdletBinding(SupportsShouldProcess)]
161
+ param(
162
+ [Parameter(Mandatory)]
163
+ [ValidateNotNullOrEmpty()]
164
+ [string]$Username,
165
+
166
+ [Parameter(Mandatory)]
167
+ [ValidateNotNull()]
168
+ [SecureString]$SecurePassword # ✅ GOOD: SecureString parameter
169
+ )
170
+
171
+ if ($PSCmdlet.ShouldProcess($Username, 'Set user password'))
172
+ {
173
+ try
174
+ {
175
+ # ✅ GOOD: Direct SecureString usage (no conversion needed)
176
+ Set-ADAccountPassword -Identity $Username -NewPassword $SecurePassword -ErrorAction Stop
177
+ Write-Verbose "Password updated for user: $Username"
178
+ }
179
+ catch
180
+ {
181
+ Write-Error "Failed to set password for $Username: $_"
182
+ throw
183
+ }
184
+ }
185
+ }
186
+
187
+ function Get-ServiceStatusNew
188
+ {
189
+ [CmdletBinding()]
190
+ [OutputType([string])]
191
+ param(
192
+ [Parameter(Mandatory, ValueFromPipeline)]
193
+ [ValidateNotNullOrEmpty()]
194
+ [string]$ServiceName
195
+ )
196
+
197
+ process
198
+ {
199
+ try
200
+ {
201
+ # ✅ GOOD: Error handling with specific error action
202
+ $service = Get-Service -Name $ServiceName -ErrorAction Stop
203
+
204
+ Write-Verbose "Service '$ServiceName' status: $($service.Status)"
205
+
206
+ # ✅ GOOD: Return typed output
207
+ return $service.Status.ToString()
208
+ }
209
+ catch [Microsoft.PowerShell.Commands.ServiceCommandException]
210
+ {
211
+ Write-Error "Service '$ServiceName' not found"
212
+ throw
213
+ }
214
+ catch
215
+ {
216
+ Write-Error "Failed to get service status: $_"
217
+ throw
218
+ }
219
+ }
220
+ }
221
+
222
+ #endregion
223
+
224
+ #region Migration Compatibility Helpers
225
+
226
+ function Test-PowerShellVersion
227
+ {
228
+ [CmdletBinding()]
229
+ [OutputType([PSCustomObject])]
230
+ param(
231
+ [Parameter()]
232
+ [version]$MinimumVersion = '7.4.0'
233
+ )
234
+
235
+ $currentVersion = $PSVersionTable.PSVersion
236
+ $edition = $PSVersionTable.PSEdition
237
+
238
+ $result = [PSCustomObject]@{
239
+ CurrentVersion = $currentVersion
240
+ Edition = $edition
241
+ IsCore = $edition -eq 'Core'
242
+ IsDesktop = $edition -eq 'Desktop'
243
+ MeetsMinimum = $currentVersion -ge $MinimumVersion
244
+ Platform = if ($IsWindows) { 'Windows' }
245
+ elseif ($IsLinux) { 'Linux' }
246
+ elseif ($IsMacOS) { 'macOS' }
247
+ else { 'Unknown' }
248
+ }
249
+
250
+ if (-not $result.MeetsMinimum)
251
+ {
252
+ Write-Warning "Current version ($currentVersion) is below minimum ($MinimumVersion)"
253
+ }
254
+
255
+ return $result
256
+ }
257
+
258
+ function Test-ScriptCompatibility
259
+ {
260
+ [CmdletBinding()]
261
+ param(
262
+ [Parameter(Mandatory)]
263
+ [ValidateScript({ Test-Path $_ })]
264
+ [string]$ScriptPath
265
+ )
266
+
267
+ $issues = [System.Collections.Generic.List[PSObject]]::new()
268
+ $content = Get-Content -Path $ScriptPath -Raw
269
+
270
+ # Check for deprecated cmdlets
271
+ $deprecatedPatterns = @{
272
+ 'Get-WmiObject' = 'Use Get-CimInstance instead'
273
+ 'Set-WmiInstance' = 'Use Set-CimInstance instead'
274
+ 'ConvertTo-SecureString.*-AsPlainText' = 'Use SecureString parameter directly'
275
+ 'Get-EventLog' = 'Use Get-WinEvent (Windows only) or alternative'
276
+ 'New-WebServiceProxy' = 'Use Invoke-RestMethod or Invoke-WebRequest'
277
+ }
278
+
279
+ foreach ($pattern in $deprecatedPatterns.GetEnumerator())
280
+ {
281
+ if ($content -match $pattern.Key)
282
+ {
283
+ $issues.Add([PSCustomObject]@{
284
+ Type = 'Deprecated'
285
+ Pattern = $pattern.Key
286
+ Recommendation = $pattern.Value
287
+ })
288
+ }
289
+ }
290
+
291
+ return $issues
292
+ }
293
+
294
+ #endregion
295
+
296
+ #region Example Usage
297
+
298
+ if ($MyInvocation.InvocationName -ne '.')
299
+ {
300
+ Write-Host "`n=== PowerShell Migration Example ===" -ForegroundColor Cyan
301
+
302
+ # Check PowerShell version
303
+ Write-Host "`n--- Version Check ---" -ForegroundColor Yellow
304
+ $versionInfo = Test-PowerShellVersion
305
+ $versionInfo | Format-List
306
+
307
+ if ($versionInfo.MeetsMinimum)
308
+ {
309
+ # Demonstrate new functions
310
+ Write-Host "`n--- System Information (New Method) ---" -ForegroundColor Yellow
311
+ try
312
+ {
313
+ $systemInfo = Get-SystemInfoNew -Verbose
314
+ $systemInfo | Format-List
315
+ }
316
+ catch
317
+ {
318
+ Write-Warning "System info retrieval failed (may require Windows): $_"
319
+ }
320
+
321
+ # Demonstrate service status
322
+ Write-Host "`n--- Service Status (New Method) ---" -ForegroundColor Yellow
323
+ try
324
+ {
325
+ $status = Get-ServiceStatusNew -ServiceName 'Winmgmt' -Verbose
326
+ Write-Host "Service status: $status" -ForegroundColor Green
327
+ }
328
+ catch
329
+ {
330
+ Write-Warning "Service check failed: $_"
331
+ }
332
+ }
333
+ else
334
+ {
335
+ Write-Host "`n✗ PowerShell version does not meet minimum requirements" -ForegroundColor Red
336
+ Write-Host "Please upgrade to PowerShell 7.4 or later" -ForegroundColor Yellow
337
+ }
338
+ }
339
+
340
+ #endregion
@@ -0,0 +1,255 @@
1
+ <#
2
+ .SYNOPSIS
3
+ Example PowerShell module demonstrating best practices.
4
+
5
+ .DESCRIPTION
6
+ This module demonstrates:
7
+ - Advanced functions with CmdletBinding
8
+ - Parameter validation
9
+ - Pipeline support
10
+ - Error handling
11
+ - Module-scoped variables
12
+ - Public/private function separation
13
+ #>
14
+
15
+ #Requires -Version 7.4
16
+
17
+ # Module-scoped variables
18
+ $script:ModuleConfig = @{
19
+ DefaultTimeout = 30
20
+ MaxRetries = 3
21
+ LogLevel = 'Info'
22
+ }
23
+
24
+ #region Private Functions
25
+
26
+ function Write-ModuleLog
27
+ {
28
+ [CmdletBinding()]
29
+ param(
30
+ [Parameter(Mandatory)]
31
+ [ValidateSet('Info', 'Warning', 'Error')]
32
+ [string]$Level,
33
+
34
+ [Parameter(Mandatory)]
35
+ [string]$Message
36
+ )
37
+
38
+ $timestamp = Get-Date -Format 'yyyy-MM-dd HH:mm:ss'
39
+ $logMessage = "[$timestamp] [$Level] $Message"
40
+
41
+ switch ($Level)
42
+ {
43
+ 'Info' { Write-Verbose $logMessage }
44
+ 'Warning' { Write-Warning $logMessage }
45
+ 'Error' { Write-Error $logMessage }
46
+ }
47
+ }
48
+
49
+ function Invoke-WithRetry
50
+ {
51
+ [CmdletBinding()]
52
+ param(
53
+ [Parameter(Mandatory)]
54
+ [scriptblock]$ScriptBlock,
55
+
56
+ [Parameter()]
57
+ [int]$MaxRetries = $script:ModuleConfig.MaxRetries,
58
+
59
+ [Parameter()]
60
+ [int]$DelaySeconds = 2
61
+ )
62
+
63
+ $attempt = 0
64
+
65
+ while ($attempt -lt $MaxRetries)
66
+ {
67
+ $attempt++
68
+
69
+ try
70
+ {
71
+ return & $ScriptBlock
72
+ }
73
+ catch
74
+ {
75
+ Write-ModuleLog -Level Warning -Message "Attempt $attempt failed: $($_.Exception.Message)"
76
+
77
+ if ($attempt -lt $MaxRetries)
78
+ {
79
+ Start-Sleep -Seconds $DelaySeconds
80
+ }
81
+ else
82
+ {
83
+ throw
84
+ }
85
+ }
86
+ }
87
+ }
88
+
89
+ #endregion
90
+
91
+ #region Public Functions
92
+
93
+ function Get-UserData
94
+ {
95
+ <#
96
+ .SYNOPSIS
97
+ Retrieves user data with validation and error handling.
98
+
99
+ .DESCRIPTION
100
+ Demonstrates advanced function with CmdletBinding, parameter validation,
101
+ pipeline support, and comprehensive error handling.
102
+
103
+ .PARAMETER UserName
104
+ Username(s) to retrieve data for.
105
+
106
+ .PARAMETER IncludeDetails
107
+ Include detailed user information.
108
+
109
+ .EXAMPLE
110
+ Get-UserData -UserName 'jdoe'
111
+ Get basic user data for jdoe.
112
+
113
+ .EXAMPLE
114
+ 'jdoe','asmith' | Get-UserData -IncludeDetails
115
+ Get detailed user data for multiple users via pipeline.
116
+ #>
117
+
118
+ [CmdletBinding()]
119
+ [OutputType([PSCustomObject])]
120
+ param(
121
+ [Parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)]
122
+ [ValidateNotNullOrEmpty()]
123
+ [ValidatePattern('^[a-zA-Z0-9._-]+$')]
124
+ [Alias('Name', 'User')]
125
+ [string[]]$UserName,
126
+
127
+ [Parameter()]
128
+ [switch]$IncludeDetails
129
+ )
130
+
131
+ begin
132
+ {
133
+ Write-ModuleLog -Level Info -Message "Starting Get-UserData"
134
+ $results = [System.Collections.Generic.List[PSCustomObject]]::new()
135
+ }
136
+
137
+ process
138
+ {
139
+ foreach ($user in $UserName)
140
+ {
141
+ try
142
+ {
143
+ Write-ModuleLog -Level Info -Message "Processing user: $user"
144
+
145
+ # Simulate data retrieval with retry logic
146
+ $userData = Invoke-WithRetry -ScriptBlock {
147
+ # Simulated API call
148
+ [PSCustomObject]@{
149
+ UserName = $user
150
+ DisplayName = "$user Display Name"
151
+ Email = "$user@example.com"
152
+ Created = (Get-Date).AddDays(-365)
153
+ LastLogin = Get-Date
154
+ }
155
+ }
156
+
157
+ if ($IncludeDetails)
158
+ {
159
+ # Add detailed information
160
+ $userData | Add-Member -NotePropertyName 'Department' -NotePropertyValue 'IT'
161
+ $userData | Add-Member -NotePropertyName 'Manager' -NotePropertyValue 'manager@example.com'
162
+ }
163
+
164
+ $results.Add($userData)
165
+
166
+ # Output to pipeline immediately
167
+ Write-Output $userData
168
+ }
169
+ catch
170
+ {
171
+ Write-ModuleLog -Level Error -Message "Failed to get data for $user: $($_.Exception.Message)"
172
+
173
+ # Write non-terminating error
174
+ Write-Error -Message "Failed to retrieve user data for $user" -Category ObjectNotFound -TargetObject $user
175
+ }
176
+ }
177
+ }
178
+
179
+ end
180
+ {
181
+ Write-ModuleLog -Level Info -Message "Completed Get-UserData. Processed $($results.Count) users"
182
+ }
183
+ }
184
+
185
+ function Set-UserData
186
+ {
187
+ <#
188
+ .SYNOPSIS
189
+ Updates user data with ShouldProcess support.
190
+
191
+ .DESCRIPTION
192
+ Demonstrates ShouldProcess for -WhatIf and -Confirm support.
193
+
194
+ .PARAMETER UserName
195
+ Username to update.
196
+
197
+ .PARAMETER Department
198
+ New department value.
199
+
200
+ .PARAMETER Force
201
+ Skip confirmation prompts.
202
+
203
+ .EXAMPLE
204
+ Set-UserData -UserName 'jdoe' -Department 'Engineering' -WhatIf
205
+ Preview changes without applying them.
206
+ #>
207
+
208
+ [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')]
209
+ param(
210
+ [Parameter(Mandatory, ValueFromPipelineByPropertyName)]
211
+ [ValidateNotNullOrEmpty()]
212
+ [string]$UserName,
213
+
214
+ [Parameter(Mandatory)]
215
+ [ValidateNotNullOrEmpty()]
216
+ [string]$Department,
217
+
218
+ [Parameter()]
219
+ [switch]$Force
220
+ )
221
+
222
+ process
223
+ {
224
+ if ($Force -or $PSCmdlet.ShouldProcess($UserName, "Update department to $Department"))
225
+ {
226
+ try
227
+ {
228
+ Write-ModuleLog -Level Info -Message "Updating $UserName department to $Department"
229
+
230
+ # Simulated update operation
231
+ Start-Sleep -Milliseconds 100
232
+
233
+ Write-ModuleLog -Level Info -Message "Successfully updated $UserName"
234
+
235
+ [PSCustomObject]@{
236
+ UserName = $UserName
237
+ Department = $Department
238
+ Updated = Get-Date
239
+ Success = $true
240
+ }
241
+ }
242
+ catch
243
+ {
244
+ Write-ModuleLog -Level Error -Message "Failed to update $UserName: $($_.Exception.Message)"
245
+ throw
246
+ }
247
+ }
248
+ }
249
+ }
250
+
251
+ #endregion
252
+
253
+ # Export public functions
254
+ Export-ModuleMember -Function Get-UserData, Set-UserData
255
+