@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
@@ -0,0 +1,184 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * clone-merge-responsive.js — MO/PC per-BP SCSS → mobile-first responsive merge
5
+ *
6
+ * Usage:
7
+ * node clone-merge-responsive.js --mo=<styles-dir> --pc=<styles-dir> --out=<dir> [--breakpoint=1024]
8
+ *
9
+ * Why this exists (clone Phase 3C):
10
+ * Phase 3A/3B produce two fixed-viewport SCSS trees (styles/{feature}/mo, /pc).
11
+ * This merges them mobile-first: MO declarations become the base, and only the
12
+ * declarations where PC differs go into a single @media (min-width: <bp>) block.
13
+ * Deterministic text merge — no value invention. Post-merge correctness is judged
14
+ * by Phase 5 (pixel + computed-CSS verification at BOTH viewports).
15
+ *
16
+ * Fail-open:
17
+ * - PC-only selectors → whole rule inside the media block
18
+ * - MO-only selectors → base as-is (reported)
19
+ * - unparseable/missing files → reported and skipped, never a hard abort
20
+ */
21
+
22
+ import fs from 'fs';
23
+ import path from 'path';
24
+ import { parseScss, normalize } from './clone-validate.js';
25
+
26
+ // ─── CLI ────────────────────────────────────────────────────────────
27
+ function parseArgs(argv) {
28
+ const opts = { breakpoint: 1024 };
29
+ for (const a of argv.slice(2)) {
30
+ if (a.startsWith('--mo=')) opts.mo = a.slice(5);
31
+ else if (a.startsWith('--pc=')) opts.pc = a.slice(5);
32
+ else if (a.startsWith('--out=')) opts.out = a.slice(6);
33
+ else if (a.startsWith('--breakpoint=')) opts.breakpoint = Number(a.slice(13)) || 1024;
34
+ }
35
+ return opts;
36
+ }
37
+
38
+ // ─── Merge core (pure — exported for tests) ─────────────────────────
39
+ // moRules/pcRules: Map<selector, {prop: value}> (parseScss output)
40
+ // → { base: Map, media: Map, stats }
41
+ function mergeRules(moRules, pcRules) {
42
+ const base = new Map();
43
+ const media = new Map();
44
+ const stats = { selectors: 0, moOnly: 0, pcOnly: 0, overrides: 0, shared: 0 };
45
+
46
+ const selectors = new Set([...moRules.keys(), ...pcRules.keys()]);
47
+ for (const sel of selectors) {
48
+ stats.selectors++;
49
+ const mo = moRules.get(sel);
50
+ const pc = pcRules.get(sel);
51
+ if (mo && Object.keys(mo).length) base.set(sel, mo);
52
+
53
+ if (!pc || !Object.keys(pc).length) { if (mo) stats.moOnly++; continue; }
54
+ if (!mo || !Object.keys(mo).length) {
55
+ // PC 전용 셀렉터 — 데스크탑에서만 존재하는 노드
56
+ media.set(sel, pc);
57
+ stats.pcOnly++;
58
+ continue;
59
+ }
60
+
61
+ const diff = {};
62
+ for (const [prop, val] of Object.entries(pc)) {
63
+ if (mo[prop] === undefined || normalize(mo[prop]) !== normalize(val)) diff[prop] = val;
64
+ }
65
+ if (Object.keys(diff).length) { media.set(sel, diff); stats.overrides++; }
66
+ else stats.shared++;
67
+ }
68
+ return { base, media, stats };
69
+ }
70
+
71
+ function emitRules(rules, indent) {
72
+ const out = [];
73
+ for (const [sel, decls] of rules) {
74
+ const body = Object.entries(decls).map(([p, v]) => `${indent} ${p}: ${v};`).join('\n');
75
+ if (!body) continue;
76
+ out.push(`${indent}${sel} {\n${body}\n${indent}}`);
77
+ }
78
+ return out.join('\n\n');
79
+ }
80
+
81
+ // Merged partial: MO base rules + one @media (min-width) block with PC diffs.
82
+ function emitMerged(moRules, pcRules, breakpoint, header) {
83
+ const { base, media, stats } = mergeRules(moRules, pcRules);
84
+ const parts = [header, '', emitRules(base, '')];
85
+ if (media.size) {
86
+ parts.push('');
87
+ parts.push(`@media (min-width: ${breakpoint}px) {`);
88
+ parts.push(emitRules(media, ' '));
89
+ parts.push('}');
90
+ }
91
+ return { scss: parts.filter((p) => p !== null).join('\n') + '\n', stats };
92
+ }
93
+
94
+ // ─── File-level orchestration ───────────────────────────────────────
95
+ function readScssRules(file) {
96
+ if (!fs.existsSync(file)) return null;
97
+ try { return parseScss(fs.readFileSync(file, 'utf8')); }
98
+ catch (e) {
99
+ console.error(`[clone-merge] parse skipped (${e.message}): ${file}`);
100
+ return null;
101
+ }
102
+ }
103
+
104
+ function listSections(dir) {
105
+ const d = path.join(dir, 'sections');
106
+ if (!fs.existsSync(d)) return [];
107
+ return fs.readdirSync(d).filter((f) => f.startsWith('_') && f.endsWith('.scss'));
108
+ }
109
+
110
+ function mergeTokens(moDir, pcDir, outDir, breakpoint) {
111
+ const mo = readScssRules(path.join(moDir, '_tokens.scss')) || new Map();
112
+ const pc = readScssRules(path.join(pcDir, '_tokens.scss')) || new Map();
113
+ const { scss } = emitMerged(mo, pc, breakpoint, '// Auto-merged by clone-merge-responsive.js (mobile-first)');
114
+ fs.writeFileSync(path.join(outDir, '_tokens.scss'), scss);
115
+ }
116
+
117
+ function copyIfExists(src, dst) {
118
+ if (fs.existsSync(src)) fs.copyFileSync(src, dst);
119
+ }
120
+
121
+ function mergeClassPlans(moDir, pcDir, outDir) {
122
+ const read = (d) => {
123
+ const f = path.join(d, 'class-plan.json');
124
+ return fs.existsSync(f) ? JSON.parse(fs.readFileSync(f, 'utf8')) : {};
125
+ };
126
+ // MO 우선 — 동일 노드 id가 다른 클래스면 MO가 base이므로 MO를 채택
127
+ const merged = { ...read(pcDir), ...read(moDir) };
128
+ fs.writeFileSync(path.join(outDir, 'class-plan.json'), JSON.stringify(merged, null, 2));
129
+ }
130
+
131
+ function main() {
132
+ const opts = parseArgs(process.argv);
133
+ if (!opts.mo || !opts.pc || !opts.out) {
134
+ console.error('Usage: node clone-merge-responsive.js --mo=<styles-dir> --pc=<styles-dir> --out=<dir> [--breakpoint=1024]');
135
+ process.exit(2);
136
+ }
137
+
138
+ fs.mkdirSync(path.join(opts.out, 'sections'), { recursive: true });
139
+
140
+ const files = [...new Set([...listSections(opts.mo), ...listSections(opts.pc)])].sort();
141
+ const totals = { selectors: 0, moOnly: 0, pcOnly: 0, overrides: 0, shared: 0 };
142
+ const merged = [];
143
+
144
+ for (const f of files) {
145
+ const mo = readScssRules(path.join(opts.mo, 'sections', f)) || new Map();
146
+ const pc = readScssRules(path.join(opts.pc, 'sections', f)) || new Map();
147
+ if (!mo.size && !pc.size) { console.error(`[clone-merge] empty on both BPs, skipped: ${f}`); continue; }
148
+ const { scss, stats } = emitMerged(mo, pc, opts.breakpoint, `// Section: ${f} — merged mobile-first`);
149
+ fs.writeFileSync(path.join(opts.out, 'sections', f), scss);
150
+ for (const k of Object.keys(totals)) totals[k] += stats[k];
151
+ merged.push(f);
152
+ }
153
+
154
+ mergeTokens(opts.mo, opts.pc, opts.out, opts.breakpoint);
155
+ copyIfExists(path.join(opts.mo, '_base.scss'), path.join(opts.out, '_base.scss'));
156
+ copyIfExists(path.join(opts.mo, '_shared.scss'), path.join(opts.out, '_shared.scss'));
157
+ mergeClassPlans(opts.mo, opts.pc, opts.out);
158
+
159
+ const index = [
160
+ '// Auto-merged by clone-merge-responsive.js — mobile-first responsive',
161
+ '',
162
+ `@use './tokens';`,
163
+ `@use './base';`,
164
+ `@use './shared';`,
165
+ ...merged.map((f) => `@use './sections/${f.replace(/^_|\.scss$/g, '')}';`),
166
+ ].join('\n') + '\n';
167
+ fs.writeFileSync(path.join(opts.out, 'index.scss'), index);
168
+
169
+ console.log(`[clone-merge] done → ${opts.out}`);
170
+ console.log(` sections: ${merged.length}, selectors: ${totals.selectors} (shared ${totals.shared}, overrides ${totals.overrides}, mo-only ${totals.moOnly}, pc-only ${totals.pcOnly})`);
171
+ console.log(` breakpoint: @media (min-width: ${opts.breakpoint}px)`);
172
+ }
173
+
174
+ const isMain = process.argv[1] && process.argv[1].replace(/\\/g, '/').endsWith('clone-merge-responsive.js');
175
+ if (isMain) {
176
+ try { main(); }
177
+ catch (e) {
178
+ console.error(`[clone-merge] FAIL: ${e.message}`);
179
+ if (process.env.DEBUG) console.error(e.stack);
180
+ process.exit(1);
181
+ }
182
+ }
183
+
184
+ export { mergeRules, emitMerged };
@@ -28,6 +28,7 @@ function parseArgs(argv) {
28
28
  else if (a.startsWith('--section=')) opts.section = a.slice(10);
29
29
  else if (a.startsWith('--feature=')) opts.feature = a.slice(10);
30
30
  else if (a.startsWith('--behaviors=')) opts.behaviors = a.slice(12);
31
+ else if (a === '--real-content') opts.realContent = true;
31
32
  }
