@su-record/vibe 3.0.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (455) hide show
  1. package/CLAUDE.md +2 -2
  2. package/README.en.md +6 -4
  3. package/README.md +5 -3
  4. package/dist/__tests__/wiring-integrity.test.d.ts +2 -0
  5. package/dist/__tests__/wiring-integrity.test.d.ts.map +1 -0
  6. package/dist/__tests__/wiring-integrity.test.js +160 -0
  7. package/dist/__tests__/wiring-integrity.test.js.map +1 -0
  8. package/dist/cli/commands/info.d.ts.map +1 -1
  9. package/dist/cli/commands/info.js +2 -1
  10. package/dist/cli/commands/info.js.map +1 -1
  11. package/dist/cli/commands/init.d.ts.map +1 -1
  12. package/dist/cli/commands/init.js +4 -2
  13. package/dist/cli/commands/init.js.map +1 -1
  14. package/dist/cli/index.js +102 -128
  15. package/dist/cli/index.js.map +1 -1
  16. package/dist/cli/postinstall/claude-agents.d.ts.map +1 -1
  17. package/dist/cli/postinstall/claude-agents.js +0 -5
  18. package/dist/cli/postinstall/claude-agents.js.map +1 -1
  19. package/dist/cli/postinstall/constants.d.ts +6 -0
  20. package/dist/cli/postinstall/constants.d.ts.map +1 -1
  21. package/dist/cli/postinstall/constants.js +42 -60
  22. package/dist/cli/postinstall/constants.js.map +1 -1
  23. package/dist/cli/postinstall/inline-skills.js +2 -2
  24. package/dist/cli/postinstall/inline-skills.js.map +1 -1
  25. package/dist/cli/postinstall/main.d.ts.map +1 -1
  26. package/dist/cli/postinstall/main.js +2 -0
  27. package/dist/cli/postinstall/main.js.map +1 -1
  28. package/dist/cli/postinstall.d.ts +6 -1
  29. package/dist/cli/postinstall.d.ts.map +1 -1
  30. package/dist/cli/postinstall.js +6 -1
  31. package/dist/cli/postinstall.js.map +1 -1
  32. package/dist/cli/setup/GlobalInstaller.d.ts +1 -15
  33. package/dist/cli/setup/GlobalInstaller.d.ts.map +1 -1
  34. package/dist/cli/setup/GlobalInstaller.js +16 -115
  35. package/dist/cli/setup/GlobalInstaller.js.map +1 -1
  36. package/dist/cli/setup/GlobalInstaller.test.d.ts +2 -0
  37. package/dist/cli/setup/GlobalInstaller.test.d.ts.map +1 -0
  38. package/dist/cli/setup/GlobalInstaller.test.js +16 -0
  39. package/dist/cli/setup/GlobalInstaller.test.js.map +1 -0
  40. package/dist/cli/setup/ProjectSetup.js +2 -2
  41. package/dist/cli/setup/ProjectSetup.js.map +1 -1
  42. package/dist/cli/setup.d.ts +1 -1
  43. package/dist/cli/setup.d.ts.map +1 -1
  44. package/dist/cli/setup.js +1 -1
  45. package/dist/cli/setup.js.map +1 -1
  46. package/dist/infra/lib/SkillRepository.js +1 -1
  47. package/dist/infra/lib/evolution/__tests__/integration.test.js +0 -42
  48. package/dist/infra/lib/evolution/__tests__/integration.test.js.map +1 -1
  49. package/hooks/scripts/__tests__/.vibe/command-log.txt +3 -78
  50. package/hooks/scripts/__tests__/clone-behaviors.test.js +97 -1
  51. package/hooks/scripts/__tests__/clone-merge-responsive.test.js +106 -0
  52. package/hooks/scripts/__tests__/code-check-memory-write.test.js +81 -0
  53. package/hooks/scripts/__tests__/step-counter.test.js +21 -0
  54. package/hooks/scripts/auto-format.js +2 -11
  55. package/hooks/scripts/auto-test.js +2 -11
  56. package/hooks/scripts/clone-extract.js +388 -38
  57. package/hooks/scripts/clone-merge-responsive.js +184 -0
  58. package/hooks/scripts/clone-spec.js +33 -8
  59. package/hooks/scripts/clone-validate.js +15 -9
  60. package/hooks/scripts/code-check.js +27 -55
  61. package/hooks/scripts/lib/glob.js +32 -0
  62. package/hooks/scripts/lib/hook-context.js +19 -2
  63. package/hooks/scripts/post-edit.js +2 -3
  64. package/hooks/scripts/prompt-dispatcher.js +1 -1
  65. package/hooks/scripts/scope-guard.js +3 -42
  66. package/hooks/scripts/sentinel-guard.js +5 -20
  67. package/hooks/scripts/session-start.js +2 -2
  68. package/hooks/scripts/step-counter.js +35 -57
  69. package/package.json +6 -4
  70. package/skills/clone/SKILL.md +74 -203
  71. package/skills/clone/references/capture-rules.md +48 -0
  72. package/skills/clone/references/legal-and-error-recovery.md +40 -0
  73. package/skills/clone/references/refine-rules.md +61 -0
  74. package/skills/clone/references/scaffold-phases.md +59 -0
  75. package/skills/clone/references/setup-and-layout.md +30 -0
  76. package/skills/docs/SKILL.md +39 -4
  77. package/skills/docs/references/api-docs-changelog.md +34 -0
  78. package/skills/docs/references/codemaps-output.md +23 -0
  79. package/{agents/diagrammer.md → skills/docs/references/diagram-spec.md} +2 -15
  80. package/skills/exec-plan/SKILL.md +1 -1
  81. package/skills/exec-plan/templates/plan.md +1 -1
  82. package/skills/handoff/SKILL.md +3 -3
  83. package/skills/handoff/templates/handoff.md +1 -1
  84. package/skills/vibe/SKILL.md +3 -2
  85. package/skills/vibe.analyze/SKILL.md +12 -249
  86. package/skills/vibe.analyze/references/output-templates.md +188 -0
  87. package/skills/vibe.analyze/references/quality-gate.md +93 -0
  88. package/skills/vibe.clone/SKILL.md +52 -19
  89. package/skills/vibe.continue/SKILL.md +32 -0
  90. package/skills/vibe.design/SKILL.md +23 -1
  91. package/skills/vibe.design/references/ui-preview.md +20 -0
  92. package/skills/vibe.docs/SKILL.md +4 -2
  93. package/skills/vibe.figma/SKILL.md +33 -260
  94. package/skills/vibe.figma/references/branch-phases.md +113 -0
  95. package/skills/vibe.figma/references/state-schema.md +42 -0
  96. package/skills/vibe.figma/references/step-algorithms.md +204 -0
  97. package/skills/vibe.image/SKILL.md +62 -0
  98. package/skills/vibe.image/references/image-generation-examples.md +39 -0
  99. package/skills/vibe.reason/SKILL.md +3 -183
  100. package/skills/vibe.reason/references/output-format-template.md +57 -0
  101. package/skills/vibe.reason/references/quality-rubrics.md +94 -0
  102. package/skills/vibe.reason/references/worked-example.md +45 -0
  103. package/skills/vibe.review/SKILL.md +13 -348
  104. package/skills/vibe.review/references/boundary-check.md +25 -0
  105. package/skills/vibe.review/references/output-template.md +74 -0
  106. package/skills/vibe.review/references/quality-gate.md +84 -0
  107. package/skills/vibe.review/references/race-mode.md +117 -0
  108. package/skills/vibe.review/references/worked-examples.md +94 -0
  109. package/vibe/templates/claudemd-template.md +1 -1
  110. package/agents/acceptance-tester.md +0 -56
  111. package/agents/documenter.md +0 -43
  112. package/agents/figma/figma-engineer.md +0 -76
  113. package/dist/cli/llm/gemini-commands.d.ts +0 -25
  114. package/dist/cli/llm/gemini-commands.d.ts.map +0 -1
  115. package/dist/cli/llm/gemini-commands.js +0 -143
  116. package/dist/cli/llm/gemini-commands.js.map +0 -1
  117. package/dist/cli/postinstall/codex-agents.d.ts +0 -24
  118. package/dist/cli/postinstall/codex-agents.d.ts.map +0 -1
  119. package/dist/cli/postinstall/codex-agents.js +0 -114
  120. package/dist/cli/postinstall/codex-agents.js.map +0 -1
  121. package/dist/cli/postinstall/codex-instruction.d.ts +0 -10
  122. package/dist/cli/postinstall/codex-instruction.d.ts.map +0 -1
  123. package/dist/cli/postinstall/codex-instruction.js +0 -56
  124. package/dist/cli/postinstall/codex-instruction.js.map +0 -1
  125. package/dist/cli/postinstall/gemini-agents.d.ts +0 -12
  126. package/dist/cli/postinstall/gemini-agents.d.ts.map +0 -1
  127. package/dist/cli/postinstall/gemini-agents.js +0 -80
  128. package/dist/cli/postinstall/gemini-agents.js.map +0 -1
  129. package/dist/cli/postinstall/gemini-instruction.d.ts +0 -10
  130. package/dist/cli/postinstall/gemini-instruction.d.ts.map +0 -1
  131. package/dist/cli/postinstall/gemini-instruction.js +0 -59
  132. package/dist/cli/postinstall/gemini-instruction.js.map +0 -1
  133. package/dist/cli/postinstall/index.d.ts +0 -23
  134. package/dist/cli/postinstall/index.d.ts.map +0 -1
  135. package/dist/cli/postinstall/index.js +0 -23
  136. package/dist/cli/postinstall/index.js.map +0 -1
  137. package/dist/cli/setup/index.d.ts +0 -9
  138. package/dist/cli/setup/index.d.ts.map +0 -1
  139. package/dist/cli/setup/index.js +0 -12
  140. package/dist/cli/setup/index.js.map +0 -1
  141. package/dist/infra/lib/ContextCompressor.d.ts +0 -104
  142. package/dist/infra/lib/ContextCompressor.d.ts.map +0 -1
  143. package/dist/infra/lib/ContextCompressor.js +0 -297
  144. package/dist/infra/lib/ContextCompressor.js.map +0 -1
  145. package/dist/infra/lib/ContextCompressor.test.d.ts +0 -2
  146. package/dist/infra/lib/ContextCompressor.test.d.ts.map +0 -1
  147. package/dist/infra/lib/ContextCompressor.test.js +0 -25
  148. package/dist/infra/lib/ContextCompressor.test.js.map +0 -1
  149. package/dist/infra/lib/ProgressTracker.d.ts +0 -73
  150. package/dist/infra/lib/ProgressTracker.d.ts.map +0 -1
  151. package/dist/infra/lib/ProgressTracker.js +0 -267
  152. package/dist/infra/lib/ProgressTracker.js.map +0 -1
  153. package/dist/infra/lib/TokenBudgetTracker.d.ts +0 -68
  154. package/dist/infra/lib/TokenBudgetTracker.d.ts.map +0 -1
  155. package/dist/infra/lib/TokenBudgetTracker.js +0 -191
  156. package/dist/infra/lib/TokenBudgetTracker.js.map +0 -1
  157. package/dist/infra/lib/autonomy/AuditStore.d.ts +0 -63
  158. package/dist/infra/lib/autonomy/AuditStore.d.ts.map +0 -1
  159. package/dist/infra/lib/autonomy/AuditStore.js +0 -185
  160. package/dist/infra/lib/autonomy/AuditStore.js.map +0 -1
  161. package/dist/infra/lib/autonomy/AutonomyConfig.d.ts +0 -84
  162. package/dist/infra/lib/autonomy/AutonomyConfig.d.ts.map +0 -1
  163. package/dist/infra/lib/autonomy/AutonomyConfig.js +0 -49
  164. package/dist/infra/lib/autonomy/AutonomyConfig.js.map +0 -1
  165. package/dist/infra/lib/autonomy/AutonomyOrchestrator.d.ts +0 -78
  166. package/dist/infra/lib/autonomy/AutonomyOrchestrator.d.ts.map +0 -1
  167. package/dist/infra/lib/autonomy/AutonomyOrchestrator.js +0 -246
  168. package/dist/infra/lib/autonomy/AutonomyOrchestrator.js.map +0 -1
  169. package/dist/infra/lib/autonomy/BackgroundMonitor.d.ts +0 -36
  170. package/dist/infra/lib/autonomy/BackgroundMonitor.d.ts.map +0 -1
  171. package/dist/infra/lib/autonomy/BackgroundMonitor.js +0 -138
  172. package/dist/infra/lib/autonomy/BackgroundMonitor.js.map +0 -1
  173. package/dist/infra/lib/autonomy/CollaborationProtocol.d.ts +0 -56
  174. package/dist/infra/lib/autonomy/CollaborationProtocol.d.ts.map +0 -1
  175. package/dist/infra/lib/autonomy/CollaborationProtocol.js +0 -122
  176. package/dist/infra/lib/autonomy/CollaborationProtocol.js.map +0 -1
  177. package/dist/infra/lib/autonomy/ConfirmationManager.d.ts +0 -42
  178. package/dist/infra/lib/autonomy/ConfirmationManager.d.ts.map +0 -1
  179. package/dist/infra/lib/autonomy/ConfirmationManager.js +0 -200
  180. package/dist/infra/lib/autonomy/ConfirmationManager.js.map +0 -1
  181. package/dist/infra/lib/autonomy/ConfirmationStore.d.ts +0 -55
  182. package/dist/infra/lib/autonomy/ConfirmationStore.d.ts.map +0 -1
  183. package/dist/infra/lib/autonomy/ConfirmationStore.js +0 -130
  184. package/dist/infra/lib/autonomy/ConfirmationStore.js.map +0 -1
  185. package/dist/infra/lib/autonomy/EventBus.d.ts +0 -20
  186. package/dist/infra/lib/autonomy/EventBus.d.ts.map +0 -1
  187. package/dist/infra/lib/autonomy/EventBus.js +0 -119
  188. package/dist/infra/lib/autonomy/EventBus.js.map +0 -1
  189. package/dist/infra/lib/autonomy/EventOutbox.d.ts +0 -32
  190. package/dist/infra/lib/autonomy/EventOutbox.d.ts.map +0 -1
  191. package/dist/infra/lib/autonomy/EventOutbox.js +0 -152
  192. package/dist/infra/lib/autonomy/EventOutbox.js.map +0 -1
  193. package/dist/infra/lib/autonomy/NotificationDispatcher.d.ts +0 -24
  194. package/dist/infra/lib/autonomy/NotificationDispatcher.d.ts.map +0 -1
  195. package/dist/infra/lib/autonomy/NotificationDispatcher.js +0 -112
  196. package/dist/infra/lib/autonomy/NotificationDispatcher.js.map +0 -1
  197. package/dist/infra/lib/autonomy/PolicyEngine.d.ts +0 -76
  198. package/dist/infra/lib/autonomy/PolicyEngine.d.ts.map +0 -1
  199. package/dist/infra/lib/autonomy/PolicyEngine.js +0 -208
  200. package/dist/infra/lib/autonomy/PolicyEngine.js.map +0 -1
  201. package/dist/infra/lib/autonomy/ProactiveAnalyzer.d.ts +0 -61
  202. package/dist/infra/lib/autonomy/ProactiveAnalyzer.d.ts.map +0 -1
  203. package/dist/infra/lib/autonomy/ProactiveAnalyzer.js +0 -236
  204. package/dist/infra/lib/autonomy/ProactiveAnalyzer.js.map +0 -1
  205. package/dist/infra/lib/autonomy/RiskClassifier.d.ts +0 -35
  206. package/dist/infra/lib/autonomy/RiskClassifier.d.ts.map +0 -1
  207. package/dist/infra/lib/autonomy/RiskClassifier.js +0 -147
  208. package/dist/infra/lib/autonomy/RiskClassifier.js.map +0 -1
  209. package/dist/infra/lib/autonomy/SecuritySentinel.d.ts +0 -51
  210. package/dist/infra/lib/autonomy/SecuritySentinel.d.ts.map +0 -1
  211. package/dist/infra/lib/autonomy/SecuritySentinel.js +0 -162
  212. package/dist/infra/lib/autonomy/SecuritySentinel.js.map +0 -1
  213. package/dist/infra/lib/autonomy/SuggestionStore.d.ts +0 -54
  214. package/dist/infra/lib/autonomy/SuggestionStore.d.ts.map +0 -1
  215. package/dist/infra/lib/autonomy/SuggestionStore.js +0 -144
  216. package/dist/infra/lib/autonomy/SuggestionStore.js.map +0 -1
  217. package/dist/infra/lib/autonomy/TaskDecomposer.d.ts +0 -38
  218. package/dist/infra/lib/autonomy/TaskDecomposer.d.ts.map +0 -1
  219. package/dist/infra/lib/autonomy/TaskDecomposer.js +0 -175
  220. package/dist/infra/lib/autonomy/TaskDecomposer.js.map +0 -1
  221. package/dist/infra/lib/autonomy/__tests__/audit-store.test.d.ts +0 -2
  222. package/dist/infra/lib/autonomy/__tests__/audit-store.test.d.ts.map +0 -1
  223. package/dist/infra/lib/autonomy/__tests__/audit-store.test.js +0 -198
  224. package/dist/infra/lib/autonomy/__tests__/audit-store.test.js.map +0 -1
  225. package/dist/infra/lib/autonomy/__tests__/event-bus.test.d.ts +0 -2
  226. package/dist/infra/lib/autonomy/__tests__/event-bus.test.d.ts.map +0 -1
  227. package/dist/infra/lib/autonomy/__tests__/event-bus.test.js +0 -225
  228. package/dist/infra/lib/autonomy/__tests__/event-bus.test.js.map +0 -1
  229. package/dist/infra/lib/autonomy/__tests__/event-core.test.d.ts +0 -2
  230. package/dist/infra/lib/autonomy/__tests__/event-core.test.d.ts.map +0 -1
  231. package/dist/infra/lib/autonomy/__tests__/event-core.test.js +0 -194
  232. package/dist/infra/lib/autonomy/__tests__/event-core.test.js.map +0 -1
  233. package/dist/infra/lib/autonomy/__tests__/governance.test.d.ts +0 -2
  234. package/dist/infra/lib/autonomy/__tests__/governance.test.d.ts.map +0 -1
  235. package/dist/infra/lib/autonomy/__tests__/governance.test.js +0 -540
  236. package/dist/infra/lib/autonomy/__tests__/governance.test.js.map +0 -1
  237. package/dist/infra/lib/autonomy/__tests__/integration.test.d.ts +0 -2
  238. package/dist/infra/lib/autonomy/__tests__/integration.test.d.ts.map +0 -1
  239. package/dist/infra/lib/autonomy/__tests__/integration.test.js +0 -480
  240. package/dist/infra/lib/autonomy/__tests__/integration.test.js.map +0 -1
  241. package/dist/infra/lib/autonomy/__tests__/proactive.test.d.ts +0 -2
  242. package/dist/infra/lib/autonomy/__tests__/proactive.test.d.ts.map +0 -1
  243. package/dist/infra/lib/autonomy/__tests__/proactive.test.js +0 -410
  244. package/dist/infra/lib/autonomy/__tests__/proactive.test.js.map +0 -1
  245. package/dist/infra/lib/autonomy/__tests__/sentinel.test.d.ts +0 -2
  246. package/dist/infra/lib/autonomy/__tests__/sentinel.test.d.ts.map +0 -1
  247. package/dist/infra/lib/autonomy/__tests__/sentinel.test.js +0 -486
  248. package/dist/infra/lib/autonomy/__tests__/sentinel.test.js.map +0 -1
  249. package/dist/infra/lib/autonomy/index.d.ts +0 -18
  250. package/dist/infra/lib/autonomy/index.d.ts.map +0 -1
  251. package/dist/infra/lib/autonomy/index.js +0 -22
  252. package/dist/infra/lib/autonomy/index.js.map +0 -1
  253. package/dist/infra/lib/autonomy/schemas.d.ts +0 -317
  254. package/dist/infra/lib/autonomy/schemas.d.ts.map +0 -1
  255. package/dist/infra/lib/autonomy/schemas.js +0 -90
  256. package/dist/infra/lib/autonomy/schemas.js.map +0 -1
  257. package/dist/infra/lib/claude/index.d.ts +0 -5
  258. package/dist/infra/lib/claude/index.d.ts.map +0 -1
  259. package/dist/infra/lib/claude/index.js +0 -5
  260. package/dist/infra/lib/claude/index.js.map +0 -1
  261. package/dist/infra/lib/claude/storage.d.ts +0 -12
  262. package/dist/infra/lib/claude/storage.d.ts.map +0 -1
  263. package/dist/infra/lib/claude/storage.js +0 -54
  264. package/dist/infra/lib/claude/storage.js.map +0 -1
  265. package/dist/infra/lib/gemini/auth.d.ts +0 -18
  266. package/dist/infra/lib/gemini/auth.d.ts.map +0 -1
  267. package/dist/infra/lib/gemini/auth.js +0 -32
  268. package/dist/infra/lib/gemini/auth.js.map +0 -1
  269. package/dist/infra/lib/gemini/capabilities.d.ts +0 -28
  270. package/dist/infra/lib/gemini/capabilities.d.ts.map +0 -1
  271. package/dist/infra/lib/gemini/capabilities.js +0 -178
  272. package/dist/infra/lib/gemini/capabilities.js.map +0 -1
  273. package/dist/infra/lib/gemini/chat.d.ts +0 -35
  274. package/dist/infra/lib/gemini/chat.d.ts.map +0 -1
  275. package/dist/infra/lib/gemini/chat.js +0 -161
  276. package/dist/infra/lib/gemini/chat.js.map +0 -1
  277. package/dist/infra/lib/gemini/completion.d.ts +0 -12
  278. package/dist/infra/lib/gemini/completion.d.ts.map +0 -1
  279. package/dist/infra/lib/gemini/completion.js +0 -13
  280. package/dist/infra/lib/gemini/completion.js.map +0 -1
  281. package/dist/infra/lib/gemini/constants.d.ts +0 -8
  282. package/dist/infra/lib/gemini/constants.d.ts.map +0 -1
  283. package/dist/infra/lib/gemini/constants.js +0 -11
  284. package/dist/infra/lib/gemini/constants.js.map +0 -1
  285. package/dist/infra/lib/gemini/index.d.ts +0 -13
  286. package/dist/infra/lib/gemini/index.d.ts.map +0 -1
  287. package/dist/infra/lib/gemini/index.js +0 -12
  288. package/dist/infra/lib/gemini/index.js.map +0 -1
  289. package/dist/infra/lib/gemini/models.d.ts +0 -11
  290. package/dist/infra/lib/gemini/models.d.ts.map +0 -1
  291. package/dist/infra/lib/gemini/models.js +0 -38
  292. package/dist/infra/lib/gemini/models.js.map +0 -1
  293. package/dist/infra/lib/gemini/orchestration.d.ts +0 -33
  294. package/dist/infra/lib/gemini/orchestration.d.ts.map +0 -1
  295. package/dist/infra/lib/gemini/orchestration.js +0 -62
  296. package/dist/infra/lib/gemini/orchestration.js.map +0 -1
  297. package/dist/infra/lib/gemini/types.d.ts +0 -115
  298. package/dist/infra/lib/gemini/types.d.ts.map +0 -1
  299. package/dist/infra/lib/gemini/types.js +0 -5
  300. package/dist/infra/lib/gemini/types.js.map +0 -1
  301. package/dist/infra/orchestrator/AgentAnnouncer.d.ts +0 -64
  302. package/dist/infra/orchestrator/AgentAnnouncer.d.ts.map +0 -1
  303. package/dist/infra/orchestrator/AgentAnnouncer.js +0 -127
  304. package/dist/infra/orchestrator/AgentAnnouncer.js.map +0 -1
  305. package/dist/infra/orchestrator/AgentAnnouncer.test.d.ts +0 -5
  306. package/dist/infra/orchestrator/AgentAnnouncer.test.d.ts.map +0 -1
  307. package/dist/infra/orchestrator/AgentAnnouncer.test.js +0 -119
  308. package/dist/infra/orchestrator/AgentAnnouncer.test.js.map +0 -1
  309. package/dist/infra/orchestrator/AgentExecutor.d.ts +0 -22
  310. package/dist/infra/orchestrator/AgentExecutor.d.ts.map +0 -1
  311. package/dist/infra/orchestrator/AgentExecutor.js +0 -272
  312. package/dist/infra/orchestrator/AgentExecutor.js.map +0 -1
  313. package/dist/infra/orchestrator/AgentManager.d.ts +0 -72
  314. package/dist/infra/orchestrator/AgentManager.d.ts.map +0 -1
  315. package/dist/infra/orchestrator/AgentManager.js +0 -183
  316. package/dist/infra/orchestrator/AgentManager.js.map +0 -1
  317. package/dist/infra/orchestrator/AgentManifestCache.d.ts +0 -54
  318. package/dist/infra/orchestrator/AgentManifestCache.d.ts.map +0 -1
  319. package/dist/infra/orchestrator/AgentManifestCache.js +0 -191
  320. package/dist/infra/orchestrator/AgentManifestCache.js.map +0 -1
  321. package/dist/infra/orchestrator/AgentRegistry.d.ts +0 -76
  322. package/dist/infra/orchestrator/AgentRegistry.d.ts.map +0 -1
  323. package/dist/infra/orchestrator/AgentRegistry.js +0 -217
  324. package/dist/infra/orchestrator/AgentRegistry.js.map +0 -1
  325. package/dist/infra/orchestrator/AgentRegistry.test.d.ts +0 -5
  326. package/dist/infra/orchestrator/AgentRegistry.test.d.ts.map +0 -1
  327. package/dist/infra/orchestrator/AgentRegistry.test.js +0 -122
  328. package/dist/infra/orchestrator/AgentRegistry.test.js.map +0 -1
  329. package/dist/infra/orchestrator/BackgroundManager.d.ts +0 -128
  330. package/dist/infra/orchestrator/BackgroundManager.d.ts.map +0 -1
  331. package/dist/infra/orchestrator/BackgroundManager.js +0 -620
  332. package/dist/infra/orchestrator/BackgroundManager.js.map +0 -1
  333. package/dist/infra/orchestrator/BackgroundManager.test.d.ts +0 -6
  334. package/dist/infra/orchestrator/BackgroundManager.test.d.ts.map +0 -1
  335. package/dist/infra/orchestrator/BackgroundManager.test.js +0 -162
  336. package/dist/infra/orchestrator/BackgroundManager.test.js.map +0 -1
  337. package/dist/infra/orchestrator/CheckpointManager.d.ts +0 -54
  338. package/dist/infra/orchestrator/CheckpointManager.d.ts.map +0 -1
  339. package/dist/infra/orchestrator/CheckpointManager.js +0 -121
  340. package/dist/infra/orchestrator/CheckpointManager.js.map +0 -1
  341. package/dist/infra/orchestrator/CodexAgentRuntime.d.ts +0 -12
  342. package/dist/infra/orchestrator/CodexAgentRuntime.d.ts.map +0 -1
  343. package/dist/infra/orchestrator/CodexAgentRuntime.js +0 -94
  344. package/dist/infra/orchestrator/CodexAgentRuntime.js.map +0 -1
  345. package/dist/infra/orchestrator/CodexAgentRuntime.test.d.ts +0 -2
  346. package/dist/infra/orchestrator/CodexAgentRuntime.test.d.ts.map +0 -1
  347. package/dist/infra/orchestrator/CodexAgentRuntime.test.js +0 -37
  348. package/dist/infra/orchestrator/CodexAgentRuntime.test.js.map +0 -1
  349. package/dist/infra/orchestrator/LLMCluster.d.ts +0 -82
  350. package/dist/infra/orchestrator/LLMCluster.d.ts.map +0 -1
  351. package/dist/infra/orchestrator/LLMCluster.js +0 -146
  352. package/dist/infra/orchestrator/LLMCluster.js.map +0 -1
  353. package/dist/infra/orchestrator/MultiLlmResearch.d.ts +0 -31
  354. package/dist/infra/orchestrator/MultiLlmResearch.d.ts.map +0 -1
  355. package/dist/infra/orchestrator/MultiLlmResearch.js +0 -160
  356. package/dist/infra/orchestrator/MultiLlmResearch.js.map +0 -1
  357. package/dist/infra/orchestrator/PhasePipeline.d.ts +0 -122
  358. package/dist/infra/orchestrator/PhasePipeline.d.ts.map +0 -1
  359. package/dist/infra/orchestrator/PhasePipeline.js +0 -385
  360. package/dist/infra/orchestrator/PhasePipeline.js.map +0 -1
  361. package/dist/infra/orchestrator/PhaseResultStore.d.ts +0 -39
  362. package/dist/infra/orchestrator/PhaseResultStore.d.ts.map +0 -1
  363. package/dist/infra/orchestrator/PhaseResultStore.js +0 -151
  364. package/dist/infra/orchestrator/PhaseResultStore.js.map +0 -1
  365. package/dist/infra/orchestrator/SessionStore.d.ts +0 -40
  366. package/dist/infra/orchestrator/SessionStore.d.ts.map +0 -1
  367. package/dist/infra/orchestrator/SessionStore.js +0 -116
  368. package/dist/infra/orchestrator/SessionStore.js.map +0 -1
  369. package/dist/infra/orchestrator/SmartRouter.d.ts +0 -90
  370. package/dist/infra/orchestrator/SmartRouter.d.ts.map +0 -1
  371. package/dist/infra/orchestrator/SmartRouter.js +0 -277
  372. package/dist/infra/orchestrator/SmartRouter.js.map +0 -1
  373. package/dist/infra/orchestrator/SmartRouter.test.d.ts +0 -5
  374. package/dist/infra/orchestrator/SmartRouter.test.d.ts.map +0 -1
  375. package/dist/infra/orchestrator/SmartRouter.test.js +0 -484
  376. package/dist/infra/orchestrator/SmartRouter.test.js.map +0 -1
  377. package/dist/infra/orchestrator/SwarmOrchestrator.d.ts +0 -143
  378. package/dist/infra/orchestrator/SwarmOrchestrator.d.ts.map +0 -1
  379. package/dist/infra/orchestrator/SwarmOrchestrator.js +0 -378
  380. package/dist/infra/orchestrator/SwarmOrchestrator.js.map +0 -1
  381. package/dist/infra/orchestrator/SwarmOrchestrator.test.d.ts +0 -5
  382. package/dist/infra/orchestrator/SwarmOrchestrator.test.d.ts.map +0 -1
  383. package/dist/infra/orchestrator/SwarmOrchestrator.test.js +0 -95
  384. package/dist/infra/orchestrator/SwarmOrchestrator.test.js.map +0 -1
  385. package/dist/infra/orchestrator/agentDiscovery.d.ts +0 -26
  386. package/dist/infra/orchestrator/agentDiscovery.d.ts.map +0 -1
  387. package/dist/infra/orchestrator/agentDiscovery.js +0 -175
  388. package/dist/infra/orchestrator/agentDiscovery.js.map +0 -1
  389. package/dist/infra/orchestrator/backgroundAgent.d.ts +0 -9
  390. package/dist/infra/orchestrator/backgroundAgent.d.ts.map +0 -1
  391. package/dist/infra/orchestrator/backgroundAgent.js +0 -10
  392. package/dist/infra/orchestrator/backgroundAgent.js.map +0 -1
  393. package/dist/infra/orchestrator/index.d.ts +0 -207
  394. package/dist/infra/orchestrator/index.d.ts.map +0 -1
  395. package/dist/infra/orchestrator/index.js +0 -362
  396. package/dist/infra/orchestrator/index.js.map +0 -1
  397. package/dist/infra/orchestrator/orchestrator.d.ts +0 -60
  398. package/dist/infra/orchestrator/orchestrator.d.ts.map +0 -1
  399. package/dist/infra/orchestrator/orchestrator.js +0 -214
  400. package/dist/infra/orchestrator/orchestrator.js.map +0 -1
  401. package/dist/infra/orchestrator/parallelResearch.d.ts +0 -27
  402. package/dist/infra/orchestrator/parallelResearch.d.ts.map +0 -1
  403. package/dist/infra/orchestrator/parallelResearch.js +0 -285
  404. package/dist/infra/orchestrator/parallelResearch.js.map +0 -1
  405. package/dist/infra/orchestrator/types.d.ts +0 -205
  406. package/dist/infra/orchestrator/types.d.ts.map +0 -1
  407. package/dist/infra/orchestrator/types.js +0 -87
  408. package/dist/infra/orchestrator/types.js.map +0 -1
  409. package/dist/infra/orchestrator/types.test.d.ts +0 -2
  410. package/dist/infra/orchestrator/types.test.d.ts.map +0 -1
  411. package/dist/infra/orchestrator/types.test.js +0 -57
  412. package/dist/infra/orchestrator/types.test.js.map +0 -1
  413. package/dist/tools/semantic/analyzeDependencyGraph.d.ts +0 -12
  414. package/dist/tools/semantic/analyzeDependencyGraph.d.ts.map +0 -1
  415. package/dist/tools/semantic/analyzeDependencyGraph.js +0 -359
  416. package/dist/tools/semantic/analyzeDependencyGraph.js.map +0 -1
  417. package/dist/tools/semantic/astGrep.d.ts +0 -25
  418. package/dist/tools/semantic/astGrep.d.ts.map +0 -1
  419. package/dist/tools/semantic/astGrep.js +0 -324
  420. package/dist/tools/semantic/astGrep.js.map +0 -1
  421. package/dist/tools/semantic/astGrep.test.d.ts +0 -2
  422. package/dist/tools/semantic/astGrep.test.d.ts.map +0 -1
  423. package/dist/tools/semantic/astGrep.test.js +0 -74
  424. package/dist/tools/semantic/astGrep.test.js.map +0 -1
  425. package/dist/tools/semantic/findReferences.d.ts +0 -9
  426. package/dist/tools/semantic/findReferences.d.ts.map +0 -1
  427. package/dist/tools/semantic/findReferences.js +0 -200
  428. package/dist/tools/semantic/findReferences.js.map +0 -1
  429. package/dist/tools/semantic/findSymbol.d.ts +0 -8
  430. package/dist/tools/semantic/findSymbol.d.ts.map +0 -1
  431. package/dist/tools/semantic/findSymbol.js +0 -204
  432. package/dist/tools/semantic/findSymbol.js.map +0 -1
  433. package/dist/tools/semantic/index.d.ts +0 -9
  434. package/dist/tools/semantic/index.d.ts.map +0 -1
  435. package/dist/tools/semantic/index.js +0 -11
  436. package/dist/tools/semantic/index.js.map +0 -1
  437. package/dist/tools/semantic/lsp.d.ts +0 -68
  438. package/dist/tools/semantic/lsp.d.ts.map +0 -1
  439. package/dist/tools/semantic/lsp.js +0 -561
  440. package/dist/tools/semantic/lsp.js.map +0 -1
  441. package/dist/tools/spec/e2eTestGenerator.d.ts +0 -61
  442. package/dist/tools/spec/e2eTestGenerator.d.ts.map +0 -1
  443. package/dist/tools/spec/e2eTestGenerator.js +0 -255
  444. package/dist/tools/spec/e2eTestGenerator.js.map +0 -1
  445. package/dist/tools/spec/specVersioning.d.ts +0 -76
  446. package/dist/tools/spec/specVersioning.d.ts.map +0 -1
  447. package/dist/tools/spec/specVersioning.js +0 -236
  448. package/dist/tools/spec/specVersioning.js.map +0 -1
  449. package/hooks/scripts/__tests__/.vibe/memories/memories.db +0 -0
  450. package/hooks/scripts/__tests__/.vibe/memories/memories.db-shm +0 -0
  451. package/hooks/scripts/__tests__/.vibe/memories/memories.db-wal +0 -0
  452. package/hooks/scripts/evolution-engine.js +0 -91
  453. package/hooks/scripts/hud-status.js +0 -321
  454. package/hooks/scripts/skill-injector.js +0 -83
  455. package/skills/vibe.utils/SKILL.md +0 -415
