symbiote-cli 0.1.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 (451) hide show
  1. package/LICENSE +21 -0
  2. package/dist/bin/symbiote.d.ts +3 -0
  3. package/dist/bin/symbiote.d.ts.map +1 -0
  4. package/dist/bin/symbiote.js +202 -0
  5. package/dist/bin/symbiote.js.map +1 -0
  6. package/dist/bin/synapse.d.ts +3 -0
  7. package/dist/bin/synapse.d.ts.map +1 -0
  8. package/dist/bin/synapse.js +369 -0
  9. package/dist/bin/synapse.js.map +1 -0
  10. package/dist/src/brain/embeddings.d.ts +9 -0
  11. package/dist/src/brain/embeddings.d.ts.map +1 -0
  12. package/dist/src/brain/embeddings.js +24 -0
  13. package/dist/src/brain/embeddings.js.map +1 -0
  14. package/dist/src/brain/health/constraint-checker.d.ts +16 -0
  15. package/dist/src/brain/health/constraint-checker.d.ts.map +1 -0
  16. package/dist/src/brain/health/constraint-checker.js +93 -0
  17. package/dist/src/brain/health/constraint-checker.js.map +1 -0
  18. package/dist/src/brain/health/coupling-analyzer.d.ts +9 -0
  19. package/dist/src/brain/health/coupling-analyzer.d.ts.map +1 -0
  20. package/dist/src/brain/health/coupling-analyzer.js +105 -0
  21. package/dist/src/brain/health/coupling-analyzer.js.map +1 -0
  22. package/dist/src/brain/health/cycle-detector.d.ts +12 -0
  23. package/dist/src/brain/health/cycle-detector.d.ts.map +1 -0
  24. package/dist/src/brain/health/cycle-detector.js +79 -0
  25. package/dist/src/brain/health/cycle-detector.js.map +1 -0
  26. package/dist/src/brain/health/dead-code-detector.d.ts +9 -0
  27. package/dist/src/brain/health/dead-code-detector.d.ts.map +1 -0
  28. package/dist/src/brain/health/dead-code-detector.js +72 -0
  29. package/dist/src/brain/health/dead-code-detector.js.map +1 -0
  30. package/dist/src/brain/health/history.d.ts +21 -0
  31. package/dist/src/brain/health/history.d.ts.map +1 -0
  32. package/dist/src/brain/health/history.js +35 -0
  33. package/dist/src/brain/health/history.js.map +1 -0
  34. package/dist/src/brain/health/index.d.ts +25 -0
  35. package/dist/src/brain/health/index.d.ts.map +1 -0
  36. package/dist/src/brain/health/index.js +76 -0
  37. package/dist/src/brain/health/index.js.map +1 -0
  38. package/dist/src/brain/health/scorer.d.ts +19 -0
  39. package/dist/src/brain/health/scorer.d.ts.map +1 -0
  40. package/dist/src/brain/health/scorer.js +47 -0
  41. package/dist/src/brain/health/scorer.js.map +1 -0
  42. package/dist/src/brain/health/types.d.ts +67 -0
  43. package/dist/src/brain/health/types.d.ts.map +1 -0
  44. package/dist/src/brain/health/types.js +2 -0
  45. package/dist/src/brain/health/types.js.map +1 -0
  46. package/dist/src/brain/health.d.ts +30 -0
  47. package/dist/src/brain/health.d.ts.map +1 -0
  48. package/dist/src/brain/health.js +147 -0
  49. package/dist/src/brain/health.js.map +1 -0
  50. package/dist/src/brain/index.d.ts +3 -0
  51. package/dist/src/brain/index.d.ts.map +1 -0
  52. package/dist/src/brain/index.js +3 -0
  53. package/dist/src/brain/index.js.map +1 -0
  54. package/dist/src/brain/intent.d.ts +31 -0
  55. package/dist/src/brain/intent.d.ts.map +1 -0
  56. package/dist/src/brain/intent.js +120 -0
  57. package/dist/src/brain/intent.js.map +1 -0
  58. package/dist/src/commands/dna.d.ts +2 -0
  59. package/dist/src/commands/dna.d.ts.map +1 -0
  60. package/dist/src/commands/dna.js +128 -0
  61. package/dist/src/commands/dna.js.map +1 -0
  62. package/dist/src/commands/hooks.d.ts +6 -0
  63. package/dist/src/commands/hooks.d.ts.map +1 -0
  64. package/dist/src/commands/hooks.js +210 -0
  65. package/dist/src/commands/hooks.js.map +1 -0
  66. package/dist/src/commands/impact.d.ts +2 -0
  67. package/dist/src/commands/impact.d.ts.map +1 -0
  68. package/dist/src/commands/impact.js +50 -0
  69. package/dist/src/commands/impact.js.map +1 -0
  70. package/dist/src/commands/index.d.ts +9 -0
  71. package/dist/src/commands/index.d.ts.map +1 -0
  72. package/dist/src/commands/index.js +9 -0
  73. package/dist/src/commands/index.js.map +1 -0
  74. package/dist/src/commands/init.d.ts +2 -0
  75. package/dist/src/commands/init.d.ts.map +1 -0
  76. package/dist/src/commands/init.js +132 -0
  77. package/dist/src/commands/init.js.map +1 -0
  78. package/dist/src/commands/install.d.ts +2 -0
  79. package/dist/src/commands/install.d.ts.map +1 -0
  80. package/dist/src/commands/install.js +67 -0
  81. package/dist/src/commands/install.js.map +1 -0
  82. package/dist/src/commands/mcp.d.ts +2 -0
  83. package/dist/src/commands/mcp.d.ts.map +1 -0
  84. package/dist/src/commands/mcp.js +51 -0
  85. package/dist/src/commands/mcp.js.map +1 -0
  86. package/dist/src/commands/scan.d.ts +2 -0
  87. package/dist/src/commands/scan.d.ts.map +1 -0
  88. package/dist/src/commands/scan.js +46 -0
  89. package/dist/src/commands/scan.js.map +1 -0
  90. package/dist/src/commands/serve.d.ts +2 -0
  91. package/dist/src/commands/serve.d.ts.map +1 -0
  92. package/dist/src/commands/serve.js +93 -0
  93. package/dist/src/commands/serve.js.map +1 -0
  94. package/dist/src/commands/shared.d.ts +11 -0
  95. package/dist/src/commands/shared.d.ts.map +1 -0
  96. package/dist/src/commands/shared.js +137 -0
  97. package/dist/src/commands/shared.js.map +1 -0
  98. package/dist/src/commands/unbond.d.ts +2 -0
  99. package/dist/src/commands/unbond.d.ts.map +1 -0
  100. package/dist/src/commands/unbond.js +29 -0
  101. package/dist/src/commands/unbond.js.map +1 -0
  102. package/dist/src/core/algorithms.d.ts +19 -0
  103. package/dist/src/core/algorithms.d.ts.map +1 -0
  104. package/dist/src/core/algorithms.js +98 -0
  105. package/dist/src/core/algorithms.js.map +1 -0
  106. package/dist/src/core/embeddings.d.ts +12 -0
  107. package/dist/src/core/embeddings.d.ts.map +1 -0
  108. package/dist/src/core/embeddings.js +64 -0
  109. package/dist/src/core/embeddings.js.map +1 -0
  110. package/dist/src/core/git-impact.d.ts +25 -0
  111. package/dist/src/core/git-impact.d.ts.map +1 -0
  112. package/dist/src/core/git-impact.js +97 -0
  113. package/dist/src/core/git-impact.js.map +1 -0
  114. package/dist/src/core/graph-builder.d.ts +5 -0
  115. package/dist/src/core/graph-builder.d.ts.map +1 -0
  116. package/dist/src/core/graph-builder.js +88 -0
  117. package/dist/src/core/graph-builder.js.map +1 -0
  118. package/dist/src/core/graph.d.ts +34 -0
  119. package/dist/src/core/graph.d.ts.map +1 -0
  120. package/dist/src/core/graph.js +95 -0
  121. package/dist/src/core/graph.js.map +1 -0
  122. package/dist/src/core/impact.d.ts +22 -0
  123. package/dist/src/core/impact.d.ts.map +1 -0
  124. package/dist/src/core/impact.js +68 -0
  125. package/dist/src/core/impact.js.map +1 -0
  126. package/dist/src/core/languages.d.ts +4 -0
  127. package/dist/src/core/languages.d.ts.map +1 -0
  128. package/dist/src/core/languages.js +59 -0
  129. package/dist/src/core/languages.js.map +1 -0
  130. package/dist/src/core/parser.d.ts +16 -0
  131. package/dist/src/core/parser.d.ts.map +1 -0
  132. package/dist/src/core/parser.js +689 -0
  133. package/dist/src/core/parser.js.map +1 -0
  134. package/dist/src/core/scanner.d.ts +26 -0
  135. package/dist/src/core/scanner.d.ts.map +1 -0
  136. package/dist/src/core/scanner.js +87 -0
  137. package/dist/src/core/scanner.js.map +1 -0
  138. package/dist/src/core/search.d.ts +34 -0
  139. package/dist/src/core/search.d.ts.map +1 -0
  140. package/dist/src/core/search.js +146 -0
  141. package/dist/src/core/search.js.map +1 -0
  142. package/dist/src/core/types.d.ts +29 -0
  143. package/dist/src/core/types.d.ts.map +1 -0
  144. package/dist/src/core/types.js +12 -0
  145. package/dist/src/core/types.js.map +1 -0
  146. package/dist/src/cortex/engine.d.ts +10 -0
  147. package/dist/src/cortex/engine.d.ts.map +1 -0
  148. package/dist/src/cortex/engine.js +93 -0
  149. package/dist/src/cortex/engine.js.map +1 -0
  150. package/dist/src/cortex/index.d.ts +13 -0
  151. package/dist/src/cortex/index.d.ts.map +1 -0
  152. package/dist/src/cortex/index.js +12 -0
  153. package/dist/src/cortex/index.js.map +1 -0
  154. package/dist/src/cortex/patterns.d.ts +63 -0
  155. package/dist/src/cortex/patterns.d.ts.map +1 -0
  156. package/dist/src/cortex/patterns.js +242 -0
  157. package/dist/src/cortex/patterns.js.map +1 -0
  158. package/dist/src/cortex/pgq-queries.d.ts +11 -0
  159. package/dist/src/cortex/pgq-queries.d.ts.map +1 -0
  160. package/dist/src/cortex/pgq-queries.js +23 -0
  161. package/dist/src/cortex/pgq-queries.js.map +1 -0
  162. package/dist/src/cortex/pgq.d.ts +5 -0
  163. package/dist/src/cortex/pgq.d.ts.map +1 -0
  164. package/dist/src/cortex/pgq.js +54 -0
  165. package/dist/src/cortex/pgq.js.map +1 -0
  166. package/dist/src/cortex/real-time-enrichment.d.ts +20 -0
  167. package/dist/src/cortex/real-time-enrichment.d.ts.map +1 -0
  168. package/dist/src/cortex/real-time-enrichment.js +96 -0
  169. package/dist/src/cortex/real-time-enrichment.js.map +1 -0
  170. package/dist/src/cortex/repository.d.ts +231 -0
  171. package/dist/src/cortex/repository.d.ts.map +1 -0
  172. package/dist/src/cortex/repository.js +1078 -0
  173. package/dist/src/cortex/repository.js.map +1 -0
  174. package/dist/src/cortex/schema.d.ts +9 -0
  175. package/dist/src/cortex/schema.d.ts.map +1 -0
  176. package/dist/src/cortex/schema.js +364 -0
  177. package/dist/src/cortex/schema.js.map +1 -0
  178. package/dist/src/cortex/stage-0-structure.d.ts +7 -0
  179. package/dist/src/cortex/stage-0-structure.d.ts.map +1 -0
  180. package/dist/src/cortex/stage-0-structure.js +119 -0
  181. package/dist/src/cortex/stage-0-structure.js.map +1 -0
  182. package/dist/src/cortex/stage-1-symbols.d.ts +7 -0
  183. package/dist/src/cortex/stage-1-symbols.d.ts.map +1 -0
  184. package/dist/src/cortex/stage-1-symbols.js +605 -0
  185. package/dist/src/cortex/stage-1-symbols.js.map +1 -0
  186. package/dist/src/cortex/stage-2-resolution.d.ts +7 -0
  187. package/dist/src/cortex/stage-2-resolution.d.ts.map +1 -0
  188. package/dist/src/cortex/stage-2-resolution.js +469 -0
  189. package/dist/src/cortex/stage-2-resolution.js.map +1 -0
  190. package/dist/src/cortex/stage-3-callgraph.d.ts +7 -0
  191. package/dist/src/cortex/stage-3-callgraph.d.ts.map +1 -0
  192. package/dist/src/cortex/stage-3-callgraph.js +323 -0
  193. package/dist/src/cortex/stage-3-callgraph.js.map +1 -0
  194. package/dist/src/cortex/stage-4-types.d.ts +7 -0
  195. package/dist/src/cortex/stage-4-types.d.ts.map +1 -0
  196. package/dist/src/cortex/stage-4-types.js +462 -0
  197. package/dist/src/cortex/stage-4-types.js.map +1 -0
  198. package/dist/src/cortex/stage-5-flow.d.ts +7 -0
  199. package/dist/src/cortex/stage-5-flow.d.ts.map +1 -0
  200. package/dist/src/cortex/stage-5-flow.js +702 -0
  201. package/dist/src/cortex/stage-5-flow.js.map +1 -0
  202. package/dist/src/cortex/stage-6-topology.d.ts +15 -0
  203. package/dist/src/cortex/stage-6-topology.d.ts.map +1 -0
  204. package/dist/src/cortex/stage-6-topology.js +382 -0
  205. package/dist/src/cortex/stage-6-topology.js.map +1 -0
  206. package/dist/src/cortex/stage-7-intelligence.d.ts +34 -0
  207. package/dist/src/cortex/stage-7-intelligence.d.ts.map +1 -0
  208. package/dist/src/cortex/stage-7-intelligence.js +258 -0
  209. package/dist/src/cortex/stage-7-intelligence.js.map +1 -0
  210. package/dist/src/cortex/topology-types.d.ts +78 -0
  211. package/dist/src/cortex/topology-types.d.ts.map +1 -0
  212. package/dist/src/cortex/topology-types.js +2 -0
  213. package/dist/src/cortex/topology-types.js.map +1 -0
  214. package/dist/src/cortex/types.d.ts +250 -0
  215. package/dist/src/cortex/types.d.ts.map +1 -0
  216. package/dist/src/cortex/types.js +2 -0
  217. package/dist/src/cortex/types.js.map +1 -0
  218. package/dist/src/dna/embeddings.d.ts +10 -0
  219. package/dist/src/dna/embeddings.d.ts.map +1 -0
  220. package/dist/src/dna/embeddings.js +46 -0
  221. package/dist/src/dna/embeddings.js.map +1 -0
  222. package/dist/src/dna/engine.d.ts +30 -0
  223. package/dist/src/dna/engine.d.ts.map +1 -0
  224. package/dist/src/dna/engine.js +254 -0
  225. package/dist/src/dna/engine.js.map +1 -0
  226. package/dist/src/dna/index.d.ts +5 -0
  227. package/dist/src/dna/index.d.ts.map +1 -0
  228. package/dist/src/dna/index.js +5 -0
  229. package/dist/src/dna/index.js.map +1 -0
  230. package/dist/src/dna/storage.d.ts +19 -0
  231. package/dist/src/dna/storage.d.ts.map +1 -0
  232. package/dist/src/dna/storage.js +112 -0
  233. package/dist/src/dna/storage.js.map +1 -0
  234. package/dist/src/dna/types.d.ts +38 -0
  235. package/dist/src/dna/types.d.ts.map +1 -0
  236. package/dist/src/dna/types.js +114 -0
  237. package/dist/src/dna/types.js.map +1 -0
  238. package/dist/src/events/bus.d.ts +10 -0
  239. package/dist/src/events/bus.d.ts.map +1 -0
  240. package/dist/src/events/bus.js +36 -0
  241. package/dist/src/events/bus.js.map +1 -0
  242. package/dist/src/events/ipc.d.ts +3 -0
  243. package/dist/src/events/ipc.d.ts.map +1 -0
  244. package/dist/src/events/ipc.js +25 -0
  245. package/dist/src/events/ipc.js.map +1 -0
  246. package/dist/src/events/session.d.ts +21 -0
  247. package/dist/src/events/session.d.ts.map +1 -0
  248. package/dist/src/events/session.js +39 -0
  249. package/dist/src/events/session.js.map +1 -0
  250. package/dist/src/events/types.d.ts +15 -0
  251. package/dist/src/events/types.d.ts.map +1 -0
  252. package/dist/src/events/types.js +26 -0
  253. package/dist/src/events/types.js.map +1 -0
  254. package/dist/src/hooks/attention.d.ts +26 -0
  255. package/dist/src/hooks/attention.d.ts.map +1 -0
  256. package/dist/src/hooks/attention.js +90 -0
  257. package/dist/src/hooks/attention.js.map +1 -0
  258. package/dist/src/hooks/handlers/post-tool-use-failure.d.ts +20 -0
  259. package/dist/src/hooks/handlers/post-tool-use-failure.d.ts.map +1 -0
  260. package/dist/src/hooks/handlers/post-tool-use-failure.js +60 -0
  261. package/dist/src/hooks/handlers/post-tool-use-failure.js.map +1 -0
  262. package/dist/src/hooks/handlers/post-tool-use.d.ts +22 -0
  263. package/dist/src/hooks/handlers/post-tool-use.d.ts.map +1 -0
  264. package/dist/src/hooks/handlers/post-tool-use.js +96 -0
  265. package/dist/src/hooks/handlers/post-tool-use.js.map +1 -0
  266. package/dist/src/hooks/handlers/pre-compact.d.ts +17 -0
  267. package/dist/src/hooks/handlers/pre-compact.d.ts.map +1 -0
  268. package/dist/src/hooks/handlers/pre-compact.js +28 -0
  269. package/dist/src/hooks/handlers/pre-compact.js.map +1 -0
  270. package/dist/src/hooks/handlers/pre-tool-use.d.ts +32 -0
  271. package/dist/src/hooks/handlers/pre-tool-use.d.ts.map +1 -0
  272. package/dist/src/hooks/handlers/pre-tool-use.js +219 -0
  273. package/dist/src/hooks/handlers/pre-tool-use.js.map +1 -0
  274. package/dist/src/hooks/handlers/session-end.d.ts +18 -0
  275. package/dist/src/hooks/handlers/session-end.d.ts.map +1 -0
  276. package/dist/src/hooks/handlers/session-end.js +42 -0
  277. package/dist/src/hooks/handlers/session-end.js.map +1 -0
  278. package/dist/src/hooks/handlers/session-start.d.ts +25 -0
  279. package/dist/src/hooks/handlers/session-start.d.ts.map +1 -0
  280. package/dist/src/hooks/handlers/session-start.js +61 -0
  281. package/dist/src/hooks/handlers/session-start.js.map +1 -0
  282. package/dist/src/hooks/handlers/stop.d.ts +21 -0
  283. package/dist/src/hooks/handlers/stop.d.ts.map +1 -0
  284. package/dist/src/hooks/handlers/stop.js +40 -0
  285. package/dist/src/hooks/handlers/stop.js.map +1 -0
  286. package/dist/src/hooks/handlers/subagent-start.d.ts +17 -0
  287. package/dist/src/hooks/handlers/subagent-start.d.ts.map +1 -0
  288. package/dist/src/hooks/handlers/subagent-start.js +48 -0
  289. package/dist/src/hooks/handlers/subagent-start.js.map +1 -0
  290. package/dist/src/hooks/handlers/user-prompt-submit.d.ts +12 -0
  291. package/dist/src/hooks/handlers/user-prompt-submit.d.ts.map +1 -0
  292. package/dist/src/hooks/handlers/user-prompt-submit.js +31 -0
  293. package/dist/src/hooks/handlers/user-prompt-submit.js.map +1 -0
  294. package/dist/src/hooks/index.d.ts +14 -0
  295. package/dist/src/hooks/index.d.ts.map +1 -0
  296. package/dist/src/hooks/index.js +13 -0
  297. package/dist/src/hooks/index.js.map +1 -0
  298. package/dist/src/hooks/post-tool-use.d.ts +12 -0
  299. package/dist/src/hooks/post-tool-use.d.ts.map +1 -0
  300. package/dist/src/hooks/post-tool-use.js +33 -0
  301. package/dist/src/hooks/post-tool-use.js.map +1 -0
  302. package/dist/src/hooks/pre-tool-use.d.ts +24 -0
  303. package/dist/src/hooks/pre-tool-use.d.ts.map +1 -0
  304. package/dist/src/hooks/pre-tool-use.js +117 -0
  305. package/dist/src/hooks/pre-tool-use.js.map +1 -0
  306. package/dist/src/hooks/session-store.d.ts +55 -0
  307. package/dist/src/hooks/session-store.d.ts.map +1 -0
  308. package/dist/src/hooks/session-store.js +69 -0
  309. package/dist/src/hooks/session-store.js.map +1 -0
  310. package/dist/src/hooks/types.d.ts +67 -0
  311. package/dist/src/hooks/types.d.ts.map +1 -0
  312. package/dist/src/hooks/types.js +28 -0
  313. package/dist/src/hooks/types.js.map +1 -0
  314. package/dist/src/index.d.ts +16 -0
  315. package/dist/src/index.d.ts.map +1 -0
  316. package/dist/src/index.js +16 -0
  317. package/dist/src/index.js.map +1 -0
  318. package/dist/src/init/agent-connector.d.ts +43 -0
  319. package/dist/src/init/agent-connector.d.ts.map +1 -0
  320. package/dist/src/init/agent-connector.js +338 -0
  321. package/dist/src/init/agent-connector.js.map +1 -0
  322. package/dist/src/init/dna-bootstrap.d.ts +10 -0
  323. package/dist/src/init/dna-bootstrap.d.ts.map +1 -0
  324. package/dist/src/init/dna-bootstrap.js +32 -0
  325. package/dist/src/init/dna-bootstrap.js.map +1 -0
  326. package/dist/src/init/index.d.ts +29 -0
  327. package/dist/src/init/index.d.ts.map +1 -0
  328. package/dist/src/init/index.js +81 -0
  329. package/dist/src/init/index.js.map +1 -0
  330. package/dist/src/init/overview-generator.d.ts +5 -0
  331. package/dist/src/init/overview-generator.d.ts.map +1 -0
  332. package/dist/src/init/overview-generator.js +85 -0
  333. package/dist/src/init/overview-generator.js.map +1 -0
  334. package/dist/src/init/parsers/eslint-config.d.ts +10 -0
  335. package/dist/src/init/parsers/eslint-config.d.ts.map +1 -0
  336. package/dist/src/init/parsers/eslint-config.js +50 -0
  337. package/dist/src/init/parsers/eslint-config.js.map +1 -0
  338. package/dist/src/init/parsers/markdown-rules.d.ts +3 -0
  339. package/dist/src/init/parsers/markdown-rules.d.ts.map +1 -0
  340. package/dist/src/init/parsers/markdown-rules.js +90 -0
  341. package/dist/src/init/parsers/markdown-rules.js.map +1 -0
  342. package/dist/src/init/parsers/package-json.d.ts +17 -0
  343. package/dist/src/init/parsers/package-json.d.ts.map +1 -0
  344. package/dist/src/init/parsers/package-json.js +75 -0
  345. package/dist/src/init/parsers/package-json.js.map +1 -0
  346. package/dist/src/init/parsers/prettier-config.d.ts +16 -0
  347. package/dist/src/init/parsers/prettier-config.d.ts.map +1 -0
  348. package/dist/src/init/parsers/prettier-config.js +30 -0
  349. package/dist/src/init/parsers/prettier-config.js.map +1 -0
  350. package/dist/src/init/parsers/tsconfig.d.ts +32 -0
  351. package/dist/src/init/parsers/tsconfig.d.ts.map +1 -0
  352. package/dist/src/init/parsers/tsconfig.js +64 -0
  353. package/dist/src/init/parsers/tsconfig.js.map +1 -0
  354. package/dist/src/init/parsers/types.d.ts +27 -0
  355. package/dist/src/init/parsers/types.d.ts.map +1 -0
  356. package/dist/src/init/parsers/types.js +2 -0
  357. package/dist/src/init/parsers/types.js.map +1 -0
  358. package/dist/src/init/project-analyzer.d.ts +3 -0
  359. package/dist/src/init/project-analyzer.d.ts.map +1 -0
  360. package/dist/src/init/project-analyzer.js +102 -0
  361. package/dist/src/init/project-analyzer.js.map +1 -0
  362. package/dist/src/init/rule-importer.d.ts +3 -0
  363. package/dist/src/init/rule-importer.d.ts.map +1 -0
  364. package/dist/src/init/rule-importer.js +101 -0
  365. package/dist/src/init/rule-importer.js.map +1 -0
  366. package/dist/src/mcp/context.d.ts +43 -0
  367. package/dist/src/mcp/context.d.ts.map +1 -0
  368. package/dist/src/mcp/context.js +167 -0
  369. package/dist/src/mcp/context.js.map +1 -0
  370. package/dist/src/mcp/http-api.d.ts +10 -0
  371. package/dist/src/mcp/http-api.d.ts.map +1 -0
  372. package/dist/src/mcp/http-api.js +580 -0
  373. package/dist/src/mcp/http-api.js.map +1 -0
  374. package/dist/src/mcp/index.d.ts +8 -0
  375. package/dist/src/mcp/index.d.ts.map +1 -0
  376. package/dist/src/mcp/index.js +8 -0
  377. package/dist/src/mcp/index.js.map +1 -0
  378. package/dist/src/mcp/resources.d.ts +5 -0
  379. package/dist/src/mcp/resources.d.ts.map +1 -0
  380. package/dist/src/mcp/resources.js +78 -0
  381. package/dist/src/mcp/resources.js.map +1 -0
  382. package/dist/src/mcp/server.d.ts +6 -0
  383. package/dist/src/mcp/server.d.ts.map +1 -0
  384. package/dist/src/mcp/server.js +265 -0
  385. package/dist/src/mcp/server.js.map +1 -0
  386. package/dist/src/mcp/tool-response.d.ts +6 -0
  387. package/dist/src/mcp/tool-response.d.ts.map +1 -0
  388. package/dist/src/mcp/tool-response.js +19 -0
  389. package/dist/src/mcp/tool-response.js.map +1 -0
  390. package/dist/src/mcp/tools/architecture-tools.d.ts +15 -0
  391. package/dist/src/mcp/tools/architecture-tools.d.ts.map +1 -0
  392. package/dist/src/mcp/tools/architecture-tools.js +56 -0
  393. package/dist/src/mcp/tools/architecture-tools.js.map +1 -0
  394. package/dist/src/mcp/tools/dna-tools.d.ts +21 -0
  395. package/dist/src/mcp/tools/dna-tools.d.ts.map +1 -0
  396. package/dist/src/mcp/tools/dna-tools.js +15 -0
  397. package/dist/src/mcp/tools/dna-tools.js.map +1 -0
  398. package/dist/src/mcp/tools/graph-tools.d.ts +49 -0
  399. package/dist/src/mcp/tools/graph-tools.d.ts.map +1 -0
  400. package/dist/src/mcp/tools/graph-tools.js +45 -0
  401. package/dist/src/mcp/tools/graph-tools.js.map +1 -0
  402. package/dist/src/mcp/tools/health-tools.d.ts +5 -0
  403. package/dist/src/mcp/tools/health-tools.d.ts.map +1 -0
  404. package/dist/src/mcp/tools/health-tools.js +7 -0
  405. package/dist/src/mcp/tools/health-tools.js.map +1 -0
  406. package/dist/src/mcp/tools/impact-tools.d.ts +21 -0
  407. package/dist/src/mcp/tools/impact-tools.d.ts.map +1 -0
  408. package/dist/src/mcp/tools/impact-tools.js +23 -0
  409. package/dist/src/mcp/tools/impact-tools.js.map +1 -0
  410. package/dist/src/mcp/tools/intent-tools.d.ts +32 -0
  411. package/dist/src/mcp/tools/intent-tools.d.ts.map +1 -0
  412. package/dist/src/mcp/tools/intent-tools.js +77 -0
  413. package/dist/src/mcp/tools/intent-tools.js.map +1 -0
  414. package/dist/src/mcp/tools/project-tools.d.ts +53 -0
  415. package/dist/src/mcp/tools/project-tools.d.ts.map +1 -0
  416. package/dist/src/mcp/tools/project-tools.js +91 -0
  417. package/dist/src/mcp/tools/project-tools.js.map +1 -0
  418. package/dist/src/mcp/tools/rename-tool.d.ts +25 -0
  419. package/dist/src/mcp/tools/rename-tool.d.ts.map +1 -0
  420. package/dist/src/mcp/tools/rename-tool.js +106 -0
  421. package/dist/src/mcp/tools/rename-tool.js.map +1 -0
  422. package/dist/src/mcp/tools/trace-tools.d.ts +4 -0
  423. package/dist/src/mcp/tools/trace-tools.d.ts.map +1 -0
  424. package/dist/src/mcp/tools/trace-tools.js +268 -0
  425. package/dist/src/mcp/tools/trace-tools.js.map +1 -0
  426. package/dist/src/storage/db.d.ts +13 -0
  427. package/dist/src/storage/db.d.ts.map +1 -0
  428. package/dist/src/storage/db.js +230 -0
  429. package/dist/src/storage/db.js.map +1 -0
  430. package/dist/src/storage/repository.d.ts +54 -0
  431. package/dist/src/storage/repository.d.ts.map +1 -0
  432. package/dist/src/storage/repository.js +257 -0
  433. package/dist/src/storage/repository.js.map +1 -0
  434. package/dist/src/utils/config.d.ts +18 -0
  435. package/dist/src/utils/config.d.ts.map +1 -0
  436. package/dist/src/utils/config.js +93 -0
  437. package/dist/src/utils/config.js.map +1 -0
  438. package/dist/src/utils/files.d.ts +3 -0
  439. package/dist/src/utils/files.d.ts.map +1 -0
  440. package/dist/src/utils/files.js +52 -0
  441. package/dist/src/utils/files.js.map +1 -0
  442. package/dist/src/utils/strings.d.ts +2 -0
  443. package/dist/src/utils/strings.d.ts.map +1 -0
  444. package/dist/src/utils/strings.js +11 -0
  445. package/dist/src/utils/strings.js.map +1 -0
  446. package/dist/tsconfig.tsbuildinfo +1 -0
  447. package/hooks/post-tool-use.sh +37 -0
  448. package/hooks/pre-tool-use.sh +43 -0
  449. package/hooks/session-start.sh +67 -0
  450. package/package.json +103 -0
  451. package/skills/symbiote-init/SKILL.md +104 -0