32
33
  return { sectionsPath, opts };
33
34
  }
@@ -101,20 +102,28 @@ function sectionHasNode(section, tag, cls) {
101
102
  return (section.children || []).some(hit);
102
103
  }
103
104
 
105
+ function diffLines(changed) {
106
+ return Object.entries(changed)
107
+ .map(([k, v]) => ` - ${k}: \`${v.from}\` → \`${v.to}\``).join('\n');
108
+ }
109
+
104
110
  function behaviorsBlock(section, behaviors) {
105
111
  if (!behaviors) return null;
106
- const scroll = (behaviors.scroll || []).filter((b) => sectionHasNode(section, b.tag, b.cls));
112
+ const inSection = (list) => (list || []).filter((b) => sectionHasNode(section, b.tag, b.cls));
113
+ const scroll = inSection(behaviors.scroll);
114
+ const hover = inSection(behaviors.hover);
115
+ const inview = inSection(behaviors.inview);
116
+ const timed = inSection(behaviors.timeDriven);
107
117
  // Tab groups aren't tag-keyed; attach to any section that contains a [role=tab]-ish node.
108
118
  const tabs = (behaviors.interactive || []).filter(() =>
109
119
  sectionHasNode(section, 'button') || sectionHasNode(section, 'li') || sectionHasNode(section, 'a'),
110
120
  );
111
- if (!scroll.length && !tabs.length) return null;
121
+ const lib = behaviors.scrollLib;
122
+ if (!scroll.length && !tabs.length && !hover.length && !inview.length && !timed.length && !lib) return null;
112
123
 
113
124
  const lines = [];
114
125
  for (const b of scroll) {
115
- const diffs = Object.entries(b.changed)
116
- .map(([k, v]) => ` - ${k}: \`${v.from}\` → \`${v.to}\``).join('\n');
117
- lines.push(`- **Scroll-triggered** on \`${b.label}\` (past ~${b.triggerScrollY}px scroll):\n${diffs}`);
126
+ lines.push(`- **Scroll-triggered** on \`${b.label}\` (past ~${b.triggerScrollY}px scroll):\n${diffLines(b.changed)}`);
118
127
  }
119
128
  for (const t of tabs) {
120
129
  const labels = (t.tabLabels || []).map((l) => `"${l}"`).join(', ') || '(unlabeled)';
@@ -123,6 +132,19 @@ function behaviorsBlock(section, behaviors) {
123
132
  : 'no content swap detected (styling-only tabs)';
124
133
  lines.push(`- **Tab group** ×${t.count} [${labels}]: ${swap}`);
125
134
  }
135
+ for (const b of hover) {
136
+ const tr = b.transition && b.transition !== 'all 0s ease 0s' ? ` (transition: \`${b.transition}\`)` : '';
137
+ lines.push(`- **Hover** on \`${b.label}\`${tr}:\n${diffLines(b.changed)}`);
138
+ }
139
+ for (const b of inview) {
140
+ lines.push(`- **In-view entrance** on \`${b.label}\` (enters at ~${b.triggerY}px):\n${diffLines(b.changed)}`);
141
+ }
142
+ for (const b of timed) {
143
+ lines.push(`- **Time-driven** \`${b.label}\` — ${b.mutations} mutations/3s [${(b.kinds || []).join(', ')}] → carousel/auto-cycle candidate`);
144
+ }
145
+ if (lib) {
146
+ lines.push(`- **Smooth-scroll library (page-level):** ${lib.name} (evidence: \`${lib.evidence}\`) → wire in globals, not per-section`);
147
+ }
126
148
  return lines.join('\n');
127
149
  }
128
150
 
@@ -171,7 +193,9 @@ ${cssBlock(section.css)}
171
193
  ## Assets (local paths only — never hotlink)
172
194
  ${assetsBlock(section.images)}
173
195
 
174
- ## Text content (replace copyrighted copy with placeholders)
196
+ ## Text content ${meta.realContent
197
+ ? '(verbatim — user confirmed rights to reuse this copy)'
198
+ : '(replace copyrighted copy with placeholders)'}
175
199
  ${textBlock}
