spectra-cli 4.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1147) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +350 -0
  3. package/dist/adapters/go-adapter.d.ts +38 -0
  4. package/dist/adapters/go-adapter.d.ts.map +1 -0
  5. package/dist/adapters/go-adapter.js +58 -0
  6. package/dist/adapters/go-adapter.js.map +1 -0
  7. package/dist/adapters/index.d.ts +21 -0
  8. package/dist/adapters/index.d.ts.map +1 -0
  9. package/dist/adapters/index.js +36 -0
  10. package/dist/adapters/index.js.map +1 -0
  11. package/dist/adapters/java-adapter.d.ts +39 -0
  12. package/dist/adapters/java-adapter.d.ts.map +1 -0
  13. package/dist/adapters/java-adapter.js +65 -0
  14. package/dist/adapters/java-adapter.js.map +1 -0
  15. package/dist/adapters/language-adapter-registry.d.ts +56 -0
  16. package/dist/adapters/language-adapter-registry.d.ts.map +1 -0
  17. package/dist/adapters/language-adapter-registry.js +110 -0
  18. package/dist/adapters/language-adapter-registry.js.map +1 -0
  19. package/dist/adapters/language-adapter.d.ts +127 -0
  20. package/dist/adapters/language-adapter.d.ts.map +1 -0
  21. package/dist/adapters/language-adapter.js +2 -0
  22. package/dist/adapters/language-adapter.js.map +1 -0
  23. package/dist/adapters/python-adapter.d.ts +61 -0
  24. package/dist/adapters/python-adapter.d.ts.map +1 -0
  25. package/dist/adapters/python-adapter.js +260 -0
  26. package/dist/adapters/python-adapter.js.map +1 -0
  27. package/dist/adapters/tree-sitter-comment-extractor.d.ts +15 -0
  28. package/dist/adapters/tree-sitter-comment-extractor.d.ts.map +1 -0
  29. package/dist/adapters/tree-sitter-comment-extractor.js +105 -0
  30. package/dist/adapters/tree-sitter-comment-extractor.js.map +1 -0
  31. package/dist/adapters/ts-js-adapter.d.ts +38 -0
  32. package/dist/adapters/ts-js-adapter.d.ts.map +1 -0
  33. package/dist/adapters/ts-js-adapter.js +164 -0
  34. package/dist/adapters/ts-js-adapter.js.map +1 -0
  35. package/dist/auth/auth-detector.d.ts +41 -0
  36. package/dist/auth/auth-detector.d.ts.map +1 -0
  37. package/dist/auth/auth-detector.js +324 -0
  38. package/dist/auth/auth-detector.js.map +1 -0
  39. package/dist/auth/cli-proxy.d.ts +35 -0
  40. package/dist/auth/cli-proxy.d.ts.map +1 -0
  41. package/dist/auth/cli-proxy.js +225 -0
  42. package/dist/auth/cli-proxy.js.map +1 -0
  43. package/dist/auth/codex-proxy.d.ts +22 -0
  44. package/dist/auth/codex-proxy.d.ts.map +1 -0
  45. package/dist/auth/codex-proxy.js +199 -0
  46. package/dist/auth/codex-proxy.js.map +1 -0
  47. package/dist/batch/batch-orchestrator.d.ts +214 -0
  48. package/dist/batch/batch-orchestrator.d.ts.map +1 -0
  49. package/dist/batch/batch-orchestrator.js +1552 -0
  50. package/dist/batch/batch-orchestrator.js.map +1 -0
  51. package/dist/batch/batch-readme-generator.d.ts +32 -0
  52. package/dist/batch/batch-readme-generator.d.ts.map +1 -0
  53. package/dist/batch/batch-readme-generator.js +153 -0
  54. package/dist/batch/batch-readme-generator.js.map +1 -0
  55. package/dist/batch/budget-gate.d.ts +107 -0
  56. package/dist/batch/budget-gate.d.ts.map +1 -0
  57. package/dist/batch/budget-gate.js +279 -0
  58. package/dist/batch/budget-gate.js.map +1 -0
  59. package/dist/batch/checkpoint.d.ts +25 -0
  60. package/dist/batch/checkpoint.d.ts.map +1 -0
  61. package/dist/batch/checkpoint.js +68 -0
  62. package/dist/batch/checkpoint.js.map +1 -0
  63. package/dist/batch/cost-summary.d.ts +78 -0
  64. package/dist/batch/cost-summary.d.ts.map +1 -0
  65. package/dist/batch/cost-summary.js +191 -0
  66. package/dist/batch/cost-summary.js.map +1 -0
  67. package/dist/batch/delta-regenerator.d.ts +41 -0
  68. package/dist/batch/delta-regenerator.d.ts.map +1 -0
  69. package/dist/batch/delta-regenerator.js +267 -0
  70. package/dist/batch/delta-regenerator.js.map +1 -0
  71. package/dist/batch/directory-classifier.d.ts +79 -0
  72. package/dist/batch/directory-classifier.d.ts.map +1 -0
  73. package/dist/batch/directory-classifier.js +270 -0
  74. package/dist/batch/directory-classifier.js.map +1 -0
  75. package/dist/batch/language-grouper.d.ts +28 -0
  76. package/dist/batch/language-grouper.d.ts.map +1 -0
  77. package/dist/batch/language-grouper.js +67 -0
  78. package/dist/batch/language-grouper.js.map +1 -0
  79. package/dist/batch/model-override-decision.d.ts +27 -0
  80. package/dist/batch/model-override-decision.d.ts.map +1 -0
  81. package/dist/batch/model-override-decision.js +14 -0
  82. package/dist/batch/model-override-decision.js.map +1 -0
  83. package/dist/batch/module-grouper.d.ts +59 -0
  84. package/dist/batch/module-grouper.d.ts.map +1 -0
  85. package/dist/batch/module-grouper.js +286 -0
  86. package/dist/batch/module-grouper.js.map +1 -0
  87. package/dist/batch/progress-reporter.d.ts +68 -0
  88. package/dist/batch/progress-reporter.d.ts.map +1 -0
  89. package/dist/batch/progress-reporter.js +273 -0
  90. package/dist/batch/progress-reporter.js.map +1 -0
  91. package/dist/batch/readme-graph-section.d.ts +53 -0
  92. package/dist/batch/readme-graph-section.d.ts.map +1 -0
  93. package/dist/batch/readme-graph-section.js +183 -0
  94. package/dist/batch/readme-graph-section.js.map +1 -0
  95. package/dist/cli/commands/auth-status.d.ts +10 -0
  96. package/dist/cli/commands/auth-status.d.ts.map +1 -0
  97. package/dist/cli/commands/auth-status.js +50 -0
  98. package/dist/cli/commands/auth-status.js.map +1 -0
  99. package/dist/cli/commands/batch.d.ts +10 -0
  100. package/dist/cli/commands/batch.d.ts.map +1 -0
  101. package/dist/cli/commands/batch.js +133 -0
  102. package/dist/cli/commands/batch.js.map +1 -0
  103. package/dist/cli/commands/cache.d.ts +13 -0
  104. package/dist/cli/commands/cache.d.ts.map +1 -0
  105. package/dist/cli/commands/cache.js +65 -0
  106. package/dist/cli/commands/cache.js.map +1 -0
  107. package/dist/cli/commands/community.d.ts +10 -0
  108. package/dist/cli/commands/community.d.ts.map +1 -0
  109. package/dist/cli/commands/community.js +92 -0
  110. package/dist/cli/commands/community.js.map +1 -0
  111. package/dist/cli/commands/diff.d.ts +10 -0
  112. package/dist/cli/commands/diff.d.ts.map +1 -0
  113. package/dist/cli/commands/diff.js +49 -0
  114. package/dist/cli/commands/diff.js.map +1 -0
  115. package/dist/cli/commands/direction-audit.d.ts +12 -0
  116. package/dist/cli/commands/direction-audit.d.ts.map +1 -0
  117. package/dist/cli/commands/direction-audit.js +458 -0
  118. package/dist/cli/commands/direction-audit.js.map +1 -0
  119. package/dist/cli/commands/export.d.ts +22 -0
  120. package/dist/cli/commands/export.d.ts.map +1 -0
  121. package/dist/cli/commands/export.js +123 -0
  122. package/dist/cli/commands/export.js.map +1 -0
  123. package/dist/cli/commands/generate.d.ts +10 -0
  124. package/dist/cli/commands/generate.d.ts.map +1 -0
  125. package/dist/cli/commands/generate.js +50 -0
  126. package/dist/cli/commands/generate.js.map +1 -0
  127. package/dist/cli/commands/graph.d.ts +20 -0
  128. package/dist/cli/commands/graph.d.ts.map +1 -0
  129. package/dist/cli/commands/graph.js +189 -0
  130. package/dist/cli/commands/graph.js.map +1 -0
  131. package/dist/cli/commands/init.d.ts +10 -0
  132. package/dist/cli/commands/init.d.ts.map +1 -0
  133. package/dist/cli/commands/init.js +33 -0
  134. package/dist/cli/commands/init.js.map +1 -0
  135. package/dist/cli/commands/install.d.ts +11 -0
  136. package/dist/cli/commands/install.d.ts.map +1 -0
  137. package/dist/cli/commands/install.js +52 -0
  138. package/dist/cli/commands/install.js.map +1 -0
  139. package/dist/cli/commands/mcp-server.d.ts +23 -0
  140. package/dist/cli/commands/mcp-server.d.ts.map +1 -0
  141. package/dist/cli/commands/mcp-server.js +90 -0
  142. package/dist/cli/commands/mcp-server.js.map +1 -0
  143. package/dist/cli/commands/panoramic.d.ts +7 -0
  144. package/dist/cli/commands/panoramic.d.ts.map +1 -0
  145. package/dist/cli/commands/panoramic.js +43 -0
  146. package/dist/cli/commands/panoramic.js.map +1 -0
  147. package/dist/cli/commands/prepare.d.ts +13 -0
  148. package/dist/cli/commands/prepare.d.ts.map +1 -0
  149. package/dist/cli/commands/prepare.js +148 -0
  150. package/dist/cli/commands/prepare.js.map +1 -0
  151. package/dist/cli/commands/query.d.ts +13 -0
  152. package/dist/cli/commands/query.d.ts.map +1 -0
  153. package/dist/cli/commands/query.js +116 -0
  154. package/dist/cli/commands/query.js.map +1 -0
  155. package/dist/cli/commands/watch.d.ts +16 -0
  156. package/dist/cli/commands/watch.d.ts.map +1 -0
  157. package/dist/cli/commands/watch.js +188 -0
  158. package/dist/cli/commands/watch.js.map +1 -0
  159. package/dist/cli/index.d.ts +7 -0
  160. package/dist/cli/index.d.ts.map +1 -0
  161. package/dist/cli/index.js +193 -0
  162. package/dist/cli/index.js.map +1 -0
  163. package/dist/cli/utils/error-handler.d.ts +41 -0
  164. package/dist/cli/utils/error-handler.d.ts.map +1 -0
  165. package/dist/cli/utils/error-handler.js +90 -0
  166. package/dist/cli/utils/error-handler.js.map +1 -0
  167. package/dist/cli/utils/parse-args.d.ts +111 -0
  168. package/dist/cli/utils/parse-args.d.ts.map +1 -0
  169. package/dist/cli/utils/parse-args.js +756 -0
  170. package/dist/cli/utils/parse-args.js.map +1 -0
  171. package/dist/config/project-config.d.ts +49 -0
  172. package/dist/config/project-config.d.ts.map +1 -0
  173. package/dist/config/project-config.js +118 -0
  174. package/dist/config/project-config.js.map +1 -0
  175. package/dist/config/spec-driver-config.d.ts +32 -0
  176. package/dist/config/spec-driver-config.d.ts.map +1 -0
  177. package/dist/config/spec-driver-config.js +91 -0
  178. package/dist/config/spec-driver-config.js.map +1 -0
  179. package/dist/core/ast-analyzer.d.ts +49 -0
  180. package/dist/core/ast-analyzer.d.ts.map +1 -0
  181. package/dist/core/ast-analyzer.js +439 -0
  182. package/dist/core/ast-analyzer.js.map +1 -0
  183. package/dist/core/code-slice-extractor.d.ts +47 -0
  184. package/dist/core/code-slice-extractor.d.ts.map +1 -0
  185. package/dist/core/code-slice-extractor.js +227 -0
  186. package/dist/core/code-slice-extractor.js.map +1 -0
  187. package/dist/core/context-assembler.d.ts +80 -0
  188. package/dist/core/context-assembler.d.ts.map +1 -0
  189. package/dist/core/context-assembler.js +262 -0
  190. package/dist/core/context-assembler.js.map +1 -0
  191. package/dist/core/grammar-manager.d.ts +79 -0
  192. package/dist/core/grammar-manager.d.ts.map +1 -0
  193. package/dist/core/grammar-manager.js +188 -0
  194. package/dist/core/grammar-manager.js.map +1 -0
  195. package/dist/core/llm-client.d.ts +120 -0
  196. package/dist/core/llm-client.d.ts.map +1 -0
  197. package/dist/core/llm-client.js +608 -0
  198. package/dist/core/llm-client.js.map +1 -0
  199. package/dist/core/model-selection.d.ts +50 -0
  200. package/dist/core/model-selection.d.ts.map +1 -0
  201. package/dist/core/model-selection.js +410 -0
  202. package/dist/core/model-selection.js.map +1 -0
  203. package/dist/core/query-mappers/base-mapper.d.ts +22 -0
  204. package/dist/core/query-mappers/base-mapper.d.ts.map +1 -0
  205. package/dist/core/query-mappers/base-mapper.js +2 -0
  206. package/dist/core/query-mappers/base-mapper.js.map +1 -0
  207. package/dist/core/query-mappers/go-mapper.d.ts +46 -0
  208. package/dist/core/query-mappers/go-mapper.d.ts.map +1 -0
  209. package/dist/core/query-mappers/go-mapper.js +477 -0
  210. package/dist/core/query-mappers/go-mapper.js.map +1 -0
  211. package/dist/core/query-mappers/index.d.ts +6 -0
  212. package/dist/core/query-mappers/index.d.ts.map +1 -0
  213. package/dist/core/query-mappers/index.js +5 -0
  214. package/dist/core/query-mappers/index.js.map +1 -0
  215. package/dist/core/query-mappers/java-mapper.d.ts +40 -0
  216. package/dist/core/query-mappers/java-mapper.d.ts.map +1 -0
  217. package/dist/core/query-mappers/java-mapper.js +405 -0
  218. package/dist/core/query-mappers/java-mapper.js.map +1 -0
  219. package/dist/core/query-mappers/python-mapper.d.ts +65 -0
  220. package/dist/core/query-mappers/python-mapper.d.ts.map +1 -0
  221. package/dist/core/query-mappers/python-mapper.js +673 -0
  222. package/dist/core/query-mappers/python-mapper.js.map +1 -0
  223. package/dist/core/query-mappers/typescript-mapper.d.ts +54 -0
  224. package/dist/core/query-mappers/typescript-mapper.d.ts.map +1 -0
  225. package/dist/core/query-mappers/typescript-mapper.js +706 -0
  226. package/dist/core/query-mappers/typescript-mapper.js.map +1 -0
  227. package/dist/core/secret-redactor.d.ts +10 -0
  228. package/dist/core/secret-redactor.d.ts.map +1 -0
  229. package/dist/core/secret-redactor.js +208 -0
  230. package/dist/core/secret-redactor.js.map +1 -0
  231. package/dist/core/single-spec-orchestrator.d.ts +103 -0
  232. package/dist/core/single-spec-orchestrator.d.ts.map +1 -0
  233. package/dist/core/single-spec-orchestrator.js +911 -0
  234. package/dist/core/single-spec-orchestrator.js.map +1 -0
  235. package/dist/core/token-counter.d.ts +48 -0
  236. package/dist/core/token-counter.d.ts.map +1 -0
  237. package/dist/core/token-counter.js +136 -0
  238. package/dist/core/token-counter.js.map +1 -0
  239. package/dist/core/tree-sitter-analyzer.d.ts +62 -0
  240. package/dist/core/tree-sitter-analyzer.d.ts.map +1 -0
  241. package/dist/core/tree-sitter-analyzer.js +229 -0
  242. package/dist/core/tree-sitter-analyzer.js.map +1 -0
  243. package/dist/core/tree-sitter-fallback.d.ts +14 -0
  244. package/dist/core/tree-sitter-fallback.d.ts.map +1 -0
  245. package/dist/core/tree-sitter-fallback.js +423 -0
  246. package/dist/core/tree-sitter-fallback.js.map +1 -0
  247. package/dist/debt-scanner/aggregator/quality-report-patcher.d.ts +22 -0
  248. package/dist/debt-scanner/aggregator/quality-report-patcher.d.ts.map +1 -0
  249. package/dist/debt-scanner/aggregator/quality-report-patcher.js +107 -0
  250. package/dist/debt-scanner/aggregator/quality-report-patcher.js.map +1 -0
  251. package/dist/debt-scanner/aggregator/readme-indexer.d.ts +6 -0
  252. package/dist/debt-scanner/aggregator/readme-indexer.d.ts.map +1 -0
  253. package/dist/debt-scanner/aggregator/readme-indexer.js +52 -0
  254. package/dist/debt-scanner/aggregator/readme-indexer.js.map +1 -0
  255. package/dist/debt-scanner/aggregator/report-builder.d.ts +25 -0
  256. package/dist/debt-scanner/aggregator/report-builder.d.ts.map +1 -0
  257. package/dist/debt-scanner/aggregator/report-builder.js +162 -0
  258. package/dist/debt-scanner/aggregator/report-builder.js.map +1 -0
  259. package/dist/debt-scanner/comments/debt-classifier.d.ts +28 -0
  260. package/dist/debt-scanner/comments/debt-classifier.d.ts.map +1 -0
  261. package/dist/debt-scanner/comments/debt-classifier.js +50 -0
  262. package/dist/debt-scanner/comments/debt-classifier.js.map +1 -0
  263. package/dist/debt-scanner/comments/index.d.ts +32 -0
  264. package/dist/debt-scanner/comments/index.d.ts.map +1 -0
  265. package/dist/debt-scanner/comments/index.js +103 -0
  266. package/dist/debt-scanner/comments/index.js.map +1 -0
  267. package/dist/debt-scanner/comments/symbol-resolver.d.ts +18 -0
  268. package/dist/debt-scanner/comments/symbol-resolver.d.ts.map +1 -0
  269. package/dist/debt-scanner/comments/symbol-resolver.js +18 -0
  270. package/dist/debt-scanner/comments/symbol-resolver.js.map +1 -0
  271. package/dist/debt-scanner/design-docs/doc-discoverer.d.ts +6 -0
  272. package/dist/debt-scanner/design-docs/doc-discoverer.d.ts.map +1 -0
  273. package/dist/debt-scanner/design-docs/doc-discoverer.js +62 -0
  274. package/dist/debt-scanner/design-docs/doc-discoverer.js.map +1 -0
  275. package/dist/debt-scanner/design-docs/index.d.ts +28 -0
  276. package/dist/debt-scanner/design-docs/index.d.ts.map +1 -0
  277. package/dist/debt-scanner/design-docs/index.js +60 -0
  278. package/dist/debt-scanner/design-docs/index.js.map +1 -0
  279. package/dist/debt-scanner/design-docs/llm-topic-inferrer.d.ts +68 -0
  280. package/dist/debt-scanner/design-docs/llm-topic-inferrer.d.ts.map +1 -0
  281. package/dist/debt-scanner/design-docs/llm-topic-inferrer.js +151 -0
  282. package/dist/debt-scanner/design-docs/llm-topic-inferrer.js.map +1 -0
  283. package/dist/debt-scanner/design-docs/markdown-sections.d.ts +24 -0
  284. package/dist/debt-scanner/design-docs/markdown-sections.d.ts.map +1 -0
  285. package/dist/debt-scanner/design-docs/markdown-sections.js +92 -0
  286. package/dist/debt-scanner/design-docs/markdown-sections.js.map +1 -0
  287. package/dist/debt-scanner/design-docs/rule-detector.d.ts +18 -0
  288. package/dist/debt-scanner/design-docs/rule-detector.d.ts.map +1 -0
  289. package/dist/debt-scanner/design-docs/rule-detector.js +46 -0
  290. package/dist/debt-scanner/design-docs/rule-detector.js.map +1 -0
  291. package/dist/debt-scanner/index.d.ts +43 -0
  292. package/dist/debt-scanner/index.d.ts.map +1 -0
  293. package/dist/debt-scanner/index.js +177 -0
  294. package/dist/debt-scanner/index.js.map +1 -0
  295. package/dist/debt-scanner/llm-clients.d.ts +33 -0
  296. package/dist/debt-scanner/llm-clients.d.ts.map +1 -0
  297. package/dist/debt-scanner/llm-clients.js +78 -0
  298. package/dist/debt-scanner/llm-clients.js.map +1 -0
  299. package/dist/debt-scanner/types.d.ts +97 -0
  300. package/dist/debt-scanner/types.d.ts.map +1 -0
  301. package/dist/debt-scanner/types.js +7 -0
  302. package/dist/debt-scanner/types.js.map +1 -0
  303. package/dist/diff/drift-orchestrator.d.ts +25 -0
  304. package/dist/diff/drift-orchestrator.d.ts.map +1 -0
  305. package/dist/diff/drift-orchestrator.js +248 -0
  306. package/dist/diff/drift-orchestrator.js.map +1 -0
  307. package/dist/diff/noise-filter.d.ts +27 -0
  308. package/dist/diff/noise-filter.d.ts.map +1 -0
  309. package/dist/diff/noise-filter.js +129 -0
  310. package/dist/diff/noise-filter.js.map +1 -0
  311. package/dist/diff/semantic-diff.d.ts +12 -0
  312. package/dist/diff/semantic-diff.d.ts.map +1 -0
  313. package/dist/diff/semantic-diff.js +94 -0
  314. package/dist/diff/semantic-diff.js.map +1 -0
  315. package/dist/diff/structural-diff.d.ts +16 -0
  316. package/dist/diff/structural-diff.d.ts.map +1 -0
  317. package/dist/diff/structural-diff.js +171 -0
  318. package/dist/diff/structural-diff.js.map +1 -0
  319. package/dist/extraction/artifact-classifier.d.ts +19 -0
  320. package/dist/extraction/artifact-classifier.d.ts.map +1 -0
  321. package/dist/extraction/artifact-classifier.js +104 -0
  322. package/dist/extraction/artifact-classifier.js.map +1 -0
  323. package/dist/extraction/extraction-cache.d.ts +32 -0
  324. package/dist/extraction/extraction-cache.d.ts.map +1 -0
  325. package/dist/extraction/extraction-cache.js +117 -0
  326. package/dist/extraction/extraction-cache.js.map +1 -0
  327. package/dist/extraction/extraction-pipeline.d.ts +44 -0
  328. package/dist/extraction/extraction-pipeline.d.ts.map +1 -0
  329. package/dist/extraction/extraction-pipeline.js +286 -0
  330. package/dist/extraction/extraction-pipeline.js.map +1 -0
  331. package/dist/extraction/extraction-types.d.ts +180 -0
  332. package/dist/extraction/extraction-types.d.ts.map +1 -0
  333. package/dist/extraction/extraction-types.js +63 -0
  334. package/dist/extraction/extraction-types.js.map +1 -0
  335. package/dist/extraction/image-extractor.d.ts +21 -0
  336. package/dist/extraction/image-extractor.d.ts.map +1 -0
  337. package/dist/extraction/image-extractor.js +211 -0
  338. package/dist/extraction/image-extractor.js.map +1 -0
  339. package/dist/extraction/index.d.ts +8 -0
  340. package/dist/extraction/index.d.ts.map +1 -0
  341. package/dist/extraction/index.js +6 -0
  342. package/dist/extraction/index.js.map +1 -0
  343. package/dist/extraction/markdown-extractor.d.ts +11 -0
  344. package/dist/extraction/markdown-extractor.d.ts.map +1 -0
  345. package/dist/extraction/markdown-extractor.js +212 -0
  346. package/dist/extraction/markdown-extractor.js.map +1 -0
  347. package/dist/extraction/openapi-extractor.d.ts +10 -0
  348. package/dist/extraction/openapi-extractor.d.ts.map +1 -0
  349. package/dist/extraction/openapi-extractor.js +449 -0
  350. package/dist/extraction/openapi-extractor.js.map +1 -0
  351. package/dist/generator/frontmatter.d.ts +58 -0
  352. package/dist/generator/frontmatter.d.ts.map +1 -0
  353. package/dist/generator/frontmatter.js +100 -0
  354. package/dist/generator/frontmatter.js.map +1 -0
  355. package/dist/generator/index-generator.d.ts +27 -0
  356. package/dist/generator/index-generator.d.ts.map +1 -0
  357. package/dist/generator/index-generator.js +129 -0
  358. package/dist/generator/index-generator.js.map +1 -0
  359. package/dist/generator/mermaid-class-diagram.d.ts +14 -0
  360. package/dist/generator/mermaid-class-diagram.d.ts.map +1 -0
  361. package/dist/generator/mermaid-class-diagram.js +115 -0
  362. package/dist/generator/mermaid-class-diagram.js.map +1 -0
  363. package/dist/generator/mermaid-dependency-graph.d.ts +15 -0
  364. package/dist/generator/mermaid-dependency-graph.d.ts.map +1 -0
  365. package/dist/generator/mermaid-dependency-graph.js +84 -0
  366. package/dist/generator/mermaid-dependency-graph.js.map +1 -0
  367. package/dist/generator/spec-renderer.d.ts +24 -0
  368. package/dist/generator/spec-renderer.d.ts.map +1 -0
  369. package/dist/generator/spec-renderer.js +110 -0
  370. package/dist/generator/spec-renderer.js.map +1 -0
  371. package/dist/graph/dependency-graph.d.ts +24 -0
  372. package/dist/graph/dependency-graph.d.ts.map +1 -0
  373. package/dist/graph/dependency-graph.js +206 -0
  374. package/dist/graph/dependency-graph.js.map +1 -0
  375. package/dist/graph/directory-graph.d.ts +16 -0
  376. package/dist/graph/directory-graph.d.ts.map +1 -0
  377. package/dist/graph/directory-graph.js +281 -0
  378. package/dist/graph/directory-graph.js.map +1 -0
  379. package/dist/graph/mermaid-renderer.d.ts +22 -0
  380. package/dist/graph/mermaid-renderer.d.ts.map +1 -0
  381. package/dist/graph/mermaid-renderer.js +133 -0
  382. package/dist/graph/mermaid-renderer.js.map +1 -0
  383. package/dist/graph/topological-sort.d.ts +31 -0
  384. package/dist/graph/topological-sort.d.ts.map +1 -0
  385. package/dist/graph/topological-sort.js +167 -0
  386. package/dist/graph/topological-sort.js.map +1 -0
  387. package/dist/hooks/git-hook-installer.d.ts +37 -0
  388. package/dist/hooks/git-hook-installer.d.ts.map +1 -0
  389. package/dist/hooks/git-hook-installer.js +136 -0
  390. package/dist/hooks/git-hook-installer.js.map +1 -0
  391. package/dist/hooks/hook-installer.d.ts +39 -0
  392. package/dist/hooks/hook-installer.d.ts.map +1 -0
  393. package/dist/hooks/hook-installer.js +164 -0
  394. package/dist/hooks/hook-installer.js.map +1 -0
  395. package/dist/installer/skill-installer.d.ts +63 -0
  396. package/dist/installer/skill-installer.d.ts.map +1 -0
  397. package/dist/installer/skill-installer.js +203 -0
  398. package/dist/installer/skill-installer.js.map +1 -0
  399. package/dist/installer/skill-templates.d.ts +19 -0
  400. package/dist/installer/skill-templates.d.ts.map +1 -0
  401. package/dist/installer/skill-templates.js +42 -0
  402. package/dist/installer/skill-templates.js.map +1 -0
  403. package/dist/mcp/graph-tools.d.ts +17 -0
  404. package/dist/mcp/graph-tools.d.ts.map +1 -0
  405. package/dist/mcp/graph-tools.js +269 -0
  406. package/dist/mcp/graph-tools.js.map +1 -0
  407. package/dist/mcp/index.d.ts +10 -0
  408. package/dist/mcp/index.d.ts.map +1 -0
  409. package/dist/mcp/index.js +18 -0
  410. package/dist/mcp/index.js.map +1 -0
  411. package/dist/mcp/server.d.ts +10 -0
  412. package/dist/mcp/server.d.ts.map +1 -0
  413. package/dist/mcp/server.js +235 -0
  414. package/dist/mcp/server.js.map +1 -0
  415. package/dist/models/code-skeleton.d.ts +394 -0
  416. package/dist/models/code-skeleton.d.ts.map +1 -0
  417. package/dist/models/code-skeleton.js +119 -0
  418. package/dist/models/code-skeleton.js.map +1 -0
  419. package/dist/models/dependency-graph.d.ts +172 -0
  420. package/dist/models/dependency-graph.d.ts.map +1 -0
  421. package/dist/models/dependency-graph.js +44 -0
  422. package/dist/models/dependency-graph.js.map +1 -0
  423. package/dist/models/drift-item.d.ts +104 -0
  424. package/dist/models/drift-item.d.ts.map +1 -0
  425. package/dist/models/drift-item.js +38 -0
  426. package/dist/models/drift-item.js.map +1 -0
  427. package/dist/models/module-spec.d.ts +1905 -0
  428. package/dist/models/module-spec.d.ts.map +1 -0
  429. package/dist/models/module-spec.js +272 -0
  430. package/dist/models/module-spec.js.map +1 -0
  431. package/dist/panoramic/abstract-registry.d.ts +87 -0
  432. package/dist/panoramic/abstract-registry.d.ts.map +1 -0
  433. package/dist/panoramic/abstract-registry.js +88 -0
  434. package/dist/panoramic/abstract-registry.js.map +1 -0
  435. package/dist/panoramic/anchoring/chunker.d.ts +34 -0
  436. package/dist/panoramic/anchoring/chunker.d.ts.map +1 -0
  437. package/dist/panoramic/anchoring/chunker.js +274 -0
  438. package/dist/panoramic/anchoring/chunker.js.map +1 -0
  439. package/dist/panoramic/anchoring/edge-builder.d.ts +53 -0
  440. package/dist/panoramic/anchoring/edge-builder.d.ts.map +1 -0
  441. package/dist/panoramic/anchoring/edge-builder.js +183 -0
  442. package/dist/panoramic/anchoring/edge-builder.js.map +1 -0
  443. package/dist/panoramic/anchoring/embedding-provider.d.ts +51 -0
  444. package/dist/panoramic/anchoring/embedding-provider.d.ts.map +1 -0
  445. package/dist/panoramic/anchoring/embedding-provider.js +7 -0
  446. package/dist/panoramic/anchoring/embedding-provider.js.map +1 -0
  447. package/dist/panoramic/anchoring/index.d.ts +73 -0
  448. package/dist/panoramic/anchoring/index.d.ts.map +1 -0
  449. package/dist/panoramic/anchoring/index.js +91 -0
  450. package/dist/panoramic/anchoring/index.js.map +1 -0
  451. package/dist/panoramic/anchoring/providers/factory.d.ts +35 -0
  452. package/dist/panoramic/anchoring/providers/factory.d.ts.map +1 -0
  453. package/dist/panoramic/anchoring/providers/factory.js +33 -0
  454. package/dist/panoramic/anchoring/providers/factory.js.map +1 -0
  455. package/dist/panoramic/anchoring/providers/local-provider.d.ts +48 -0
  456. package/dist/panoramic/anchoring/providers/local-provider.d.ts.map +1 -0
  457. package/dist/panoramic/anchoring/providers/local-provider.js +145 -0
  458. package/dist/panoramic/anchoring/providers/local-provider.js.map +1 -0
  459. package/dist/panoramic/anchoring/providers/openai-provider.d.ts +45 -0
  460. package/dist/panoramic/anchoring/providers/openai-provider.d.ts.map +1 -0
  461. package/dist/panoramic/anchoring/providers/openai-provider.js +78 -0
  462. package/dist/panoramic/anchoring/providers/openai-provider.js.map +1 -0
  463. package/dist/panoramic/anchoring/similarity.d.ts +37 -0
  464. package/dist/panoramic/anchoring/similarity.d.ts.map +1 -0
  465. package/dist/panoramic/anchoring/similarity.js +75 -0
  466. package/dist/panoramic/anchoring/similarity.js.map +1 -0
  467. package/dist/panoramic/api-surface/endpoint-utils.d.ts +15 -0
  468. package/dist/panoramic/api-surface/endpoint-utils.d.ts.map +1 -0
  469. package/dist/panoramic/api-surface/endpoint-utils.js +145 -0
  470. package/dist/panoramic/api-surface/endpoint-utils.js.map +1 -0
  471. package/dist/panoramic/api-surface/express-extractor.d.ts +3 -0
  472. package/dist/panoramic/api-surface/express-extractor.d.ts.map +1 -0
  473. package/dist/panoramic/api-surface/express-extractor.js +288 -0
  474. package/dist/panoramic/api-surface/express-extractor.js.map +1 -0
  475. package/dist/panoramic/api-surface/fastapi-extractor.d.ts +6 -0
  476. package/dist/panoramic/api-surface/fastapi-extractor.d.ts.map +1 -0
  477. package/dist/panoramic/api-surface/fastapi-extractor.js +287 -0
  478. package/dist/panoramic/api-surface/fastapi-extractor.js.map +1 -0
  479. package/dist/panoramic/api-surface/framework-introspection.d.ts +3 -0
  480. package/dist/panoramic/api-surface/framework-introspection.d.ts.map +1 -0
  481. package/dist/panoramic/api-surface/framework-introspection.js +189 -0
  482. package/dist/panoramic/api-surface/framework-introspection.js.map +1 -0
  483. package/dist/panoramic/api-surface/index.d.ts +13 -0
  484. package/dist/panoramic/api-surface/index.d.ts.map +1 -0
  485. package/dist/panoramic/api-surface/index.js +238 -0
  486. package/dist/panoramic/api-surface/index.js.map +1 -0
  487. package/dist/panoramic/api-surface/openapi-extractor.d.ts +3 -0
  488. package/dist/panoramic/api-surface/openapi-extractor.d.ts.map +1 -0
  489. package/dist/panoramic/api-surface/openapi-extractor.js +247 -0
  490. package/dist/panoramic/api-surface/openapi-extractor.js.map +1 -0
  491. package/dist/panoramic/api-surface/types.d.ts +140 -0
  492. package/dist/panoramic/api-surface/types.d.ts.map +1 -0
  493. package/dist/panoramic/api-surface/types.js +7 -0
  494. package/dist/panoramic/api-surface/types.js.map +1 -0
  495. package/dist/panoramic/api-surface/utils.d.ts +29 -0
  496. package/dist/panoramic/api-surface/utils.d.ts.map +1 -0
  497. package/dist/panoramic/api-surface/utils.js +340 -0
  498. package/dist/panoramic/api-surface/utils.js.map +1 -0
  499. package/dist/panoramic/batch-project-docs.d.ts +101 -0
  500. package/dist/panoramic/batch-project-docs.d.ts.map +1 -0
  501. package/dist/panoramic/batch-project-docs.js +616 -0
  502. package/dist/panoramic/batch-project-docs.js.map +1 -0
  503. package/dist/panoramic/builders/architecture-ir-builder.d.ts +19 -0
  504. package/dist/panoramic/builders/architecture-ir-builder.d.ts.map +1 -0
  505. package/dist/panoramic/builders/architecture-ir-builder.js +561 -0
  506. package/dist/panoramic/builders/architecture-ir-builder.js.map +1 -0
  507. package/dist/panoramic/builders/architecture-ir-mermaid-adapter.d.ts +6 -0
  508. package/dist/panoramic/builders/architecture-ir-mermaid-adapter.d.ts.map +1 -0
  509. package/dist/panoramic/builders/architecture-ir-mermaid-adapter.js +98 -0
  510. package/dist/panoramic/builders/architecture-ir-mermaid-adapter.js.map +1 -0
  511. package/dist/panoramic/builders/component-view-builder.d.ts +38 -0
  512. package/dist/panoramic/builders/component-view-builder.d.ts.map +1 -0
  513. package/dist/panoramic/builders/component-view-builder.js +694 -0
  514. package/dist/panoramic/builders/component-view-builder.js.map +1 -0
  515. package/dist/panoramic/builders/doc-graph-builder.d.ts +179 -0
  516. package/dist/panoramic/builders/doc-graph-builder.d.ts.map +1 -0
  517. package/dist/panoramic/builders/doc-graph-builder.js +546 -0
  518. package/dist/panoramic/builders/doc-graph-builder.js.map +1 -0
  519. package/dist/panoramic/builders/dynamic-scenarios-builder.d.ts +38 -0
  520. package/dist/panoramic/builders/dynamic-scenarios-builder.d.ts.map +1 -0
  521. package/dist/panoramic/builders/dynamic-scenarios-builder.js +361 -0
  522. package/dist/panoramic/builders/dynamic-scenarios-builder.js.map +1 -0
  523. package/dist/panoramic/cache/cache-key-builder.d.ts +25 -0
  524. package/dist/panoramic/cache/cache-key-builder.d.ts.map +1 -0
  525. package/dist/panoramic/cache/cache-key-builder.js +119 -0
  526. package/dist/panoramic/cache/cache-key-builder.js.map +1 -0
  527. package/dist/panoramic/cache/cache-manager.d.ts +58 -0
  528. package/dist/panoramic/cache/cache-manager.d.ts.map +1 -0
  529. package/dist/panoramic/cache/cache-manager.js +170 -0
  530. package/dist/panoramic/cache/cache-manager.js.map +1 -0
  531. package/dist/panoramic/cache/content-hasher.d.ts +47 -0
  532. package/dist/panoramic/cache/content-hasher.d.ts.map +1 -0
  533. package/dist/panoramic/cache/content-hasher.js +89 -0
  534. package/dist/panoramic/cache/content-hasher.js.map +1 -0
  535. package/dist/panoramic/cache/index.d.ts +10 -0
  536. package/dist/panoramic/cache/index.d.ts.map +1 -0
  537. package/dist/panoramic/cache/index.js +13 -0
  538. package/dist/panoramic/cache/index.js.map +1 -0
  539. package/dist/panoramic/cache/manifest-manager.d.ts +83 -0
  540. package/dist/panoramic/cache/manifest-manager.d.ts.map +1 -0
  541. package/dist/panoramic/cache/manifest-manager.js +119 -0
  542. package/dist/panoramic/cache/manifest-manager.js.map +1 -0
  543. package/dist/panoramic/cache/schemas.d.ts +199 -0
  544. package/dist/panoramic/cache/schemas.d.ts.map +1 -0
  545. package/dist/panoramic/cache/schemas.js +53 -0
  546. package/dist/panoramic/cache/schemas.js.map +1 -0
  547. package/dist/panoramic/cluster-orchestrator.d.ts +278 -0
  548. package/dist/panoramic/cluster-orchestrator.d.ts.map +1 -0
  549. package/dist/panoramic/cluster-orchestrator.js +531 -0
  550. package/dist/panoramic/cluster-orchestrator.js.map +1 -0
  551. package/dist/panoramic/community/community-detector.d.ts +41 -0
  552. package/dist/panoramic/community/community-detector.d.ts.map +1 -0
  553. package/dist/panoramic/community/community-detector.js +190 -0
  554. package/dist/panoramic/community/community-detector.js.map +1 -0
  555. package/dist/panoramic/community/god-node-analyzer.d.ts +28 -0
  556. package/dist/panoramic/community/god-node-analyzer.d.ts.map +1 -0
  557. package/dist/panoramic/community/god-node-analyzer.js +91 -0
  558. package/dist/panoramic/community/god-node-analyzer.js.map +1 -0
  559. package/dist/panoramic/community/graph-report-generator.d.ts +31 -0
  560. package/dist/panoramic/community/graph-report-generator.d.ts.map +1 -0
  561. package/dist/panoramic/community/graph-report-generator.js +98 -0
  562. package/dist/panoramic/community/graph-report-generator.js.map +1 -0
  563. package/dist/panoramic/community/index.d.ts +31 -0
  564. package/dist/panoramic/community/index.d.ts.map +1 -0
  565. package/dist/panoramic/community/index.js +63 -0
  566. package/dist/panoramic/community/index.js.map +1 -0
  567. package/dist/panoramic/community/surprising-edges.d.ts +42 -0
  568. package/dist/panoramic/community/surprising-edges.d.ts.map +1 -0
  569. package/dist/panoramic/community/surprising-edges.js +154 -0
  570. package/dist/panoramic/community/surprising-edges.js.map +1 -0
  571. package/dist/panoramic/cross-reference-index.d.ts +4 -0
  572. package/dist/panoramic/cross-reference-index.d.ts.map +1 -0
  573. package/dist/panoramic/cross-reference-index.js +201 -0
  574. package/dist/panoramic/cross-reference-index.js.map +1 -0
  575. package/dist/panoramic/exporters/architecture-ir-exporters.d.ts +7 -0
  576. package/dist/panoramic/exporters/architecture-ir-exporters.d.ts.map +1 -0
  577. package/dist/panoramic/exporters/architecture-ir-exporters.js +183 -0
  578. package/dist/panoramic/exporters/architecture-ir-exporters.js.map +1 -0
  579. package/dist/panoramic/exporters/export-types.d.ts +33 -0
  580. package/dist/panoramic/exporters/export-types.d.ts.map +1 -0
  581. package/dist/panoramic/exporters/export-types.js +7 -0
  582. package/dist/panoramic/exporters/export-types.js.map +1 -0
  583. package/dist/panoramic/exporters/html-exporter.d.ts +83 -0
  584. package/dist/panoramic/exporters/html-exporter.d.ts.map +1 -0
  585. package/dist/panoramic/exporters/html-exporter.js +224 -0
  586. package/dist/panoramic/exporters/html-exporter.js.map +1 -0
  587. package/dist/panoramic/exporters/html-template.d.ts +32 -0
  588. package/dist/panoramic/exporters/html-template.d.ts.map +1 -0
  589. package/dist/panoramic/exporters/html-template.js +737 -0
  590. package/dist/panoramic/exporters/html-template.js.map +1 -0
  591. package/dist/panoramic/exporters/obsidian-exporter.d.ts +67 -0
  592. package/dist/panoramic/exporters/obsidian-exporter.d.ts.map +1 -0
  593. package/dist/panoramic/exporters/obsidian-exporter.js +333 -0
  594. package/dist/panoramic/exporters/obsidian-exporter.js.map +1 -0
  595. package/dist/panoramic/generator-registry.d.ts +86 -0
  596. package/dist/panoramic/generator-registry.d.ts.map +1 -0
  597. package/dist/panoramic/generator-registry.js +194 -0
  598. package/dist/panoramic/generator-registry.js.map +1 -0
  599. package/dist/panoramic/generators/architecture-ir-generator.d.ts +36 -0
  600. package/dist/panoramic/generators/architecture-ir-generator.d.ts.map +1 -0
  601. package/dist/panoramic/generators/architecture-ir-generator.js +51 -0
  602. package/dist/panoramic/generators/architecture-ir-generator.js.map +1 -0
  603. package/dist/panoramic/generators/architecture-overview-generator.d.ts +31 -0
  604. package/dist/panoramic/generators/architecture-overview-generator.d.ts.map +1 -0
  605. package/dist/panoramic/generators/architecture-overview-generator.js +454 -0
  606. package/dist/panoramic/generators/architecture-overview-generator.js.map +1 -0
  607. package/dist/panoramic/generators/config-reference-generator.d.ts +78 -0
  608. package/dist/panoramic/generators/config-reference-generator.d.ts.map +1 -0
  609. package/dist/panoramic/generators/config-reference-generator.js +201 -0
  610. package/dist/panoramic/generators/config-reference-generator.js.map +1 -0
  611. package/dist/panoramic/generators/cross-package-analyzer.d.ts +112 -0
  612. package/dist/panoramic/generators/cross-package-analyzer.d.ts.map +1 -0
  613. package/dist/panoramic/generators/cross-package-analyzer.js +258 -0
  614. package/dist/panoramic/generators/cross-package-analyzer.js.map +1 -0
  615. package/dist/panoramic/generators/data-model-generator.d.ts +528 -0
  616. package/dist/panoramic/generators/data-model-generator.d.ts.map +1 -0
  617. package/dist/panoramic/generators/data-model-generator.js +674 -0
  618. package/dist/panoramic/generators/data-model-generator.js.map +1 -0
  619. package/dist/panoramic/generators/event-surface-generator.d.ts +52 -0
  620. package/dist/panoramic/generators/event-surface-generator.d.ts.map +1 -0
  621. package/dist/panoramic/generators/event-surface-generator.js +634 -0
  622. package/dist/panoramic/generators/event-surface-generator.js.map +1 -0
  623. package/dist/panoramic/generators/interface-surface-generator.d.ts +50 -0
  624. package/dist/panoramic/generators/interface-surface-generator.d.ts.map +1 -0
  625. package/dist/panoramic/generators/interface-surface-generator.js +393 -0
  626. package/dist/panoramic/generators/interface-surface-generator.js.map +1 -0
  627. package/dist/panoramic/generators/mock-readme-generator.d.ts +90 -0
  628. package/dist/panoramic/generators/mock-readme-generator.d.ts.map +1 -0
  629. package/dist/panoramic/generators/mock-readme-generator.js +113 -0
  630. package/dist/panoramic/generators/mock-readme-generator.js.map +1 -0
  631. package/dist/panoramic/generators/pattern-hints-generator.d.ts +28 -0
  632. package/dist/panoramic/generators/pattern-hints-generator.d.ts.map +1 -0
  633. package/dist/panoramic/generators/pattern-hints-generator.js +170 -0
  634. package/dist/panoramic/generators/pattern-hints-generator.js.map +1 -0
  635. package/dist/panoramic/generators/runtime-topology-generator.d.ts +77 -0
  636. package/dist/panoramic/generators/runtime-topology-generator.d.ts.map +1 -0
  637. package/dist/panoramic/generators/runtime-topology-generator.js +679 -0
  638. package/dist/panoramic/generators/runtime-topology-generator.js.map +1 -0
  639. package/dist/panoramic/generators/troubleshooting-generator.d.ts +51 -0
  640. package/dist/panoramic/generators/troubleshooting-generator.d.ts.map +1 -0
  641. package/dist/panoramic/generators/troubleshooting-generator.js +464 -0
  642. package/dist/panoramic/generators/troubleshooting-generator.js.map +1 -0
  643. package/dist/panoramic/generators/workspace-index-generator.d.ts +148 -0
  644. package/dist/panoramic/generators/workspace-index-generator.d.ts.map +1 -0
  645. package/dist/panoramic/generators/workspace-index-generator.js +500 -0
  646. package/dist/panoramic/generators/workspace-index-generator.js.map +1 -0
  647. package/dist/panoramic/graph/confidence-mapper.d.ts +39 -0
  648. package/dist/panoramic/graph/confidence-mapper.d.ts.map +1 -0
  649. package/dist/panoramic/graph/confidence-mapper.js +55 -0
  650. package/dist/panoramic/graph/confidence-mapper.js.map +1 -0
  651. package/dist/panoramic/graph/graph-builder.d.ts +33 -0
  652. package/dist/panoramic/graph/graph-builder.d.ts.map +1 -0
  653. package/dist/panoramic/graph/graph-builder.js +382 -0
  654. package/dist/panoramic/graph/graph-builder.js.map +1 -0
  655. package/dist/panoramic/graph/graph-paths.d.ts +13 -0
  656. package/dist/panoramic/graph/graph-paths.d.ts.map +1 -0
  657. package/dist/panoramic/graph/graph-paths.js +16 -0
  658. package/dist/panoramic/graph/graph-paths.js.map +1 -0
  659. package/dist/panoramic/graph/graph-query.d.ts +226 -0
  660. package/dist/panoramic/graph/graph-query.d.ts.map +1 -0
  661. package/dist/panoramic/graph/graph-query.js +571 -0
  662. package/dist/panoramic/graph/graph-query.js.map +1 -0
  663. package/dist/panoramic/graph/graph-types.d.ts +156 -0
  664. package/dist/panoramic/graph/graph-types.d.ts.map +1 -0
  665. package/dist/panoramic/graph/graph-types.js +10 -0
  666. package/dist/panoramic/graph/graph-types.js.map +1 -0
  667. package/dist/panoramic/graph/index.d.ts +6 -0
  668. package/dist/panoramic/graph/index.d.ts.map +1 -0
  669. package/dist/panoramic/graph/index.js +8 -0
  670. package/dist/panoramic/graph/index.js.map +1 -0
  671. package/dist/panoramic/hyperedges/constants.d.ts +16 -0
  672. package/dist/panoramic/hyperedges/constants.d.ts.map +1 -0
  673. package/dist/panoramic/hyperedges/constants.js +13 -0
  674. package/dist/panoramic/hyperedges/constants.js.map +1 -0
  675. package/dist/panoramic/hyperedges/extractor.d.ts +80 -0
  676. package/dist/panoramic/hyperedges/extractor.d.ts.map +1 -0
  677. package/dist/panoramic/hyperedges/extractor.js +133 -0
  678. package/dist/panoramic/hyperedges/extractor.js.map +1 -0
  679. package/dist/panoramic/hyperedges/index.d.ts +12 -0
  680. package/dist/panoramic/hyperedges/index.d.ts.map +1 -0
  681. package/dist/panoramic/hyperedges/index.js +19 -0
  682. package/dist/panoramic/hyperedges/index.js.map +1 -0
  683. package/dist/panoramic/hyperedges/prompt.d.ts +30 -0
  684. package/dist/panoramic/hyperedges/prompt.d.ts.map +1 -0
  685. package/dist/panoramic/hyperedges/prompt.js +88 -0
  686. package/dist/panoramic/hyperedges/prompt.js.map +1 -0
  687. package/dist/panoramic/hyperedges/schema.d.ts +91 -0
  688. package/dist/panoramic/hyperedges/schema.d.ts.map +1 -0
  689. package/dist/panoramic/hyperedges/schema.js +52 -0
  690. package/dist/panoramic/hyperedges/schema.js.map +1 -0
  691. package/dist/panoramic/index.d.ts +17 -0
  692. package/dist/panoramic/index.d.ts.map +1 -0
  693. package/dist/panoramic/index.js +22 -0
  694. package/dist/panoramic/index.js.map +1 -0
  695. package/dist/panoramic/interfaces.d.ts +243 -0
  696. package/dist/panoramic/interfaces.d.ts.map +1 -0
  697. package/dist/panoramic/interfaces.js +130 -0
  698. package/dist/panoramic/interfaces.js.map +1 -0
  699. package/dist/panoramic/internal.d.ts +67 -0
  700. package/dist/panoramic/internal.d.ts.map +1 -0
  701. package/dist/panoramic/internal.js +93 -0
  702. package/dist/panoramic/internal.js.map +1 -0
  703. package/dist/panoramic/models/architecture-ir-model.d.ts +92 -0
  704. package/dist/panoramic/models/architecture-ir-model.d.ts.map +1 -0
  705. package/dist/panoramic/models/architecture-ir-model.js +14 -0
  706. package/dist/panoramic/models/architecture-ir-model.js.map +1 -0
  707. package/dist/panoramic/models/architecture-overview-model.d.ts +77 -0
  708. package/dist/panoramic/models/architecture-overview-model.d.ts.map +1 -0
  709. package/dist/panoramic/models/architecture-overview-model.js +31 -0
  710. package/dist/panoramic/models/architecture-overview-model.js.map +1 -0
  711. package/dist/panoramic/models/component-view-model.d.ts +127 -0
  712. package/dist/panoramic/models/component-view-model.d.ts.map +1 -0
  713. package/dist/panoramic/models/component-view-model.js +65 -0
  714. package/dist/panoramic/models/component-view-model.js.map +1 -0
  715. package/dist/panoramic/models/docs-bundle-profiles.d.ts +4 -0
  716. package/dist/panoramic/models/docs-bundle-profiles.d.ts.map +1 -0
  717. package/dist/panoramic/models/docs-bundle-profiles.js +82 -0
  718. package/dist/panoramic/models/docs-bundle-profiles.js.map +1 -0
  719. package/dist/panoramic/models/docs-bundle-types.d.ts +94 -0
  720. package/dist/panoramic/models/docs-bundle-types.d.ts.map +1 -0
  721. package/dist/panoramic/models/docs-bundle-types.js +10 -0
  722. package/dist/panoramic/models/docs-bundle-types.js.map +1 -0
  723. package/dist/panoramic/models/docs-quality-model.d.ts +125 -0
  724. package/dist/panoramic/models/docs-quality-model.d.ts.map +1 -0
  725. package/dist/panoramic/models/docs-quality-model.js +166 -0
  726. package/dist/panoramic/models/docs-quality-model.js.map +1 -0
  727. package/dist/panoramic/models/pattern-hints-model.d.ts +89 -0
  728. package/dist/panoramic/models/pattern-hints-model.d.ts.map +1 -0
  729. package/dist/panoramic/models/pattern-hints-model.js +61 -0
  730. package/dist/panoramic/models/pattern-hints-model.js.map +1 -0
  731. package/dist/panoramic/models/pattern-knowledge-base.d.ts +31 -0
  732. package/dist/panoramic/models/pattern-knowledge-base.d.ts.map +1 -0
  733. package/dist/panoramic/models/pattern-knowledge-base.js +407 -0
  734. package/dist/panoramic/models/pattern-knowledge-base.js.map +1 -0
  735. package/dist/panoramic/models/runtime-topology-model.d.ts +145 -0
  736. package/dist/panoramic/models/runtime-topology-model.d.ts.map +1 -0
  737. package/dist/panoramic/models/runtime-topology-model.js +300 -0
  738. package/dist/panoramic/models/runtime-topology-model.js.map +1 -0
  739. package/dist/panoramic/output-filenames.d.ts +26 -0
  740. package/dist/panoramic/output-filenames.d.ts.map +1 -0
  741. package/dist/panoramic/output-filenames.js +48 -0
  742. package/dist/panoramic/output-filenames.js.map +1 -0
  743. package/dist/panoramic/parser-registry.d.ts +89 -0
  744. package/dist/panoramic/parser-registry.d.ts.map +1 -0
  745. package/dist/panoramic/parser-registry.js +169 -0
  746. package/dist/panoramic/parser-registry.js.map +1 -0
  747. package/dist/panoramic/parsers/abstract-artifact-parser.d.ts +48 -0
  748. package/dist/panoramic/parsers/abstract-artifact-parser.d.ts.map +1 -0
  749. package/dist/panoramic/parsers/abstract-artifact-parser.js +52 -0
  750. package/dist/panoramic/parsers/abstract-artifact-parser.js.map +1 -0
  751. package/dist/panoramic/parsers/abstract-config-parser.d.ts +35 -0
  752. package/dist/panoramic/parsers/abstract-config-parser.d.ts.map +1 -0
  753. package/dist/panoramic/parsers/abstract-config-parser.js +34 -0
  754. package/dist/panoramic/parsers/abstract-config-parser.js.map +1 -0
  755. package/dist/panoramic/parsers/behavior-yaml-parser.d.ts +34 -0
  756. package/dist/panoramic/parsers/behavior-yaml-parser.d.ts.map +1 -0
  757. package/dist/panoramic/parsers/behavior-yaml-parser.js +195 -0
  758. package/dist/panoramic/parsers/behavior-yaml-parser.js.map +1 -0
  759. package/dist/panoramic/parsers/comment-tracker.d.ts +37 -0
  760. package/dist/panoramic/parsers/comment-tracker.d.ts.map +1 -0
  761. package/dist/panoramic/parsers/comment-tracker.js +50 -0
  762. package/dist/panoramic/parsers/comment-tracker.js.map +1 -0
  763. package/dist/panoramic/parsers/dockerfile-parser.d.ts +42 -0
  764. package/dist/panoramic/parsers/dockerfile-parser.d.ts.map +1 -0
  765. package/dist/panoramic/parsers/dockerfile-parser.js +128 -0
  766. package/dist/panoramic/parsers/dockerfile-parser.js.map +1 -0
  767. package/dist/panoramic/parsers/env-config-parser.d.ts +37 -0
  768. package/dist/panoramic/parsers/env-config-parser.d.ts.map +1 -0
  769. package/dist/panoramic/parsers/env-config-parser.js +73 -0
  770. package/dist/panoramic/parsers/env-config-parser.js.map +1 -0
  771. package/dist/panoramic/parsers/index.d.ts +25 -0
  772. package/dist/panoramic/parsers/index.d.ts.map +1 -0
  773. package/dist/panoramic/parsers/index.js +25 -0
  774. package/dist/panoramic/parsers/index.js.map +1 -0
  775. package/dist/panoramic/parsers/skill-md-parser.d.ts +42 -0
  776. package/dist/panoramic/parsers/skill-md-parser.d.ts.map +1 -0
  777. package/dist/panoramic/parsers/skill-md-parser.js +105 -0
  778. package/dist/panoramic/parsers/skill-md-parser.js.map +1 -0
  779. package/dist/panoramic/parsers/toml-config-parser.d.ts +39 -0
  780. package/dist/panoramic/parsers/toml-config-parser.d.ts.map +1 -0
  781. package/dist/panoramic/parsers/toml-config-parser.js +98 -0
  782. package/dist/panoramic/parsers/toml-config-parser.js.map +1 -0
  783. package/dist/panoramic/parsers/types.d.ts +314 -0
  784. package/dist/panoramic/parsers/types.d.ts.map +1 -0
  785. package/dist/panoramic/parsers/types.js +136 -0
  786. package/dist/panoramic/parsers/types.js.map +1 -0
  787. package/dist/panoramic/parsers/yaml-config-parser.d.ts +58 -0
  788. package/dist/panoramic/parsers/yaml-config-parser.d.ts.map +1 -0
  789. package/dist/panoramic/parsers/yaml-config-parser.js +356 -0
  790. package/dist/panoramic/parsers/yaml-config-parser.js.map +1 -0
  791. package/dist/panoramic/pipelines/adr-decision-pipeline.d.ts +74 -0
  792. package/dist/panoramic/pipelines/adr-decision-pipeline.d.ts.map +1 -0
  793. package/dist/panoramic/pipelines/adr-decision-pipeline.js +421 -0
  794. package/dist/panoramic/pipelines/adr-decision-pipeline.js.map +1 -0
  795. package/dist/panoramic/pipelines/adr-evidence-verifier.d.ts +30 -0
  796. package/dist/panoramic/pipelines/adr-evidence-verifier.d.ts.map +1 -0
  797. package/dist/panoramic/pipelines/adr-evidence-verifier.js +141 -0
  798. package/dist/panoramic/pipelines/adr-evidence-verifier.js.map +1 -0
  799. package/dist/panoramic/pipelines/adr-mapreduce.d.ts +316 -0
  800. package/dist/panoramic/pipelines/adr-mapreduce.d.ts.map +1 -0
  801. package/dist/panoramic/pipelines/adr-mapreduce.js +331 -0
  802. package/dist/panoramic/pipelines/adr-mapreduce.js.map +1 -0
  803. package/dist/panoramic/pipelines/adr-migration.d.ts +26 -0
  804. package/dist/panoramic/pipelines/adr-migration.d.ts.map +1 -0
  805. package/dist/panoramic/pipelines/adr-migration.js +203 -0
  806. package/dist/panoramic/pipelines/adr-migration.js.map +1 -0
  807. package/dist/panoramic/pipelines/architecture-narrative-mapreduce.d.ts +121 -0
  808. package/dist/panoramic/pipelines/architecture-narrative-mapreduce.d.ts.map +1 -0
  809. package/dist/panoramic/pipelines/architecture-narrative-mapreduce.js +412 -0
  810. package/dist/panoramic/pipelines/architecture-narrative-mapreduce.js.map +1 -0
  811. package/dist/panoramic/pipelines/architecture-narrative.d.ts +123 -0
  812. package/dist/panoramic/pipelines/architecture-narrative.d.ts.map +1 -0
  813. package/dist/panoramic/pipelines/architecture-narrative.js +419 -0
  814. package/dist/panoramic/pipelines/architecture-narrative.js.map +1 -0
  815. package/dist/panoramic/pipelines/coverage-auditor.d.ts +95 -0
  816. package/dist/panoramic/pipelines/coverage-auditor.d.ts.map +1 -0
  817. package/dist/panoramic/pipelines/coverage-auditor.js +290 -0
  818. package/dist/panoramic/pipelines/coverage-auditor.js.map +1 -0
  819. package/dist/panoramic/pipelines/debt-intelligence-pipeline.d.ts +32 -0
  820. package/dist/panoramic/pipelines/debt-intelligence-pipeline.d.ts.map +1 -0
  821. package/dist/panoramic/pipelines/debt-intelligence-pipeline.js +108 -0
  822. package/dist/panoramic/pipelines/debt-intelligence-pipeline.js.map +1 -0
  823. package/dist/panoramic/pipelines/docs-bundle-manifest-reader.d.ts +26 -0
  824. package/dist/panoramic/pipelines/docs-bundle-manifest-reader.d.ts.map +1 -0
  825. package/dist/panoramic/pipelines/docs-bundle-manifest-reader.js +108 -0
  826. package/dist/panoramic/pipelines/docs-bundle-manifest-reader.js.map +1 -0
  827. package/dist/panoramic/pipelines/docs-bundle-orchestrator.d.ts +16 -0
  828. package/dist/panoramic/pipelines/docs-bundle-orchestrator.d.ts.map +1 -0
  829. package/dist/panoramic/pipelines/docs-bundle-orchestrator.js +588 -0
  830. package/dist/panoramic/pipelines/docs-bundle-orchestrator.js.map +1 -0
  831. package/dist/panoramic/pipelines/docs-quality-evaluator.d.ts +55 -0
  832. package/dist/panoramic/pipelines/docs-quality-evaluator.d.ts.map +1 -0
  833. package/dist/panoramic/pipelines/docs-quality-evaluator.js +1045 -0
  834. package/dist/panoramic/pipelines/docs-quality-evaluator.js.map +1 -0
  835. package/dist/panoramic/pipelines/narrative-provenance-adapter.d.ts +8 -0
  836. package/dist/panoramic/pipelines/narrative-provenance-adapter.d.ts.map +1 -0
  837. package/dist/panoramic/pipelines/narrative-provenance-adapter.js +99 -0
  838. package/dist/panoramic/pipelines/narrative-provenance-adapter.js.map +1 -0
  839. package/dist/panoramic/pipelines/product-ux-docs.d.ts +123 -0
  840. package/dist/panoramic/pipelines/product-ux-docs.d.ts.map +1 -0
  841. package/dist/panoramic/pipelines/product-ux-docs.js +959 -0
  842. package/dist/panoramic/pipelines/product-ux-docs.js.map +1 -0
  843. package/dist/panoramic/project-context.d.ts +17 -0
  844. package/dist/panoramic/project-context.d.ts.map +1 -0
  845. package/dist/panoramic/project-context.js +289 -0
  846. package/dist/panoramic/project-context.js.map +1 -0
  847. package/dist/panoramic/qa/citation.d.ts +21 -0
  848. package/dist/panoramic/qa/citation.d.ts.map +1 -0
  849. package/dist/panoramic/qa/citation.js +184 -0
  850. package/dist/panoramic/qa/citation.js.map +1 -0
  851. package/dist/panoramic/qa/debt-context.d.ts +33 -0
  852. package/dist/panoramic/qa/debt-context.d.ts.map +1 -0
  853. package/dist/panoramic/qa/debt-context.js +82 -0
  854. package/dist/panoramic/qa/debt-context.js.map +1 -0
  855. package/dist/panoramic/qa/graph-retriever.d.ts +29 -0
  856. package/dist/panoramic/qa/graph-retriever.d.ts.map +1 -0
  857. package/dist/panoramic/qa/graph-retriever.js +65 -0
  858. package/dist/panoramic/qa/graph-retriever.js.map +1 -0
  859. package/dist/panoramic/qa/index.d.ts +23 -0
  860. package/dist/panoramic/qa/index.d.ts.map +1 -0
  861. package/dist/panoramic/qa/index.js +201 -0
  862. package/dist/panoramic/qa/index.js.map +1 -0
  863. package/dist/panoramic/qa/llm-caller.d.ts +35 -0
  864. package/dist/panoramic/qa/llm-caller.d.ts.map +1 -0
  865. package/dist/panoramic/qa/llm-caller.js +138 -0
  866. package/dist/panoramic/qa/llm-caller.js.map +1 -0
  867. package/dist/panoramic/qa/prompt-builder.d.ts +36 -0
  868. package/dist/panoramic/qa/prompt-builder.d.ts.map +1 -0
  869. package/dist/panoramic/qa/prompt-builder.js +143 -0
  870. package/dist/panoramic/qa/prompt-builder.js.map +1 -0
  871. package/dist/panoramic/qa/rag-reranker.d.ts +43 -0
  872. package/dist/panoramic/qa/rag-reranker.d.ts.map +1 -0
  873. package/dist/panoramic/qa/rag-reranker.js +129 -0
  874. package/dist/panoramic/qa/rag-reranker.js.map +1 -0
  875. package/dist/panoramic/qa/types.d.ts +126 -0
  876. package/dist/panoramic/qa/types.d.ts.map +1 -0
  877. package/dist/panoramic/qa/types.js +6 -0
  878. package/dist/panoramic/qa/types.js.map +1 -0
  879. package/dist/panoramic/query.d.ts +29 -0
  880. package/dist/panoramic/query.d.ts.map +1 -0
  881. package/dist/panoramic/query.js +80 -0
  882. package/dist/panoramic/query.js.map +1 -0
  883. package/dist/panoramic/stored-module-specs.d.ts +26 -0
  884. package/dist/panoramic/stored-module-specs.d.ts.map +1 -0
  885. package/dist/panoramic/stored-module-specs.js +155 -0
  886. package/dist/panoramic/stored-module-specs.js.map +1 -0
  887. package/dist/panoramic/utils/html-sanitizer.d.ts +33 -0
  888. package/dist/panoramic/utils/html-sanitizer.d.ts.map +1 -0
  889. package/dist/panoramic/utils/html-sanitizer.js +170 -0
  890. package/dist/panoramic/utils/html-sanitizer.js.map +1 -0
  891. package/dist/panoramic/utils/llm-enricher.d.ts +74 -0
  892. package/dist/panoramic/utils/llm-enricher.d.ts.map +1 -0
  893. package/dist/panoramic/utils/llm-enricher.js +315 -0
  894. package/dist/panoramic/utils/llm-enricher.js.map +1 -0
  895. package/dist/panoramic/utils/llm-facade.d.ts +66 -0
  896. package/dist/panoramic/utils/llm-facade.d.ts.map +1 -0
  897. package/dist/panoramic/utils/llm-facade.js +136 -0
  898. package/dist/panoramic/utils/llm-facade.js.map +1 -0
  899. package/dist/panoramic/utils/logger.d.ts +43 -0
  900. package/dist/panoramic/utils/logger.d.ts.map +1 -0
  901. package/dist/panoramic/utils/logger.js +76 -0
  902. package/dist/panoramic/utils/logger.js.map +1 -0
  903. package/dist/panoramic/utils/mermaid-helpers.d.ts +19 -0
  904. package/dist/panoramic/utils/mermaid-helpers.d.ts.map +1 -0
  905. package/dist/panoramic/utils/mermaid-helpers.js +21 -0
  906. package/dist/panoramic/utils/mermaid-helpers.js.map +1 -0
  907. package/dist/panoramic/utils/multi-format-writer.d.ts +43 -0
  908. package/dist/panoramic/utils/multi-format-writer.d.ts.map +1 -0
  909. package/dist/panoramic/utils/multi-format-writer.js +73 -0
  910. package/dist/panoramic/utils/multi-format-writer.js.map +1 -0
  911. package/dist/panoramic/utils/template-loader.d.ts +15 -0
  912. package/dist/panoramic/utils/template-loader.d.ts.map +1 -0
  913. package/dist/panoramic/utils/template-loader.js +65 -0
  914. package/dist/panoramic/utils/template-loader.js.map +1 -0
  915. package/dist/panoramic/utils/text-segmenter.d.ts +50 -0
  916. package/dist/panoramic/utils/text-segmenter.d.ts.map +1 -0
  917. package/dist/panoramic/utils/text-segmenter.js +151 -0
  918. package/dist/panoramic/utils/text-segmenter.js.map +1 -0
  919. package/dist/scripts/postinstall.d.ts +7 -0
  920. package/dist/scripts/postinstall.d.ts.map +1 -0
  921. package/dist/scripts/postinstall.js +70 -0
  922. package/dist/scripts/postinstall.js.map +1 -0
  923. package/dist/scripts/preuninstall.d.ts +7 -0
  924. package/dist/scripts/preuninstall.d.ts.map +1 -0
  925. package/dist/scripts/preuninstall.js +62 -0
  926. package/dist/scripts/preuninstall.js.map +1 -0
  927. package/dist/spec-store/index.d.ts +9 -0
  928. package/dist/spec-store/index.d.ts.map +1 -0
  929. package/dist/spec-store/index.js +9 -0
  930. package/dist/spec-store/index.js.map +1 -0
  931. package/dist/spec-store/spec-identity.d.ts +28 -0
  932. package/dist/spec-store/spec-identity.d.ts.map +1 -0
  933. package/dist/spec-store/spec-identity.js +24 -0
  934. package/dist/spec-store/spec-identity.js.map +1 -0
  935. package/dist/spec-store/spec-store.d.ts +62 -0
  936. package/dist/spec-store/spec-store.d.ts.map +1 -0
  937. package/dist/spec-store/spec-store.js +201 -0
  938. package/dist/spec-store/spec-store.js.map +1 -0
  939. package/dist/utils/atomic-write.d.ts +10 -0
  940. package/dist/utils/atomic-write.d.ts.map +1 -0
  941. package/dist/utils/atomic-write.js +27 -0
  942. package/dist/utils/atomic-write.js.map +1 -0
  943. package/dist/utils/chunk-splitter.d.ts +32 -0
  944. package/dist/utils/chunk-splitter.d.ts.map +1 -0
  945. package/dist/utils/chunk-splitter.js +116 -0
  946. package/dist/utils/chunk-splitter.js.map +1 -0
  947. package/dist/utils/file-scanner.d.ts +38 -0
  948. package/dist/utils/file-scanner.d.ts.map +1 -0
  949. package/dist/utils/file-scanner.js +323 -0
  950. package/dist/utils/file-scanner.js.map +1 -0
  951. package/dist/utils/git-blame.d.ts +32 -0
  952. package/dist/utils/git-blame.d.ts.map +1 -0
  953. package/dist/utils/git-blame.js +151 -0
  954. package/dist/utils/git-blame.js.map +1 -0
  955. package/dist/utils/specify-template-sync.d.ts +16 -0
  956. package/dist/utils/specify-template-sync.d.ts.map +1 -0
  957. package/dist/utils/specify-template-sync.js +66 -0
  958. package/dist/utils/specify-template-sync.js.map +1 -0
  959. package/dist/watcher/file-watcher.d.ts +77 -0
  960. package/dist/watcher/file-watcher.d.ts.map +1 -0
  961. package/dist/watcher/file-watcher.js +233 -0
  962. package/dist/watcher/file-watcher.js.map +1 -0
  963. package/dist/watcher/index.d.ts +6 -0
  964. package/dist/watcher/index.d.ts.map +1 -0
  965. package/dist/watcher/index.js +5 -0
  966. package/dist/watcher/index.js.map +1 -0
  967. package/grammars/manifest.json +28 -0
  968. package/grammars/tree-sitter-go.wasm +0 -0
  969. package/grammars/tree-sitter-java.wasm +0 -0
  970. package/grammars/tree-sitter-javascript.wasm +0 -0
  971. package/grammars/tree-sitter-python.wasm +0 -0
  972. package/grammars/tree-sitter-typescript.wasm +0 -0
  973. package/package.json +84 -0
  974. package/plugins/spec-driver/.claude-plugin/plugin.json +16 -0
  975. package/plugins/spec-driver/README.md +401 -0
  976. package/plugins/spec-driver/agents/analyze.artifact.yaml +10 -0
  977. package/plugins/spec-driver/agents/analyze.md +144 -0
  978. package/plugins/spec-driver/agents/checklist.artifact.yaml +8 -0
  979. package/plugins/spec-driver/agents/checklist.md +84 -0
  980. package/plugins/spec-driver/agents/clarify.artifact.yaml +6 -0
  981. package/plugins/spec-driver/agents/clarify.md +104 -0
  982. package/plugins/spec-driver/agents/constitution.artifact.yaml +9 -0
  983. package/plugins/spec-driver/agents/constitution.md +100 -0
  984. package/plugins/spec-driver/agents/implement.artifact.yaml +8 -0
  985. package/plugins/spec-driver/agents/implement.md +159 -0
  986. package/plugins/spec-driver/agents/plan.artifact.yaml +12 -0
  987. package/plugins/spec-driver/agents/plan.md +116 -0
  988. package/plugins/spec-driver/agents/product-research.artifact.yaml +11 -0
  989. package/plugins/spec-driver/agents/product-research.md +94 -0
  990. package/plugins/spec-driver/agents/quality-review.artifact.yaml +11 -0
  991. package/plugins/spec-driver/agents/quality-review.md +165 -0
  992. package/plugins/spec-driver/agents/refactor-plan.md +132 -0
  993. package/plugins/spec-driver/agents/spec-review.artifact.yaml +12 -0
  994. package/plugins/spec-driver/agents/spec-review.md +111 -0
  995. package/plugins/spec-driver/agents/specify.artifact.yaml +9 -0
  996. package/plugins/spec-driver/agents/specify.md +109 -0
  997. package/plugins/spec-driver/agents/sync.artifact.yaml +19 -0
  998. package/plugins/spec-driver/agents/sync.md +91 -0
  999. package/plugins/spec-driver/agents/tasks.artifact.yaml +10 -0
  1000. package/plugins/spec-driver/agents/tasks.md +88 -0
  1001. package/plugins/spec-driver/agents/tech-research.artifact.yaml +12 -0
  1002. package/plugins/spec-driver/agents/tech-research.md +102 -0
  1003. package/plugins/spec-driver/agents/verify.artifact.yaml +11 -0
  1004. package/plugins/spec-driver/agents/verify.md +204 -0
  1005. package/plugins/spec-driver/config/orchestration.yaml +779 -0
  1006. package/plugins/spec-driver/contracts/orchestration-overrides-contract.yaml +124 -0
  1007. package/plugins/spec-driver/contracts/orchestration-schema.mjs +301 -0
  1008. package/plugins/spec-driver/contracts/scan-project-output.md +70 -0
  1009. package/plugins/spec-driver/contracts/wrapper-source-of-truth.yaml +44 -0
  1010. package/plugins/spec-driver/hooks/hooks.json +70 -0
  1011. package/plugins/spec-driver/hooks/post-tool-use-format.sh +28 -0
  1012. package/plugins/spec-driver/hooks/pre-tool-use-guard.sh +42 -0
  1013. package/plugins/spec-driver/hooks/stop-task-check.sh +22 -0
  1014. package/plugins/spec-driver/hooks/worktree-lifecycle.sh +33 -0
  1015. package/plugins/spec-driver/lib/orchestration-output-serializer.mjs +219 -0
  1016. package/plugins/spec-driver/lib/orchestration-resolver.mjs +485 -0
  1017. package/plugins/spec-driver/lib/orchestrator-fallback.mjs +98 -0
  1018. package/plugins/spec-driver/lib/orchestrator.mjs +280 -0
  1019. package/plugins/spec-driver/scorecards/default-governance.yaml +63 -0
  1020. package/plugins/spec-driver/scripts/codex-skills.sh +225 -0
  1021. package/plugins/spec-driver/scripts/experimental/README.md +9 -0
  1022. package/plugins/spec-driver/scripts/generate-adoption-insights.mjs +523 -0
  1023. package/plugins/spec-driver/scripts/generate-product-entity-catalog.mjs +472 -0
  1024. package/plugins/spec-driver/scripts/generate-product-quality-reports.mjs +18 -0
  1025. package/plugins/spec-driver/scripts/generate-product-scorecards.mjs +25 -0
  1026. package/plugins/spec-driver/scripts/generate-project-context-suggestions.mjs +622 -0
  1027. package/plugins/spec-driver/scripts/generate-workflow-registry.mjs +16 -0
  1028. package/plugins/spec-driver/scripts/init-project.sh +328 -0
  1029. package/plugins/spec-driver/scripts/lib/config-schema.mjs +433 -0
  1030. package/plugins/spec-driver/scripts/lib/init-project-output.sh +146 -0
  1031. package/plugins/spec-driver/scripts/lib/product-artifact-patchers.mjs +29 -0
  1032. package/plugins/spec-driver/scripts/lib/product-artifact-paths.mjs +129 -0
  1033. package/plugins/spec-driver/scripts/lib/product-governance-helpers.mjs +48 -0
  1034. package/plugins/spec-driver/scripts/lib/product-quality-core.mjs +531 -0
  1035. package/plugins/spec-driver/scripts/lib/product-scorecard-core.mjs +810 -0
  1036. package/plugins/spec-driver/scripts/lib/project-context-paths.mjs +21 -0
  1037. package/plugins/spec-driver/scripts/lib/project-profile-resolver.mjs +704 -0
  1038. package/plugins/spec-driver/scripts/lib/project-profile-schema.mjs +78 -0
  1039. package/plugins/spec-driver/scripts/lib/script-cli-args.mjs +25 -0
  1040. package/plugins/spec-driver/scripts/lib/script-diagnostics.mjs +29 -0
  1041. package/plugins/spec-driver/scripts/lib/script-report-io.mjs +37 -0
  1042. package/plugins/spec-driver/scripts/lib/simple-yaml.mjs +257 -0
  1043. package/plugins/spec-driver/scripts/lib/sync-conflict-resolver.mjs +128 -0
  1044. package/plugins/spec-driver/scripts/lib/sync-merge-strategy.mjs +388 -0
  1045. package/plugins/spec-driver/scripts/lib/sync-product-mapping.mjs +228 -0
  1046. package/plugins/spec-driver/scripts/lib/sync-timeline-builder.mjs +114 -0
  1047. package/plugins/spec-driver/scripts/lib/sync-validator.mjs +174 -0
  1048. package/plugins/spec-driver/scripts/lib/workflow-registry-core.mjs +281 -0
  1049. package/plugins/spec-driver/scripts/orchestrator-cli.mjs +490 -0
  1050. package/plugins/spec-driver/scripts/orchestrator-cli.sh +36 -0
  1051. package/plugins/spec-driver/scripts/postinstall.sh +101 -0
  1052. package/plugins/spec-driver/scripts/record-workflow-run.mjs +332 -0
  1053. package/plugins/spec-driver/scripts/resolve-project-context.mjs +56 -0
  1054. package/plugins/spec-driver/scripts/scan-project.sh +668 -0
  1055. package/plugins/spec-driver/scripts/sync-merge-engine.mjs +663 -0
  1056. package/plugins/spec-driver/scripts/validate-config.mjs +223 -0
  1057. package/plugins/spec-driver/scripts/validate-orchestration-overrides.mjs +190 -0
  1058. package/plugins/spec-driver/scripts/validate-wrapper-sources.mjs +302 -0
  1059. package/plugins/spec-driver/skills/spec-driver-constitution/SKILL.md +77 -0
  1060. package/plugins/spec-driver/skills/spec-driver-doc/SKILL.md +732 -0
  1061. package/plugins/spec-driver/skills/spec-driver-feature/SKILL.md +336 -0
  1062. package/plugins/spec-driver/skills/spec-driver-fix/SKILL.md +457 -0
  1063. package/plugins/spec-driver/skills/spec-driver-implement/SKILL.md +653 -0
  1064. package/plugins/spec-driver/skills/spec-driver-refactor/SKILL.md +250 -0
  1065. package/plugins/spec-driver/skills/spec-driver-resume/SKILL.md +325 -0
  1066. package/plugins/spec-driver/skills/spec-driver-story/SKILL.md +566 -0
  1067. package/plugins/spec-driver/skills/spec-driver-sync/SKILL.md +300 -0
  1068. package/plugins/spec-driver/templates/code-of-conduct-v2.1.md +85 -0
  1069. package/plugins/spec-driver/templates/licenses/Apache-2.0.txt +201 -0
  1070. package/plugins/spec-driver/templates/licenses/BSD-2-Clause.txt +24 -0
  1071. package/plugins/spec-driver/templates/licenses/BSD-3-Clause.txt +28 -0
  1072. package/plugins/spec-driver/templates/licenses/GPL-3.0.txt +232 -0
  1073. package/plugins/spec-driver/templates/licenses/ISC.txt +15 -0
  1074. package/plugins/spec-driver/templates/licenses/MIT.txt +21 -0
  1075. package/plugins/spec-driver/templates/licenses/MPL-2.0.txt +373 -0
  1076. package/plugins/spec-driver/templates/licenses/Unlicense.txt +24 -0
  1077. package/plugins/spec-driver/templates/orchestration-overrides.example.yaml +81 -0
  1078. package/plugins/spec-driver/templates/product-research-template.md +95 -0
  1079. package/plugins/spec-driver/templates/product-spec-template.md +250 -0
  1080. package/plugins/spec-driver/templates/research-synthesis-template.md +102 -0
  1081. package/plugins/spec-driver/templates/spec-driver.config-template.yaml +244 -0
  1082. package/plugins/spec-driver/templates/specify-base/agent-file-template.md +28 -0
  1083. package/plugins/spec-driver/templates/specify-base/checklist-template.md +40 -0
  1084. package/plugins/spec-driver/templates/specify-base/constitution-template.md +50 -0
  1085. package/plugins/spec-driver/templates/specify-base/plan-template.md +134 -0
  1086. package/plugins/spec-driver/templates/specify-base/product-research-template.md +95 -0
  1087. package/plugins/spec-driver/templates/specify-base/project-context-template.yaml +40 -0
  1088. package/plugins/spec-driver/templates/specify-base/research-synthesis-template.md +102 -0
  1089. package/plugins/spec-driver/templates/specify-base/spec-template.md +115 -0
  1090. package/plugins/spec-driver/templates/specify-base/tasks-template.md +266 -0
  1091. package/plugins/spec-driver/templates/specify-base/tech-research-template.md +111 -0
  1092. package/plugins/spec-driver/templates/specify-base/verification-report-template.md +63 -0
  1093. package/plugins/spec-driver/templates/tech-research-template.md +111 -0
  1094. package/plugins/spec-driver/templates/verification-report-template.md +63 -0
  1095. package/plugins/spec-driver/workflows/golden-paths.yaml +39 -0
  1096. package/plugins/spec-driver/workflows/spec-driver-doc.yaml +24 -0
  1097. package/plugins/spec-driver/workflows/spec-driver-feature.yaml +29 -0
  1098. package/plugins/spec-driver/workflows/spec-driver-fix.yaml +21 -0
  1099. package/plugins/spec-driver/workflows/spec-driver-implement.yaml +23 -0
  1100. package/plugins/spec-driver/workflows/spec-driver-resume.yaml +20 -0
  1101. package/plugins/spec-driver/workflows/spec-driver-story.yaml +24 -0
  1102. package/plugins/spec-driver/workflows/spec-driver-sync.yaml +34 -0
  1103. package/plugins/spectra/.claude-plugin/plugin.json +20 -0
  1104. package/plugins/spectra/.mcp.json +8 -0
  1105. package/plugins/spectra/README.md +128 -0
  1106. package/plugins/spectra/contracts/skill-source-of-truth.yaml +34 -0
  1107. package/plugins/spectra/hooks/hooks.json +15 -0
  1108. package/plugins/spectra/scripts/postinstall.sh +12 -0
  1109. package/plugins/spectra/scripts/sync-skill-mirrors.mjs +148 -0
  1110. package/plugins/spectra/scripts/validate-skill-sources.mjs +280 -0
  1111. package/plugins/spectra/skills/spectra/SKILL.md +214 -0
  1112. package/plugins/spectra/skills/spectra-batch/SKILL.md +232 -0
  1113. package/plugins/spectra/skills/spectra-diff/SKILL.md +99 -0
  1114. package/queries/go.scm +54 -0
  1115. package/queries/java.scm +50 -0
  1116. package/queries/javascript.scm +30 -0
  1117. package/queries/python.scm +35 -0
  1118. package/queries/typescript.scm +50 -0
  1119. package/scripts/lifecycle-runner.cjs +33 -0
  1120. package/templates/adr-draft.hbs +51 -0
  1121. package/templates/adr-index.hbs +25 -0
  1122. package/templates/api-surface.hbs +40 -0
  1123. package/templates/architecture-ir.hbs +49 -0
  1124. package/templates/architecture-narrative.hbs +116 -0
  1125. package/templates/architecture-overview.hbs +103 -0
  1126. package/templates/component-view.hbs +87 -0
  1127. package/templates/config-reference.hbs +22 -0
  1128. package/templates/coverage-report.hbs +84 -0
  1129. package/templates/cross-package-analysis.hbs +43 -0
  1130. package/templates/data-model.hbs +72 -0
  1131. package/templates/delta-report.hbs +53 -0
  1132. package/templates/docs-bundle-index.hbs +41 -0
  1133. package/templates/drift-report.hbs +53 -0
  1134. package/templates/dynamic-scenarios.hbs +46 -0
  1135. package/templates/event-surface.hbs +90 -0
  1136. package/templates/feature-brief-index.hbs +27 -0
  1137. package/templates/feature-brief.hbs +28 -0
  1138. package/templates/index-spec.hbs +57 -0
  1139. package/templates/interface-surface.hbs +87 -0
  1140. package/templates/module-spec.hbs +117 -0
  1141. package/templates/pattern-hints.hbs +85 -0
  1142. package/templates/product-overview.hbs +65 -0
  1143. package/templates/quality-report.hbs +130 -0
  1144. package/templates/runtime-topology.hbs +128 -0
  1145. package/templates/troubleshooting.hbs +86 -0
  1146. package/templates/user-journeys.hbs +44 -0
  1147. package/templates/workspace-index.hbs +26 -0
