@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
@@ -30,22 +30,6 @@ const SENTINEL_PATH_RE =
30
30
  const DANGEROUS_BASH_RE =
31
31
  /\b(rm\s+-rf|kill\s+-9|drop\s+table|truncate|shutdown|reboot|mkfs|dd\s+if=)\b/i;
32
32
 
33
- /**
34
- * Extract file path from tool input
35
- */
36
- function extractFilePath(toolName, input) {
37
- if (!input) return null;
38
- try {
39
- const parsed = typeof input === 'string' ? JSON.parse(input) : input;
40
- if (toolName === 'Write' || toolName === 'Edit' || toolName === 'Read') {
41
- return parsed.file_path || parsed.filePath || null;
42
- }
43
- } catch {
44
- return typeof input === 'string' ? input : null;
45
- }
46
- return null;
47
- }
48
-
49
33
  /**
50
34
  * Extract command from Bash tool input
51
35
  */
@@ -72,10 +56,11 @@ function isSentinelPath(filePath) {
72
56
  /**
73
57
  * Main guard logic
74
58
  */
75
- function guard(toolName, toolInput) {
59
+ function guard(ctx) {
60
+ const { toolName, toolInput } = ctx;
76
61
  // Write/Edit targeting sentinel files → block
77
62
  if (toolName === 'Write' || toolName === 'Edit') {
78
- const filePath = extractFilePath(toolName, toolInput);
63
+ const filePath = ctx.filePath;
79
64
  if (isSentinelPath(filePath)) {
80
65
  return {
81
66
  decision: 'block',
@@ -111,11 +96,11 @@ import { buildCliCtx, isDirectRun } from './lib/hook-context.js';
111
96
 
112
97
  /**
113
98
  * in-process 진입점 — 디스패처가 ctx를 전달해 직접 호출.
114
- * @param {{ toolName: string, toolInput: string }} ctx
99
+ * @param {{ toolName: string, toolInput: string, filePath: string }} ctx
115
100
  * @returns {Promise<number>} exit code (2 = deny 규약, 0 = allow)
116
101
  */
117
102
  export async function run(ctx) {
118
- const result = guard(ctx.toolName, ctx.toolInput);
103
+ const result = guard(ctx);
119
104
  if (result) {
120
105
  logHookDecision('sentinel-guard', ctx.toolName, 'block', result.reason);
121
106
  console.log(JSON.stringify(result));
@@ -89,7 +89,7 @@ async function main() {
89
89
  // 인덱스만 주입 (harness-review-2026-07-01 P1-5):
90
90
  // 이전에는 startSession 전체 요약(git log·테스트 상태·관찰·리플렉션·RAG
91
91
  // goals/constraints/decisions)을 매 세션 덤프했다. 이제는 1줄 인덱스만
92
- // 주입하고, 전체 컨텍스트 복원은 명시적 `/vibe.utils --continue` 전용.
92
+ // 주입하고, 전체 컨텍스트 복원은 명시적 `/vibe.continue` 전용.
93
93
  const [time, memories, latestVersion] = await Promise.all([
94
94
  timeModule.getCurrentTime({ format: 'human', timezone: 'Asia/Seoul' }),
95
95
  memoryModule.listMemories({ limit: 5, projectPath: PROJECT_DIR }),
@@ -104,7 +104,7 @@ async function main() {
104
104
  const iterMod = await import(`${LIB_BASE_P}IterationTracker.js`);
105
105
  const progressLine = iterMod.getProgressSummary(PROJECT_DIR);
106
106
  if (progressLine) {
107
- console.log(`\n📋 ${progressLine} — resume full context: /vibe.utils --continue`);
107
+ console.log(`\n📋 ${progressLine} — resume full context: /vibe.continue`);
108
108
  }
109
109
  } catch { /* progress index is best-effort */ }
110
110
 
@@ -25,6 +25,7 @@
25
25
  import fs from 'fs';
26
26
  import path from 'path';
27
27
  import { PROJECT_DIR, projectVibePath } from './utils.js';
28
+ import { buildCliCtx } from './lib/hook-context.js';
28
29
 
29
30
  const METRICS_DIR = projectVibePath(PROJECT_DIR, 'metrics');
30
31
  const ANTI_PATTERNS_DIR = projectVibePath(PROJECT_DIR, 'anti-patterns');
@@ -44,36 +45,14 @@ const READ_ONLY_TOOLS = new Set([
44
45
  'TodoWrite', 'ToolSearch', 'ListMcpResourcesTool',
45
46
  ]);
46
47
 
47
- // ─────────────────────────────────────────────────────
48
- // stdin / env 에서 PostToolUse payload 추출
49
- // ─────────────────────────────────────────────────────
50
- function readStdinSync() {
51
- try {
52
- if (process.stdin.isTTY) return null;
53
- const buf = Buffer.alloc(65536);
54
- const bytesRead = fs.readSync(0, buf, 0, buf.length, null);
55
- if (bytesRead > 0) return JSON.parse(buf.toString('utf-8', 0, bytesRead));
56
- } catch { /* ignore */ }
57
- return null;
58
- }
59
-
60
- function parseToolInput(raw) {
61
- if (!raw) return {};
62
- if (typeof raw === 'string') {
63
- try { return JSON.parse(raw); } catch { return {}; }
64
- }
65
- return raw;
66
- }
67
-
68
- function extractTargetFile(toolInput) {
69
- const fp = toolInput.file_path || toolInput.notebook_path || toolInput.path || null;
70
- if (!fp) return null;
48
+ function extractTargetFile(filePath) {
49
+ if (!filePath) return null;
71
50
  try {
72
- const abs = path.isAbsolute(fp) ? fp : path.resolve(PROJECT_DIR, fp);
51
+ const abs = path.isAbsolute(filePath) ? filePath : path.resolve(PROJECT_DIR, filePath);
73
52
  const rel = path.relative(path.resolve(PROJECT_DIR), abs).replace(/\\/g, '/');
74
- return rel || path.basename(fp);
53
+ return rel || path.basename(filePath);
75
54
  } catch {
76
- return fp;
55
+ return filePath;
77
56
  }
78
57
  }
79
58
 
@@ -180,19 +159,18 @@ function bumpCounter(toolName, currentLineCount) {
180
159
  // 책임 2: current-run.jsonl append + error_category 채움
181
160
  // 항상 즉시 append — 스로틀 없음 (3-fail detector, recipe-extractor 가 소비)
182
161
  // ─────────────────────────────────────────────────────
183
- function appendJsonl(stdinPayload) {
184
- const toolName = stdinPayload?.tool_name || process.argv[2] || '';
162
+ function appendJsonl(ctx) {
163
+ const toolName = ctx.toolName;
185
164
  if (!toolName) return null;
186
165
 
187
- const toolInput = parseToolInput(stdinPayload?.tool_input ?? process.env.TOOL_INPUT);
188
- const ok = !isResponseError(stdinPayload?.tool_response);
189
- const errorCategory = ok ? null : classifyError(stdinPayload?.tool_response);
166
+ const ok = !isResponseError(ctx.payload?.tool_response);
167
+ const errorCategory = ok ? null : classifyError(ctx.payload?.tool_response);
190
168
 
191
169
  const record = {
192
170
  ts: new Date().toISOString(),
193
171
  tool: toolName,
194
172
  ok,
195
- target_file: extractTargetFile(toolInput),
173
+ target_file: extractTargetFile(ctx.filePath),
196
174
  error_category: errorCategory,
197
175
  };
198
176
 
@@ -214,18 +192,27 @@ function appendJsonl(stdinPayload) {
214
192
  }
215
193
 
216
194
  /**
217
- * jsonl 현재 라인 수를 반환 (stat 으로만 전체 파일 읽기 없음).
218
- * 경합 안전 정확한 값이 아니어도 스로틀 판단에 충분하다.
195
+ * current-run.jsonl 1회만 읽어 (a) 스로틀 판단용 라인 수와
196
+ * (b) 3-fail detector 최근 FAIL_WINDOW 줄을 함께 파생한다.
197
+ *
198
+ * 이전에는 jsonlLineCount()·readTailWindow() 가 각자 파일 전체를 다시 읽어
199
+ * 실패 이벤트마다 이벤트당 최대 2회 풀리드가 발생했다 — 여기서 1회로 통합.
200
+ * 파일은 회전 상한(2MB / MAX_JSONL_LINES)을 벗어나지 않도록 유지되므로
201
+ * (appendJsonl의 회전 로직 참고) 이 read 로도 기존과 동일하게 정확한 라인 수를
202
+ * 얻는다 — 스로틀/3-fail 판정 결과는 회전 상한 이내 파일에서 이전과 동일하다.
203
+ * @returns {{ lineCount: number, tail: object[] }}
219
204
  */
220
- function jsonlLineCount() {
205
+ function readJsonlState() {
206
+ let lines;
221
207
  try {
222
- // 라인 근사: 파일 크기 / 평균 라인 길이(100바이트) — 정확도 불필요
223
- // 실제 라인 수는 appendJsonl 직후 여기서 읽으면 +1 반영됨
224
- const content = fs.readFileSync(CURRENT_RUN_JSONL, 'utf-8');
225
- return content.split('\n').filter(Boolean).length;
208
+ lines = fs.readFileSync(CURRENT_RUN_JSONL, 'utf-8').split('\n').filter(Boolean);
226
209
  } catch {
227
- return 1; // 파일 없음 → 첫 이벤트로 간주
210
+ return { lineCount: 1, tail: [] }; // 파일 없음 → 첫 이벤트로 간주
228
211
  }
212
+ const tail = lines.slice(-FAIL_WINDOW).map((l) => {
213
+ try { return JSON.parse(l); } catch { return null; }
214
+ }).filter(Boolean);
215
+ return { lineCount: lines.length, tail };
229
216
  }
230
217
 
231
218
  // ─────────────────────────────────────────────────────
@@ -248,16 +235,7 @@ function fileSlug(targetFile) {
248
235
  return targetFile.replace(/[\/\.]/g, '-');
249
236
  }
250
237
 
251
- function readTailWindow() {
252
- if (!fs.existsSync(CURRENT_RUN_JSONL)) return [];
253
- const raw = fs.readFileSync(CURRENT_RUN_JSONL, 'utf-8').split('\n').filter(Boolean);
254
- return raw.slice(-FAIL_WINDOW).map((l) => {
255
- try { return JSON.parse(l); } catch { return null; }
256
- }).filter(Boolean);
257
- }
258
-
259
- function detectThreeFail() {
260
- const window = readTailWindow();
238
+ function detectThreeFail(window) {
261
239
  const groups = new Map();
262
240
  for (const r of window) {
263
241
  if (r.ok || !r.error_category) continue;
@@ -318,8 +296,8 @@ try {
318
296
  fs.mkdirSync(METRICS_DIR, { recursive: true });
319
297
  }
320
298
 
321
- const stdinPayload = readStdinSync();
322
- const toolName = stdinPayload?.tool_name || process.argv[2] || '';
299
+ const ctx = buildCliCtx();
300
+ const toolName = ctx.toolName;
323
301
 
324
302
  // defense-in-depth: 읽기 전용 툴은 조기 종료 (matcher 단에서 이미 제거됨)
325
303
  if (toolName && READ_ONLY_TOOLS.has(toolName)) {
@@ -328,16 +306,16 @@ try {
328
306
 
329
307
  // 책임 2를 먼저 실행 — jsonl 라인 수가 bumpCounter 스로틀 판단에 쓰임
330
308
  let lastRecord = null;
331
- try { lastRecord = appendJsonl(stdinPayload); } catch { /* 로깅 실패 무시 */ }
309
+ try { lastRecord = appendJsonl(ctx); } catch { /* 로깅 실패 무시 */ }
332
310
 
333
- // 책임 1: jsonl append 후 라인 수로 스로틀 판단
334
- const lineCount = jsonlLineCount();
311
+ // 책임 1: jsonl append 후 라인 수로 스로틀 판단 (책임 3의 tail window 와 1회 읽기 공유)
312
+ const { lineCount, tail } = readJsonlState();
335
313
  try { bumpCounter(toolName, lineCount); } catch { /* 카운터 실패 무시 */ }
336
314
 
337
315
  // 책임 3
338
316
  try {
339
317
  if (lastRecord && !lastRecord.ok && lastRecord.error_category) {
340
- const trip = detectThreeFail();
318
+ const trip = detectThreeFail(tail);
341
319
  if (trip) writeAntiPattern(trip);
342
320
  }
343
321
  } catch { /* anti-pattern 작성 실패 무시 */ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@su-record/vibe",
3
- "version": "3.0.0",
4
- "description": "AI Coding Framework for Claude Code — 10+ agents, 59 skills, multi-LLM orchestration",
3
+ "version": "3.2.0",
4
+ "description": "AI Coding Framework for Claude Code — 7+ agents, 60 skills, multi-LLM orchestration",
5
5
  "type": "module",
6
6
  "main": "dist/cli/index.js",
7
7
  "exports": {
@@ -33,7 +33,7 @@
33
33
  "test:watch": "vitest",
34
34
  "prepublishOnly": "pnpm build",
35
35
  "postinstall": "node -e \"import('./dist/cli/postinstall/main.js').then(m=>m.main()).catch(()=>{})\"",
36
- "release": "pnpm version patch && npm publish --access public"
36
+ "release": "pnpm version patch && git push origin main --follow-tags"
37
37
  },
38
38
  "keywords": [
39
39
  "ai",
@@ -58,6 +58,9 @@
58
58
  "type": "git",
59
59
  "url": "git+https://github.com/su-record/vibe.git"
60
60
  },
61
+ "bugs": {
62
+ "url": "https://github.com/su-record/vibe/issues"
63
+ },
61
64
  "homepage": "https://github.com/su-record/vibe#readme",
62
65
  "publishConfig": {
63
66
  "access": "public"
@@ -91,7 +94,6 @@
91
94
  "dist/",
92
95
  "vibe/",
93
96
  "languages/",
94
- "commands/",
95
97
  "agents/",
96
98
  "skills/",
97
99
  "hooks/",
@@ -24,8 +24,14 @@ The rendered DOM is the source of truth for markup. Screenshots are for pixel ve
24
24
 
25
25
  ```
26
26
  1. Do NOT generate CSS values by guessing or eyeballing screenshots.
27
- Use clone-extract.js computed CSS output as-is.
28
- Do NOT write CSS values directly inside scoped <style> blocks.
27
+ ✅ clone-to-scss.js output is a DRAFT (skeleton), not a frozen artifact. You MAY
28
+ rewrite SCSS values/selectors but ONLY with evidence cited from computed.json /
29
+ states.json / behaviors.json (value correction, dedupe, selector restructuring).
30
+ ✅ clone-validate.js PASS is the sole judge of value correctness — not self-report.
31
+ ❌ Do NOT invent values with no extraction evidence ("looks like 18px" is forbidden).
32
+ ❌ Do NOT write CSS values directly inside scoped <style> blocks — style LOCATION
33
+ rule: all values live in styles/{feature}/ SCSS (value authority and style
34
+ location are separate rules; both hold).
29
35
 
30
36
  2. Do NOT hotlink remote assets. All images/fonts must be downloaded and rewritten.
31
37
 
@@ -34,6 +40,9 @@ The rendered DOM is the source of truth for markup. Screenshots are for pixel ve
34
40
  4. Do NOT copy textual content verbatim from copyrighted sources for production use.
35
41
  This skill is for layout/markup learning ("클론 코딩"). Replace text with placeholders
36
42
  or user-provided copy when shipping a real product.
43
+ Exception: `--real-content` — the user confirms (once, explicitly) they own the site
44
+ or have permission. Then keep text verbatim; clone-spec.js is invoked with
45
+ `--real-content` so specs mark copy as verbatim.
37
46
 
38
47
  5. Do NOT build a section without confirming its interaction model. The model in
39
48
  sections.json is a static-DOM heuristic — verify scroll-driven vs click-driven vs
@@ -42,10 +51,11 @@ The rendered DOM is the source of truth for markup. Screenshots are for pixel ve
42
51
  6. Do NOT ship default-state-only. Implement every harvested state (hover/focus/active/open/
43
52
  tab-switch) from states.json / the section spec.
44
53
 
45
- 7. Do NOT ignore behaviors.json. The ACTIVE interaction sweep (scroll-state diffs +
46
- click-driven tab content-swap detection) catches JS-set state that static CSS harvesting
47
- is blind to. When the spec's "Dynamic behaviors" block conflicts with the static
48
- interaction heuristic, the active capture wins.
54
+ 7. Do NOT ignore behaviors.json. The ACTIVE interaction sweep (scroll-state diffs,
55
+ click-driven tab content-swap detection, hover diffs, in-view entrance animations,
56
+ time-driven mutation candidates, smooth-scroll-lib detection) catches JS-set state
57
+ that static CSS harvesting is blind to. When the spec's "Dynamic behaviors" block
58
+ conflicts with the static interaction heuristic, the active capture wins.
49
59
  ```
50
60
 
51
61
  ## Full Flow
@@ -56,37 +66,20 @@ Input: a URL (or multiple URLs for multi-page clones)
56
66
  → Phase 0: Setup (stack detection, feature naming, working dir)
57
67
  → Phase 1: Capture (Puppeteer → rendered HTML + computed CSS + screenshots + assets)
58
68
  → Phase 2: Refine (DOM → sections.json per breakpoint; + interaction model + states)
59
- → Phase 3: Scaffold (spec gate SCSS auto-gen + Claude-authored HTML/components)
69
+ → Phase 2.5: Foundation (fonts / favicon / OG / SVG icons — sequential, before any section)
70
+ → Phase 3: Scaffold (spec gate → SCSS draft + builder dispatch, parallel per section)
71
+ → Phase 3C: Responsive merge (clone-merge-responsive.js — mobile-first @media)
60
72
  → Phase 4: Compile gate
61
- → Phase 5: Pixel verification loop
62
-
63
- Working directory:
64
- /tmp/{feature}/
65
- ├── mo/ (375×812) — rendered.html, computed.json, screenshot.png, assets/, sections.json
66
- ├── pc/ (1440×900) — rendered.html, computed.json, screenshot.png, assets/, sections.json
67
- └── tokens.json — extracted design tokens (colors/fonts/spacing)
68
-
69
- Code output: placed directly in the project directory per detected stack
70
- components/{feature}/, components/{feature}/_specs/, styles/{feature}/, public/images/{feature}/
73
+ → Phase 5: Pixel verification loop (BOTH viewports after merge)
71
74
  ```
72
75
 
76
+ > Read `references/setup-and-layout.md` for the working-directory layout and code-output paths.
77
+
73
78
  ---
74
79
 
75
80
  ## Phase 0: Setup
76
81
 
77
- ```
78
- 1. Stack detection:
79
- - .vibe/config.json → stack (react/vue/next/svelte/vanilla, scss/tailwind/css-modules)
80
- - Fallback: package.json deps
81
- 2. Feature name: URL hostname → kebab-case (e.g. stripe.com → stripe-clone)
82
- - User may override with --name=<custom>
83
- 3. Directories:
84
- - components/{feature}/, styles/{feature}/, public/images/{feature}/
85
- 4. Component indexing → /tmp/{feature}/component-index.json
86
- (scan up to 50 existing components, extract props/slots/classes, within 2 minutes)
87
- 5. Design token scan → /tmp/{feature}/project-tokens.json
88
- (SCSS > CSS Variables > Tailwind > CSS-in-JS)
89
- ```
82
+ > Read `references/setup-and-layout.md` for the full Phase 0 setup steps (stack detection, feature naming, directories, component indexing, design token scan).
90
83
 
91
84
  ---
92
85
 
@@ -116,41 +109,7 @@ node {{VIBE_PATH}}/hooks/scripts/clone-extract.js capture <URL> \
116
109
  ⛔ **Do NOT use WebFetch or curl** — they cannot render JS-driven SPAs.
117
110
  ✅ Use clone-extract.js. If output is unsatisfactory, modify the script.
118
111
 
119
- ### Output per breakpoint
120
-
121
- ```
122
- /tmp/{feature}/{bp}/
123
- ├── rendered.html — final DOM after JS execution
124
- ├── computed.json — per-element computed CSS + bounding box
125
- ├── screenshot.png — full-page screenshot
126
- ├── states.json — non-default state rules (hover/focus/active/checked/tab/aria/data-state)
127
- ├── behaviors.json — ACTIVE sweep: scroll-triggered header/nav diffs + click-driven tab groups
128
- ├── assets/
129
- │ ├── images/ — all <img>, background-image, <picture> sources
130
- │ └── fonts/ — @font-face srcs
131
- └── asset-map.json — remote URL → local path mapping
132
- ```
133
-
134
- ### Capture rules
135
-
136
- ```
137
- 1. Wait for `networkidle2` (no in-flight requests for 500ms) before snapshot
138
- 2. Scroll to bottom slowly to trigger lazy-loaded content
139
- 3. Resolve all <img src>, srcset, and computed background-image URLs
140
- 4. Resolve @font-face src() URLs from all stylesheets
141
- 5. Download assets in parallel (concurrency=8), preserve original extensions
142
- 6. Rewrite asset URLs in rendered.html and computed.json to local paths
143
- 7. Strip inline analytics/tracking scripts before saving rendered.html
144
- 8. Harvest non-default state rules from all stylesheets → states.json
145
- (deterministic: read :hover/:focus/:active/:checked/[aria-*]/[data-state]/.is-*/.active/
146
- .scrolled/.sticky/.pinned/… declarations straight from CSS — NO scripted clicking)
147
- 9. ACTIVE interaction sweep → behaviors.json (runs after lazy-load, before freeze).
148
- Drives the live page to capture JS-set state that CSS harvesting can't see:
149
- - Scroll-state diff: tag sticky/fixed/top-bar headers+nav, snapshot computed CSS at
150
- scroll 0, scroll past threshold, re-snapshot, diff → {prop: {from, to}, triggerScrollY}
151
- - Tab groups: click tab-like sibling sets, detect whether content swaps on click
152
- Disable with --no-interact (restores the old fully-deterministic, screenshot-stable capture).
153
- ```
112
+ > Read `references/capture-rules.md` for the full per-breakpoint output directory listing and the deterministic capture rule set (networkidle wait, asset resolution, states/behaviors harvesting, SEO asset harvest).
154
113
 
155
114
  ---
156
115
 
@@ -180,62 +139,26 @@ node {{VIBE_PATH}}/hooks/scripts/clone-refine.js \
180
139
  ⛔ **Do NOT parse rendered.html with custom Python/Node scripts.**
181
140
  ✅ Use clone-refine.js output as-is. If unsatisfactory, modify the script.
182
141
 
183
- ### Refinement rules
142
+ > Read `references/refine-rules.md` for the full refinement rule set and the sections.json output schema.
184
143
 
185
- ```
186
- Refinement applied when converting rendered.html + computed.json → sections.json:
187
- 1. Strip <script>, <noscript>, <style>, tracking pixels
188
- 2. Strip nodes with display:none, visibility:hidden, opacity:0, size 0
189
- 3. Detect sections: <header>, <nav>, top-level <section>/<main> children, <footer>
190
- Fallback: top-level children of <body> with height > 100px
191
- 4. Detect repeated patterns (sibling nodes with same tag+class signature, count >= 3)
192
- → mark as component candidates
193
- 5. Extract design tokens:
194
- - colors: unique color/background-color values, sorted by frequency
195
- - typography: font-family/size/weight combinations
196
- - spacing: padding/margin values (px), bucketed to nearest 4px
197
- 6. Background images (background-image: url) → images.bg
198
- 7. Inline <img> → images.content
199
- 8. Keep CSS subset: layout (display/flex/grid/position/inset/margin/padding/width/height/gap),
200
- typography (font-*, line-height, letter-spacing, text-*, color),
201
- decoration (background, border, border-radius, box-shadow, opacity),
202
- transform/transition
203
- 9. Classify interaction model per section (static-DOM heuristic) → section.interaction
204
- = { model, confidence, signals[], note }. model ∈ static | click-driven | scroll-driven
205
- | time-driven | hover. This is a best-guess + ranked SIGNALS, NOT a silent decision —
206
- the builder confirms it against the live site (Phase 5). Misidentifying the interaction
207
- model is the #1 clone failure mode (scroll-driven original built as a click UI, etc.).
208
- 10. Attach matching state rules from states.json to each section → section.states
209
- (rules whose selector references a class/leaf-tag inside that section's subtree)
210
- ```
144
+ ---
211
145
 
212
- ### Output
146
+ ## Phase 2.5: Foundation ← sequential, BEFORE any section build
147
+
148
+ Nothing renders right until the foundation exists. Do this yourself (not delegated) — it
149
+ touches shared files:
213
150
 
214
151
  ```
215
- /tmp/{feature}/{bp}/sections.json:
216
- {
217
- meta: { feature, url, viewport, bp },
218
- tokens: { colors: [...], typography: [...], spacing: [...] },
219
- sections: [
220
- {
221
- name: "Header" | "Hero" | "Features" | ...,
222
- nodeRef, tag, size, css,
223
- interaction: { // static-DOM heuristic — builder confirms in Phase 5
224
- model: "static" | "click-driven" | "scroll-driven" | "time-driven" | "hover",
225
- confidence: "high" | "medium" | "low",
226
- signals: [...], // ranked evidence (sticky, infinite animation, role=tab, …)
227
- note
228
- },
229
- text, // text content (placeholder candidates)
230
- components: [...], // detected repeated patterns
231
- states: [ // non-default state rules scoped to this section
232
- { selector, media, css }
233
- ],
234
- children: [...], // full recursive subtree
235
- images: { bg, content: [...] }
236
- }
237
- ]
238
- }
152
+ 1. Fonts: verify _base.scss @font-face srcs point at downloaded assets/fonts/ files.
153
+ Next.js stack → wire via next/font/local in the layout instead of raw @font-face.
154
+ 2. Favicon / OG / manifest: copy assets/seo/* public/ (project convention path),
155
+ wire metadata (layout.tsx metadata / <head>) to the local files.
156
+ 3. SVG icons: collect inline <svg> from rendered.html, dedupe by path data,
157
+ emit one stack-appropriate icon module (e.g. components/{feature}/icons.tsx).
158
+ Name by visual function (SearchIcon, ArrowRightIcon, LogoIcon).
159
+ 4. Global behaviors from behaviors.json: scrollLib detected → install/wire page-level
160
+ (Lenis etc.); global keyframes/scroll-snap styles/{feature}/_shared.scss.
161
+ 5. Verify: compile passes before moving on.
239
162
  ```
240
163
 
241
164
  ---
@@ -251,81 +174,57 @@ Refinement applied when converting rendered.html + computed.json → sections.js
251
174
  # Step 0: Generate per-section build-contract specs (run once per BP)
252
175
  node {{VIBE_PATH}}/hooks/scripts/clone-spec.js \
253
176
  /tmp/{feature}/{bp}/sections.json \
254
- --out=/path/to/project/components/{feature}/_specs/ \
255
- --feature={feature}
177
+ --out=/path/to/project/components/{feature}/_specs/{bp}/ \
178
+ --feature={feature} [--real-content]
256
179
 
257
- # Step A: Auto-generate SCSS skeleton (run once per BP)
180
+ # Step A: Auto-generate SCSS draft (run once per BP — note the per-BP out dir)
258
181
  node {{VIBE_PATH}}/hooks/scripts/clone-to-scss.js \
259
182
  /tmp/{feature}/{bp}/sections.json \
260
- --out=/path/to/project/styles/{feature}/ \
183
+ --out=/path/to/project/styles/{feature}/{bp}/ \
261
184
  --token-file=/tmp/{feature}/project-tokens.json
262
185
 
263
186
  # Step B: Per-section validation (after writing each section's component code)
264
187
  node {{VIBE_PATH}}/hooks/scripts/clone-validate.js \
265
- /path/to/project/styles/{feature}/ \
188
+ /path/to/project/styles/{feature}/{bp}/ \
266
189
  /tmp/{feature}/{bp}/sections.json \
267
190
  --section={SectionName}
268
191
  ```
269
192
 
270
193
  ⛔ **No section is built without a completed spec.** Step 0 emits `_specs/{Section}.spec.md`
271
- (interaction model + **active-capture Dynamic behaviors** + states + computed CSS + assets +
272
- text + checklist). clone-spec.js auto-loads `behaviors.json` from the sections.json dir and
273
- attaches matching scroll/tab behaviors per section. Before writing a
274
- section's component, Claude reviews its spec and resolves every `TODO` (confirm interaction
275
- model, list states to implement, choose tags, replace copyrighted text). The spec is the
276
- contract AND the audit trail it forces extraction rigor before any code is written.
277
- **Writing SCSS files directly without calling clone-to-scss.js invalidates Phase 3.**
194
+ (interaction model + **active-capture Dynamic behaviors** (scroll/tab/hover/in-view/
195
+ time-driven/scroll-lib) + states + computed CSS + assets + text + checklist).
196
+ clone-spec.js auto-loads `behaviors.json` from the sections.json dir and attaches matching
197
+ behaviors per section. Before dispatching a section's builder, Claude reviews its spec and
198
+ resolves every `TODO` (confirm interaction model, list states to implement, choose tags,
199
+ replace copyrighted text skipped with --real-content). The spec is the contract AND the
200
+ audit trail it forces extraction rigor before any code is written.
201
+ ⛔ **clone-to-scss.js must run first (Step A) — its output is the DRAFT every section starts
202
+ from.** After that, SCSS edits are allowed per Immutable Rule 1 (evidence-cited only);
203
+ clone-validate.js PASS is the judge.
278
204
  ⛔ **Do NOT write custom SCSS / spec generation scripts.**
279
- ⛔ **Do NOT proceed to the next section without a clone-validate.js PASS.**
280
- ✅ Use clone-spec.js / clone-to-scss.js output as-is. If unsatisfactory, modify the script.
205
+ ⛔ **Do NOT proceed past a section without a clone-validate.js PASS for it.**
281
206
 
282
- ```
283
- Phase 3A: MO Scaffold
207
+ Phase 3A: MO Scaffold — parallel builder dispatch
284
208
  Input: /tmp/{feature}/mo/sections.json
285
- Step 0 once: clone-spec.js → emit _specs/{Section}.spec.md for every section
286
- ⛔ No parallelism. Process one section at a time:
287
- 1. Read the target section's spec → resolve every TODO:
288
- ├─ Confirm the interaction model (spec.interaction is a heuristic guess)
289
- ├─ List the states to implement (spec.states)
290
- └─ Mark copyrighted text for placeholder replacement
291
- 2. Map component candidates against component-index.json
292
- ├─ Match → import existing
293
- └─ No match → create new in components/{feature}/
294
- 3. clone-to-scss.js → auto-generate SCSS skeleton (computed values as-is) — Step A once
295
- 4. Claude: HTML structure + semantic tags + framework-specific component file
296
- ⛔ No CSS written directly in <style> blocks — only @import/@use allowed
297
- ⛔ Build for the CONFIRMED interaction model (don't build a click UI for a
298
- scroll-driven original); wire every state from the spec (hover/active/open/…)
299
- Framework mapping:
300
- - React/Next → .tsx with CSS Modules or styled-components per stack
301
- - Vue/Nuxt → .vue with scoped <style lang="scss"> @import only
302
- - Svelte → .svelte with <style> @import only
303
- - Vanilla → .html + linked .scss
304
- 5. Asset references → public/images/{feature}/ (already populated in Phase 1)
305
- 6. clone-validate.js → compare SCSS vs sections.json — Step B
306
- ├─ PASS → next section
307
- └─ FAIL → fix discrepancies → re-run step 6 (loop until P1=0, no round cap)
308
209
  → Phase 4 (MO compile) → Phase 5 (MO pixel verification)
309
210
 
310
211
  Phase 3B: PC Scaffold
311
- Same process as MO, input /tmp/{feature}/pc/sections.json
212
+ Same process as MO, input /tmp/{feature}/pc/sections.json → styles/{feature}/pc/
312
213
  → Phase 4 (PC compile) → Phase 5 (PC pixel verification)
313
214
 
314
- Phase 3C: Responsive Integration (after both MO+PC pass verification)
315
- Merge MO+PC styles into @media-based responsive layout (separate flow, TODO)
316
-
317
- Claude's role (restricted):
318
- Component candidates: decide which patterns become reusable components
319
- ✅ HTML semantics: section/h1/p/button/nav tag selection
320
- Text replacement: substitute copyrighted copy with placeholders or user-supplied text
321
- Interaction model: confirm the spec's heuristic guess, then build for the real model
322
- Interactions: implement every state in the spec (hover/focus/active/open), click handlers
323
- ❌ Do NOT modify SCSS CSS values (use clone-to-scss.js output as-is)
324
- ❌ Do NOT write CSS directly in <style> blocks
325
- ❌ Do NOT use vw/clamp/@media or create custom mixins in Phase 3A/3B
326
- ❌ Do NOT hotlink remote URLs — all assets must use local public/images/ paths
215
+ Phase 3C: Responsive Integration (after both MO+PC pass Phase 5)
216
+ 1. node {{VIBE_PATH}}/hooks/scripts/clone-merge-responsive.js \
217
+ --mo=/path/to/project/styles/{feature}/mo/ \
218
+ --pc=/path/to/project/styles/{feature}/pc/ \
219
+ --out=/path/to/project/styles/{feature}/ \
220
+ [--breakpoint=1024]
221
+ mobile-first merge: MO declarations = base, PC diffs → @media (min-width) block
222
+ Phase 4 (compile) Phase 5 at BOTH viewports against each BP's screenshot.
223
+ The clone is NOT complete until the MERGED build passes Phase 5 at both.
327
224
  ```
328
225
 
226
+ > Read `references/scaffold-phases.md` for the full Phase 3A prep/dispatch/merge builder contract (framework mapping, 150-line split rule, clone-validate.js PASS/FAIL loop detail), Phase 3C steps 2–3 (import switch, pc-only/mo-only selector review), and Claude's role checklist.
227
+
329
228
  ---
330
229
 
331
230
  ## Phase 4: Compile Gate
@@ -382,6 +281,9 @@ Termination:
382
281
  ultrawork mode: on stuck, record TODO without prompting and complete
383
282
 
384
283
  Responsive: after MO verification → change viewport → repeat against PC screenshot
284
+ Post-merge (Phase 3C): re-run at BOTH viewports (375×812 vs mo/screenshot.png,
285
+ 1440×900 vs pc/screenshot.png) — either failing means the merge regressed; fix the
286
+ merged SCSS (evidence: the per-BP sections.json), never by re-guessing values
385
287
  Cleanup: shut down browser + dev server
386
288
 
387
289
  ⛔ "Completion summary" output only allowed after Phase 5 completes.
@@ -389,37 +291,6 @@ Cleanup: shut down browser + dev server
389
291
 
390
292
  ---
391
293
 
392
- ## Legal & Ethical Notes
393
-
394
- ```
395
- This skill is intended for:
396
- ✅ "Clone coding" learning exercises (markup/layout study)
397
- ✅ Rebuilding the user's own previously-deployed sites
398
- ✅ Authorized redesigns where the user has rights to the source
399
-
400
- NOT intended for:
401
- ❌ Republishing copyrighted content (text, images, logos) without permission
402
- ❌ Deceptive look-alike sites (phishing, brand impersonation)
403
- ❌ Bypassing robots.txt or rate-limiting protections
404
-
405
- Claude must:
406
- - Replace copyrighted text content with placeholders (e.g. "[Lorem ipsum]") by default
407
- - Skip and warn when robots.txt disallows fetching the target path
408
- - Refuse if the user's stated intent is brand impersonation or deception
409
- ```
410
-
411
- ---
294
+ ## Legal, Ethical & Error Recovery Reference
412
295
 
413
- ## Error Recovery
414
-
415
- | Failure | Recovery |
416
- |---------|----------|
417
- | clone-extract.js Puppeteer launch failure | Verify Node ≥18 and that Chromium is installed (`npx puppeteer browsers install chrome`). Retry once. |
418
- | Target site blocks headless (403/Cloudflare) | Retry with `--stealth` flag (uses puppeteer-extra stealth plugin). If still blocked, report to user. |
419
- | Asset download 404 | Log to asset-map.json with `status: missing`. Use a 1×1 transparent placeholder. Continue. |
420
- | robots.txt disallows path | Halt Phase 1. Inform user; require explicit `--ignore-robots` flag to proceed. |
421
- | clone-refine.js produces empty sections | Site likely uses Shadow DOM or canvas rendering. Report and ask whether to fall back to screenshot-only mode. |
422
- | Pixel diff stuck > 0.05 after 5 rounds | Likely font fallback or anti-aliasing. Report metric, allow user to accept threshold. |
423
- | Interaction model guess wrong (Phase 5) | section.interaction is a static-DOM heuristic. Re-observe the live site, correct the model in the spec, rebuild the section for the confirmed model. |
424
- | states.json empty but site has hover/tabs | States may be set via inline JS, not CSS rules. Check behaviors.json (active sweep captures scroll/tab JS state). If still missing, note in the spec and capture manually during Phase 5. |
425
- | behaviors.json missing or empty | Active sweep was disabled (--no-interact), hit no sticky/tab elements, or errored (logged, non-fatal). Falls back to static states.json. Re-run without --no-interact to retry. |
296
+ > Read `references/legal-and-error-recovery.md` for the full legal/ethical usage notes (intended use, prohibited use, --real-content flow) and the Error Recovery troubleshooting table.