spectra-cli 4.1.1 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (682) hide show
  1. package/README.md +12 -5
  2. package/dist/.spectra-build-meta.json +9 -0
  3. package/dist/adapters/go-adapter.d.ts.map +1 -1
  4. package/dist/adapters/go-adapter.js +2 -0
  5. package/dist/adapters/go-adapter.js.map +1 -1
  6. package/dist/adapters/index.d.ts +1 -1
  7. package/dist/adapters/index.d.ts.map +1 -1
  8. package/dist/adapters/java-adapter.d.ts.map +1 -1
  9. package/dist/adapters/java-adapter.js +2 -0
  10. package/dist/adapters/java-adapter.js.map +1 -1
  11. package/dist/adapters/language-adapter.d.ts +42 -9
  12. package/dist/adapters/language-adapter.d.ts.map +1 -1
  13. package/dist/adapters/python-adapter.d.ts +34 -6
  14. package/dist/adapters/python-adapter.d.ts.map +1 -1
  15. package/dist/adapters/python-adapter.js +168 -61
  16. package/dist/adapters/python-adapter.js.map +1 -1
  17. package/dist/adapters/ts-js-adapter.d.ts +13 -5
  18. package/dist/adapters/ts-js-adapter.d.ts.map +1 -1
  19. package/dist/adapters/ts-js-adapter.js +55 -14
  20. package/dist/adapters/ts-js-adapter.js.map +1 -1
  21. package/dist/batch/batch-orchestrator.d.ts +74 -5
  22. package/dist/batch/batch-orchestrator.d.ts.map +1 -1
  23. package/dist/batch/batch-orchestrator.js +583 -70
  24. package/dist/batch/batch-orchestrator.js.map +1 -1
  25. package/dist/batch/delta-regenerator.d.ts +2 -2
  26. package/dist/batch/delta-regenerator.d.ts.map +1 -1
  27. package/dist/batch/delta-regenerator.js +21 -28
  28. package/dist/batch/delta-regenerator.js.map +1 -1
  29. package/dist/batch/module-grouper.d.ts +9 -2
  30. package/dist/batch/module-grouper.d.ts.map +1 -1
  31. package/dist/batch/module-grouper.js +3 -1
  32. package/dist/batch/module-grouper.js.map +1 -1
  33. package/dist/batch/regen-plan.d.ts +78 -0
  34. package/dist/batch/regen-plan.d.ts.map +1 -0
  35. package/dist/batch/regen-plan.js +93 -0
  36. package/dist/batch/regen-plan.js.map +1 -0
  37. package/dist/cli/commands/batch.d.ts.map +1 -1
  38. package/dist/cli/commands/batch.js +36 -8
  39. package/dist/cli/commands/batch.js.map +1 -1
  40. package/dist/cli/commands/graph.js +1 -1
  41. package/dist/cli/commands/graph.js.map +1 -1
  42. package/dist/cli/commands/index.d.ts +8 -0
  43. package/dist/cli/commands/index.d.ts.map +1 -0
  44. package/dist/cli/commands/index.js +274 -0
  45. package/dist/cli/commands/index.js.map +1 -0
  46. package/dist/cli/commands/query.d.ts.map +1 -1
  47. package/dist/cli/commands/query.js +3 -1
  48. package/dist/cli/commands/query.js.map +1 -1
  49. package/dist/cli/commands/scaffold-kb.d.ts +9 -0
  50. package/dist/cli/commands/scaffold-kb.d.ts.map +1 -0
  51. package/dist/cli/commands/scaffold-kb.js +179 -0
  52. package/dist/cli/commands/scaffold-kb.js.map +1 -0
  53. package/dist/cli/index.js +33 -14
  54. package/dist/cli/index.js.map +1 -1
  55. package/dist/cli/utils/error-handler.d.ts +0 -6
  56. package/dist/cli/utils/error-handler.d.ts.map +1 -1
  57. package/dist/cli/utils/error-handler.js +0 -13
  58. package/dist/cli/utils/error-handler.js.map +1 -1
  59. package/dist/cli/utils/parse-args.d.ts +55 -3
  60. package/dist/cli/utils/parse-args.d.ts.map +1 -1
  61. package/dist/cli/utils/parse-args.js +176 -13
  62. package/dist/cli/utils/parse-args.js.map +1 -1
  63. package/dist/cli/version-meta.d.ts +16 -0
  64. package/dist/cli/version-meta.d.ts.map +1 -0
  65. package/dist/cli/version-meta.js +28 -0
  66. package/dist/cli/version-meta.js.map +1 -0
  67. package/dist/core/ast-analyzer.d.ts.map +1 -1
  68. package/dist/core/ast-analyzer.js +75 -5
  69. package/dist/core/ast-analyzer.js.map +1 -1
  70. package/dist/core/import-resolver.d.ts +93 -0
  71. package/dist/core/import-resolver.d.ts.map +1 -0
  72. package/dist/core/import-resolver.js +414 -0
  73. package/dist/core/import-resolver.js.map +1 -0
  74. package/dist/core/query-mappers/base-mapper.d.ts +13 -0
  75. package/dist/core/query-mappers/base-mapper.d.ts.map +1 -1
  76. package/dist/core/query-mappers/go-mapper.d.ts +68 -0
  77. package/dist/core/query-mappers/go-mapper.d.ts.map +1 -1
  78. package/dist/core/query-mappers/go-mapper.js +421 -0
  79. package/dist/core/query-mappers/go-mapper.js.map +1 -1
  80. package/dist/core/query-mappers/java-mapper.d.ts +196 -0
  81. package/dist/core/query-mappers/java-mapper.d.ts.map +1 -1
  82. package/dist/core/query-mappers/java-mapper.js +600 -0
  83. package/dist/core/query-mappers/java-mapper.js.map +1 -1
  84. package/dist/core/query-mappers/python-mapper.d.ts +55 -0
  85. package/dist/core/query-mappers/python-mapper.d.ts.map +1 -1
  86. package/dist/core/query-mappers/python-mapper.js +273 -0
  87. package/dist/core/query-mappers/python-mapper.js.map +1 -1
  88. package/dist/core/query-mappers/typescript-mapper.d.ts +102 -0
  89. package/dist/core/query-mappers/typescript-mapper.d.ts.map +1 -1
  90. package/dist/core/query-mappers/typescript-mapper.js +470 -0
  91. package/dist/core/query-mappers/typescript-mapper.js.map +1 -1
  92. package/dist/core/single-spec-orchestrator.d.ts +21 -0
  93. package/dist/core/single-spec-orchestrator.d.ts.map +1 -1
  94. package/dist/core/single-spec-orchestrator.js +187 -23
  95. package/dist/core/single-spec-orchestrator.js.map +1 -1
  96. package/dist/core/skeleton-hash.d.ts +33 -0
  97. package/dist/core/skeleton-hash.d.ts.map +1 -0
  98. package/dist/core/skeleton-hash.js +76 -0
  99. package/dist/core/skeleton-hash.js.map +1 -0
  100. package/dist/core/tree-sitter-analyzer.d.ts +7 -0
  101. package/dist/core/tree-sitter-analyzer.d.ts.map +1 -1
  102. package/dist/core/tree-sitter-analyzer.js +32 -1
  103. package/dist/core/tree-sitter-analyzer.js.map +1 -1
  104. package/dist/core/tree-sitter-fallback.d.ts +12 -4
  105. package/dist/core/tree-sitter-fallback.d.ts.map +1 -1
  106. package/dist/core/tree-sitter-fallback.js +160 -12
  107. package/dist/core/tree-sitter-fallback.js.map +1 -1
  108. package/dist/extraction/extraction-types.d.ts +25 -25
  109. package/dist/extraction/image-extractor.d.ts.map +1 -1
  110. package/dist/extraction/image-extractor.js +3 -1
  111. package/dist/extraction/image-extractor.js.map +1 -1
  112. package/dist/extraction/markdown-extractor.d.ts.map +1 -1
  113. package/dist/extraction/markdown-extractor.js +3 -1
  114. package/dist/extraction/markdown-extractor.js.map +1 -1
  115. package/dist/generator/frontmatter.d.ts +5 -0
  116. package/dist/generator/frontmatter.d.ts.map +1 -1
  117. package/dist/generator/frontmatter.js +4 -0
  118. package/dist/generator/frontmatter.js.map +1 -1
  119. package/dist/generator/index-generator.d.ts +3 -3
  120. package/dist/generator/index-generator.d.ts.map +1 -1
  121. package/dist/generator/index-generator.js +1 -1
  122. package/dist/generator/index-generator.js.map +1 -1
  123. package/dist/graph/directory-graph.d.ts +14 -4
  124. package/dist/graph/directory-graph.d.ts.map +1 -1
  125. package/dist/graph/directory-graph.js +71 -128
  126. package/dist/graph/directory-graph.js.map +1 -1
  127. package/dist/graph/mermaid-renderer.d.ts +8 -5
  128. package/dist/graph/mermaid-renderer.d.ts.map +1 -1
  129. package/dist/graph/mermaid-renderer.js +3 -3
  130. package/dist/graph/mermaid-renderer.js.map +1 -1
  131. package/dist/graph/topological-sort.d.ts +13 -6
  132. package/dist/graph/topological-sort.d.ts.map +1 -1
  133. package/dist/graph/topological-sort.js +2 -2
  134. package/dist/graph/topological-sort.js.map +1 -1
  135. package/dist/kb-mcp/index.d.ts +14 -0
  136. package/dist/kb-mcp/index.d.ts.map +1 -0
  137. package/dist/kb-mcp/index.js +24 -0
  138. package/dist/kb-mcp/index.js.map +1 -0
  139. package/dist/kb-mcp/lib/kb-error.d.ts +21 -0
  140. package/dist/kb-mcp/lib/kb-error.d.ts.map +1 -0
  141. package/dist/kb-mcp/lib/kb-error.js +28 -0
  142. package/dist/kb-mcp/lib/kb-error.js.map +1 -0
  143. package/dist/kb-mcp/lib/kb-locator.d.ts +58 -0
  144. package/dist/kb-mcp/lib/kb-locator.d.ts.map +1 -0
  145. package/dist/kb-mcp/lib/kb-locator.js +85 -0
  146. package/dist/kb-mcp/lib/kb-locator.js.map +1 -0
  147. package/dist/kb-mcp/lib/result-merger.d.ts +35 -0
  148. package/dist/kb-mcp/lib/result-merger.d.ts.map +1 -0
  149. package/dist/kb-mcp/lib/result-merger.js +64 -0
  150. package/dist/kb-mcp/lib/result-merger.js.map +1 -0
  151. package/dist/kb-mcp/server.d.ts +12 -0
  152. package/dist/kb-mcp/server.d.ts.map +1 -0
  153. package/dist/kb-mcp/server.js +29 -0
  154. package/dist/kb-mcp/server.js.map +1 -0
  155. package/dist/kb-mcp/tools/kb-api-lookup.d.ts +28 -0
  156. package/dist/kb-mcp/tools/kb-api-lookup.d.ts.map +1 -0
  157. package/dist/kb-mcp/tools/kb-api-lookup.js +237 -0
  158. package/dist/kb-mcp/tools/kb-api-lookup.js.map +1 -0
  159. package/dist/kb-mcp/tools/kb-doc-lookup.d.ts +20 -0
  160. package/dist/kb-mcp/tools/kb-doc-lookup.d.ts.map +1 -0
  161. package/dist/kb-mcp/tools/kb-doc-lookup.js +92 -0
  162. package/dist/kb-mcp/tools/kb-doc-lookup.js.map +1 -0
  163. package/dist/kb-mcp/tools/kb-search.d.ts +23 -0
  164. package/dist/kb-mcp/tools/kb-search.d.ts.map +1 -0
  165. package/dist/kb-mcp/tools/kb-search.js +126 -0
  166. package/dist/kb-mcp/tools/kb-search.js.map +1 -0
  167. package/dist/knowledge-graph/call-resolver.d.ts +64 -0
  168. package/dist/knowledge-graph/call-resolver.d.ts.map +1 -0
  169. package/dist/knowledge-graph/call-resolver.js +323 -0
  170. package/dist/knowledge-graph/call-resolver.js.map +1 -0
  171. package/dist/knowledge-graph/import-resolver.d.ts +39 -0
  172. package/dist/knowledge-graph/import-resolver.d.ts.map +1 -0
  173. package/dist/knowledge-graph/import-resolver.js +214 -0
  174. package/dist/knowledge-graph/import-resolver.js.map +1 -0
  175. package/dist/knowledge-graph/incremental.d.ts +131 -0
  176. package/dist/knowledge-graph/incremental.d.ts.map +1 -0
  177. package/dist/knowledge-graph/incremental.js +432 -0
  178. package/dist/knowledge-graph/incremental.js.map +1 -0
  179. package/dist/knowledge-graph/index.d.ts +85 -0
  180. package/dist/knowledge-graph/index.d.ts.map +1 -0
  181. package/dist/knowledge-graph/index.js +198 -0
  182. package/dist/knowledge-graph/index.js.map +1 -0
  183. package/dist/knowledge-graph/module-derivation.d.ts +252 -0
  184. package/dist/knowledge-graph/module-derivation.d.ts.map +1 -0
  185. package/dist/knowledge-graph/module-derivation.js +418 -0
  186. package/dist/knowledge-graph/module-derivation.js.map +1 -0
  187. package/dist/knowledge-graph/persistence.d.ts +310 -0
  188. package/dist/knowledge-graph/persistence.d.ts.map +1 -0
  189. package/dist/knowledge-graph/persistence.js +280 -0
  190. package/dist/knowledge-graph/persistence.js.map +1 -0
  191. package/dist/knowledge-graph/query-helpers.d.ts +191 -0
  192. package/dist/knowledge-graph/query-helpers.d.ts.map +1 -0
  193. package/dist/knowledge-graph/query-helpers.js +559 -0
  194. package/dist/knowledge-graph/query-helpers.js.map +1 -0
  195. package/dist/knowledge-graph/relativize.d.ts +51 -0
  196. package/dist/knowledge-graph/relativize.d.ts.map +1 -0
  197. package/dist/knowledge-graph/relativize.js +104 -0
  198. package/dist/knowledge-graph/relativize.js.map +1 -0
  199. package/dist/knowledge-graph/unified-graph.d.ts +310 -0
  200. package/dist/knowledge-graph/unified-graph.d.ts.map +1 -0
  201. package/dist/knowledge-graph/unified-graph.js +182 -0
  202. package/dist/knowledge-graph/unified-graph.js.map +1 -0
  203. package/dist/mcp/agent-context-tools.d.ts +53 -0
  204. package/dist/mcp/agent-context-tools.d.ts.map +1 -0
  205. package/dist/mcp/agent-context-tools.js +806 -0
  206. package/dist/mcp/agent-context-tools.js.map +1 -0
  207. package/dist/mcp/file-nav-tools.d.ts +42 -0
  208. package/dist/mcp/file-nav-tools.d.ts.map +1 -0
  209. package/dist/mcp/file-nav-tools.js +318 -0
  210. package/dist/mcp/file-nav-tools.js.map +1 -0
  211. package/dist/mcp/graph-tools.d.ts +22 -0
  212. package/dist/mcp/graph-tools.d.ts.map +1 -1
  213. package/dist/mcp/graph-tools.js +204 -133
  214. package/dist/mcp/graph-tools.js.map +1 -1
  215. package/dist/mcp/lib/file-nav-helpers.d.ts +128 -0
  216. package/dist/mcp/lib/file-nav-helpers.d.ts.map +1 -0
  217. package/dist/mcp/lib/file-nav-helpers.js +305 -0
  218. package/dist/mcp/lib/file-nav-helpers.js.map +1 -0
  219. package/dist/mcp/lib/response-helpers.d.ts +67 -0
  220. package/dist/mcp/lib/response-helpers.d.ts.map +1 -0
  221. package/dist/mcp/lib/response-helpers.js +103 -0
  222. package/dist/mcp/lib/response-helpers.js.map +1 -0
  223. package/dist/mcp/lib/telemetry.d.ts +69 -0
  224. package/dist/mcp/lib/telemetry.d.ts.map +1 -0
  225. package/dist/mcp/lib/telemetry.js +113 -0
  226. package/dist/mcp/lib/telemetry.js.map +1 -0
  227. package/dist/mcp/lib/tool-response.d.ts +46 -0
  228. package/dist/mcp/lib/tool-response.d.ts.map +1 -0
  229. package/dist/mcp/lib/tool-response.js +83 -0
  230. package/dist/mcp/lib/tool-response.js.map +1 -0
  231. package/dist/mcp/server.d.ts +14 -1
  232. package/dist/mcp/server.d.ts.map +1 -1
  233. package/dist/mcp/server.js +216 -158
  234. package/dist/mcp/server.js.map +1 -1
  235. package/dist/models/call-site.d.ts +68 -0
  236. package/dist/models/call-site.d.ts.map +1 -0
  237. package/dist/models/call-site.js +60 -0
  238. package/dist/models/call-site.js.map +1 -0
  239. package/dist/models/code-skeleton.d.ts +80 -6
  240. package/dist/models/code-skeleton.d.ts.map +1 -1
  241. package/dist/models/code-skeleton.js +30 -0
  242. package/dist/models/code-skeleton.js.map +1 -1
  243. package/dist/models/drift-item.d.ts +4 -4
  244. package/dist/models/module-spec.d.ts +173 -94
  245. package/dist/models/module-spec.d.ts.map +1 -1
  246. package/dist/models/module-spec.js +6 -0
  247. package/dist/models/module-spec.js.map +1 -1
  248. package/dist/panoramic/adr-decision-pipeline.d.ts +53 -0
  249. package/dist/panoramic/adr-decision-pipeline.d.ts.map +1 -0
  250. package/dist/panoramic/adr-decision-pipeline.js +685 -0
  251. package/dist/panoramic/adr-decision-pipeline.js.map +1 -0
  252. package/dist/panoramic/api-surface-generator.d.ts +56 -0
  253. package/dist/panoramic/api-surface-generator.d.ts.map +1 -0
  254. package/dist/panoramic/api-surface-generator.js +1671 -0
  255. package/dist/panoramic/api-surface-generator.js.map +1 -0
  256. package/dist/panoramic/architecture-ir-builder.d.ts +19 -0
  257. package/dist/panoramic/architecture-ir-builder.d.ts.map +1 -0
  258. package/dist/panoramic/architecture-ir-builder.js +561 -0
  259. package/dist/panoramic/architecture-ir-builder.js.map +1 -0
  260. package/dist/panoramic/architecture-ir-exporters.d.ts +7 -0
  261. package/dist/panoramic/architecture-ir-exporters.d.ts.map +1 -0
  262. package/dist/panoramic/architecture-ir-exporters.js +183 -0
  263. package/dist/panoramic/architecture-ir-exporters.js.map +1 -0
  264. package/dist/panoramic/architecture-ir-generator.d.ts +36 -0
  265. package/dist/panoramic/architecture-ir-generator.d.ts.map +1 -0
  266. package/dist/panoramic/architecture-ir-generator.js +51 -0
  267. package/dist/panoramic/architecture-ir-generator.js.map +1 -0
  268. package/dist/panoramic/architecture-ir-mermaid-adapter.d.ts +6 -0
  269. package/dist/panoramic/architecture-ir-mermaid-adapter.d.ts.map +1 -0
  270. package/dist/panoramic/architecture-ir-mermaid-adapter.js +98 -0
  271. package/dist/panoramic/architecture-ir-mermaid-adapter.js.map +1 -0
  272. package/dist/panoramic/architecture-ir-model.d.ts +87 -0
  273. package/dist/panoramic/architecture-ir-model.d.ts.map +1 -0
  274. package/dist/panoramic/architecture-ir-model.js +20 -0
  275. package/dist/panoramic/architecture-ir-model.js.map +1 -0
  276. package/dist/panoramic/architecture-narrative.d.ts +68 -0
  277. package/dist/panoramic/architecture-narrative.d.ts.map +1 -0
  278. package/dist/panoramic/architecture-narrative.js +401 -0
  279. package/dist/panoramic/architecture-narrative.js.map +1 -0
  280. package/dist/panoramic/architecture-overview-generator.d.ts +31 -0
  281. package/dist/panoramic/architecture-overview-generator.d.ts.map +1 -0
  282. package/dist/panoramic/architecture-overview-generator.js +454 -0
  283. package/dist/panoramic/architecture-overview-generator.js.map +1 -0
  284. package/dist/panoramic/architecture-overview-model.d.ts +77 -0
  285. package/dist/panoramic/architecture-overview-model.d.ts.map +1 -0
  286. package/dist/panoramic/architecture-overview-model.js +31 -0
  287. package/dist/panoramic/architecture-overview-model.js.map +1 -0
  288. package/dist/panoramic/batch-project-docs.d.ts.map +1 -1
  289. package/dist/panoramic/batch-project-docs.js +4 -2
  290. package/dist/panoramic/batch-project-docs.js.map +1 -1
  291. package/dist/panoramic/builders/component-view-builder.d.ts +25 -1
  292. package/dist/panoramic/builders/component-view-builder.d.ts.map +1 -1
  293. package/dist/panoramic/builders/component-view-builder.js +83 -3
  294. package/dist/panoramic/builders/component-view-builder.js.map +1 -1
  295. package/dist/panoramic/builders/doc-graph-builder.d.ts +15 -2
  296. package/dist/panoramic/builders/doc-graph-builder.d.ts.map +1 -1
  297. package/dist/panoramic/builders/doc-graph-builder.js +20 -0
  298. package/dist/panoramic/builders/doc-graph-builder.js.map +1 -1
  299. package/dist/panoramic/component-view-builder.d.ts +17 -0
  300. package/dist/panoramic/component-view-builder.d.ts.map +1 -0
  301. package/dist/panoramic/component-view-builder.js +652 -0
  302. package/dist/panoramic/component-view-builder.js.map +1 -0
  303. package/dist/panoramic/component-view-model.d.ts +127 -0
  304. package/dist/panoramic/component-view-model.d.ts.map +1 -0
  305. package/dist/panoramic/component-view-model.js +65 -0
  306. package/dist/panoramic/component-view-model.js.map +1 -0
  307. package/dist/panoramic/config-reference-generator.d.ts +78 -0
  308. package/dist/panoramic/config-reference-generator.d.ts.map +1 -0
  309. package/dist/panoramic/config-reference-generator.js +199 -0
  310. package/dist/panoramic/config-reference-generator.js.map +1 -0
  311. package/dist/panoramic/coverage-auditor.d.ts +95 -0
  312. package/dist/panoramic/coverage-auditor.d.ts.map +1 -0
  313. package/dist/panoramic/coverage-auditor.js +290 -0
  314. package/dist/panoramic/coverage-auditor.js.map +1 -0
  315. package/dist/panoramic/cross-package-analyzer.d.ts +112 -0
  316. package/dist/panoramic/cross-package-analyzer.d.ts.map +1 -0
  317. package/dist/panoramic/cross-package-analyzer.js +258 -0
  318. package/dist/panoramic/cross-package-analyzer.js.map +1 -0
  319. package/dist/panoramic/data-model-generator.d.ts +528 -0
  320. package/dist/panoramic/data-model-generator.d.ts.map +1 -0
  321. package/dist/panoramic/data-model-generator.js +647 -0
  322. package/dist/panoramic/data-model-generator.js.map +1 -0
  323. package/dist/panoramic/doc-graph-builder.d.ts +80 -0
  324. package/dist/panoramic/doc-graph-builder.d.ts.map +1 -0
  325. package/dist/panoramic/doc-graph-builder.js +352 -0
  326. package/dist/panoramic/doc-graph-builder.js.map +1 -0
  327. package/dist/panoramic/docs-bundle-manifest-reader.d.ts +26 -0
  328. package/dist/panoramic/docs-bundle-manifest-reader.d.ts.map +1 -0
  329. package/dist/panoramic/docs-bundle-manifest-reader.js +106 -0
  330. package/dist/panoramic/docs-bundle-manifest-reader.js.map +1 -0
  331. package/dist/panoramic/docs-bundle-orchestrator.d.ts +14 -0
  332. package/dist/panoramic/docs-bundle-orchestrator.d.ts.map +1 -0
  333. package/dist/panoramic/docs-bundle-orchestrator.js +538 -0
  334. package/dist/panoramic/docs-bundle-orchestrator.js.map +1 -0
  335. package/dist/panoramic/docs-bundle-profiles.d.ts +4 -0
  336. package/dist/panoramic/docs-bundle-profiles.d.ts.map +1 -0
  337. package/dist/panoramic/docs-bundle-profiles.js +82 -0
  338. package/dist/panoramic/docs-bundle-profiles.js.map +1 -0
  339. package/dist/panoramic/docs-bundle-types.d.ts +94 -0
  340. package/dist/panoramic/docs-bundle-types.d.ts.map +1 -0
  341. package/dist/panoramic/docs-bundle-types.js +10 -0
  342. package/dist/panoramic/docs-bundle-types.js.map +1 -0
  343. package/dist/panoramic/docs-quality-evaluator.d.ts +31 -0
  344. package/dist/panoramic/docs-quality-evaluator.d.ts.map +1 -0
  345. package/dist/panoramic/docs-quality-evaluator.js +941 -0
  346. package/dist/panoramic/docs-quality-evaluator.js.map +1 -0
  347. package/dist/panoramic/docs-quality-model.d.ts +125 -0
  348. package/dist/panoramic/docs-quality-model.d.ts.map +1 -0
  349. package/dist/panoramic/docs-quality-model.js +166 -0
  350. package/dist/panoramic/docs-quality-model.js.map +1 -0
  351. package/dist/panoramic/dynamic-scenarios-builder.d.ts +18 -0
  352. package/dist/panoramic/dynamic-scenarios-builder.d.ts.map +1 -0
  353. package/dist/panoramic/dynamic-scenarios-builder.js +316 -0
  354. package/dist/panoramic/dynamic-scenarios-builder.js.map +1 -0
  355. package/dist/panoramic/event-surface-generator.d.ts +52 -0
  356. package/dist/panoramic/event-surface-generator.d.ts.map +1 -0
  357. package/dist/panoramic/event-surface-generator.js +507 -0
  358. package/dist/panoramic/event-surface-generator.js.map +1 -0
  359. package/dist/panoramic/generator-registry.d.ts +1 -1
  360. package/dist/panoramic/generator-registry.d.ts.map +1 -1
  361. package/dist/panoramic/generator-registry.js +5 -2
  362. package/dist/panoramic/generator-registry.js.map +1 -1
  363. package/dist/panoramic/generators/cross-package-analyzer.d.ts +5 -5
  364. package/dist/panoramic/generators/cross-package-analyzer.d.ts.map +1 -1
  365. package/dist/panoramic/generators/cross-package-analyzer.js +1 -1
  366. package/dist/panoramic/generators/cross-package-analyzer.js.map +1 -1
  367. package/dist/panoramic/generators/data-model-generator.d.ts +27 -27
  368. package/dist/panoramic/graph/confidence-mapper.d.ts +18 -0
  369. package/dist/panoramic/graph/confidence-mapper.d.ts.map +1 -1
  370. package/dist/panoramic/graph/confidence-mapper.js +26 -0
  371. package/dist/panoramic/graph/confidence-mapper.js.map +1 -1
  372. package/dist/panoramic/graph/graph-builder.d.ts +72 -2
  373. package/dist/panoramic/graph/graph-builder.d.ts.map +1 -1
  374. package/dist/panoramic/graph/graph-builder.js +330 -46
  375. package/dist/panoramic/graph/graph-builder.js.map +1 -1
  376. package/dist/panoramic/graph/graph-paths.d.ts +8 -0
  377. package/dist/panoramic/graph/graph-paths.d.ts.map +1 -1
  378. package/dist/panoramic/graph/graph-paths.js +10 -0
  379. package/dist/panoramic/graph/graph-paths.js.map +1 -1
  380. package/dist/panoramic/graph/graph-query.d.ts +49 -2
  381. package/dist/panoramic/graph/graph-query.d.ts.map +1 -1
  382. package/dist/panoramic/graph/graph-query.js +117 -19
  383. package/dist/panoramic/graph/graph-query.js.map +1 -1
  384. package/dist/panoramic/graph/graph-types.d.ts +32 -3
  385. package/dist/panoramic/graph/graph-types.d.ts.map +1 -1
  386. package/dist/panoramic/graph/index.d.ts +2 -1
  387. package/dist/panoramic/graph/index.d.ts.map +1 -1
  388. package/dist/panoramic/graph/index.js +1 -1
  389. package/dist/panoramic/graph/index.js.map +1 -1
  390. package/dist/panoramic/hyperedges/schema.d.ts +6 -6
  391. package/dist/panoramic/interface-surface-generator.d.ts +50 -0
  392. package/dist/panoramic/interface-surface-generator.d.ts.map +1 -0
  393. package/dist/panoramic/interface-surface-generator.js +388 -0
  394. package/dist/panoramic/interface-surface-generator.js.map +1 -0
  395. package/dist/panoramic/interfaces.d.ts +2 -2
  396. package/dist/panoramic/mock-readme-generator.d.ts +90 -0
  397. package/dist/panoramic/mock-readme-generator.d.ts.map +1 -0
  398. package/dist/panoramic/mock-readme-generator.js +111 -0
  399. package/dist/panoramic/mock-readme-generator.js.map +1 -0
  400. package/dist/panoramic/models/component-view-model.d.ts +1 -1
  401. package/dist/panoramic/models/component-view-model.d.ts.map +1 -1
  402. package/dist/panoramic/models/component-view-model.js.map +1 -1
  403. package/dist/panoramic/narrative-provenance-adapter.d.ts +8 -0
  404. package/dist/panoramic/narrative-provenance-adapter.d.ts.map +1 -0
  405. package/dist/panoramic/narrative-provenance-adapter.js +99 -0
  406. package/dist/panoramic/narrative-provenance-adapter.js.map +1 -0
  407. package/dist/panoramic/parser-registry.d.ts +1 -1
  408. package/dist/panoramic/parser-registry.js +1 -1
  409. package/dist/panoramic/parsers/types.d.ts +6 -6
  410. package/dist/panoramic/pattern-hints-generator.d.ts +28 -0
  411. package/dist/panoramic/pattern-hints-generator.d.ts.map +1 -0
  412. package/dist/panoramic/pattern-hints-generator.js +218 -0
  413. package/dist/panoramic/pattern-hints-generator.js.map +1 -0
  414. package/dist/panoramic/pattern-hints-model.d.ts +89 -0
  415. package/dist/panoramic/pattern-hints-model.d.ts.map +1 -0
  416. package/dist/panoramic/pattern-hints-model.js +61 -0
  417. package/dist/panoramic/pattern-hints-model.js.map +1 -0
  418. package/dist/panoramic/pattern-knowledge-base.d.ts +31 -0
  419. package/dist/panoramic/pattern-knowledge-base.d.ts.map +1 -0
  420. package/dist/panoramic/pattern-knowledge-base.js +407 -0
  421. package/dist/panoramic/pattern-knowledge-base.js.map +1 -0
  422. package/dist/panoramic/pipelines/adr-evidence-verifier.d.ts.map +1 -1
  423. package/dist/panoramic/pipelines/adr-evidence-verifier.js +1 -29
  424. package/dist/panoramic/pipelines/adr-evidence-verifier.js.map +1 -1
  425. package/dist/panoramic/pipelines/coverage-auditor.d.ts.map +1 -1
  426. package/dist/panoramic/pipelines/coverage-auditor.js +4 -2
  427. package/dist/panoramic/pipelines/coverage-auditor.js.map +1 -1
  428. package/dist/panoramic/pipelines/docs-bundle-orchestrator.js +13 -6
  429. package/dist/panoramic/pipelines/docs-bundle-orchestrator.js.map +1 -1
  430. package/dist/panoramic/pipelines/product-ux-docs.d.ts +5 -0
  431. package/dist/panoramic/pipelines/product-ux-docs.d.ts.map +1 -1
  432. package/dist/panoramic/pipelines/product-ux-docs.js +34 -6
  433. package/dist/panoramic/pipelines/product-ux-docs.js.map +1 -1
  434. package/dist/panoramic/product-ux-docs.d.ts +104 -0
  435. package/dist/panoramic/product-ux-docs.d.ts.map +1 -0
  436. package/dist/panoramic/product-ux-docs.js +817 -0
  437. package/dist/panoramic/product-ux-docs.js.map +1 -0
  438. package/dist/panoramic/qa/__tests__/citation.test.d.ts +2 -0
  439. package/dist/panoramic/qa/__tests__/citation.test.d.ts.map +1 -0
  440. package/dist/panoramic/qa/__tests__/citation.test.js +193 -0
  441. package/dist/panoramic/qa/__tests__/citation.test.js.map +1 -0
  442. package/dist/panoramic/qa/__tests__/debt-context.test.d.ts +2 -0
  443. package/dist/panoramic/qa/__tests__/debt-context.test.d.ts.map +1 -0
  444. package/dist/panoramic/qa/__tests__/debt-context.test.js +154 -0
  445. package/dist/panoramic/qa/__tests__/debt-context.test.js.map +1 -0
  446. package/dist/panoramic/qa/__tests__/graph-retriever.test.d.ts +2 -0
  447. package/dist/panoramic/qa/__tests__/graph-retriever.test.d.ts.map +1 -0
  448. package/dist/panoramic/qa/__tests__/graph-retriever.test.js +148 -0
  449. package/dist/panoramic/qa/__tests__/graph-retriever.test.js.map +1 -0
  450. package/dist/panoramic/qa/__tests__/index.test.d.ts +2 -0
  451. package/dist/panoramic/qa/__tests__/index.test.d.ts.map +1 -0
  452. package/dist/panoramic/qa/__tests__/index.test.js +246 -0
  453. package/dist/panoramic/qa/__tests__/index.test.js.map +1 -0
  454. package/dist/panoramic/qa/__tests__/llm-caller.test.d.ts +2 -0
  455. package/dist/panoramic/qa/__tests__/llm-caller.test.d.ts.map +1 -0
  456. package/dist/panoramic/qa/__tests__/llm-caller.test.js +168 -0
  457. package/dist/panoramic/qa/__tests__/llm-caller.test.js.map +1 -0
  458. package/dist/panoramic/qa/__tests__/prompt-builder.test.d.ts +2 -0
  459. package/dist/panoramic/qa/__tests__/prompt-builder.test.d.ts.map +1 -0
  460. package/dist/panoramic/qa/__tests__/prompt-builder.test.js +150 -0
  461. package/dist/panoramic/qa/__tests__/prompt-builder.test.js.map +1 -0
  462. package/dist/panoramic/qa/__tests__/qa-integration.test.d.ts +2 -0
  463. package/dist/panoramic/qa/__tests__/qa-integration.test.d.ts.map +1 -0
  464. package/dist/panoramic/qa/__tests__/qa-integration.test.js +296 -0
  465. package/dist/panoramic/qa/__tests__/qa-integration.test.js.map +1 -0
  466. package/dist/panoramic/qa/__tests__/rag-reranker.test.d.ts +2 -0
  467. package/dist/panoramic/qa/__tests__/rag-reranker.test.d.ts.map +1 -0
  468. package/dist/panoramic/qa/__tests__/rag-reranker.test.js +136 -0
  469. package/dist/panoramic/qa/__tests__/rag-reranker.test.js.map +1 -0
  470. package/dist/panoramic/qa/index.d.ts.map +1 -1
  471. package/dist/panoramic/qa/index.js +10 -3
  472. package/dist/panoramic/qa/index.js.map +1 -1
  473. package/dist/panoramic/query.d.ts +1 -0
  474. package/dist/panoramic/query.d.ts.map +1 -1
  475. package/dist/panoramic/query.js +5 -0
  476. package/dist/panoramic/query.js.map +1 -1
  477. package/dist/panoramic/runtime-topology-generator.d.ts +77 -0
  478. package/dist/panoramic/runtime-topology-generator.d.ts.map +1 -0
  479. package/dist/panoramic/runtime-topology-generator.js +676 -0
  480. package/dist/panoramic/runtime-topology-generator.js.map +1 -0
  481. package/dist/panoramic/runtime-topology-model.d.ts +145 -0
  482. package/dist/panoramic/runtime-topology-model.d.ts.map +1 -0
  483. package/dist/panoramic/runtime-topology-model.js +300 -0
  484. package/dist/panoramic/runtime-topology-model.js.map +1 -0
  485. package/dist/panoramic/troubleshooting-generator.d.ts +51 -0
  486. package/dist/panoramic/troubleshooting-generator.d.ts.map +1 -0
  487. package/dist/panoramic/troubleshooting-generator.js +451 -0
  488. package/dist/panoramic/troubleshooting-generator.js.map +1 -0
  489. package/dist/panoramic/utils/text-segmenter.d.ts +15 -0
  490. package/dist/panoramic/utils/text-segmenter.d.ts.map +1 -1
  491. package/dist/panoramic/utils/text-segmenter.js +38 -0
  492. package/dist/panoramic/utils/text-segmenter.js.map +1 -1
  493. package/dist/panoramic/workspace-index-generator.d.ts +148 -0
  494. package/dist/panoramic/workspace-index-generator.d.ts.map +1 -0
  495. package/dist/panoramic/workspace-index-generator.js +497 -0
  496. package/dist/panoramic/workspace-index-generator.js.map +1 -0
  497. package/dist/runtime-bootstrap.d.ts +9 -0
  498. package/dist/runtime-bootstrap.d.ts.map +1 -0
  499. package/dist/runtime-bootstrap.js +33 -0
  500. package/dist/runtime-bootstrap.js.map +1 -0
  501. package/dist/scaffold-kb/api-entities-serializer.d.ts +12 -0
  502. package/dist/scaffold-kb/api-entities-serializer.d.ts.map +1 -0
  503. package/dist/scaffold-kb/api-entities-serializer.js +144 -0
  504. package/dist/scaffold-kb/api-entities-serializer.js.map +1 -0
  505. package/dist/scaffold-kb/arbitration.d.ts +44 -0
  506. package/dist/scaffold-kb/arbitration.d.ts.map +1 -0
  507. package/dist/scaffold-kb/arbitration.js +144 -0
  508. package/dist/scaffold-kb/arbitration.js.map +1 -0
  509. package/dist/scaffold-kb/chunk-splitter.d.ts +20 -0
  510. package/dist/scaffold-kb/chunk-splitter.d.ts.map +1 -0
  511. package/dist/scaffold-kb/chunk-splitter.js +309 -0
  512. package/dist/scaffold-kb/chunk-splitter.js.map +1 -0
  513. package/dist/scaffold-kb/doc-graph-builder.d.ts +26 -0
  514. package/dist/scaffold-kb/doc-graph-builder.d.ts.map +1 -0
  515. package/dist/scaffold-kb/doc-graph-builder.js +72 -0
  516. package/dist/scaffold-kb/doc-graph-builder.js.map +1 -0
  517. package/dist/scaffold-kb/entity-extractor.d.ts +40 -0
  518. package/dist/scaffold-kb/entity-extractor.d.ts.map +1 -0
  519. package/dist/scaffold-kb/entity-extractor.js +0 -0
  520. package/dist/scaffold-kb/entity-extractor.js.map +1 -0
  521. package/dist/scaffold-kb/entity-heuristic.d.ts +14 -0
  522. package/dist/scaffold-kb/entity-heuristic.d.ts.map +1 -0
  523. package/dist/scaffold-kb/entity-heuristic.js +107 -0
  524. package/dist/scaffold-kb/entity-heuristic.js.map +1 -0
  525. package/dist/scaffold-kb/entity-matcher.d.ts +20 -0
  526. package/dist/scaffold-kb/entity-matcher.d.ts.map +1 -0
  527. package/dist/scaffold-kb/entity-matcher.js +53 -0
  528. package/dist/scaffold-kb/entity-matcher.js.map +1 -0
  529. package/dist/scaffold-kb/entity-util.d.ts +11 -0
  530. package/dist/scaffold-kb/entity-util.d.ts.map +1 -0
  531. package/dist/scaffold-kb/entity-util.js +23 -0
  532. package/dist/scaffold-kb/entity-util.js.map +1 -0
  533. package/dist/scaffold-kb/evidence-envelope.d.ts +17 -0
  534. package/dist/scaffold-kb/evidence-envelope.d.ts.map +1 -0
  535. package/dist/scaffold-kb/evidence-envelope.js +32 -0
  536. package/dist/scaffold-kb/evidence-envelope.js.map +1 -0
  537. package/dist/scaffold-kb/index.d.ts +20 -0
  538. package/dist/scaffold-kb/index.d.ts.map +1 -0
  539. package/dist/scaffold-kb/index.js +102 -0
  540. package/dist/scaffold-kb/index.js.map +1 -0
  541. package/dist/scaffold-kb/ingest/ingest-core.d.ts +47 -0
  542. package/dist/scaffold-kb/ingest/ingest-core.d.ts.map +1 -0
  543. package/dist/scaffold-kb/ingest/ingest-core.js +231 -0
  544. package/dist/scaffold-kb/ingest/ingest-core.js.map +1 -0
  545. package/dist/scaffold-kb/ingest/office-parser.d.ts +33 -0
  546. package/dist/scaffold-kb/ingest/office-parser.d.ts.map +1 -0
  547. package/dist/scaffold-kb/ingest/office-parser.js +187 -0
  548. package/dist/scaffold-kb/ingest/office-parser.js.map +1 -0
  549. package/dist/scaffold-kb/ingest/url-fetcher.d.ts +43 -0
  550. package/dist/scaffold-kb/ingest/url-fetcher.d.ts.map +1 -0
  551. package/dist/scaffold-kb/ingest/url-fetcher.js +245 -0
  552. package/dist/scaffold-kb/ingest/url-fetcher.js.map +1 -0
  553. package/dist/scaffold-kb/ingester.d.ts +38 -0
  554. package/dist/scaffold-kb/ingester.d.ts.map +1 -0
  555. package/dist/scaffold-kb/ingester.js +261 -0
  556. package/dist/scaffold-kb/ingester.js.map +1 -0
  557. package/dist/scaffold-kb/injection-format.d.ts +25 -0
  558. package/dist/scaffold-kb/injection-format.d.ts.map +1 -0
  559. package/dist/scaffold-kb/injection-format.js +55 -0
  560. package/dist/scaffold-kb/injection-format.js.map +1 -0
  561. package/dist/scaffold-kb/kb-writer.d.ts +13 -0
  562. package/dist/scaffold-kb/kb-writer.d.ts.map +1 -0
  563. package/dist/scaffold-kb/kb-writer.js +69 -0
  564. package/dist/scaffold-kb/kb-writer.js.map +1 -0
  565. package/dist/scaffold-kb/keyword-extract.d.ts +16 -0
  566. package/dist/scaffold-kb/keyword-extract.d.ts.map +1 -0
  567. package/dist/scaffold-kb/keyword-extract.js +49 -0
  568. package/dist/scaffold-kb/keyword-extract.js.map +1 -0
  569. package/dist/scaffold-kb/query-sanitizer.d.ts +28 -0
  570. package/dist/scaffold-kb/query-sanitizer.d.ts.map +1 -0
  571. package/dist/scaffold-kb/query-sanitizer.js +38 -0
  572. package/dist/scaffold-kb/query-sanitizer.js.map +1 -0
  573. package/dist/scaffold-kb/recall-eval.d.ts +48 -0
  574. package/dist/scaffold-kb/recall-eval.d.ts.map +1 -0
  575. package/dist/scaffold-kb/recall-eval.js +55 -0
  576. package/dist/scaffold-kb/recall-eval.js.map +1 -0
  577. package/dist/scaffold-kb/schema-compat.d.ts +22 -0
  578. package/dist/scaffold-kb/schema-compat.d.ts.map +1 -0
  579. package/dist/scaffold-kb/schema-compat.js +32 -0
  580. package/dist/scaffold-kb/schema-compat.js.map +1 -0
  581. package/dist/scaffold-kb/search-core.d.ts +42 -0
  582. package/dist/scaffold-kb/search-core.d.ts.map +1 -0
  583. package/dist/scaffold-kb/search-core.js +89 -0
  584. package/dist/scaffold-kb/search-core.js.map +1 -0
  585. package/dist/scaffold-kb/sqlite-engine.d.ts +58 -0
  586. package/dist/scaffold-kb/sqlite-engine.d.ts.map +1 -0
  587. package/dist/scaffold-kb/sqlite-engine.js +61 -0
  588. package/dist/scaffold-kb/sqlite-engine.js.map +1 -0
  589. package/dist/scaffold-kb/sqlite-writer.d.ts +18 -0
  590. package/dist/scaffold-kb/sqlite-writer.d.ts.map +1 -0
  591. package/dist/scaffold-kb/sqlite-writer.js +76 -0
  592. package/dist/scaffold-kb/sqlite-writer.js.map +1 -0
  593. package/dist/scaffold-kb/tokenizer.d.ts +26 -0
  594. package/dist/scaffold-kb/tokenizer.d.ts.map +1 -0
  595. package/dist/scaffold-kb/tokenizer.js +97 -0
  596. package/dist/scaffold-kb/tokenizer.js.map +1 -0
  597. package/dist/scaffold-kb/types.d.ts +157 -0
  598. package/dist/scaffold-kb/types.d.ts.map +1 -0
  599. package/dist/scaffold-kb/types.js +5 -0
  600. package/dist/scaffold-kb/types.js.map +1 -0
  601. package/dist/utils/file-scanner.d.ts +15 -0
  602. package/dist/utils/file-scanner.d.ts.map +1 -1
  603. package/dist/utils/file-scanner.js +18 -1
  604. package/dist/utils/file-scanner.js.map +1 -1
  605. package/dist/utils/string-distance.d.ts +20 -0
  606. package/dist/utils/string-distance.d.ts.map +1 -0
  607. package/dist/utils/string-distance.js +38 -0
  608. package/dist/utils/string-distance.js.map +1 -0
  609. package/package.json +22 -3
  610. package/plugins/demo-kb-en/.claude-plugin/plugin.json +11 -0
  611. package/plugins/demo-kb-en/.mcp.json +8 -0
  612. package/plugins/demo-kb-en/FIXTURE.json +23 -0
  613. package/plugins/demo-kb-en/FIXTURE.md +53 -0
  614. package/plugins/demo-kb-en/ingest-samples/meeting-notes.md +13 -0
  615. package/plugins/demo-kb-en/kb/api-entities.json +3445 -0
  616. package/plugins/demo-kb-en/kb/chunks.sqlite +0 -0
  617. package/plugins/demo-kb-en/kb/doc-graph.json +113 -0
  618. package/plugins/demo-kb-zh/.claude-plugin/plugin.json +11 -0
  619. package/plugins/demo-kb-zh/.mcp.json +8 -0
  620. package/plugins/demo-kb-zh/FIXTURE.json +23 -0
  621. package/plugins/demo-kb-zh/FIXTURE.md +63 -0
  622. package/plugins/demo-kb-zh/ingest-samples/meeting-notes.md +13 -0
  623. package/plugins/demo-kb-zh/kb/api-entities.json +990 -0
  624. package/plugins/demo-kb-zh/kb/chunks.sqlite +0 -0
  625. package/plugins/demo-kb-zh/kb/doc-graph.json +113 -0
  626. package/plugins/spec-driver/.claude-plugin/plugin.json +1 -1
  627. package/plugins/spec-driver/README.md +50 -1
  628. package/plugins/spec-driver/agents/implement.md +20 -1
  629. package/plugins/spec-driver/agents/plan.md +20 -1
  630. package/plugins/spec-driver/agents/quality-review.md +20 -1
  631. package/plugins/spec-driver/agents/spec-review.md +20 -1
  632. package/plugins/spec-driver/agents/verify.md +108 -1
  633. package/plugins/spec-driver/config/orchestration.yaml +39 -31
  634. package/plugins/spec-driver/contracts/orchestration-overrides-contract.yaml +27 -0
  635. package/plugins/spec-driver/contracts/orchestration-schema.mjs +272 -227
  636. package/plugins/spec-driver/contracts/wrapper-source-of-truth.yaml +3 -0
  637. package/plugins/spec-driver/docs/customization.md +134 -0
  638. package/plugins/spec-driver/docs/spectra-mcp-integration.md +165 -0
  639. package/plugins/spec-driver/hooks/hooks.json +9 -0
  640. package/plugins/spec-driver/hooks/stop-fix-compliance-check.sh +36 -0
  641. package/plugins/spec-driver/lib/delegation-contract.mjs +84 -0
  642. package/plugins/spec-driver/lib/orchestration-resolver.mjs +49 -0
  643. package/plugins/spec-driver/lib/orchestrator.mjs +29 -1
  644. package/plugins/spec-driver/lib/preference-rules.mjs +96 -0
  645. package/plugins/spec-driver/scripts/codex-skills.sh +28 -28
  646. package/plugins/spec-driver/scripts/dev/spike-fix-compliance-e2e.mjs +130 -0
  647. package/plugins/spec-driver/scripts/fix-compliance-judge.mjs +415 -0
  648. package/plugins/spec-driver/scripts/generate-adoption-insights.mjs +48 -1
  649. package/plugins/spec-driver/scripts/goal-loop-cli.mjs +307 -0
  650. package/plugins/spec-driver/scripts/init-project.sh +56 -0
  651. package/plugins/spec-driver/scripts/kb-prequery.mjs +125 -0
  652. package/plugins/spec-driver/scripts/lib/config-schema.mjs +200 -94
  653. package/plugins/spec-driver/scripts/lib/ensure-gitignore.sh +277 -0
  654. package/plugins/spec-driver/scripts/lib/extract-wrapper-body.mjs +136 -0
  655. package/plugins/spec-driver/scripts/lib/fix-compliance-core.mjs +434 -0
  656. package/plugins/spec-driver/scripts/lib/fix-compliance-io.mjs +335 -0
  657. package/plugins/spec-driver/scripts/lib/goal-loop-core.mjs +783 -0
  658. package/plugins/spec-driver/scripts/lib/init-project-output.sh +28 -0
  659. package/plugins/spec-driver/scripts/lib/load-zod.mjs +62 -0
  660. package/plugins/spec-driver/scripts/lib/project-profile-resolver.mjs +141 -49
  661. package/plugins/spec-driver/scripts/lib/project-profile-schema.mjs +88 -54
  662. package/plugins/spec-driver/scripts/postinstall.sh +13 -1
  663. package/plugins/spec-driver/scripts/record-workflow-run.mjs +75 -0
  664. package/plugins/spec-driver/scripts/sync-delegation-contract.mjs +187 -0
  665. package/plugins/spec-driver/scripts/sync-preference-rules.mjs +148 -0
  666. package/plugins/spec-driver/scripts/validate-orchestrator-models.mjs +156 -0
  667. package/plugins/spec-driver/scripts/validate-wrapper-sources.mjs +46 -1
  668. package/plugins/spec-driver/skills/spec-driver-feature/SKILL.md +302 -0
  669. package/plugins/spec-driver/skills/spec-driver-fix/SKILL.md +97 -8
  670. package/plugins/spec-driver/skills/spec-driver-implement/SKILL.md +18 -0
  671. package/plugins/spec-driver/skills/spec-driver-refactor/SKILL.md +10 -0
  672. package/plugins/spec-driver/skills/spec-driver-resume/SKILL.md +12 -1
  673. package/plugins/spec-driver/skills/spec-driver-story/SKILL.md +30 -0
  674. package/plugins/spec-driver/templates/delegation-contract.md +27 -0
  675. package/plugins/spec-driver/templates/goal-loop-override-template.yaml +284 -0
  676. package/plugins/spec-driver/templates/preference-rules.md +39 -0
  677. package/plugins/spec-driver/templates/specify-base/project-context-template.yaml +10 -0
  678. package/plugins/spectra/.claude-plugin/plugin.json +1 -1
  679. package/plugins/spectra/README.md +48 -1
  680. package/plugins/spectra/hooks/post-commit.sh +40 -0
  681. package/templates/module-spec.hbs +1 -0
  682. package/templates/product-overview.hbs +1 -1
