kaizen-agent 1.48.0 → 1.49.1

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 (232) hide show
  1. package/README.md +2 -2
  2. package/cli/build-web.ts +4 -2
  3. package/cli/hermes.ts +68 -0
  4. package/cli/install.ts +18 -5
  5. package/cli/localsend.test.ts +84 -0
  6. package/cli/localsend.ts +131 -0
  7. package/cli/notes.test.ts +6 -4
  8. package/cli/settings.ts +1 -0
  9. package/cli/state.test.ts +50 -0
  10. package/cli/state.ts +47 -20
  11. package/cli/versions.test.ts +154 -0
  12. package/cli/versions.ts +272 -0
  13. package/cli/video.test.ts +540 -0
  14. package/cli/video.ts +600 -0
  15. package/cli/web.ts +142 -1
  16. package/package.json +1 -1
  17. package/skills/kaizen/config.default.yml +4 -0
  18. package/skills/media/kaizen-book/SKILL.md +107 -0
  19. package/skills/media/kaizen-book/assets/reader.html +440 -0
  20. package/skills/media/kaizen-book/assets/styles.json +45 -0
  21. package/skills/media/kaizen-book/examples/book.json +14 -0
  22. package/skills/media/kaizen-book/examples/images/reach.svg +1 -0
  23. package/skills/media/kaizen-book/examples/manuscript.md +127 -0
  24. package/skills/media/kaizen-book/references/interview.md +85 -0
  25. package/skills/media/kaizen-book/references/proofread.md +47 -0
  26. package/skills/media/kaizen-book/references/writing.md +53 -0
  27. package/skills/media/kaizen-book/scripts/build_book.py +279 -0
  28. package/skills/media/kaizen-book/scripts/check.sh +10 -0
  29. package/skills/media/kaizen-book/scripts/check_book.py +128 -0
  30. package/skills/media/kaizen-book/scripts/deploy.py +58 -0
  31. package/skills/media/kaizen-book/scripts/pdf.mjs +99 -0
  32. package/skills/media/kaizen-book/scripts/setup.sh +9 -0
  33. package/skills/media/kaizen-book/scripts/verify.mjs +95 -0
  34. package/skills/{story-deck → media/kaizen-deck}/SKILL.md +1 -1
  35. package/skills/{story-deck → media/kaizen-deck}/scripts/check.sh +1 -1
  36. package/skills/{story-deck → media/kaizen-deck}/scripts/install_fonts.py +2 -2
  37. package/skills/media/kaizen-video/SKILL.md +130 -0
  38. package/skills/{kaizen-video → media/kaizen-video}/assets/CREDITS.txt +5 -0
  39. package/skills/media/kaizen-video/assets/film-fonts/Fraunces.ttf +0 -0
  40. package/skills/media/kaizen-video/assets/film-fonts/Inter.ttf +0 -0
  41. package/skills/media/kaizen-video/assets/film-fonts/PlayfairDisplay-Italic.ttf +0 -0
  42. package/skills/media/kaizen-video/assets/film-fonts/PlayfairDisplay.ttf +0 -0
  43. package/skills/media/kaizen-video/canvas.html +241 -0
  44. package/skills/media/kaizen-video/examples/canvas-film/cat.txt +31 -0
  45. package/skills/media/kaizen-video/examples/canvas-film/film.json +460 -0
  46. package/skills/media/kaizen-video/examples/canvas-film/lines.json +10 -0
  47. package/skills/media/kaizen-video/examples/canvas-film/skip.txt +18 -0
  48. package/skills/media/kaizen-video/examples/canvas-film/talk.txt +23 -0
  49. package/skills/media/kaizen-video/examples/canvas-film/wow.txt +24 -0
  50. package/skills/media/kaizen-video/examples/kaizen-promo/promo.json +17 -0
  51. package/skills/media/kaizen-video/examples/kaizen-promo/record.json +10 -0
  52. package/skills/media/kaizen-video/examples/notula-promo/promo.json +41 -0
  53. package/skills/media/kaizen-video/examples/notula-promo/record.json +135 -0
  54. package/skills/media/kaizen-video/examples/notula-promo/seed.php +20 -0
  55. package/skills/media/kaizen-video/examples/notula-promo/seed.py +38 -0
  56. package/skills/media/kaizen-video/examples/sample-film/README.md +10 -0
  57. package/skills/media/kaizen-video/examples/sample-film/film.json +63 -0
  58. package/skills/media/kaizen-video/film.html +246 -0
  59. package/skills/media/kaizen-video/presets/app-promo/CREDITS.txt +2 -0
  60. package/skills/media/kaizen-video/presets/app-promo/README.md +21 -0
  61. package/skills/media/kaizen-video/presets/app-promo/preset.json +7 -0
  62. package/skills/media/kaizen-video/presets/app-promo/template/compositions/end.html +25 -0
  63. package/skills/media/kaizen-video/presets/app-promo/template/compositions/hook.html +19 -0
  64. package/skills/media/kaizen-video/presets/app-promo/template/compositions/name.html +19 -0
  65. package/skills/media/kaizen-video/presets/app-promo/template/compositions/step.html +52 -0
  66. package/skills/media/kaizen-video/presets/app-promo/template/index.html +24 -0
  67. package/skills/media/kaizen-video/presets/film-cinematic-drama/.hidden +1 -0
  68. package/skills/media/kaizen-video/presets/film-cinematic-drama/CREDITS.txt +1 -0
  69. package/skills/media/kaizen-video/presets/film-cinematic-drama/README.md +2 -0
  70. package/skills/media/kaizen-video/presets/film-cinematic-drama/style.json +39 -0
  71. package/skills/media/kaizen-video/presets/film-explainer-canvas/.hidden +1 -0
  72. package/skills/media/kaizen-video/presets/film-explainer-canvas/CREDITS.txt +3 -0
  73. package/skills/media/kaizen-video/presets/film-explainer-canvas/README.md +7 -0
  74. package/skills/media/kaizen-video/presets/film-explainer-canvas/assets/fonts/InstrumentSerif.ttf +0 -0
  75. package/skills/media/kaizen-video/presets/film-explainer-canvas/assets/fonts/SpaceMono.ttf +0 -0
  76. package/skills/media/kaizen-video/presets/film-explainer-canvas/assets/sfx/boing.wav +0 -0
  77. package/skills/media/kaizen-video/presets/film-explainer-canvas/assets/sfx/ding.wav +0 -0
  78. package/skills/media/kaizen-video/presets/film-explainer-canvas/assets/sfx/ending.wav +0 -0
  79. package/skills/media/kaizen-video/presets/film-explainer-canvas/assets/sfx/pop.wav +0 -0
  80. package/skills/media/kaizen-video/presets/film-explainer-canvas/assets/sfx/reveal.wav +0 -0
  81. package/skills/media/kaizen-video/presets/film-explainer-canvas/assets/sfx/shutter.wav +0 -0
  82. package/skills/media/kaizen-video/presets/film-explainer-canvas/assets/sfx/stamp.wav +0 -0
  83. package/skills/media/kaizen-video/presets/film-explainer-canvas/assets/sfx/tick.wav +0 -0
  84. package/skills/media/kaizen-video/presets/film-explainer-canvas/assets/sfx/whoosh.wav +0 -0
  85. package/skills/media/kaizen-video/presets/film-explainer-canvas/style.json +15 -0
  86. package/skills/media/kaizen-video/presets/film-fun-energetic/.hidden +1 -0
  87. package/skills/media/kaizen-video/presets/film-fun-energetic/CREDITS.txt +1 -0
  88. package/skills/media/kaizen-video/presets/film-fun-energetic/README.md +2 -0
  89. package/skills/media/kaizen-video/presets/film-fun-energetic/style.json +39 -0
  90. package/skills/media/kaizen-video/presets/film-promo-booth/.hidden +1 -0
  91. package/skills/media/kaizen-video/presets/film-promo-booth/CREDITS.txt +1 -0
  92. package/skills/media/kaizen-video/presets/film-promo-booth/README.md +2 -0
  93. package/skills/media/kaizen-video/presets/film-promo-booth/style.json +39 -0
  94. package/skills/media/kaizen-video/presets/film-viral-social/.hidden +1 -0
  95. package/skills/media/kaizen-video/presets/film-viral-social/CREDITS.txt +1 -0
  96. package/skills/media/kaizen-video/presets/film-viral-social/README.md +2 -0
  97. package/skills/media/kaizen-video/presets/film-viral-social/style.json +39 -0
  98. package/skills/media/kaizen-video/presets/tiktok-explainer/CREDITS.txt +3 -0
  99. package/skills/media/kaizen-video/presets/tiktok-explainer/README.md +52 -0
  100. package/skills/media/kaizen-video/presets/tiktok-explainer/assets/fonts/InstrumentSerif.ttf +0 -0
  101. package/skills/media/kaizen-video/presets/tiktok-explainer/assets/fonts/SpaceMono.ttf +0 -0
  102. package/skills/media/kaizen-video/presets/tiktok-explainer/assets/sfx/boing.wav +0 -0
  103. package/skills/media/kaizen-video/presets/tiktok-explainer/assets/sfx/ding.wav +0 -0
  104. package/skills/media/kaizen-video/presets/tiktok-explainer/assets/sfx/ending.wav +0 -0
  105. package/skills/media/kaizen-video/presets/tiktok-explainer/assets/sfx/pop.wav +0 -0
  106. package/skills/media/kaizen-video/presets/tiktok-explainer/assets/sfx/reveal.wav +0 -0
  107. package/skills/media/kaizen-video/presets/tiktok-explainer/assets/sfx/shutter.wav +0 -0
  108. package/skills/media/kaizen-video/presets/tiktok-explainer/assets/sfx/stamp.wav +0 -0
  109. package/skills/media/kaizen-video/presets/tiktok-explainer/assets/sfx/tick.wav +0 -0
  110. package/skills/media/kaizen-video/presets/tiktok-explainer/assets/sfx/whoosh.wav +0 -0
  111. package/skills/media/kaizen-video/presets/tiktok-explainer/index.html +272 -0
  112. package/skills/media/kaizen-video/presets/tiktok-explainer/package.json +10 -0
  113. package/skills/media/kaizen-video/references/canvas.md +60 -0
  114. package/skills/media/kaizen-video/references/presets.md +107 -0
  115. package/skills/{story-video → media/kaizen-video}/references/production.md +2 -2
  116. package/skills/media/kaizen-video/references/promo.md +148 -0
  117. package/skills/media/kaizen-video/references/revisions.md +34 -0
  118. package/skills/media/kaizen-video/scripts/__pycache__/intake.cpython-314.pyc +0 -0
  119. package/skills/media/kaizen-video/scripts/__pycache__/make_film.cpython-314.pyc +0 -0
  120. package/skills/media/kaizen-video/scripts/__pycache__/make_tiktok.cpython-314.pyc +0 -0
  121. package/skills/media/kaizen-video/scripts/__pycache__/render_cut.cpython-314.pyc +0 -0
  122. package/skills/media/kaizen-video/scripts/__pycache__/sfx.cpython-314.pyc +0 -0
  123. package/skills/media/kaizen-video/scripts/__pycache__/srt.cpython-314.pyc +0 -0
  124. package/skills/media/kaizen-video/scripts/__pycache__/transcribe.cpython-314.pyc +0 -0
  125. package/skills/media/kaizen-video/scripts/__pycache__/vo.cpython-314.pyc +0 -0
  126. package/skills/{kaizen-video → media/kaizen-video}/scripts/check.sh +8 -0
  127. package/skills/{story-video → media/kaizen-video}/scripts/intake.py +2 -2
  128. package/skills/media/kaizen-video/scripts/make_film.py +416 -0
  129. package/skills/media/kaizen-video/scripts/make_promo.py +297 -0
  130. package/skills/{kaizen-video → media/kaizen-video}/scripts/make_tiktok.py +42 -9
  131. package/skills/{story-video → media/kaizen-video}/scripts/master.sh +12 -11
  132. package/skills/media/kaizen-video/scripts/pixel.py +40 -0
  133. package/skills/media/kaizen-video/scripts/record.mjs +103 -0
  134. package/skills/{story-video → media/kaizen-video}/scripts/sfx.py +3 -3
  135. package/skills/media/kaizen-video/scripts/srt.py +9 -0
  136. package/skills/media/kaizen-video/scripts/still.sh +7 -0
  137. package/web/board/views.ts +1 -1
  138. package/web/board.html +3 -1
  139. package/web/board.js +2 -2
  140. package/web/notebook.js +1 -1
  141. package/web/notes.html +2 -0
  142. package/web/term.js +1 -1
  143. package/web/video.html +332 -0
  144. package/web/video.js +92 -0
  145. package/web/video.ts +843 -0
  146. package/skills/kaizen-video/SKILL.md +0 -73
  147. package/skills/kaizen-video/references/presets.md +0 -54
  148. package/skills/story-video/SKILL.md +0 -108
  149. package/skills/story-video/engine/package.json +0 -12
  150. package/skills/story-video/engine/src/Root.tsx +0 -24
  151. package/skills/story-video/engine/src/engine/Film.tsx +0 -405
  152. package/skills/story-video/engine/src/engine/presets.json +0 -58
  153. package/skills/story-video/engine/src/index.ts +0 -3
  154. package/skills/story-video/engine/tsconfig.json +0 -1
  155. package/skills/story-video/examples/sample-film/README.md +0 -12
  156. package/skills/story-video/examples/sample-film/film.json +0 -16
  157. package/skills/story-video/references/presets.md +0 -21
  158. package/skills/story-video/references/revisions.md +0 -25
  159. package/skills/story-video/scripts/check.sh +0 -19
  160. package/skills/story-video/scripts/setup.sh +0 -25
  161. package/skills/story-video/scripts/srt.py +0 -30
  162. package/skills/story-video/scripts/still.sh +0 -10
  163. /package/skills/{story-deck → media/kaizen-deck}/examples/build-example.js +0 -0
  164. /package/skills/{story-deck → media/kaizen-deck}/references/rules.md +0 -0
  165. /package/skills/{story-deck → media/kaizen-deck}/references/story-arc.md +0 -0
  166. /package/skills/{story-deck → media/kaizen-deck}/scripts/kit.js +0 -0
  167. /package/skills/{story-deck → media/kaizen-deck}/scripts/prep_images.py +0 -0
  168. /package/skills/{story-deck → media/kaizen-deck}/scripts/qa.sh +0 -0
  169. /package/skills/{kaizen-video → media/kaizen-video}/assets/fonts/Fredoka.ttf +0 -0
  170. /package/skills/{kaizen-video → media/kaizen-video}/assets/fonts/Montserrat.ttf +0 -0
  171. /package/skills/{kaizen-video → media/kaizen-video}/assets/fonts/SpecialElite.ttf +0 -0
  172. /package/skills/{kaizen-video → media/kaizen-video}/assets/music/investigations.mp3 +0 -0
  173. /package/skills/{kaizen-video → media/kaizen-video}/assets/music/lights.mp3 +0 -0
  174. /package/skills/{kaizen-video → media/kaizen-video}/assets/music/sunny.mp3 +0 -0
  175. /package/skills/{kaizen-video → media/kaizen-video}/examples/config.json +0 -0
  176. /package/skills/{story-video → media/kaizen-video}/examples/sample-film/lines.json +0 -0
  177. /package/skills/{kaizen-video → media/kaizen-video}/hyperframes.json +0 -0
  178. /package/skills/{kaizen-video → media/kaizen-video}/presets/educational-warning/CREDITS.txt +0 -0
  179. /package/skills/{kaizen-video → media/kaizen-video}/presets/educational-warning/README.md +0 -0
  180. /package/skills/{kaizen-video → media/kaizen-video}/presets/educational-warning/assets/sfx/ending.wav +0 -0
  181. /package/skills/{kaizen-video → media/kaizen-video}/presets/educational-warning/assets/sfx/reveal.wav +0 -0
  182. /package/skills/{kaizen-video → media/kaizen-video}/presets/educational-warning/assets/sfx/shutter.wav +0 -0
  183. /package/skills/{kaizen-video → media/kaizen-video}/presets/educational-warning/assets/sfx/stamp.wav +0 -0
  184. /package/skills/{kaizen-video → media/kaizen-video}/presets/educational-warning/index.html +0 -0
  185. /package/skills/{kaizen-video → media/kaizen-video}/presets/educational-warning/package.json +0 -0
  186. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-cheerful/CREDITS.txt +0 -0
  187. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-cheerful/README.md +0 -0
  188. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-cheerful/assets/sfx/boing.wav +0 -0
  189. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-cheerful/assets/sfx/chime.wav +0 -0
  190. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-cheerful/assets/sfx/ding.wav +0 -0
  191. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-cheerful/assets/sfx/ending.wav +0 -0
  192. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-cheerful/assets/sfx/pop.wav +0 -0
  193. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-cheerful/assets/sfx/reveal.wav +0 -0
  194. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-cheerful/assets/sfx/shutter.wav +0 -0
  195. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-cheerful/assets/sfx/stamp.wav +0 -0
  196. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-cheerful/assets/sfx/whoosh.wav +0 -0
  197. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-cheerful/index.html +0 -0
  198. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-cheerful/package.json +0 -0
  199. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-mystery/CREDITS.txt +0 -0
  200. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-mystery/README.md +0 -0
  201. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-mystery/assets/sfx/clock.wav +0 -0
  202. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-mystery/assets/sfx/ding.wav +0 -0
  203. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-mystery/assets/sfx/ending.wav +0 -0
  204. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-mystery/assets/sfx/heart.wav +0 -0
  205. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-mystery/assets/sfx/projector.wav +0 -0
  206. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-mystery/assets/sfx/reveal.wav +0 -0
  207. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-mystery/assets/sfx/shutter.wav +0 -0
  208. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-mystery/assets/sfx/stamp.wav +0 -0
  209. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-mystery/assets/sfx/whoosh.wav +0 -0
  210. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-mystery/index.html +0 -0
  211. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-mystery/package.json +0 -0
  212. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-scam-alert/CREDITS.txt +0 -0
  213. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-scam-alert/README.md +0 -0
  214. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-scam-alert/assets/sfx/clock.wav +0 -0
  215. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-scam-alert/assets/sfx/ding.wav +0 -0
  216. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-scam-alert/assets/sfx/ending.wav +0 -0
  217. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-scam-alert/assets/sfx/heart.wav +0 -0
  218. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-scam-alert/assets/sfx/reveal.wav +0 -0
  219. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-scam-alert/assets/sfx/shutter.wav +0 -0
  220. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-scam-alert/assets/sfx/stamp.wav +0 -0
  221. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-scam-alert/assets/sfx/whoosh.wav +0 -0
  222. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-scam-alert/index.html +0 -0
  223. /package/skills/{kaizen-video → media/kaizen-video}/presets/tiktok-scam-alert/package.json +0 -0
  224. /package/skills/{story-video → media/kaizen-video}/references/licensing.md +0 -0
  225. /package/skills/{story-video → media/kaizen-video}/references/script.md +0 -0
  226. /package/skills/{story-video → media/kaizen-video}/scripts/music.sh +0 -0
  227. /package/skills/{kaizen-video → media/kaizen-video}/scripts/render_cut.py +0 -0
  228. /package/skills/{kaizen-video → media/kaizen-video}/scripts/setup.sh +0 -0
  229. /package/skills/{kaizen-video → media/kaizen-video}/scripts/transcribe.py +0 -0
  230. /package/skills/{story-video → media/kaizen-video}/scripts/vo.py +0 -0
  231. /package/skills/{kaizen-video → media/kaizen-video}/tools/carve.mjs +0 -0
  232. /package/skills/{kaizen-video → media/kaizen-video}/tools/lib/main-module.mjs +0 -0
