@mytechtoday/augment-extensions 3.1.2 → 3.3.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 (386) hide show
  1. package/AGENTS.md +127 -0
  2. package/README.md +1050 -32
  3. package/augment-extensions/coding-standards/java/CHANGELOG.md +12 -0
  4. package/augment-extensions/coding-standards/java/README.md +54 -0
  5. package/augment-extensions/coding-standards/java/examples/SearchRequest.java +13 -0
  6. package/augment-extensions/coding-standards/java/metadata.json +36 -0
  7. package/augment-extensions/coding-standards/java/module.json +35 -0
  8. package/augment-extensions/coding-standards/java/rules/language-and-api-design.md +45 -0
  9. package/augment-extensions/coding-standards/java/rules/reliability-and-concurrency.md +43 -0
  10. package/augment-extensions/coding-standards/java/rules/testing-tooling-and-security.md +39 -0
  11. package/augment-extensions/coding-standards/q/CHANGELOG.md +16 -0
  12. package/augment-extensions/coding-standards/q/README.md +53 -0
  13. package/augment-extensions/coding-standards/q/examples/ArrayAndTupleNamingConventions.qs +27 -0
  14. package/augment-extensions/coding-standards/q/examples/CallableAliasNamingConventions.qs +20 -0
  15. package/augment-extensions/coding-standards/q/examples/CircuitCompositionNamingConventions.qs +24 -0
  16. package/augment-extensions/coding-standards/q/examples/ConstantValueNamingConventions.qs +19 -0
  17. package/augment-extensions/coding-standards/q/examples/EntryPointAttributeNamingConventions.qs +17 -0
  18. package/augment-extensions/coding-standards/q/examples/FunctorApplicationInControlledCircuits.qs +84 -0
  19. package/augment-extensions/coding-standards/q/examples/FunctorSpecializationNamingConventions.qs +29 -0
  20. package/augment-extensions/coding-standards/q/examples/GenericTypeParameterNamingConventions.qs +20 -0
  21. package/augment-extensions/coding-standards/q/examples/HamiltonianOperatorNamingConventions.qs +24 -0
  22. package/augment-extensions/coding-standards/q/examples/MeasurementResultNamingConventions.qs +48 -0
  23. package/augment-extensions/coding-standards/q/examples/NamespaceNamingConventions.qs +30 -0
  24. package/augment-extensions/coding-standards/q/examples/OperationAndFunctionNamingConventions.qs +31 -0
  25. package/augment-extensions/coding-standards/q/examples/OracleCallableNamingConventions.qs +41 -0
  26. package/augment-extensions/coding-standards/q/examples/PauliBasisNamingConventions.qs +42 -0
  27. package/augment-extensions/coding-standards/q/examples/PauliOperatorNamingConventions.qs +24 -0
  28. package/augment-extensions/coding-standards/q/examples/QubitManagementAndTeleportation.qs +94 -0
  29. package/augment-extensions/coding-standards/q/examples/QubitNamingConventions.qs +53 -0
  30. package/augment-extensions/coding-standards/q/examples/QubitRegisterNamingConventions.qs +30 -0
  31. package/augment-extensions/coding-standards/q/examples/StateVectorNamingConventions.qs +23 -0
  32. package/augment-extensions/coding-standards/q/examples/UserDefinedTypeNamingConventions.qs +22 -0
  33. package/augment-extensions/coding-standards/q/examples/VariableAndParameterNamingConventions.qs +26 -0
  34. package/augment-extensions/coding-standards/q/examples/bell-state.qs +21 -0
  35. package/augment-extensions/coding-standards/q/metadata.json +38 -0
  36. package/augment-extensions/coding-standards/q/module.json +29 -0
  37. package/augment-extensions/coding-standards/q/rules/q-error-handling.md +143 -0
  38. package/augment-extensions/coding-standards/q/rules/q-naming-conventions.md +82 -0
  39. package/augment-extensions/coding-standards/q/rules/q-performance-optimization.md +10 -0
  40. package/augment-extensions/coding-standards/q/rules/q-qubit-management.md +10 -0
  41. package/augment-extensions/coding-standards/q/rules/q-security.md +10 -0
  42. package/augment-extensions/coding-standards/q/rules/q-standards.md +127 -0
  43. package/augment-extensions/coding-standards/q/rules/q-testing.md +10 -0
  44. package/augment-extensions/coding-standards/spring/CHANGELOG.md +12 -0
  45. package/augment-extensions/coding-standards/spring/README.md +61 -0
  46. package/augment-extensions/coding-standards/spring/examples/OrderController.java +40 -0
  47. package/augment-extensions/coding-standards/spring/metadata.json +39 -0
  48. package/augment-extensions/coding-standards/spring/module.json +38 -0
  49. package/augment-extensions/coding-standards/spring/rules/beans-configuration-and-boot.md +39 -0
  50. package/augment-extensions/coding-standards/spring/rules/data-testing-and-transactions.md +36 -0
  51. package/augment-extensions/coding-standards/spring/rules/production-operations.md +40 -0
  52. package/augment-extensions/coding-standards/spring/rules/web-apis-and-security.md +43 -0
  53. package/augment-extensions/visual-design/CHANGELOG.md +2 -2
  54. package/augment-extensions/visual-design/README.md +31 -8
  55. package/augment-extensions/visual-design/VERSION +1 -0
  56. package/augment-extensions/visual-design/__tests__/README.md +32 -18
  57. package/augment-extensions/visual-design/__tests__/guidance-contract.test.ts +355 -0
  58. package/augment-extensions/visual-design/__tests__/vendor-styles.test.ts +23 -5
  59. package/augment-extensions/visual-design/domains/other/dotnet-application.ts +1 -1
  60. package/augment-extensions/visual-design/domains/other/mobile-application.ts +3 -4
  61. package/augment-extensions/visual-design/domains/other/os-application.ts +1 -1
  62. package/augment-extensions/visual-design/domains/other/windows-platform.ts +1 -1
  63. package/augment-extensions/visual-design/domains/web-page-styles/amazon-cloudscape.ts +4 -4
  64. package/augment-extensions/visual-design/domains/web-page-styles/google-modern.ts +10 -10
  65. package/augment-extensions/visual-design/domains/web-page-styles/microsoft-fluent.ts +3 -3
  66. package/augment-extensions/visual-design/examples/README.md +2 -0
  67. package/augment-extensions/visual-design/examples/basic-usage.md +5 -3
  68. package/augment-extensions/visual-design/examples/vendor-comparison.md +2 -2
  69. package/augment-extensions/visual-design/guidelines/coverage-map.md +30 -0
  70. package/augment-extensions/visual-design/guidelines/design-levels.md +211 -0
  71. package/augment-extensions/visual-design/guidelines/index.md +5 -0
  72. package/augment-extensions/visual-design/metadata.json +26 -5
  73. package/augment-extensions/visual-design/module.json +39 -6
  74. package/augment-extensions/visual-design/rules/accessibility-and-color.md +51 -0
  75. package/augment-extensions/visual-design/rules/design-practice.md +55 -0
  76. package/augment-extensions/visual-design/rules/index.md +34 -0
  77. package/augment-extensions/visual-design/rules/platform-guidance.md +47 -0
  78. package/augment-extensions/visual-design/scripts/validate-guidance.cjs +233 -0
  79. package/augment-extensions/visual-design/skills/README.md +11 -0
  80. package/augment-extensions/visual-design/skills/design-brief.md +40 -0
  81. package/augment-extensions/visual-design/skills/design-review.md +38 -0
  82. package/augment-extensions/visual-design/skills/responsive-validation/SKILL.md +94 -0
  83. package/augment-extensions/visual-design/skills/responsive-validation/scripts/responsive-sweep.cjs +457 -0
  84. package/augment-extensions/visual-design/style-selector.ts +4 -4
  85. package/augment-extensions/visual-design/types.ts +101 -46
  86. package/augment-extensions/visual-design/visual-design-core.ts +8 -8
  87. package/augment-extensions/workflows/agent-engineering/README.md +67 -0
  88. package/augment-extensions/workflows/agent-engineering/examples/contracts.cjs +89 -0
  89. package/augment-extensions/workflows/agent-engineering/examples/demo.cjs +17 -0
  90. package/augment-extensions/workflows/agent-engineering/examples/evaluation-cases.json +7 -0
  91. package/augment-extensions/workflows/agent-engineering/examples/graphs.cjs +149 -0
  92. package/augment-extensions/workflows/agent-engineering/examples/loop.cjs +125 -0
  93. package/augment-extensions/workflows/agent-engineering/examples/recovery.cjs +51 -0
  94. package/augment-extensions/workflows/agent-engineering/examples/stub.cjs +11 -0
  95. package/augment-extensions/workflows/agent-engineering/examples/verify.cjs +21 -0
  96. package/augment-extensions/workflows/agent-engineering/module.json +24 -0
  97. package/augment-extensions/workflows/agent-engineering/rules/01-adoption.md +30 -0
  98. package/augment-extensions/workflows/agent-engineering/rules/02-agents.md +34 -0
  99. package/augment-extensions/workflows/agent-engineering/rules/03-contracts.md +34 -0
  100. package/augment-extensions/workflows/agent-engineering/rules/04-loops.md +39 -0
  101. package/augment-extensions/workflows/agent-engineering/rules/05-graphs.md +39 -0
  102. package/augment-extensions/workflows/agent-engineering/rules/06-improvement.md +38 -0
  103. package/augment-extensions/workflows/agent-engineering/schemas/contracts.schema.json +1 -0
  104. package/augment-extensions/workflows/agent-engineering/scripts/validate.cjs +32 -0
  105. package/augment-extensions/workflows/agent-engineering/sources.md +12 -0
  106. package/augment-extensions/workflows/agent-engineering/templates/agent.json +40 -0
  107. package/augment-extensions/workflows/agent-engineering/templates/check-tool.json +94 -0
  108. package/augment-extensions/workflows/agent-engineering/templates/evidence.json +29 -0
  109. package/augment-extensions/workflows/agent-engineering/templates/invocation.json +40 -0
  110. package/augment-extensions/workflows/agent-engineering/templates/node.json +27 -0
  111. package/augment-extensions/workflows/agent-engineering/templates/state.json +27 -0
  112. package/augment-extensions/workflows/agent-engineering/templates/task.json +40 -0
  113. package/augment-extensions/workflows/agent-engineering/templates/tool.json +52 -0
  114. package/augment-extensions/workflows/decision-layer/README.md +136 -0
  115. package/augment-extensions/workflows/decision-layer/examples/call-inventory.json +6 -0
  116. package/augment-extensions/workflows/decision-layer/examples/config.json +9 -0
  117. package/augment-extensions/workflows/decision-layer/examples/decision.json +13 -0
  118. package/augment-extensions/workflows/decision-layer/examples/labeled-cases.json +410 -0
  119. package/augment-extensions/workflows/decision-layer/examples/source.txt +3 -0
  120. package/augment-extensions/workflows/decision-layer/examples/task.json +8 -0
  121. package/augment-extensions/workflows/decision-layer/installation/package-lock.json +27 -0
  122. package/augment-extensions/workflows/decision-layer/installation/package.json +7 -0
  123. package/augment-extensions/workflows/decision-layer/installation/sources.json +18 -0
  124. package/augment-extensions/workflows/decision-layer/module.json +24 -0
  125. package/augment-extensions/workflows/decision-layer/rules/00-index.md +5 -0
  126. package/augment-extensions/workflows/decision-layer/rules/01-responsibilities.md +15 -0
  127. package/augment-extensions/workflows/decision-layer/rules/02-operation.md +13 -0
  128. package/augment-extensions/workflows/decision-layer/runtime/cli.cjs +70 -0
  129. package/augment-extensions/workflows/decision-layer/runtime/common.cjs +85 -0
  130. package/augment-extensions/workflows/decision-layer/runtime/contracts.d.ts +8 -0
  131. package/augment-extensions/workflows/decision-layer/runtime/decisions.cjs +198 -0
  132. package/augment-extensions/workflows/decision-layer/runtime/evaluate.cjs +61 -0
  133. package/augment-extensions/workflows/decision-layer/runtime/install.cjs +186 -0
  134. package/augment-extensions/workflows/decision-layer/runtime/integrations.cjs +64 -0
  135. package/augment-extensions/workflows/decision-layer/runtime/runner.cjs +201 -0
  136. package/augment-extensions/workflows/decision-layer/runtime/worker-child.cjs +15 -0
  137. package/augment-extensions/workflows/decision-layer/runtime/workers.cjs +15 -0
  138. package/augment-extensions/workflows/decision-layer/schemas/config.schema.json +27 -0
  139. package/augment-extensions/workflows/decision-layer/scripts/validate.cjs +16 -0
  140. package/augment-extensions/workflows/decision-layer/sources.md +25 -0
  141. package/cli/MODULES.md +804 -302
  142. package/cli/dist/__test_file-tracking.d.ts +2 -0
  143. package/cli/dist/__test_file-tracking.d.ts.map +1 -0
  144. package/cli/dist/__test_file-tracking.js +4 -0
  145. package/cli/dist/__test_file-tracking.js.map +1 -0
  146. package/cli/dist/adapters/banner.d.ts +62 -0
  147. package/cli/dist/adapters/banner.d.ts.map +1 -0
  148. package/cli/dist/adapters/banner.js +105 -0
  149. package/cli/dist/adapters/banner.js.map +1 -0
  150. package/cli/dist/adapters/claude-code.d.ts +13 -0
  151. package/cli/dist/adapters/claude-code.d.ts.map +1 -0
  152. package/cli/dist/adapters/claude-code.js +79 -0
  153. package/cli/dist/adapters/claude-code.js.map +1 -0
  154. package/cli/dist/adapters/copilot.d.ts +17 -0
  155. package/cli/dist/adapters/copilot.d.ts.map +1 -0
  156. package/cli/dist/adapters/copilot.js +81 -0
  157. package/cli/dist/adapters/copilot.js.map +1 -0
  158. package/cli/dist/adapters/cursor.d.ts +16 -0
  159. package/cli/dist/adapters/cursor.d.ts.map +1 -0
  160. package/cli/dist/adapters/cursor.js +99 -0
  161. package/cli/dist/adapters/cursor.js.map +1 -0
  162. package/cli/dist/adapters/index.d.ts +25 -0
  163. package/cli/dist/adapters/index.d.ts.map +1 -0
  164. package/cli/dist/adapters/index.js +59 -0
  165. package/cli/dist/adapters/index.js.map +1 -0
  166. package/cli/dist/adapters/types.d.ts +113 -0
  167. package/cli/dist/adapters/types.d.ts.map +1 -0
  168. package/cli/dist/adapters/types.js +13 -0
  169. package/cli/dist/adapters/types.js.map +1 -0
  170. package/cli/dist/adapters/windsurf.d.ts +14 -0
  171. package/cli/dist/adapters/windsurf.d.ts.map +1 -0
  172. package/cli/dist/adapters/windsurf.js +78 -0
  173. package/cli/dist/adapters/windsurf.js.map +1 -0
  174. package/cli/dist/analysis/ast-parser.d.ts.map +1 -1
  175. package/cli/dist/analysis/ast-parser.js +25 -9
  176. package/cli/dist/analysis/ast-parser.js.map +1 -1
  177. package/cli/dist/analysis/index.d.ts +1 -0
  178. package/cli/dist/analysis/index.d.ts.map +1 -1
  179. package/cli/dist/analysis/index.js +1 -0
  180. package/cli/dist/analysis/index.js.map +1 -1
  181. package/cli/dist/analysis/pattern-analyzer.d.ts +6 -0
  182. package/cli/dist/analysis/pattern-analyzer.d.ts.map +1 -0
  183. package/cli/dist/analysis/pattern-analyzer.js +100 -0
  184. package/cli/dist/analysis/pattern-analyzer.js.map +1 -0
  185. package/cli/dist/cli.js +67 -37
  186. package/cli/dist/cli.js.map +1 -1
  187. package/cli/dist/commands/code-analysis.d.ts.map +1 -1
  188. package/cli/dist/commands/code-analysis.js +22 -2
  189. package/cli/dist/commands/code-analysis.js.map +1 -1
  190. package/cli/dist/commands/decision.d.ts +4 -0
  191. package/cli/dist/commands/decision.d.ts.map +1 -0
  192. package/cli/dist/commands/decision.js +32 -0
  193. package/cli/dist/commands/decision.js.map +1 -0
  194. package/cli/dist/commands/export.d.ts +81 -0
  195. package/cli/dist/commands/export.d.ts.map +1 -0
  196. package/cli/dist/commands/export.js +334 -0
  197. package/cli/dist/commands/export.js.map +1 -0
  198. package/cli/dist/commands/gui-decision.d.ts +6 -0
  199. package/cli/dist/commands/gui-decision.d.ts.map +1 -0
  200. package/cli/dist/commands/gui-decision.js +189 -0
  201. package/cli/dist/commands/gui-decision.js.map +1 -0
  202. package/cli/dist/commands/gui-module-manager.d.ts +14 -0
  203. package/cli/dist/commands/gui-module-manager.d.ts.map +1 -0
  204. package/cli/dist/commands/gui-module-manager.js +326 -0
  205. package/cli/dist/commands/gui-module-manager.js.map +1 -0
  206. package/cli/dist/commands/gui.d.ts +5 -9
  207. package/cli/dist/commands/gui.d.ts.map +1 -1
  208. package/cli/dist/commands/gui.js +186 -231
  209. package/cli/dist/commands/gui.js.map +1 -1
  210. package/cli/dist/commands/init.d.ts +2 -0
  211. package/cli/dist/commands/init.d.ts.map +1 -1
  212. package/cli/dist/commands/init.js +84 -3
  213. package/cli/dist/commands/init.js.map +1 -1
  214. package/cli/dist/commands/lifecycle.d.ts +14 -0
  215. package/cli/dist/commands/lifecycle.d.ts.map +1 -0
  216. package/cli/dist/commands/lifecycle.js +463 -0
  217. package/cli/dist/commands/lifecycle.js.map +1 -0
  218. package/cli/dist/commands/link.d.ts +5 -0
  219. package/cli/dist/commands/link.d.ts.map +1 -1
  220. package/cli/dist/commands/link.js +137 -29
  221. package/cli/dist/commands/link.js.map +1 -1
  222. package/cli/dist/commands/list.js +2 -2
  223. package/cli/dist/commands/list.js.map +1 -1
  224. package/cli/dist/commands/mcp.d.ts +1 -2
  225. package/cli/dist/commands/mcp.d.ts.map +1 -1
  226. package/cli/dist/commands/mcp.js +20 -20
  227. package/cli/dist/commands/mcp.js.map +1 -1
  228. package/cli/dist/commands/module-management.d.ts +9 -0
  229. package/cli/dist/commands/module-management.d.ts.map +1 -0
  230. package/cli/dist/commands/module-management.js +420 -0
  231. package/cli/dist/commands/module-management.js.map +1 -0
  232. package/cli/dist/commands/search.js +1 -11
  233. package/cli/dist/commands/search.js.map +1 -1
  234. package/cli/dist/commands/self-remove.d.ts.map +1 -1
  235. package/cli/dist/commands/self-remove.js +98 -44
  236. package/cli/dist/commands/self-remove.js.map +1 -1
  237. package/cli/dist/commands/show.d.ts +1 -1
  238. package/cli/dist/commands/show.d.ts.map +1 -1
  239. package/cli/dist/commands/show.js +21 -10
  240. package/cli/dist/commands/show.js.map +1 -1
  241. package/cli/dist/commands/showCompleted.d.ts +1 -0
  242. package/cli/dist/commands/showCompleted.d.ts.map +1 -1
  243. package/cli/dist/commands/showCompleted.js +4 -3
  244. package/cli/dist/commands/showCompleted.js.map +1 -1
  245. package/cli/dist/commands/skill.d.ts +7 -1
  246. package/cli/dist/commands/skill.d.ts.map +1 -1
  247. package/cli/dist/commands/skill.js +79 -21
  248. package/cli/dist/commands/skill.js.map +1 -1
  249. package/cli/dist/commands/unlink.d.ts +2 -0
  250. package/cli/dist/commands/unlink.d.ts.map +1 -1
  251. package/cli/dist/commands/unlink.js +86 -44
  252. package/cli/dist/commands/unlink.js.map +1 -1
  253. package/cli/dist/commands/update.d.ts.map +1 -1
  254. package/cli/dist/commands/update.js +6 -16
  255. package/cli/dist/commands/update.js.map +1 -1
  256. package/cli/dist/commands/upgrade.d.ts +2 -0
  257. package/cli/dist/commands/upgrade.d.ts.map +1 -1
  258. package/cli/dist/commands/upgrade.js +22 -5
  259. package/cli/dist/commands/upgrade.js.map +1 -1
  260. package/cli/dist/commands/use.d.ts.map +1 -1
  261. package/cli/dist/commands/use.js +2 -68
  262. package/cli/dist/commands/use.js.map +1 -1
  263. package/cli/dist/core/compatibility-checker.d.ts +37 -1
  264. package/cli/dist/core/compatibility-checker.d.ts.map +1 -1
  265. package/cli/dist/core/compatibility-checker.js +133 -12
  266. package/cli/dist/core/compatibility-checker.js.map +1 -1
  267. package/cli/dist/gui/state/navigation-state.d.ts +20 -0
  268. package/cli/dist/gui/state/navigation-state.d.ts.map +1 -0
  269. package/cli/dist/gui/state/navigation-state.js +115 -0
  270. package/cli/dist/gui/state/navigation-state.js.map +1 -0
  271. package/cli/dist/gui/state/selection-state.d.ts +21 -0
  272. package/cli/dist/gui/state/selection-state.d.ts.map +1 -0
  273. package/cli/dist/gui/state/selection-state.js +117 -0
  274. package/cli/dist/gui/state/selection-state.js.map +1 -0
  275. package/cli/dist/lib/export-runner.d.ts +76 -0
  276. package/cli/dist/lib/export-runner.d.ts.map +1 -0
  277. package/cli/dist/lib/export-runner.js +111 -0
  278. package/cli/dist/lib/export-runner.js.map +1 -0
  279. package/cli/dist/lib/mcp-detection.d.ts +40 -0
  280. package/cli/dist/lib/mcp-detection.d.ts.map +1 -0
  281. package/cli/dist/lib/mcp-detection.js +167 -0
  282. package/cli/dist/lib/mcp-detection.js.map +1 -0
  283. package/cli/dist/lib/mirror-coordination.d.ts +57 -0
  284. package/cli/dist/lib/mirror-coordination.d.ts.map +1 -0
  285. package/cli/dist/lib/mirror-coordination.js +151 -0
  286. package/cli/dist/lib/mirror-coordination.js.map +1 -0
  287. package/cli/dist/lib/mirror-runner.d.ts +123 -0
  288. package/cli/dist/lib/mirror-runner.d.ts.map +1 -0
  289. package/cli/dist/lib/mirror-runner.js +579 -0
  290. package/cli/dist/lib/mirror-runner.js.map +1 -0
  291. package/cli/dist/lib/module-resolver.d.ts +65 -0
  292. package/cli/dist/lib/module-resolver.d.ts.map +1 -0
  293. package/cli/dist/lib/module-resolver.js +211 -0
  294. package/cli/dist/lib/module-resolver.js.map +1 -0
  295. package/cli/dist/lib/source-hash.d.ts +62 -0
  296. package/cli/dist/lib/source-hash.d.ts.map +1 -0
  297. package/cli/dist/lib/source-hash.js +99 -0
  298. package/cli/dist/lib/source-hash.js.map +1 -0
  299. package/cli/dist/types/coordination-export.d.ts +33 -0
  300. package/cli/dist/types/coordination-export.d.ts.map +1 -0
  301. package/cli/dist/types/coordination-export.js +28 -0
  302. package/cli/dist/types/coordination-export.js.map +1 -0
  303. package/cli/dist/types/gui.d.ts +4 -0
  304. package/cli/dist/types/gui.d.ts.map +1 -1
  305. package/cli/dist/types/lifecycle.d.ts +81 -0
  306. package/cli/dist/types/lifecycle.d.ts.map +1 -0
  307. package/cli/dist/types/lifecycle.js +3 -0
  308. package/cli/dist/types/lifecycle.js.map +1 -0
  309. package/cli/dist/utils/beads-sync.d.ts +4 -0
  310. package/cli/dist/utils/beads-sync.d.ts.map +1 -1
  311. package/cli/dist/utils/beads-sync.js.map +1 -1
  312. package/cli/dist/utils/catalog-sync.d.ts.map +1 -1
  313. package/cli/dist/utils/catalog-sync.js +41 -8
  314. package/cli/dist/utils/catalog-sync.js.map +1 -1
  315. package/cli/dist/utils/coordination-queries.d.ts +3 -0
  316. package/cli/dist/utils/coordination-queries.d.ts.map +1 -1
  317. package/cli/dist/utils/coordination-queries.js +2 -2
  318. package/cli/dist/utils/coordination-queries.js.map +1 -1
  319. package/cli/dist/utils/decision-runner.d.ts +18 -0
  320. package/cli/dist/utils/decision-runner.d.ts.map +1 -0
  321. package/cli/dist/utils/decision-runner.js +114 -0
  322. package/cli/dist/utils/decision-runner.js.map +1 -0
  323. package/cli/dist/utils/extensions-config.d.ts +29 -0
  324. package/cli/dist/utils/extensions-config.d.ts.map +1 -0
  325. package/cli/dist/utils/extensions-config.js +151 -0
  326. package/cli/dist/utils/extensions-config.js.map +1 -0
  327. package/cli/dist/utils/extractCommandHelp.d.ts +2 -2
  328. package/cli/dist/utils/extractCommandHelp.d.ts.map +1 -1
  329. package/cli/dist/utils/extractCommandHelp.js +10 -4
  330. package/cli/dist/utils/extractCommandHelp.js.map +1 -1
  331. package/cli/dist/utils/file-tracking.d.ts +4 -0
  332. package/cli/dist/utils/file-tracking.d.ts.map +1 -1
  333. package/cli/dist/utils/file-tracking.js +5 -5
  334. package/cli/dist/utils/file-tracking.js.map +1 -1
  335. package/cli/dist/utils/glob-match.d.ts +6 -0
  336. package/cli/dist/utils/glob-match.d.ts.map +1 -0
  337. package/cli/dist/utils/glob-match.js +8 -0
  338. package/cli/dist/utils/glob-match.js.map +1 -0
  339. package/cli/dist/utils/gui-helpers.d.ts.map +1 -1
  340. package/cli/dist/utils/gui-helpers.js +7 -3
  341. package/cli/dist/utils/gui-helpers.js.map +1 -1
  342. package/cli/dist/utils/inspection-cache.d.ts +8 -0
  343. package/cli/dist/utils/inspection-cache.d.ts.map +1 -1
  344. package/cli/dist/utils/inspection-cache.js +12 -0
  345. package/cli/dist/utils/inspection-cache.js.map +1 -1
  346. package/cli/dist/utils/inspection-handlers.d.ts.map +1 -1
  347. package/cli/dist/utils/inspection-handlers.js +230 -52
  348. package/cli/dist/utils/inspection-handlers.js.map +1 -1
  349. package/cli/dist/utils/install-rules.d.ts +15 -0
  350. package/cli/dist/utils/install-rules.d.ts.map +1 -1
  351. package/cli/dist/utils/install-rules.js +247 -0
  352. package/cli/dist/utils/install-rules.js.map +1 -1
  353. package/cli/dist/utils/interactive-prompt.d.ts +7 -0
  354. package/cli/dist/utils/interactive-prompt.d.ts.map +1 -0
  355. package/cli/dist/utils/interactive-prompt.js +41 -0
  356. package/cli/dist/utils/interactive-prompt.js.map +1 -0
  357. package/cli/dist/utils/lifecycle.d.ts +47 -0
  358. package/cli/dist/utils/lifecycle.d.ts.map +1 -0
  359. package/cli/dist/utils/lifecycle.js +841 -0
  360. package/cli/dist/utils/lifecycle.js.map +1 -0
  361. package/cli/dist/utils/mcp-integration.d.ts +24 -3
  362. package/cli/dist/utils/mcp-integration.d.ts.map +1 -1
  363. package/cli/dist/utils/mcp-integration.js +364 -151
  364. package/cli/dist/utils/mcp-integration.js.map +1 -1
  365. package/cli/dist/utils/module-system.d.ts +7 -0
  366. package/cli/dist/utils/module-system.d.ts.map +1 -1
  367. package/cli/dist/utils/module-system.js +137 -42
  368. package/cli/dist/utils/module-system.js.map +1 -1
  369. package/cli/dist/utils/modules-catalog.d.ts.map +1 -1
  370. package/cli/dist/utils/modules-catalog.js +5 -0
  371. package/cli/dist/utils/modules-catalog.js.map +1 -1
  372. package/cli/dist/utils/openspec-sync.d.ts +4 -0
  373. package/cli/dist/utils/openspec-sync.d.ts.map +1 -1
  374. package/cli/dist/utils/openspec-sync.js.map +1 -1
  375. package/cli/dist/utils/plugin-system.js +1 -1
  376. package/cli/dist/utils/plugin-system.js.map +1 -1
  377. package/cli/dist/utils/skill-system.d.ts +11 -0
  378. package/cli/dist/utils/skill-system.d.ts.map +1 -1
  379. package/cli/dist/utils/skill-system.js +101 -3
  380. package/cli/dist/utils/skill-system.js.map +1 -1
  381. package/cli/dist/utils/zip-archive.d.ts +25 -0
  382. package/cli/dist/utils/zip-archive.d.ts.map +1 -0
  383. package/cli/dist/utils/zip-archive.js +287 -0
  384. package/cli/dist/utils/zip-archive.js.map +1 -0
  385. package/modules.md +89 -6
  386. package/package.json +150 -135