@@ -0,0 +1,76 @@
1
+ import { CycleDetector } from './cycle-detector.js';
2
+ import { DeadCodeDetector } from './dead-code-detector.js';
3
+ import { CouplingAnalyzer } from './coupling-analyzer.js';
4
+ import { ConstraintChecker } from './constraint-checker.js';
5
+ import { computeHealthScore } from './scorer.js';
6
+ import { HealthHistory } from './history.js';
7
+ export class HealthEngine {
8
+ repo;
9
+ cycleDetector;
10
+ deadCodeDetector;
11
+ couplingAnalyzer;
12
+ constraintChecker;
13
+ history;
14
+ constructor(repo, intent, db) {
15
+ this.repo = repo;
16
+ this.cycleDetector = new CycleDetector(repo);
17
+ this.deadCodeDetector = new DeadCodeDetector(repo);
18
+ this.couplingAnalyzer = new CouplingAnalyzer(repo);
19
+ this.constraintChecker = new ConstraintChecker(repo, intent);
20
+ this.history = new HealthHistory(db);
21
+ }
22
+ async analyze() {
23
+ const [allNodes, allEdges] = await Promise.all([
24
+ this.repo.getAllNodes(),
25
+ this.repo.getAllEdges(),
26
+ ]);
27
+ const preFetched = { nodes: allNodes, edges: allEdges };
28
+ const constraintResult = await this.constraintChecker.check();
29
+ const circularDeps = await this.cycleDetector.detect(preFetched);
30
+ const deadCode = await this.deadCodeDetector.detect(preFetched);
31
+ const couplingHotspots = await this.couplingAnalyzer.detect(preFetched);
32
+ const scored = computeHealthScore({
33
+ constraintViolations: constraintResult.violations.length,
34
+ circularDeps: circularDeps.length,
35
+ deadCode: deadCode.length,
36
+ couplingHotspots: couplingHotspots.length,
37
+ });
38
+ return {
39
+ score: scored.score,
40
+ categories: scored.categories,
41
+ constraintViolations: constraintResult.violations,
42
+ descriptiveConstraints: constraintResult.descriptive,
43
+ circularDeps,
44
+ deadCode,
45
+ couplingHotspots,
46
+ timestamp: new Date().toISOString(),
47
+ };
48
+ }
49
+ async saveSnapshot(report) {
50
+ const input = {
51
+ score: report.score,
52
+ constraintScore: report.categories.constraints.score,
53
+ circularDepScore: report.categories.circularDeps.score,
54
+ deadCodeScore: report.categories.deadCode.score,
55
+ couplingScore: report.categories.coupling.score,
56
+ constraintViolationCount: report.constraintViolations.length,
57
+ circularDepCount: report.circularDeps.length,
58
+ deadCodeCount: report.deadCode.length,
59
+ couplingHotspotCount: report.couplingHotspots.length,
60
+ };
61
+ await this.history.save(input);
62
+ }
63
+ async getHistory(limit) {
64
+ return this.history.list(limit);
65
+ }
66
+ async getLatestSnapshot() {
67
+ return this.history.latest();
68
+ }
69
+ }
70
+ export { CycleDetector } from './cycle-detector.js';
71
+ export { DeadCodeDetector } from './dead-code-detector.js';
72
+ export { CouplingAnalyzer } from './coupling-analyzer.js';
73
+ export { ConstraintChecker } from './constraint-checker.js';
74
+ export { computeHealthScore, computeCategoryScore } from './scorer.js';
75
+ export { HealthHistory } from './history.js';
76
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/brain/health/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE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M,CAAC,gBAAgB,CAAC,MAAM;SACvD,CAAC;QACF,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,KAAa;QAC1B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IAED,KAAK,CAAC,iBAAiB;QACnB,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;IACjC,CAAC;CACJ;AAYD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAA8B,MAAM,yBAAyB,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,EAAE,aAAa,EAA0B,MAAM,cAAc,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { CategoryScore } from './types.js';
2
+ export declare function computeCategoryScore(issueCount: number, penaltyPerIssue: number): number;
3
+ export interface IssueCounts {
4
+ constraintViolations: number;
5
+ circularDeps: number;
6
+ deadCode: number;
7
+ couplingHotspots: number;
8
+ }
9
+ export interface ScoredResult {
10
+ score: number;
11
+ categories: {
12
+ constraints: CategoryScore;
13
+ circularDeps: CategoryScore;
14
+ deadCode: CategoryScore;
15
+ coupling: CategoryScore;
16
+ };
17
+ }
18
+ export declare function computeHealthScore(counts: IssueCounts): ScoredResult;
19
+ //# sourceMappingURL=scorer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scorer.d.ts","sourceRoot":"","sources":["../../../../src/brain/health/scorer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAYhD,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,MAAM,CAExF;AAED,MAAM,WAAW,WAAW;IACxB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,YAAY;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE;QACR,WAAW,EAAE,aAAa,CAAC;QAC3B,YAAY,EAAE,aAAa,CAAC;QAC5B,QAAQ,EAAE,aAAa,CAAC;QACxB,QAAQ,EAAE,aAAa,CAAC;KAC3B,CAAC;CACL;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,WAAW,GAAG,YAAY,CA4CpE"}
@@ -0,0 +1,47 @@
1
+ const WEIGHT_CONSTRAINTS = 0.4;
2
+ const WEIGHT_CIRCULAR = 0.2;
3
+ const WEIGHT_DEAD_CODE = 0.2;
4
+ const WEIGHT_COUPLING = 0.2;
5
+ const PENALTY_PER_CONSTRAINT_VIOLATION = 20;
6
+ const PENALTY_PER_CIRCULAR_DEP = 25;
7
+ const PENALTY_PER_DEAD_CODE = 2;
8
+ const PENALTY_PER_COUPLING_HOTSPOT = 15;
9
+ export function computeCategoryScore(issueCount, penaltyPerIssue) {
10
+ return Math.max(0, 100 - issueCount * penaltyPerIssue);
11
+ }
12
+ export function computeHealthScore(counts) {
13
+ const constraintScore = computeCategoryScore(counts.constraintViolations, PENALTY_PER_CONSTRAINT_VIOLATION);
14
+ const circularScore = computeCategoryScore(counts.circularDeps, PENALTY_PER_CIRCULAR_DEP);
15
+ const deadCodeScore = computeCategoryScore(counts.deadCode, PENALTY_PER_DEAD_CODE);
16
+ const couplingScore = computeCategoryScore(counts.couplingHotspots, PENALTY_PER_COUPLING_HOTSPOT);
17
+ const total = Math.round(constraintScore * WEIGHT_CONSTRAINTS +
18
+ circularScore * WEIGHT_CIRCULAR +
19
+ deadCodeScore * WEIGHT_DEAD_CODE +
20
+ couplingScore * WEIGHT_COUPLING);
21
+ return {
22
+ score: total,
23
+ categories: {
24
+ constraints: {
25
+ score: constraintScore,
26
+ weight: WEIGHT_CONSTRAINTS,
27
+ issueCount: counts.constraintViolations,
28
+ },
29
+ circularDeps: {
30
+ score: circularScore,
31
+ weight: WEIGHT_CIRCULAR,
32
+ issueCount: counts.circularDeps,
33
+ },
34
+ deadCode: {
35
+ score: deadCodeScore,
36
+ weight: WEIGHT_DEAD_CODE,
37
+ issueCount: counts.deadCode,
38
+ },
39
+ coupling: {
40
+ score: couplingScore,
41
+ weight: WEIGHT_COUPLING,
42
+ issueCount: counts.couplingHotspots,
43
+ },
44
+ },
45
+ };
46
+ }
47
+ //# sourceMappingURL=scorer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scorer.js","sourceRoot":"","sources":["../../../../src/brain/health/scorer.ts"],"names":[],"mappings":"AAEA,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAC/B,MAAM,eAAe,GAAG,GAAG,CAAC;AAC5B,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAC7B,MAAM,eAAe,GAAG,GAAG,CAAC;AAE5B,MAAM,gCAAgC,GAAG,EAAE,CAAC;AAC5C,MAAM,wBAAwB,GAAG,EAAE,CAAC;AACpC,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAChC,MAAM,4BAA4B,GAAG,EAAE,CAAC;AAExC,MAAM,UAAU,oBAAoB,CAAC,UAAkB,EAAE,eAAuB;IAC5E,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,GAAG,UAAU,GAAG,eAAe,CAAC,CAAC;AAC3D,CAAC;AAmBD,MAAM,UAAU,kBAAkB,CAAC,MAAmB;IAClD,MAAM,eAAe,GAAG,oBAAoB,CACxC,MAAM,CAAC,oBAAoB,EAC3B,gCAAgC,CACnC,CAAC;IACF,MAAM,aAAa,GAAG,oBAAoB,CAAC,MAAM,CAAC,YAAY,EAAE,wBAAwB,CAAC,CAAC;IAC1F,MAAM,aAAa,GAAG,oBAAoB,CAAC,MAAM,CAAC,QAAQ,EAAE,qBAAqB,CAAC,CAAC;IACnF,MAAM,aAAa,GAAG,oBAAoB,CACtC,MAAM,CAAC,gBAAgB,EACvB,4BAA4B,CAC/B,CAAC;IAEF,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CACpB,eAAe,GAAG,kBAAkB;QAChC,aAAa,GAAG,eAAe;QAC/B,aAAa,GAAG,gBAAgB;QAChC,aAAa,GAAG,eAAe,CACtC,CAAC;IAEF,OAAO;QACH,KAAK,EAAE,KAAK;QACZ,UAAU,EAAE;YACR,WAAW,EAAE;gBACT,KAAK,EAAE,eAAe;gBACtB,MAAM,EAAE,kBAAkB;gBAC1B,UAAU,EAAE,MAAM,CAAC,oBAAoB;aAC1C;YACD,YAAY,EAAE;gBACV,KAAK,EAAE,aAAa;gBACpB,MAAM,EAAE,eAAe;gBACvB,UAAU,EAAE,MAAM,CAAC,YAAY;aAClC;YACD,QAAQ,EAAE;gBACN,KAAK,EAAE,aAAa;gBACpB,MAAM,EAAE,gBAAgB;gBACxB,UAAU,EAAE,MAAM,CAAC,QAAQ;aAC9B;YACD,QAAQ,EAAE;gBACN,KAAK,EAAE,aAAa;gBACpB,MAAM,EAAE,eAAe;gBACvB,UAAU,EAAE,MAAM,CAAC,gBAAgB;aACtC;SACJ;KACJ,CAAC;AACN,CAAC"}
@@ -0,0 +1,67 @@
1
+ import type { NodeRecord } from '#storage/repository.js';
2
+ export interface ConstraintViolation {
3
+ constraintId: string;
4
+ constraintDescription: string;
5
+ filePath: string;
6
+ lineStart: number;
7
+ lineEnd: number;
8
+ matchedText: string;
9
+ }
10
+ export interface DescriptiveConstraint {
11
+ constraintId: string;
12
+ description: string;
13
+ scope: string;
14
+ }
15
+ export interface CircularDep {
16
+ chain: string[];
17
+ filePaths: string[];
18
+ }
19
+ export interface DeadCodeEntry {
20
+ node: NodeRecord;
21
+ reason: string;
22
+ }
23
+ export interface CouplingHotspot {
24
+ filePath: string;
25
+ incomingEdges: number;
26
+ outgoingEdges: number;
27
+ totalEdges: number;
28
+ coupledFiles: string[];
29
+ fanIn: number;
30
+ fanOut: number;
31
+ weightedCount: number;
32
+ kind: 'fan-in' | 'fan-out' | 'both';
33
+ }
34
+ export interface CategoryScore {
35
+ score: number;
36
+ weight: number;
37
+ issueCount: number;
38
+ }
39
+ export interface HealthReport {
40
+ score: number;
41
+ categories: {
42
+ constraints: CategoryScore;
43
+ circularDeps: CategoryScore;
44
+ deadCode: CategoryScore;
45
+ coupling: CategoryScore;
46
+ };
47
+ constraintViolations: ConstraintViolation[];
48
+ descriptiveConstraints: DescriptiveConstraint[];
49
+ circularDeps: CircularDep[];
50
+ deadCode: DeadCodeEntry[];
51
+ couplingHotspots: CouplingHotspot[];
52
+ timestamp: string;
53
+ }
54
+ export interface HealthSnapshot {
55
+ id: number;
56
+ score: number;
57
+ constraintScore: number;
58
+ circularDepScore: number;
59
+ deadCodeScore: number;
60
+ couplingScore: number;
61
+ constraintViolationCount: number;
62
+ circularDepCount: number;
63
+ deadCodeCount: number;
64
+ couplingHotspotCount: number;
65
+ createdAt: string;
66
+ }
67
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/brain/health/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,MAAM,WAAW,mBAAmB;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,qBAAqB;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EA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,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,wBAAwB,EAAE,MAAM,CAAC;IACjC,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;CACrB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/brain/health/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,30 @@
1
+ import type { Repository, NodeRecord } from '../storage/repository.js';
2
+ import type { IntentStore } from './intent.js';
3
+ export interface HealthViolation {
4
+ constraintId: string;
5
+ description: string;
6
+ scope: string;
7
+ }
8
+ export interface CircularDep {
9
+ nodeIds: string[];
10
+ filePaths: string[];
11
+ }
12
+ export interface HealthReport {
13
+ score: number;
14
+ orphanFiles: string[];
15
+ circularDeps: CircularDep[];
16
+ constraintViolations: HealthViolation[];
17
+ deadCode: NodeRecord[];
18
+ }
19
+ export declare class HealthAnalyzer {
20
+ private repo;
21
+ private intent;
22
+ constructor(repo: Repository, intent: IntentStore);
23
+ analyze(): HealthReport;
24
+ private findOrphanFiles;
25
+ private findCircularDeps;
26
+ private checkConstraints;
27
+ private findDeadCode;
28
+ private computeScore;
29
+ }
30
+ //# sourceMappingURL=health.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"health.d.ts","sourceRoot":"","sources":["../../../src/brain/health.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,WAAW,eAAe;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IACxB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,YAAY;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,EAAE,WAAW,EAAE,CAAC;IAC5B,oBAAoB,EAAE,eAAe,EAAE,CAAC;IACxC,QAAQ,EAAE,UAAU,EAAE,CAAC;CAC1B;AAOD,qBAAa,cAAc;IAEnB,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,MAAM;gBADN,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,WAAW;IAG/B,OAAO,IAAI,YAAY;IAsBvB,OAAO,CAAC,eAAe;IAyCvB,OAAO,CAAC,gBAAgB;IAkExB,OAAO,CAAC,gBAAgB;IAWxB,OAAO,CAAC,YAAY;IAgBpB,OAAO,CAAC,YAAY;CAiCvB"}
@@ -0,0 +1,147 @@
1
+ const WEIGHT_CONSTRAINTS = 0.4;
2
+ const WEIGHT_CIRCULAR = 0.2;
3
+ const WEIGHT_DEAD_CODE = 0.2;
4
+ const WEIGHT_COUPLING = 0.2;
5
+ export class HealthAnalyzer {
6
+ repo;
7
+ intent;
8
+ constructor(repo, intent) {
9
+ this.repo = repo;
10
+ this.intent = intent;
11
+ }
12
+ analyze() {
13
+ const orphanFiles = this.findOrphanFiles();
14
+ const circularDeps = this.findCircularDeps();
15
+ const constraintViolations = this.checkConstraints();
16
+ const deadCode = this.findDeadCode();
17
+ const score = this.computeScore(orphanFiles, circularDeps, constraintViolations, deadCode);
18
+ return {
19
+ score,
20
+ orphanFiles,
21
+ circularDeps,
22
+ constraintViolations,
23
+ deadCode,
24
+ };
25
+ }
26
+ findOrphanFiles() {
27
+ const stats = this.repo.getStats();
28
+ if (stats.nodes === 0)
29
+ return [];
30
+ const allFiles = new Set();
31
+ const importedFiles = new Set();
32
+ const allNodes = this.repo.getAllNodes();
33
+ for (const node of allNodes) {
34
+ allFiles.add(node.filePath);
35
+ }
36
+ const allEdges = this.repo.getAllEdges();
37
+ for (const edge of allEdges) {
38
+ if (edge.type === 'imports') {
39
+ const match = edge.targetId.match(/^file:(.+)$/);
40
+ if (match)
41
+ importedFiles.add(match[1]);
42
+ }
43
+ }
44
+ const orphans = [];
45
+ for (const file of allFiles) {
46
+ const hasIncoming = allEdges.some((e) => {
47
+ const targetNode = this.repo.getNodeById(e.targetId);
48
+ return (targetNode &&
49
+ targetNode.filePath === file &&
50
+ e.sourceId !== e.targetId);
51
+ });
52
+ const isImported = importedFiles.has(file);
53
+ if (!hasIncoming && !isImported) {
54
+ orphans.push(file);
55
+ }
56
+ }
57
+ return orphans;
58
+ }
59
+ findCircularDeps() {
60
+ const cycles = [];
61
+ const allEdges = this.repo.getAllEdges();
62
+ const adjacency = new Map();
63
+ for (const edge of allEdges) {
64
+ if (!adjacency.has(edge.sourceId)) {
65
+ adjacency.set(edge.sourceId, []);
66
+ }
67
+ adjacency.get(edge.sourceId).push(edge.targetId);
68
+ }
69
+ const visited = new Set();
70
+ const inStack = new Set();
71
+ const dfs = (nodeId, nodePath) => {
72
+ if (inStack.has(nodeId)) {
73
+ const cycleStart = nodePath.indexOf(nodeId);
74
+ if (cycleStart >= 0) {
75
+ const cycleIds = nodePath.slice(cycleStart);
76
+ const filePaths = [
77
+ ...new Set(cycleIds
78
+ .map((id) => this.repo.getNodeById(id))
79
+ .filter((n) => n !== undefined)
80
+ .map((n) => n.filePath)),
81
+ ];
82
+ if (filePaths.length > 1) {
83
+ cycles.push({
84
+ nodeIds: cycleIds,
85
+ filePaths,
86
+ });
87
+ }
88
+ }
89
+ return;
90
+ }
91
+ if (visited.has(nodeId))
92
+ return;
93
+ visited.add(nodeId);
94
+ inStack.add(nodeId);
95
+ const neighbors = adjacency.get(nodeId) ?? [];
96
+ for (const neighbor of neighbors) {
97
+ dfs(neighbor, [...nodePath, nodeId]);
98
+ }
99
+ inStack.delete(nodeId);
100
+ };
101
+ for (const nodeId of adjacency.keys()) {
102
+ if (!visited.has(nodeId)) {
103
+ dfs(nodeId, []);
104
+ }
105
+ }
106
+ return cycles;
107
+ }
108
+ checkConstraints() {
109
+ const constraints = this.intent.listEntries('constraint', {
110
+ status: 'active',
111
+ });
112
+ return constraints.map((c) => ({
113
+ constraintId: c.frontmatter.id,
114
+ description: c.content,
115
+ scope: c.frontmatter.scope,
116
+ }));
117
+ }
118
+ findDeadCode() {
119
+ const allNodes = this.repo.getAllNodes();
120
+ const allEdges = this.repo.getAllEdges();
121
+ const referencedIds = new Set();
122
+ for (const edge of allEdges) {
123
+ referencedIds.add(edge.targetId);
124
+ }
125
+ return allNodes.filter((node) => (node.type === 'function' || node.type === 'method') &&
126
+ !referencedIds.has(node.id));
127
+ }
128
+ computeScore(orphanFiles, circularDeps, constraintViolations, deadCode) {
129
+ const constraintScore = constraintViolations.length === 0
130
+ ? 100
131
+ : Math.max(0, 100 - constraintViolations.length * 20);
132
+ const circularScore = circularDeps.length === 0
133
+ ? 100
134
+ : Math.max(0, 100 - circularDeps.length * 25);
135
+ const deadCodeScore = deadCode.length === 0
136
+ ? 100
137
+ : Math.max(0, 100 - deadCode.length * 5);
138
+ const couplingScore = orphanFiles.length === 0
139
+ ? 100
140
+ : Math.max(0, 100 - orphanFiles.length * 10);
141
+ return Math.round(constraintScore * WEIGHT_CONSTRAINTS +
142
+ circularScore * WEIGHT_CIRCULAR +
143
+ deadCodeScore * WEIGHT_DEAD_CODE +
144
+ couplingScore * WEIGHT_COUPLING);
145
+ }
146
+ }
147
+ //# sourceMappingURL=health.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"health.js","sourceRoot":"","sources":["../../../src/brain/health.ts"],"names":[],"mappings":"AAsBA,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAC/B,MAAM,eAAe,GAAG,GAAG,CAAC;AAC5B,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAC7B,MAAM,eAAe,GAA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UAAU,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC;YACpD,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAClC,CAAC;IACN,CAAC;IAEO,YAAY,CAChB,WAAqB,EACrB,YAA2B,EAC3B,oBAAuC,EACvC,QAAsB;QAEtB,MAAM,eAAe,GACjB,oBAAoB,CAAC,MAAM,KAAK,CAAC;YAC7B,CAAC,CAAC,GAAG;YACL,CAAC,CAAC,IAAI,CAAC,GAAG,CACJ,CAAC,EACD,GAAG,GAAG,oBAAoB,CAAC,MAAM,GAAG,EAAE,CACzC,CAAC;QACZ,MAAM,aAAa,GACf,YAAY,CAAC,MAAM,KAAK,CAAC;YACrB,CAAC,CAAC,GAAG;YACL,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,GAAG,YAAY,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;QACtD,MAAM,aAAa,GACf,QAAQ,CAAC,MAAM,KAAK,CAAC;YACjB,CAAC,CAAC,GAAG;YACL,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACjD,MAAM,aAAa,GACf,WAAW,CAAC,MAAM,KAAK,CAAC;YACpB,CAAC,CAAC,GAAG;YACL,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,GAAG,WAAW,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;QAErD,OAAO,IAAI,CAAC,KAAK,CACb,eAAe,GAAG,kBAAkB;YAChC,aAAa,GAAG,eAAe;YAC/B,aAAa,GAAG,gBAAgB;YAChC,aAAa,GAAG,eAAe,CACtC,CAAC;IACN,CAAC;CACJ"}
@@ -0,0 +1,3 @@
1
+ export { IntentStore, parseIntentFrontmatter, serializeIntentEntry, type IntentEntry, type IntentFrontmatter, type IntentType, type IntentStatus, type ListIntentOptions, } from './intent.js';
2
+ export { HealthEngine, type HealthReport, type HealthSnapshot, type ConstraintViolation, type DescriptiveConstraint, type CircularDep, type DeadCodeEntry, type CouplingHotspot, type CategoryScore, } from './health/index.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/brain/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,WAAW,EACX,sBAAsB,EACtB,oBAAoB,EACpB,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,iBAAiB,GACzB,MAAM,aAAa,CAAC;AACrB,OAAO,EACH,YAAY,EACZ,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,aAAa,GACrB,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { IntentStore, parseIntentFrontmatter, serializeIntentEntry, } from './intent.js';
2
+ export { HealthEngine, } from './health/index.js';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/brain/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,WAAW,EACX,sBAAsB,EACtB,oBAAoB,GAMvB,MAAM,aAAa,CAAC;AACrB,OAAO,EACH,YAAY,GASf,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,31 @@
1
+ export type IntentType = 'decision' | 'constraint';
2
+ export type IntentStatus = 'active' | 'proposed' | 'rejected' | 'superseded';
3
+ export interface IntentFrontmatter {
4
+ id: string;
5
+ type: IntentType;
6
+ scope: string;
7
+ status: IntentStatus;
8
+ author: string;
9
+ createdAt: string;
10
+ pattern?: string;
11
+ }
12
+ export interface IntentEntry {
13
+ frontmatter: IntentFrontmatter;
14
+ content: string;
15
+ }
16
+ export interface ListIntentOptions {
17
+ scope?: string;
18
+ status?: IntentStatus;
19
+ }
20
+ export declare class IntentStore {
21
+ private intentDir;
22
+ constructor(brainDir: string);
23
+ listEntries(type: IntentType, options?: ListIntentOptions): Promise<IntentEntry[]>;
24
+ readEntry(id: string): Promise<IntentEntry | null>;
25
+ writeEntry(entry: IntentEntry): void;
26
+ private typeDir;
27
+ private idToFileName;
28
+ }
29
+ export declare function parseIntentFrontmatter(raw: string): IntentEntry | null;
30
+ export declare function serializeIntentEntry(entry: IntentEntry): string;
31
+ //# sourceMappingURL=intent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intent.d.ts","sourceRoot":"","sources":["../../../src/brain/intent.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,YAAY,CAAC;AACnD,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,YAAY,CAAC;AAE7E,MAAM,WAAW,iBAAiB;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,YAAY,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IACxB,WAAW,EAAE,iBAAiB,CAAC;IAC/B,OAAO,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,YAAY,CAAC;CACzB;AAED,qBAAa,WAAW;IACpB,OAAO,CAAC,SAAS,CAAS;gBAEd,QAAQ,EAAE,MAAM;IAItB,WAAW,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAwBlF,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IAoBxD,UAAU,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;IAUpC,OAAO,CAAC,OAAO;IAIf,OAAO,CAAC,YAAY;CAGvB;AAED,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAuCtE;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAgB/D"}
@@ -0,0 +1,120 @@
1
+ import fs from 'node:fs';
2
+ import fsp from 'node:fs/promises';
3
+ import path from 'node:path';
4
+ import { parseYamlBlock } from '#dna/types.js';
5
+ export class IntentStore {
6
+ intentDir;
7
+ constructor(brainDir) {
8
+ this.intentDir = path.join(brainDir, 'intent');
9
+ }
10
+ async listEntries(type, options) {
11
+ const dir = this.typeDir(type);
12
+ if (!fs.existsSync(dir))
13
+ return [];
14
+ const allFiles = await fsp.readdir(dir);
15
+ const files = allFiles.filter((f) => f.endsWith('.md'));
16
+ const entries = [];
17
+ const reads = files.map((file) => fsp.readFile(path.join(dir, file), 'utf-8'));
18
+ const contents = await Promise.all(reads);
19
+ for (const raw of contents) {
20
+ const parsed = parseIntentFrontmatter(raw);
21
+ if (!parsed)
22
+ continue;
23
+ if (options?.status && parsed.frontmatter.status !== options.status)
24
+ continue;
25
+ if (options?.scope && parsed.frontmatter.scope !== options.scope)
26
+ continue;
27
+ entries.push(parsed);
28
+ }
29
+ return entries;
30
+ }
31
+ async readEntry(id) {
32
+ for (const type of ['decision', 'constraint']) {
33
+ const dir = this.typeDir(type);
34
+ if (!fs.existsSync(dir))
35
+ continue;
36
+ const allFiles = await fsp.readdir(dir);
37
+ const files = allFiles.filter((f) => f.endsWith('.md'));
38
+ const reads = files.map((file) => fsp.readFile(path.join(dir, file), 'utf-8'));
39
+ const contents = await Promise.all(reads);
40
+ for (const raw of contents) {
41
+ const parsed = parseIntentFrontmatter(raw);
42
+ if (parsed && parsed.frontmatter.id === id)
43
+ return parsed;
44
+ }
45
+ }
46
+ return null;
47
+ }
48
+ writeEntry(entry) {
49
+ const dir = this.typeDir(entry.frontmatter.type);
50
+ fs.mkdirSync(dir, { recursive: true });
51
+ const fileName = this.idToFileName(entry.frontmatter.id);
52
+ const filePath = path.join(dir, fileName);
53
+ fs.writeFileSync(filePath, serializeIntentEntry(entry));
54
+ }
55
+ typeDir(type) {
56
+ return path.join(this.intentDir, type === 'decision' ? 'decisions' : 'constraints');
57
+ }
58
+ idToFileName(id) {
59
+ return id.replace(/^(decision-|constraint-)/, '') + '.md';
60
+ }
61
+ }
62
+ export function parseIntentFrontmatter(raw) {
63
+ if (!raw || !raw.startsWith('---'))
64
+ return null;
65
+ const endIndex = raw.indexOf('---', 3);
66
+ if (endIndex === -1)
67
+ return null;
68
+ const block = raw.slice(3, endIndex).trim();
69
+ const content = raw.slice(endIndex + 3).trim();
70
+ const fields = parseYamlBlock(block);
71
+ if (!fields || !fields.id || !fields.type)
72
+ return null;
73
+ const validTypes = ['decision', 'constraint'];
74
+ const validStatuses = ['active', 'proposed', 'rejected', 'superseded'];
75
+ const type = String(fields.type);
76
+ if (!validTypes.includes(type))
77
+ return null;
78
+ const rawStatus = String(fields.status ?? 'active');
79
+ const status = validStatuses.includes(rawStatus)
80
+ ? rawStatus
81
+ : 'active';
82
+ return {
83
+ frontmatter: {
84
+ id: String(fields.id),
85
+ type: type,
86
+ scope: String(fields.scope ?? 'global'),
87
+ status,
88
+ author: String(fields.author ?? 'unknown'),
89
+ createdAt: stripQuotes(String(fields.createdAt ?? new Date().toISOString().split('T')[0])),
90
+ pattern: fields.pattern
91
+ ? stripQuotes(String(fields.pattern)).replace(/\\"/g, '"')
92
+ : undefined,
93
+ },
94
+ content,
95
+ };
96
+ }
97
+ export function serializeIntentEntry(entry) {
98
+ const fm = entry.frontmatter;
99
+ const lines = [
100
+ '---',
101
+ `id: ${fm.id}`,
102
+ `type: ${fm.type}`,
103
+ `scope: ${fm.scope}`,
104
+ `status: ${fm.status}`,
105
+ `author: ${fm.author}`,
106
+ `createdAt: "${fm.createdAt}"`,
107
+ ];
108
+ if (fm.pattern) {
109
+ lines.push(`pattern: "${fm.pattern}"`);
110
+ }
111
+ lines.push('---', '', entry.content, '');
112
+ return lines.join('\n');
113
+ }
114
+ function stripQuotes(s) {
115
+ if ((s.startsWith('"') && s.endsWith('"')) || (s.startsWith("'") && s.endsWith("'"))) {
116
+ return s.slice(1, -1);
117
+ }
118
+ return s;
119
+ }
120
+ //# sourceMappingURL=intent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intent.js","sourceRoot":"","sources":["../../../src/brain/intent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,GAAG,MAAM,kBAAkB,CAAC;AACnC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAyB/C,MAAM,OAAO,WAAW;IACZ,SAAS,CAAS;IAE1B,YAAY,QAAgB;QACxB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IACnD,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,IAAgB,EAAE,OAA2B;QAC3D,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC/B,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC;YAAE,OAAO,EAAE,CAAC;QAEnC,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACxC,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;QACxD,MAAM,OAAO,GAAkB,EAAE,CAAC;QAElC,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,CAA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IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;QACnF,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC1B,CAAC;IACD,OAAO,CAAC,CAAC;AACb,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function cmdDna(subcommand: string | undefined, args: string[], flags: Record<string, string | boolean>): Promise<void>;
2
+ //# sourceMappingURL=dna.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dna.d.ts","sourceRoot":"","sources":["../../../src/commands/dna.ts"],"names":[],"mappings":"AAOA,wBAAsB,MAAM,CACxB,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,IAAI,EAAE,MAAM,EAAE,EACd,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,GACxC,OAAO,CAAC,IAAI,CAAC,CA+Jf"}