@@ -0,0 +1,571 @@
1
+ /**
2
+ * GraphQueryEngine — 知识图谱查询引擎
3
+ * 负责从 _meta/graph.json 加载图谱,构建内存索引,提供查询接口
4
+ * 参照 graphify 极简设计,不引入任何新运行时依赖
5
+ */
6
+ import { readFileSync } from 'node:fs';
7
+ import { join } from 'node:path';
8
+ import { SEMANTIC_EDGE_RELATIONS } from './graph-types.js';
9
+ // ============================================================
10
+ // 查询词拆分(Bug 142)
11
+ // ============================================================
12
+ /**
13
+ * 将查询字符串拆分为小写词项集合。
14
+ *
15
+ * 支持以下拆分规则:
16
+ * - PascalCase:'PQueue' → ['p', 'queue']('p' 长度=1 被过滤,最终保留 ['queue'])
17
+ * - 连续大写:'XMLParser' → ['xml', 'parser']
18
+ * - 分隔符:空格 / `-` / `_` / `.` 全部视作分隔
19
+ *
20
+ * 处理规则:
21
+ * - 全部转小写
22
+ * - 长度 ≤ 1 的 token 被过滤(避免 'p' / 'i' 等单字符噪声匹配)
23
+ * - 去重后返回稳定顺序(基于 Set 插入顺序)
24
+ *
25
+ * 注意:中文字符不会被 PascalCase 正则改动,按原样进入分隔符拆分;
26
+ * 因此中文查询如「优先队列」不会被错误拆分(无空格时整段保留为一个 token)。
27
+ *
28
+ * @param q - 原始查询字符串
29
+ * @returns 去重、过滤后的小写 token 数组
30
+ */
31
+ export function tokenize(q) {
32
+ const normalized = q
33
+ .replace(/([a-z])([A-Z])/g, '$1 $2') // 'PQueue' → 'P Queue'
34
+ .replace(/([A-Z]+)([A-Z][a-z])/g, '$1 $2'); // 'XMLParser' → 'XML Parser'
35
+ return Array.from(new Set(normalized
36
+ .toLowerCase()
37
+ .split(/[\s\-_.]+/)
38
+ .filter((t) => t.length > 1)));
39
+ }
40
+ // ============================================================
41
+ // GraphQueryEngine 核心类
42
+ // ============================================================
43
+ /**
44
+ * 知识图谱查询引擎
45
+ * 从 GraphJSON 构建内存索引,提供高效查询接口
46
+ */
47
+ export class GraphQueryEngine {
48
+ /** 原始图数据 */
49
+ graph;
50
+ /** 节点 ID → 节点对象的索引映射 */
51
+ nodeMap;
52
+ /** 邻接表:节点 ID → 相邻节点及连接边的数组 */
53
+ adjacency;
54
+ // ──────────────────────────────────────────────────────────
55
+ // 构造函数与静态工厂方法
56
+ // ──────────────────────────────────────────────────────────
57
+ /**
58
+ * 从 GraphJSON 构建查询引擎,同时建立内存索引
59
+ * @param graph - 符合 NetworkX node-link 格式的图谱 JSON
60
+ */
61
+ constructor(graph) {
62
+ this.graph = graph;
63
+ this.nodeMap = new Map();
64
+ this.adjacency = new Map();
65
+ // 建立节点索引
66
+ for (const node of graph.nodes) {
67
+ this.nodeMap.set(node.id, node);
68
+ this.adjacency.set(node.id, []);
69
+ }
70
+ // 建立邻接表(无向图双向添加,有向图单向添加)
71
+ for (const edge of graph.links) {
72
+ const srcList = this.adjacency.get(edge.source);
73
+ const tgtList = this.adjacency.get(edge.target);
74
+ if (srcList !== undefined) {
75
+ srcList.push({ node: edge.target, edge });
76
+ }
77
+ if (!graph.directed && tgtList !== undefined) {
78
+ tgtList.push({ node: edge.source, edge });
79
+ }
80
+ }
81
+ }
82
+ /**
83
+ * 从磁盘文件加载图谱,返回初始化完成的查询引擎
84
+ * @param graphPath - graph.json 文件的绝对路径
85
+ * @throws 文件不存在或 JSON 格式不合法时抛出含明确原因的 Error
86
+ */
87
+ static loadFromFile(graphPath) {
88
+ let content;
89
+ try {
90
+ content = readFileSync(graphPath, 'utf-8');
91
+ }
92
+ catch (err) {
93
+ throw new Error(`无法读取图谱文件 ${graphPath}:${err instanceof Error ? err.message : String(err)}` +
94
+ '\n提示:请先运行 `spectra graph` 命令生成图谱。');
95
+ }
96
+ let parsed;
97
+ try {
98
+ parsed = JSON.parse(content);
99
+ }
100
+ catch (err) {
101
+ throw new Error(`图谱文件 JSON 解析失败 ${graphPath}:${err instanceof Error ? err.message : String(err)}`);
102
+ }
103
+ // 宽松 schema 校验:仅检查 nodes/links 数组存在(避免因字段扩展导致加载失败)
104
+ if (typeof parsed !== 'object' ||
105
+ parsed === null ||
106
+ !Array.isArray(parsed['nodes']) ||
107
+ !Array.isArray(parsed['links'])) {
108
+ throw new Error(`图谱文件格式不合法 ${graphPath}:缺少必要字段 nodes 或 links 数组`);
109
+ }
110
+ return new GraphQueryEngine(parsed);
111
+ }
112
+ // ──────────────────────────────────────────────────────────
113
+ // 私有辅助方法
114
+ // ──────────────────────────────────────────────────────────
115
+ /**
116
+ * 对所有节点计算关键词匹配分(参照 graphify _score_nodes 逻辑)
117
+ * - label 包含词项:+1 分
118
+ * - metadata.sourcePath 或 metadata.path 包含词项:+0.5 分
119
+ * @param terms - 查询词项数组(已小写)
120
+ * @returns 按分数降序排列的节点 ID + 分数列表
121
+ */
122
+ scoreNodes(terms) {
123
+ const scored = [];
124
+ for (const [id, node] of this.nodeMap) {
125
+ const label = node.label.toLowerCase();
126
+ // 从 metadata 中提取路径字段(兼容 sourcePath 和 path 两种字段名)
127
+ const sourcePath = (node.metadata['sourcePath'] ??
128
+ node.metadata['path'] ??
129
+ '').toLowerCase();
130
+ let score = 0;
131
+ for (const t of terms) {
132
+ if (label.includes(t))
133
+ score += 1;
134
+ if (sourcePath.includes(t))
135
+ score += 0.5;
136
+ }
137
+ if (score > 0)
138
+ scored.push({ id, score });
139
+ }
140
+ return scored.sort((a, b) => b.score - a.score);
141
+ }
142
+ /**
143
+ * BFS 广度优先遍历(参照 graphify _bfs 逻辑)
144
+ * 从起始节点集合出发,按层遍历邻接表,防止循环访问
145
+ * @param startIds - 起始节点 ID 集合
146
+ * @param depth - 最大遍历深度
147
+ * @returns 访问到的节点 ID 集合和遍历到的边列表
148
+ */
149
+ bfs(startIds, depth) {
150
+ const visited = new Set(startIds);
151
+ let frontier = new Set(startIds);
152
+ const edgesSeen = [];
153
+ for (let d = 0; d < depth; d++) {
154
+ const nextFrontier = new Set();
155
+ for (const n of frontier) {
156
+ for (const { node: neighbor } of this.adjacency.get(n) ?? []) {
157
+ if (!visited.has(neighbor)) {
158
+ nextFrontier.add(neighbor);
159
+ edgesSeen.push([n, neighbor]);
160
+ }
161
+ }
162
+ }
163
+ for (const n of nextFrontier)
164
+ visited.add(n);
165
+ frontier = nextFrontier;
166
+ // 若 frontier 为空则提前终止
167
+ if (frontier.size === 0)
168
+ break;
169
+ }
170
+ return { nodes: visited, edges: edgesSeen };
171
+ }
172
+ /**
173
+ * 按 budget 裁剪节点列表
174
+ * 优先级:pinnedIds 固定保留 > 度数降序(hub 节点优先)
175
+ * @param nodes - 待裁剪的节点列表
176
+ * @param budget - 节点数上限(≤ 0 时使用默认值 50)
177
+ * @param pinnedIds - 必须保留的节点 ID 集合(如查询起点)
178
+ * @returns 裁剪后的节点列表及截断标志
179
+ */
180
+ truncateByBudget(nodes, budget, pinnedIds) {
181
+ const effectiveBudget = budget <= 0 ? 50 : budget;
182
+ const totalMatches = nodes.length;
183
+ if (nodes.length <= effectiveBudget) {
184
+ return { nodes, truncated: false, totalMatches };
185
+ }
186
+ // 分离固定保留节点和普通节点
187
+ const pinned = [];
188
+ const rest = [];
189
+ for (const node of nodes) {
190
+ if (pinnedIds?.has(node.id)) {
191
+ pinned.push(node);
192
+ }
193
+ else {
194
+ rest.push(node);
195
+ }
196
+ }
197
+ // 剩余节点按度数降序排列
198
+ rest.sort((a, b) => {
199
+ const degA = this.adjacency.get(a.id)?.length ?? 0;
200
+ const degB = this.adjacency.get(b.id)?.length ?? 0;
201
+ return degB - degA;
202
+ });
203
+ // 固定保留节点优先,剩余按度数填充
204
+ const remaining = Math.max(0, effectiveBudget - pinned.length);
205
+ const result = [...pinned, ...rest.slice(0, remaining)];
206
+ return {
207
+ nodes: result,
208
+ truncated: true,
209
+ totalMatches,
210
+ };
211
+ }
212
+ // ──────────────────────────────────────────────────────────
213
+ // 公开查询方法
214
+ // ──────────────────────────────────────────────────────────
215
+ /**
216
+ * 关键词子图查询(对应 graph_query MCP tool)
217
+ * 拆分查询词 → 关键词评分 → BFS 扩展子图 → budget 裁剪
218
+ * @param question - 自然语言查询词
219
+ * @param options - 查询选项(budget、mode、depth)
220
+ * @returns QueryResult
221
+ */
222
+ query(question, options) {
223
+ const budget = options?.budget ?? 50;
224
+ const depth = options?.depth ?? 2;
225
+ // 将查询词拆分为小写词项(Bug 142:使用 tokenize 支持 PascalCase / 连续大写拆分)
226
+ const terms = tokenize(question);
227
+ if (terms.length === 0) {
228
+ return {
229
+ nodes: [],
230
+ edges: [],
231
+ summary: '查询词为空,请提供有效的查询内容',
232
+ truncated: false,
233
+ totalMatches: 0,
234
+ };
235
+ }
236
+ // 获取得分节点
237
+ const scored = this.scoreNodes(terms);
238
+ if (scored.length === 0) {
239
+ return {
240
+ nodes: [],
241
+ edges: [],
242
+ summary: '未找到相关内容',
243
+ truncated: false,
244
+ totalMatches: 0,
245
+ };
246
+ }
247
+ // BFS 从得分节点出发扩展子图
248
+ // 限制 seed 节点数量 ≤ budget,确保 budget 为硬上限
249
+ const startIds = scored.slice(0, Math.max(1, budget)).map((s) => s.id);
250
+ const { nodes: visitedIds, edges: bfsEdges } = this.bfs(startIds, depth);
251
+ // 收集子图节点对象
252
+ const subgraphNodes = [];
253
+ for (const id of visitedIds) {
254
+ const node = this.nodeMap.get(id);
255
+ if (node !== undefined)
256
+ subgraphNodes.push(node);
257
+ }
258
+ // 按 budget 裁剪(起点节点固定保留)
259
+ const pinnedIds = new Set(startIds);
260
+ const { nodes: finalNodes, truncated, totalMatches } = this.truncateByBudget(subgraphNodes, budget, pinnedIds);
261
+ // 收集最终节点集合中存在的边(来自图的原始 links)
262
+ const finalNodeIds = new Set(finalNodes.map((n) => n.id));
263
+ const finalEdges = [];
264
+ for (const edge of this.graph.links) {
265
+ if (finalNodeIds.has(edge.source) && finalNodeIds.has(edge.target)) {
266
+ finalEdges.push(edge);
267
+ }
268
+ }
269
+ // 也加入 BFS 遍历边(可能不在原 links 中,但这里取交集即可)
270
+ // 以上已通过 graph.links 过滤,无需重复处理
271
+ // 构建摘要文本
272
+ let summary = `找到 ${totalMatches} 个相关节点`;
273
+ if (truncated) {
274
+ summary += `,已按 budget 限制截断至 ${finalNodes.length} 个`;
275
+ }
276
+ if (budget <= 0) {
277
+ summary += `(budget 无效,使用默认值 50)`;
278
+ }
279
+ return {
280
+ nodes: finalNodes,
281
+ edges: finalEdges,
282
+ summary,
283
+ truncated,
284
+ totalMatches,
285
+ };
286
+ }
287
+ /**
288
+ * 单节点详情查询(对应 graph_node MCP tool)
289
+ * id 优先精确查找,回退到 keyword 模糊匹配
290
+ * @param params - 查询参数(id 优先,keyword 作为 fallback)
291
+ * @returns NodeResult
292
+ */
293
+ getNode(params) {
294
+ const { id, keyword, budget } = params;
295
+ let node;
296
+ if (id !== undefined && id.length > 0) {
297
+ // 精确 ID 查找
298
+ node = this.nodeMap.get(id);
299
+ }
300
+ else if (keyword !== undefined && keyword.length > 0) {
301
+ // 模糊关键词匹配(label 包含关键词,不区分大小写)
302
+ const kw = keyword.toLowerCase();
303
+ for (const n of this.nodeMap.values()) {
304
+ if (n.label.toLowerCase().includes(kw)) {
305
+ node = n;
306
+ break;
307
+ }
308
+ }
309
+ }
310
+ if (node === undefined) {
311
+ return {
312
+ node: null,
313
+ neighbors: [],
314
+ community: null,
315
+ message: id
316
+ ? `节点不存在:id="${id}"`
317
+ : `未找到匹配关键词的节点:keyword="${keyword ?? ''}"`,
318
+ };
319
+ }
320
+ // 获取邻居节点列表(按 budget 限制数量)
321
+ const neighborEntries = this.adjacency.get(node.id) ?? [];
322
+ const effectiveBudget = budget && budget > 0 ? budget : neighborEntries.length;
323
+ const neighbors = [];
324
+ for (const { node: neighborId, edge } of neighborEntries) {
325
+ if (neighbors.length >= effectiveBudget)
326
+ break;
327
+ const neighborNode = this.nodeMap.get(neighborId);
328
+ if (neighborNode !== undefined) {
329
+ neighbors.push({ node: neighborNode, edge });
330
+ }
331
+ }
332
+ // 提取社区信息(来自节点 metadata.community 字段)
333
+ const community = typeof node.metadata['community'] === 'string'
334
+ ? node.metadata['community']
335
+ : null;
336
+ return { node, neighbors, community };
337
+ }
338
+ /**
339
+ * 最短路径查询(对应 graph_path MCP tool)
340
+ * 无权图 BFS 最短路径算法
341
+ * @param source - 源节点 ID
342
+ * @param target - 目标节点 ID
343
+ * @returns PathResult
344
+ */
345
+ findPath(source, target) {
346
+ // 校验节点存在性
347
+ if (!this.nodeMap.has(source)) {
348
+ return {
349
+ path: null,
350
+ edges: [],
351
+ message: `源节点不存在:${source}`,
352
+ };
353
+ }
354
+ if (!this.nodeMap.has(target)) {
355
+ return {
356
+ path: null,
357
+ edges: [],
358
+ message: `目标节点不存在:${target}`,
359
+ };
360
+ }
361
+ // source === target 时返回单节点路径
362
+ if (source === target) {
363
+ const node = this.nodeMap.get(source);
364
+ return {
365
+ path: [node],
366
+ edges: [],
367
+ message: `源节点与目标节点相同:${source}`,
368
+ };
369
+ }
370
+ // BFS 最短路径:记录父节点映射,到达 target 后回溯路径
371
+ const parent = new Map();
372
+ const parentEdge = new Map();
373
+ const visited = new Set([source]);
374
+ const queue = [source];
375
+ let found = false;
376
+ while (queue.length > 0) {
377
+ const current = queue.shift();
378
+ for (const { node: neighbor, edge } of this.adjacency.get(current) ?? []) {
379
+ if (!visited.has(neighbor)) {
380
+ visited.add(neighbor);
381
+ parent.set(neighbor, current);
382
+ parentEdge.set(neighbor, edge);
383
+ if (neighbor === target) {
384
+ found = true;
385
+ break;
386
+ }
387
+ queue.push(neighbor);
388
+ }
389
+ }
390
+ if (found)
391
+ break;
392
+ }
393
+ if (!found) {
394
+ return {
395
+ path: null,
396
+ edges: [],
397
+ message: `路径不存在:${source} → ${target}`,
398
+ };
399
+ }
400
+ // 回溯路径(从 target 到 source)
401
+ const pathIds = [];
402
+ let cur = target;
403
+ while (cur !== source) {
404
+ pathIds.unshift(cur);
405
+ cur = parent.get(cur);
406
+ }
407
+ pathIds.unshift(source);
408
+ // 构建路径节点序列
409
+ const pathNodes = pathIds
410
+ .map((nid) => this.nodeMap.get(nid))
411
+ .filter((n) => n !== undefined);
412
+ // 构建路径边序列
413
+ const pathEdges = pathIds
414
+ .slice(1)
415
+ .map((nid) => parentEdge.get(nid))
416
+ .filter((e) => e !== undefined);
417
+ return {
418
+ path: pathNodes,
419
+ edges: pathEdges,
420
+ message: `找到最短路径,共 ${pathNodes.length} 个节点,${pathEdges.length} 条边`,
421
+ };
422
+ }
423
+ /**
424
+ * 社区节点查询(对应 graph_community MCP tool)
425
+ * 按节点 metadata.community 字段分组,返回指定社区所有节点
426
+ * cohesion 从 _meta/graph-report.md 读取,文件不存在时 graceful degrade
427
+ * @param communityId - 社区 ID
428
+ * @param budget - 节点数上限(可选)
429
+ * @returns CommunityResult
430
+ */
431
+ getCommunity(communityId, budget) {
432
+ // 筛选属于该社区的节点
433
+ const communityNodes = [];
434
+ for (const node of this.nodeMap.values()) {
435
+ if (node.metadata['community'] === communityId) {
436
+ communityNodes.push(node);
437
+ }
438
+ }
439
+ if (communityNodes.length === 0) {
440
+ return {
441
+ communityId,
442
+ nodes: [],
443
+ cohesion: null,
444
+ message: `社区不存在:${communityId}`,
445
+ };
446
+ }
447
+ // 按 budget 裁剪
448
+ const effectiveBudget = budget && budget > 0 ? budget : communityNodes.length;
449
+ const finalNodes = communityNodes.slice(0, effectiveBudget);
450
+ const truncated = finalNodes.length < communityNodes.length;
451
+ // 尝试从 specs/_meta/GRAPH_REPORT.md 读取 cohesion(graceful degrade)
452
+ let cohesion = null;
453
+ let cohesionMessage;
454
+ try {
455
+ const reportPath = join(process.cwd(), 'specs', '_meta', 'GRAPH_REPORT.md');
456
+ const reportContent = readFileSync(reportPath, 'utf-8');
457
+ // 匹配格式如:| communityId | 0.85 | 或类似表格行
458
+ // 转义 communityId 中的正则特殊字符,防止 ReDoS
459
+ const escaped = communityId.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
460
+ const regex = new RegExp(`\\|\\s*${escaped}\\s*\\|[^|]*\\|\\s*([\\d.]+)`, 'i');
461
+ const match = reportContent.match(regex);
462
+ if (match?.[1]) {
463
+ const parsed = parseFloat(match[1]);
464
+ if (!isNaN(parsed))
465
+ cohesion = parsed;
466
+ }
467
+ }
468
+ catch {
469
+ // graph-report.md 不存在或读取失败,graceful degrade
470
+ cohesionMessage = '内聚度不可用(specs/_meta/GRAPH_REPORT.md 不存在)';
471
+ }
472
+ return {
473
+ communityId,
474
+ nodes: finalNodes,
475
+ cohesion,
476
+ message: truncated
477
+ ? `社区 ${communityId} 共 ${communityNodes.length} 个节点,已截断至 ${finalNodes.length} 个${cohesionMessage ? ';' + cohesionMessage : ''}`
478
+ : cohesionMessage,
479
+ };
480
+ }
481
+ /**
482
+ * 超边查询(对应 graph_hyperedges MCP tool)
483
+ * 返回图谱中所有超边,支持按 label 子串模糊过滤和按 node_id 精确过滤
484
+ * @param options - 过滤选项(均可选;两项均不传时返回全部)
485
+ * @returns Hyperedge 数组(graph.json 无 hyperedges 字段时返回空数组)
486
+ */
487
+ getHyperedges(options) {
488
+ const all = this.graph.hyperedges ?? [];
489
+ let result = all;
490
+ // label 模糊过滤(子串,大小写不敏感)
491
+ if (options?.label !== undefined && options.label.length > 0) {
492
+ const filterLower = options.label.toLowerCase();
493
+ result = result.filter((he) => he.label.toLowerCase().includes(filterLower));
494
+ }
495
+ // node_id 精确过滤(节点 ID 必须在 nodes 数组中)
496
+ if (options?.nodeId !== undefined && options.nodeId.length > 0) {
497
+ const targetId = options.nodeId;
498
+ result = result.filter((he) => he.nodes.includes(targetId));
499
+ }
500
+ // limit 截断(默认不截断)
501
+ const limit = options?.limit;
502
+ if (limit !== undefined && limit > 0 && result.length > limit) {
503
+ result = result.slice(0, limit);
504
+ }
505
+ return result;
506
+ }
507
+ /**
508
+ * 语义边查询(对应 graph_node MCP tool 的 semanticEdges 字段)
509
+ * 返回与指定节点关联的所有语义边(relation 为三种语义类型之一)
510
+ * 节点不存在或无语义边时返回空数组(不报错)
511
+ * @param nodeId - 目标节点 ID;undefined 或 null 时直接返回空数组
512
+ * @returns SemanticEdgeInfo 数组
513
+ */
514
+ getSemanticEdges(nodeId) {
515
+ if (nodeId === null || nodeId === undefined || nodeId.length === 0) {
516
+ return [];
517
+ }
518
+ const semanticRelations = new Set([
519
+ SEMANTIC_EDGE_RELATIONS.REFERENCES,
520
+ SEMANTIC_EDGE_RELATIONS.CONCEPTUALLY_RELATED_TO,
521
+ SEMANTIC_EDGE_RELATIONS.RATIONALE_FOR,
522
+ ]);
523
+ const result = [];
524
+ for (const edge of this.graph.links) {
525
+ if (!semanticRelations.has(edge.relation))
526
+ continue;
527
+ if (edge.source === nodeId) {
528
+ result.push({
529
+ type: edge.relation,
530
+ direction: 'outgoing',
531
+ peer: edge.target,
532
+ evidenceText: edge.evidenceText,
533
+ evidenceSource: edge.evidenceSource,
534
+ confidence: edge.confidence,
535
+ });
536
+ }
537
+ else if (edge.target === nodeId) {
538
+ result.push({
539
+ type: edge.relation,
540
+ direction: 'incoming',
541
+ peer: edge.source,
542
+ evidenceText: edge.evidenceText,
543
+ evidenceSource: edge.evidenceSource,
544
+ confidence: edge.confidence,
545
+ });
546
+ }
547
+ }
548
+ return result;
549
+ }
550
+ /**
551
+ * 枢纽节点查询(对应 graph_god_nodes MCP tool)
552
+ * 计算每个节点的度数,按降序返回前 limit 个
553
+ * @param limit - 返回节点数量上限(默认 10)
554
+ * @returns GodNodesResult
555
+ */
556
+ getGodNodes(limit = 10) {
557
+ const effectiveLimit = limit > 0 ? limit : 10;
558
+ // 计算每个节点的度数
559
+ const nodesWithDegree = [];
560
+ for (const [id, node] of this.nodeMap) {
561
+ const degree = this.adjacency.get(id)?.length ?? 0;
562
+ nodesWithDegree.push({ ...node, degree });
563
+ }
564
+ // 按度数降序排列,截取前 limit 个
565
+ nodesWithDegree.sort((a, b) => b.degree - a.degree);
566
+ return {
567
+ nodes: nodesWithDegree.slice(0, effectiveLimit),
568
+ };
569
+ }
570
+ }
571
+ //# sourceMappingURL=graph-query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graph-query.js","sourceRoot":"","sources":["../../../src/panoramic/graph/graph-query.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAuG3D,+DAA+D;AAC/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