@su-record/vibe 3.2.1 → 3.2.2

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 (229) hide show
  1. package/CLAUDE.md +1 -1
  2. package/README.en.md +4 -4
  3. package/README.md +4 -4
  4. package/dist/__tests__/skill-namespace.test.d.ts +2 -0
  5. package/dist/__tests__/skill-namespace.test.d.ts.map +1 -0
  6. package/dist/__tests__/skill-namespace.test.js +60 -0
  7. package/dist/__tests__/skill-namespace.test.js.map +1 -0
  8. package/dist/__tests__/wiring-integrity.test.js +5 -5
  9. package/dist/__tests__/wiring-integrity.test.js.map +1 -1
  10. package/dist/cli/generate-release-notes.d.ts +3 -0
  11. package/dist/cli/generate-release-notes.d.ts.map +1 -0
  12. package/dist/cli/generate-release-notes.js +47 -0
  13. package/dist/cli/generate-release-notes.js.map +1 -0
  14. package/dist/cli/postinstall/constants.d.ts +6 -6
  15. package/dist/cli/postinstall/constants.d.ts.map +1 -1
  16. package/dist/cli/postinstall/constants.js +114 -46
  17. package/dist/cli/postinstall/constants.js.map +1 -1
  18. package/dist/cli/postinstall/fs-utils.d.ts +1 -0
  19. package/dist/cli/postinstall/fs-utils.d.ts.map +1 -1
  20. package/dist/cli/postinstall/fs-utils.js +25 -0
  21. package/dist/cli/postinstall/fs-utils.js.map +1 -1
  22. package/dist/cli/postinstall/fs-utils.test.js +46 -11
  23. package/dist/cli/postinstall/fs-utils.test.js.map +1 -1
  24. package/dist/cli/postinstall/main.d.ts.map +1 -1
  25. package/dist/cli/postinstall/main.js +3 -2
  26. package/dist/cli/postinstall/main.js.map +1 -1
  27. package/dist/tests/curated-release-notes.test.d.ts +2 -0
  28. package/dist/tests/curated-release-notes.test.d.ts.map +1 -0
  29. package/dist/tests/curated-release-notes.test.js +106 -0
  30. package/dist/tests/curated-release-notes.test.js.map +1 -0
  31. package/dist/tools/release/releaseNotes.d.ts +21 -0
  32. package/dist/tools/release/releaseNotes.d.ts.map +1 -0
  33. package/dist/tools/release/releaseNotes.js +105 -0
  34. package/dist/tools/release/releaseNotes.js.map +1 -0
  35. package/hooks/scripts/__tests__/.vibe/command-log.txt +3 -3
  36. package/package.json +2 -2
  37. package/skills/{agents-md → vibe.agents-md}/SKILL.md +1 -1
  38. package/skills/{brand-assets → vibe.brand-assets}/SKILL.md +1 -1
  39. package/skills/{capability-loop → vibe.capability-loop}/SKILL.md +1 -1
  40. package/skills/{chub-usage → vibe.chub-usage}/SKILL.md +1 -1
  41. package/skills/vibe.clone/SKILL.md +295 -3
  42. package/skills/{commerce-patterns → vibe.commerce-patterns}/SKILL.md +1 -1
  43. package/skills/{commit-push-pr → vibe.commit-push-pr}/SKILL.md +2 -2
  44. package/skills/{context7-usage → vibe.context7-usage}/SKILL.md +1 -1
  45. package/skills/vibe.contract/SKILL.md +162 -1
  46. package/skills/{create-prd → vibe.create-prd}/SKILL.md +2 -2
  47. package/skills/{design-refine → vibe.design-refine}/SKILL.md +1 -1
  48. package/skills/{design-review → vibe.design-review}/SKILL.md +1 -1
  49. package/skills/{design-teach → vibe.design-teach}/SKILL.md +1 -1
  50. package/skills/{devlog → vibe.devlog}/SKILL.md +1 -1
  51. package/skills/vibe.docs/SKILL.md +256 -1
  52. package/skills/{e2e-commerce → vibe.e2e-commerce}/SKILL.md +1 -1
  53. package/skills/vibe.educational-content/SKILL.md +157 -0
  54. package/skills/vibe.educational-content/references/learning-design.md +81 -0
  55. package/skills/vibe.educational-content/references/output-patterns.md +109 -0
  56. package/skills/vibe.educational-content/references/source-method.md +40 -0
  57. package/skills/{event-comms → vibe.event-comms}/SKILL.md +1 -1
  58. package/skills/{event-ops → vibe.event-ops}/SKILL.md +1 -1
  59. package/skills/{event-planning → vibe.event-planning}/SKILL.md +1 -1
  60. package/skills/vibe.figma/SKILL.md +473 -21
  61. package/skills/vibe.figma/references/branch-phases.md +1 -1
  62. package/skills/{git-worktree → vibe.git-worktree}/SKILL.md +1 -1
  63. package/skills/{handoff → vibe.handoff}/SKILL.md +1 -1
  64. package/skills/{parallel-research → vibe.parallel-research}/SKILL.md +2 -2
  65. package/skills/{presentation → vibe.presentation}/SKILL.md +1 -1
  66. package/skills/{prioritization-frameworks → vibe.prioritization}/SKILL.md +2 -2
  67. package/skills/{priority-todos → vibe.priority-todos}/SKILL.md +1 -1
  68. package/skills/{vercel-react-best-practices → vibe.react-best-practices}/SKILL.md +1 -1
  69. package/skills/vibe.regress/SKILL.md +182 -2
  70. package/skills/vibe.run/SKILL.md +388 -1
  71. package/skills/{arch-guard → vibe.run/internal/arch-guard}/templates/violation-report.md +1 -1
  72. package/skills/{seo-checklist → vibe.seo-checklist}/SKILL.md +1 -1
  73. package/skills/vibe.spec/SKILL.md +122 -1
  74. package/skills/vibe.test/SKILL.md +138 -2
  75. package/skills/{tool-fallback → vibe.tool-fallback}/SKILL.md +1 -1
  76. package/skills/{ui-ux-pro-max → vibe.ui-ux-pro-max}/SKILL.md +6 -6
  77. package/skills/{user-personas → vibe.user-personas}/SKILL.md +2 -2
  78. package/skills/vibe.verify/SKILL.md +2 -2
  79. package/skills/{video-production → vibe.video-production}/SKILL.md +1 -1
  80. package/skills/arch-guard/SKILL.md +0 -183
  81. package/skills/clone/SKILL.md +0 -296
  82. package/skills/contract/SKILL.md +0 -165
  83. package/skills/docs/SKILL.md +0 -259
  84. package/skills/exec-plan/SKILL.md +0 -151
  85. package/skills/figma/SKILL.md +0 -456
  86. package/skills/regress/SKILL.md +0 -184
  87. package/skills/restraint/SKILL.md +0 -72
  88. package/skills/spec/SKILL.md +0 -125
  89. package/skills/test/SKILL.md +0 -140
  90. /package/skills/{agents-md → vibe.agents-md}/rubrics/what-to-keep.md +0 -0
  91. /package/skills/{agents-md → vibe.agents-md}/templates/agents-md.md +0 -0
  92. /package/skills/{agents-md → vibe.agents-md}/templates/claude-md.md +0 -0
  93. /package/skills/{brand-assets → vibe.brand-assets}/rubrics/asset-checklist.md +0 -0
  94. /package/skills/{brand-assets → vibe.brand-assets}/templates/brand-guide.md +0 -0
  95. /package/skills/{capability-loop → vibe.capability-loop}/agents/capability-designer.md +0 -0
  96. /package/skills/{capability-loop → vibe.capability-loop}/agents/failure-analyst.md +0 -0
  97. /package/skills/{capability-loop → vibe.capability-loop}/agents/implementer.md +0 -0
  98. /package/skills/{capability-loop → vibe.capability-loop}/agents/tester.md +0 -0
  99. /package/skills/{capability-loop → vibe.capability-loop}/templates/capability-spec.md +0 -0
  100. /package/skills/{capability-loop → vibe.capability-loop}/templates/failure-analysis.md +0 -0
  101. /package/skills/{clone → vibe.clone}/references/capture-rules.md +0 -0
  102. /package/skills/{clone → vibe.clone}/references/legal-and-error-recovery.md +0 -0
  103. /package/skills/{clone → vibe.clone}/references/refine-rules.md +0 -0
  104. /package/skills/{clone → vibe.clone}/references/scaffold-phases.md +0 -0
  105. /package/skills/{clone → vibe.clone}/references/setup-and-layout.md +0 -0
  106. /package/skills/{commerce-patterns → vibe.commerce-patterns}/rubrics/checkout-flow.md +0 -0
  107. /package/skills/{commerce-patterns → vibe.commerce-patterns}/templates/product-schema.md +0 -0
  108. /package/skills/{commit-push-pr → vibe.commit-push-pr}/agents/change-analyzer.md +0 -0
  109. /package/skills/{commit-push-pr → vibe.commit-push-pr}/agents/message-writer.md +0 -0
  110. /package/skills/{commit-push-pr → vibe.commit-push-pr}/agents/pr-writer.md +0 -0
  111. /package/skills/{commit-push-pr → vibe.commit-push-pr}/agents/reviewer.md +0 -0
  112. /package/skills/{commit-push-pr → vibe.commit-push-pr}/rubrics/commit-message.md +0 -0
  113. /package/skills/{commit-push-pr → vibe.commit-push-pr}/templates/pr-body.md +0 -0
  114. /package/skills/{context7-usage → vibe.context7-usage}/rubrics/when-to-use.md +0 -0
  115. /package/skills/{create-prd → vibe.create-prd}/agents/edge-case-finder.md +0 -0
  116. /package/skills/{create-prd → vibe.create-prd}/agents/prioritizer.md +0 -0
  117. /package/skills/{create-prd → vibe.create-prd}/agents/requirements-writer.md +0 -0
  118. /package/skills/{create-prd → vibe.create-prd}/agents/researcher.md +0 -0
  119. /package/skills/{create-prd → vibe.create-prd}/agents/reviewer.md +0 -0
  120. /package/skills/{create-prd → vibe.create-prd}/frameworks/jobs-to-be-done.md +0 -0
  121. /package/skills/{create-prd → vibe.create-prd}/frameworks/rice-scoring.md +0 -0
  122. /package/skills/{create-prd → vibe.create-prd}/orchestrator.md +0 -0
  123. /package/skills/{create-prd → vibe.create-prd}/rubrics/completeness.md +0 -0
  124. /package/skills/{create-prd → vibe.create-prd}/templates/prd.md +0 -0
  125. /package/skills/{design-refine → vibe.design-refine}/rubrics/polish-checklist.md +0 -0
  126. /package/skills/{design-refine → vibe.design-refine}/rubrics/token-naming.md +0 -0
  127. /package/skills/{design-refine → vibe.design-refine}/templates/design-system.md +0 -0
  128. /package/skills/{design-refine → vibe.design-refine}/templates/polish-report.md +0 -0
  129. /package/skills/{design-refine → vibe.design-refine}/templates/token-audit.md +0 -0
  130. /package/skills/{design-review → vibe.design-review}/agents/a11y-auditor.md +0 -0
  131. /package/skills/{design-review → vibe.design-review}/agents/performance-auditor.md +0 -0
  132. /package/skills/{design-review → vibe.design-review}/agents/responsive-auditor.md +0 -0
  133. /package/skills/{design-review → vibe.design-review}/agents/scorer.md +0 -0
  134. /package/skills/{design-review → vibe.design-review}/agents/slop-detector.md +0 -0
  135. /package/skills/{design-review → vibe.design-review}/frameworks/core-web-vitals.md +0 -0
  136. /package/skills/{design-review → vibe.design-review}/frameworks/wcag-checklist.md +0 -0
  137. /package/skills/{design-review → vibe.design-review}/orchestrator.md +0 -0
  138. /package/skills/{design-review → vibe.design-review}/rubrics/ai-slop-patterns.md +0 -0
  139. /package/skills/{design-review → vibe.design-review}/rubrics/scoring.md +0 -0
  140. /package/skills/{design-review → vibe.design-review}/rubrics/ux-heuristics.md +0 -0
  141. /package/skills/{design-review → vibe.design-review}/templates/critique-report.md +0 -0
  142. /package/skills/{design-review → vibe.design-review}/templates/report.md +0 -0
  143. /package/skills/{design-teach → vibe.design-teach}/rubrics/brand-personality.md +0 -0
  144. /package/skills/{design-teach → vibe.design-teach}/templates/design-context.json +0 -0
  145. /package/skills/{docs → vibe.docs}/references/api-docs-changelog.md +0 -0
  146. /package/skills/{docs → vibe.docs}/references/codemaps-output.md +0 -0
  147. /package/skills/{docs → vibe.docs}/references/diagram-spec.md +0 -0
  148. /package/skills/{docs → vibe.docs}/templates/architecture.md +0 -0
  149. /package/skills/{docs → vibe.docs}/templates/behavioral-principles.md +0 -0
  150. /package/skills/{docs → vibe.docs}/templates/readme.md +0 -0
  151. /package/skills/{docs → vibe.docs}/templates/release-notes.md +0 -0
  152. /package/skills/{e2e-commerce → vibe.e2e-commerce}/templates/test-scenarios.md +0 -0
  153. /package/skills/{event-comms → vibe.event-comms}/templates/email-invite.md +0 -0
  154. /package/skills/{event-comms → vibe.event-comms}/templates/sns-post.md +0 -0
  155. /package/skills/{event-ops → vibe.event-ops}/rubrics/contingency.md +0 -0
  156. /package/skills/{event-ops → vibe.event-ops}/templates/d-day-checklist.md +0 -0
  157. /package/skills/{event-planning → vibe.event-planning}/rubrics/timeline.md +0 -0
  158. /package/skills/{event-planning → vibe.event-planning}/templates/event-plan.md +0 -0
  159. /package/skills/{figma → vibe.figma}/rubrics/conversion-rules.md +0 -0
  160. /package/skills/{figma → vibe.figma}/rubrics/css-mapping.md +0 -0
  161. /package/skills/{figma → vibe.figma}/rubrics/extraction-checklist.md +0 -0
  162. /package/skills/{figma → vibe.figma}/rubrics/image-rules.md +0 -0
  163. /package/skills/{figma → vibe.figma}/templates/component-index.md +0 -0
  164. /package/skills/{figma → vibe.figma}/templates/component-spec.md +0 -0
  165. /package/skills/{figma → vibe.figma}/templates/component.md +0 -0
  166. /package/skills/{figma → vibe.figma}/templates/figma-handoff.md +0 -0
  167. /package/skills/{figma → vibe.figma}/templates/remapped-tree.md +0 -0
  168. /package/skills/{git-worktree → vibe.git-worktree}/rubrics/when-to-use.md +0 -0
  169. /package/skills/{handoff → vibe.handoff}/agents/context-summarizer.md +0 -0
  170. /package/skills/{handoff → vibe.handoff}/agents/document-writer.md +0 -0
  171. /package/skills/{handoff → vibe.handoff}/agents/state-collector.md +0 -0
  172. /package/skills/{handoff → vibe.handoff}/agents/verifier.md +0 -0
  173. /package/skills/{handoff → vibe.handoff}/rubrics/completeness.md +0 -0
  174. /package/skills/{handoff → vibe.handoff}/templates/handoff.md +0 -0
  175. /package/skills/{parallel-research → vibe.parallel-research}/agents/best-practices.md +0 -0
  176. /package/skills/{parallel-research → vibe.parallel-research}/agents/codebase-patterns.md +0 -0
  177. /package/skills/{parallel-research → vibe.parallel-research}/agents/framework-docs.md +0 -0
  178. /package/skills/{parallel-research → vibe.parallel-research}/agents/security-advisory.md +0 -0
  179. /package/skills/{parallel-research → vibe.parallel-research}/agents/synthesizer.md +0 -0
  180. /package/skills/{parallel-research → vibe.parallel-research}/experts/best-practices.md +0 -0
  181. /package/skills/{parallel-research → vibe.parallel-research}/experts/codebase-patterns.md +0 -0
  182. /package/skills/{parallel-research → vibe.parallel-research}/experts/framework-docs.md +0 -0
  183. /package/skills/{parallel-research → vibe.parallel-research}/experts/security-advisory.md +0 -0
  184. /package/skills/{parallel-research → vibe.parallel-research}/orchestrator.md +0 -0
  185. /package/skills/{parallel-research → vibe.parallel-research}/templates/awesome-list.md +0 -0
  186. /package/skills/{parallel-research → vibe.parallel-research}/templates/paper.md +0 -0
  187. /package/skills/{parallel-research → vibe.parallel-research}/templates/synthesis.md +0 -0
  188. /package/skills/{presentation → vibe.presentation}/references/style-presets.md +0 -0
  189. /package/skills/{prioritization-frameworks → vibe.prioritization}/rubrics/frameworks.md +0 -0
  190. /package/skills/{prioritization-frameworks → vibe.prioritization}/templates/scoring-matrix.md +0 -0
  191. /package/skills/{priority-todos → vibe.priority-todos}/rubrics/prioritization.md +0 -0
  192. /package/skills/{priority-todos → vibe.priority-todos}/templates/todo-board.md +0 -0
  193. /package/skills/{vercel-react-best-practices → vibe.react-best-practices}/rubrics/performance.md +0 -0
  194. /package/skills/{vercel-react-best-practices → vibe.react-best-practices}/rubrics/server-components.md +0 -0
  195. /package/skills/{regress → vibe.regress}/templates/bug.md +0 -0
  196. /package/skills/{regress → vibe.regress}/templates/test-jest.md +0 -0
  197. /package/skills/{regress → vibe.regress}/templates/test-vitest.md +0 -0
  198. /package/skills/{arch-guard → vibe.run/internal/arch-guard}/agents/detector.md +0 -0
  199. /package/skills/{arch-guard → vibe.run/internal/arch-guard}/agents/reporter.md +0 -0
  200. /package/skills/{arch-guard → vibe.run/internal/arch-guard}/agents/rule-generator.md +0 -0
  201. /package/skills/{arch-guard → vibe.run/internal/arch-guard}/agents/violation-checker.md +0 -0
  202. /package/skills/{arch-guard → vibe.run/internal/arch-guard}/frameworks/clean-architecture.md +0 -0
  203. /package/skills/{arch-guard → vibe.run/internal/arch-guard}/frameworks/solid.md +0 -0
  204. /package/skills/{arch-guard → vibe.run/internal/arch-guard}/scripts/check-boundaries.js +0 -0
  205. /package/skills/{arch-guard → vibe.run/internal/arch-guard}/templates/arch-rules.json +0 -0
  206. /package/skills/{exec-plan → vibe.run/internal/exec-plan}/agents/decomposer.md +0 -0
  207. /package/skills/{exec-plan → vibe.run/internal/exec-plan}/agents/dependency-mapper.md +0 -0
  208. /package/skills/{exec-plan → vibe.run/internal/exec-plan}/agents/estimator.md +0 -0
  209. /package/skills/{exec-plan → vibe.run/internal/exec-plan}/agents/validator.md +0 -0
  210. /package/skills/{exec-plan → vibe.run/internal/exec-plan}/orchestrator.md +0 -0
  211. /package/skills/{exec-plan → vibe.run/internal/exec-plan}/rubrics/complexity-scoring.md +0 -0
  212. /package/skills/{exec-plan → vibe.run/internal/exec-plan}/templates/plan.md +0 -0
  213. /package/skills/{seo-checklist → vibe.seo-checklist}/frameworks/structured-data.md +0 -0
  214. /package/skills/{seo-checklist → vibe.seo-checklist}/rubrics/content-seo.md +0 -0
  215. /package/skills/{seo-checklist → vibe.seo-checklist}/rubrics/technical-seo.md +0 -0
  216. /package/skills/{tool-fallback → vibe.tool-fallback}/rubrics/fallback-chain.md +0 -0
  217. /package/skills/{ui-ux-pro-max → vibe.ui-ux-pro-max}/reference/color-and-contrast.md +0 -0
  218. /package/skills/{ui-ux-pro-max → vibe.ui-ux-pro-max}/reference/interaction-design.md +0 -0
  219. /package/skills/{ui-ux-pro-max → vibe.ui-ux-pro-max}/reference/motion-design.md +0 -0
  220. /package/skills/{ui-ux-pro-max → vibe.ui-ux-pro-max}/reference/responsive-design.md +0 -0
  221. /package/skills/{ui-ux-pro-max → vibe.ui-ux-pro-max}/reference/spatial-design.md +0 -0
  222. /package/skills/{ui-ux-pro-max → vibe.ui-ux-pro-max}/reference/typography.md +0 -0
  223. /package/skills/{ui-ux-pro-max → vibe.ui-ux-pro-max}/reference/ux-writing.md +0 -0
  224. /package/skills/{ui-ux-pro-max → vibe.ui-ux-pro-max}/rubrics/interaction-states.md +0 -0
  225. /package/skills/{ui-ux-pro-max → vibe.ui-ux-pro-max}/rubrics/responsive-breakpoints.md +0 -0
  226. /package/skills/{user-personas → vibe.user-personas}/rubrics/research-methods.md +0 -0
  227. /package/skills/{user-personas → vibe.user-personas}/templates/persona.md +0 -0
  228. /package/skills/{video-production → vibe.video-production}/rubrics/quality-checklist.md +0 -0
  229. /package/skills/{video-production → vibe.video-production}/templates/production-plan.md +0 -0
