openlore 2.0.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 (634) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +268 -0
  3. package/dist/api/analyze.d.ts +17 -0
  4. package/dist/api/analyze.d.ts.map +1 -0
  5. package/dist/api/analyze.js +143 -0
  6. package/dist/api/analyze.js.map +1 -0
  7. package/dist/api/audit.d.ts +10 -0
  8. package/dist/api/audit.d.ts.map +1 -0
  9. package/dist/api/audit.js +117 -0
  10. package/dist/api/audit.js.map +1 -0
  11. package/dist/api/decisions.d.ts +55 -0
  12. package/dist/api/decisions.d.ts.map +1 -0
  13. package/dist/api/decisions.js +157 -0
  14. package/dist/api/decisions.js.map +1 -0
  15. package/dist/api/drift.d.ts +21 -0
  16. package/dist/api/drift.d.ts.map +1 -0
  17. package/dist/api/drift.js +152 -0
  18. package/dist/api/drift.js.map +1 -0
  19. package/dist/api/generate.d.ts +18 -0
  20. package/dist/api/generate.d.ts.map +1 -0
  21. package/dist/api/generate.js +259 -0
  22. package/dist/api/generate.js.map +1 -0
  23. package/dist/api/index.d.ts +41 -0
  24. package/dist/api/index.d.ts.map +1 -0
  25. package/dist/api/index.js +34 -0
  26. package/dist/api/index.js.map +1 -0
  27. package/dist/api/init.d.ts +18 -0
  28. package/dist/api/init.d.ts.map +1 -0
  29. package/dist/api/init.js +83 -0
  30. package/dist/api/init.js.map +1 -0
  31. package/dist/api/run.d.ts +19 -0
  32. package/dist/api/run.d.ts.map +1 -0
  33. package/dist/api/run.js +312 -0
  34. package/dist/api/run.js.map +1 -0
  35. package/dist/api/specs.d.ts +49 -0
  36. package/dist/api/specs.d.ts.map +1 -0
  37. package/dist/api/specs.js +137 -0
  38. package/dist/api/specs.js.map +1 -0
  39. package/dist/api/types.d.ts +201 -0
  40. package/dist/api/types.d.ts.map +1 -0
  41. package/dist/api/types.js +9 -0
  42. package/dist/api/types.js.map +1 -0
  43. package/dist/api/verify.d.ts +20 -0
  44. package/dist/api/verify.d.ts.map +1 -0
  45. package/dist/api/verify.js +117 -0
  46. package/dist/api/verify.js.map +1 -0
  47. package/dist/cli/commands/analyze.d.ts +30 -0
  48. package/dist/cli/commands/analyze.d.ts.map +1 -0
  49. package/dist/cli/commands/analyze.js +683 -0
  50. package/dist/cli/commands/analyze.js.map +1 -0
  51. package/dist/cli/commands/audit.d.ts +9 -0
  52. package/dist/cli/commands/audit.d.ts.map +1 -0
  53. package/dist/cli/commands/audit.js +98 -0
  54. package/dist/cli/commands/audit.js.map +1 -0
  55. package/dist/cli/commands/decisions.d.ts +16 -0
  56. package/dist/cli/commands/decisions.d.ts.map +1 -0
  57. package/dist/cli/commands/decisions.js +864 -0
  58. package/dist/cli/commands/decisions.js.map +1 -0
  59. package/dist/cli/commands/digest.d.ts +9 -0
  60. package/dist/cli/commands/digest.d.ts.map +1 -0
  61. package/dist/cli/commands/digest.js +61 -0
  62. package/dist/cli/commands/digest.js.map +1 -0
  63. package/dist/cli/commands/doctor.d.ts +9 -0
  64. package/dist/cli/commands/doctor.d.ts.map +1 -0
  65. package/dist/cli/commands/doctor.js +398 -0
  66. package/dist/cli/commands/doctor.js.map +1 -0
  67. package/dist/cli/commands/drift.d.ts +9 -0
  68. package/dist/cli/commands/drift.d.ts.map +1 -0
  69. package/dist/cli/commands/drift.js +550 -0
  70. package/dist/cli/commands/drift.js.map +1 -0
  71. package/dist/cli/commands/generate.d.ts +9 -0
  72. package/dist/cli/commands/generate.d.ts.map +1 -0
  73. package/dist/cli/commands/generate.js +565 -0
  74. package/dist/cli/commands/generate.js.map +1 -0
  75. package/dist/cli/commands/init.d.ts +9 -0
  76. package/dist/cli/commands/init.d.ts.map +1 -0
  77. package/dist/cli/commands/init.js +173 -0
  78. package/dist/cli/commands/init.js.map +1 -0
  79. package/dist/cli/commands/mcp.d.ts +2235 -0
  80. package/dist/cli/commands/mcp.d.ts.map +1 -0
  81. package/dist/cli/commands/mcp.js +1384 -0
  82. package/dist/cli/commands/mcp.js.map +1 -0
  83. package/dist/cli/commands/refresh-stories.d.ts +10 -0
  84. package/dist/cli/commands/refresh-stories.d.ts.map +1 -0
  85. package/dist/cli/commands/refresh-stories.js +314 -0
  86. package/dist/cli/commands/refresh-stories.js.map +1 -0
  87. package/dist/cli/commands/run.d.ts +9 -0
  88. package/dist/cli/commands/run.d.ts.map +1 -0
  89. package/dist/cli/commands/run.js +459 -0
  90. package/dist/cli/commands/run.js.map +1 -0
  91. package/dist/cli/commands/setup.d.ts +19 -0
  92. package/dist/cli/commands/setup.d.ts.map +1 -0
  93. package/dist/cli/commands/setup.js +355 -0
  94. package/dist/cli/commands/setup.js.map +1 -0
  95. package/dist/cli/commands/test.d.ts +22 -0
  96. package/dist/cli/commands/test.d.ts.map +1 -0
  97. package/dist/cli/commands/test.js +180 -0
  98. package/dist/cli/commands/test.js.map +1 -0
  99. package/dist/cli/commands/verify.d.ts +9 -0
  100. package/dist/cli/commands/verify.d.ts.map +1 -0
  101. package/dist/cli/commands/verify.js +383 -0
  102. package/dist/cli/commands/verify.js.map +1 -0
  103. package/dist/cli/commands/view.d.ts +13 -0
  104. package/dist/cli/commands/view.d.ts.map +1 -0
  105. package/dist/cli/commands/view.js +547 -0
  106. package/dist/cli/commands/view.js.map +1 -0
  107. package/dist/cli/index.d.ts +9 -0
  108. package/dist/cli/index.d.ts.map +1 -0
  109. package/dist/cli/index.js +118 -0
  110. package/dist/cli/index.js.map +1 -0
  111. package/dist/cli/tui-approval.d.ts +11 -0
  112. package/dist/cli/tui-approval.d.ts.map +1 -0
  113. package/dist/cli/tui-approval.js +129 -0
  114. package/dist/cli/tui-approval.js.map +1 -0
  115. package/dist/constants.d.ts +314 -0
  116. package/dist/constants.d.ts.map +1 -0
  117. package/dist/constants.js +382 -0
  118. package/dist/constants.js.map +1 -0
  119. package/dist/core/analyzer/ai-config-generator.d.ts +54 -0
  120. package/dist/core/analyzer/ai-config-generator.d.ts.map +1 -0
  121. package/dist/core/analyzer/ai-config-generator.js +98 -0
  122. package/dist/core/analyzer/ai-config-generator.js.map +1 -0
  123. package/dist/core/analyzer/architecture-writer.d.ts +67 -0
  124. package/dist/core/analyzer/architecture-writer.d.ts.map +1 -0
  125. package/dist/core/analyzer/architecture-writer.js +209 -0
  126. package/dist/core/analyzer/architecture-writer.js.map +1 -0
  127. package/dist/core/analyzer/artifact-generator.d.ts +261 -0
  128. package/dist/core/analyzer/artifact-generator.d.ts.map +1 -0
  129. package/dist/core/analyzer/artifact-generator.js +909 -0
  130. package/dist/core/analyzer/artifact-generator.js.map +1 -0
  131. package/dist/core/analyzer/ast-chunker.d.ts +24 -0
  132. package/dist/core/analyzer/ast-chunker.d.ts.map +1 -0
  133. package/dist/core/analyzer/ast-chunker.js +198 -0
  134. package/dist/core/analyzer/ast-chunker.js.map +1 -0
  135. package/dist/core/analyzer/call-graph.d.ts +162 -0
  136. package/dist/core/analyzer/call-graph.d.ts.map +1 -0
  137. package/dist/core/analyzer/call-graph.js +2040 -0
  138. package/dist/core/analyzer/call-graph.js.map +1 -0
  139. package/dist/core/analyzer/code-shaper.d.ts +33 -0
  140. package/dist/core/analyzer/code-shaper.d.ts.map +1 -0
  141. package/dist/core/analyzer/code-shaper.js +154 -0
  142. package/dist/core/analyzer/code-shaper.js.map +1 -0
  143. package/dist/core/analyzer/codebase-digest.d.ts +40 -0
  144. package/dist/core/analyzer/codebase-digest.d.ts.map +1 -0
  145. package/dist/core/analyzer/codebase-digest.js +195 -0
  146. package/dist/core/analyzer/codebase-digest.js.map +1 -0
  147. package/dist/core/analyzer/cpp-header-resolver.d.ts +30 -0
  148. package/dist/core/analyzer/cpp-header-resolver.d.ts.map +1 -0
  149. package/dist/core/analyzer/cpp-header-resolver.js +71 -0
  150. package/dist/core/analyzer/cpp-header-resolver.js.map +1 -0
  151. package/dist/core/analyzer/dependency-graph.d.ts +230 -0
  152. package/dist/core/analyzer/dependency-graph.d.ts.map +1 -0
  153. package/dist/core/analyzer/dependency-graph.js +752 -0
  154. package/dist/core/analyzer/dependency-graph.js.map +1 -0
  155. package/dist/core/analyzer/duplicate-detector.d.ts +52 -0
  156. package/dist/core/analyzer/duplicate-detector.d.ts.map +1 -0
  157. package/dist/core/analyzer/duplicate-detector.js +289 -0
  158. package/dist/core/analyzer/duplicate-detector.js.map +1 -0
  159. package/dist/core/analyzer/embedding-service.d.ts +56 -0
  160. package/dist/core/analyzer/embedding-service.d.ts.map +1 -0
  161. package/dist/core/analyzer/embedding-service.js +118 -0
  162. package/dist/core/analyzer/embedding-service.js.map +1 -0
  163. package/dist/core/analyzer/env-extractor.d.ts +33 -0
  164. package/dist/core/analyzer/env-extractor.d.ts.map +1 -0
  165. package/dist/core/analyzer/env-extractor.js +196 -0
  166. package/dist/core/analyzer/env-extractor.js.map +1 -0
  167. package/dist/core/analyzer/external-packages.d.ts +20 -0
  168. package/dist/core/analyzer/external-packages.d.ts.map +1 -0
  169. package/dist/core/analyzer/external-packages.js +175 -0
  170. package/dist/core/analyzer/external-packages.js.map +1 -0
  171. package/dist/core/analyzer/file-walker.d.ts +78 -0
  172. package/dist/core/analyzer/file-walker.d.ts.map +1 -0
  173. package/dist/core/analyzer/file-walker.js +532 -0
  174. package/dist/core/analyzer/file-walker.js.map +1 -0
  175. package/dist/core/analyzer/function-registry-trie.d.ts +21 -0
  176. package/dist/core/analyzer/function-registry-trie.d.ts.map +1 -0
  177. package/dist/core/analyzer/function-registry-trie.js +39 -0
  178. package/dist/core/analyzer/function-registry-trie.js.map +1 -0
  179. package/dist/core/analyzer/http-route-parser.d.ts +152 -0
  180. package/dist/core/analyzer/http-route-parser.d.ts.map +1 -0
  181. package/dist/core/analyzer/http-route-parser.js +971 -0
  182. package/dist/core/analyzer/http-route-parser.js.map +1 -0
  183. package/dist/core/analyzer/import-parser.d.ts +100 -0
  184. package/dist/core/analyzer/import-parser.d.ts.map +1 -0
  185. package/dist/core/analyzer/import-parser.js +952 -0
  186. package/dist/core/analyzer/import-parser.js.map +1 -0
  187. package/dist/core/analyzer/import-resolver-bridge.d.ts +25 -0
  188. package/dist/core/analyzer/import-resolver-bridge.d.ts.map +1 -0
  189. package/dist/core/analyzer/import-resolver-bridge.js +99 -0
  190. package/dist/core/analyzer/import-resolver-bridge.js.map +1 -0
  191. package/dist/core/analyzer/index.d.ts +10 -0
  192. package/dist/core/analyzer/index.d.ts.map +1 -0
  193. package/dist/core/analyzer/index.js +10 -0
  194. package/dist/core/analyzer/index.js.map +1 -0
  195. package/dist/core/analyzer/middleware-extractor.d.ts +29 -0
  196. package/dist/core/analyzer/middleware-extractor.d.ts.map +1 -0
  197. package/dist/core/analyzer/middleware-extractor.js +195 -0
  198. package/dist/core/analyzer/middleware-extractor.js.map +1 -0
  199. package/dist/core/analyzer/refactor-analyzer.d.ts +83 -0
  200. package/dist/core/analyzer/refactor-analyzer.d.ts.map +1 -0
  201. package/dist/core/analyzer/refactor-analyzer.js +351 -0
  202. package/dist/core/analyzer/refactor-analyzer.js.map +1 -0
  203. package/dist/core/analyzer/repository-mapper.d.ts +150 -0
  204. package/dist/core/analyzer/repository-mapper.d.ts.map +1 -0
  205. package/dist/core/analyzer/repository-mapper.js +740 -0
  206. package/dist/core/analyzer/repository-mapper.js.map +1 -0
  207. package/dist/core/analyzer/schema-extractor.d.ts +41 -0
  208. package/dist/core/analyzer/schema-extractor.d.ts.map +1 -0
  209. package/dist/core/analyzer/schema-extractor.js +229 -0
  210. package/dist/core/analyzer/schema-extractor.js.map +1 -0
  211. package/dist/core/analyzer/signature-extractor.d.ts +31 -0
  212. package/dist/core/analyzer/signature-extractor.d.ts.map +1 -0
  213. package/dist/core/analyzer/signature-extractor.js +675 -0
  214. package/dist/core/analyzer/signature-extractor.js.map +1 -0
  215. package/dist/core/analyzer/significance-scorer.d.ts +79 -0
  216. package/dist/core/analyzer/significance-scorer.d.ts.map +1 -0
  217. package/dist/core/analyzer/significance-scorer.js +407 -0
  218. package/dist/core/analyzer/significance-scorer.js.map +1 -0
  219. package/dist/core/analyzer/spec-snapshot-generator.d.ts +17 -0
  220. package/dist/core/analyzer/spec-snapshot-generator.d.ts.map +1 -0
  221. package/dist/core/analyzer/spec-snapshot-generator.js +201 -0
  222. package/dist/core/analyzer/spec-snapshot-generator.js.map +1 -0
  223. package/dist/core/analyzer/spec-vector-index.d.ts +68 -0
  224. package/dist/core/analyzer/spec-vector-index.d.ts.map +1 -0
  225. package/dist/core/analyzer/spec-vector-index.js +340 -0
  226. package/dist/core/analyzer/spec-vector-index.js.map +1 -0
  227. package/dist/core/analyzer/subgraph-extractor.d.ts +51 -0
  228. package/dist/core/analyzer/subgraph-extractor.d.ts.map +1 -0
  229. package/dist/core/analyzer/subgraph-extractor.js +147 -0
  230. package/dist/core/analyzer/subgraph-extractor.js.map +1 -0
  231. package/dist/core/analyzer/type-inference-engine.d.ts +23 -0
  232. package/dist/core/analyzer/type-inference-engine.d.ts.map +1 -0
  233. package/dist/core/analyzer/type-inference-engine.js +130 -0
  234. package/dist/core/analyzer/type-inference-engine.js.map +1 -0
  235. package/dist/core/analyzer/ui-component-extractor.d.ts +43 -0
  236. package/dist/core/analyzer/ui-component-extractor.d.ts.map +1 -0
  237. package/dist/core/analyzer/ui-component-extractor.js +245 -0
  238. package/dist/core/analyzer/ui-component-extractor.js.map +1 -0
  239. package/dist/core/analyzer/unified-search.d.ts +116 -0
  240. package/dist/core/analyzer/unified-search.d.ts.map +1 -0
  241. package/dist/core/analyzer/unified-search.js +231 -0
  242. package/dist/core/analyzer/unified-search.js.map +1 -0
  243. package/dist/core/analyzer/vector-index.d.ts +92 -0
  244. package/dist/core/analyzer/vector-index.d.ts.map +1 -0
  245. package/dist/core/analyzer/vector-index.js +451 -0
  246. package/dist/core/analyzer/vector-index.js.map +1 -0
  247. package/dist/core/decisions/consolidator.d.ts +14 -0
  248. package/dist/core/decisions/consolidator.d.ts.map +1 -0
  249. package/dist/core/decisions/consolidator.js +169 -0
  250. package/dist/core/decisions/consolidator.js.map +1 -0
  251. package/dist/core/decisions/extractor.d.ts +26 -0
  252. package/dist/core/decisions/extractor.d.ts.map +1 -0
  253. package/dist/core/decisions/extractor.js +156 -0
  254. package/dist/core/decisions/extractor.js.map +1 -0
  255. package/dist/core/decisions/index.d.ts +19 -0
  256. package/dist/core/decisions/index.d.ts.map +1 -0
  257. package/dist/core/decisions/index.js +16 -0
  258. package/dist/core/decisions/index.js.map +1 -0
  259. package/dist/core/decisions/store.d.ts +36 -0
  260. package/dist/core/decisions/store.d.ts.map +1 -0
  261. package/dist/core/decisions/store.js +109 -0
  262. package/dist/core/decisions/store.js.map +1 -0
  263. package/dist/core/decisions/syncer.d.ts +27 -0
  264. package/dist/core/decisions/syncer.d.ts.map +1 -0
  265. package/dist/core/decisions/syncer.js +214 -0
  266. package/dist/core/decisions/syncer.js.map +1 -0
  267. package/dist/core/decisions/verifier.d.ts +20 -0
  268. package/dist/core/decisions/verifier.d.ts.map +1 -0
  269. package/dist/core/decisions/verifier.js +115 -0
  270. package/dist/core/decisions/verifier.js.map +1 -0
  271. package/dist/core/digest/digest-generator.d.ts +29 -0
  272. package/dist/core/digest/digest-generator.d.ts.map +1 -0
  273. package/dist/core/digest/digest-generator.js +181 -0
  274. package/dist/core/digest/digest-generator.js.map +1 -0
  275. package/dist/core/drift/drift-detector.d.ts +102 -0
  276. package/dist/core/drift/drift-detector.d.ts.map +1 -0
  277. package/dist/core/drift/drift-detector.js +598 -0
  278. package/dist/core/drift/drift-detector.js.map +1 -0
  279. package/dist/core/drift/git-diff.d.ts +60 -0
  280. package/dist/core/drift/git-diff.d.ts.map +1 -0
  281. package/dist/core/drift/git-diff.js +383 -0
  282. package/dist/core/drift/git-diff.js.map +1 -0
  283. package/dist/core/drift/index.d.ts +12 -0
  284. package/dist/core/drift/index.d.ts.map +1 -0
  285. package/dist/core/drift/index.js +9 -0
  286. package/dist/core/drift/index.js.map +1 -0
  287. package/dist/core/drift/spec-mapper.d.ts +73 -0
  288. package/dist/core/drift/spec-mapper.d.ts.map +1 -0
  289. package/dist/core/drift/spec-mapper.js +353 -0
  290. package/dist/core/drift/spec-mapper.js.map +1 -0
  291. package/dist/core/drift/test-suggester.d.ts +18 -0
  292. package/dist/core/drift/test-suggester.d.ts.map +1 -0
  293. package/dist/core/drift/test-suggester.js +107 -0
  294. package/dist/core/drift/test-suggester.js.map +1 -0
  295. package/dist/core/generator/adr-generator.d.ts +32 -0
  296. package/dist/core/generator/adr-generator.d.ts.map +1 -0
  297. package/dist/core/generator/adr-generator.js +192 -0
  298. package/dist/core/generator/adr-generator.js.map +1 -0
  299. package/dist/core/generator/index.d.ts +9 -0
  300. package/dist/core/generator/index.d.ts.map +1 -0
  301. package/dist/core/generator/index.js +12 -0
  302. package/dist/core/generator/index.js.map +1 -0
  303. package/dist/core/generator/mapping-generator.d.ts +54 -0
  304. package/dist/core/generator/mapping-generator.d.ts.map +1 -0
  305. package/dist/core/generator/mapping-generator.js +240 -0
  306. package/dist/core/generator/mapping-generator.js.map +1 -0
  307. package/dist/core/generator/openspec-compat.d.ts +160 -0
  308. package/dist/core/generator/openspec-compat.d.ts.map +1 -0
  309. package/dist/core/generator/openspec-compat.js +524 -0
  310. package/dist/core/generator/openspec-compat.js.map +1 -0
  311. package/dist/core/generator/openspec-format-generator.d.ts +131 -0
  312. package/dist/core/generator/openspec-format-generator.d.ts.map +1 -0
  313. package/dist/core/generator/openspec-format-generator.js +963 -0
  314. package/dist/core/generator/openspec-format-generator.js.map +1 -0
  315. package/dist/core/generator/openspec-writer.d.ts +130 -0
  316. package/dist/core/generator/openspec-writer.d.ts.map +1 -0
  317. package/dist/core/generator/openspec-writer.js +404 -0
  318. package/dist/core/generator/openspec-writer.js.map +1 -0
  319. package/dist/core/generator/prompts.d.ts +35 -0
  320. package/dist/core/generator/prompts.d.ts.map +1 -0
  321. package/dist/core/generator/prompts.js +212 -0
  322. package/dist/core/generator/prompts.js.map +1 -0
  323. package/dist/core/generator/rag-manifest-generator.d.ts +37 -0
  324. package/dist/core/generator/rag-manifest-generator.d.ts.map +1 -0
  325. package/dist/core/generator/rag-manifest-generator.js +134 -0
  326. package/dist/core/generator/rag-manifest-generator.js.map +1 -0
  327. package/dist/core/generator/schemas.d.ts +365 -0
  328. package/dist/core/generator/schemas.d.ts.map +1 -0
  329. package/dist/core/generator/schemas.js +190 -0
  330. package/dist/core/generator/schemas.js.map +1 -0
  331. package/dist/core/generator/spec-pipeline.d.ts +123 -0
  332. package/dist/core/generator/spec-pipeline.d.ts.map +1 -0
  333. package/dist/core/generator/spec-pipeline.js +699 -0
  334. package/dist/core/generator/spec-pipeline.js.map +1 -0
  335. package/dist/core/generator/stages/stage1-survey.d.ts +19 -0
  336. package/dist/core/generator/stages/stage1-survey.d.ts.map +1 -0
  337. package/dist/core/generator/stages/stage1-survey.js +171 -0
  338. package/dist/core/generator/stages/stage1-survey.js.map +1 -0
  339. package/dist/core/generator/stages/stage2-entities.d.ts +11 -0
  340. package/dist/core/generator/stages/stage2-entities.d.ts.map +1 -0
  341. package/dist/core/generator/stages/stage2-entities.js +74 -0
  342. package/dist/core/generator/stages/stage2-entities.js.map +1 -0
  343. package/dist/core/generator/stages/stage3-services.d.ts +11 -0
  344. package/dist/core/generator/stages/stage3-services.d.ts.map +1 -0
  345. package/dist/core/generator/stages/stage3-services.js +85 -0
  346. package/dist/core/generator/stages/stage3-services.js.map +1 -0
  347. package/dist/core/generator/stages/stage4-api.d.ts +11 -0
  348. package/dist/core/generator/stages/stage4-api.d.ts.map +1 -0
  349. package/dist/core/generator/stages/stage4-api.js +72 -0
  350. package/dist/core/generator/stages/stage4-api.js.map +1 -0
  351. package/dist/core/generator/stages/stage5-architecture.d.ts +11 -0
  352. package/dist/core/generator/stages/stage5-architecture.d.ts.map +1 -0
  353. package/dist/core/generator/stages/stage5-architecture.js +75 -0
  354. package/dist/core/generator/stages/stage5-architecture.js.map +1 -0
  355. package/dist/core/generator/stages/stage6-adr.d.ts +8 -0
  356. package/dist/core/generator/stages/stage6-adr.d.ts.map +1 -0
  357. package/dist/core/generator/stages/stage6-adr.js +47 -0
  358. package/dist/core/generator/stages/stage6-adr.js.map +1 -0
  359. package/dist/core/services/chat-agent.d.ts +50 -0
  360. package/dist/core/services/chat-agent.d.ts.map +1 -0
  361. package/dist/core/services/chat-agent.js +369 -0
  362. package/dist/core/services/chat-agent.js.map +1 -0
  363. package/dist/core/services/chat-tools.d.ts +32 -0
  364. package/dist/core/services/chat-tools.d.ts.map +1 -0
  365. package/dist/core/services/chat-tools.js +494 -0
  366. package/dist/core/services/chat-tools.js.map +1 -0
  367. package/dist/core/services/config-manager.d.ts +61 -0
  368. package/dist/core/services/config-manager.d.ts.map +1 -0
  369. package/dist/core/services/config-manager.js +149 -0
  370. package/dist/core/services/config-manager.js.map +1 -0
  371. package/dist/core/services/edge-store.d.ts +57 -0
  372. package/dist/core/services/edge-store.d.ts.map +1 -0
  373. package/dist/core/services/edge-store.js +419 -0
  374. package/dist/core/services/edge-store.js.map +1 -0
  375. package/dist/core/services/gitignore-manager.d.ts +29 -0
  376. package/dist/core/services/gitignore-manager.d.ts.map +1 -0
  377. package/dist/core/services/gitignore-manager.js +95 -0
  378. package/dist/core/services/gitignore-manager.js.map +1 -0
  379. package/dist/core/services/index.d.ts +8 -0
  380. package/dist/core/services/index.d.ts.map +1 -0
  381. package/dist/core/services/index.js +8 -0
  382. package/dist/core/services/index.js.map +1 -0
  383. package/dist/core/services/llm-service.d.ts +379 -0
  384. package/dist/core/services/llm-service.d.ts.map +1 -0
  385. package/dist/core/services/llm-service.js +1553 -0
  386. package/dist/core/services/llm-service.js.map +1 -0
  387. package/dist/core/services/mcp-handlers/analysis.d.ts +127 -0
  388. package/dist/core/services/mcp-handlers/analysis.d.ts.map +1 -0
  389. package/dist/core/services/mcp-handlers/analysis.js +1185 -0
  390. package/dist/core/services/mcp-handlers/analysis.js.map +1 -0
  391. package/dist/core/services/mcp-handlers/change.d.ts +14 -0
  392. package/dist/core/services/mcp-handlers/change.d.ts.map +1 -0
  393. package/dist/core/services/mcp-handlers/change.js +416 -0
  394. package/dist/core/services/mcp-handlers/change.js.map +1 -0
  395. package/dist/core/services/mcp-handlers/decisions.d.ts +16 -0
  396. package/dist/core/services/mcp-handlers/decisions.d.ts.map +1 -0
  397. package/dist/core/services/mcp-handlers/decisions.js +239 -0
  398. package/dist/core/services/mcp-handlers/decisions.js.map +1 -0
  399. package/dist/core/services/mcp-handlers/graph.d.ts +94 -0
  400. package/dist/core/services/mcp-handlers/graph.d.ts.map +1 -0
  401. package/dist/core/services/mcp-handlers/graph.js +693 -0
  402. package/dist/core/services/mcp-handlers/graph.js.map +1 -0
  403. package/dist/core/services/mcp-handlers/orient.d.ts +17 -0
  404. package/dist/core/services/mcp-handlers/orient.d.ts.map +1 -0
  405. package/dist/core/services/mcp-handlers/orient.js +357 -0
  406. package/dist/core/services/mcp-handlers/orient.js.map +1 -0
  407. package/dist/core/services/mcp-handlers/semantic.d.ts +66 -0
  408. package/dist/core/services/mcp-handlers/semantic.d.ts.map +1 -0
  409. package/dist/core/services/mcp-handlers/semantic.js +432 -0
  410. package/dist/core/services/mcp-handlers/semantic.js.map +1 -0
  411. package/dist/core/services/mcp-handlers/utils.d.ts +85 -0
  412. package/dist/core/services/mcp-handlers/utils.d.ts.map +1 -0
  413. package/dist/core/services/mcp-handlers/utils.js +262 -0
  414. package/dist/core/services/mcp-handlers/utils.js.map +1 -0
  415. package/dist/core/services/mcp-watcher.d.ts +41 -0
  416. package/dist/core/services/mcp-watcher.d.ts.map +1 -0
  417. package/dist/core/services/mcp-watcher.js +254 -0
  418. package/dist/core/services/mcp-watcher.js.map +1 -0
  419. package/dist/core/services/project-detector.d.ts +32 -0
  420. package/dist/core/services/project-detector.d.ts.map +1 -0
  421. package/dist/core/services/project-detector.js +100 -0
  422. package/dist/core/services/project-detector.js.map +1 -0
  423. package/dist/core/test-generator/coverage-analyzer.d.ts +27 -0
  424. package/dist/core/test-generator/coverage-analyzer.d.ts.map +1 -0
  425. package/dist/core/test-generator/coverage-analyzer.js +285 -0
  426. package/dist/core/test-generator/coverage-analyzer.js.map +1 -0
  427. package/dist/core/test-generator/framework-detector.d.ts +17 -0
  428. package/dist/core/test-generator/framework-detector.d.ts.map +1 -0
  429. package/dist/core/test-generator/framework-detector.js +65 -0
  430. package/dist/core/test-generator/framework-detector.js.map +1 -0
  431. package/dist/core/test-generator/index.d.ts +14 -0
  432. package/dist/core/test-generator/index.d.ts.map +1 -0
  433. package/dist/core/test-generator/index.js +11 -0
  434. package/dist/core/test-generator/index.js.map +1 -0
  435. package/dist/core/test-generator/renderers/catch2.d.ts +8 -0
  436. package/dist/core/test-generator/renderers/catch2.d.ts.map +1 -0
  437. package/dist/core/test-generator/renderers/catch2.js +47 -0
  438. package/dist/core/test-generator/renderers/catch2.js.map +1 -0
  439. package/dist/core/test-generator/renderers/gtest.d.ts +8 -0
  440. package/dist/core/test-generator/renderers/gtest.d.ts.map +1 -0
  441. package/dist/core/test-generator/renderers/gtest.js +45 -0
  442. package/dist/core/test-generator/renderers/gtest.js.map +1 -0
  443. package/dist/core/test-generator/renderers/index.d.ts +20 -0
  444. package/dist/core/test-generator/renderers/index.d.ts.map +1 -0
  445. package/dist/core/test-generator/renderers/index.js +35 -0
  446. package/dist/core/test-generator/renderers/index.js.map +1 -0
  447. package/dist/core/test-generator/renderers/playwright.d.ts +8 -0
  448. package/dist/core/test-generator/renderers/playwright.d.ts.map +1 -0
  449. package/dist/core/test-generator/renderers/playwright.js +44 -0
  450. package/dist/core/test-generator/renderers/playwright.js.map +1 -0
  451. package/dist/core/test-generator/renderers/pytest.d.ts +8 -0
  452. package/dist/core/test-generator/renderers/pytest.d.ts.map +1 -0
  453. package/dist/core/test-generator/renderers/pytest.js +44 -0
  454. package/dist/core/test-generator/renderers/pytest.js.map +1 -0
  455. package/dist/core/test-generator/renderers/shared.d.ts +21 -0
  456. package/dist/core/test-generator/renderers/shared.d.ts.map +1 -0
  457. package/dist/core/test-generator/renderers/shared.js +56 -0
  458. package/dist/core/test-generator/renderers/shared.js.map +1 -0
  459. package/dist/core/test-generator/renderers/vitest.d.ts +8 -0
  460. package/dist/core/test-generator/renderers/vitest.d.ts.map +1 -0
  461. package/dist/core/test-generator/renderers/vitest.js +52 -0
  462. package/dist/core/test-generator/renderers/vitest.js.map +1 -0
  463. package/dist/core/test-generator/scenario-parser.d.ts +33 -0
  464. package/dist/core/test-generator/scenario-parser.d.ts.map +1 -0
  465. package/dist/core/test-generator/scenario-parser.js +244 -0
  466. package/dist/core/test-generator/scenario-parser.js.map +1 -0
  467. package/dist/core/test-generator/test-generator.d.ts +30 -0
  468. package/dist/core/test-generator/test-generator.d.ts.map +1 -0
  469. package/dist/core/test-generator/test-generator.js +174 -0
  470. package/dist/core/test-generator/test-generator.js.map +1 -0
  471. package/dist/core/test-generator/test-writer.d.ts +25 -0
  472. package/dist/core/test-generator/test-writer.d.ts.map +1 -0
  473. package/dist/core/test-generator/test-writer.js +128 -0
  474. package/dist/core/test-generator/test-writer.js.map +1 -0
  475. package/dist/core/test-generator/then-matchers.d.ts +35 -0
  476. package/dist/core/test-generator/then-matchers.d.ts.map +1 -0
  477. package/dist/core/test-generator/then-matchers.js +211 -0
  478. package/dist/core/test-generator/then-matchers.js.map +1 -0
  479. package/dist/core/verifier/index.d.ts +5 -0
  480. package/dist/core/verifier/index.d.ts.map +1 -0
  481. package/dist/core/verifier/index.js +5 -0
  482. package/dist/core/verifier/index.js.map +1 -0
  483. package/dist/core/verifier/verification-engine.d.ts +293 -0
  484. package/dist/core/verifier/verification-engine.d.ts.map +1 -0
  485. package/dist/core/verifier/verification-engine.js +919 -0
  486. package/dist/core/verifier/verification-engine.js.map +1 -0
  487. package/dist/types/index.d.ts +368 -0
  488. package/dist/types/index.d.ts.map +1 -0
  489. package/dist/types/index.js +5 -0
  490. package/dist/types/index.js.map +1 -0
  491. package/dist/types/pipeline.d.ts +167 -0
  492. package/dist/types/pipeline.d.ts.map +1 -0
  493. package/dist/types/pipeline.js +5 -0
  494. package/dist/types/pipeline.js.map +1 -0
  495. package/dist/types/test-generator.d.ts +103 -0
  496. package/dist/types/test-generator.d.ts.map +1 -0
  497. package/dist/types/test-generator.js +17 -0
  498. package/dist/types/test-generator.js.map +1 -0
  499. package/dist/utils/command-helpers.d.ts +68 -0
  500. package/dist/utils/command-helpers.d.ts.map +1 -0
  501. package/dist/utils/command-helpers.js +150 -0
  502. package/dist/utils/command-helpers.js.map +1 -0
  503. package/dist/utils/errors.d.ts +51 -0
  504. package/dist/utils/errors.d.ts.map +1 -0
  505. package/dist/utils/errors.js +129 -0
  506. package/dist/utils/errors.js.map +1 -0
  507. package/dist/utils/logger.d.ts +149 -0
  508. package/dist/utils/logger.d.ts.map +1 -0
  509. package/dist/utils/logger.js +342 -0
  510. package/dist/utils/logger.js.map +1 -0
  511. package/dist/utils/misc.d.ts +10 -0
  512. package/dist/utils/misc.d.ts.map +1 -0
  513. package/dist/utils/misc.js +21 -0
  514. package/dist/utils/misc.js.map +1 -0
  515. package/dist/utils/progress.d.ts +142 -0
  516. package/dist/utils/progress.d.ts.map +1 -0
  517. package/dist/utils/progress.js +283 -0
  518. package/dist/utils/progress.js.map +1 -0
  519. package/dist/utils/prompts.d.ts +53 -0
  520. package/dist/utils/prompts.d.ts.map +1 -0
  521. package/dist/utils/prompts.js +199 -0
  522. package/dist/utils/prompts.js.map +1 -0
  523. package/dist/utils/shutdown.d.ts +89 -0
  524. package/dist/utils/shutdown.d.ts.map +1 -0
  525. package/dist/utils/shutdown.js +238 -0
  526. package/dist/utils/shutdown.js.map +1 -0
  527. package/examples/bmad/README.md +113 -0
  528. package/examples/bmad/agents/architect.md +226 -0
  529. package/examples/bmad/agents/dev-brownfield.md +69 -0
  530. package/examples/bmad/setup/architect.customize.yaml +14 -0
  531. package/examples/bmad/tasks/implement-story.md +254 -0
  532. package/examples/bmad/tasks/onboarding.md +169 -0
  533. package/examples/bmad/tasks/refactor.md +178 -0
  534. package/examples/bmad/tasks/sprint-planning.md +168 -0
  535. package/examples/bmad/templates/story.md +108 -0
  536. package/examples/cline-workflows/openlore-analyze-codebase.md +101 -0
  537. package/examples/cline-workflows/openlore-check-spec-drift.md +102 -0
  538. package/examples/cline-workflows/openlore-execute-refactor.md +212 -0
  539. package/examples/cline-workflows/openlore-implement-feature.md +266 -0
  540. package/examples/cline-workflows/openlore-plan-refactor.md +279 -0
  541. package/examples/cline-workflows/openlore-refactor-codebase.md +16 -0
  542. package/examples/cline-workflows/openlore-write-tests.md +177 -0
  543. package/examples/drift-demo/openspec/config.yaml +14 -0
  544. package/examples/drift-demo/openspec/specs/architecture/spec.md +30 -0
  545. package/examples/drift-demo/openspec/specs/auth/spec.md +71 -0
  546. package/examples/drift-demo/openspec/specs/database/spec.md +33 -0
  547. package/examples/drift-demo/openspec/specs/overview/spec.md +20 -0
  548. package/examples/drift-demo/openspec/specs/projects/spec.md +55 -0
  549. package/examples/drift-demo/openspec/specs/tasks/spec.md +78 -0
  550. package/examples/drift-demo/package.json +21 -0
  551. package/examples/drift-demo/src/auth/auth-middleware.ts +30 -0
  552. package/examples/drift-demo/src/auth/auth-routes.ts +29 -0
  553. package/examples/drift-demo/src/auth/auth-service.ts +45 -0
  554. package/examples/drift-demo/src/database/connection.ts +27 -0
  555. package/examples/drift-demo/src/index.ts +16 -0
  556. package/examples/drift-demo/src/projects/project-model.ts +15 -0
  557. package/examples/drift-demo/src/projects/project-service.ts +34 -0
  558. package/examples/drift-demo/src/tasks/task-model.ts +37 -0
  559. package/examples/drift-demo/src/tasks/task-routes.ts +53 -0
  560. package/examples/drift-demo/src/tasks/task-service.ts +60 -0
  561. package/examples/drift-demo/src/utils/validation.ts +11 -0
  562. package/examples/drift-demo/tests/auth.test.ts +4 -0
  563. package/examples/drift-demo/tests/tasks.test.ts +4 -0
  564. package/examples/drift-demo/tsconfig.json +10 -0
  565. package/examples/drift-test/run-drift-test.sh +1087 -0
  566. package/examples/gsd/README.md +119 -0
  567. package/examples/gsd/commands/gsd/openlore-drift.md +111 -0
  568. package/examples/gsd/commands/gsd/openlore-orient.md +191 -0
  569. package/examples/mistral-vibe/README.md +101 -0
  570. package/examples/mistral-vibe/antipatterns-template.md +18 -0
  571. package/examples/mistral-vibe/skills/openlore-analyze-codebase/SKILL.md +124 -0
  572. package/examples/mistral-vibe/skills/openlore-brainstorm/SKILL.md +379 -0
  573. package/examples/mistral-vibe/skills/openlore-debug/SKILL.md +330 -0
  574. package/examples/mistral-vibe/skills/openlore-execute-refactor/SKILL.md +291 -0
  575. package/examples/mistral-vibe/skills/openlore-generate/SKILL.md +245 -0
  576. package/examples/mistral-vibe/skills/openlore-implement-story/SKILL.md +326 -0
  577. package/examples/mistral-vibe/skills/openlore-plan-refactor/SKILL.md +365 -0
  578. package/examples/mistral-vibe/skills/openlore-review-changes/SKILL.md +128 -0
  579. package/examples/mistral-vibe/skills/openlore-write-tests/SKILL.md +261 -0
  580. package/examples/opencode/agent-guard.ts +170 -0
  581. package/examples/opencode/plugins/anti-laziness.ts +202 -0
  582. package/examples/opencode/plugins/lib/openlore-context-injector-helpers.ts +116 -0
  583. package/examples/opencode/plugins/lib/openlore-decision-extractor-helpers.ts +65 -0
  584. package/examples/opencode/plugins/openlore-context-injector.test.ts +211 -0
  585. package/examples/opencode/plugins/openlore-context-injector.ts +165 -0
  586. package/examples/opencode/plugins/openlore-decision-extractor.test.ts +131 -0
  587. package/examples/opencode/plugins/openlore-decision-extractor.ts +322 -0
  588. package/examples/opencode/plugins/openlore-enforcer.ts +227 -0
  589. package/examples/opencode/prompts/sisyphus-sdd.md +150 -0
  590. package/examples/opencode-skills/openlore-analyze-codebase/SKILL.md +101 -0
  591. package/examples/opencode-skills/openlore-brainstorm/SKILL.md +354 -0
  592. package/examples/opencode-skills/openlore-debug/SKILL.md +291 -0
  593. package/examples/opencode-skills/openlore-execute-refactor/SKILL.md +241 -0
  594. package/examples/opencode-skills/openlore-generate/SKILL.md +236 -0
  595. package/examples/opencode-skills/openlore-implement-story/SKILL.md +251 -0
  596. package/examples/opencode-skills/openlore-plan-refactor/SKILL.md +298 -0
  597. package/examples/opencode-skills/openlore-review-changes/SKILL.md +134 -0
  598. package/examples/opencode-skills/openlore-write-tests/SKILL.md +230 -0
  599. package/examples/openspec-analysis/README.md +59 -0
  600. package/examples/openspec-analysis/SUMMARY.md +72 -0
  601. package/examples/openspec-analysis/config.json +16 -0
  602. package/examples/openspec-analysis/dependencies.mermaid +35 -0
  603. package/examples/openspec-analysis/dependency-graph.json +12116 -0
  604. package/examples/openspec-analysis/llm-context.json +119 -0
  605. package/examples/openspec-analysis/repo-structure.json +871 -0
  606. package/examples/openspec-cli/README.md +67 -0
  607. package/examples/openspec-cli/openspec/config.yaml +26 -0
  608. package/examples/openspec-cli/openspec/specs/architecture/spec.md +178 -0
  609. package/examples/openspec-cli/openspec/specs/artifact-graph/spec.md +143 -0
  610. package/examples/openspec-cli/openspec/specs/cli/spec.md +138 -0
  611. package/examples/openspec-cli/openspec/specs/overview/spec.md +60 -0
  612. package/examples/openspec-cli/openspec/specs/parsing/spec.md +123 -0
  613. package/examples/openspec-cli/openspec/specs/validation/spec.md +108 -0
  614. package/examples/spec-kit/README.md +104 -0
  615. package/examples/spec-kit/commands/drift.md +87 -0
  616. package/examples/spec-kit/commands/orient.md +138 -0
  617. package/examples/spec-kit/extension.yml +54 -0
  618. package/package.json +125 -0
  619. package/src/viewer/InteractiveGraphViewer.jsx +1600 -0
  620. package/src/viewer/app/index.html +17 -0
  621. package/src/viewer/app/main.jsx +13 -0
  622. package/src/viewer/components/ArchitectureView.jsx +177 -0
  623. package/src/viewer/components/ChatPanel.jsx +450 -0
  624. package/src/viewer/components/ClassGraph.jsx +782 -0
  625. package/src/viewer/components/ClusterGraph.jsx +469 -0
  626. package/src/viewer/components/FilterBar.jsx +179 -0
  627. package/src/viewer/components/FlatGraph.jsx +282 -0
  628. package/src/viewer/components/MicroComponents.jsx +85 -0
  629. package/src/viewer/hooks/usePanZoom.js +79 -0
  630. package/src/viewer/utils/constants.js +64 -0
  631. package/src/viewer/utils/graph-helpers.js +303 -0
  632. package/src/viewer/utils/graph-helpers.test.ts +39 -0
  633. package/src/viewer/utils/themes.js +206 -0
  634. package/stubs/tree-sitter-cli-stub/package.json +6 -0
