memor-code-cli 0.2.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 (418) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +109 -0
  3. package/dist/IntentionalStructure/index.d.ts +13 -0
  4. package/dist/IntentionalStructure/index.d.ts.map +1 -0
  5. package/dist/IntentionalStructure/index.js +46 -0
  6. package/dist/IntentionalStructure/index.js.map +1 -0
  7. package/dist/IntentionalStructure/parseCompose.d.ts +13 -0
  8. package/dist/IntentionalStructure/parseCompose.d.ts.map +1 -0
  9. package/dist/IntentionalStructure/parseCompose.js +234 -0
  10. package/dist/IntentionalStructure/parseCompose.js.map +1 -0
  11. package/dist/IntentionalStructure/parseDeployConfigs.d.ts +7 -0
  12. package/dist/IntentionalStructure/parseDeployConfigs.d.ts.map +1 -0
  13. package/dist/IntentionalStructure/parseDeployConfigs.js +168 -0
  14. package/dist/IntentionalStructure/parseDeployConfigs.js.map +1 -0
  15. package/dist/IntentionalStructure/parseEnvWiring.d.ts +7 -0
  16. package/dist/IntentionalStructure/parseEnvWiring.d.ts.map +1 -0
  17. package/dist/IntentionalStructure/parseEnvWiring.js +159 -0
  18. package/dist/IntentionalStructure/parseEnvWiring.js.map +1 -0
  19. package/dist/IntentionalStructure/parseWorkspaces.d.ts +8 -0
  20. package/dist/IntentionalStructure/parseWorkspaces.d.ts.map +1 -0
  21. package/dist/IntentionalStructure/parseWorkspaces.js +179 -0
  22. package/dist/IntentionalStructure/parseWorkspaces.js.map +1 -0
  23. package/dist/IntentionalStructure/types.d.ts +34 -0
  24. package/dist/IntentionalStructure/types.d.ts.map +1 -0
  25. package/dist/IntentionalStructure/types.js +8 -0
  26. package/dist/IntentionalStructure/types.js.map +1 -0
  27. package/dist/RepoTypeDetection/applyRepoModeConsistency.d.ts +11 -0
  28. package/dist/RepoTypeDetection/applyRepoModeConsistency.d.ts.map +1 -0
  29. package/dist/RepoTypeDetection/applyRepoModeConsistency.js +53 -0
  30. package/dist/RepoTypeDetection/applyRepoModeConsistency.js.map +1 -0
  31. package/dist/RepoTypeDetection/detectAppArchetype.d.ts +12 -0
  32. package/dist/RepoTypeDetection/detectAppArchetype.d.ts.map +1 -0
  33. package/dist/RepoTypeDetection/detectAppArchetype.js +162 -0
  34. package/dist/RepoTypeDetection/detectAppArchetype.js.map +1 -0
  35. package/dist/RepoTypeDetection/detectPackageArchetype.d.ts +10 -0
  36. package/dist/RepoTypeDetection/detectPackageArchetype.d.ts.map +1 -0
  37. package/dist/RepoTypeDetection/detectPackageArchetype.js +149 -0
  38. package/dist/RepoTypeDetection/detectPackageArchetype.js.map +1 -0
  39. package/dist/RepoTypeDetection/detectRepoCenterSystems.d.ts +11 -0
  40. package/dist/RepoTypeDetection/detectRepoCenterSystems.d.ts.map +1 -0
  41. package/dist/RepoTypeDetection/detectRepoCenterSystems.js +123 -0
  42. package/dist/RepoTypeDetection/detectRepoCenterSystems.js.map +1 -0
  43. package/dist/RepoTypeDetection/detectRepoMode.d.ts +16 -0
  44. package/dist/RepoTypeDetection/detectRepoMode.d.ts.map +1 -0
  45. package/dist/RepoTypeDetection/detectRepoMode.js +338 -0
  46. package/dist/RepoTypeDetection/detectRepoMode.js.map +1 -0
  47. package/dist/RepoTypeDetection/detectRepoSignals.d.ts +13 -0
  48. package/dist/RepoTypeDetection/detectRepoSignals.d.ts.map +1 -0
  49. package/dist/RepoTypeDetection/detectRepoSignals.js +451 -0
  50. package/dist/RepoTypeDetection/detectRepoSignals.js.map +1 -0
  51. package/dist/RepoTypeDetection/inferSupportRole.d.ts +8 -0
  52. package/dist/RepoTypeDetection/inferSupportRole.d.ts.map +1 -0
  53. package/dist/RepoTypeDetection/inferSupportRole.js +177 -0
  54. package/dist/RepoTypeDetection/inferSupportRole.js.map +1 -0
  55. package/dist/RuntimeInference/detectEnvConsumers.d.ts +7 -0
  56. package/dist/RuntimeInference/detectEnvConsumers.d.ts.map +1 -0
  57. package/dist/RuntimeInference/detectEnvConsumers.js +108 -0
  58. package/dist/RuntimeInference/detectEnvConsumers.js.map +1 -0
  59. package/dist/RuntimeInference/detectHttpEdges.d.ts +4 -0
  60. package/dist/RuntimeInference/detectHttpEdges.d.ts.map +1 -0
  61. package/dist/RuntimeInference/detectHttpEdges.js +146 -0
  62. package/dist/RuntimeInference/detectHttpEdges.js.map +1 -0
  63. package/dist/RuntimeInference/detectOrmConsumers.d.ts +5 -0
  64. package/dist/RuntimeInference/detectOrmConsumers.d.ts.map +1 -0
  65. package/dist/RuntimeInference/detectOrmConsumers.js +117 -0
  66. package/dist/RuntimeInference/detectOrmConsumers.js.map +1 -0
  67. package/dist/RuntimeInference/detectProxyRewrites.d.ts +5 -0
  68. package/dist/RuntimeInference/detectProxyRewrites.d.ts.map +1 -0
  69. package/dist/RuntimeInference/detectProxyRewrites.js +137 -0
  70. package/dist/RuntimeInference/detectProxyRewrites.js.map +1 -0
  71. package/dist/RuntimeInference/detectTrpcEdges.d.ts +4 -0
  72. package/dist/RuntimeInference/detectTrpcEdges.d.ts.map +1 -0
  73. package/dist/RuntimeInference/detectTrpcEdges.js +137 -0
  74. package/dist/RuntimeInference/detectTrpcEdges.js.map +1 -0
  75. package/dist/RuntimeInference/index.d.ts +17 -0
  76. package/dist/RuntimeInference/index.d.ts.map +1 -0
  77. package/dist/RuntimeInference/index.js +32 -0
  78. package/dist/RuntimeInference/index.js.map +1 -0
  79. package/dist/RuntimeInference/types.d.ts +8 -0
  80. package/dist/RuntimeInference/types.d.ts.map +1 -0
  81. package/dist/RuntimeInference/types.js +3 -0
  82. package/dist/RuntimeInference/types.js.map +1 -0
  83. package/dist/SystemSynthesis/index.d.ts +27 -0
  84. package/dist/SystemSynthesis/index.d.ts.map +1 -0
  85. package/dist/SystemSynthesis/index.js +31 -0
  86. package/dist/SystemSynthesis/index.js.map +1 -0
  87. package/dist/SystemSynthesis/mergeLayerOutputs.d.ts +13 -0
  88. package/dist/SystemSynthesis/mergeLayerOutputs.d.ts.map +1 -0
  89. package/dist/SystemSynthesis/mergeLayerOutputs.js +220 -0
  90. package/dist/SystemSynthesis/mergeLayerOutputs.js.map +1 -0
  91. package/dist/SystemSynthesis/stampDeterministic.d.ts +11 -0
  92. package/dist/SystemSynthesis/stampDeterministic.d.ts.map +1 -0
  93. package/dist/SystemSynthesis/stampDeterministic.js +177 -0
  94. package/dist/SystemSynthesis/stampDeterministic.js.map +1 -0
  95. package/dist/SystemSynthesis/synthesize.d.ts +15 -0
  96. package/dist/SystemSynthesis/synthesize.d.ts.map +1 -0
  97. package/dist/SystemSynthesis/synthesize.js +258 -0
  98. package/dist/SystemSynthesis/synthesize.js.map +1 -0
  99. package/dist/SystemSynthesis/types.d.ts +110 -0
  100. package/dist/SystemSynthesis/types.d.ts.map +1 -0
  101. package/dist/SystemSynthesis/types.js +12 -0
  102. package/dist/SystemSynthesis/types.js.map +1 -0
  103. package/dist/amGeneration/buildFlowGraph.d.ts +39 -0
  104. package/dist/amGeneration/buildFlowGraph.d.ts.map +1 -0
  105. package/dist/amGeneration/buildFlowGraph.js +643 -0
  106. package/dist/amGeneration/buildFlowGraph.js.map +1 -0
  107. package/dist/amGeneration/enrichAMEdges.d.ts +16 -0
  108. package/dist/amGeneration/enrichAMEdges.d.ts.map +1 -0
  109. package/dist/amGeneration/enrichAMEdges.js +291 -0
  110. package/dist/amGeneration/enrichAMEdges.js.map +1 -0
  111. package/dist/amGeneration/generateAM.d.ts +23 -0
  112. package/dist/amGeneration/generateAM.d.ts.map +1 -0
  113. package/dist/amGeneration/generateAM.js +131 -0
  114. package/dist/amGeneration/generateAM.js.map +1 -0
  115. package/dist/amGeneration/generateAMForRepo.d.ts +6 -0
  116. package/dist/amGeneration/generateAMForRepo.d.ts.map +1 -0
  117. package/dist/amGeneration/generateAMForRepo.js +130 -0
  118. package/dist/amGeneration/generateAMForRepo.js.map +1 -0
  119. package/dist/amGeneration/generateFlows.d.ts +27 -0
  120. package/dist/amGeneration/generateFlows.d.ts.map +1 -0
  121. package/dist/amGeneration/generateFlows.js +320 -0
  122. package/dist/amGeneration/generateFlows.js.map +1 -0
  123. package/dist/amGeneration/promptBuilder.d.ts +24 -0
  124. package/dist/amGeneration/promptBuilder.d.ts.map +1 -0
  125. package/dist/amGeneration/promptBuilder.js +299 -0
  126. package/dist/amGeneration/promptBuilder.js.map +1 -0
  127. package/dist/amGeneration/selectStrategicFiles.d.ts +42 -0
  128. package/dist/amGeneration/selectStrategicFiles.d.ts.map +1 -0
  129. package/dist/amGeneration/selectStrategicFiles.js +672 -0
  130. package/dist/amGeneration/selectStrategicFiles.js.map +1 -0
  131. package/dist/amGeneration/types.d.ts +83 -0
  132. package/dist/amGeneration/types.d.ts.map +1 -0
  133. package/dist/amGeneration/types.js +9 -0
  134. package/dist/amGeneration/types.js.map +1 -0
  135. package/dist/amSections.d.ts +29 -0
  136. package/dist/amSections.d.ts.map +1 -0
  137. package/dist/amSections.js +424 -0
  138. package/dist/amSections.js.map +1 -0
  139. package/dist/analysis/analysisCache.d.ts +4 -0
  140. package/dist/analysis/analysisCache.d.ts.map +1 -0
  141. package/dist/analysis/analysisCache.js +92 -0
  142. package/dist/analysis/analysisCache.js.map +1 -0
  143. package/dist/analysis/buildBranchStory.d.ts +95 -0
  144. package/dist/analysis/buildBranchStory.d.ts.map +1 -0
  145. package/dist/analysis/buildBranchStory.js +1264 -0
  146. package/dist/analysis/buildBranchStory.js.map +1 -0
  147. package/dist/analysis/buildDetailedFileXRay.d.ts +49 -0
  148. package/dist/analysis/buildDetailedFileXRay.d.ts.map +1 -0
  149. package/dist/analysis/buildDetailedFileXRay.js +607 -0
  150. package/dist/analysis/buildDetailedFileXRay.js.map +1 -0
  151. package/dist/analysis/buildFileXRay.d.ts +35 -0
  152. package/dist/analysis/buildFileXRay.d.ts.map +1 -0
  153. package/dist/analysis/buildFileXRay.js +305 -0
  154. package/dist/analysis/buildFileXRay.js.map +1 -0
  155. package/dist/analysis/classifySilentKiller.d.ts +14 -0
  156. package/dist/analysis/classifySilentKiller.d.ts.map +1 -0
  157. package/dist/analysis/classifySilentKiller.js +235 -0
  158. package/dist/analysis/classifySilentKiller.js.map +1 -0
  159. package/dist/analysis/diffChunks.d.ts +21 -0
  160. package/dist/analysis/diffChunks.d.ts.map +1 -0
  161. package/dist/analysis/diffChunks.js +302 -0
  162. package/dist/analysis/diffChunks.js.map +1 -0
  163. package/dist/analysis/extractRouteMap.d.ts +49 -0
  164. package/dist/analysis/extractRouteMap.d.ts.map +1 -0
  165. package/dist/analysis/extractRouteMap.js +354 -0
  166. package/dist/analysis/extractRouteMap.js.map +1 -0
  167. package/dist/analysis/generateFileInsight.d.ts +19 -0
  168. package/dist/analysis/generateFileInsight.d.ts.map +1 -0
  169. package/dist/analysis/generateFileInsight.js +103 -0
  170. package/dist/analysis/generateFileInsight.js.map +1 -0
  171. package/dist/analysis/llmXRay.d.ts +39 -0
  172. package/dist/analysis/llmXRay.d.ts.map +1 -0
  173. package/dist/analysis/llmXRay.js +208 -0
  174. package/dist/analysis/llmXRay.js.map +1 -0
  175. package/dist/analysis/simulateFailure.d.ts +44 -0
  176. package/dist/analysis/simulateFailure.d.ts.map +1 -0
  177. package/dist/analysis/simulateFailure.js +407 -0
  178. package/dist/analysis/simulateFailure.js.map +1 -0
  179. package/dist/anthropic.d.ts +3 -0
  180. package/dist/anthropic.d.ts.map +1 -0
  181. package/dist/anthropic.js +16 -0
  182. package/dist/anthropic.js.map +1 -0
  183. package/dist/app/buildAppPage.d.ts +34 -0
  184. package/dist/app/buildAppPage.d.ts.map +1 -0
  185. package/dist/app/buildAppPage.js +3085 -0
  186. package/dist/app/buildAppPage.js.map +1 -0
  187. package/dist/app-bundle.js +122 -0
  188. package/dist/buildAppData.d.ts +3 -0
  189. package/dist/buildAppData.d.ts.map +1 -0
  190. package/dist/buildAppData.js +207 -0
  191. package/dist/buildAppData.js.map +1 -0
  192. package/dist/builders/analyzeRepo.d.ts +25 -0
  193. package/dist/builders/analyzeRepo.d.ts.map +1 -0
  194. package/dist/builders/analyzeRepo.js +873 -0
  195. package/dist/builders/analyzeRepo.js.map +1 -0
  196. package/dist/builders/buildSystemConnections.d.ts +3 -0
  197. package/dist/builders/buildSystemConnections.d.ts.map +1 -0
  198. package/dist/builders/buildSystemConnections.js +388 -0
  199. package/dist/builders/buildSystemConnections.js.map +1 -0
  200. package/dist/builders/buildTextSummary.d.ts +61 -0
  201. package/dist/builders/buildTextSummary.d.ts.map +1 -0
  202. package/dist/builders/buildTextSummary.js +178 -0
  203. package/dist/builders/buildTextSummary.js.map +1 -0
  204. package/dist/builders/deriveRecommendedStartPath.d.ts +11 -0
  205. package/dist/builders/deriveRecommendedStartPath.d.ts.map +1 -0
  206. package/dist/builders/deriveRecommendedStartPath.js +140 -0
  207. package/dist/builders/deriveRecommendedStartPath.js.map +1 -0
  208. package/dist/builders/deriveRuntimeRole.d.ts +4 -0
  209. package/dist/builders/deriveRuntimeRole.d.ts.map +1 -0
  210. package/dist/builders/deriveRuntimeRole.js +30 -0
  211. package/dist/builders/deriveRuntimeRole.js.map +1 -0
  212. package/dist/builders/detectRunCommands.d.ts +16 -0
  213. package/dist/builders/detectRunCommands.d.ts.map +1 -0
  214. package/dist/builders/detectRunCommands.js +285 -0
  215. package/dist/builders/detectRunCommands.js.map +1 -0
  216. package/dist/builders/generateSystemNarrative.d.ts +12 -0
  217. package/dist/builders/generateSystemNarrative.d.ts.map +1 -0
  218. package/dist/builders/generateSystemNarrative.js +474 -0
  219. package/dist/builders/generateSystemNarrative.js.map +1 -0
  220. package/dist/builders/gitLogParser.d.ts +15 -0
  221. package/dist/builders/gitLogParser.d.ts.map +1 -0
  222. package/dist/builders/gitLogParser.js +116 -0
  223. package/dist/builders/gitLogParser.js.map +1 -0
  224. package/dist/builders/readRepoContext.d.ts +30 -0
  225. package/dist/builders/readRepoContext.d.ts.map +1 -0
  226. package/dist/builders/readRepoContext.js +323 -0
  227. package/dist/builders/readRepoContext.js.map +1 -0
  228. package/dist/builders/readSystemReadme.d.ts +39 -0
  229. package/dist/builders/readSystemReadme.d.ts.map +1 -0
  230. package/dist/builders/readSystemReadme.js +133 -0
  231. package/dist/builders/readSystemReadme.js.map +1 -0
  232. package/dist/builders/systemRanking.d.ts +24 -0
  233. package/dist/builders/systemRanking.d.ts.map +1 -0
  234. package/dist/builders/systemRanking.js +153 -0
  235. package/dist/builders/systemRanking.js.map +1 -0
  236. package/dist/cli.d.ts +3 -0
  237. package/dist/cli.d.ts.map +1 -0
  238. package/dist/cli.js +170 -0
  239. package/dist/cli.js.map +1 -0
  240. package/dist/detectors/applyRunnableConfidenceGate.d.ts +8 -0
  241. package/dist/detectors/applyRunnableConfidenceGate.d.ts.map +1 -0
  242. package/dist/detectors/applyRunnableConfidenceGate.js +166 -0
  243. package/dist/detectors/applyRunnableConfidenceGate.js.map +1 -0
  244. package/dist/detectors/classifySystemType.d.ts +17 -0
  245. package/dist/detectors/classifySystemType.d.ts.map +1 -0
  246. package/dist/detectors/classifySystemType.js +460 -0
  247. package/dist/detectors/classifySystemType.js.map +1 -0
  248. package/dist/detectors/detectAppInternalUnits.d.ts +20 -0
  249. package/dist/detectors/detectAppInternalUnits.d.ts.map +1 -0
  250. package/dist/detectors/detectAppInternalUnits.js +454 -0
  251. package/dist/detectors/detectAppInternalUnits.js.map +1 -0
  252. package/dist/detectors/detectBlocks.d.ts +6 -0
  253. package/dist/detectors/detectBlocks.d.ts.map +1 -0
  254. package/dist/detectors/detectBlocks.js +354 -0
  255. package/dist/detectors/detectBlocks.js.map +1 -0
  256. package/dist/detectors/detectComposeServices.d.ts +23 -0
  257. package/dist/detectors/detectComposeServices.d.ts.map +1 -0
  258. package/dist/detectors/detectComposeServices.js +255 -0
  259. package/dist/detectors/detectComposeServices.js.map +1 -0
  260. package/dist/detectors/detectEntryPoints.d.ts +6 -0
  261. package/dist/detectors/detectEntryPoints.d.ts.map +1 -0
  262. package/dist/detectors/detectEntryPoints.js +376 -0
  263. package/dist/detectors/detectEntryPoints.js.map +1 -0
  264. package/dist/detectors/detectSubsystems.d.ts +6 -0
  265. package/dist/detectors/detectSubsystems.d.ts.map +1 -0
  266. package/dist/detectors/detectSubsystems.js +376 -0
  267. package/dist/detectors/detectSubsystems.js.map +1 -0
  268. package/dist/detectors/detectSystemCandidates.d.ts +3 -0
  269. package/dist/detectors/detectSystemCandidates.d.ts.map +1 -0
  270. package/dist/detectors/detectSystemCandidates.js +577 -0
  271. package/dist/detectors/detectSystemCandidates.js.map +1 -0
  272. package/dist/devWatcher.d.ts +14 -0
  273. package/dist/devWatcher.d.ts.map +1 -0
  274. package/dist/devWatcher.js +96 -0
  275. package/dist/devWatcher.js.map +1 -0
  276. package/dist/graph/buildCodebaseGraph.d.ts +3 -0
  277. package/dist/graph/buildCodebaseGraph.d.ts.map +1 -0
  278. package/dist/graph/buildCodebaseGraph.js +602 -0
  279. package/dist/graph/buildCodebaseGraph.js.map +1 -0
  280. package/dist/graph/buildLLMPayload.d.ts +89 -0
  281. package/dist/graph/buildLLMPayload.d.ts.map +1 -0
  282. package/dist/graph/buildLLMPayload.js +715 -0
  283. package/dist/graph/buildLLMPayload.js.map +1 -0
  284. package/dist/graph/callLLM.d.ts +16 -0
  285. package/dist/graph/callLLM.d.ts.map +1 -0
  286. package/dist/graph/callLLM.js +274 -0
  287. package/dist/graph/callLLM.js.map +1 -0
  288. package/dist/graph/types.d.ts +76 -0
  289. package/dist/graph/types.d.ts.map +1 -0
  290. package/dist/graph/types.js +5 -0
  291. package/dist/graph/types.js.map +1 -0
  292. package/dist/graph/walkExports.d.ts +2 -0
  293. package/dist/graph/walkExports.d.ts.map +1 -0
  294. package/dist/graph/walkExports.js +172 -0
  295. package/dist/graph/walkExports.js.map +1 -0
  296. package/dist/heuristics/file-patterns.json +325 -0
  297. package/dist/heuristics/known-packages.json +1022 -0
  298. package/dist/heuristics/loader.d.ts +121 -0
  299. package/dist/heuristics/loader.d.ts.map +1 -0
  300. package/dist/heuristics/loader.js +196 -0
  301. package/dist/heuristics/loader.js.map +1 -0
  302. package/dist/heuristics/repo-mode-signals.json +248 -0
  303. package/dist/index.d.ts +3 -0
  304. package/dist/index.d.ts.map +1 -0
  305. package/dist/index.js +93 -0
  306. package/dist/index.js.map +1 -0
  307. package/dist/mcp.d.ts +3 -0
  308. package/dist/mcp.d.ts.map +1 -0
  309. package/dist/mcp.js +356 -0
  310. package/dist/mcp.js.map +1 -0
  311. package/dist/scanner/buildImportGraph.d.ts +23 -0
  312. package/dist/scanner/buildImportGraph.d.ts.map +1 -0
  313. package/dist/scanner/buildImportGraph.js +186 -0
  314. package/dist/scanner/buildImportGraph.js.map +1 -0
  315. package/dist/scanner/detectDBOps.d.ts +21 -0
  316. package/dist/scanner/detectDBOps.d.ts.map +1 -0
  317. package/dist/scanner/detectDBOps.js +346 -0
  318. package/dist/scanner/detectDBOps.js.map +1 -0
  319. package/dist/scanner/detectOutbound.d.ts +6 -0
  320. package/dist/scanner/detectOutbound.d.ts.map +1 -0
  321. package/dist/scanner/detectOutbound.js +101 -0
  322. package/dist/scanner/detectOutbound.js.map +1 -0
  323. package/dist/scanner/detectRepoPurpose.d.ts +19 -0
  324. package/dist/scanner/detectRepoPurpose.d.ts.map +1 -0
  325. package/dist/scanner/detectRepoPurpose.js +335 -0
  326. package/dist/scanner/detectRepoPurpose.js.map +1 -0
  327. package/dist/scanner/detectRoutes.d.ts +22 -0
  328. package/dist/scanner/detectRoutes.d.ts.map +1 -0
  329. package/dist/scanner/detectRoutes.js +406 -0
  330. package/dist/scanner/detectRoutes.js.map +1 -0
  331. package/dist/scanner/filterNoise.d.ts +4 -0
  332. package/dist/scanner/filterNoise.d.ts.map +1 -0
  333. package/dist/scanner/filterNoise.js +95 -0
  334. package/dist/scanner/filterNoise.js.map +1 -0
  335. package/dist/scanner/loadTsAliases.d.ts +20 -0
  336. package/dist/scanner/loadTsAliases.d.ts.map +1 -0
  337. package/dist/scanner/loadTsAliases.js +135 -0
  338. package/dist/scanner/loadTsAliases.js.map +1 -0
  339. package/dist/scanner/routeHandlers.d.ts +15 -0
  340. package/dist/scanner/routeHandlers.d.ts.map +1 -0
  341. package/dist/scanner/routeHandlers.js +154 -0
  342. package/dist/scanner/routeHandlers.js.map +1 -0
  343. package/dist/scanner/scanRepo.d.ts +10 -0
  344. package/dist/scanner/scanRepo.d.ts.map +1 -0
  345. package/dist/scanner/scanRepo.js +165 -0
  346. package/dist/scanner/scanRepo.js.map +1 -0
  347. package/dist/scanner/walkImports.d.ts +14 -0
  348. package/dist/scanner/walkImports.d.ts.map +1 -0
  349. package/dist/scanner/walkImports.js +162 -0
  350. package/dist/scanner/walkImports.js.map +1 -0
  351. package/dist/server.d.ts +2 -0
  352. package/dist/server.d.ts.map +1 -0
  353. package/dist/server.js +956 -0
  354. package/dist/server.js.map +1 -0
  355. package/dist/session/diff.d.ts +4 -0
  356. package/dist/session/diff.d.ts.map +1 -0
  357. package/dist/session/diff.js +150 -0
  358. package/dist/session/diff.js.map +1 -0
  359. package/dist/session/snapshot.d.ts +5 -0
  360. package/dist/session/snapshot.d.ts.map +1 -0
  361. package/dist/session/snapshot.js +114 -0
  362. package/dist/session/snapshot.js.map +1 -0
  363. package/dist/session/store.d.ts +8 -0
  364. package/dist/session/store.d.ts.map +1 -0
  365. package/dist/session/store.js +101 -0
  366. package/dist/session/store.js.map +1 -0
  367. package/dist/session/types.d.ts +46 -0
  368. package/dist/session/types.d.ts.map +1 -0
  369. package/dist/session/types.js +4 -0
  370. package/dist/session/types.js.map +1 -0
  371. package/dist/types.d.ts +350 -0
  372. package/dist/types.d.ts.map +1 -0
  373. package/dist/types.js +4 -0
  374. package/dist/types.js.map +1 -0
  375. package/dist/utils/file.d.ts +5 -0
  376. package/dist/utils/file.d.ts.map +1 -0
  377. package/dist/utils/file.js +76 -0
  378. package/dist/utils/file.js.map +1 -0
  379. package/dist/utils/path.d.ts +7 -0
  380. package/dist/utils/path.d.ts.map +1 -0
  381. package/dist/utils/path.js +62 -0
  382. package/dist/utils/path.js.map +1 -0
  383. package/dist/utils/text.d.ts +5 -0
  384. package/dist/utils/text.d.ts.map +1 -0
  385. package/dist/utils/text.js +29 -0
  386. package/dist/utils/text.js.map +1 -0
  387. package/dist/viewBuilders/buildSystemFolders.d.ts +39 -0
  388. package/dist/viewBuilders/buildSystemFolders.d.ts.map +1 -0
  389. package/dist/viewBuilders/buildSystemFolders.js +198 -0
  390. package/dist/viewBuilders/buildSystemFolders.js.map +1 -0
  391. package/dist/watcher/repoWatcher.d.ts +17 -0
  392. package/dist/watcher/repoWatcher.d.ts.map +1 -0
  393. package/dist/watcher/repoWatcher.js +87 -0
  394. package/dist/watcher/repoWatcher.js.map +1 -0
  395. package/package.json +102 -0
  396. package/public/memor_logo.svg +18 -0
  397. package/public/memor_transparent_logo.svg +25 -0
  398. package/public/tIcons/bun.svg +1 -0
  399. package/public/tIcons/css.svg +1 -0
  400. package/public/tIcons/docker.svg +3 -0
  401. package/public/tIcons/expressjs.svg +1 -0
  402. package/public/tIcons/html5.svg +6 -0
  403. package/public/tIcons/javascript.svg +1 -0
  404. package/public/tIcons/jest.svg +4 -0
  405. package/public/tIcons/json.svg +1 -0
  406. package/public/tIcons/markdown-light.svg +1 -0
  407. package/public/tIcons/nestjs.svg +1 -0
  408. package/public/tIcons/nextjs_icon_dark.svg +1 -0
  409. package/public/tIcons/npm.svg +1 -0
  410. package/public/tIcons/pnpm.svg +1 -0
  411. package/public/tIcons/prisma.svg +1 -0
  412. package/public/tIcons/react_dark.svg +11 -0
  413. package/public/tIcons/supabase.svg +15 -0
  414. package/public/tIcons/tailwindcss.svg +1 -0
  415. package/public/tIcons/turborepo-icon-light.svg +1 -0
  416. package/public/tIcons/typescript.svg +1 -0
  417. package/public/tIcons/vite.svg +1 -0
  418. package/public/tIcons/yarn.svg +1 -0