176
200
 
177
201
  ## Component candidates
@@ -179,7 +203,7 @@ ${componentsBlock(section.components)}
179
203
 
180
204
  ## Build checklist
181
205
  - [ ] HTML semantics + final tags chosen
182
- - [ ] SCSS via clone-to-scss.js (computed values as-is no eyeballing)
206
+ - [ ] SCSS started from the clone-to-scss.js draft value edits only with evidence cited from computed.json/states.json/behaviors.json (no eyeballing); clone-validate.js is the judge
183
207
  - [ ] Every state above implemented
184
208
  - [ ] Interaction model confirmed on live site & wired
185
209
  - [ ] All assets local (public/images/${meta.feature}/) — no hotlinks
@@ -196,6 +220,7 @@ function main() {
196
220
  url: data.meta && data.meta.url,
197
221
  viewport: data.meta && data.meta.viewport,
198
222
  bp: opts.section ? (data.meta && data.meta.bp) : (data.meta && data.meta.bp) || '?',
223
+ realContent: !!opts.realContent,
199
224
  };
200
225
  // behaviors.json (active interaction sweep) lives next to the source computed.json.
201
226
  const behaviorsPath = opts.behaviors || path.join(path.dirname(sectionsPath), 'behaviors.json');
@@ -223,7 +248,7 @@ function main() {
223
248
  const isMain = process.argv[1] && process.argv[1].replace(/\\/g, '/').endsWith('clone-spec.js');
224
249
  if (isMain) {
225
250
  if (!sectionsPath || !opts.out) {
226
- console.error('Usage: node clone-spec.js <sections.json> --out=<dir> [--section=Name] [--feature=name] [--behaviors=path]');
251
+ console.error('Usage: node clone-spec.js <sections.json> --out=<dir> [--section=Name] [--feature=name] [--behaviors=path] [--real-content]');
227
252
  process.exit(1);
228
253
  }
229
254
  try { main(); }
@@ -34,10 +34,6 @@ function parseArgs(argv) {
34
34
  }
35
35
 
36
36
  const { stylesDir, sectionsPath, opts } = parseArgs(process.argv);
37
- if (!stylesDir || !sectionsPath) {
38
- console.error('Usage: node clone-validate.js <styles-dir> <sections.json> [--section=<name>]');
39
- process.exit(2);
40
- }
41
37
 
42
38
  // ─── Minimal SCSS parser ────────────────────────────────────────────
43
39
  // Strips comments, expands `&::pseudo` (one level), flattens nested rules.
@@ -272,9 +268,19 @@ function main() {
272
268
  process.exit(0);
273
269
  }
274
270
 
275
- try { main(); }
276
- catch (e) {
277
- console.error(`[clone-validate] FAIL: ${e.message}`);
278
- if (process.env.DEBUG) console.error(e.stack);
279
- process.exit(2);
271
+ // isMain 가드 — clone-merge-responsive.js가 parseScss를 import할 때 main() 돌면 안 된다
272
+ const isMain = process.argv[1] && process.argv[1].replace(/\\/g, '/').endsWith('clone-validate.js');
273
+ if (isMain) {
274
+ if (!stylesDir || !sectionsPath) {
275
+ console.error('Usage: node clone-validate.js <styles-dir> <sections.json> [--section=<name>]');
276
+ process.exit(2);
277
+ }
278
+ try { main(); }
279
+ catch (e) {
280
+ console.error(`[clone-validate] FAIL: ${e.message}`);
281
+ if (process.env.DEBUG) console.error(e.stack);
282
+ process.exit(2);
283
+ }
280
284
  }
285
+
286
+ export { parseScss, normalize, compareValue };
@@ -14,6 +14,7 @@ import { getToolsBaseUrl, PROJECT_DIR, readProjectConfig } from './utils.js';
14
14
  import { readFileSync } from 'fs';
15
15
  import path from 'path';
16
16
  import { buildCliCtx, isDirectRun } from './lib/hook-context.js';
17
+ import { globToRegExp } from './lib/glob.js';
17
18
 
18
19
  const BASE_URL = getToolsBaseUrl();
19
20
 
@@ -42,35 +43,6 @@ const DEFAULT_CONSOLE_ALLOW_GLOBS = [
42
43
  '**/__tests__/**',
43
44
  ];
44
45
 
45
- /**
46
- * 경량 glob → RegExp 변환 (scope-guard와 동일 알고리즘, 독립 복사본).
47
- * @param {string} glob
48
- * @returns {RegExp}
49
- */
50
- function globToRegExp(glob) {
51
- const normalized = glob.replace(/\\/g, '/');
52
- let out = '';
53
- for (let i = 0; i < normalized.length; i++) {
54
- const c = normalized[i];
55
- if (c === '*') {
56
- if (normalized[i + 1] === '*') {
57
- out += '.*';
58
- i++;
59
- if (normalized[i + 1] === '/') i++;
60
- } else {
61
- out += '[^/]*';
62
- }
63
- } else if (c === '?') {
64
- out += '[^/]';
65
- } else if ('.+^$()|{}[]\\'.includes(c)) {
66
- out += '\\' + c;
67
- } else {
68
- out += c;
69
- }
70
- }
71
- return new RegExp('^' + out + '$');
72
- }
73
-
74
46
  /**
75
47
  * .vibe/config.json의 qualityCheck.consoleAllow 글로브 목록 로드.
76
48
  * 기본 글로브와 병합하여 반환.
@@ -105,19 +77,12 @@ function isConsoleAllowed(filePath) {
105
77
  }
106
78
 
107
79
  /**
108
- * hook input에서 수정된 파일 경로 추출.
80
+ * hook ctx에서 수정된 파일 경로 추출.
109
81
  * @param {object} ctx
110
82
  * @returns {string[]}
111
83
  */
112
84
  function getModifiedFiles(ctx) {
113
- try {
114
- const parsed = ctx.payload || (ctx.hookInput ? JSON.parse(ctx.hookInput) : null);
115
- const filePath = parsed?.tool_input?.file_path || parsed?.tool_input?.path;
116
- return filePath ? [filePath] : [];
117
- } catch {
118
- // ignore
119
- }
120
- return [];
85
+ return ctx.filePath ? [ctx.filePath] : [];
121
86
  }
122
87
 
123
88
  /**
@@ -217,7 +182,7 @@ function runDetectors(filePath) {
217
182
  /**
218
183
  * in-process 진입점 — 품질 검사 + 관찰 캡처.
219
184
  * findings 배열을 반환한다 (디스패처가 수집해 additionalContext에 주입).
220
- * @param {{ payload: object|null, hookInput: string|null }} ctx
185
+ * @param {{ filePath: string }} ctx
221
186
  * @returns {Promise<{ exitCode: number, findings: string[] }>}
222
187
  */
223
188
  export async function run(ctx) {
@@ -225,9 +190,10 @@ export async function run(ctx) {
225
190
  const files = getModifiedFiles(ctx);
226
191
  if (files.length === 0) return { exitCode: 0, findings };
227
192
 
228
- // 1. 하드룰 탐지기 실행 (changed file only)additionalContext 주입만.
229
- // 커밋 게이트(verifyRequired)는 태우지 않는다: 정규식 오탐 하나가
230
- // auto-commit을 차단하는 결합은 제거됨 (harness-review-2026-07-01).
193
+ // 1. 하드룰 탐지기 실행 (changed file only, regex only 동적 import 없음) —
194
+ // additionalContext 주입만. 커밋 게이트(verifyRequired)는 태우지 않는다:
195
+ // 정규식 오탐 하나가 auto-commit을 차단하는 결합은 제거됨
196
+ // (harness-review-2026-07-01).
231
197
  try {
232
198
  const { p1 } = runDetectors(files[0]);
233
199
  for (const msg of p1) findings.push(msg);
@@ -235,6 +201,10 @@ export async function run(ctx) {
235
201
  // 탐지기 실패 → fail-open, 계속 진행
236
202
  }
237
203
 
204
+ // validateCodeQuality가 처리하지 않는 확장자는 무거운 동적 import
205
+ // (convention/index.js·memory/index.js — 모듈 그래프 + SQLite 오픈) 전에 조기 반환.
206
+ if (!CODE_EXT_RE.test(files[0])) return { exitCode: 0, findings };
207
+
238
208
  // 2. validateCodeQuality 호출 (P1/P2 필터)
239
209
  try {
240
210
  const module = await import(`${BASE_URL}convention/index.js`);
@@ -249,19 +219,21 @@ export async function run(ctx) {
249
219
  // Silently continue on check failure
250
220
  }
251
221
 
252
- // 3. 관찰 자동 캡처
253
- try {
254
- const memModule = await import(`${BASE_URL}memory/index.js`);
255
- const { type, title } = classifyObservation(files);
256
-
257
- await memModule.addObservation({
258
- type,
259
- title: `${title}: ${files.map(f => f.split(/[\\/]/).pop()).join(', ')}`,
260
- filesModified: files,
261
- projectPath: PROJECT_DIR,
262
- });
263
- } catch {
264
- // 관찰 캡처 실패해도 무시
222
+ // 3. 관찰 자동 캡처 — 위반(findings)이 실제로 있을 때만 SQLite 기록 (clean edit은 write 생략)
223
+ if (findings.length > 0) {
224
+ try {
225
+ const memModule = await import(`${BASE_URL}memory/index.js`);
226
+ const { type, title } = classifyObservation(files);
227
+
228
+ await memModule.addObservation({
229
+ type,
230
+ title: `${title}: ${files.map(f => f.split(/[\\/]/).pop()).join(', ')}`,
231
+ filesModified: files,
232
+ projectPath: PROJECT_DIR,
233
+ });
234
+ } catch {
235
+ // 관찰 캡처 실패해도 무시
236
+ }
265
237
  }
266
238
 
267
239
  return { exitCode: 0, findings };
@@ -0,0 +1,32 @@
1
+ /**
2
+ * 경량 glob → RegExp 변환 — code-check.js·scope-guard.js 공용 (중복 제거).
3
+ * - `**` : 경로 구분자 포함 임의 문자열
4
+ * - `*` : 구분자 제외 임의 문자열
5
+ * - `?` : 구분자 제외 한 글자
6
+ * - 기타 정규식 메타문자는 이스케이프
7
+ * @param {string} glob
8
+ * @returns {RegExp}
9
+ */
10
+ export function globToRegExp(glob) {
11
+ const normalized = glob.replace(/\\/g, '/');
12
+ let out = '';
13
+ for (let i = 0; i < normalized.length; i++) {
14
+ const c = normalized[i];
15
+ if (c === '*') {
16
+ if (normalized[i + 1] === '*') {
17
+ out += '.*';
18
+ i++;
19
+ if (normalized[i + 1] === '/') i++; // `**/` → `.*`
20
+ } else {
21
+ out += '[^/]*';
22
+ }
23
+ } else if (c === '?') {
24
+ out += '[^/]';
25
+ } else if ('.+^$()|{}[]\\'.includes(c)) {
26
+ out += '\\' + c;
27
+ } else {
28
+ out += c;
29
+ }
30
+ }
31
+ return new RegExp('^' + out + '$');
32
+ }
@@ -7,11 +7,13 @@
7
7
  * 2. standalone CLI: antigravity-hooks.json / 기존 테스트가 스크립트를
8
8
  * 직접 실행 — isDirectRun()으로 감지해 stdin/argv/env에서 ctx를 구성
9
9
  *
10
- * ctx 형태: { toolName, toolInput, payload, hookInput }
10
+ * ctx 형태: { toolName, toolInput, payload, hookInput, filePath }
11
11
  * - toolName: payload.tool_name 우선, argv 폴백 (현행 각 스크립트와 동일 우선순위)
12
12
  * - toolInput: 문자열 정규화된 tool_input (payload → argv[3] → env.TOOL_INPUT)
13
13
  * - payload: 파싱된 stdin JSON 또는 null
14
14
  * - hookInput: stdin 원문 문자열 (code-check의 HOOK_INPUT 사용처 대체)
15
+ * - filePath: toolInput 에서 뽑은 대상 파일 경로 (file_path → notebook_path →
16
+ * path 우선순위 — 각 스크립트의 인라인 추출 로직과 동일 규약)
15
17
  */
16
18
  import fs from 'fs';
17
19
  import { pathToFileURL } from 'url';
@@ -96,6 +98,21 @@ export function readStdinSync() {
96
98
  return { raw: null, parsed: null, truncated: false };
97
99
  }
98
100
 
101
+ /**
102
+ * toolInput(문자열화된 JSON)에서 대상 파일 경로 추출.
103
+ * 각 훅 스크립트의 인라인 추출과 동일 우선순위: file_path → notebook_path → path.
104
+ * @param {string} toolInput
105
+ * @returns {string}
106
+ */
107
+ function extractFilePath(toolInput) {
108
+ try {
109
+ const parsed = JSON.parse(toolInput || '{}');
110
+ return parsed.file_path || parsed.notebook_path || parsed.path || '';
111
+ } catch {
112
+ return '';
113
+ }
114
+ }
115
+
99
116
  /**
100
117
  * 실행 컨텍스트 구성. 우선순위는 현행 스크립트들과 동일:
101
118
  * toolName: payload.tool_name → argvToolName
@@ -106,7 +123,7 @@ export function buildCtx({ rawInput = null, payload = null, argvToolName = '', a
106
123
  const toolInput = payload?.tool_input !== undefined && payload?.tool_input !== null
107
124
  ? (typeof payload.tool_input === 'string' ? payload.tool_input : JSON.stringify(payload.tool_input))
108
125
  : (argvToolInput || process.env.TOOL_INPUT || '');
109
- return { toolName, toolInput, payload, hookInput: rawInput };
126
+ return { toolName, toolInput, payload, hookInput: rawInput, filePath: extractFilePath(toolInput) };
110
127
  }
111
128
 
112
129
  /** standalone CLI 모드용 ctx — stdin/argv/env에서 구성 */
@@ -17,14 +17,13 @@ const CODE_EXT_RE = /\.(ts|tsx|js|jsx|mjs|cjs)$/;
17
17
  /**
18
18
  * in-process 진입점 — console.log 감지만 수행.
19
19
  * findings 배열 반환 (디스패처가 수집해 additionalContext에 주입).
20
- * @param {{ toolInput: string }} ctx
20
+ * @param {{ filePath: string }} ctx
21
21
  * @returns {Promise<{ exitCode: number, findings: string[] }>}
22
22
  */
23
23
  export async function run(ctx) {
24
24
  const findings = [];
25
25
  try {
26
- const input = JSON.parse(ctx.toolInput || '{}');
27
- const filePath = input.file_path || input.path || '';
26
+ const filePath = ctx.filePath;
28
27
 
29
28
  if (filePath && CODE_EXT_RE.test(filePath)) {
30
29
  const resolved = path.resolve(filePath);
@@ -76,7 +76,7 @@ const DISPATCH_RULES = [
76
76
  {
77
77
  pattern: /e2e.*테스트|e2e.*test|playwright|브라우저.*테스트|browser.*test/i,
78
78
  script: null,
79
- echo: '[E2E MODE] Use /vibe.utils --e2e for Playwright-based browser testing. Supports visual regression and video recording.',
79
+ echo: '[E2E MODE] Use /vibe.verify --e2e for Playwright-based browser testing. Supports visual regression and video recording.',
80
80
  label: 'e2e-echo',
81
81
  },
82
82
 
@@ -23,6 +23,7 @@ import fs from 'fs';
23
23
  import path from 'path';
24
24
  import { PROJECT_DIR, logHookDecision, projectVibePath, projectVibeRoot } from './utils.js';
25
25
  import { buildCliCtx, isDirectRun } from './lib/hook-context.js';
26
+ import { globToRegExp } from './lib/glob.js';
26
27
 
27
28
  const SCOPE_PATH = projectVibePath(PROJECT_DIR, 'scope.json');
28
29
 
@@ -45,37 +46,6 @@ function readScope() {
45
46
  }
46
47
  }
47
48
 
48
- /**
49
- * 경량 glob → RegExp 변환.
50
- * - `**` : 경로 구분자 포함 임의 문자열
51
- * - `*` : 구분자 제외 임의 문자열
52
- * - `?` : 구분자 제외 한 글자
53
- * - 기타 정규식 메타문자는 이스케이프
54
- */
55
- function globToRegExp(glob) {
56
- const normalized = glob.replace(/\\/g, '/');
57
- let out = '';
58
- for (let i = 0; i < normalized.length; i++) {
59
- const c = normalized[i];
60
- if (c === '*') {
61
- if (normalized[i + 1] === '*') {
62
- out += '.*';
63
- i++;
64
- if (normalized[i + 1] === '/') i++; // `**/` → `.*`
65
- } else {
66
- out += '[^/]*';
67
- }
68
- } else if (c === '?') {
69
- out += '[^/]';
70
- } else if ('.+^$()|{}[]\\'.includes(c)) {
71
- out += '\\' + c;
72
- } else {
73
- out += c;
74
- }
75
- }
76
- return new RegExp('^' + out + '$');
77
- }
78
-
79
49
  function matchesAny(relPath, patterns) {
80
50
  return patterns.some(p => globToRegExp(p).test(relPath));
81
51
  }
@@ -87,18 +57,9 @@ function toRelative(filePath) {
87
57
  return rel || path.basename(filePath).replace(/\\/g, '/');
88
58
  }
89
59
 
90
- function extractFilePath(toolInput) {
91
- if (!toolInput) return '';
92
- if (typeof toolInput === 'string') {
93
- try { return JSON.parse(toolInput).file_path || ''; }
94
- catch { return toolInput; }
95
- }
96
- return typeof toolInput.file_path === 'string' ? toolInput.file_path : '';
97
- }
98
-
99
60
  /**
100
61
  * in-process 진입점 — 디스패처가 ctx를 전달해 직접 호출.
101
- * @param {{ toolName: string, toolInput: string }} ctx
62
+ * @param {{ toolName: string, toolInput: string, filePath: string }} ctx
102
63
  * @returns {Promise<number>} exit code (0 = allow/no-op, 2 = block)
103
64
  */
104
65
  export async function run(ctx) {
@@ -108,7 +69,7 @@ export async function run(ctx) {
108
69
  const toolName = ctx.toolName;
109
70
  if (toolName !== 'Edit' && toolName !== 'Write') return 0;
110
71
 
111
- const filePath = extractFilePath(ctx.toolInput);
72
+ const filePath = ctx.filePath;
112
73
  if (!filePath) return 0;
113
74
 
114
75
  const rel = toRelative(filePath);