@@ -152,6 +152,12 @@ export declare const SpecFrontmatterSchema: z.ZodObject<{
152
152
  fallbackReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
153
153
  /** 生成本 spec 时的批处理模式(Bug 142 修复);旧 spec 缺失此字段时视为 cache miss */
154
154
  generatedByMode: z.ZodOptional<z.ZodEnum<["full", "reading", "code-only"]>>;
155
+ /**
156
+ * 增量缓存 key(Feature 182);仅同目录多语言拆分组写入(`${sourceTarget}::${language}`)。
157
+ * sourceTarget 保持纯路径,本字段独立承载带语言后缀的 cache key,消除同目录多语言组键碰撞。
158
+ * 由 batch-orchestrator 在 languageSplit 组的 frontmatter 装饰点写入。
159
+ */
160
+ sourceTargetKey: z.ZodOptional<z.ZodString>;
155
161
  /** spec 身份类型(Feature 128);缺失时应用层默认视为 'canonical'(向后兼容历史 spec) */
156
162
  sourceKind: z.ZodOptional<z.ZodEnum<["canonical", "derived", "bundle_copy"]>>;
157
163
  /** 派生来源 spec 的 outputPath(Feature 128,相对于 projectRoot);canonical 时为 null 或 undefined */
@@ -187,7 +193,7 @@ export declare const SpecFrontmatterSchema: z.ZodObject<{
187
193
  contextTruncated: z.ZodOptional<z.ZodBoolean>;
188
194
  }, "strip", z.ZodTypeAny, {
189
195
  type: "module-spec";
190
- confidence: "low" | "medium" | "high";
196
+ confidence: "high" | "medium" | "low";
191
197
  version: string;
192
198
  generatedBy: string;
193
199
  sourceTarget: string;
@@ -205,6 +211,7 @@ export declare const SpecFrontmatterSchema: z.ZodObject<{
205
211
  crossLanguageRefs?: string[] | undefined;
206
212
  displayName?: string | undefined;
207
213
  generatedByMode?: "full" | "reading" | "code-only" | undefined;
214
+ sourceTargetKey?: string | undefined;
208
215
  sourceKind?: "canonical" | "derived" | "bundle_copy" | undefined;
209
216
  derivedFrom?: string | null | undefined;
210
217
  costBreakdown?: {
@@ -216,7 +223,7 @@ export declare const SpecFrontmatterSchema: z.ZodObject<{
216
223
  contextTruncated?: boolean | undefined;
217
224
  }, {
218
225
  type: "module-spec";
219
- confidence: "low" | "medium" | "high";
226
+ confidence: "high" | "medium" | "low";
220
227
  version: string;
221
228
  generatedBy: string;
222
229
  sourceTarget: string;
@@ -234,6 +241,7 @@ export declare const SpecFrontmatterSchema: z.ZodObject<{
234
241
  crossLanguageRefs?: string[] | undefined;
235
242
  displayName?: string | undefined;
236
243
  generatedByMode?: "full" | "reading" | "code-only" | undefined;
244
+ sourceTargetKey?: string | undefined;
237
245
  sourceKind?: "canonical" | "derived" | "bundle_copy" | undefined;
238
246
  derivedFrom?: string | null | undefined;
239
247
  costBreakdown?: {
@@ -319,23 +327,23 @@ export declare const CrossReferenceLinkSchema: z.ZodObject<{
319
327
  evidenceCount: z.ZodNumber;
320
328
  summary: z.ZodString;
321
329
  }, "strip", z.ZodTypeAny, {
322
- kind: "same-module" | "cross-module";
330
+ kind: "cross-module" | "same-module";
323
331
  label: string;
332
+ summary: string;
324
333
  href: string;
325
334
  targetSpecPath: string;
326
335
  targetSourceTarget: string;
327
336
  direction: "internal" | "outbound" | "inbound" | "bidirectional";
328
337
  evidenceCount: number;
329
- summary: string;
330
338
  }, {
331
- kind: "same-module" | "cross-module";
339
+ kind: "cross-module" | "same-module";
332
340
  label: string;
341
+ summary: string;
333
342
  href: string;
334
343
  targetSpecPath: string;
335
344
  targetSourceTarget: string;
336
345
  direction: "internal" | "outbound" | "inbound" | "bidirectional";
337
346
  evidenceCount: number;
338
- summary: string;
339
347
  }>;
340
348
  export type CrossReferenceLink = z.infer<typeof CrossReferenceLinkSchema>;
341
349
  /** 当前模块的交叉引用索引 */
@@ -351,23 +359,23 @@ export declare const ModuleCrossReferenceIndexSchema: z.ZodObject<{
351
359
  evidenceCount: z.ZodNumber;
352
360
  summary: z.ZodString;
353
361
  }, "strip", z.ZodTypeAny, {
354
- kind: "same-module" | "cross-module";
362
+ kind: "cross-module" | "same-module";
355
363
  label: string;
364
+ summary: string;
356
365
  href: string;
357
366
  targetSpecPath: string;
358
367
  targetSourceTarget: string;
359
368
  direction: "internal" | "outbound" | "inbound" | "bidirectional";
360
369
  evidenceCount: number;
361
- summary: string;
362
370
  }, {
363
- kind: "same-module" | "cross-module";
371
+ kind: "cross-module" | "same-module";
364
372
  label: string;
373
+ summary: string;
365
374
  href: string;
366
375
  targetSpecPath: string;
367
376
  targetSourceTarget: string;
368
377
  direction: "internal" | "outbound" | "inbound" | "bidirectional";
369
378
  evidenceCount: number;
370
- summary: string;
371
379
  }>, "many">;
372
380
  crossModule: z.ZodArray<z.ZodObject<{
373
381
  label: z.ZodString;
@@ -379,67 +387,67 @@ export declare const ModuleCrossReferenceIndexSchema: z.ZodObject<{
379
387
  evidenceCount: z.ZodNumber;
380
388
  summary: z.ZodString;
381
389
  }, "strip", z.ZodTypeAny, {
382
- kind: "same-module" | "cross-module";
390
+ kind: "cross-module" | "same-module";
383
391
  label: string;
392
+ summary: string;
384
393
  href: string;
385
394
  targetSpecPath: string;
386
395
  targetSourceTarget: string;
387
396
  direction: "internal" | "outbound" | "inbound" | "bidirectional";
388
397
  evidenceCount: number;
389
- summary: string;
390
398
  }, {
391
- kind: "same-module" | "cross-module";
399
+ kind: "cross-module" | "same-module";
392
400
  label: string;
401
+ summary: string;
393
402
  href: string;
394
403
  targetSpecPath: string;
395
404
  targetSourceTarget: string;
396
405
  direction: "internal" | "outbound" | "inbound" | "bidirectional";
397
406
  evidenceCount: number;
398
- summary: string;
399
407
  }>, "many">;
400
408
  }, "strip", z.ZodTypeAny, {
401
409
  generatedAt: string;
402
410
  sameModule: {
403
- kind: "same-module" | "cross-module";
411
+ kind: "cross-module" | "same-module";
404
412
  label: string;
413
+ summary: string;
405
414
  href: string;
406
415
  targetSpecPath: string;
407
416
  targetSourceTarget: string;
408
417
  direction: "internal" | "outbound" | "inbound" | "bidirectional";
409
418
  evidenceCount: number;
410
- summary: string;
411
419
  }[];
412
420
  crossModule: {
413
- kind: "same-module" | "cross-module";
421
+ kind: "cross-module" | "same-module";
414
422
  label: string;
423
+ summary: string;
415
424
  href: string;
416
425
  targetSpecPath: string;
417
426
  targetSourceTarget: string;
418
427
  direction: "internal" | "outbound" | "inbound" | "bidirectional";
419
428
  evidenceCount: number;
420
- summary: string;
421
429
  }[];
422
430
  }, {
423
431
  generatedAt: string;
424
432
  sameModule: {
425
- kind: "same-module" | "cross-module";
433
+ kind: "cross-module" | "same-module";
426
434
  label: string;
435
+ summary: string;
427
436
  href: string;
428
437
  targetSpecPath: string;
429
438
  targetSourceTarget: string;
430
439
  direction: "internal" | "outbound" | "inbound" | "bidirectional";
431
440
  evidenceCount: number;
432
- summary: string;
433
441
  }[];
434
442
  crossModule: {
435
- kind: "same-module" | "cross-module";
443
+ kind: "cross-module" | "same-module";
436
444
  label: string;
445
+ summary: string;
437
446
  href: string;
438
447
  targetSpecPath: string;
439
448
  targetSourceTarget: string;
440
449
  direction: "internal" | "outbound" | "inbound" | "bidirectional";
441
450
  evidenceCount: number;
442
- summary: string;
443
451
  }[];
444
452
  }>;
445
453
  export type ModuleCrossReferenceIndex = z.infer<typeof ModuleCrossReferenceIndexSchema>;
@@ -479,6 +487,12 @@ export declare const ModuleSpecSchema: z.ZodObject<{
479
487
  fallbackReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
480
488
  /** 生成本 spec 时的批处理模式(Bug 142 修复);旧 spec 缺失此字段时视为 cache miss */
481
489
  generatedByMode: z.ZodOptional<z.ZodEnum<["full", "reading", "code-only"]>>;
490
+ /**
491
+ * 增量缓存 key(Feature 182);仅同目录多语言拆分组写入(`${sourceTarget}::${language}`)。
492
+ * sourceTarget 保持纯路径,本字段独立承载带语言后缀的 cache key,消除同目录多语言组键碰撞。
493
+ * 由 batch-orchestrator 在 languageSplit 组的 frontmatter 装饰点写入。
494
+ */
495
+ sourceTargetKey: z.ZodOptional<z.ZodString>;
482
496
  /** spec 身份类型(Feature 128);缺失时应用层默认视为 'canonical'(向后兼容历史 spec) */
483
497
  sourceKind: z.ZodOptional<z.ZodEnum<["canonical", "derived", "bundle_copy"]>>;
484
498
  /** 派生来源 spec 的 outputPath(Feature 128,相对于 projectRoot);canonical 时为 null 或 undefined */
@@ -514,7 +528,7 @@ export declare const ModuleSpecSchema: z.ZodObject<{
514
528
  contextTruncated: z.ZodOptional<z.ZodBoolean>;
515
529
  }, "strip", z.ZodTypeAny, {
516
530
  type: "module-spec";
517
- confidence: "low" | "medium" | "high";
531
+ confidence: "high" | "medium" | "low";
518
532
  version: string;
519
533
  generatedBy: string;
520
534
  sourceTarget: string;
@@ -532,6 +546,7 @@ export declare const ModuleSpecSchema: z.ZodObject<{
532
546
  crossLanguageRefs?: string[] | undefined;
533
547
  displayName?: string | undefined;
534
548
  generatedByMode?: "full" | "reading" | "code-only" | undefined;
549
+ sourceTargetKey?: string | undefined;
535
550
  sourceKind?: "canonical" | "derived" | "bundle_copy" | undefined;
536
551
  derivedFrom?: string | null | undefined;
537
552
  costBreakdown?: {
@@ -543,7 +558,7 @@ export declare const ModuleSpecSchema: z.ZodObject<{
543
558
  contextTruncated?: boolean | undefined;
544
559
  }, {
545
560
  type: "module-spec";
546
- confidence: "low" | "medium" | "high";
561
+ confidence: "high" | "medium" | "low";
547
562
  version: string;
548
563
  generatedBy: string;
549
564
  sourceTarget: string;
@@ -561,6 +576,7 @@ export declare const ModuleSpecSchema: z.ZodObject<{
561
576
  crossLanguageRefs?: string[] | undefined;
562
577
  displayName?: string | undefined;
563
578
  generatedByMode?: "full" | "reading" | "code-only" | undefined;
579
+ sourceTargetKey?: string | undefined;
564
580
  sourceKind?: "canonical" | "derived" | "bundle_copy" | undefined;
565
581
  derivedFrom?: string | null | undefined;
566
582
  costBreakdown?: {
@@ -640,23 +656,23 @@ export declare const ModuleSpecSchema: z.ZodObject<{
640
656
  evidenceCount: z.ZodNumber;
641
657
  summary: z.ZodString;
642
658
  }, "strip", z.ZodTypeAny, {
643
- kind: "same-module" | "cross-module";
659
+ kind: "cross-module" | "same-module";
644
660
  label: string;
661
+ summary: string;
645
662
  href: string;
646
663
  targetSpecPath: string;
647
664
  targetSourceTarget: string;
648
665
  direction: "internal" | "outbound" | "inbound" | "bidirectional";
649
666
  evidenceCount: number;
650
- summary: string;
651
667
  }, {
652
- kind: "same-module" | "cross-module";
668
+ kind: "cross-module" | "same-module";
653
669
  label: string;
670
+ summary: string;
654
671
  href: string;
655
672
  targetSpecPath: string;
656
673
  targetSourceTarget: string;
657
674
  direction: "internal" | "outbound" | "inbound" | "bidirectional";
658
675
  evidenceCount: number;
659
- summary: string;
660
676
  }>, "many">;
661
677
  crossModule: z.ZodArray<z.ZodObject<{
662
678
  label: z.ZodString;
@@ -668,67 +684,67 @@ export declare const ModuleSpecSchema: z.ZodObject<{
668
684
  evidenceCount: z.ZodNumber;
669
685
  summary: z.ZodString;
670
686
  }, "strip", z.ZodTypeAny, {
671
- kind: "same-module" | "cross-module";
687
+ kind: "cross-module" | "same-module";
672
688
  label: string;
689
+ summary: string;
673
690
  href: string;
674
691
  targetSpecPath: string;
675
692
  targetSourceTarget: string;
676
693
  direction: "internal" | "outbound" | "inbound" | "bidirectional";
677
694
  evidenceCount: number;
678
- summary: string;
679
695
  }, {
680
- kind: "same-module" | "cross-module";
696
+ kind: "cross-module" | "same-module";
681
697
  label: string;
698
+ summary: string;
682
699
  href: string;
683
700
  targetSpecPath: string;
684
701
  targetSourceTarget: string;
685
702
  direction: "internal" | "outbound" | "inbound" | "bidirectional";
686
703
  evidenceCount: number;
687
- summary: string;
688
704
  }>, "many">;
689
705
  }, "strip", z.ZodTypeAny, {
690
706
  generatedAt: string;
691
707
  sameModule: {
692
- kind: "same-module" | "cross-module";
708
+ kind: "cross-module" | "same-module";
693
709
  label: string;
710
+ summary: string;
694
711
  href: string;
695
712
  targetSpecPath: string;
696
713
  targetSourceTarget: string;
697
714
  direction: "internal" | "outbound" | "inbound" | "bidirectional";
698
715
  evidenceCount: number;
699
- summary: string;
700
716
  }[];
701
717
  crossModule: {
702
- kind: "same-module" | "cross-module";
718
+ kind: "cross-module" | "same-module";
703
719
  label: string;
720
+ summary: string;
704
721
  href: string;
705
722
  targetSpecPath: string;
706
723
  targetSourceTarget: string;
707
724
  direction: "internal" | "outbound" | "inbound" | "bidirectional";
708
725
  evidenceCount: number;
709
- summary: string;
710
726
  }[];
711
727
  }, {
712
728
  generatedAt: string;
713
729
  sameModule: {
714
- kind: "same-module" | "cross-module";
730
+ kind: "cross-module" | "same-module";
715
731
  label: string;
732
+ summary: string;
716
733
  href: string;
717
734
  targetSpecPath: string;
718
735
  targetSourceTarget: string;
719
736
  direction: "internal" | "outbound" | "inbound" | "bidirectional";
720
737
  evidenceCount: number;
721
- summary: string;
722
738
  }[];
723
739
  crossModule: {
724
- kind: "same-module" | "cross-module";
740
+ kind: "cross-module" | "same-module";
725
741
  label: string;
742
+ summary: string;
726
743
  href: string;
727
744
  targetSpecPath: string;
728
745
  targetSourceTarget: string;
729
746
  direction: "internal" | "outbound" | "inbound" | "bidirectional";
730
747
  evidenceCount: number;
731
- summary: string;
732
748
  }[];
733
749
  }>>;
734
750
  baselineSkeleton: z.ZodObject<{
@@ -771,7 +787,7 @@ export declare const ModuleSpecSchema: z.ZodObject<{
771
787
  }>, "many">>;
772
788
  }, "strip", z.ZodTypeAny, {
773
789
  name: string;
774
- kind: "function" | "class" | "interface" | "type" | "enum" | "const" | "variable" | "struct" | "trait" | "protocol" | "data_class" | "module";
790
+ kind: "function" | "type" | "class" | "interface" | "enum" | "const" | "variable" | "struct" | "trait" | "protocol" | "data_class" | "module";
775
791
  signature: string;
776
792
  isDefault: boolean;
777
793
  startLine: number;
@@ -789,7 +805,7 @@ export declare const ModuleSpecSchema: z.ZodObject<{
789
805
  }[] | undefined;
790
806
  }, {
791
807
  name: string;
792
- kind: "function" | "class" | "interface" | "type" | "enum" | "const" | "variable" | "struct" | "trait" | "protocol" | "data_class" | "module";
808
+ kind: "function" | "type" | "class" | "interface" | "enum" | "const" | "variable" | "struct" | "trait" | "protocol" | "data_class" | "module";
793
809
  signature: string;
794
810
  isDefault: boolean;
795
811
  startLine: number;
@@ -813,6 +829,7 @@ export declare const ModuleSpecSchema: z.ZodObject<{
813
829
  namedImports: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
814
830
  defaultImport: z.ZodOptional<z.ZodNullable<z.ZodString>>;
815
831
  isTypeOnly: z.ZodBoolean;
832
+ importType: z.ZodOptional<z.ZodEnum<["static", "dynamic", "type-only", "commonjs-require"]>>;
816
833
  }, "strip", z.ZodTypeAny, {
817
834
  moduleSpecifier: string;
818
835
  isRelative: boolean;
@@ -820,6 +837,7 @@ export declare const ModuleSpecSchema: z.ZodObject<{
820
837
  resolvedPath?: string | null | undefined;
821
838
  namedImports?: string[] | undefined;
822
839
  defaultImport?: string | null | undefined;
840
+ importType?: "static" | "dynamic" | "type-only" | "commonjs-require" | undefined;
823
841
  }, {
824
842
  moduleSpecifier: string;
825
843
  isRelative: boolean;
@@ -827,6 +845,7 @@ export declare const ModuleSpecSchema: z.ZodObject<{
827
845
  resolvedPath?: string | null | undefined;
828
846
  namedImports?: string[] | undefined;
829
847
  defaultImport?: string | null | undefined;
848
+ importType?: "static" | "dynamic" | "type-only" | "commonjs-require" | undefined;
830
849
  }>, "many">;
831
850
  parseErrors: z.ZodOptional<z.ZodArray<z.ZodObject<{
832
851
  line: z.ZodNumber;
@@ -848,13 +867,35 @@ export declare const ModuleSpecSchema: z.ZodObject<{
848
867
  analyzedAt: z.ZodString;
849
868
  parserUsed: z.ZodEnum<["ts-morph", "tree-sitter", "baseline", "reconstructed"]>;
850
869
  moduleDoc: z.ZodOptional<z.ZodString>;
870
+ callSites: z.ZodOptional<z.ZodArray<z.ZodObject<{
871
+ calleeName: z.ZodString;
872
+ calleeKind: z.ZodEnum<["free", "member", "cross-module", "dunder", "super", "decorator", "unresolved"]>;
873
+ line: z.ZodNumber;
874
+ column: z.ZodOptional<z.ZodNumber>;
875
+ callerContext: z.ZodOptional<z.ZodString>;
876
+ calleeQualifier: z.ZodOptional<z.ZodString>;
877
+ }, "strip", z.ZodTypeAny, {
878
+ calleeName: string;
879
+ calleeKind: "free" | "member" | "cross-module" | "dunder" | "super" | "decorator" | "unresolved";
880
+ line: number;
881
+ column?: number | undefined;
882
+ callerContext?: string | undefined;
883
+ calleeQualifier?: string | undefined;
884
+ }, {
885
+ calleeName: string;
886
+ calleeKind: "free" | "member" | "cross-module" | "dunder" | "super" | "decorator" | "unresolved";
887
+ line: number;
888
+ column?: number | undefined;
889
+ callerContext?: string | undefined;
890
+ calleeQualifier?: string | undefined;
891
+ }>, "many">>;
851
892
  }, "strip", z.ZodTypeAny, {
852
893
  filePath: string;
853
894
  language: "typescript" | "javascript" | "python" | "go" | "java" | "rust" | "kotlin" | "cpp" | "ruby" | "swift";
854
895
  loc: number;
855
896
  exports: {
856
897
  name: string;
857
- kind: "function" | "class" | "interface" | "type" | "enum" | "const" | "variable" | "struct" | "trait" | "protocol" | "data_class" | "module";
898
+ kind: "function" | "type" | "class" | "interface" | "enum" | "const" | "variable" | "struct" | "trait" | "protocol" | "data_class" | "module";
858
899
  signature: string;
859
900
  isDefault: boolean;
860
901
  startLine: number;
@@ -878,6 +919,7 @@ export declare const ModuleSpecSchema: z.ZodObject<{
878
919
  resolvedPath?: string | null | undefined;
879
920
  namedImports?: string[] | undefined;
880
921
  defaultImport?: string | null | undefined;
922
+ importType?: "static" | "dynamic" | "type-only" | "commonjs-require" | undefined;
881
923
  }[];
882
924
  hash: string;
883
925
  analyzedAt: string;
@@ -889,13 +931,21 @@ export declare const ModuleSpecSchema: z.ZodObject<{
889
931
  affectedSymbols?: string[] | undefined;
890
932
  }[] | undefined;
891
933
  moduleDoc?: string | undefined;
934
+ callSites?: {
935
+ calleeName: string;
936
+ calleeKind: "free" | "member" | "cross-module" | "dunder" | "super" | "decorator" | "unresolved";
937
+ line: number;
938
+ column?: number | undefined;
939
+ callerContext?: string | undefined;
940
+ calleeQualifier?: string | undefined;
941
+ }[] | undefined;
892
942
  }, {
893
943
  filePath: string;
894
944
  language: "typescript" | "javascript" | "python" | "go" | "java" | "rust" | "kotlin" | "cpp" | "ruby" | "swift";
895
945
  loc: number;
896
946
  exports: {
897
947
  name: string;
898
- kind: "function" | "class" | "interface" | "type" | "enum" | "const" | "variable" | "struct" | "trait" | "protocol" | "data_class" | "module";
948
+ kind: "function" | "type" | "class" | "interface" | "enum" | "const" | "variable" | "struct" | "trait" | "protocol" | "data_class" | "module";
899
949
  signature: string;
900
950
  isDefault: boolean;
901
951
  startLine: number;
@@ -919,6 +969,7 @@ export declare const ModuleSpecSchema: z.ZodObject<{
919
969
  resolvedPath?: string | null | undefined;
920
970
  namedImports?: string[] | undefined;
921
971
  defaultImport?: string | null | undefined;
972
+ importType?: "static" | "dynamic" | "type-only" | "commonjs-require" | undefined;
922
973
  }[];
923
974
  hash: string;
924
975
  analyzedAt: string;
@@ -930,12 +981,31 @@ export declare const ModuleSpecSchema: z.ZodObject<{
930
981
  affectedSymbols?: string[] | undefined;
931
982
  }[] | undefined;
932
983
  moduleDoc?: string | undefined;
984
+ callSites?: {
985
+ calleeName: string;
986
+ calleeKind: "free" | "member" | "cross-module" | "dunder" | "super" | "decorator" | "unresolved";
987
+ line: number;
988
+ column?: number | undefined;
989
+ callerContext?: string | undefined;
990
+ calleeQualifier?: string | undefined;
991
+ }[] | undefined;
933
992
  }>;
934
993
  outputPath: z.ZodString;
935
994
  }, "strip", z.ZodTypeAny, {
995
+ sections: {
996
+ intent: string;
997
+ interfaceDefinition: string;
998
+ businessLogic: string;
999
+ dataStructures: string;
1000
+ constraints: string;
1001
+ edgeCases: string;
1002
+ technicalDebt: string;
1003
+ testCoverage: string;
1004
+ dependencies: string;
1005
+ };
936
1006
  frontmatter: {
937
1007
  type: "module-spec";
938
- confidence: "low" | "medium" | "high";
1008
+ confidence: "high" | "medium" | "low";
939
1009
  version: string;
940
1010
  generatedBy: string;
941
1011
  sourceTarget: string;
@@ -953,6 +1023,7 @@ export declare const ModuleSpecSchema: z.ZodObject<{
953
1023
  crossLanguageRefs?: string[] | undefined;
954
1024
  displayName?: string | undefined;
955
1025
  generatedByMode?: "full" | "reading" | "code-only" | undefined;
1026
+ sourceTargetKey?: string | undefined;
956
1027
  sourceKind?: "canonical" | "derived" | "bundle_copy" | undefined;
957
1028
  derivedFrom?: string | null | undefined;
958
1029
  costBreakdown?: {
@@ -963,17 +1034,6 @@ export declare const ModuleSpecSchema: z.ZodObject<{
963
1034
  } | undefined;
964
1035
  contextTruncated?: boolean | undefined;
965
1036
  };
966
- sections: {
967
- intent: string;
968
- interfaceDefinition: string;
969
- businessLogic: string;
970
- dataStructures: string;
971
- constraints: string;
972
- edgeCases: string;
973
- technicalDebt: string;
974
- testCoverage: string;
975
- dependencies: string;
976
- };
977
1037
  fileInventory: {
978
1038
  path: string;
979
1039
  loc: number;
@@ -985,7 +1045,7 @@ export declare const ModuleSpecSchema: z.ZodObject<{
985
1045
  loc: number;
986
1046
  exports: {
987
1047
  name: string;
988
- kind: "function" | "class" | "interface" | "type" | "enum" | "const" | "variable" | "struct" | "trait" | "protocol" | "data_class" | "module";
1048
+ kind: "function" | "type" | "class" | "interface" | "enum" | "const" | "variable" | "struct" | "trait" | "protocol" | "data_class" | "module";
989
1049
  signature: string;
990
1050
  isDefault: boolean;
991
1051
  startLine: number;
@@ -1009,6 +1069,7 @@ export declare const ModuleSpecSchema: z.ZodObject<{
1009
1069
  resolvedPath?: string | null | undefined;
1010
1070
  namedImports?: string[] | undefined;
1011
1071
  defaultImport?: string | null | undefined;
1072
+ importType?: "static" | "dynamic" | "type-only" | "commonjs-require" | undefined;
1012
1073
  }[];
1013
1074
  hash: string;
1014
1075
  analyzedAt: string;
@@ -1020,6 +1081,14 @@ export declare const ModuleSpecSchema: z.ZodObject<{
1020
1081
  affectedSymbols?: string[] | undefined;
1021
1082
  }[] | undefined;
1022
1083
  moduleDoc?: string | undefined;
1084
+ callSites?: {
1085
+ calleeName: string;
1086
+ calleeKind: "free" | "member" | "cross-module" | "dunder" | "super" | "decorator" | "unresolved";
1087
+ line: number;
1088
+ column?: number | undefined;
1089
+ callerContext?: string | undefined;
1090
+ calleeQualifier?: string | undefined;
1091
+ }[] | undefined;
1023
1092
  };
1024
1093
  outputPath: string;
1025
1094
  mermaidDiagrams?: {
@@ -1030,30 +1099,41 @@ export declare const ModuleSpecSchema: z.ZodObject<{
1030
1099
  crossReferenceIndex?: {
1031
1100
  generatedAt: string;
1032
1101
  sameModule: {
1033
- kind: "same-module" | "cross-module";
1102
+ kind: "cross-module" | "same-module";
1034
1103
  label: string;
1104
+ summary: string;
1035
1105
  href: string;
1036
1106
  targetSpecPath: string;
1037
1107
  targetSourceTarget: string;
1038
1108
  direction: "internal" | "outbound" | "inbound" | "bidirectional";
1039
1109
  evidenceCount: number;
1040
- summary: string;
1041
1110
  }[];
1042
1111
  crossModule: {
1043
- kind: "same-module" | "cross-module";
1112
+ kind: "cross-module" | "same-module";
1044
1113
  label: string;
1114
+ summary: string;
1045
1115
  href: string;
1046
1116
  targetSpecPath: string;
1047
1117
  targetSourceTarget: string;
1048
1118
  direction: "internal" | "outbound" | "inbound" | "bidirectional";
1049
1119
  evidenceCount: number;
1050
- summary: string;
1051
1120
  }[];
1052
1121
  } | undefined;
1053
1122
  }, {
1123
+ sections: {
1124
+ intent: string;
1125
+ interfaceDefinition: string;
1126
+ businessLogic: string;
1127
+ dataStructures: string;
1128
+ constraints: string;
1129
+ edgeCases: string;
1130
+ technicalDebt: string;
1131
+ testCoverage: string;
1132
+ dependencies: string;
1133
+ };
1054
1134
  frontmatter: {
1055
1135
  type: "module-spec";
1056
- confidence: "low" | "medium" | "high";
1136
+ confidence: "high" | "medium" | "low";
1057
1137
  version: string;
1058
1138
  generatedBy: string;
1059
1139
  sourceTarget: string;
@@ -1071,6 +1151,7 @@ export declare const ModuleSpecSchema: z.ZodObject<{
1071
1151
  crossLanguageRefs?: string[] | undefined;
1072
1152
  displayName?: string | undefined;
1073
1153
  generatedByMode?: "full" | "reading" | "code-only" | undefined;
1154
+ sourceTargetKey?: string | undefined;
1074
1155
  sourceKind?: "canonical" | "derived" | "bundle_copy" | undefined;
1075
1156
  derivedFrom?: string | null | undefined;
1076
1157
  costBreakdown?: {
@@ -1081,17 +1162,6 @@ export declare const ModuleSpecSchema: z.ZodObject<{
1081
1162
  } | undefined;
1082
1163
  contextTruncated?: boolean | undefined;
1083
1164
  };
1084
- sections: {
1085
- intent: string;
1086
- interfaceDefinition: string;
1087
- businessLogic: string;
1088
- dataStructures: string;
1089
- constraints: string;
1090
- edgeCases: string;
1091
- technicalDebt: string;
1092
- testCoverage: string;
1093
- dependencies: string;
1094
- };
1095
1165
  fileInventory: {
1096
1166
  path: string;
1097
1167
  loc: number;
@@ -1103,7 +1173,7 @@ export declare const ModuleSpecSchema: z.ZodObject<{
1103
1173
  loc: number;
1104
1174
  exports: {
1105
1175
  name: string;
1106
- kind: "function" | "class" | "interface" | "type" | "enum" | "const" | "variable" | "struct" | "trait" | "protocol" | "data_class" | "module";
1176
+ kind: "function" | "type" | "class" | "interface" | "enum" | "const" | "variable" | "struct" | "trait" | "protocol" | "data_class" | "module";
1107
1177
  signature: string;
1108
1178
  isDefault: boolean;
1109
1179
  startLine: number;
@@ -1127,6 +1197,7 @@ export declare const ModuleSpecSchema: z.ZodObject<{
1127
1197
  resolvedPath?: string | null | undefined;
1128
1198
  namedImports?: string[] | undefined;
1129
1199
  defaultImport?: string | null | undefined;
1200
+ importType?: "static" | "dynamic" | "type-only" | "commonjs-require" | undefined;
1130
1201
  }[];
1131
1202
  hash: string;
1132
1203
  analyzedAt: string;
@@ -1138,6 +1209,14 @@ export declare const ModuleSpecSchema: z.ZodObject<{
1138
1209
  affectedSymbols?: string[] | undefined;
1139
1210
  }[] | undefined;
1140
1211
  moduleDoc?: string | undefined;
1212
+ callSites?: {
1213
+ calleeName: string;
1214
+ calleeKind: "free" | "member" | "cross-module" | "dunder" | "super" | "decorator" | "unresolved";
1215
+ line: number;
1216
+ column?: number | undefined;
1217
+ callerContext?: string | undefined;
1218
+ calleeQualifier?: string | undefined;
1219
+ }[] | undefined;
1141
1220
  };
1142
1221
  outputPath: string;
1143
1222
  mermaidDiagrams?: {
@@ -1148,24 +1227,24 @@ export declare const ModuleSpecSchema: z.ZodObject<{
1148
1227
  crossReferenceIndex?: {
1149
1228
  generatedAt: string;
1150
1229
  sameModule: {
1151
- kind: "same-module" | "cross-module";
1230
+ kind: "cross-module" | "same-module";
1152
1231
  label: string;
1232
+ summary: string;
1153
1233
  href: string;
1154
1234
  targetSpecPath: string;
1155
1235
  targetSourceTarget: string;
1156
1236
  direction: "internal" | "outbound" | "inbound" | "bidirectional";
1157
1237
  evidenceCount: number;
1158
- summary: string;
1159
1238
  }[];
1160
1239
  crossModule: {
1161
- kind: "same-module" | "cross-module";
1240
+ kind: "cross-module" | "same-module";
1162
1241
  label: string;
1242
+ summary: string;
1163
1243
  href: string;
1164
1244
  targetSpecPath: string;
1165
1245
  targetSourceTarget: string;
1166
1246
  direction: "internal" | "outbound" | "inbound" | "bidirectional";
1167
1247
  evidenceCount: number;
1168
- summary: string;
1169
1248
  }[];
1170
1249
  } | undefined;
1171
1250
  }>;
@@ -1413,17 +1492,17 @@ export declare const DriftReportSchema: z.ZodObject<{
1413
1492
  removals: z.ZodNumber;
1414
1493
  modifications: z.ZodNumber;
1415
1494
  }, "strip", z.ZodTypeAny, {
1416
- low: number;
1417
- medium: number;
1418
1495
  high: number;
1496
+ medium: number;
1497
+ low: number;
1419
1498
  totalChanges: number;
1420
1499
  additions: number;
1421
1500
  removals: number;
1422
1501
  modifications: number;
1423
1502
  }, {
1424
- low: number;
1425
- medium: number;
1426
1503
  high: number;
1504
+ medium: number;
1505
+ low: number;
1427
1506
  totalChanges: number;
1428
1507
  additions: number;
1429
1508
  removals: number;
@@ -1494,16 +1573,16 @@ export declare const DriftReportSchema: z.ZodObject<{
1494
1573
  recommendation: z.ZodString;
1495
1574
  outputPath: z.ZodString;
1496
1575
  }, "strip", z.ZodTypeAny, {
1576
+ generatedAt: string;
1497
1577
  summary: {
1498
- low: number;
1499
- medium: number;
1500
1578
  high: number;
1579
+ medium: number;
1580
+ low: number;
1501
1581
  totalChanges: number;
1502
1582
  additions: number;
1503
1583
  removals: number;
1504
1584
  modifications: number;
1505
1585
  };
1506
- generatedAt: string;
1507
1586
  outputPath: string;
1508
1587
  specPath: string;
1509
1588
  sourcePath: string;
@@ -1524,16 +1603,16 @@ export declare const DriftReportSchema: z.ZodObject<{
1524
1603
  filteredNoise: number;
1525
1604
  recommendation: string;
1526
1605
  }, {
1606
+ generatedAt: string;
1527
1607
  summary: {
1528
- low: number;
1529
- medium: number;
1530
1608
  high: number;
1609
+ medium: number;
1610
+ low: number;
1531
1611
  totalChanges: number;
1532
1612
  additions: number;
1533
1613
  removals: number;
1534
1614
  modifications: number;
1535
1615
  };
1536
- generatedAt: string;
1537
1616
  outputPath: string;
1538
1617
  specPath: string;
1539
1618
  sourcePath: string;
@@ -1837,12 +1916,12 @@ export declare const SecretDetectionSchema: z.ZodObject<{
1837
1916
  }, "strip", z.ZodTypeAny, {
1838
1917
  type: string;
1839
1918
  line: number;
1840
- confidence: "low" | "medium" | "high";
1919
+ confidence: "high" | "medium" | "low";
1841
1920
  placeholder: string;
1842
1921
  }, {
1843
1922
  type: string;
1844
1923
  line: number;
1845
- confidence: "low" | "medium" | "high";
1924
+ confidence: "high" | "medium" | "low";
1846
1925
  placeholder: string;
1847
1926
  }>;
1848
1927
  export type SecretDetection = z.infer<typeof SecretDetectionSchema>;
@@ -1858,12 +1937,12 @@ export declare const RedactionResultSchema: z.ZodObject<{
1858
1937
  }, "strip", z.ZodTypeAny, {
1859
1938
  type: string;
1860
1939
  line: number;
1861
- confidence: "low" | "medium" | "high";
1940
+ confidence: "high" | "medium" | "low";
1862
1941
  placeholder: string;
1863
1942
  }, {
1864
1943
  type: string;
1865
1944
  line: number;
1866
- confidence: "low" | "medium" | "high";
1945
+ confidence: "high" | "medium" | "low";
1867
1946
  placeholder: string;
1868
1947
  }>, "many">;
1869
1948
  falsePositivesFiltered: z.ZodNumber;
@@ -1873,7 +1952,7 @@ export declare const RedactionResultSchema: z.ZodObject<{
1873
1952
  detections: {
1874
1953
  type: string;
1875
1954
  line: number;
1876
- confidence: "low" | "medium" | "high";
1955
+ confidence: "high" | "medium" | "low";
1877
1956
  placeholder: string;
1878
1957
  }[];
1879
1958
  falsePositivesFiltered: number;
@@ -1883,7 +1962,7 @@ export declare const RedactionResultSchema: z.ZodObject<{
1883
1962
  detections: {
1884
1963
  type: string;
1885
1964
  line: number;
1886
- confidence: "low" | "medium" | "high";
1965
+ confidence: "high" | "medium" | "low";
1887
1966
  placeholder: string;
1888
1967
  }[];
1889
1968
  falsePositivesFiltered: number;