@@ -0,0 +1,172 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.walkExports = walkExports;
37
+ /**
38
+ * walkExports — parse a single JS/TS source file and return all exported identifiers.
39
+ * Uses @babel/parser (same as walkImports) for accurate AST parsing.
40
+ *
41
+ * Extracts:
42
+ * export function foo() → "foo"
43
+ * export const bar = ... → "bar"
44
+ * export class Baz → "Baz"
45
+ * export type X = ... → "X"
46
+ * export interface Y → "Y"
47
+ * export enum Z → "Z"
48
+ * export { a, b } from './x' → "a", "b"
49
+ * export default class Foo → "Foo"
50
+ * export default function foo → "foo"
51
+ */
52
+ const fs = __importStar(require("fs/promises"));
53
+ const path = __importStar(require("path"));
54
+ const parser_1 = require("@babel/parser");
55
+ const PARSEABLE_EXTS = new Set([".js", ".jsx", ".ts", ".tsx", ".mjs", ".cjs"]);
56
+ const MAX_FILE_SIZE = 512_000;
57
+ function extractIdentifier(node) {
58
+ if (!node || typeof node !== "object")
59
+ return null;
60
+ const n = node;
61
+ if (n["type"] === "Identifier" && typeof n["name"] === "string")
62
+ return n["name"];
63
+ return null;
64
+ }
65
+ function collectExportNames(node, result) {
66
+ if (!node || typeof node !== "object")
67
+ return;
68
+ const n = node;
69
+ const t = n["type"];
70
+ // export function foo / export class Foo / export const bar
71
+ if (t === "ExportNamedDeclaration") {
72
+ const decl = n["declaration"];
73
+ if (decl) {
74
+ const dt = decl["type"];
75
+ // export function foo / export class Foo / export enum Foo
76
+ if (dt === "FunctionDeclaration" ||
77
+ dt === "ClassDeclaration" ||
78
+ dt === "TSEnumDeclaration" ||
79
+ dt === "TSInterfaceDeclaration") {
80
+ const id = extractIdentifier(decl["id"]);
81
+ if (id)
82
+ result.add(id);
83
+ }
84
+ // export type Foo = ... / export interface Foo
85
+ if (dt === "TSTypeAliasDeclaration") {
86
+ const id = extractIdentifier(decl["id"]);
87
+ if (id)
88
+ result.add(id);
89
+ }
90
+ // export const foo = ... / export let bar = ...
91
+ if (dt === "VariableDeclaration") {
92
+ const declarations = decl["declarations"] ?? [];
93
+ for (const d of declarations) {
94
+ const id = extractIdentifier(d["id"]);
95
+ if (id)
96
+ result.add(id);
97
+ }
98
+ }
99
+ }
100
+ // export { a, b } or export { a as b }
101
+ const specifiers = n["specifiers"] ?? [];
102
+ for (const spec of specifiers) {
103
+ // Use exported name (not local name)
104
+ const exported = extractIdentifier(spec["exported"]);
105
+ if (exported && exported !== "default")
106
+ result.add(exported);
107
+ }
108
+ return;
109
+ }
110
+ // export default class Foo / export default function foo
111
+ if (t === "ExportDefaultDeclaration") {
112
+ const decl = n["declaration"];
113
+ if (decl) {
114
+ const id = extractIdentifier(decl["id"]);
115
+ if (id)
116
+ result.add(id);
117
+ }
118
+ return;
119
+ }
120
+ // Recurse into children (only top-level program body needed)
121
+ for (const key of Object.keys(n)) {
122
+ if (key === "loc" || key === "start" || key === "end" || key === "extra")
123
+ continue;
124
+ const child = n[key];
125
+ if (Array.isArray(child)) {
126
+ for (const item of child)
127
+ collectExportNames(item, result);
128
+ }
129
+ else if (child && typeof child === "object" && "type" in child) {
130
+ collectExportNames(child, result);
131
+ }
132
+ }
133
+ }
134
+ async function walkExports(absoluteFilePath) {
135
+ const ext = path.extname(absoluteFilePath).toLowerCase();
136
+ if (!PARSEABLE_EXTS.has(ext))
137
+ return [];
138
+ let source;
139
+ try {
140
+ const stat = await fs.stat(absoluteFilePath);
141
+ if (stat.size > MAX_FILE_SIZE)
142
+ return [];
143
+ source = await fs.readFile(absoluteFilePath, "utf8");
144
+ }
145
+ catch {
146
+ return [];
147
+ }
148
+ let ast;
149
+ try {
150
+ ast = (0, parser_1.parse)(source, {
151
+ sourceType: "module",
152
+ plugins: ["typescript", "jsx", "decorators-legacy"],
153
+ errorRecovery: true,
154
+ });
155
+ }
156
+ catch {
157
+ try {
158
+ ast = (0, parser_1.parse)(source, {
159
+ sourceType: "unambiguous",
160
+ plugins: ["jsx"],
161
+ errorRecovery: true,
162
+ });
163
+ }
164
+ catch {
165
+ return [];
166
+ }
167
+ }
168
+ const result = new Set();
169
+ collectExportNames(ast.program, result);
170
+ return [...result];
171
+ }
172
+ //# sourceMappingURL=walkExports.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"walkExports.js","sourceRoot":"","sources":["../../src/graph/walkExports.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqGA,kCAmCC;AAxID;;;;;;;;;;;;;;GAcG;AACH,gDAAkC;AAClC,2CAA6B;AAC7B,0CAAsC;AAEtC,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAC/E,MAAM,aAAa,GAAG,OAAO,CAAC;AAI9B,SAAS,iBAAiB,CAAC,IAAa;IACtC,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,K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gBAChB,aAAa,EAAE,IAAI;aACpB,CAAC,CAAC;QACL,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC;IAED,MAAM,MAAM,GAAG,IAAI,GAAG,EAAU,CAAC;IACjC,kBAAkB,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACxC,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC;AACrB,CAAC"}
@@ -0,0 +1,325 @@
1
+ {
2
+ "_meta": {
3
+ "version": "1.0.0",
4
+ "scope": "JS/TS ecosystem — file and directory patterns that signal system archetypes",
5
+ "how": "Each archetype has signals. Each signal has a weight. Signals accumulate. If total >= minScore, archetype is detected.",
6
+ "signalTypes": {
7
+ "file-exists": "A specific file exists at this path (relative to system root)",
8
+ "file-pattern": "Any file matching this glob pattern exists",
9
+ "dir-exists": "A directory with this name exists anywhere in the system",
10
+ "dir-at-root": "A directory with this name exists at the system root level",
11
+ "file-count": "At least N files matching pattern exist",
12
+ "dep-runtime": "Package is in dependencies{} — use known-packages.json for dep matching",
13
+ "no-signal": "This signal's ABSENCE increases the score (inverted)"
14
+ }
15
+ },
16
+ "archetypes": {
17
+ "compiler-framework": {
18
+ "label": "Compiler / Parser / Transform Framework",
19
+ "typeHint": "compiler-framework",
20
+ "minScore": 0.55,
21
+ "signals": [
22
+ { "type": "dir-at-root", "name": "compiler", "weight": 0.35, "note": "src/compiler/ or compiler/ at root" },
23
+ { "type": "dir-at-root", "name": "parse", "weight": 0.30 },
24
+ { "type": "dir-at-root", "name": "transform", "weight": 0.25 },
25
+ { "type": "dir-exists", "name": "codegen", "weight": 0.20 },
26
+ { "type": "dir-exists", "name": "ast", "weight": 0.20 },
27
+ { "type": "file-pattern", "pattern": "**/compiler.ts", "weight": 0.30 },
28
+ { "type": "file-pattern", "pattern": "**/parser.ts", "weight": 0.25 },
29
+ { "type": "file-pattern", "pattern": "**/transform.ts", "weight": 0.20 },
30
+ { "type": "file-pattern", "pattern": "**/tokenizer.ts", "weight": 0.25 },
31
+ { "type": "file-pattern", "pattern": "**/lexer.ts", "weight": 0.25 },
32
+ { "type": "file-pattern", "pattern": "**/codegen.ts", "weight": 0.20 },
33
+ { "type": "file-count", "pattern": "src/compiler/**/*.ts", "min": 10, "weight": 0.40 },
34
+ { "type": "file-count", "pattern": "src/**/*.ts", "min": 50, "weight": 0.15, "note": "Large TS surface suggests real framework, not a simple package" }
35
+ ]
36
+ },
37
+ "ui-component-library": {
38
+ "label": "UI Component Library",
39
+ "typeHint": "ui-library",
40
+ "minScore": 0.50,
41
+ "signals": [
42
+ { "type": "dir-exists", "name": "components", "weight": 0.20 },
43
+ { "type": "dir-at-root", "name": "packages", "weight": 0.15 },
44
+ { "type": "file-count", "pattern": "**/*.stories.tsx", "min": 5, "weight": 0.30 },
45
+ { "type": "file-count", "pattern": "**/*.stories.jsx", "min": 5, "weight": 0.30 },
46
+ { "type": "file-count", "pattern": "**/*.stories.ts", "min": 5, "weight": 0.25 },
47
+ { "type": "file-count", "pattern": "**/index.ts", "min": 10, "weight": 0.15, "note": "Many index.ts = many exported components" },
48
+ { "type": "dir-exists", "name": "primitives", "weight": 0.20, "note": "Radix-style primitive dir" },
49
+ { "type": "dir-exists", "name": "tokens", "weight": 0.15 },
50
+ { "type": "file-exists", "path": ".storybook/main.ts", "weight": 0.25 },
51
+ { "type": "file-exists", "path": ".storybook/main.js", "weight": 0.25 },
52
+ { "type": "no-signal", "signal": "has-entry-point-main-tsx", "weight": 0.10, "note": "No src/main.tsx = not a runnable app, more likely a library" }
53
+ ]
54
+ },
55
+ "design-system": {
56
+ "label": "Design System with Component Library",
57
+ "typeHint": "design-system",
58
+ "minScore": 0.60,
59
+ "signals": [
60
+ { "type": "dir-exists", "name": "tokens", "weight": 0.30 },
61
+ { "type": "dir-exists", "name": "foundations", "weight": 0.20 },
62
+ { "type": "dir-exists", "name": "primitives", "weight": 0.20 },
63
+ { "type": "file-pattern", "pattern": "**/design-tokens*", "weight": 0.30 },
64
+ { "type": "file-pattern", "pattern": "**/tokens.json", "weight": 0.25 },
65
+ { "type": "file-count", "pattern": "**/*.stories.*", "min": 20, "weight": 0.25 },
66
+ { "type": "file-exists", "path": "style-dictionary.config.js", "weight": 0.35 },
67
+ { "type": "file-exists", "path": "style-dictionary.config.ts", "weight": 0.35 },
68
+ { "type": "file-exists", "path": ".storybook/main.ts", "weight": 0.15 }
69
+ ]
70
+ },
71
+ "e2e-test-suite": {
72
+ "label": "End-to-End Test Suite",
73
+ "typeHint": "e2e-testing-suite",
74
+ "minScore": 0.55,
75
+ "signals": [
76
+ { "type": "dir-at-root", "name": "cypress", "weight": 0.40 },
77
+ { "type": "dir-at-root", "name": "e2e", "weight": 0.30 },
78
+ { "type": "dir-at-root", "name": "playwright", "weight": 0.35 },
79
+ { "type": "file-exists", "path": "cypress.config.ts", "weight": 0.45 },
80
+ { "type": "file-exists", "path": "cypress.config.js", "weight": 0.45 },
81
+ { "type": "file-exists", "path": "playwright.config.ts", "weight": 0.45 },
82
+ { "type": "file-exists", "path": "playwright.config.js", "weight": 0.45 },
83
+ { "type": "file-count", "pattern": "**/*.cy.ts", "min": 5, "weight": 0.40, "note": ".cy.* files are unambiguously Cypress — .spec.* are NOT" },
84
+ { "type": "file-count", "pattern": "**/*.cy.tsx", "min": 5, "weight": 0.40 },
85
+ { "type": "file-count", "pattern": "**/*.cy.js", "min": 5, "weight": 0.35 },
86
+ { "type": "file-count", "pattern": "**/*.spec.ts", "min": 50, "weight": 0.10, "note": ".spec.ts is weak — could be Vitest. Only count if very high and combined with other e2e signals" }
87
+ ]
88
+ },
89
+ "storybook-component-library": {
90
+ "label": "Component Library Powered by Storybook",
91
+ "typeHint": "storybook-component-library",
92
+ "minScore": 0.55,
93
+ "signals": [
94
+ { "type": "file-exists", "path": ".storybook/main.ts", "weight": 0.40 },
95
+ { "type": "file-exists", "path": ".storybook/main.js", "weight": 0.40 },
96
+ { "type": "dir-exists", "name": ".storybook", "weight": 0.30 },
97
+ { "type": "file-count", "pattern": "**/*.stories.tsx", "min": 3, "weight": 0.35 },
98
+ { "type": "file-count", "pattern": "**/*.stories.jsx", "min": 3, "weight": 0.35 },
99
+ { "type": "file-count", "pattern": "**/*.stories.tsx", "min": 20, "weight": 0.20, "note": "Extra weight for high story count" },
100
+ { "type": "file-count", "pattern": "**/*.stories.mdx", "min": 5, "weight": 0.25 }
101
+ ]
102
+ },
103
+ "next-app": {
104
+ "label": "Next.js Application",
105
+ "typeHint": "web-app",
106
+ "minScore": 0.55,
107
+ "signals": [
108
+ { "type": "file-exists", "path": "next.config.js", "weight": 0.55 },
109
+ { "type": "file-exists", "path": "next.config.ts", "weight": 0.55 },
110
+ { "type": "file-exists", "path": "next.config.mjs", "weight": 0.55 },
111
+ { "type": "dir-at-root", "name": "app", "weight": 0.30, "note": "App Router — but 'app/' dir alone is not enough" },
112
+ { "type": "dir-at-root", "name": "pages", "weight": 0.30, "note": "Pages Router" },
113
+ { "type": "file-pattern", "pattern": "app/**/page.tsx", "weight": 0.40 },
114
+ { "type": "file-pattern", "pattern": "app/**/page.jsx", "weight": 0.40 },
115
+ { "type": "file-pattern", "pattern": "pages/_app.tsx", "weight": 0.45 },
116
+ { "type": "file-pattern", "pattern": "pages/_app.jsx", "weight": 0.45 },
117
+ { "type": "file-pattern", "pattern": "pages/index.tsx", "weight": 0.35 },
118
+ { "type": "file-pattern", "pattern": "src/app/**/page.tsx", "weight": 0.40 }
119
+ ]
120
+ },
121
+ "vite-spa": {
122
+ "label": "Vite SPA / Frontend App",
123
+ "typeHint": "web-app",
124
+ "minScore": 0.60,
125
+ "signals": [
126
+ { "type": "file-exists", "path": "vite.config.ts", "weight": 0.30 },
127
+ { "type": "file-exists", "path": "vite.config.js", "weight": 0.30 },
128
+ { "type": "file-exists", "path": "index.html", "weight": 0.40, "note": "Vite needs an HTML shell" },
129
+ { "type": "file-exists", "path": "src/index.html", "weight": 0.35 },
130
+ { "type": "file-exists", "path": "src/main.tsx", "weight": 0.45 },
131
+ { "type": "file-exists", "path": "src/main.jsx", "weight": 0.45 },
132
+ { "type": "file-exists", "path": "src/main.ts", "weight": 0.35 },
133
+ { "type": "file-exists", "path": "src/App.tsx", "weight": 0.30 },
134
+ { "type": "file-exists", "path": "src/App.jsx", "weight": 0.30 }
135
+ ]
136
+ },
137
+ "nestjs-api": {
138
+ "label": "NestJS API Service",
139
+ "typeHint": "api-service",
140
+ "minScore": 0.55,
141
+ "signals": [
142
+ { "type": "file-exists", "path": "nest-cli.json", "weight": 0.60 },
143
+ { "type": "file-pattern", "pattern": "src/app.module.ts", "weight": 0.50 },
144
+ { "type": "file-pattern", "pattern": "src/main.ts", "weight": 0.20 },
145
+ { "type": "dir-exists", "name": "controllers", "weight": 0.25 },
146
+ { "type": "dir-exists", "name": "modules", "weight": 0.20 },
147
+ { "type": "file-pattern", "pattern": "**/*.controller.ts", "weight": 0.40 },
148
+ { "type": "file-pattern", "pattern": "**/*.module.ts", "weight": 0.35 },
149
+ { "type": "file-pattern", "pattern": "**/*.service.ts", "weight": 0.20 },
150
+ { "type": "file-count", "pattern": "**/*.controller.ts", "min": 3, "weight": 0.20 }
151
+ ]
152
+ },
153
+ "express-api": {
154
+ "label": "Express API Service",
155
+ "typeHint": "api-service",
156
+ "minScore": 0.50,
157
+ "signals": [
158
+ { "type": "dir-exists", "name": "routes", "weight": 0.30 },
159
+ { "type": "dir-exists", "name": "controllers", "weight": 0.25 },
160
+ { "type": "dir-exists", "name": "middleware", "weight": 0.20 },
161
+ { "type": "file-pattern", "pattern": "src/app.ts", "weight": 0.20 },
162
+ { "type": "file-pattern", "pattern": "src/server.ts", "weight": 0.25 },
163
+ { "type": "file-pattern", "pattern": "src/index.ts", "weight": 0.10 },
164
+ { "type": "file-pattern", "pattern": "routes/*.ts", "weight": 0.30 },
165
+ { "type": "file-pattern", "pattern": "routes/*.js", "weight": 0.30 }
166
+ ]
167
+ },
168
+ "electron-app": {
169
+ "label": "Electron Desktop Application",
170
+ "typeHint": "desktop-app",
171
+ "minScore": 0.60,
172
+ "signals": [
173
+ { "type": "file-pattern", "pattern": "src/main.ts", "weight": 0.15 },
174
+ { "type": "file-pattern", "pattern": "electron/main.ts", "weight": 0.45 },
175
+ { "type": "file-pattern", "pattern": "electron/main.js", "weight": 0.45 },
176
+ { "type": "dir-exists", "name": "electron", "weight": 0.40 },
177
+ { "type": "file-exists", "path": "electron-builder.yml", "weight": 0.50 },
178
+ { "type": "file-exists", "path": "electron-builder.json", "weight": 0.50 }
179
+ ]
180
+ },
181
+ "cli-tool": {
182
+ "label": "CLI / Developer Tool",
183
+ "typeHint": "developer-tooling",
184
+ "minScore": 0.50,
185
+ "signals": [
186
+ { "type": "dir-at-root", "name": "bin", "weight": 0.35 },
187
+ { "type": "dir-exists", "name": "commands", "weight": 0.30 },
188
+ { "type": "file-pattern", "pattern": "bin/*.ts", "weight": 0.40 },
189
+ { "type": "file-pattern", "pattern": "bin/*.js", "weight": 0.40 },
190
+ { "type": "file-pattern", "pattern": "bin/*.mjs", "weight": 0.35 },
191
+ { "type": "file-exists", "path": "src/cli.ts", "weight": 0.35 },
192
+ { "type": "file-exists", "path": "src/cli.js", "weight": 0.35 },
193
+ { "type": "file-pattern", "pattern": "src/commands/*.ts", "weight": 0.30 }
194
+ ]
195
+ },
196
+ "shared-package": {
197
+ "label": "Shared Package / Library",
198
+ "typeHint": "shared-package",
199
+ "minScore": 0.55,
200
+ "signals": [
201
+ { "type": "file-exists", "path": "src/index.ts", "weight": 0.20 },
202
+ { "type": "file-exists", "path": "src/index.js", "weight": 0.20 },
203
+ { "type": "file-exists", "path": "index.ts", "weight": 0.15 },
204
+ { "type": "file-exists", "path": "index.js", "weight": 0.15 },
205
+ { "type": "dir-at-root", "name": "src", "weight": 0.10 },
206
+ { "type": "no-signal", "signal": "has-vite-config", "weight": 0.15, "note": "No vite.config = likely not a runnable app" },
207
+ { "type": "no-signal", "signal": "has-next-config", "weight": 0.15 },
208
+ { "type": "no-signal", "signal": "has-index-html", "weight": 0.20 }
209
+ ]
210
+ },
211
+ "docs-site": {
212
+ "label": "Documentation Site",
213
+ "typeHint": "docs-site",
214
+ "minScore": 0.60,
215
+ "signals": [
216
+ { "type": "file-count", "pattern": "**/*.md", "min": 20, "weight": 0.20 },
217
+ { "type": "file-count", "pattern": "**/*.mdx", "min": 10, "weight": 0.30 },
218
+ { "type": "dir-at-root", "name": "docs", "weight": 0.20 },
219
+ { "type": "dir-at-root", "name": "content", "weight": 0.15 },
220
+ { "type": "file-exists", "path": "docusaurus.config.js", "weight": 0.55 },
221
+ { "type": "file-exists", "path": "docusaurus.config.ts", "weight": 0.55 },
222
+ { "type": "file-exists", "path": ".vitepress/config.ts", "weight": 0.55 },
223
+ { "type": "file-exists", "path": ".vitepress/config.js", "weight": 0.55 },
224
+ { "type": "no-signal", "signal": "has-src-dir", "weight": 0.15, "note": "A docs site alongside a large src/ is just project docs, not a docs product" }
225
+ ]
226
+ },
227
+ "worker-service": {
228
+ "label": "Background Worker / Queue Consumer",
229
+ "typeHint": "worker",
230
+ "minScore": 0.50,
231
+ "signals": [
232
+ { "type": "dir-at-root", "name": "workers", "weight": 0.35 },
233
+ { "type": "dir-at-root", "name": "jobs", "weight": 0.30 },
234
+ { "type": "dir-at-root", "name": "queues", "weight": 0.30 },
235
+ { "type": "dir-at-root", "name": "consumers", "weight": 0.30 },
236
+ { "type": "file-pattern", "pattern": "**/*.worker.ts", "weight": 0.35 },
237
+ { "type": "file-pattern", "pattern": "**/*.worker.js", "weight": 0.35 },
238
+ { "type": "file-pattern", "pattern": "src/workers/*.ts", "weight": 0.35 },
239
+ { "type": "file-pattern", "pattern": "src/jobs/*.ts", "weight": 0.30 }
240
+ ]
241
+ },
242
+ "infra-repo": {
243
+ "label": "Infrastructure Repository",
244
+ "typeHint": "infra",
245
+ "minScore": 0.60,
246
+ "signals": [
247
+ { "type": "file-exists", "path": "Dockerfile", "weight": 0.40 },
248
+ { "type": "file-exists", "path": "docker-compose.yml", "weight": 0.40 },
249
+ { "type": "file-exists", "path": "docker-compose.yaml", "weight": 0.40 },
250
+ { "type": "dir-at-root", "name": "terraform", "weight": 0.50 },
251
+ { "type": "dir-at-root", "name": "k8s", "weight": 0.45 },
252
+ { "type": "dir-at-root", "name": "kubernetes", "weight": 0.45 },
253
+ { "type": "dir-at-root", "name": "helm", "weight": 0.45 },
254
+ { "type": "file-pattern", "pattern": "**/*.tf", "weight": 0.50 },
255
+ { "type": "file-pattern", "pattern": "**/*.tfvars", "weight": 0.45 }
256
+ ]
257
+ }
258
+ },
259
+ "subsystem-patterns": {
260
+ "_note": "These patterns identify subsystems WITHIN a system, not the system itself",
261
+ "auth-subsystem": {
262
+ "label": "Authentication & Authorization",
263
+ "signals": [
264
+ { "type": "dir-exists", "name": "auth", "weight": 0.50 },
265
+ { "type": "dir-exists", "name": "authentication", "weight": 0.50 },
266
+ { "type": "dir-exists", "name": "authorization", "weight": 0.45 },
267
+ { "type": "file-pattern", "pattern": "**/auth/**/*.ts", "weight": 0.35 },
268
+ { "type": "file-pattern", "pattern": "**/*.guard.ts", "weight": 0.30 },
269
+ { "type": "file-pattern", "pattern": "**/jwt*.ts", "weight": 0.25 },
270
+ { "type": "file-pattern", "pattern": "**/passport*.ts", "weight": 0.25 }
271
+ ]
272
+ },
273
+ "database-subsystem": {
274
+ "label": "Database / Data Access",
275
+ "signals": [
276
+ { "type": "dir-exists", "name": "db", "weight": 0.40 },
277
+ { "type": "dir-exists", "name": "database", "weight": 0.40 },
278
+ { "type": "dir-exists", "name": "migrations", "weight": 0.35 },
279
+ { "type": "dir-exists", "name": "repositories", "weight": 0.35 },
280
+ { "type": "file-exists", "path": "prisma/schema.prisma", "weight": 0.50 },
281
+ { "type": "file-pattern", "pattern": "**/*.repository.ts", "weight": 0.30 },
282
+ { "type": "file-pattern", "pattern": "**/migrations/*.ts", "weight": 0.35 },
283
+ { "type": "file-pattern", "pattern": "**/migrations/*.sql", "weight": 0.40 }
284
+ ]
285
+ },
286
+ "api-routes-subsystem": {
287
+ "label": "API Routes / Controllers",
288
+ "signals": [
289
+ { "type": "dir-exists", "name": "routes", "weight": 0.40 },
290
+ { "type": "dir-exists", "name": "controllers", "weight": 0.40 },
291
+ { "type": "dir-exists", "name": "handlers", "weight": 0.35 },
292
+ { "type": "file-pattern", "pattern": "**/*.controller.ts", "weight": 0.35 },
293
+ { "type": "file-pattern", "pattern": "**/*.router.ts", "weight": 0.30 },
294
+ { "type": "file-pattern", "pattern": "routes/**/*.ts", "weight": 0.35 }
295
+ ]
296
+ },
297
+ "config-subsystem": {
298
+ "label": "Configuration",
299
+ "signals": [
300
+ { "type": "dir-exists", "name": "config", "weight": 0.40 },
301
+ { "type": "dir-exists", "name": "configs", "weight": 0.35 },
302
+ { "type": "file-pattern", "pattern": "**/config/*.ts", "weight": 0.25 },
303
+ { "type": "file-pattern", "pattern": "**/*.config.ts", "weight": 0.15 }
304
+ ]
305
+ },
306
+ "queue-subsystem": {
307
+ "label": "Queue / Background Jobs",
308
+ "signals": [
309
+ { "type": "dir-exists", "name": "queues", "weight": 0.45 },
310
+ { "type": "dir-exists", "name": "jobs", "weight": 0.40 },
311
+ { "type": "dir-exists", "name": "workers", "weight": 0.40 },
312
+ { "type": "file-pattern", "pattern": "**/*.processor.ts", "weight": 0.35 },
313
+ { "type": "file-pattern", "pattern": "**/*.consumer.ts", "weight": 0.35 },
314
+ { "type": "file-pattern", "pattern": "**/*.job.ts", "weight": 0.30 }
315
+ ]
316
+ },
317
+ "feature-module": {
318
+ "label": "Feature Module",
319
+ "signals": [
320
+ { "type": "file-pattern", "pattern": "**/*.module.ts", "weight": 0.35 },
321
+ { "type": "file-pattern", "pattern": "**/index.ts", "weight": 0.10 }
322
+ ]
323
+ }
324
+ }
325
+ }