videowright 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (306) hide show
  1. package/README.md +91 -0
  2. package/dist/cli/argv.d.ts +28 -0
  3. package/dist/cli/argv.d.ts.map +1 -0
  4. package/dist/cli/argv.js +115 -0
  5. package/dist/cli/argv.js.map +1 -0
  6. package/dist/cli/bin.d.ts +7 -0
  7. package/dist/cli/bin.d.ts.map +1 -0
  8. package/dist/cli/bin.js +10 -0
  9. package/dist/cli/bin.js.map +1 -0
  10. package/dist/cli/dev.d.ts +19 -0
  11. package/dist/cli/dev.d.ts.map +1 -0
  12. package/dist/cli/dev.js +104 -0
  13. package/dist/cli/dev.js.map +1 -0
  14. package/dist/cli/discover.d.ts +29 -0
  15. package/dist/cli/discover.d.ts.map +1 -0
  16. package/dist/cli/discover.js +104 -0
  17. package/dist/cli/discover.js.map +1 -0
  18. package/dist/cli/discover_project.d.ts +29 -0
  19. package/dist/cli/discover_project.d.ts.map +1 -0
  20. package/dist/cli/discover_project.js +108 -0
  21. package/dist/cli/discover_project.js.map +1 -0
  22. package/dist/cli/errors.d.ts +10 -0
  23. package/dist/cli/errors.d.ts.map +1 -0
  24. package/dist/cli/errors.js +13 -0
  25. package/dist/cli/errors.js.map +1 -0
  26. package/dist/cli/ffmpeg.d.ts +57 -0
  27. package/dist/cli/ffmpeg.d.ts.map +1 -0
  28. package/dist/cli/ffmpeg.js +122 -0
  29. package/dist/cli/ffmpeg.js.map +1 -0
  30. package/dist/cli/index.d.ts +7 -0
  31. package/dist/cli/index.d.ts.map +1 -0
  32. package/dist/cli/index.js +152 -0
  33. package/dist/cli/index.js.map +1 -0
  34. package/dist/cli/playwright_check.d.ts +44 -0
  35. package/dist/cli/playwright_check.d.ts.map +1 -0
  36. package/dist/cli/playwright_check.js +20 -0
  37. package/dist/cli/playwright_check.js.map +1 -0
  38. package/dist/cli/prompt.d.ts +13 -0
  39. package/dist/cli/prompt.d.ts.map +1 -0
  40. package/dist/cli/prompt.js +47 -0
  41. package/dist/cli/prompt.js.map +1 -0
  42. package/dist/cli/render.d.ts +60 -0
  43. package/dist/cli/render.d.ts.map +1 -0
  44. package/dist/cli/render.js +471 -0
  45. package/dist/cli/render.js.map +1 -0
  46. package/dist/cli/script_cmd.d.ts +26 -0
  47. package/dist/cli/script_cmd.d.ts.map +1 -0
  48. package/dist/cli/script_cmd.js +88 -0
  49. package/dist/cli/script_cmd.js.map +1 -0
  50. package/dist/cli/time_shim.d.ts +44 -0
  51. package/dist/cli/time_shim.d.ts.map +1 -0
  52. package/dist/cli/time_shim.js +390 -0
  53. package/dist/cli/time_shim.js.map +1 -0
  54. package/dist/cli/ts_loader.d.ts +28 -0
  55. package/dist/cli/ts_loader.d.ts.map +1 -0
  56. package/dist/cli/ts_loader.js +95 -0
  57. package/dist/cli/ts_loader.js.map +1 -0
  58. package/dist/cli/vite_helpers.d.ts +62 -0
  59. package/dist/cli/vite_helpers.d.ts.map +1 -0
  60. package/dist/cli/vite_helpers.js +273 -0
  61. package/dist/cli/vite_helpers.js.map +1 -0
  62. package/dist/index.d.ts +11 -0
  63. package/dist/index.d.ts.map +1 -0
  64. package/dist/index.js +14 -0
  65. package/dist/index.js.map +1 -0
  66. package/dist/player/hash_router.d.ts +23 -0
  67. package/dist/player/hash_router.d.ts.map +1 -0
  68. package/dist/player/hash_router.js +49 -0
  69. package/dist/player/hash_router.js.map +1 -0
  70. package/dist/player/hud.d.ts +33 -0
  71. package/dist/player/hud.d.ts.map +1 -0
  72. package/dist/player/hud.js +357 -0
  73. package/dist/player/hud.js.map +1 -0
  74. package/dist/player/index.d.ts +123 -0
  75. package/dist/player/index.d.ts.map +1 -0
  76. package/dist/player/index.js +848 -0
  77. package/dist/player/index.js.map +1 -0
  78. package/dist/player/input.d.ts +14 -0
  79. package/dist/player/input.d.ts.map +1 -0
  80. package/dist/player/input.js +90 -0
  81. package/dist/player/input.js.map +1 -0
  82. package/dist/player/slot.d.ts +22 -0
  83. package/dist/player/slot.d.ts.map +1 -0
  84. package/dist/player/slot.js +43 -0
  85. package/dist/player/slot.js.map +1 -0
  86. package/dist/player/transitions/cut.d.ts +7 -0
  87. package/dist/player/transitions/cut.d.ts.map +1 -0
  88. package/dist/player/transitions/cut.js +9 -0
  89. package/dist/player/transitions/cut.js.map +1 -0
  90. package/dist/player/transitions/fade.d.ts +7 -0
  91. package/dist/player/transitions/fade.d.ts.map +1 -0
  92. package/dist/player/transitions/fade.js +18 -0
  93. package/dist/player/transitions/fade.js.map +1 -0
  94. package/dist/player/transitions/index.d.ts +4 -0
  95. package/dist/player/transitions/index.d.ts.map +1 -0
  96. package/dist/player/transitions/index.js +4 -0
  97. package/dist/player/transitions/index.js.map +1 -0
  98. package/dist/player/transitions/slide.d.ts +6 -0
  99. package/dist/player/transitions/slide.d.ts.map +1 -0
  100. package/dist/player/transitions/slide.js +35 -0
  101. package/dist/player/transitions/slide.js.map +1 -0
  102. package/dist/script/index.d.ts +2 -0
  103. package/dist/script/index.d.ts.map +1 -0
  104. package/dist/script/index.js +2 -0
  105. package/dist/script/index.js.map +1 -0
  106. package/dist/script/script.d.ts +10 -0
  107. package/dist/script/script.d.ts.map +1 -0
  108. package/dist/script/script.js +41 -0
  109. package/dist/script/script.js.map +1 -0
  110. package/dist/segment/SegmentRunner.d.ts +52 -0
  111. package/dist/segment/SegmentRunner.d.ts.map +1 -0
  112. package/dist/segment/SegmentRunner.js +187 -0
  113. package/dist/segment/SegmentRunner.js.map +1 -0
  114. package/dist/segment/defineConfig.d.ts +6 -0
  115. package/dist/segment/defineConfig.d.ts.map +1 -0
  116. package/dist/segment/defineConfig.js +7 -0
  117. package/dist/segment/defineConfig.js.map +1 -0
  118. package/dist/segment/defineSegment.d.ts +7 -0
  119. package/dist/segment/defineSegment.d.ts.map +1 -0
  120. package/dist/segment/defineSegment.js +25 -0
  121. package/dist/segment/defineSegment.js.map +1 -0
  122. package/dist/segment/index.d.ts +5 -0
  123. package/dist/segment/index.d.ts.map +1 -0
  124. package/dist/segment/index.js +4 -0
  125. package/dist/segment/index.js.map +1 -0
  126. package/dist/timeline/index.d.ts +73 -0
  127. package/dist/timeline/index.d.ts.map +1 -0
  128. package/dist/timeline/index.js +142 -0
  129. package/dist/timeline/index.js.map +1 -0
  130. package/dist/timeline/loadAudioTrack.d.ts +18 -0
  131. package/dist/timeline/loadAudioTrack.d.ts.map +1 -0
  132. package/dist/timeline/loadAudioTrack.js +44 -0
  133. package/dist/timeline/loadAudioTrack.js.map +1 -0
  134. package/dist/timeline/loadVoiceover.d.ts +18 -0
  135. package/dist/timeline/loadVoiceover.d.ts.map +1 -0
  136. package/dist/timeline/loadVoiceover.js +38 -0
  137. package/dist/timeline/loadVoiceover.js.map +1 -0
  138. package/dist/timeline/resolveTiming.d.ts +28 -0
  139. package/dist/timeline/resolveTiming.d.ts.map +1 -0
  140. package/dist/timeline/resolveTiming.js +63 -0
  141. package/dist/timeline/resolveTiming.js.map +1 -0
  142. package/dist/timeline/validateTiming.d.ts +29 -0
  143. package/dist/timeline/validateTiming.d.ts.map +1 -0
  144. package/dist/timeline/validateTiming.js +62 -0
  145. package/dist/timeline/validateTiming.js.map +1 -0
  146. package/dist/types.d.ts +216 -0
  147. package/dist/types.d.ts.map +1 -0
  148. package/dist/types.js +6 -0
  149. package/dist/types.js.map +1 -0
  150. package/package.json +47 -0
  151. package/skill/SKILL.md +64 -0
  152. package/skill/assets/hello_world/PLAN.md +31 -0
  153. package/skill/assets/hello_world/README.md +27 -0
  154. package/skill/assets/hello_world/audio/audio_plan.md +14 -0
  155. package/skill/assets/hello_world/segments/hello_intro.ts +69 -0
  156. package/skill/assets/hello_world/segments/hello_outro.ts +71 -0
  157. package/skill/assets/hello_world/timeline.ts +15 -0
  158. package/skill/assets/hello_world/voiceover_script/script.md +10 -0
  159. package/skill/assets/install/package.json +10 -0
  160. package/skill/assets/install/tsconfig.json +23 -0
  161. package/skill/assets/styles/editorial-mono/STYLE.md +124 -0
  162. package/skill/assets/styles/editorial-mono/brand.md +85 -0
  163. package/skill/assets/styles/editorial-mono/reference/animations.jsx +752 -0
  164. package/skill/assets/styles/editorial-mono/reference/scenes.html +563 -0
  165. package/skill/assets/styles/editorial-mono/sample/bullet.ts +101 -0
  166. package/skill/assets/styles/editorial-mono/sample/content.ts +104 -0
  167. package/skill/assets/styles/editorial-mono/sample/cta.ts +113 -0
  168. package/skill/assets/styles/editorial-mono/sample/feature.ts +111 -0
  169. package/skill/assets/styles/editorial-mono/sample/grid.ts +97 -0
  170. package/skill/assets/styles/editorial-mono/sample/kinetic.ts +96 -0
  171. package/skill/assets/styles/editorial-mono/sample/section.ts +101 -0
  172. package/skill/assets/styles/editorial-mono/sample/stat.ts +128 -0
  173. package/skill/assets/styles/editorial-mono/sample/title.ts +97 -0
  174. package/skill/assets/styles/editorial-mono/sample/ui-showcase.ts +159 -0
  175. package/skill/assets/styles/editorial-mono/tokens.css +44 -0
  176. package/skill/assets/styles/iso-diagram/STYLE.md +109 -0
  177. package/skill/assets/styles/iso-diagram/brand.md +32 -0
  178. package/skill/assets/styles/iso-diagram/reference/animations.jsx +673 -0
  179. package/skill/assets/styles/iso-diagram/reference/scenes.html +427 -0
  180. package/skill/assets/styles/iso-diagram/sample/bullet.ts +144 -0
  181. package/skill/assets/styles/iso-diagram/sample/content.ts +192 -0
  182. package/skill/assets/styles/iso-diagram/sample/cta.ts +162 -0
  183. package/skill/assets/styles/iso-diagram/sample/feature.ts +205 -0
  184. package/skill/assets/styles/iso-diagram/sample/grid.ts +181 -0
  185. package/skill/assets/styles/iso-diagram/sample/kinetic.ts +102 -0
  186. package/skill/assets/styles/iso-diagram/sample/section.ts +149 -0
  187. package/skill/assets/styles/iso-diagram/sample/stat.ts +164 -0
  188. package/skill/assets/styles/iso-diagram/sample/title.ts +173 -0
  189. package/skill/assets/styles/iso-diagram/sample/ui-showcase.ts +162 -0
  190. package/skill/assets/styles/iso-diagram/tokens.css +40 -0
  191. package/skill/assets/styles/motion-engineering/STYLE.md +106 -0
  192. package/skill/assets/styles/motion-engineering/brand.md +29 -0
  193. package/skill/assets/styles/motion-engineering/reference/animations.jsx +673 -0
  194. package/skill/assets/styles/motion-engineering/reference/scenes.html +513 -0
  195. package/skill/assets/styles/motion-engineering/sample/bullet.ts +176 -0
  196. package/skill/assets/styles/motion-engineering/sample/content.ts +228 -0
  197. package/skill/assets/styles/motion-engineering/sample/cta.ts +209 -0
  198. package/skill/assets/styles/motion-engineering/sample/feature.ts +299 -0
  199. package/skill/assets/styles/motion-engineering/sample/grid.ts +190 -0
  200. package/skill/assets/styles/motion-engineering/sample/kinetic.ts +159 -0
  201. package/skill/assets/styles/motion-engineering/sample/section.ts +196 -0
  202. package/skill/assets/styles/motion-engineering/sample/stat.ts +230 -0
  203. package/skill/assets/styles/motion-engineering/sample/title.ts +219 -0
  204. package/skill/assets/styles/motion-engineering/sample/ui-showcase.ts +267 -0
  205. package/skill/assets/styles/motion-engineering/tokens.css +40 -0
  206. package/skill/assets/styles/neon-terminal/STYLE.md +105 -0
  207. package/skill/assets/styles/neon-terminal/brand.md +27 -0
  208. package/skill/assets/styles/neon-terminal/reference/animations.jsx +673 -0
  209. package/skill/assets/styles/neon-terminal/reference/scenes.html +387 -0
  210. package/skill/assets/styles/neon-terminal/sample/bullet.ts +113 -0
  211. package/skill/assets/styles/neon-terminal/sample/content.ts +117 -0
  212. package/skill/assets/styles/neon-terminal/sample/cta.ts +131 -0
  213. package/skill/assets/styles/neon-terminal/sample/feature.ts +112 -0
  214. package/skill/assets/styles/neon-terminal/sample/grid.ts +128 -0
  215. package/skill/assets/styles/neon-terminal/sample/kinetic.ts +105 -0
  216. package/skill/assets/styles/neon-terminal/sample/section.ts +96 -0
  217. package/skill/assets/styles/neon-terminal/sample/stat.ts +123 -0
  218. package/skill/assets/styles/neon-terminal/sample/title.ts +122 -0
  219. package/skill/assets/styles/neon-terminal/sample/ui-showcase.ts +127 -0
  220. package/skill/assets/styles/neon-terminal/tokens.css +39 -0
  221. package/skill/assets/styles/risograph/STYLE.md +110 -0
  222. package/skill/assets/styles/risograph/brand.md +26 -0
  223. package/skill/assets/styles/risograph/reference/animations.jsx +673 -0
  224. package/skill/assets/styles/risograph/reference/scenes.html +403 -0
  225. package/skill/assets/styles/risograph/sample/bullet.ts +124 -0
  226. package/skill/assets/styles/risograph/sample/content.ts +135 -0
  227. package/skill/assets/styles/risograph/sample/cta.ts +149 -0
  228. package/skill/assets/styles/risograph/sample/feature.ts +152 -0
  229. package/skill/assets/styles/risograph/sample/grid.ts +123 -0
  230. package/skill/assets/styles/risograph/sample/kinetic.ts +125 -0
  231. package/skill/assets/styles/risograph/sample/section.ts +130 -0
  232. package/skill/assets/styles/risograph/sample/stat.ts +145 -0
  233. package/skill/assets/styles/risograph/sample/title.ts +132 -0
  234. package/skill/assets/styles/risograph/sample/ui-showcase.ts +147 -0
  235. package/skill/assets/styles/risograph/tokens.css +39 -0
  236. package/skill/assets/styles/swiss-console/STYLE.md +107 -0
  237. package/skill/assets/styles/swiss-console/brand.md +37 -0
  238. package/skill/assets/styles/swiss-console/reference/animations.jsx +673 -0
  239. package/skill/assets/styles/swiss-console/reference/scenes.html +420 -0
  240. package/skill/assets/styles/swiss-console/sample/bullet.ts +122 -0
  241. package/skill/assets/styles/swiss-console/sample/content.ts +137 -0
  242. package/skill/assets/styles/swiss-console/sample/cta.ts +109 -0
  243. package/skill/assets/styles/swiss-console/sample/feature.ts +163 -0
  244. package/skill/assets/styles/swiss-console/sample/grid.ts +145 -0
  245. package/skill/assets/styles/swiss-console/sample/kinetic.ts +117 -0
  246. package/skill/assets/styles/swiss-console/sample/section.ts +127 -0
  247. package/skill/assets/styles/swiss-console/sample/stat.ts +148 -0
  248. package/skill/assets/styles/swiss-console/sample/title.ts +148 -0
  249. package/skill/assets/styles/swiss-console/sample/ui-showcase.ts +198 -0
  250. package/skill/assets/styles/swiss-console/tokens.css +39 -0
  251. package/skill/install/INSTALL.md +400 -0
  252. package/skill/references/audio/audio_plan.md +199 -0
  253. package/skill/references/audio/build.md +208 -0
  254. package/skill/references/audio/cue_template.md +219 -0
  255. package/skill/references/audio/ffmpeg_cookbook.md +267 -0
  256. package/skill/references/audio/music/music.md +171 -0
  257. package/skill/references/audio/music/providers/elevenlabs.md +170 -0
  258. package/skill/references/audio/music/providers/manual.md +140 -0
  259. package/skill/references/audio/music/providers/openverse.md +265 -0
  260. package/skill/references/audio/sfx/providers/elevenlabs.md +152 -0
  261. package/skill/references/audio/sfx/providers/manual.md +117 -0
  262. package/skill/references/audio/sfx/providers/openverse.md +243 -0
  263. package/skill/references/audio/sfx/sfx.md +149 -0
  264. package/skill/references/audio/styles.md +102 -0
  265. package/skill/references/audio/sync.md +237 -0
  266. package/skill/references/audio/voiceover/animation_sync.md +142 -0
  267. package/skill/references/audio/voiceover/provider_script.md +153 -0
  268. package/skill/references/audio/voiceover/providers/elevenlabs.md +288 -0
  269. package/skill/references/audio/voiceover/providers/manual.md +100 -0
  270. package/skill/references/audio/voiceover/script_writing.md +100 -0
  271. package/skill/references/audio/voiceover/style_intake.md +56 -0
  272. package/skill/references/audio/voiceover/sync_algorithm.md +167 -0
  273. package/skill/references/audio/voiceover.md +296 -0
  274. package/skill/references/audio.md +135 -0
  275. package/skill/references/authoring_segment.md +446 -0
  276. package/skill/references/create_or_edit_video.md +232 -0
  277. package/skill/references/dev_server.md +157 -0
  278. package/skill/references/export.md +145 -0
  279. package/skill/references/new_video.md +117 -0
  280. package/skill/references/project_structure.md +144 -0
  281. package/skill/references/setup.md +109 -0
  282. package/skill/references/setup_new_style.md +158 -0
  283. package/skill/references/styles.md +154 -0
  284. package/skill/references/testing.md +115 -0
  285. package/skill/references/types.md +240 -0
  286. package/src/cli/entry/components/copy_button.ts +42 -0
  287. package/src/cli/entry/components/download_modal.ts +204 -0
  288. package/src/cli/entry/components/empty_state.ts +55 -0
  289. package/src/cli/entry/components/hide_hud_tab.ts +37 -0
  290. package/src/cli/entry/components/icons.ts +31 -0
  291. package/src/cli/entry/components/top_bar.ts +69 -0
  292. package/src/cli/entry/components/video_card.ts +57 -0
  293. package/src/cli/entry/dev_frame.ts +189 -0
  294. package/src/cli/entry/entry_index.ts +16 -0
  295. package/src/cli/entry/entry_video.ts +24 -0
  296. package/src/cli/entry/index.html +12 -0
  297. package/src/cli/entry/parse_slug.ts +14 -0
  298. package/src/cli/entry/render.html +17 -0
  299. package/src/cli/entry/render_entry.ts +121 -0
  300. package/src/cli/entry/styles/base.css +45 -0
  301. package/src/cli/entry/styles/components.css +605 -0
  302. package/src/cli/entry/styles/tokens.css +44 -0
  303. package/src/cli/entry/video.html +22 -0
  304. package/src/cli/entry/views/homepage.ts +66 -0
  305. package/src/cli/entry/views/video_view.ts +286 -0
  306. package/src/cli/entry/virtual.d.ts +8 -0