@@ -1,57 +0,0 @@
1
- import { describe, it, expect } from 'vitest';
2
- import { computeLlmPriority, TASK_LLM_PRIORITY, TASK_TYPES } from './types.js';
3
- /**
4
- * LLM 라우팅 정책 SSOT 가드 — computeLlmPriority 가 provider 우선순위의 유일 소스이며,
5
- * 정적 맵(TASK_LLM_PRIORITY)이 여기서 파생되어 절대 어긋나지 않음을 잠근다.
6
- */
7
- describe('computeLlmPriority (routing policy SSOT)', () => {
8
- it('falls back to claude-only when no external provider is available', () => {
9
- for (const t of TASK_TYPES) {
10
- expect(computeLlmPriority(t, { codex: false, antigravity: false })).toEqual(['claude']);
11
- }
12
- });
13
- it('always ends the chain with claude', () => {
14
- const avail = { codex: true, antigravity: true };
15
- for (const t of TASK_TYPES) {
16
- const chain = computeLlmPriority(t, avail);
17
- expect(chain[chain.length - 1]).toBe('claude');
18
- }
19
- });
20
- it('puts antigravity first for web-search / uiux', () => {
21
- const avail = { codex: true, antigravity: true };
22
- expect(computeLlmPriority('web-search', avail)[0]).toBe('antigravity');
23
- expect(computeLlmPriority('uiux', avail)[0]).toBe('antigravity');
24
- });
25
- it('puts gpt first for gpt-preferred tasks, with antigravity cross-check where configured', () => {
26
- const avail = { codex: true, antigravity: true };
27
- expect(computeLlmPriority('architecture', avail)).toEqual(['gpt', 'antigravity', 'claude']);
28
- expect(computeLlmPriority('debugging', avail)).toEqual(['gpt', 'claude']);
29
- expect(computeLlmPriority('code-review', avail)).toEqual(['gpt', 'antigravity', 'claude']);
30
- });
31
- it('routes general straight to claude even when providers are available', () => {
32
- expect(computeLlmPriority('general', { codex: true, antigravity: true })).toEqual(['claude']);
33
- });
34
- it('honours single-provider availability', () => {
35
- expect(computeLlmPriority('architecture', { codex: true, antigravity: false })).toEqual(['gpt', 'claude']);
36
- expect(computeLlmPriority('web-search', { codex: false, antigravity: true })).toEqual(['antigravity', 'claude']);
37
- });
38
- it('TASK_LLM_PRIORITY is derived from computeLlmPriority (all-available) — cannot drift', () => {
39
- for (const t of TASK_TYPES) {
40
- expect(TASK_LLM_PRIORITY[t]).toEqual(computeLlmPriority(t, { codex: true, antigravity: true, zai: true }));
41
- }
42
- });
43
- it('routes UI (uiux) to zai(GLM) first when zai is available', () => {
44
- expect(computeLlmPriority('uiux', { codex: true, antigravity: true, zai: true }))
45
- .toEqual(['zai', 'antigravity', 'claude']);
46
- // zai only → GLM then claude
47
- expect(computeLlmPriority('uiux', { codex: false, antigravity: false, zai: true }))
48
- .toEqual(['zai', 'claude']);
49
- });
50
- it('does not route non-UI tasks to zai', () => {
51
- expect(computeLlmPriority('architecture', { codex: true, antigravity: true, zai: true }))
52
- .toEqual(['gpt', 'antigravity', 'claude']);
53
- expect(computeLlmPriority('code-gen', { codex: true, antigravity: true, zai: true }))
54
- .toEqual(['gpt', 'claude']);
55
- });
56
- });
57
- //# sourceMappingURL=types.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.test.js","s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EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;aAClF,OAAO,CAAC,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,12 +0,0 @@
1
- import { ToolResult, ToolDefinition } from '../../infra/types/tool.js';
2
- export declare const analyzeDependencyGraphDefinition: ToolDefinition;
3
- interface AnalyzeDependencyGraphArgs {
4
- projectPath: string;
5
- targetFile?: string;
6
- maxDepth?: number;
7
- includeExternal?: boolean;
8
- detectCircular?: boolean;
9
- }
10
- export declare function analyzeDependencyGraph(args: AnalyzeDependencyGraphArgs): Promise<ToolResult>;
11
- export {};
12
- //# sourceMappingURL=analyzeDependencyGraph.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"analyzeDependencyGraph.d.ts","sourceRoot":"","sources":["../../../src/tools/semantic/analyzeDependencyGraph.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAGvE,eAAO,MAAM,gCAAgC,EAAE,cAiD9C,CAAC;AAEF,UAAU,0BAA0B;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAgBD,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,0BAA0B,GAAG,OAAO,CAAC,UAAU,CAAC,CAuLlG"}
@@ -1,359 +0,0 @@
1
- // Analyze code dependency graph
2
- import { ProjectCache } from '../../infra/lib/ProjectCache.js';
3
- export const analyzeDependencyGraphDefinition = {
4
- name: 'analyze_dependency_graph',
5
- description: `Analyzes code dependency graphs.
6
-
7
- Keywords: dependency, relationship analysis, circular reference, dependency graph, circular dependency
8
-
9
- **Analysis includes:**
10
- - Import/export relationships between files
11
- - Circular dependency detection
12
- - Module cluster identification
13
- - Code coupling analysis
14
-
15
- Usage examples:
16
- - "Analyze dependency graph in src folder"
17
- - "Show dependencies of index.ts"`,
18
- inputSchema: {
19
- type: 'object',
20
- properties: {
21
- projectPath: {
22
- type: 'string',
23
- description: 'Project path'
24
- },
25
- targetFile: {
26
- type: 'string',
27
- description: 'Specific file to analyze (optional)'
28
- },
29
- maxDepth: {
30
- type: 'number',
31
- description: 'Maximum traversal depth (default: 3)'
32
- },
33
- includeExternal: {
34
- type: 'boolean',
35
- description: 'Include external packages (default: false)'
36
- },
37
- detectCircular: {
38
- type: 'boolean',
39
- description: 'Detect circular dependencies (default: true)'
40
- }
41
- },
42
- required: ['projectPath']
43
- },
44
- annotations: {
45
- title: 'Analyze Dependency Graph',
46
- audience: ['user', 'assistant'],
47
- readOnlyHint: true,
48
- destructiveHint: false,
49
- idempotentHint: true,
50
- openWorldHint: false
51
- }
52
- };
53
- export async function analyzeDependencyGraph(args) {
54
- try {
55
- const { projectPath, targetFile, maxDepth = 3, includeExternal = false, detectCircular = true } = args;
56
- const project = await ProjectCache.getInstance().getOrCreate(projectPath);
57
- const sourceFiles = project.getSourceFiles();
58
- if (sourceFiles.length === 0) {
59
- return {
60
- content: [{
61
- type: 'text',
62
- text: `✗ No source files found in project: ${projectPath}`
63
- }]
64
- };
65
- }
66
- const graph = {
67
- nodes: [],
68
- edges: [],
69
- circularDependencies: [],
70
- clusters: []
71
- };
72
- const fileMap = new Map();
73
- const adjacencyList = new Map();
74
- // Build dependency graph
75
- for (const sourceFile of sourceFiles) {
76
- const filePath = sourceFile.getFilePath();
77
- const relativePath = getRelativePath(filePath, projectPath);
78
- // Skip if targeting specific file and this isn't it or related
79
- if (targetFile && !relativePath.includes(targetFile) && !shouldIncludeInGraph(relativePath, targetFile, maxDepth)) {
80
- continue;
81
- }
82
- const imports = [];
83
- const exports = [];
84
- // Get imports
85
- const importDeclarations = sourceFile.getImportDeclarations();
86
- for (const imp of importDeclarations) {
87
- const moduleSpecifier = imp.getModuleSpecifierValue();
88
- // Skip external packages unless requested
89
- if (!includeExternal && (moduleSpecifier.startsWith('@') || !moduleSpecifier.startsWith('.'))) {
90
- continue;
91
- }
92
- const resolvedPath = resolveImportPath(moduleSpecifier, filePath, projectPath);
93
- if (resolvedPath) {
94
- imports.push(resolvedPath);
95
- // Add edge
96
- graph.edges.push({
97
- from: relativePath,
98
- to: resolvedPath,
99
- type: 'import'
100
- });
101
- // Update adjacency list
102
- if (!adjacencyList.has(relativePath)) {
103
- adjacencyList.set(relativePath, new Set());
104
- }
105
- adjacencyList.get(relativePath).add(resolvedPath);
106
- }
107
- }
108
- // Get exports
109
- const exportDeclarations = sourceFile.getExportDeclarations();
110
- for (const exp of exportDeclarations) {
111
- const namedExports = exp.getNamedExports();
112
- for (const named of namedExports) {
113
- exports.push(named.getName());
114
- }
115
- }
116
- // Also get exported declarations
117
- const exportedDeclarations = sourceFile.getExportedDeclarations();
118
- exportedDeclarations.forEach((declarations, name) => {
119
- if (!exports.includes(name)) {
120
- exports.push(name);
121
- }
122
- });
123
- const node = {
124
- file: relativePath,
125
- imports,
126
- exports,
127
- depth: 0
128
- };
129
- fileMap.set(relativePath, node);
130
- graph.nodes.push(node);
131
- }
132
- // Detect circular dependencies
133
- if (detectCircular) {
134
- graph.circularDependencies = findCircularDependencies(adjacencyList);
135
- }
136
- // Detect clusters (strongly connected components)
137
- graph.clusters = findClusters(adjacencyList);
138
- // Generate output
139
- let output = `## Dependency Graph Analysis\n\n`;
140
- output += `**Project**: ${projectPath}\n`;
141
- output += `**Files analyzed**: ${graph.nodes.length}\n`;
142
- output += `**Dependencies**: ${graph.edges.length}\n\n`;
143
- // Show target file dependencies if specified
144
- if (targetFile) {
145
- const targetNode = graph.nodes.find(n => n.file.includes(targetFile));
146
- if (targetNode) {
147
- output += `### ${targetFile} Dependencies\n\n`;
148
- output += `**Imports** (${targetNode.imports.length}):\n`;
149
- for (const imp of targetNode.imports) {
150
- output += `- ← ${imp}\n`;
151
- }
152
- output += `\n**Exports** (${targetNode.exports.length}):\n`;
153
- for (const exp of targetNode.exports) {
154
- output += `- → ${exp}\n`;
155
- }
156
- output += '\n';
157
- }
158
- }
159
- // Circular dependencies warning
160
- if (graph.circularDependencies.length > 0) {
161
- output += `### ⚠️ Circular Dependencies Detected\n\n`;
162
- for (const cycle of graph.circularDependencies) {
163
- output += `- ${cycle.join(' → ')} → ${cycle[0]}\n`;
164
- }
165
- output += '\n';
166
- }
167
- // Clusters
168
- if (graph.clusters.length > 0) {
169
- output += `### Module Clusters\n\n`;
170
- for (let i = 0; i < graph.clusters.length; i++) {
171
- if (graph.clusters[i].length > 1) {
172
- output += `**Cluster ${i + 1}** (${graph.clusters[i].length} files):\n`;
173
- for (const file of graph.clusters[i].slice(0, 5)) {
174
- output += ` - ${file}\n`;
175
- }
176
- if (graph.clusters[i].length > 5) {
177
- output += ` - ... and ${graph.clusters[i].length - 5} more\n`;
178
- }
179
- output += '\n';
180
- }
181
- }
182
- }
183
- // Mermaid diagram for small graphs
184
- if (graph.nodes.length <= 20) {
185
- output += `### Dependency Diagram\n\n`;
186
- output += generateMermaidDiagram(graph);
187
- }
188
- // Statistics
189
- output += `### Statistics\n\n`;
190
- output += generateStatistics(graph);
191
- return {
192
- content: [{
193
- type: 'text',
194
- text: output
195
- }]
196
- };
197
- }
198
- catch (error) {
199
- return {
200
- content: [{
201
- type: 'text',
202
- text: `✗ Dependency analysis error: ${error instanceof Error ? error.message : 'Unknown error'}`
203
- }]
204
- };
205
- }
206
- }
207
- function getRelativePath(filePath, projectPath) {
208
- const normalizedFile = filePath.replace(/\\/g, '/');
209
- const normalizedProject = projectPath.replace(/\\/g, '/');
210
- return normalizedFile.replace(normalizedProject, '').replace(/^\//, '');
211
- }
212
- function resolveImportPath(moduleSpecifier, fromFile, projectPath) {
213
- if (!moduleSpecifier.startsWith('.')) {
214
- return null;
215
- }
216
- // Simple resolution - in real implementation would use ts-morph's resolution
217
- const fromDir = fromFile.substring(0, fromFile.lastIndexOf('/'));
218
- let resolved = moduleSpecifier;
219
- if (moduleSpecifier.startsWith('./')) {
220
- resolved = `${fromDir}/${moduleSpecifier.substring(2)}`;
221
- }
222
- else if (moduleSpecifier.startsWith('../')) {
223
- const parts = fromDir.split('/');
224
- const upCount = (moduleSpecifier.match(/\.\.\//g) || []).length;
225
- parts.splice(-upCount);
226
- resolved = `${parts.join('/')}/${moduleSpecifier.replace(/\.\.\//g, '')}`;
227
- }
228
- // Add .ts extension if missing
229
- if (!resolved.endsWith('.ts') && !resolved.endsWith('.js')) {
230
- resolved += '.ts';
231
- }
232
- return getRelativePath(resolved, projectPath);
233
- }
234
- function shouldIncludeInGraph(file, targetFile, maxDepth) {
235
- // Simple heuristic - include files in same or nearby directories
236
- const targetDir = targetFile.substring(0, targetFile.lastIndexOf('/'));
237
- return file.startsWith(targetDir);
238
- }
239
- function findCircularDependencies(adjacencyList) {
240
- const cycles = [];
241
- const visited = new Set();
242
- const recursionStack = new Set();
243
- const path = [];
244
- function dfs(node) {
245
- visited.add(node);
246
- recursionStack.add(node);
247
- path.push(node);
248
- const neighbors = adjacencyList.get(node) || new Set();
249
- for (const neighbor of neighbors) {
250
- if (!visited.has(neighbor)) {
251
- dfs(neighbor);
252
- }
253
- else if (recursionStack.has(neighbor)) {
254
- // Found cycle
255
- const cycleStart = path.indexOf(neighbor);
256
- const cycle = path.slice(cycleStart);
257
- cycles.push([...cycle]);
258
- }
259
- }
260
- path.pop();
261
- recursionStack.delete(node);
262
- }
263
- for (const node of adjacencyList.keys()) {
264
- if (!visited.has(node)) {
265
- dfs(node);
266
- }
267
- }
268
- return cycles;
269
- }
270
- function findClusters(adjacencyList) {
271
- // Simple connected components using Union-Find
272
- const parent = {};
273
- for (const node of adjacencyList.keys()) {
274
- parent[node] = node;
275
- }
276
- function find(x) {
277
- if (parent[x] !== x) {
278
- parent[x] = find(parent[x]);
279
- }
280
- return parent[x];
281
- }
282
- function union(x, y) {
283
- const px = find(x);
284
- const py = find(y);
285
- if (px !== py) {
286
- parent[px] = py;
287
- }
288
- }
289
- for (const [node, neighbors] of adjacencyList) {
290
- for (const neighbor of neighbors) {
291
- if (parent[neighbor] !== undefined) {
292
- union(node, neighbor);
293
- }
294
- }
295
- }
296
- const clusters = {};
297
- for (const node of adjacencyList.keys()) {
298
- const root = find(node);
299
- if (!clusters[root]) {
300
- clusters[root] = [];
301
- }
302
- clusters[root].push(node);
303
- }
304
- return Object.values(clusters).filter(c => c.length > 1);
305
- }
306
- function generateMermaidDiagram(graph) {
307
- let diagram = '```mermaid\ngraph TD\n';
308
- // Add nodes
309
- for (const node of graph.nodes) {
310
- const id = node.file.replace(/[^a-zA-Z0-9]/g, '_');
311
- const label = node.file.split('/').pop() || node.file;
312
- diagram += ` ${id}["${label}"]\n`;
313
- }
314
- // Add edges
315
- for (const edge of graph.edges) {
316
- const fromId = edge.from.replace(/[^a-zA-Z0-9]/g, '_');
317
- const toId = edge.to.replace(/[^a-zA-Z0-9]/g, '_');
318
- diagram += ` ${fromId} --> ${toId}\n`;
319
- }
320
- diagram += '```\n';
321
- return diagram;
322
- }
323
- function generateStatistics(graph) {
324
- // Calculate metrics
325
- const importCounts = new Map();
326
- const exportCounts = new Map();
327
- for (const edge of graph.edges) {
328
- importCounts.set(edge.to, (importCounts.get(edge.to) || 0) + 1);
329
- exportCounts.set(edge.from, (exportCounts.get(edge.from) || 0) + 1);
330
- }
331
- // Most imported files
332
- const topImported = [...importCounts.entries()]
333
- .sort((a, b) => b[1] - a[1])
334
- .slice(0, 5);
335
- // Files with most dependencies
336
- const topDependencies = graph.nodes
337
- .map(n => ({ file: n.file, count: n.imports.length }))
338
- .sort((a, b) => b.count - a.count)
339
- .slice(0, 5);
340
- let stats = `- **Total files**: ${graph.nodes.length}\n`;
341
- stats += `- **Total dependencies**: ${graph.edges.length}\n`;
342
- stats += `- **Circular dependencies**: ${graph.circularDependencies.length}\n`;
343
- stats += `- **Clusters**: ${graph.clusters.length}\n\n`;
344
- if (topImported.length > 0) {
345
- stats += `**Most referenced files**:\n`;
346
- for (const [file, count] of topImported) {
347
- stats += `- ${file}: ${count} times\n`;
348
- }
349
- stats += '\n';
350
- }
351
- if (topDependencies.length > 0) {
352
- stats += `**Files with most dependencies**:\n`;
353
- for (const { file, count } of topDependencies) {
354
- stats += `- ${file}: ${count} imports\n`;
355
- }
356
- }
357
- return stats;
358
- }
359
- //# sourceMappingURL=analyzeDependencyGraph.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"analyzeDependencyGraph.js","sourceRoot":"","sources":["../../../src/tools/semantic/analyzeDependencyGraph.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAGhC,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAE/D,MAAM,CAAC,MAAM,gCAAgC,GAAmB;IAC9D,IAAI,EAAE,0BAA0B;IAChC,WAAW,EAAE;;;;;;;;;;;;kCAYmB;IAChC,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,cAAc;aAC5B;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,qCAAqC;aACnD;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,sCAAsC;aACpD;YACD,eAAe,EAAE;gBACf,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,4CAA4C;aAC1D;YACD,cAAc,EAAE;gBACd,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,8CAA8C;aAC5D;SACF;QACD,QAAQ,EAAE,CAAC,aAAa,CAAC;KAC1B;IACD,WAAW,EAAE;QACX,KAAK,EAAE,0BAA0B;QACjC,QAAQ,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC;QAC/B,YAAY,EAAE,IAAI;QAClB,eAAe,EAAE,KAAK;QACtB,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,KAAK;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EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC;SACjC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAEf,IAAI,KAAK,GAAG,sBAAsB,KAAK,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC;IACzD,KAAK,IAAI,6BAA6B,KAAK,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC;IAC7D,KAAK,IAAI,gCAAgC,KAAK,CAAC,oBAAoB,CAAC,MAAM,IAAI,CAAC;IAC/E,KAAK,IAAI,mBAAmB,KAAK,CAAC,QAAQ,CAAC,MAAM,MAAM,CAAC;IAExD,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC3B,KAAK,IAAI,8BAA8B,CAAC;QACxC,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,WAAW,EAAE,CAAC;YACxC,KAAK,IAAI,KAAK,IAAI,KAAK,KAAK,UAAU,CAAC;QACzC,CAAC;QACD,KAAK,IAAI,IAAI,CAAC;IAChB,CAAC;IAED,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC/B,KAAK,IAAI,qCAAqC,CAAC;QAC/C,KAAK,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,eAAe,EAAE,CAAC;YAC9C,KAAK,IAAI,KAAK,IAAI,KAAK,KAAK,YAAY,CAAC;QAC3C,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -1,25 +0,0 @@
1
- /**
2
- * ast-grep Tools - 패턴 기반 코드 검색/변환
3
- *
4
- * 지원 언어: JavaScript, TypeScript, TSX, JSX, HTML, CSS
5
- * (Python, Go, Rust 등은 ast-grep-napi에서 별도 동적 등록 필요)
6
- *
7
- * @ast-grep/napi는 네이티브 바이너리 optional dependency → 동적 import
8
- */
9
- import { ToolResult, ToolDefinition } from '../../infra/types/tool.js';
10
- export declare const astGrepSearchDefinition: ToolDefinition;
11
- export declare const astGrepReplaceDefinition: ToolDefinition;
12
- export declare function astGrepSearch(args: {
13
- pattern: string;
14
- path: string;
15
- lang?: string;
16
- maxResults?: number;
17
- }): Promise<ToolResult>;
18
- export declare function astGrepReplace(args: {
19
- pattern: string;
20
- replacement: string;
21
- path: string;
22
- lang?: string;
23
- dryRun?: boolean;
24
- }): Promise<ToolResult>;
25
- //# sourceMappingURL=astGrep.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"astGrep.d.ts","sourceRoot":"","sources":["../../../src/tools/semantic/astGrep.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AA+DvE,eAAO,MAAM,uBAAuB,EAAE,cAkCrC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,cAsCtC,CAAC;AAsDF,wBAAsB,aAAa,CAAC,IAAI,EAAE;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,OAAO,CAAC,UAAU,CAAC,CAmEtB;AAED,wBAAsB,cAAc,CAAC,IAAI,EAAE;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,GAAG,OAAO,CAAC,UAAU,CAAC,CAgHtB"}