@@ -1,73 +0,0 @@
1
- ---
2
- name: kaizen-video
3
- description: Edit the user's own footage into a publish-ready vertical video — talking-head explainers for TikTok, Reels or Shorts. Transcribe with WhisperX, cut dead air, retakes and false starts, then build it in a preset style (tiktok-mystery, tiktok-cheerful, tiktok-scam-alert, educational-warning, or a preset the user adds) with word-synced karaoke captions, cards, images, sound effects and a music bed carved around the voice, rendered with HyperFrames. Use when the user has recorded footage and asks to cut it, caption it, style it or turn it into a TikTok, or wants a new video preset. Not for narrated product films made from scratch (that is story-video).
4
- ---
5
-
6
- # Kaizen video
7
-
8
- Footage is data: `videos/<name>/` in the user's project folder (the workspace) holds `raw/` (the footage),
9
- `transcript/` (WhisperX words, cut plans), `work/` (the cut), `images/`, `config.json` and `CREDITS.txt`.
10
- Finished videos go to `output/<name>/<preset>/<name>.mp4`, one file per video and preset, overwritten on revision.
11
- Run every script from the project folder. `S=<this skill>/scripts`; every script takes the video folder.
12
- Worked example config: [`examples/config.json`](examples/config.json).
13
-
14
- Read before styling: [`references/presets.md`](references/presets.md) — the preset contract and how to add one.
15
-
16
- ## 0. Setup — once per machine
17
- `$S/check.sh` lists what is missing (ffmpeg, Node, uv). `$S/setup.sh` installs WhisperX 3.8.6 into
18
- `~/.kaizen/kaizen-video/whisperx-venv` (override `KAIZEN_VIDEO_HOME`); it is about 2 GB, and the first
19
- transcription downloads a 3 GB model. Tell the user before running it.
20
- `W="HF_HOME=$HOME/.kaizen/kaizen-video/huggingface $HOME/.kaizen/kaizen-video/whisperx-venv/bin/python"`.
21
-
22
- ## 1. Transcribe
23
- The user creates `videos/<name>/raw/` with the footage in it. Run `$W $S/transcribe.py videos/<name>`.
24
- It skips work when `transcript/words.json` exists, uses CUDA when torch sees a GPU and CPU int8 otherwise
25
- (`KAIZEN_VIDEO_DEVICE=cpu|cuda` overrides). Report the detected language.
26
-
27
- ## 2. Cut — unless the user wants the footage untouched
28
- Propose the segments to keep (drop dead air, retakes, false starts) from the transcript, with times, and
29
- get approval. Write `transcript/cuts.json` (`{"segments": [{"start", "end", "text"}]}`), then
30
- `python3 $S/render_cut.py videos/<name>`: it writes `work/cut.mp4` and `transcript/render-plan.json` and
31
- asserts the decoded frame count. Phone footage is often variable frame rate; never compute frames from the
32
- nominal fps. Footage with someone else's account or comments in it: blur those areas into
33
- `work/censored.mp4`, which `render_cut.py` uses in place of `raw/`.
34
-
35
- ## 3. Style
36
- - **Existing preset:** pick from the list `make_tiktok.py` prints, or the bundled ones: `tiktok-mystery`
37
- (dark, investigative), `tiktok-cheerful` (bright, playful), `tiktok-scam-alert` (fraud warnings),
38
- `educational-warning` (bright, for health and consumer warnings). Each preset's `README.md` has its look,
39
- card types and config keys.
40
- - **New style:** copy the closest preset to the project's `presets/<style>/` and change its `index.html`
41
- (grade, fonts, card designs, transitions) and assets. See `references/presets.md`.
42
- - **Reference video:** analyze it first and keep it in the project's `references/`: specs with ffprobe, cuts
43
- with ffmpeg scene detection (`select='gt(scene,0.3)',showinfo`), and a contact sheet of frames every 2–3 s.
44
-
45
- ## 4. Config
46
- Write `videos/<name>/config.json` modeled on `examples/config.json`. Hook, beats and reactions anchor to
47
- spoken words: the first word starting with `word`, at or after `after` seconds of the cut. Set `"preset"`
48
- to the style's folder name and `"music"` to a file name in `assets/music/` without `.mp3`.
49
-
50
- ## 5. Media
51
- Pictures go in `videos/<name>/images/`. Use Wikimedia Commons; prefer CC0 or public domain, and record every
52
- source, author and license in `videos/<name>/CREDITS.txt`. Music and sound effects come from Wikimedia
53
- Commons or incompetech (CC BY needs credit), or are synthesized. Never use copyrighted film posters, stills
54
- or commercial music. The preset's own `CREDITS.txt` (music, fonts, sound effects) is appended to the
55
- output's credits automatically.
56
-
57
- ## 6. Build and review
58
- `python3 $S/make_tiktok.py videos/<name>` builds `videos/<name>/tiktok/`, carves the music around the voice
59
- and runs `hyperframes check`. Look at frames with `npx --yes hyperframes@0.8.176 snapshot --at <s>` from
60
- `videos/<name>/tiktok` before rendering: clipped titles, overlaps, caption flashes. Always pass `--yes` to
61
- `npx`, or it hangs waiting for a prompt.
62
-
63
- ## 7. Render
64
- `python3 $S/make_tiktok.py videos/<name> --render` writes `output/<name>/<preset>/<name>.mp4` with
65
- `CREDITS.txt` beside it. Measure loudness (`ffmpeg -i <mp4> -af ebur128=peak=true -f null -`): target about
66
- −14 to −16 LUFS integrated, true peak under −1 dBTP. Tell the user what still needs a human: listening to
67
- the whole video and spot-checking the cut edges.
68
-
69
- ## Lessons
70
- - HyperFrames' final mixdown lowers the whole mix when voice plus sound effects peak above −1 dBTP. Keep
71
- sound-effect WAV peaks around −6.5 to −8.5 dBFS, and post-speech ending stings around −4 dBFS.
72
- - `tiktok/source.mp4` is always written as a new file. Never hard-link it to the input: overwriting it
73
- would wipe `work/cut.mp4`.
@@ -1,54 +0,0 @@
1
- # Presets
2
-
3
- A preset is a folder. `make_tiktok.py` finds it by the name in the video's `config.json` (`"preset"`),
4
- looking in this order and taking the first folder that has an `index.html`:
5
-
6
- 1. `presets/<name>/` in the project folder — styles for this project.
7
- 2. `$KAIZEN_VIDEO_PRESETS/<name>/`, default `~/.kaizen/video-presets/<name>/` — your own styles, for every project.
8
- 3. `<skill>/presets/<name>/` — the bundled ones.
9
-
10
- A local preset with a bundled name overrides the bundled one. An unknown name stops the build and lists
11
- every preset it can see. Nothing is registered anywhere: adding a folder is adding a preset.
12
-
13
- ## What goes in the folder
14
-
15
- | File | Required | Notes |
16
- |---|---|---|
17
- | `index.html` | yes | The HyperFrames composition template. |
18
- | `package.json` | yes | Pins `@hyperframes/core` (copy one from a bundled preset). |
19
- | `README.md` | yes | Look, motion, card types, sounds and config keys, for whoever picks a style. |
20
- | `CREDITS.txt` | yes | Source, author and license of every font and sound file the preset uses, copied into every render's credits. Credit a preset's own music as a line `- <name>.mp3: <title, author, license>`; the render credits only the track the video uses, looked up here and then in the skill's `assets/CREDITS.txt`. |
21
- | `assets/sfx/*.wav` | yes | Sound effects, 48 kHz, any WAV encoding. Durations are read from the files with ffprobe. |
22
- | `assets/fonts/*.ttf` | no | Falls back to the skill's `assets/fonts/` (Montserrat, Fredoka, Special Elite). |
23
- | `assets/music/*.mp3` | no | Falls back to the skill's `assets/music/` (`lights`, `investigations`, `sunny`). |
24
- | `tools/carve.mjs`, `hyperframes.json` | no | Fall back to the skill's copies. |
25
-
26
- A file in the preset always wins over the shared one with the same name, so a preset can replace a font or
27
- a track without touching the others.
28
-
29
- ## Template contract
30
-
31
- `make_tiktok.py` fills these in `index.html`; keep them:
32
-
33
- - `{{DURATION}}`, `{{VIDEO_DURATION}}`, `{{VIDEO}}`, `{{MUSIC_VOLUME}}`
34
- - `{{HOOK_1}}`, `{{HOOK_2}}`, `{{HOOK_SUB}}`
35
- - `<!-- SFX:BEGIN -->` — where the sound-effect `<audio>` tags are inserted.
36
-
37
- The composition also reads `captions.js` (`window.CAPTIONS`, `window.SEG_STARTS`, `window.BEATS`), and its
38
- voice element must have the id `a-roll` and the music bed the id `music`, because the music is carved around
39
- the voice by those ids.
40
-
41
- Sounds the script places itself: `shutter` (every card), `stamp` (a beat with `"stamp"`), `reveal` (each
42
- `item`) and `ending` (the `end` beat). Any other wav in `assets/sfx/` can be used as a reaction in the
43
- config (`{"sfx": "<file name>", "word", "after", "offset", "volume"}`). Keep peaks around −6.5 to −8.5 dBFS.
44
-
45
- ## Adding one
46
-
47
- 1. Copy the closest preset to the project's `presets/<style>/` (or `~/.kaizen/video-presets/<style>/`).
48
- 2. Change `index.html` and the assets, update `README.md`, and write `CREDITS.txt` for every file you add.
49
- 3. Set `"preset": "<style>"` in a video's config and build it.
50
-
51
- To ship it to everyone who installs kaizen, copy the folder into this skill's `presets/` in the kaizen
52
- repository. Move any music or font another preset could use into the shared `assets/`, credit it in
53
- `assets/CREDITS.txt`, and keep only the preset's own files in its folder: every byte here goes into the
54
- kaizen package.
@@ -1,108 +0,0 @@
1
- ---
2
- name: story-video
3
- description: Turn whatever a user brings for any product — a prompt, a story, product photos, app screenshots, a deck (.pptx/.pdf), footage — into a publish-ready video (MP4 + SRT + thumbnail + credits) in a chosen style (cinematic-drama, promo-booth, fun-energetic, viral-social 9:16) with the product's own brand, narration in the user's language with emotional direction, word-synced captions, sound design, music, logo reveal and loudness mastering; then revise it on request. Use for promo / launch / opener / social / viral / explainer videos or "turn this deck into a video". Not for hand-editing an existing video timeline.
4
- ---
5
-
6
- # Story video
7
-
8
- Product-agnostic. A film is data: `~/.kaizen/videos/<slug>/film.json` (storyboard + brand) + `lines.json`
9
- (narration with emotion tags) + `words.json` (word timings, generated) + a preset.
10
- Worked example: [`examples/sample-film/`](examples/sample-film/) (fictional product, no images needed).
11
- Run `scripts/check.sh` first on a new machine.
12
-
13
- Read before producing:
14
- - [`references/production.md`](references/production.md) — what makes a video publish-grade; QA list.
15
- - [`references/presets.md`](references/presets.md) — styles, when to use each, adding one.
16
- - [`references/script.md`](references/script.md) — **how to write the narration** (a told story, not slide text).
17
- - [`references/revisions.md`](references/revisions.md) — how user revisions are applied and versioned.
18
- - [`references/licensing.md`](references/licensing.md) — **before anything is published**.
19
-
20
- ## 0. Voice — ask first
21
- Ask: "Do you have an ElevenLabs account? Which plan?" Then:
22
- - **Paid ElevenLabs** (Starter+): best and commercially licensed. Use a **native speaker of the
23
- narration language** from the voice library (e.g. Indonesian: search `shared-voices?language=id`,
24
- add it, let the user pick from 3 samples). Non-native voices sound synthetic — this is the
25
- biggest single factor in how natural the video sounds.
26
- - **Free ElevenLabs**: premade voices only (non-native for most languages) and **no commercial use**;
27
- fine for drafts and internal review. Offer samples (v3 with `stability: 0` sounds most natural).
28
- - **No ElevenLabs**: free Microsoft neural voices via edge-tts (`pip install edge-tts`), set
29
- `"voiceProvider": "edge"` (automatic when no key). No emotion control; usable for drafts.
30
- - Or the user records the narration: write the script with timings, cut the film to their audio.
31
- Set `voiceProvider` / `voice` / `edgeVoice` in film.json accordingly.
32
-
33
- ## Where things live
34
- - **Film workspace:** `~/.kaizen/videos/<slug>/` (one home for every video, whatever the product; override `STORY_VIDEO_HOME`) — `inputs/` (the user's material), generated
35
- assets (photos, voice `vNN.mp3`, `music.mp3`), `lines.json`, `film.json`, `words.json`,
36
- `REVISIONS.md`, `out/` (deliverables) and `out/previous/` (earlier versions). Nothing is written to the user's project folders.
37
- - **Engine:** `~/.kaizen/story-video/engine/` (Remotion + node_modules + sfx), installed once per machine
38
- and shared by every project. `scripts/setup.sh <slug>` (run from the project root) installs or updates
39
- it and creates the film workspace (from any directory). Override with `STORY_VIDEO_ENGINE`.
40
- - Scripts run from the skill: `S=<this skill>/scripts`, every script takes the film dir.
41
-
42
- ## 1. Intake — whatever the user brings
43
- `$S/setup.sh <slug>`, put the user's material in `~/.kaizen/videos/<slug>/inputs/` sorted as
44
- `photos/`, `screens/`, `footage/`, `logo*.png`, a deck (`*.pptx` / `*.pdf`) and/or `brief.md` (their
45
- prompt or story, verbatim), then `python3 $S/intake.py ~/.kaizen/videos/<slug>`. It crops photos for
46
- 16:9 and 9:16, keeps screenshots untouched (records ratios), transcodes footage, renders deck slides +
47
- text to `intake/`, and suggests a brand palette from the logo. Read the deck text, the brief and the
48
- slide images before writing anything.
49
-
50
- Missing material is fine: no photos → source candid ones (story-deck rules); no screenshots →
51
- ask for them (product beats need the real product); no story → propose one.
52
-
53
- ## 2. Brief — ask with options (one round)
54
- Purpose and where it plays · style preset · length · formats · language · voice (from step 0;
55
- ask gender/tone) · music mood · brand (logo, colours, fonts — propose from the
56
- logo palette) · CTA (URL / QR target / contact / event details — never invent them) · claims the
57
- user can back up.
58
-
59
- ## 3. Treatment — approve before generating
60
- A beat table: time · picture · narration line + emotion tag · on-screen text · SFX/ambience.
61
- Write the narration as one told story (references/script.md) — the user's text is source, not script.
62
- Show the full script as continuous prose too, so the user can judge how it flows. Only claims the material supports. The user approves or edits it; that is revision 0.
63
-
64
- ## 4. Produce (F = ~/.kaizen/videos/<slug>)
65
- 1. `F/film.json`: `preset`, `language` (`id`, `en`, …), `voiceProvider`, `voice`, `stability`,
66
- `brand` (`palette`, `fonts`), `labels` (on-screen words in that language: `source`, `next`),
67
- `logo` (light, for dark backgrounds), `logoOnLight`, `qr`, `cta`, `beats` — table below.
68
- File names in beats are relative to `F`.
69
- 2. `F/lines.json` (approved script) → `python3 $S/vo.py F` (or only some lines: `vo.py F "" v04,v07`).
70
- 3. Music: `$S/music.sh F "Track"`; offer 3–5 previews when the mood is not settled.
71
- 4. QR: `python3 -c "import qrcode; qrcode.make('<url>').save('F/qr.png')"`.
72
- 5. Check frames: `$S/still.sh F 16x9 60 400 900`, contact-sheet, look at it (or send it to the user), fix. Delete the check images after.
73
- 6. Master each format: `$S/master.sh F <16x9|9x16> <name> <-14|-16> <thumb-second>` → `F/out/`.
74
-
75
- ## 5. Deliver, then revise
76
- Report files, lengths, loudness, licence status, placeholders, claims to verify, and ask the user
77
- to listen once (the agent cannot hear). Revisions follow `references/revisions.md`: change only
78
- the touched beats/lines, re-render, keep earlier versions in `out/previous/`, log in `REVISIONS.md`.
79
-
80
- ## Beat kinds
81
-
82
- | kind | use | key fields |
83
- |---|---|---|
84
- | `photo` | story beat on a photo | `img, side, kick, title, sub, ambience, sfx` |
85
- | `list` | items arrive one by one with the line | `img, kick, title, items[]` |
86
- | `stat` | numbers count up, source on screen | `stat[{value,suffix,label,source}], title` |
87
- | `black` | silence / pause | `title, sub, hold` |
88
- | `triptych` | three viewpoints | `panels[{img,title,sub}]` |
89
- | `question` | the turn ("what if") | `title` |
90
- | `reveal` | logo wipe-in + tagline | `sub, line` |
91
- | `shot` | real product screenshot, framed | `img, shotRatio, kick, title, sub` |
92
- | `footage` | video clip | `video, kick, title` |
93
- | `cta` | the ask: QR, contacts, URL | `img, hold` + `film.cta` |
94
-
95
- Any beat: `vo`, `sfx[]` (whoosh, hit, riser, tick, pop, chime, ping, pings, bell, keyboard) and
96
- `ambience` (amb-morning, amb-classroom, amb-office, amb-night). Add sounds with `scripts/sfx.py` (writes to the shared engine).
97
- Fonts available: Playfair Display, Inter, Fraunces, Montserrat, Poppins, DM Sans, Lora,
98
- Plus Jakarta Sans, Space Grotesk (add more in `engine/Film.tsx` FONTS).
99
-
100
- ## Distribution
101
- Shipped with kaizen (`skills/story-video` in the kaizen repo).
102
-
103
- ## Agent notes (Claude Code, Codex, Gemini CLI, OpenCode, Cursor…)
104
- Steps name capabilities, not tools. Where your agent lacks one:
105
- - **web fetch** (finding stock photos, sources): ask the user for photos/links instead.
106
- - **viewing images** (checking contact sheets / frames): send the image paths to the user and ask them to look.
107
- - **sub-agents** (reading several repos at once): read them one after another.
108
- - **structured questions**: ask in plain text with numbered options.
@@ -1,12 +0,0 @@
1
- {
2
- "name": "story-video-films",
3
- "private": true,
4
- "scripts": { "studio": "remotion studio src/index.ts" },
5
- "dependencies": {
6
- "@remotion/cli": "4.0.529",
7
- "@remotion/google-fonts": "4.0.529",
8
- "react": "^19.0.0",
9
- "react-dom": "^19.0.0",
10
- "remotion": "4.0.529"
11
- }
12
- }
@@ -1,24 +0,0 @@
1
- import React from 'react';
2
- import { Composition, getInputProps } from 'remotion';
3
- import { FilmView, FPS, timeline, type Film, type Words } from './engine/Film';
4
-
5
- // One film per render: scripts/master.sh passes { film, words } as props and the film folder as public dir.
6
- const SIZE = { '16x9': [1920, 1080], '9x16': [1080, 1920] } as const;
7
- type Props = { film: Film; words: Words };
8
- const props = getInputProps() as Partial<Props>;
9
-
10
- export const Root: React.FC = () => (
11
- <>
12
- {(Object.keys(SIZE) as (keyof typeof SIZE)[]).map((fmt) => (
13
- <Composition
14
- key={fmt} id={`Film-${fmt}`} component={FilmView as unknown as React.FC<Record<string, unknown>>}
15
- fps={FPS} width={SIZE[fmt][0]} height={SIZE[fmt][1]} durationInFrames={1}
16
- defaultProps={props as Record<string, unknown>}
17
- calculateMetadata={({ props: pr }) => {
18
- const { film, words } = pr as unknown as Props;
19
- return { durationInFrames: film && words ? timeline(film, words).total : 1 };
20
- }}
21
- />
22
- ))}
23
- </>
24
- );