@@ -1,296 +0,0 @@
1
- ---
2
- name: clone
3
- description: URL → markup 수준 pixel-perfect 클론 본체 — headless browser로 라이브 사이트 캡처 후 현재 스택으로 스캐폴드.
4
- when_to_use: /vibe.clone 진입점에서 체인 호출. 직접 호출 금지.
5
- user-invocable: false
6
- tier: standard
7
- ---
8
-
9
- # vibe.clone — Markup-Level Website Clone
10
-
11
- ## Core Principles
12
-
13
- ```
14
- The rendered DOM is the source of truth for markup. Screenshots are for pixel verification only.
15
-
16
- ✅ Puppeteer-rendered DOM (post-JS) → HTML structural mapping
17
- ✅ Computed CSS → SCSS direct conversion (no guessing)
18
- ✅ All remote assets (images, fonts) → downloaded locally and rewritten to project paths
19
- ✅ Claude handles semantic decisions only: tag selection, component splitting, interactions
20
- ✅ Screenshots are used for verification only, not generation
21
- ```
22
-
23
- ## Immutable Rules
24
-
25
- ```
26
- 1. Do NOT generate CSS values by guessing or eyeballing screenshots.
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).
35
-
36
- 2. Do NOT hotlink remote assets. All images/fonts must be downloaded and rewritten.
37
-
38
- 3. Do NOT skip the pixel verification loop (Phase 5). The clone is incomplete without it.
39
-
40
- 4. Do NOT copy textual content verbatim from copyrighted sources for production use.
41
- This skill is for layout/markup learning ("클론 코딩"). Replace text with placeholders
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.
46
-
47
- 5. Do NOT build a section without confirming its interaction model. The model in
48
- sections.json is a static-DOM heuristic — verify scroll-driven vs click-driven vs
49
- time-driven vs hover against the live site. Misidentifying it is the #1 clone failure mode.
50
-
51
- 6. Do NOT ship default-state-only. Implement every harvested state (hover/focus/active/open/
52
- tab-switch) from states.json / the section spec.
53
-
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.
59
- ```
60
-
61
- ## Full Flow
62
-
63
- ```
64
- Input: a URL (or multiple URLs for multi-page clones)
65
-
66
- → Phase 0: Setup (stack detection, feature naming, working dir)
67
- → Phase 1: Capture (Puppeteer → rendered HTML + computed CSS + screenshots + assets)
68
- → Phase 2: Refine (DOM → sections.json per breakpoint; + interaction model + states)
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)
72
- → Phase 4: Compile gate
73
- → Phase 5: Pixel verification loop (BOTH viewports after merge)
74
- ```
75
-
76
- > Read `references/setup-and-layout.md` for the working-directory layout and code-output paths.
77
-
78
- ---
79
-
80
- ## Phase 0: Setup
81
-
82
- > Read `references/setup-and-layout.md` for the full Phase 0 setup steps (stack detection, feature naming, directories, component indexing, design token scan).
83
-
84
- ---
85
-
86
- ## Phase 1: Capture ← Headless browser (parallel MO/PC)
87
-
88
- **Coordinator pattern: run MO/PC capture as parallel workers.**
89
-
90
- ### BLOCKING Command — Use only clone-extract.js for capture
91
-
92
- ```bash
93
- # [CLONE_SCRIPT] = {{VIBE_PATH}}/hooks/scripts/clone-extract.js
94
-
95
- # Mobile (375×812)
96
- node {{VIBE_PATH}}/hooks/scripts/clone-extract.js capture <URL> \
97
- --out=/tmp/{feature}/mo/ \
98
- --viewport=375x812 \
99
- --bp=mo
100
-
101
- # Desktop (1440×900)
102
- node {{VIBE_PATH}}/hooks/scripts/clone-extract.js capture <URL> \
103
- --out=/tmp/{feature}/pc/ \
104
- --viewport=1440x900 \
105
- --bp=pc
106
- ```
107
-
108
- ⛔ **Writing custom capture scripts (puppeteer-fetch.mjs, etc.) is forbidden.**
109
- ⛔ **Do NOT use WebFetch or curl** — they cannot render JS-driven SPAs.
110
- ✅ Use clone-extract.js. If output is unsatisfactory, modify the script.
111
-
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).
113
-
114
- ---
115
-
116
- ## Phase 2: Refine ← DOM → sections.json (independent per BP)
117
-
118
- ### BLOCKING Command — Writing custom refine scripts is forbidden
119
-
120
- ```bash
121
- # MO (--states is optional — auto-resolved as states.json next to computed.json)
122
- node {{VIBE_PATH}}/hooks/scripts/clone-refine.js \
123
- /tmp/{feature}/mo/rendered.html \
124
- /tmp/{feature}/mo/computed.json \
125
- --out=/tmp/{feature}/mo/sections.json \
126
- --states=/tmp/{feature}/mo/states.json \
127
- --bp=mo
128
-
129
- # PC
130
- node {{VIBE_PATH}}/hooks/scripts/clone-refine.js \
131
- /tmp/{feature}/pc/rendered.html \
132
- /tmp/{feature}/pc/computed.json \
133
- --out=/tmp/{feature}/pc/sections.json \
134
- --states=/tmp/{feature}/pc/states.json \
135
- --bp=pc
136
- ```
137
-
138
- ⛔ **Phase 3 is blocked until refine completes for all required BPs.**
139
- ⛔ **Do NOT parse rendered.html with custom Python/Node scripts.**
140
- ✅ Use clone-refine.js output as-is. If unsatisfactory, modify the script.
141
-
142
- > Read `references/refine-rules.md` for the full refinement rule set and the sections.json output schema.
143
-
144
- ---
145
-
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:
150
-
151
- ```
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.
162
- ```
163
-
164
- ---
165
-
166
- ## Phase 3: Scaffold ← stack-specific code generation
167
-
168
- **⛔ Implement MO fully first → pass verification → then PC. No responsive conversion in this phase.**
169
- **⛔ CSS values must use computed.json output as-is. No vw/clamp/@media in this phase.**
170
-
171
- ### BLOCKING Command — SCSS must only use script output
172
-
173
- ```bash
174
- # Step 0: Generate per-section build-contract specs (run once per BP)
175
- node {{VIBE_PATH}}/hooks/scripts/clone-spec.js \
176
- /tmp/{feature}/{bp}/sections.json \
177
- --out=/path/to/project/components/{feature}/_specs/{bp}/ \
178
- --feature={feature} [--real-content]
179
-
180
- # Step A: Auto-generate SCSS draft (run once per BP — note the per-BP out dir)
181
- node {{VIBE_PATH}}/hooks/scripts/clone-to-scss.js \
182
- /tmp/{feature}/{bp}/sections.json \
183
- --out=/path/to/project/styles/{feature}/{bp}/ \
184
- --token-file=/tmp/{feature}/project-tokens.json
185
-
186
- # Step B: Per-section validation (after writing each section's component code)
187
- node {{VIBE_PATH}}/hooks/scripts/clone-validate.js \
188
- /path/to/project/styles/{feature}/{bp}/ \
189
- /tmp/{feature}/{bp}/sections.json \
190
- --section={SectionName}
191
- ```
192
-
193
- ⛔ **No section is built without a completed spec.** Step 0 emits `_specs/{Section}.spec.md`
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.
204
- ⛔ **Do NOT write custom SCSS / spec generation scripts.**
205
- ⛔ **Do NOT proceed past a section without a clone-validate.js PASS for it.**
206
-
207
- Phase 3A: MO Scaffold — parallel builder dispatch
208
- Input: /tmp/{feature}/mo/sections.json
209
- → Phase 4 (MO compile) → Phase 5 (MO pixel verification)
210
-
211
- Phase 3B: PC Scaffold
212
- Same process as MO, input /tmp/{feature}/pc/sections.json → styles/{feature}/pc/
213
- → Phase 4 (PC compile) → Phase 5 (PC pixel verification)
214
-
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.
224
- ```
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
-
228
- ---
229
-
230
- ## Phase 4: Compile Gate
231
-
232
- ```
233
- No round cap. Loop until compile succeeds (or stuck → ask user).
234
-
235
- 0. Capture baseline (before Phase 3): record existing tsc + build errors
236
- → Phase 4 only fixes NEW errors
237
-
238
- 1. TypeScript: vue-tsc / svelte-check / tsc --noEmit
239
- 2. Build: npm run build (120s timeout)
240
- 3. Dev server: npm run dev → detect port → polling
241
-
242
- On error: parse → auto-fix → re-check
243
- Termination:
244
- ✅ Success: all checks pass → enter Phase 5
245
- ⚠️ Stuck: same errors as previous round → ask user
246
- 1. Direct fix instructions → retry
247
- 2. "proceed" — record remaining errors as TODO, proceed to Phase 5
248
- 3. "abort" — halt
249
- ultrawork mode: on stuck, record TODO without prompting and proceed
250
-
251
- ⛔ Must enter Phase 5 after Phase 4 passes. Do NOT output a "completion summary".
252
- ```
253
-
254
- ---
255
-
256
- ## Phase 5: Pixel Verification Loop ← MANDATORY
257
-
258
- **⛔ Phase 5 is mandatory, not optional. Enter automatically after Phase 4.**
259
- **⛔ Skipping Phase 5 makes the entire clone "incomplete".**
260
-
261
- ```
262
- No round cap. Loop until P1=0 (or stuck → ask user).
263
- Infrastructure: src/infra/lib/browser/ (Puppeteer + CDP) — same as figma Phase 6.
264
-
265
- 1. Render scaffolded page in dev server at matching viewport
266
- 2. Capture screenshot → pixelmatch comparison against /tmp/{feature}/{bp}/screenshot.png
267
- diffRatio > 0.05 (clone target is tighter than figma) → P1
268
- 3. CSS comparison: live computed CSS vs /tmp/{feature}/{bp}/computed.json
269
- delta > 2px → P1, ≤ 2px → P2
270
- 4. Asset audit: every <img>/background-image resolves to local public/images/ path → else P1
271
- 5. Fix P1 first (refer to computed.json, no guessing) → revalidate compile → reload
272
-
273
- Narrowing scope:
274
- Round 1: P1+P2+P3
275
- Round 2: P1+P2
276
- Round 3+: P1 only
277
-
278
- Termination:
279
- ✅ P1=0 AND no new findings → complete
280
- ⚠️ Stuck: same findings → ask user (resolve / proceed / abort)
281
- ultrawork mode: on stuck, record TODO without prompting and complete
282
-
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
287
- Cleanup: shut down browser + dev server
288
-
289
- ⛔ "Completion summary" output only allowed after Phase 5 completes.
290
- ```
291
-
292
- ---
293
-
294
- ## Legal, Ethical & Error Recovery Reference
295
-
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.
@@ -1,165 +0,0 @@
1
- ---
2
- name: contract
3
- description: API contract drift 탐지 본체 — SPEC contract 추출 → 구현 비교 → breaking drift P1을 regress로 자동 등록.
4
- when_to_use: /vibe.contract 진입점 / /vibe.spec 완료 / /vibe.verify 통과 시 체인. 직접 호출 금지.
5
- user-invocable: false
6
- tier: core
7
- ---
8
-
9
- # vibe.contract — API Contract Drift Detection
10
-
11
- **Purpose**: catch divergence between the SPEC's external contract and the actual implementation. Passing tests ≠ contract preserved.
12
-
13
- ## Why this exists
14
-
15
- Hidden vibe-coding weakness: as the implementation grows, response shapes drift away from what the SPEC documents. Scenario tests still pass — but **external consumers break**. Manual SPEC-vs-code review is high-friction, so mechanize it.
16
-
17
- ## Storage Contract
18
-
19
- ```
20
- .vibe/contracts/
21
- <feature>.md # contract SSOT (extracted from SPEC)
22
- <feature>.snapshot.md # implementation snapshot (last check)
23
- ```
24
-
25
- ### Contract frontmatter schema
26
-
27
- ```yaml
28
- ---
29
- feature: string
30
- extracted-from: .vibe/specs/<feature>.md
31
- extracted-at: ISO-8601
32
- source-spec-hash: sha256 # for change detection
33
- endpoints:
34
- - id: unique-kebab-id # e.g. get-user-by-id
35
- kind: http | graphql | event | function
36
- # http
37
- method: GET | POST | PUT | DELETE | PATCH
38
- path: /users/:id
39
- request:
40
- params: { name: type, ... }
41
- query: { name: type, ... }
42
- body: { field: type, ... } | null
43
- required: [field, ...]
44
- response:
45
- statusCodes:
46
- 200: { schema }
47
- 404: { error: string }
48
- required-fields:
49
- 200: [id, email]
50
- # graphql
51
- operation: query | mutation
52
- name: string
53
- args: { ... }
54
- returns: { ... }
55
- # event
56
- topic: string
57
- payload: { ... }
58
- # function
59
- signature: "(a: string, b: number) => Promise<User>"
60
- module: path/to/file.ts
61
- ---
62
- ```
63
-
64
- ## Subcommands
65
-
66
- ### 1. `extract <feature>` — pull contract out of the SPEC
67
-
68
- **Steps**:
69
- 1. Load SPEC file (single file or split folder)
70
- 2. Search sections in this order:
71
- - `## API` / `## Endpoints` / `## Interface` / `## Contract`
72
- - Markdown tables (method/path/request/response headers)
73
- - OpenAPI/JSON Schema snippets inside code blocks
74
- 3. Extraction failure (no such section) → **exit cleanly with `no-contract` state**. Not every feature has an API.
75
- 4. Success → convert to the frontmatter structure
76
- 5. `source-spec-hash`: sha256 of SPEC content (for next extract to detect change)
77
- 6. Save to `.vibe/contracts/<feature>.md` (no-op if file exists with the same hash)
78
-
79
- **Caveat**: extraction is LLM-driven. Mark low-confidence fields with `# unconfirmed` so the user can review.
80
-
81
- ### 2. `check <feature>` — contract vs implementation
82
-
83
- **Steps**:
84
- 1. Load `.vibe/contracts/<feature>.md`. If missing → **suggest extract first**.
85
- 2. For each endpoint, find implementation:
86
- - http: detect framework (Express, Fastify, Next.js API routes, Hono, ...)
87
- - graphql: locate resolver files
88
- - event: producer/consumer code
89
- - function: module export
90
- 3. Extract implementation signature/schema → compare against contract
91
- 4. Classify drift (severity table in command file)
92
- 5. Persist snapshot at `.vibe/contracts/<feature>.snapshot.md` (current implementation state)
93
-
94
- ### 3. `diff <feature>` — changes since last snapshot
95
-
96
- **Steps**:
97
- 1. If `.snapshot.md` does not exist → say "first run" and exit
98
- 2. Re-extract current implementation; compare to existing snapshot
99
- 3. Output **only changed fields** in ASCII diff form:
100
- ```
101
- endpoints/get-user-by-id/response/200:
102
- - email: string
103
- + email: string | null ← nullability added (P1 breaking)
104
- + phoneNumber: string ← new field (P3 safe)
105
- ```
106
- 4. On any drift, auto-call `/vibe.regress register --from-contract`
107
-
108
- ## Drift Severity Matrix
109
-
110
- (matches command file — keep both in sync on edits)
111
-
112
- ## Integration Points
113
-
114
- ### From /vibe.spec
115
-
116
- Auto-invoke right after the SPEC is written:
117
- ```
118
- Load skill `contract` with: extract <feature>
119
- ```
120
- Failure does not stop `/vibe.spec` (extraction is optional). On success, `/vibe.run` references this contract.
121
-
122
- ### From /vibe.verify
123
-
124
- After all scenarios pass:
125
- ```
126
- Load skill `contract` with: check <feature>
127
- ```
128
- - no drift → verify still passes
129
- - P1 drift → demote verify to fail; auto-register
130
- - P2 / P3 drift → warning only; verify still passes
131
-
132
- ### To /vibe.regress
133
-
134
- On P1 drift:
135
- ```
136
- Load skill `regress` with:
137
- subcommand: register --from-contract
138
- feature: <feature>
139
- symptom: "Contract drift: <endpoint-id> <drift-type>"
140
- root-cause-tag: integration
141
- ```
142
-
143
- ## Framework Detection Rules
144
-
145
- HTTP framework detection order:
146
- 1. `package.json` dependencies: `next` → Next.js API routes
147
- 2. `fastify` → Fastify
148
- 3. `express` → Express
149
- 4. `hono` → Hono
150
- 5. `@nestjs/core` → NestJS
151
- 6. None detected → ask user for manual mapping
152
-
153
- After detection, grep for each framework's **route definition pattern** to map endpoints:
154
- - Next.js: `pages/api/**` or `app/api/**/route.ts`
155
- - Express: `app.get|post|put|delete|patch\(`
156
- - Fastify: `fastify.get|post|...` or route configuration
157
- - Hono: `app.get|post|...`
158
-
159
- ## Done Criteria
160
-
161
- - [ ] `extract` does not error on SPEC without an API section
162
- - [ ] `source-spec-hash`-based re-extract is a no-op when unchanged
163
- - [ ] `check` reports each drift with severity + location (file:line)
164
- - [ ] P1 drift always invokes `/vibe.regress`
165
- - [ ] On framework detection failure, ask the user — do not silently skip