@@ -0,0 +1,251 @@
1
+ ---
2
+ name: openlore-implement-story
3
+ description: Implement a story on a brownfield codebase using openlore structural context. Runs orient + risk check before coding, validates against specs, enforces a test gate before drift check.
4
+ license: MIT
5
+ compatibility: openlore MCP server
6
+ ---
7
+
8
+ # openlore: Implement Story
9
+
10
+ ## When to use this skill
11
+
12
+ Trigger this skill when the user asks to **implement a story or task** on a codebase that has
13
+ openlore analysis available, with phrasings like:
14
+ - "implement story X"
15
+ - "work on task Y"
16
+ - "start implementing this feature"
17
+ - explicit command `/openlore-implement-story`
18
+
19
+ **Prerequisite**: openlore analysis must exist (`openlore analyze` has been run).
20
+ If `orient` returns `"error": "no cache"` → run `analyze_codebase` first, then retry.
21
+
22
+ ---
23
+
24
+ ## Step 1 — Read the story and risk context
25
+
26
+ Read the story file. Extract:
27
+ - `$STORY_TITLE`, `$AC` (acceptance criteria), `$PROJECT_ROOT`
28
+ - `$RISK_CONTEXT` — the `risk_context` section if present (pre-filled by Architect Agent)
29
+
30
+ | Situation | Approach |
31
+ |---|---|
32
+ | `risk_context` present, risk 🟢 < 40 | Skip to Step 3 — use insertion point from context |
33
+ | `risk_context` present, risk 🟡 40–69 | Run Step 2 impact check, then proceed |
34
+ | `risk_context` present, risk 🔴 ≥ 70 | Stop — a blocking refactor story must be resolved first |
35
+ | `risk_context` absent | Run the full Step 2 orientation |
36
+
37
+ ---
38
+
39
+ ## Step 2 — Orient and assess risk
40
+
41
+ Call the openlore MCP tool `orient` with:
42
+ ```json
43
+ {
44
+ "directory": "$PROJECT_ROOT",
45
+ "task": "$STORY_TITLE",
46
+ "limit": 7
47
+ }
48
+ ```
49
+
50
+ For the top 2 functions returned, get minimal context first (callers, callees, body, test coverage in one call):
51
+ ```json
52
+ // get_minimal_context
53
+ {
54
+ "directory": "$PROJECT_ROOT",
55
+ "functionName": "$FUNCTION_NAME"
56
+ }
57
+ ```
58
+
59
+ **What to read from the result before proceeding:**
60
+ - `function.riskLevel` — `"high"` means fanIn ≥ 30 or fanOut ≥ 15; the tool expanded caller/callee lists to 24. All shown entries are in scope.
61
+ - `callers[*].callType` — all `"awaited"` = async interface frozen; changing signature or return type breaks every caller. Mixed = looser coupling.
62
+ - `callees[*].isExternal: true` — function touches HTTP/DB boundary; new code paths may fail silently in tests (mocked) but loudly in production.
63
+ - `testedBy[*].confidence` — `"called"` = direct test (strong). `"imported"` = test imports module only; `vi.mock()` can nullify it. Only `"imported"` entries = treat as effectively untested.
64
+
65
+ If `riskLevel` is `"high"` or any callee is external, check the cluster:
66
+ ```json
67
+ // get_cluster
68
+ {
69
+ "directory": "$PROJECT_ROOT",
70
+ "functionName": "$FUNCTION_NAME"
71
+ }
72
+ ```
73
+ - `clusterDensity < 0.05` → sparse, change is isolated, proceed
74
+ - `clusterDensity 0.05–0.15` → check `internalCallGraph` for transitively dependent functions
75
+ - `clusterDensity > 0.15` → dense cluster; coordinate the whole cluster or discuss scope with user
76
+
77
+ Then check risk:
78
+ ```json
79
+ // analyze_impact
80
+ {
81
+ "directory": "$PROJECT_ROOT",
82
+ "symbol": "$FUNCTION_NAME",
83
+ "depth": 2
84
+ }
85
+ ```
86
+
87
+ **If any function has `riskScore ≥ 70`: stop.**
88
+ Do not implement. Run `/openlore-execute-refactor` on the blocking function first, or create a
89
+ blocking refactor task and return to this story once the risk is resolved.
90
+
91
+ ---
92
+
93
+ ## Step 2.5 — Stack inventory (conditional)
94
+
95
+ Based on the story title and orient results, call the relevant inventory tool(s) **before reading any source file**. Skip if the story clearly involves none of these areas.
96
+
97
+ | Story involves | Tool | Purpose |
98
+ |---|---|---|
99
+ | Data models / ORM / database / tables | `get_schema_inventory` | See existing tables and fields — don't re-invent what already exists |
100
+ | HTTP routes / API / endpoints | `get_route_inventory` | See existing routes before adding new ones |
101
+ | Config / env vars / secrets | `get_env_vars` | Identify which vars are required vs have defaults |
102
+ | UI components | `get_ui_components` | See existing component props and framework |
103
+
104
+ Call whichever openlore MCP inventory tool applies, e.g. `get_schema_inventory` with `{"directory": "$PROJECT_ROOT"}`.
105
+
106
+ Use the results to ground the implementation in existing schemas/routes — the plan cannot contradict what already exists.
107
+
108
+ ---
109
+
110
+ ## Step 3 — Check the spec
111
+
112
+ First, verify that OpenSpec specs exist:
113
+
114
+ ```bash
115
+ ls $PROJECT_ROOT/openspec/specs/ 2>/dev/null | wc -l
116
+ ```
117
+
118
+ **If 0 specs found:**
119
+ > No OpenSpec specs exist yet. `search_specs` will return empty results and
120
+ > `check_spec_drift` (Step 7) will flag everything as uncovered.
121
+ >
122
+ > Recommended: run `/openlore-generate` after this story to create a spec baseline.
123
+ > You only need to do this once.
124
+ >
125
+ > Continuing with structural analysis only.
126
+
127
+ Skip the `search_specs` call and go to Step 4.
128
+
129
+ **If specs exist:**
130
+
131
+ Call the openlore MCP tool `search_specs` with:
132
+ ```json
133
+ {
134
+ "directory": "$PROJECT_ROOT",
135
+ "query": "$STORY_TITLE",
136
+ "limit": 5
137
+ }
138
+ ```
139
+
140
+ If relevant requirements are found, read the domain spec before writing any code.
141
+ Note any constraints that apply.
142
+
143
+ ---
144
+
145
+ ## Step 3.5 — Audit spec coverage of the target domain
146
+
147
+ Call the openlore MCP tool `audit_spec_coverage` with `{"directory": "$PROJECT_ROOT"}`.
148
+
149
+ From the result, check:
150
+ - `staleDomains` — if the target domain appears here, its spec is outdated.
151
+ Recommend running `openlore generate --domains $DOMAIN` before implementing.
152
+ - `hubGaps` — uncovered hub functions. If the feature touches one of these,
153
+ add it to the adversarial check in Step 4b (high blast radius + no spec = risk).
154
+
155
+ If both are clean, continue to Step 4 without action.
156
+
157
+ ---
158
+
159
+ ## Step 4 — Find the insertion point
160
+
161
+ Use `insertion_points` from `risk_context` if present. Otherwise:
162
+
163
+ Call the openlore MCP tool `suggest_insertion_points` with:
164
+ ```json
165
+ {
166
+ "directory": "$PROJECT_ROOT",
167
+ "description": "$STORY_TITLE",
168
+ "limit": 5
169
+ }
170
+ ```
171
+
172
+ Read the skeleton of the target file by calling the openlore MCP tool `get_function_skeleton` with:
173
+ ```json
174
+ {
175
+ "directory": "$PROJECT_ROOT",
176
+ "filePath": "$TARGET_FILE"
177
+ }
178
+ ```
179
+
180
+ **Confirm the approach with the user before writing code.**
181
+
182
+ ### Step 4b — Adversarial challenge
183
+
184
+ Before writing any code, state explicitly what could break with this approach.
185
+ If `.claude/antipatterns.md` exists, read it and include any applicable patterns.
186
+
187
+ > "Risk check on `$INSERTION_POINT`:
188
+ > - `$CALLER_A` and `$CALLER_B` depend on this function — verify their assumptions
189
+ > hold after the change.
190
+ > - `$EDGE_CASE` is not covered by the current test suite — add it in Step 6.
191
+ > - [if antipatterns apply] AP-NNN (`$PATTERN_NAME`) — `$RULE` — applies here because `$REASON`."
192
+
193
+ This is not a gate — do not wait for user input. It is a mandatory self-check
194
+ that must appear in the output before the first line of code is written.
195
+
196
+ ---
197
+
198
+ ## Step 5 — Implement
199
+
200
+ Apply changes in this order:
201
+ 1. New types/interfaces (if needed)
202
+ 2. Core logic at the insertion point
203
+ 3. Updated call sites (if any)
204
+
205
+ Do not touch functions outside the scope identified in Step 2 / `risk_context` without
206
+ re-running the gate.
207
+
208
+ **Small model constraint**: if the model is under 13B parameters, each edit must touch a contiguous block of at most 50 lines. Split larger changes.
209
+
210
+ ---
211
+
212
+ ## Step 6 — Tests
213
+
214
+ Both levels required before proceeding to Step 7.
215
+
216
+ **Mandatory — existing tests must not regress:**
217
+ Run the full test suite. If any pre-existing test breaks, fix the regression before continuing.
218
+
219
+ **Recommended — at least one new test per AC:**
220
+ Write a test that directly exercises the behaviour described in the acceptance criterion.
221
+
222
+ | Situation | Action |
223
+ |---|---|
224
+ | All tests green, new tests written | Proceed to Step 7 |
225
+ | Existing test broken | Fix regression. Do not proceed. |
226
+ | New test reveals a misunderstanding of the AC | Return to Step 5, adjust implementation |
227
+ | Brownfield: no existing test coverage | Write the new test anyway. Note the coverage gap. |
228
+
229
+ ---
230
+
231
+ ## Step 7 — Verify drift
232
+
233
+ Only run once tests are green.
234
+
235
+ Call the openlore MCP tool `check_spec_drift` with `{"directory": "$PROJECT_ROOT"}`.
236
+
237
+ | Drift type | Resolution |
238
+ |---|---|
239
+ | `uncovered` on new files | Note it — propose `openlore generate` post-sprint |
240
+ | `gap` on existing domain | Run `openlore generate --domains $DOMAIN` |
241
+ | `stale` | Fix the reference |
242
+ | No drift | Done |
243
+
244
+ ---
245
+
246
+ ## Absolute constraints
247
+
248
+ - Do not write code before Step 4 confirmation
249
+ - If `riskScore ≥ 70` — stop, do not work around it, run `/openlore-execute-refactor` first
250
+ - Do not run `check_spec_drift` before tests are green
251
+ - Do not propose a spec update on untested code
@@ -0,0 +1,298 @@
1
+ ---
2
+ name: openlore-plan-refactor
3
+ description: Identify the highest-priority refactoring target using static analysis, assess its blast radius, and produce a detailed written plan saved to .openlore/refactor-plan.md. Makes no code changes.
4
+ license: MIT
5
+ compatibility: openlore MCP server
6
+ ---
7
+
8
+ # openlore: Plan Refactor
9
+
10
+ ## When to use this skill
11
+
12
+ Trigger this skill whenever the user asks to **plan a refactoring** on a codebase, with phrasings like:
13
+ - "plan a refactoring of X"
14
+ - "analyze my code and prepare a refactor plan"
15
+ - "generate a refactoring plan"
16
+ - "I want to refactor this function / this file"
17
+ - explicit command `/openlore-plan-refactor`
18
+
19
+ **This skill modifies no code files.** It only produces `.openlore/refactor-plan.md`.
20
+ To apply the plan, use the `openlore-execute-refactor` skill.
21
+
22
+ ---
23
+
24
+ ## ⚠️ Fundamental principle — each change is a complete mini-development
25
+
26
+ **The plan must be written so that every entry in the change sequence is independently executable and testable.**
27
+
28
+ Each change = one atomic edit → one diff verification → one full test run → ✅ or rollback.
29
+
30
+ This is not a final gate at the end. Testing is a mandatory sub-step after **every single change**.
31
+ The plan must make this cycle explicit and impossible to skip.
32
+
33
+ **For small models (< 13B parameters)**: each change must touch at most **50 contiguous lines** in the source file.
34
+ If a logical extraction exceeds this limit, split it into smaller sub-changes, each with its own test gate.
35
+
36
+ ---
37
+
38
+ ## User-specified target — shortcut path
39
+
40
+ If the user has already named a specific file or function to refactor:
41
+ - **Skip** Steps 2, 3, and 3b (discovery is not needed).
42
+ - **Do not skip** Steps 3c, 4, 5, 6, and 6b — coverage check and impact analysis are mandatory regardless of how the target was chosen.
43
+ - Jump directly to Step 3c using the user-provided target.
44
+
45
+ ---
46
+
47
+ ## Step 1 — Confirm the project directory
48
+
49
+ Ask the user which project to analyze, or confirm the current workspace root.
50
+
51
+ ---
52
+
53
+ ## Step 2 — Run static analysis
54
+
55
+ Call the openlore MCP tool `analyze_codebase` with `{"directory": "$DIRECTORY"}`.
56
+
57
+ If a recent analysis already exists, skip unless the user explicitly requests a fresh run.
58
+
59
+ ---
60
+
61
+ ## Step 3 — Get the refactoring report
62
+
63
+ Call the openlore MCP tool `get_refactor_report` with `{"directory": "$DIRECTORY"}`.
64
+
65
+ Present the top 5 candidates:
66
+
67
+ | Function | File | Issues | Priority score |
68
+ |---|---|---|---|
69
+
70
+ ---
71
+
72
+ ## Step 3b — Check for duplicate code
73
+
74
+ Call the openlore MCP tool `get_duplicate_report` with `{"directory": "$DIRECTORY"}`.
75
+
76
+ If a top candidate appears in a clone group, prepend a **deduplication note** to the plan:
77
+ > "⚠️ `<function>` has N near-clones. Consolidate them first to reduce the blast radius of this refactor."
78
+
79
+ ---
80
+
81
+ ## Step 3c — Check test coverage
82
+
83
+ Before presenting a choice to the user, check test coverage for the files containing the candidates. Detect the coverage tool from the project:
84
+
85
+ | Ecosystem | Command |
86
+ |---|---|
87
+ | Node.js | `npm test -- --coverage --collectCoverageFrom="<files>"` |
88
+ | Python | `pytest --cov=<module> --cov-report=term-missing` |
89
+ | Rust | `cargo tarpaulin --include-files <files>` |
90
+ | Go | `go test -cover ./...` |
91
+
92
+ Enrich the candidate table:
93
+
94
+ | Function | File | Priority | Coverage |
95
+ |---|---|---|---|
96
+ | ... | ... | ... | 72% ✅ / 35% ⚠️ / 0% 🚫 |
97
+
98
+ **Thresholds:**
99
+
100
+ | Coverage | Badge | Meaning |
101
+ |---|---|---|
102
+ | ≥ 70% lines | ✅ | Safe to refactor |
103
+ | 40–69% lines | ⚠️ | Write characterisation tests first |
104
+ | < 40% lines | 🛑 | Strongly discouraged |
105
+ | 0% (no tests) | 🚫 | Blocked — propose a test harness first |
106
+
107
+ If **all candidates are below 40%**:
108
+ > "Every high-priority target has insufficient test coverage (< 40%). I recommend writing a minimal test harness for at least one target before proceeding. Would you like me to suggest test cases based on the function signatures?"
109
+
110
+ ---
111
+
112
+ ## Step 4 — Get minimal context + analyze impact
113
+
114
+ Get the condensed view of the target function (callers, callees, body, test coverage in one call):
115
+
116
+ Call the openlore MCP tool `get_minimal_context` with `{"directory": "$DIRECTORY", "functionName": "$FUNCTION_NAME"}`.
117
+
118
+ **What to read before deciding whether to proceed:**
119
+ - `function.riskLevel` — `"high"` (fanIn ≥ 30 or fanOut ≥ 15) means up to 24 callers/callees shown. Read all — they are all in scope for this refactor.
120
+ - `callers[*].callType` — all `"awaited"` = async interface frozen; extracting or splitting requires updating every call site. `"direct"` / `"method"` = more portable.
121
+ - `testedBy[*].confidence` — `"called"` = direct test, safe to refactor under. `"imported"` only = `vi.mock()` can neutralize it; write a characterisation test **before** refactoring.
122
+
123
+ Then get the full impact analysis:
124
+
125
+ Call the openlore MCP tool `analyze_impact` with `{"directory": "$DIRECTORY", "symbol": "$FUNCTION_NAME"}`.
126
+
127
+ Note: risk score (0–100), recommended strategy (`extract` / `split` / `facade` / `delegate`), top 5 upstream callers and downstream callees.
128
+
129
+ **If `riskLevel` is `"high"` or impact risk score ≥ 60**, check the cluster to set refactor scope:
130
+
131
+ Call the openlore MCP tool `get_cluster` with `{"directory": "$DIRECTORY", "functionName": "$FUNCTION_NAME"}`.
132
+
133
+ Read `stats.clusterDensity`:
134
+ - `< 0.05` — sparse; extract the target independently, others not in scope
135
+ - `0.05–0.15` — moderate; include functions in `internalCallGraph` that call the target in the plan's risk section
136
+ - `> 0.15` — dense; refactor the whole cluster together or not at all; add all members to affected-files list
137
+
138
+ ---
139
+
140
+ ## Step 5 — Visualise the call neighbourhood
141
+
142
+ Call the openlore MCP tool `get_subgraph` with:
143
+ ```json
144
+ {"directory": "$DIRECTORY", "functionName": "$FUNCTION_NAME", "direction": "both", "format": "mermaid"}
145
+ ```
146
+
147
+ Show the Mermaid diagram to the user.
148
+
149
+ ---
150
+
151
+ ## Step 6 — Find safe entry points (bottom-up)
152
+
153
+ Call the openlore MCP tool `get_low_risk_refactor_candidates` with:
154
+ ```json
155
+ {"directory": "$DIRECTORY", "filePattern": "$TARGET_FILE", "limit": 5}
156
+ ```
157
+
158
+ Cross-reference with the subgraph from Step 5: a good first extraction candidate already appears as a callee of the target function.
159
+
160
+ ---
161
+
162
+ ## Step 6b — Find insertion points for extracted helpers
163
+
164
+ Before designing the change sequence, identify where extracted functions should land.
165
+ This avoids creating helpers in the wrong file or layer.
166
+
167
+ Call the openlore MCP tool `suggest_insertion_points` with:
168
+ ```json
169
+ {"directory": "$DIRECTORY", "query": "extract helper from $FUNCTION_NAME", "limit": 5}
170
+ ```
171
+
172
+ For each candidate, note its role and strategy. Prefer candidates that already call into — or are called by — the target function (visible in the Step 5 subgraph).
173
+
174
+ ---
175
+
176
+ ## Step 7 — Design the change sequence
177
+
178
+ Design an ordered sequence of atomic changes based on the strategy from Step 4.
179
+
180
+ ### Size constraint (mandatory for small models)
181
+
182
+ **Each change must touch at most 50 contiguous lines** in the source file.
183
+ If a logical extraction requires moving more than 50 lines in one pass, split it into sub-changes:
184
+ - Sub-change A: extract the inner block (≤ 50 lines)
185
+ - Sub-change B: extract the outer wrapper (≤ 50 lines)
186
+ Each sub-change gets its own test gate. Never group two sub-changes before testing.
187
+
188
+ ### Each change must specify
189
+
190
+ - **What**: the exact block to move (line range or description)
191
+ - **Lines touched**: estimated count in source file — must be ≤ 50
192
+ - **New name**: the function or method name to give it
193
+ - **Target file**: existing or new file (with justification)
194
+ - **Target class** (if applicable)
195
+ - **Call sites to update**: list each `file:line`
196
+ - **Test gate**: exact test command to run after this change
197
+
198
+ ### Mini-development cycle per change (write this explicitly in the plan)
199
+
200
+ ```
201
+ READ plan entry → EDIT (targeted, ≤ 50 lines) → DIFF verify → TEST
202
+ ├─ green → mark ✅, next change
203
+ └─ red → git checkout HEAD -- <file>, diagnose, retry
204
+ after 3 failed retries → STOP, report to user
205
+ ```
206
+
207
+ The plan must show this cycle in the change sequence, not just in a footnote.
208
+
209
+ **Rules per strategy:**
210
+
211
+ | Strategy | Rule |
212
+ |---|---|
213
+ | `split` | Decompose into N sub-functions in the same file unless they clearly belong elsewhere |
214
+ | `extract` | Place in the nearest cohesive module or create a new file if none exists |
215
+ | `facade` | Keep the original signature, delegate to smaller functions; companion module if > 300 lines |
216
+ | `delegate` | Move ownership logic to callers; update every caller file in the upstream chain |
217
+
218
+ **Present the full sequence and wait for confirmation before writing the plan file.**
219
+
220
+ ---
221
+
222
+ ## Step 8 — Write `.openlore/refactor-plan.md`
223
+
224
+ Fill every section — **leave nothing as "TBD"**.
225
+
226
+ ```markdown
227
+ # Refactor Plan
228
+
229
+ Generated: <ISO date>
230
+ Workflow: /openlore-plan-refactor → /openlore-execute-refactor
231
+
232
+ ## Target
233
+ - **Function**: <n>
234
+ - **File**: <relative path>
235
+ - **Lines**: <start>–<end>
236
+ - **Risk score**: <0–100>
237
+ - **Strategy**: <extract | split | facade | delegate>
238
+ - **Priority score before refactor**: <value>
239
+
240
+ ## Why
241
+ - <issue 1>
242
+ - <issue 2>
243
+
244
+ ## Callers (upstream — must not break)
245
+ | Caller | File |
246
+ |---|---|
247
+
248
+ ## Callees (downstream — candidates for extraction)
249
+ | Callee | File |
250
+ |---|---|
251
+
252
+ ## Coverage baseline
253
+ - **File**: <target file>
254
+ - **Coverage**: <X>% lines, <Y>% branches
255
+ - **Status**: ✅ safe / ⚠️ caution / 🛑 discouraged
256
+ - **Test command**: <exact command>
257
+
258
+ ## Change sequence
259
+ Each change is a complete mini-development: edit → diff → test → ✅ or rollback.
260
+ Never advance to the next change without a green test gate.
261
+
262
+ ### Change 1 — <short label>
263
+ - **What**: extract lines <start>–<end> (logic: <one-line description>)
264
+ - **Lines touched in source**: ~<N> lines (must be ≤ 50)
265
+ - **New function name**: `<n>`
266
+ - **Target file**: `<path>` (<new file | existing file — reason>)
267
+ - **Target class**: `<ClassName>` or none
268
+ - **Call sites to update**: <list each file:line>
269
+ - **Expected diff**: +<N> lines in <target file>, -<M> lines in <source file>
270
+ - **Test gate**: `<exact test command>`
271
+ - **Retry limit**: 3 attempts — if still red after 3, stop and report
272
+
273
+ ### Change 2 — <short label>
274
+ ...
275
+
276
+ ## Acceptance criteria
277
+ - Priority score drops below <target score> in `get_refactor_report`
278
+ - Function exits the top-5 list
279
+ - Full test suite passes (green)
280
+ - `git diff --stat` shows only the expected files
281
+
282
+ ## Restore point
283
+ Hash: <to be filled by the execute workflow>
284
+ ```
285
+
286
+ Once the file is written:
287
+ > "Plan written to `.openlore/refactor-plan.md`. Review it, then run `/openlore-execute-refactor` to apply the changes."
288
+
289
+ ---
290
+
291
+ ## Absolute constraints
292
+
293
+ - **No code modifications** in this workflow
294
+ - Always read the source file to confirm exact line numbers
295
+ - Never leave a section empty or as "TBD"
296
+ - Each change in the plan must include a test gate and a ≤ 50-line scope
297
+ - Prefer candidates with higher coverage when scores are otherwise close
298
+ - If the user does not pick a target, default to the top candidate
@@ -0,0 +1,134 @@
1
+ ---
2
+ name: openlore-review-changes
3
+ description: Risk-aware code review using detect_changes + get_minimal_context + get_cluster. Surfaces the riskiest changed functions, interprets callType/coverage/cluster density, and produces a go/no-go recommendation. No code written.
4
+ license: MIT
5
+ compatibility: openlore MCP server
6
+ ---
7
+
8
+ # openlore: Review Changes
9
+
10
+ ## When to use this skill
11
+
12
+ Trigger this skill whenever the user asks to **review, audit, or check the safety of recent changes**, with phrasings like:
13
+ - "review my changes"
14
+ - "what did I break?"
15
+ - "is this branch safe to merge?"
16
+ - "pre-PR check"
17
+ - "what's risky in this diff?"
18
+ - "check the blast radius of my changes"
19
+ - explicit command `/openlore-review-changes`
20
+
21
+ **No code is written.** Output is a risk-ranked review with a go/no-go recommendation.
22
+
23
+ ---
24
+
25
+ ## Step 1 — Confirm directory and base ref
26
+
27
+ Ask: which project? Diff against which base? (default: `main`)
28
+
29
+ Store as `$DIRECTORY` and `$BASE_REF`.
30
+
31
+ ---
32
+
33
+ ## Step 2 — Detect changed functions and risk scores
34
+
35
+ Call the openlore MCP tool `detect_changes` with:
36
+ ```json
37
+ {"directory": "$DIRECTORY", "base": "$BASE_REF"}
38
+ ```
39
+
40
+ The risk score is **multiplicative**: `likelihood × impact`.
41
+ - `likelihood` = how much was changed × how poorly covered it is (`"called"` tests count full; `"imported"`-only count 0.3×)
42
+ - `impact` = structural blast radius (log fanIn + distance-weighted transitive callers weighted by callType + external boundary calls)
43
+
44
+ A function with fanIn=0 calling nothing external scores 0 regardless of change size — correct; focus on non-zero scores.
45
+
46
+ Present a risk-ranked table:
47
+
48
+ | Rank | Function | File | riskScore | blastRadius | fanIn | testedBy |
49
+ |---|---|---|---|---|---|---|
50
+
51
+ Flag:
52
+ - `riskScore ≥ 5` → 🔴 HIGH — must inspect
53
+ - `riskScore 2–5` → 🟡 MEDIUM — inspect if time allows
54
+ - `riskScore < 2` → 🟢 LOW
55
+
56
+ ---
57
+
58
+ ## Step 3 — Deep-inspect each HIGH function
59
+
60
+ For each function with `riskScore ≥ 5`, call `get_minimal_context`:
61
+ ```json
62
+ {"directory": "$DIRECTORY", "functionName": "$FUNCTION_NAME"}
63
+ ```
64
+
65
+ **What to read:**
66
+
67
+ - `function.riskLevel` — `"high"` means the tool expanded caller/callee lists to 24. All shown entries are in the blast radius.
68
+ - `callers[*].callType` — all `"awaited"` = async interface frozen; any signature change breaks every caller without a compile error in JS. Mixed = looser coupling.
69
+ - `callees[*].isExternal: true` — function touches an external boundary (HTTP/DB). Failures here propagate outward and may not be caught in unit tests.
70
+ - `testedBy[*].confidence` — `"called"` = direct test (strong safety net). `"imported"` = test file only imports the module; `vi.mock()` can neutralize it entirely. Only `"imported"` = effectively untested.
71
+
72
+ For each HIGH function, state:
73
+ ```
74
+ $FUNCTION_NAME ($FILE):
75
+ Interface frozen? [yes — all callers await | no — mixed]
76
+ External boundary? [yes: $CALLEES | no]
77
+ Effective coverage: [strong (called) | weak (imported only) | none]
78
+ Verdict: [safe | needs direct tests first | coordinate with callers before merge]
79
+ ```
80
+
81
+ ---
82
+
83
+ ## Step 4 — Check cluster density for non-safe HIGH functions
84
+
85
+ For any HIGH function whose verdict is not "safe":
86
+ ```json
87
+ {"directory": "$DIRECTORY", "functionName": "$FUNCTION_NAME"}
88
+ // get_cluster
89
+ ```
90
+
91
+ Read `stats.clusterDensity`:
92
+
93
+ | Density | Meaning | Action |
94
+ |---|---|---|
95
+ | < 0.05 | Sparse — shared utilities | Change isolated; safe to land independently |
96
+ | 0.05–0.15 | Moderate coupling | Review `internalCallGraph` for transitively dependent functions |
97
+ | > 0.15 | Dense — tightly interwoven | Coordinate whole cluster; consider feature flag or staged rollout |
98
+
99
+ ---
100
+
101
+ ## Step 5 — Coverage gap check
102
+
103
+ For each HIGH or MEDIUM function with `testedBy` empty or all `"imported"`:
104
+
105
+ > "⚠️ `$FUNCTION_NAME` has no direct test coverage. Changes here are not caught by the test suite unless a test directly calls this function. Recommend adding a characterisation test before merging."
106
+
107
+ Suggest a concrete test scenario based on the function body from `get_minimal_context`.
108
+
109
+ ---
110
+
111
+ ## Step 6 — Output the review
112
+
113
+ ### Summary
114
+ - Total changed: N | HIGH: N | MEDIUM: N | Coverage gaps: N
115
+
116
+ ### Risk table
117
+ (from Step 2)
118
+
119
+ ### Function verdicts (HIGH only)
120
+ (from Steps 3–4)
121
+
122
+ ### Go / No-Go
123
+ - ✅ **Safe to merge** — no HIGH-risk uncovered functions
124
+ - ⚠️ **Merge with caution** — HIGH-risk functions exist but covered by direct tests
125
+ - 🛑 **Do not merge** — HIGH-risk uncovered functions with frozen interfaces or external boundaries
126
+
127
+ ---
128
+
129
+ ## Absolute constraints
130
+
131
+ - Never skip Step 3 for HIGH-risk functions — riskScore alone is not enough
132
+ - Always interpret `callType` — determines whether interface change is breaking
133
+ - Always interpret `testedBy.confidence` — `"imported"` is not strong coverage
134
+ - Do not recommend merging any function with `riskScore ≥ 5`, zero direct tests, and an external callee