@@ -0,0 +1,144 @@
1
+ # Project Structure
2
+
3
+ ## Consumer repo layout
4
+
5
+ A Videowright project follows this directory structure:
6
+
7
+ ```
8
+ <repo-root>/
9
+ ├── videowright.config.ts # project config (required)
10
+ ├── segments/ # shared segment library
11
+ │ ├── intro/
12
+ │ │ └── index.ts # one segment per folder
13
+ │ ├── feature-cards/
14
+ │ │ └── index.ts
15
+ │ └── outro/
16
+ │ └── index.ts
17
+ ├── components/ # shared web components
18
+ │ ├── animated-title/
19
+ │ │ └── index.ts
20
+ │ └── feature-card/
21
+ │ └── index.ts
22
+ ├── transitions/ # custom transition functions
23
+ │ └── logo-morph.ts
24
+ ├── styles/ # style folders
25
+ │ ├── editorial-mono/
26
+ │ │ ├── STYLE.md
27
+ │ │ ├── tokens.css
28
+ │ │ ├── brand.md
29
+ │ │ ├── reference/
30
+ │ │ │ ├── scenes.html
31
+ │ │ │ └── animations.jsx
32
+ │ │ └── sample/
33
+ │ │ ├── title.ts
34
+ │ │ ├── kinetic.ts
35
+ │ │ └── ... (10 scene types)
36
+ │ └── risograph/
37
+ │ ├── STYLE.md
38
+ │ └── tokens.css
39
+ └── videos/ # per-video folders
40
+ ├── demo/
41
+ │ ├── timeline.ts
42
+ │ ├── PLAN.md
43
+ │ ├── README.md # optional
44
+ │ ├── voiceover_script/
45
+ │ │ └── script.md
46
+ │ └── audio/
47
+ │ ├── audio_plan.md
48
+ │ ├── originals/
49
+ │ │ ├── voiceovers/
50
+ │ │ │ └── v1/
51
+ │ │ │ ├── voiceover.ts # typed Voiceover object
52
+ │ │ │ ├── audio.mp3 # audio file
53
+ │ │ │ ├── timing.json
54
+ │ │ │ └── provider_script.md
55
+ │ │ ├── sfx/ # slug-named subfolders
56
+ │ │ └── music/ # slug-named subfolders
57
+ │ └── tracks/
58
+ │ └── v1/
59
+ │ ├── track.ts # typed AudioTrack object
60
+ │ ├── track.mp3 # rendered audio
61
+ │ └── plan_snapshot.md
62
+ └── launch_2026/
63
+ ├── timeline.ts
64
+ ├── PLAN.md
65
+ └── voiceover_script/
66
+ └── script.md
67
+ ```
68
+
69
+ ## File ownership rules
70
+
71
+ ### Shared (top-level directories)
72
+
73
+ These directories are shared across all videos in the project:
74
+
75
+ | Directory | Contains | Ownership |
76
+ |---|---|---|
77
+ | `segments/` | Segment modules. One folder per segment, each with an `index.ts`. | Any video can reference any segment. Do not duplicate segments for different videos. |
78
+ | `components/` | Reusable web components used by multiple segments. | Shared across segments. Extract here when a visual element appears in more than one segment. |
79
+ | `transitions/` | Custom transition functions. | Shared. Only create when a built-in transition (`fade`, `cut`, `slideLeft`, `slideRight`, `slideUp`, `slideDown`) does not fit. |
80
+ | `styles/` | Style folders. One folder per style, each with `STYLE.md` and `tokens.css`. | Shared. Multiple styles can coexist. See [styles.md](styles.md). |
81
+
82
+ ### Per-video (`videos/<name>/`)
83
+
84
+ Each video gets its own folder under `videos/`:
85
+
86
+ | File | Purpose |
87
+ |---|---|
88
+ | `timeline.ts` | Timeline definition. Imports the style's `tokens.css`, defines segment order and transitions. Default-exports a `Timeline` object. |
89
+ | `PLAN.md` | Working memory for the video. Design decisions, segment outline, script, append-only log. |
90
+ | `voiceover_script/script.md` | Assembled VO script (generated by `videowright script --write`). Only present for videos with voiceover intent. |
91
+ | `audio/` | Audio directory. Contains `audio_plan.md`, `originals/` (source voiceovers, SFX, music), and `tracks/` (rendered audio tracks). See [audio.md](audio.md). |
92
+ | `audio/originals/voiceovers/<slug>/` | Voiceover folders. Each contains a `voiceover.ts` (typed Voiceover object), audio file, and optional provider timing/script files. See [audio/voiceover.md](audio/voiceover.md). |
93
+ | `README.md` | Optional. Notes about the video for human readers. |
94
+
95
+ Per-video files live **only** inside `videos/<name>/`. Do not put segments, components, or styles inside a video folder — those belong in the shared top-level directories.
96
+
97
+ ### Config
98
+
99
+ `videowright.config.ts` lives at the repo root. It defines project-wide settings:
100
+
101
+ ```ts
102
+ import { defineConfig } from 'videowright';
103
+
104
+ export default defineConfig({
105
+ projectStructure: 'v1',
106
+ defaultStyle: 'editorial-mono',
107
+ defaults: {
108
+ resolution: [1920, 1080],
109
+ fps: 60,
110
+ aspectRatio: '16:9',
111
+ },
112
+ });
113
+ ```
114
+
115
+ See [types.md](types.md) for the full `Config` type.
116
+
117
+ ## Naming guidance
118
+
119
+ ### Segments
120
+
121
+ - Use `kebab-case` for segment folder names: `feature-cards`, `intro`, `data-chart`.
122
+ - The folder name is the segment's `id` — they must match.
123
+ - Name segments by what they show, not which video they belong to. Good: `feature-cards`, `pricing-table`. Bad: `demo-slide-3`.
124
+
125
+ ### Videos
126
+
127
+ - Use `snake_case` for video folder names: `demo_video`, `launch_2026_q1`.
128
+ - A date prefix is suggested but not required: `2026_05_launch`.
129
+ - The folder name is used in paths and references — keep it short and descriptive.
130
+
131
+ ### Styles
132
+
133
+ - Use `kebab-case` for style folder names: `editorial-mono`, `swiss-console`, `risograph`.
134
+ - The folder name is the style's slug — it must match the `slug` in `STYLE.md` frontmatter and the value in `defaultStyle` / `meta.style`.
135
+
136
+ ## The reuse rule
137
+
138
+ Do not copy a segment to modify it for a different video. If two videos need the same visual with slight differences:
139
+
140
+ - **Parameterize** the segment (use `mount` arguments, CSS variables, or data attributes to vary behavior).
141
+ - **Extract shared parts** into a component in `components/`.
142
+ - **Create a new segment** that composes the shared component differently.
143
+
144
+ Any video can reference any segment in `segments/`. This is the primary reuse mechanism.
@@ -0,0 +1,109 @@
1
+ # Setup
2
+
3
+ Each input-gathering step is its own conversational turn. Do not stack questions.
4
+
5
+ ## When this is loaded
6
+
7
+ You were routed here because the setup gate in SKILL.md is open: `videowright.config.ts` does not exist, or its `defaultStyle` field is missing or empty.
8
+
9
+ This flow runs once per project. After it completes, the setup gate closes and SKILL.md skips this file on future invocations.
10
+
11
+ ## Preconditions: Verify install
12
+
13
+ Before any setup work, verify that the Videowright installer was run successfully. Check all three of these conditions:
14
+
15
+ 1. `videowright` is in the project's `package.json` `dependencies` or `devDependencies`.
16
+ 2. `node_modules/videowright/` exists as a directory (i.e., `npm install` or equivalent was actually run).
17
+ 3. An instruction file contains a `<!-- videowright:start -->` marked region. Check `CLAUDE.md` if it exists; otherwise check `AGENTS.md`.
18
+
19
+ If **any** of these checks fail, stop and tell the user exactly:
20
+
21
+ > Videowright is not fully installed in this project. Visit https://github.com/scosman/videowright for install instructions.
22
+
23
+ Do not attempt repair. Do not proceed with setup. The user should re-run the installer.
24
+
25
+ ## Gate semantics
26
+
27
+ | Config state | What to do |
28
+ |---|---|
29
+ | `videowright.config.ts` does not exist | Full setup. Run all steps below. |
30
+ | File exists but `defaultStyle` is missing or empty string | Partial setup. Skip directory scaffolding (step 2). Jump to step 3 (pick first style) and continue from there. |
31
+ | File exists and `defaultStyle` is set to a slug | Gate is closed. You should not be here. Return to SKILL.md intent dispatch. |
32
+
33
+ A partial setup means the user started setup previously but did not finish picking a style. Resume where they left off -- never re-scaffold files that already exist.
34
+
35
+ ## Steps
36
+
37
+ ### Step 1 -- Confirm intent
38
+
39
+ Ask: "I'll set up a Videowright project here. This will create the directory structure, pick a visual style, and then we'll create your first video together. OK to proceed?"
40
+
41
+ If the user says no, stop.
42
+
43
+ ### Step 2 -- Scaffold directories and gitignore
44
+
45
+ Create the consumer repo directory structure:
46
+
47
+ ```
48
+ <repo-root>/
49
+ ├── segments/ # shared segment library
50
+ ├── components/ # shared web components
51
+ ├── transitions/ # shared transition functions
52
+ ├── styles/ # style folders (populated in step 3)
53
+ └── videos/ # per-video folders (populated after handoff to new_video.md)
54
+ ```
55
+
56
+ Only create directories that do not already exist. Do not create any files inside these directories.
57
+
58
+ **Ensure `.env` is in `.gitignore`.** Check if a `.gitignore` file exists at the repo root. If it does not exist, create one. In either case, verify that `.env` is listed as an ignored pattern. If it is not present, add `.env` to the file. This prevents API keys and other secrets from being committed to the repository.
59
+
60
+ ### Step 3 -- Pick first style
61
+
62
+ The first style is required. Without it, there are no design tokens and any video will lack visual identity. There is no "skip and add later" path.
63
+
64
+ This is its own conversational turn -- do not combine with any other question.
65
+
66
+ Dispatch to [setup_new_style.md](setup_new_style.md) with:
67
+
68
+ - `setAsDefault: false` -- do **not** let the style flow write `videowright.config.ts`. The config does not exist yet; Step 4 writes it with the chosen slug.
69
+ - `copySample: true` -- install the sample segment into `segments/<slug>-sample/index.ts`. The sample segment showcases the chosen style.
70
+
71
+ Wait for the style creation flow to complete. Record the chosen slug for Step 4.
72
+
73
+ ### Step 4 -- Write config
74
+
75
+ Write `videowright.config.ts` at the repo root (if it does not already exist from partial setup):
76
+
77
+ ```ts
78
+ import { defineConfig } from 'videowright';
79
+
80
+ export default defineConfig({
81
+ projectStructure: 'v1',
82
+ defaultStyle: '<slug from step 3>',
83
+ defaults: {
84
+ resolution: [1920, 1080],
85
+ fps: 60,
86
+ aspectRatio: '16:9',
87
+ },
88
+ });
89
+ ```
90
+
91
+ If the file already exists (partial setup), only update `defaultStyle`.
92
+
93
+ ### Step 5 -- Hand off to first video
94
+
95
+ Tell the user exactly:
96
+
97
+ > Project configured. Starting first video.
98
+
99
+ Then immediately load [new_video.md](new_video.md) and follow its intake flow. Do **not** add any transition question or suggestion between setup and new_video — `new_video.md` handles all intake (purpose, audience, audio intent, etc.) as part of its own flow.
100
+
101
+ ## Edge cases
102
+
103
+ | Situation | Behavior |
104
+ |---|---|
105
+ | `videowright` not in `package.json` | Stop with install instructions. Do not proceed. |
106
+ | Config exists but `defaultStyle` is empty | Resume at step 3 (pick style). Skip scaffolding. |
107
+ | Some directories already exist | Skip creating them. Do not overwrite existing files. |
108
+ | User declines to proceed at step 1 | Stop. Do not scaffold anything. |
109
+ | User wants to skip style selection | Do not allow. Explain that the style is required for videos to have visual identity. Offer Mode 4 (pick a built-in pack) as the fastest path. |
@@ -0,0 +1,158 @@
1
+ # Setup New Style
2
+
3
+ ## When this is called
4
+
5
+ This is the shared style-creation flow. You were dispatched here from one of:
6
+
7
+ - **[setup.md](setup.md)** -- picking the first style during initial project setup.
8
+ - **[new_video.md](new_video.md)** -- user wants a different style for a specific video.
9
+ - **[styles.md](styles.md)** -- user explicitly wants to add a style or change the default.
10
+
11
+ The caller passes two flags:
12
+
13
+ | Flag | Meaning | Default by caller |
14
+ |---|---|---|
15
+ | `setAsDefault` | Write this slug into `videowright.config.ts` as `defaultStyle` | `false` for setup (setup.md writes config itself), `false` for per-video styles, caller's choice for "change default style" |
16
+ | `copySample` | Install sample segments at `segments/<slug>-sample-<scene>.ts` demonstrating the style | `true` during initial setup, `false` when adding mid-project (unless user asks) |
17
+
18
+ ## Flow
19
+
20
+ Present this message verbatim — do not rephrase or regenerate it:
21
+
22
+ <!-- Maintainer note: the built-in pack list below is baked in. Adding or removing a pack under skill/assets/styles/ requires updating this list. -->
23
+
24
+ > How would you like to define your visual style?
25
+ >
26
+ > 1. **Generate from reference docs** — provide a marketing page, brand guide, CSS file, or other document and I'll derive a style from it.
27
+ > 2. **Copy from a previous Videowright project** — provide a path to an existing project's style folder.
28
+ > 3. **Describe it** — give me a short description and I'll generate a style. Example: "Neo-brutalist, Inter font, yellow accent color."
29
+ > 4. **Built-in style pack** — pick one of these ready-made styles:
30
+ > - **Editorial Mono** — Black ink on cream paper. One red accent. Reads like a magazine.
31
+ > - **Swiss Console** — Strict 12-column grid. Hairline rules. Tabular numerals. Micro-labels everywhere.
32
+ > - **Neon Terminal** — CRT terminal interface. Mono throughout. Phosphor-green on near-black, stepped motion.
33
+ > - **Motion Engineering** — Aerospace HUD / blueprint. Charcoal canvas, cyan-white type, amber accent. Dimension lines and crosshairs.
34
+ > - **Iso Diagram** — Pencil-and-paper explainer aesthetic. Hand-drawn lines, pastel fills, isometric drawings.
35
+ > - **Risograph** — Two-color screen-print on warm paper. Pink + ink-blue, visible grain, stop-motion cadence.
36
+
37
+ ### Mode 1 -- Ingest reference material
38
+
39
+ The user has a brand deck, CSS file, Figma export, paste-able content, local files/folders, or a URL pointing to an existing visual identity.
40
+
41
+ 1. Prompt: "Drop the content in chat, point me at local files or folders, or paste a URL. I'll extract the visual identity."
42
+ 2. Read whatever the user provides:
43
+ - **Pasted content or local files:** read directly.
44
+ - **Folder path:** read files from that path in place. Do **not** create a new top-level directory for source material.
45
+ - **URL:** fetch the page content and extract visual tokens (colors, typography, spacing, motion patterns) from the HTML/CSS/design assets.
46
+ 3. Transform the input into `styles/<slug>/`:
47
+ - Draft `STYLE.md` with frontmatter (`title`, `slug`, `picker_description`, `font_sources`) and body (aesthetic rules, motion vocabulary, don'ts).
48
+ - Draft `tokens.css` with `:root` custom properties. Always include the 6 recommended tokens (`--color-bg`, `--color-fg`, `--color-accent`, `--font-display`, `--font-body`, `--font-mono`). If the source material does not define values for all 6, pick reasonable defaults from the source's palette/typography and flag which ones you inferred.
49
+ - If `copySample` is true, also draft sample segments demonstrating the style. Each sample lives at `styles/<slug>/sample/<scene>.ts` and will be copied to `segments/<slug>-sample-<scene>.ts` in the final actions step.
50
+ 4. Read back a brief overview: "Here's what I built from your input: [summary]. Look good or any changes?"
51
+ 5. Iterate until the user confirms.
52
+
53
+ ### Mode 2 -- Copy from a previous Videowright project
54
+
55
+ The user provides a path to another Videowright project (the "source project").
56
+
57
+ 1. Read `<source-project>/styles/` and list available styles (by reading `STYLE.md` frontmatter in each subfolder).
58
+ 2. If multiple styles exist in the source project, ask the user which one to copy. If only one, confirm it.
59
+ 3. Read `<source-project>/styles/<slug>/STYLE.md` and `<source-project>/styles/<slug>/tokens.css`.
60
+ 4. Write them to `styles/<slug>/STYLE.md` and `styles/<slug>/tokens.css` in this project (the current working directory). The slug is preserved from the source.
61
+ 5. If `copySample` is true and `<source-project>/styles/<slug>/sample/` exists, copy it to `styles/<slug>/sample/` in this project, then copy each `sample/<scene>.ts` to `segments/<slug>-sample-<scene>.ts` in this project.
62
+ 6. Show the user a summary of what was copied and ask: "Look good or any changes?"
63
+ 7. Iterate until confirmed.
64
+
65
+ ### Mode 3 -- Describe in chat
66
+
67
+ The user types a description: "Modern look using Inter, white background, #e0e230 accent, sans-serif headers, monospace for code."
68
+
69
+ 1. Draft `STYLE.md` and `tokens.css` from the description.
70
+ - Always include the 6 recommended tokens. Infer values from the description; flag any you guessed.
71
+ - Write aesthetic rules, motion vocabulary, and don'ts that match the described feel.
72
+ - Pick Google Fonts URLs for `font_sources` based on the described typography.
73
+ - If `copySample` is true, also draft sample segments demonstrating the described style. Each sample lives at `styles/<slug>/sample/<scene>.ts` and will be copied to `segments/<slug>-sample-<scene>.ts` in the final actions step.
74
+ 2. Read back a brief overview and ask: "Look good or any changes?"
75
+ 3. Iterate until confirmed.
76
+
77
+ ### Mode 4 -- Pick a built-in style pack
78
+
79
+ Choose one of the built-in packs shipped with Videowright. The pack list and descriptions are already shown in the question above — no need to read frontmatter at runtime.
80
+
81
+ 1. The user picks a pack from the list presented in the question. Confirm the choice.
82
+ 2. Copy the entire `node_modules/videowright/skill/assets/styles/<slug>/` folder into the consumer repo at `styles/<slug>/`. This includes `STYLE.md`, `tokens.css`, `brand.md`, `reference/scenes.html`, `reference/animations.jsx`, and `sample/*.ts`. The slug is locked to the pack's slug -- no rename.
83
+ 3. If `copySample` is true, copy each `styles/<slug>/sample/<scene>.ts` into `segments/<slug>-sample-<scene>.ts` (flat file directly under `segments/`). If any destination already exists, skip that file and report it to the user.
84
+
85
+ After any mode, the user's copy in `styles/<slug>/` is the source of truth. The skill does not auto-update it from `skill/assets/` later.
86
+
87
+ ## Final actions
88
+
89
+ After the style is created (any mode):
90
+
91
+ 1. **Modes 1 and 3 only:** Write `styles/<slug>/STYLE.md` and `styles/<slug>/tokens.css` to the consumer repo. (Mode 2 and Mode 4 already copied these in their respective steps.)
92
+ 2. If `copySample` is true, copy each `styles/<slug>/sample/<scene>.ts` to `segments/<slug>-sample-<scene>.ts`. The sources stay in the style folder as references; the copies in `segments/` are what videos use. If any destination already exists, skip that file and tell the user.
93
+ 3. If `setAsDefault` is true, set `defaultStyle: '<slug>'` in `videowright.config.ts`.
94
+ 4. Confirm to the user what was created and where.
95
+
96
+ ## STYLE.md shape
97
+
98
+ ```markdown
99
+ ---
100
+ title: <Display Name>
101
+ slug: <kebab-case-slug>
102
+ picker_description: <One-liner for the picker>
103
+ font_sources:
104
+ - <Google Fonts URL>
105
+ - <Google Fonts URL>
106
+ ---
107
+
108
+ # Style: <Display Name>
109
+
110
+ ## When to use
111
+ [1-2 sentences on when this style is the right choice]
112
+
113
+ ## Aesthetic rules
114
+ - [Bullet rules the agent honors when authoring segments in this style]
115
+ - [Typography, color, motion density, layout patterns]
116
+ - [Sizing guidance: specify minimum font sizes for headings and body text, container widths, and how much of the frame content should fill. Defaults from authoring_segment.md apply (body 36px+, headings 64px+, containers 80-90%+ width) — override here only if the style demands different sizing.]
117
+
118
+ ## Motion vocabulary
119
+ - [How elements enter, exit, and transition]
120
+ - [Timing curves, duration ranges, choreography patterns]
121
+
122
+ ## Don'ts
123
+ - [Things to avoid when using this style]
124
+ ```
125
+
126
+ **Sizing rules in STYLE.md.** Every style's aesthetic rules section should specify how content fills the frame. The baseline from [authoring_segment.md](authoring_segment.md) applies unless the style explicitly overrides it: body text 36px+ at 1080p, headings 64px+, primary containers spanning 80-90%+ of the video width. Styles that intentionally use generous whitespace (e.g., editorial layouts) should document that choice and still ensure text remains legible.
127
+
128
+ ## tokens.css shape
129
+
130
+ ```css
131
+ :root {
132
+ /* Colors */
133
+ --color-bg: #ffffff;
134
+ --color-fg: #1a1a1a;
135
+ --color-accent: #0066ff;
136
+
137
+ /* Typography */
138
+ --font-display: 'Inter', sans-serif;
139
+ --font-body: 'Inter', sans-serif;
140
+ --font-mono: 'JetBrains Mono', monospace;
141
+
142
+ /* Pack-specific tokens below */
143
+ }
144
+ ```
145
+
146
+ ## Edge cases
147
+
148
+ | Situation | Behavior |
149
+ |---|---|
150
+ | Slug already exists in `styles/` | Ask the user: overwrite, pick a different name, or cancel. |
151
+ | Sample segment already exists in `segments/` | Skip that file; tell the user which files were skipped. |
152
+ | User pastes a huge style guide into chat (Mode 1) | Prompt for a folder path on disk instead. Do not create a new top-level directory for source material. |
153
+ | User's source material has no typography info | Pick a sensible default (Inter for body/display, JetBrains Mono for mono). Flag the choice. |
154
+ | User's source material has no color info | Pick neutrals (white bg, dark fg, blue accent). Flag the choice. |
155
+ | No built-in packs exist yet (Mode 4) | Tell the user no built-in packs are available; suggest Mode 1 or Mode 3 instead. |
156
+ | `font_sources` URLs are not Google Fonts | Accept any URL. Note that self-hosted fonts are not bundled -- the URL must be accessible at runtime. |
157
+ | User provides a URL in Mode 1 | Fetch the page, extract CSS/design tokens from the markup, and proceed with style creation. If the URL is inaccessible, tell the user and suggest pasting the content directly. |
158
+ | Source project path in Mode 2 does not contain a `styles/` folder | Tell the user the path does not appear to be a Videowright project. Ask them to check the path. |
@@ -0,0 +1,154 @@
1
+ # Styles
2
+
3
+ ## When this is loaded
4
+
5
+ You were routed here from the intent dispatch table. Relevant intents:
6
+
7
+ - **Change the default style** — edit config and optionally cascade to existing videos.
8
+ - **Match a past video's style** — extract the style from an existing video and apply it.
9
+ - **General style questions** — how styles work, how segments consume tokens, how to add or swap styles.
10
+
11
+ To **create a new style**, load [setup_new_style.md](setup_new_style.md).
12
+
13
+ ## Style folder structure
14
+
15
+ Each style lives in `styles/<slug>/` at the consumer repo root. The slug is a kebab-case name that matches the folder name, the `slug` field in `STYLE.md` frontmatter, and the value written into `defaultStyle` or `meta.style`.
16
+
17
+ ```
18
+ styles/
19
+ ├── editorial-mono/
20
+ │ ├── STYLE.md # description, rules, frontmatter (title, slug, picker_description, font_sources)
21
+ │ ├── tokens.css # CSS custom properties on :root
22
+ │ ├── brand.md # human-readable token rationale
23
+ │ ├── reference/
24
+ │ │ ├── scenes.html # rendered scene mockups, browsable in a web browser
25
+ │ │ └── animations.jsx # motion vocabulary mockups
26
+ │ └── sample/ # reference samples (one per scene type, stays here as templates)
27
+ │ ├── title.ts
28
+ │ ├── section.ts
29
+ │ ├── kinetic.ts
30
+ │ ├── bullet.ts
31
+ │ ├── stat.ts
32
+ │ ├── feature.ts
33
+ │ ├── grid.ts
34
+ │ ├── ui-showcase.ts
35
+ │ ├── content.ts
36
+ │ └── cta.ts
37
+ └── risograph/
38
+ ├── STYLE.md
39
+ ├── tokens.css
40
+ └── ...
41
+ ```
42
+
43
+ The `sample/` folder inside a style contains one TypeScript file per scene type. When installed, samples are copied to `segments/<slug>-sample-<scene>.ts` (flat files under `segments/`) for use in videos. The sources stay in the style folder as references.
44
+
45
+ **Required files per style:**
46
+
47
+ | File | Purpose |
48
+ |---|---|
49
+ | `STYLE.md` | Frontmatter (`title`, `slug`, `picker_description`, `font_sources`) + body (aesthetic rules, motion vocabulary, don'ts). The agent reads this when authoring segments in this style. |
50
+ | `tokens.css` | CSS custom properties on `:root`. The only required token format. Imported by timeline.ts. |
51
+
52
+ There is no `styles/default/`. Every style has a real name. Multiple styles can coexist in one repo.
53
+
54
+ ## Recommended token set
55
+
56
+ Built-in packs use these tokens. User-authored styles may use any tokens they want — there is no enforced set — but following these conventions enables cross-style compatibility.
57
+
58
+ | Token | Purpose |
59
+ |---|---|
60
+ | `--color-bg` | Page background |
61
+ | `--color-fg` | Default text |
62
+ | `--color-accent` | Primary accent / call-out |
63
+ | `--font-display` | Headlines |
64
+ | `--font-body` | Body copy |
65
+ | `--font-mono` | Code / monospace |
66
+
67
+ Packs may define additional tokens beyond these six.
68
+
69
+ ## How videos consume styles
70
+
71
+ ### Timeline.ts top-of-file import
72
+
73
+ The active style's `tokens.css` is loaded via a CSS import at the top of the video's `timeline.ts`:
74
+
75
+ ```ts
76
+ // videos/my_video/timeline.ts
77
+ import '../../styles/editorial-mono/tokens.css'; // path relative to this file
78
+ import type { Timeline } from 'videowright';
79
+
80
+ const timeline: Timeline = {
81
+ meta: {
82
+ title: 'My Video',
83
+ // style: 'editorial-mono', // optional — falls back to config defaultStyle
84
+ },
85
+ segments: [...],
86
+ };
87
+ export default timeline;
88
+ ```
89
+
90
+ The import path is relative to the video's `timeline.ts` location. Adjust the `../../` prefix to match the actual directory depth.
91
+
92
+ Vite (the dev server) and any bundler resolves the CSS import natively. The CSS is injected into the page; `:root` custom properties cascade through the player's DOM.
93
+
94
+ **Keep the import in sync.** The top-of-file import must always match `meta.style ?? config.defaultStyle`. When you change the style for a video, update both the import path and `meta.style` (if set).
95
+
96
+ ### Per-video override
97
+
98
+ Set `meta.style` on the timeline to override the project default for one video:
99
+
100
+ ```ts
101
+ import '../../styles/risograph/tokens.css';
102
+ import type { Timeline } from 'videowright';
103
+
104
+ const timeline: Timeline = {
105
+ meta: {
106
+ title: 'January 2026 Launch',
107
+ style: 'risograph', // overrides config defaultStyle
108
+ },
109
+ segments: [...],
110
+ };
111
+ export default timeline;
112
+ ```
113
+
114
+ ### Segments
115
+
116
+ Segments use CSS variables directly: `var(--color-accent)`, `var(--font-display)`, etc. Segments do **not** import tokens themselves — the timeline-level import provides the variables at runtime via `:root` custom properties.
117
+
118
+ This means one segment can be reused across videos with different styles — the CSS variables resolve to whatever the timeline imported.
119
+
120
+ Segments may freely import additional CSS from any style folder if they want to mix styles or pull in supplementary resources. This is "off-book" and welcomed.
121
+
122
+ ### No per-segment style field
123
+
124
+ There is no `style` field on segment entries. Segments are free-form: import any tokens, write any CSS, ignore the project style entirely. The "style" of a video is a directive the author honors via the segments they write — it is not enforced by the lib.
125
+
126
+ ## Changing the default style
127
+
128
+ To change the project's default style:
129
+
130
+ 1. Edit `videowright.config.ts` — set `defaultStyle` to the new slug.
131
+ 2. Verify `styles/<new-slug>/tokens.css` exists. If not, create the style first via [setup_new_style.md](setup_new_style.md).
132
+ 3. Ask the user whether to update existing videos:
133
+ - **Yes**: scan `videos/*/timeline.ts`. For each video that does **not** have an explicit `meta.style` override, update the top-of-file CSS import to point to the new style. Leave videos with `meta.style` set completely untouched — an explicit override is an intentional pin.
134
+ - **No**: only new videos get the new default. Existing videos keep their current imports.
135
+
136
+ ## Matching a past video's style
137
+
138
+ When the user asks to "match the look of \<past video\>":
139
+
140
+ 1. Read the past video's `PLAN.md` — check the Style section for the slug and any notes.
141
+ 2. Read `styles/<slug>/STYLE.md` — absorb the aesthetic rules and motion vocabulary.
142
+ 3. Read one or two representative segments from the past video to understand how the style was applied in practice.
143
+ 4. Apply the same style to the new video: set the same slug in `meta.style` (or confirm `defaultStyle` matches), use the same top-of-file import, and author segments following the same aesthetic rules.
144
+
145
+ If the style folder no longer exists (deleted or renamed), offer to recreate it via [setup_new_style.md](setup_new_style.md) using the past video's segments as the reference input (Mode 1).
146
+
147
+ ## Edge cases
148
+
149
+ | Situation | Behavior |
150
+ |---|---|
151
+ | `defaultStyle` references a slug with no `styles/<slug>/` folder | Error with a clear message naming the missing slug and expected path. Offer to create it via [setup_new_style.md](setup_new_style.md). |
152
+ | User wants to add a style mid-project | Route to [setup_new_style.md](setup_new_style.md) with `setAsDefault: false` by default. |
153
+ | Timeline import path and `meta.style` are out of sync | Fix the import to match `meta.style ?? config.defaultStyle`. |
154
+ | User asks "what styles do I have?" | List folders in `styles/` and read each `STYLE.md` frontmatter. |