@@ -0,0 +1,113 @@
1
+ /**
2
+ * ToolAdapter contract for the cross-platform export layer.
3
+ *
4
+ * One adapter per target tool (Claude Code, Cursor, Windsurf, Copilot).
5
+ * Adapters are PURE FUNCTIONS: given resolved modules and metadata, they
6
+ * return strings. All filesystem I/O happens in the runner.
7
+ *
8
+ * See: openspec/changes/cross-platform/design.md (component 2)
9
+ * See: openspec/specs/cross-platform/export-command.md
10
+ */
11
+ import type { MirrorTool } from '../types/coordination-export';
12
+ /**
13
+ * A loaded rule (or example) file. Adapters are pure functions, so the
14
+ * runner reads file contents from disk and hands them to the adapter as
15
+ * in-memory objects.
16
+ */
17
+ export interface ResolvedRuleFile {
18
+ /** Forward-slash path relative to the module's `rootPath`. */
19
+ relativePath: string;
20
+ /** UTF-8 file contents, newline-normalized to LF before being passed in. */
21
+ content: string;
22
+ }
23
+ /**
24
+ * A module after resolution from `.augment/coordination.json`. Adapters
25
+ * consume this; the resolver produces it.
26
+ */
27
+ export interface ResolvedModule {
28
+ /** Canonical module id, e.g. `coding-standards/typescript`. */
29
+ id: string;
30
+ /** Semantic version string from the module's `module.json`. */
31
+ version: string;
32
+ /** Absolute path to the module root on disk. */
33
+ rootPath: string;
34
+ /** Loaded `rules/*.md` files, alphabetically ordered by `relativePath`. */
35
+ rulesFiles: ResolvedRuleFile[];
36
+ /** Loaded files under `examples/`, alphabetically ordered by `relativePath`. */
37
+ examplesFiles: ResolvedRuleFile[];
38
+ /** Absolute path to the module's `README.md`, or undefined if absent. */
39
+ readmePath?: string;
40
+ }
41
+ /**
42
+ * Module identity tuple embedded in the banner `modules:` comment.
43
+ */
44
+ export interface ModuleIdentity {
45
+ id: string;
46
+ version: string;
47
+ }
48
+ /**
49
+ * Metadata threaded into every header/footer the adapter renders.
50
+ * Produced by the runner; never derived inside the adapter.
51
+ */
52
+ export interface ExportMeta {
53
+ /** Augx CLI version (matches `package.json#version`). */
54
+ augxVersion: string;
55
+ /** ISO-8601 timestamp. Pinnable via `AUGX_FAKE_NOW` for tests. */
56
+ generatedAt: string;
57
+ /** 16-hex truncated SHA-256 from `source-hash.ts`. */
58
+ sourceHash: string;
59
+ /** Alphabetically sorted module identities; mirrored in the banner. */
60
+ modules: ModuleIdentity[];
61
+ /** Inlined MCP wiring snippet body, or undefined to omit. */
62
+ mcpSnippet?: string;
63
+ }
64
+ /**
65
+ * Filesystem destinations a tool writes to.
66
+ *
67
+ * `single` is the aggregator output (single file per project). Adapters that
68
+ * also want a per-module shape can return additional fields under a richer
69
+ * type; this base shape covers all four Phase-1 adapters.
70
+ */
71
+ export interface ExportPaths {
72
+ /** Absolute or project-relative path to the aggregator file. */
73
+ single: string;
74
+ }
75
+ /**
76
+ * The contract every tool adapter implements.
77
+ *
78
+ * INVARIANT: every method is a pure function. No `fs`, no `process.cwd()`,
79
+ * no clock reads, no random. All side effects live in the runner.
80
+ */
81
+ export interface ToolAdapter {
82
+ /** Discriminator matching the `--target` flag and `MirrorTool` union. */
83
+ readonly id: MirrorTool;
84
+ /**
85
+ * Default output destinations for `augx export --target <id>`.
86
+ * The runner may override `single` via `--output`.
87
+ */
88
+ exportPaths(projectRoot: string): ExportPaths;
89
+ /**
90
+ * Where a single mirrored module's content lands when `augx link --mirror`
91
+ * materializes per-module copies/symlinks.
92
+ *
93
+ * @param projectRoot Absolute path to the consuming project's root.
94
+ * @param moduleId Canonical module id, e.g. `coding-standards/typescript`.
95
+ */
96
+ mirrorPath(projectRoot: string, moduleId: string): string;
97
+ /**
98
+ * Render the per-module section content for the aggregated output.
99
+ * MUST NOT include the `## Module:` heading; the runner emits headings
100
+ * to keep ordering deterministic across adapters.
101
+ */
102
+ renderModule(module: ResolvedModule): string;
103
+ /**
104
+ * Render the file header. For formats that require frontmatter (Cursor
105
+ * `.mdc`), this method emits the frontmatter followed by the banner.
106
+ */
107
+ renderHeader(meta: ExportMeta): string;
108
+ /**
109
+ * Render the closing footer (attribution + canonical pointer).
110
+ */
111
+ renderFooter(meta: ExportMeta): string;
112
+ }
113
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/adapters/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE/D;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,8DAA8D;IAC9D,YAAY,EAAE,MAAM,CAAC;IACrB,4EAA4E;IAC5E,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,+DAA+D;IAC/D,EAAE,EAAE,MAAM,CAAC;IACX,+DAA+D;IAC/D,OAAO,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,QAAQ,EAAE,MAAM,CAAC;IACjB,2EAA2E;IAC3E,UAAU,EAAE,gBAAgB,EAAE,CAAC;IAC/B,gFAAgF;IAChF,aAAa,EAAE,gBAAgB,EAAE,CAAC;IAClC,yEAAyE;IACzE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,yDAAyD;IACzD,WAAW,EAAE,MAAM,CAAC;IACpB,kEAAkE;IAClE,WAAW,EAAE,MAAM,CAAC;IACpB,sDAAsD;IACtD,UAAU,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,6DAA6D;IAC7D,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,gEAAgE;IAChE,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B,yEAAyE;IACzE,QAAQ,CAAC,EAAE,EAAE,UAAU,CAAC;IAExB;;;OAGG;IACH,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,WAAW,CAAC;IAE9C;;;;;;OAMG;IACH,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IAE1D;;;;OAIG;IACH,YAAY,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAAC;IAE7C;;;OAGG;IACH,YAAY,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAAC;IAEvC;;OAEG;IACH,YAAY,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAAC;CACxC"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ /**
3
+ * ToolAdapter contract for the cross-platform export layer.
4
+ *
5
+ * One adapter per target tool (Claude Code, Cursor, Windsurf, Copilot).
6
+ * Adapters are PURE FUNCTIONS: given resolved modules and metadata, they
7
+ * return strings. All filesystem I/O happens in the runner.
8
+ *
9
+ * See: openspec/changes/cross-platform/design.md (component 2)
10
+ * See: openspec/specs/cross-platform/export-command.md
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/adapters/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Windsurf adapter.
3
+ *
4
+ * Aggregator output: `.windsurfrules` at the project root (single Markdown
5
+ * file, no frontmatter; Windsurf reads the file verbatim).
6
+ * Mirror destination: `.windsurf/rules/augx-<module>.md` (one file per
7
+ * module).
8
+ *
9
+ * See: openspec/specs/cross-platform/export-command.md
10
+ * See: openspec/specs/cross-platform/mirror-hook.md
11
+ */
12
+ import type { ToolAdapter } from './types';
13
+ export declare const windsurfAdapter: ToolAdapter;
14
+ //# sourceMappingURL=windsurf.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"windsurf.d.ts","sourceRoot":"","sources":["../../src/adapters/windsurf.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAIV,WAAW,EACZ,MAAM,SAAS,CAAC;AAejB,eAAO,MAAM,eAAe,EAAE,WAyB7B,CAAC"}
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ /**
3
+ * Windsurf adapter.
4
+ *
5
+ * Aggregator output: `.windsurfrules` at the project root (single Markdown
6
+ * file, no frontmatter; Windsurf reads the file verbatim).
7
+ * Mirror destination: `.windsurf/rules/augx-<module>.md` (one file per
8
+ * module).
9
+ *
10
+ * See: openspec/specs/cross-platform/export-command.md
11
+ * See: openspec/specs/cross-platform/mirror-hook.md
12
+ */
13
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ var desc = Object.getOwnPropertyDescriptor(m, k);
16
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
+ desc = { enumerable: true, get: function() { return m[k]; } };
18
+ }
19
+ Object.defineProperty(o, k2, desc);
20
+ }) : (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ o[k2] = m[k];
23
+ }));
24
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
26
+ }) : function(o, v) {
27
+ o["default"] = v;
28
+ });
29
+ var __importStar = (this && this.__importStar) || (function () {
30
+ var ownKeys = function(o) {
31
+ ownKeys = Object.getOwnPropertyNames || function (o) {
32
+ var ar = [];
33
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
34
+ return ar;
35
+ };
36
+ return ownKeys(o);
37
+ };
38
+ return function (mod) {
39
+ if (mod && mod.__esModule) return mod;
40
+ var result = {};
41
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
42
+ __setModuleDefault(result, mod);
43
+ return result;
44
+ };
45
+ })();
46
+ Object.defineProperty(exports, "__esModule", { value: true });
47
+ exports.windsurfAdapter = void 0;
48
+ const path = __importStar(require("path"));
49
+ const banner_1 = require("./banner");
50
+ /**
51
+ * Convert a canonical module id to a single path segment safe for filesystem
52
+ * use within `.windsurf/rules/augx-<segment>.md`.
53
+ */
54
+ function moduleIdToSegment(moduleId) {
55
+ return moduleId.replace(/\//g, '-');
56
+ }
57
+ exports.windsurfAdapter = {
58
+ id: 'windsurf',
59
+ exportPaths(projectRoot) {
60
+ return {
61
+ single: path.join(projectRoot, '.windsurfrules'),
62
+ };
63
+ },
64
+ mirrorPath(projectRoot, moduleId) {
65
+ const fileName = `augx-${moduleIdToSegment(moduleId)}.md`;
66
+ return path.join(projectRoot, '.windsurf', 'rules', fileName);
67
+ },
68
+ renderModule(module) {
69
+ return (0, banner_1.renderModuleBody)(module);
70
+ },
71
+ renderHeader(meta) {
72
+ return (0, banner_1.renderHeaderRegion)(meta);
73
+ },
74
+ renderFooter(_meta) {
75
+ return (0, banner_1.renderStandardFooter)();
76
+ },
77
+ };
78
+ //# sourceMappingURL=windsurf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"windsurf.js","sourceRoot":"","sources":["../../src/adapters/windsurf.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,2CAA6B;AAO7B,qCAIkB;AAElB;;;GAGG;AACH,SAAS,iBAAiB,CAAC,QAAgB;IACzC,OAAO,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AACtC,CAAC;AAEY,QAAA,eAAe,GAAgB;IAC1C,EAAE,EAAE,UAAU;IAEd,WAAW,CAAC,WAAmB;QAC7B,OAAO;YACL,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,gBAAgB,CAAC;SACjD,CAAC;IACJ,CAAC;IAED,UAAU,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,WAAW,CACzB,IAAI,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,EAChC,OAAO,EAAE;IACP,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAClD,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CACnD,EACD,MAAM,CAAC,EAAE,OAAO,GACf,IAAI,CAuBN;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,EAAE,CAYzE;AAED,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,EAAE,CAE/D;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,EAAE,CAE5D"}
@@ -43,7 +43,7 @@ exports.findNodesByType = findNodesByType;
43
43
  exports.getFunctionDeclarations = getFunctionDeclarations;
44
44
  exports.getClassDeclarations = getClassDeclarations;
45
45
  const fs = __importStar(require("fs"));
46
- const { parse } = require('@typescript-eslint/typescript-estree');
46
+ const { parse } = require('@babel/parser');
47
47
  function parseFile(filePath, options = {}) {
48
48
  const sourceCode = fs.readFileSync(filePath, 'utf-8');
49
49
  return {
@@ -54,21 +54,37 @@ function parseFile(filePath, options = {}) {
54
54
  }
55
55
  function parseCode(sourceCode, options = {}) {
56
56
  try {
57
- return parse(sourceCode, {
58
- jsx: options.jsx ?? true,
57
+ const jsx = options.jsx ?? true;
58
+ const plugins = jsx
59
+ ? ['jsx', ['typescript', { isTSX: true }], 'estree']
60
+ : [['typescript', { isTSX: false }], 'estree'];
61
+ const ast = parse(sourceCode, {
59
62
  sourceType: options.sourceType ?? 'module',
60
- loc: options.loc ?? true,
61
- range: options.range ?? true,
63
+ ranges: options.range ?? true,
62
64
  tokens: options.tokens ?? false,
63
- comment: options.comment ?? false,
64
- errorOnUnknownASTType: false,
65
- errorOnTypeScriptSyntacticAndSemanticIssues: false
66
- });
65
+ attachComment: options.comment ?? false,
66
+ plugins
67
+ }).program;
68
+ if (options.loc === false) {
69
+ removeLocations(ast);
70
+ }
71
+ return ast;
67
72
  }
68
73
  catch (error) {
69
74
  throw new Error(`Failed to parse source: ${String(error)}`);
70
75
  }
71
76
  }
77
+ function removeLocations(value) {
78
+ if (!value || typeof value !== 'object') {
79
+ return;
80
+ }
81
+ if (Array.isArray(value)) {
82
+ value.forEach(removeLocations);
83
+ return;
84
+ }
85
+ delete value.loc;
86
+ Object.values(value).forEach(removeLocations);
87
+ }
72
88
  function traverseAST(node, visitor, parent) {
73
89
  if (!node || typeof node !== 'object' || typeof node.type !== 'string') {
74
90
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"ast-parser.js","sourceRoot":"","sources":["../../src/analysis/ast-parser.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBH,8BAOC;AAED,8BAeC;AAED,kCA8BC;AAED,0CAYC;AAED,0DAEC;AAED,oDAEC;AApGD,uCAAyB;AAGzB,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,sCAAsC,CAE/D,CAAC;AAiBF,SAAgB,SAAS,CAAC,QAAgB,EAAE,UAAwB,EAAE;IACpE,MAAM,UAAU,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACtD,OAAO;QACL,GAAG,EAAE,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC;QACnC,QAAQ;QACR,UAAU;KACX,CAAC;AACJ,CAAC;AAED,SAAgB,SAAS,CAAC,UAAkB,EAAE,UAAwB,EAAE;IACtE,IAAI,CAAC;QACH,OAAO,KAAK,CAAC,UAAU,EAAE;YACvB,GAAG,EAAE,OAAO,CAAC,GAAG,IAAI,IAAI;YACxB,UAAU,EAAE,OAAO,CAAC,UAAU,IAAI,QAAQ;YAC1C,GAAG,EAAE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,eAAe,CAAC,GAAG,EAAE,qBAAqB,CAAC,CAAC;AACrD,CAAC;AAED,SAAgB,oBAAoB,CAAC,GAAY;IAC/C,OAAO,eAAe,CAAC,GAAG,EAAE,kBAAkB,CAAC,CAAC;AAClD,CAAC;AAED,SAAS,SAAS,CAAC,KAAc;IAC/B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,OAAQ,KAAiB,CAAC,IAAI,KAAK,QAAQ,CAAC;AACpG,CAAC"}
@@ -5,5 +5,6 @@ export * from './types';
5
5
  export * from './ast-parser';
6
6
  export * from './complexity-analyzer';
7
7
  export * from './dependency-analyzer';
8
+ export * from './pattern-analyzer';
8
9
  export * from './security-scanner';
9
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/analysis/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/analysis/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC"}
@@ -21,5 +21,6 @@ __exportStar(require("./types"), exports);
21
21
  __exportStar(require("./ast-parser"), exports);
22
22
  __exportStar(require("./complexity-analyzer"), exports);
23
23
  __exportStar(require("./dependency-analyzer"), exports);
24
+ __exportStar(require("./pattern-analyzer"), exports);
24
25
  __exportStar(require("./security-scanner"), exports);
25
26
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/analysis/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,0CAAwB;AACxB,+CAA6B;AAC7B,wDAAsC;AACtC,wDAAsC;AACtC,qDAAmC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/analysis/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,0CAAwB;AACxB,+CAA6B;AAC7B,wDAAsC;AACtC,wDAAsC;AACtC,qDAAmC;AACnC,qDAAmC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Pattern Analyzer Module
3
+ */
4
+ import { PatternDetection } from './types';
5
+ export declare function analyzePatterns(files: string[]): PatternDetection[];
6
+ //# sourceMappingURL=pattern-analyzer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pattern-analyzer.d.ts","sourceRoot":"","sources":["../../src/analysis/pattern-analyzer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAAW,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAWpD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,gBAAgB,EAAE,CAanE"}
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ /**
3
+ * Pattern Analyzer Module
4
+ */
5
+ var __importDefault = (this && this.__importDefault) || function (mod) {
6
+ return (mod && mod.__esModule) ? mod : { "default": mod };
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.analyzePatterns = analyzePatterns;
10
+ const chalk_1 = __importDefault(require("chalk"));
11
+ const ast_parser_1 = require("./ast-parser");
12
+ const FUNCTION_NODE_TYPES = new Set(['FunctionDeclaration', 'FunctionExpression', 'ArrowFunctionExpression']);
13
+ const DUPLICATE_FUNCTION_BODY_PATTERN = 'duplicate-function-body';
14
+ function analyzePatterns(files) {
15
+ const samples = [];
16
+ for (const file of files) {
17
+ try {
18
+ const { ast, sourceCode } = (0, ast_parser_1.parseFile)(file);
19
+ samples.push(...collectPatternSamples(ast, file, sourceCode));
20
+ }
21
+ catch (error) {
22
+ console.warn(chalk_1.default.yellow(`Warning: Failed to analyze patterns for ${file}: ${String(error)}`));
23
+ }
24
+ }
25
+ return findDuplicateFunctionBodies(samples);
26
+ }
27
+ function collectPatternSamples(ast, file, sourceCode) {
28
+ const samples = [];
29
+ (0, ast_parser_1.traverseAST)(ast, {
30
+ enter: (node) => {
31
+ if (!FUNCTION_NODE_TYPES.has(node.type)) {
32
+ return;
33
+ }
34
+ const body = getFunctionBodyText(node, sourceCode);
35
+ if (!body) {
36
+ return;
37
+ }
38
+ samples.push({
39
+ file,
40
+ line: node.loc?.start.line ?? 0,
41
+ pattern: normalizePatternSource(body)
42
+ });
43
+ }
44
+ });
45
+ return samples;
46
+ }
47
+ function findDuplicateFunctionBodies(samples) {
48
+ const grouped = new Map();
49
+ for (const sample of samples) {
50
+ const bucket = grouped.get(sample.pattern) ?? [];
51
+ bucket.push(sample);
52
+ grouped.set(sample.pattern, bucket);
53
+ }
54
+ const detections = [];
55
+ for (const bucket of grouped.values()) {
56
+ if (bucket.length < 2) {
57
+ continue;
58
+ }
59
+ const [firstSample, ...duplicateSamples] = bucket;
60
+ for (const duplicate of duplicateSamples) {
61
+ detections.push({
62
+ file: duplicate.file,
63
+ pattern: DUPLICATE_FUNCTION_BODY_PATTERN,
64
+ type: 'anti-pattern',
65
+ line: duplicate.line,
66
+ description: `Repeated function body matches ${firstSample.file}:${firstSample.line}`
67
+ });
68
+ }
69
+ }
70
+ return detections;
71
+ }
72
+ function getFunctionBodyText(node, sourceCode) {
73
+ const body = node.body;
74
+ const range = getRange(body);
75
+ if (!range) {
76
+ return '';
77
+ }
78
+ return sourceCode.slice(range[0], range[1]).trim();
79
+ }
80
+ function getRange(node) {
81
+ if (!isAstNode(node)) {
82
+ return null;
83
+ }
84
+ const range = node.range;
85
+ if (!Array.isArray(range) || range.length !== 2) {
86
+ return null;
87
+ }
88
+ const [start, end] = range;
89
+ if (typeof start !== 'number' || typeof end !== 'number') {
90
+ return null;
91
+ }
92
+ return [start, end];
93
+ }
94
+ function normalizePatternSource(source) {
95
+ return source.replace(/\s+/g, ' ').trim();
96
+ }
97
+ function isAstNode(value) {
98
+ return typeof value === 'object' && value !== null && typeof value.type === 'string';
99
+ }
100
+ //# sourceMappingURL=pattern-analyzer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pattern-analyzer.js","sourceRoot":"","sources":["../../src/analysis/pattern-analyzer.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;AAeH,0CAaC;AA1BD,kDAA0B;AAC1B,6CAAsD;AAStD,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC,CAAC,qBAAqB,EAAE,oBAAoB,EAAE,yBAAyB,CAAC,CAAC,CAAC;AAC9G,MAAM,+BAA+B,GAAG,yBAAyB,CAAC;AAElE,SAAgB,eAAe,CAAC,KAAe;IAC7C,MAAM,OAAO,GAAoB,EAAE,CAAC;IAEpC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,CAAC;YACH,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,IAAA,sBAAS,EAAC,IAAI,CAAC,CAAC;YAC5C,OAAO,CAAC,IAAI,CAAC,GAAG,qBAAqB,CAAC,GAAG,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC;QAChE,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,IAAI,CAAC,eAAK,CAAC,MAAM,CAAC,2CAA2C,IAAI,KAAK,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;QAClG,CAAC;IACH,CAAC;IAED,OAAO,2BAA2B,CAAC,OAAO,CAAC,CAAC;AAC9C,CAAC;AAED,SAAS,qBAAqB,CAAC,GAAY,EAAE,IAAY,EAAE,UAAkB;IAC3E,MAAM,OAAO,GAAoB,EAAE,CAAC;IAEpC,IAAA,wBAAW,EAAC,GAAG,EAAE;QACf,KAAK,EAAE,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