@growthub/cli 0.8.0 → 0.8.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 (132) hide show
  1. package/assets/worker-kits/growthub-agency-portal-starter-v1/.env.example +53 -0
  2. package/assets/worker-kits/growthub-agency-portal-starter-v1/QUICKSTART.md +98 -0
  3. package/assets/worker-kits/growthub-agency-portal-starter-v1/SKILL.md +89 -0
  4. package/assets/worker-kits/growthub-agency-portal-starter-v1/apps/agency-portal/.env.example +25 -0
  5. package/assets/worker-kits/growthub-agency-portal-starter-v1/apps/agency-portal/README.md +36 -0
  6. package/assets/worker-kits/growthub-agency-portal-starter-v1/apps/agency-portal/app/api/settings/integrations/route.js +13 -0
  7. package/assets/worker-kits/growthub-agency-portal-starter-v1/apps/agency-portal/app/api/workspace/route.js +27 -0
  8. package/assets/worker-kits/growthub-agency-portal-starter-v1/apps/agency-portal/app/globals.css +237 -0
  9. package/assets/worker-kits/growthub-agency-portal-starter-v1/apps/agency-portal/app/layout.jsx +14 -0
  10. package/assets/worker-kits/growthub-agency-portal-starter-v1/apps/agency-portal/app/page.jsx +165 -0
  11. package/assets/worker-kits/growthub-agency-portal-starter-v1/apps/agency-portal/app/settings/integrations/page.jsx +134 -0
  12. package/assets/worker-kits/growthub-agency-portal-starter-v1/apps/agency-portal/lib/adapters/auth/index.js +21 -0
  13. package/assets/worker-kits/growthub-agency-portal-starter-v1/apps/agency-portal/lib/adapters/env.js +28 -0
  14. package/assets/worker-kits/growthub-agency-portal-starter-v1/apps/agency-portal/lib/adapters/integrations/growthub-connection-normalizer.js +95 -0
  15. package/assets/worker-kits/growthub-agency-portal-starter-v1/apps/agency-portal/lib/adapters/integrations/index.js +178 -0
  16. package/assets/worker-kits/growthub-agency-portal-starter-v1/apps/agency-portal/lib/adapters/payments/index.js +13 -0
  17. package/assets/worker-kits/growthub-agency-portal-starter-v1/apps/agency-portal/lib/adapters/persistence/index.js +13 -0
  18. package/assets/worker-kits/growthub-agency-portal-starter-v1/apps/agency-portal/lib/adapters/persistence/postgres.js +16 -0
  19. package/assets/worker-kits/growthub-agency-portal-starter-v1/apps/agency-portal/lib/adapters/persistence/provider-managed.js +16 -0
  20. package/assets/worker-kits/growthub-agency-portal-starter-v1/apps/agency-portal/lib/adapters/persistence/qstash-kv.js +16 -0
  21. package/assets/worker-kits/growthub-agency-portal-starter-v1/apps/agency-portal/lib/domain/integrations.js +185 -0
  22. package/assets/worker-kits/growthub-agency-portal-starter-v1/apps/agency-portal/lib/domain/portal.js +16 -0
  23. package/assets/worker-kits/growthub-agency-portal-starter-v1/apps/agency-portal/next.config.js +10 -0
  24. package/assets/worker-kits/growthub-agency-portal-starter-v1/apps/agency-portal/package-lock.json +976 -0
  25. package/assets/worker-kits/growthub-agency-portal-starter-v1/apps/agency-portal/package.json +17 -0
  26. package/assets/worker-kits/growthub-agency-portal-starter-v1/apps/agency-portal/postcss.config.mjs +3 -0
  27. package/assets/worker-kits/growthub-agency-portal-starter-v1/apps/agency-portal/vercel.json +5 -0
  28. package/assets/worker-kits/growthub-agency-portal-starter-v1/brands/NEW-CLIENT.md +10 -0
  29. package/assets/worker-kits/growthub-agency-portal-starter-v1/brands/_template/brand-kit.md +27 -0
  30. package/assets/worker-kits/growthub-agency-portal-starter-v1/brands/growthub/brand-kit.md +25 -0
  31. package/assets/worker-kits/growthub-agency-portal-starter-v1/bundles/growthub-agency-portal-starter-v1.json +65 -0
  32. package/assets/worker-kits/growthub-agency-portal-starter-v1/docs/adapter-contracts.md +79 -0
  33. package/assets/worker-kits/growthub-agency-portal-starter-v1/docs/fork-sync-integration.md +32 -0
  34. package/assets/worker-kits/growthub-agency-portal-starter-v1/docs/governed-workspace-primitives.md +182 -0
  35. package/assets/worker-kits/growthub-agency-portal-starter-v1/docs/starter-kit-overview.md +30 -0
  36. package/assets/worker-kits/growthub-agency-portal-starter-v1/docs/vercel-serverless-deployment.md +46 -0
  37. package/assets/worker-kits/growthub-agency-portal-starter-v1/docs/vite-ui-shell-guide.md +24 -0
  38. package/assets/worker-kits/growthub-agency-portal-starter-v1/examples/portal-brief-sample.md +44 -0
  39. package/assets/worker-kits/growthub-agency-portal-starter-v1/examples/workspace-sample.md +10 -0
  40. package/assets/worker-kits/growthub-agency-portal-starter-v1/growthub-meta/README.md +11 -0
  41. package/assets/worker-kits/growthub-agency-portal-starter-v1/growthub-meta/kit-standard.md +16 -0
  42. package/assets/worker-kits/growthub-agency-portal-starter-v1/helpers/README.md +49 -0
  43. package/assets/worker-kits/growthub-agency-portal-starter-v1/kit.json +156 -0
  44. package/assets/worker-kits/growthub-agency-portal-starter-v1/output/README.md +13 -0
  45. package/assets/worker-kits/growthub-agency-portal-starter-v1/output-standards.md +25 -0
  46. package/assets/worker-kits/growthub-agency-portal-starter-v1/runtime-assumptions.md +15 -0
  47. package/assets/worker-kits/growthub-agency-portal-starter-v1/setup/check-deps.sh +20 -0
  48. package/assets/worker-kits/growthub-agency-portal-starter-v1/setup/verify-env.mjs +92 -0
  49. package/assets/worker-kits/growthub-agency-portal-starter-v1/skills/README.md +55 -0
  50. package/assets/worker-kits/growthub-agency-portal-starter-v1/skills.md +133 -0
  51. package/assets/worker-kits/growthub-agency-portal-starter-v1/studio/index.html +12 -0
  52. package/assets/worker-kits/growthub-agency-portal-starter-v1/studio/package-lock.json +1677 -0
  53. package/assets/worker-kits/growthub-agency-portal-starter-v1/studio/package.json +20 -0
  54. package/assets/worker-kits/growthub-agency-portal-starter-v1/studio/serve.mjs +42 -0
  55. package/assets/worker-kits/growthub-agency-portal-starter-v1/studio/src/App.jsx +162 -0
  56. package/assets/worker-kits/growthub-agency-portal-starter-v1/studio/src/app.css +138 -0
  57. package/assets/worker-kits/growthub-agency-portal-starter-v1/studio/src/main.jsx +10 -0
  58. package/assets/worker-kits/growthub-agency-portal-starter-v1/studio/vite.config.js +8 -0
  59. package/assets/worker-kits/growthub-agency-portal-starter-v1/templates/agent-contract.md +9 -0
  60. package/assets/worker-kits/growthub-agency-portal-starter-v1/templates/client-onboarding-plan.md +56 -0
  61. package/assets/worker-kits/growthub-agency-portal-starter-v1/templates/deployment-handoff.md +61 -0
  62. package/assets/worker-kits/growthub-agency-portal-starter-v1/templates/deployment-plan.md +22 -0
  63. package/assets/worker-kits/growthub-agency-portal-starter-v1/templates/portal-brief.md +65 -0
  64. package/assets/worker-kits/growthub-agency-portal-starter-v1/templates/project.md +55 -0
  65. package/assets/worker-kits/growthub-agency-portal-starter-v1/templates/self-eval.md +67 -0
  66. package/assets/worker-kits/growthub-agency-portal-starter-v1/templates/supabase-setup-plan.md +26 -0
  67. package/assets/worker-kits/growthub-agency-portal-starter-v1/templates/workspace-brief.md +11 -0
  68. package/assets/worker-kits/growthub-agency-portal-starter-v1/validation-checklist.md +32 -0
  69. package/assets/worker-kits/growthub-agency-portal-starter-v1/workers/agency-portal-operator/CLAUDE.md +75 -0
  70. package/assets/worker-kits/growthub-creative-video-pipeline-v1/.env.example +28 -0
  71. package/assets/worker-kits/growthub-creative-video-pipeline-v1/QUICKSTART.md +118 -0
  72. package/assets/worker-kits/growthub-creative-video-pipeline-v1/SKILL.md +103 -0
  73. package/assets/worker-kits/growthub-creative-video-pipeline-v1/apps/creative-video-pipeline/.env.example +20 -0
  74. package/assets/worker-kits/growthub-creative-video-pipeline-v1/apps/creative-video-pipeline/README.md +33 -0
  75. package/assets/worker-kits/growthub-creative-video-pipeline-v1/apps/creative-video-pipeline/app/api/pipeline/route.js +27 -0
  76. package/assets/worker-kits/growthub-creative-video-pipeline-v1/apps/creative-video-pipeline/app/globals.css +203 -0
  77. package/assets/worker-kits/growthub-creative-video-pipeline-v1/apps/creative-video-pipeline/app/layout.jsx +14 -0
  78. package/assets/worker-kits/growthub-creative-video-pipeline-v1/apps/creative-video-pipeline/app/page.jsx +131 -0
  79. package/assets/worker-kits/growthub-creative-video-pipeline-v1/apps/creative-video-pipeline/app/settings/keys/page.jsx +154 -0
  80. package/assets/worker-kits/growthub-creative-video-pipeline-v1/apps/creative-video-pipeline/lib/adapters/env.js +14 -0
  81. package/assets/worker-kits/growthub-creative-video-pipeline-v1/apps/creative-video-pipeline/lib/adapters/generative/index.js +31 -0
  82. package/assets/worker-kits/growthub-creative-video-pipeline-v1/apps/creative-video-pipeline/lib/domain/pipeline.js +30 -0
  83. package/assets/worker-kits/growthub-creative-video-pipeline-v1/apps/creative-video-pipeline/next.config.js +10 -0
  84. package/assets/worker-kits/growthub-creative-video-pipeline-v1/apps/creative-video-pipeline/package-lock.json +17 -0
  85. package/assets/worker-kits/growthub-creative-video-pipeline-v1/apps/creative-video-pipeline/package.json +17 -0
  86. package/assets/worker-kits/growthub-creative-video-pipeline-v1/apps/creative-video-pipeline/postcss.config.mjs +3 -0
  87. package/assets/worker-kits/growthub-creative-video-pipeline-v1/apps/creative-video-pipeline/vercel.json +5 -0
  88. package/assets/worker-kits/growthub-creative-video-pipeline-v1/brands/NEW-CLIENT.md +21 -0
  89. package/assets/worker-kits/growthub-creative-video-pipeline-v1/brands/_template/brand-kit.md +123 -0
  90. package/assets/worker-kits/growthub-creative-video-pipeline-v1/brands/growthub/brand-kit.md +123 -0
  91. package/assets/worker-kits/growthub-creative-video-pipeline-v1/bundles/growthub-creative-video-pipeline-v1.json +83 -0
  92. package/assets/worker-kits/growthub-creative-video-pipeline-v1/docs/adapter-contracts.md +73 -0
  93. package/assets/worker-kits/growthub-creative-video-pipeline-v1/docs/governed-workspace-primitives.md +50 -0
  94. package/assets/worker-kits/growthub-creative-video-pipeline-v1/docs/pipeline-architecture.md +61 -0
  95. package/assets/worker-kits/growthub-creative-video-pipeline-v1/docs/starter-kit-overview.md +33 -0
  96. package/assets/worker-kits/growthub-creative-video-pipeline-v1/docs/vercel-deployment.md +42 -0
  97. package/assets/worker-kits/growthub-creative-video-pipeline-v1/examples/pipeline-brief-sample.md +56 -0
  98. package/assets/worker-kits/growthub-creative-video-pipeline-v1/growthub-meta/README.md +9 -0
  99. package/assets/worker-kits/growthub-creative-video-pipeline-v1/growthub-meta/kit-standard.md +24 -0
  100. package/assets/worker-kits/growthub-creative-video-pipeline-v1/helpers/README.md +8 -0
  101. package/assets/worker-kits/growthub-creative-video-pipeline-v1/helpers/check-generative-adapter.sh +41 -0
  102. package/assets/worker-kits/growthub-creative-video-pipeline-v1/helpers/run-pipeline.sh +30 -0
  103. package/assets/worker-kits/growthub-creative-video-pipeline-v1/kit.json +148 -0
  104. package/assets/worker-kits/growthub-creative-video-pipeline-v1/output/README.md +23 -0
  105. package/assets/worker-kits/growthub-creative-video-pipeline-v1/output-standards.md +63 -0
  106. package/assets/worker-kits/growthub-creative-video-pipeline-v1/runtime-assumptions.md +61 -0
  107. package/assets/worker-kits/growthub-creative-video-pipeline-v1/setup/check-deps.sh +63 -0
  108. package/assets/worker-kits/growthub-creative-video-pipeline-v1/setup/clone-fork.sh +18 -0
  109. package/assets/worker-kits/growthub-creative-video-pipeline-v1/setup/install-skill.sh +10 -0
  110. package/assets/worker-kits/growthub-creative-video-pipeline-v1/setup/verify-env.mjs +50 -0
  111. package/assets/worker-kits/growthub-creative-video-pipeline-v1/skills/README.md +11 -0
  112. package/assets/worker-kits/growthub-creative-video-pipeline-v1/skills/brief-generation/SKILL.md +42 -0
  113. package/assets/worker-kits/growthub-creative-video-pipeline-v1/skills/generative-execution/SKILL.md +86 -0
  114. package/assets/worker-kits/growthub-creative-video-pipeline-v1/skills/video-edit/SKILL.md +41 -0
  115. package/assets/worker-kits/growthub-creative-video-pipeline-v1/skills.md +302 -0
  116. package/assets/worker-kits/growthub-creative-video-pipeline-v1/studio/index.html +12 -0
  117. package/assets/worker-kits/growthub-creative-video-pipeline-v1/studio/package-lock.json +20 -0
  118. package/assets/worker-kits/growthub-creative-video-pipeline-v1/studio/package.json +20 -0
  119. package/assets/worker-kits/growthub-creative-video-pipeline-v1/studio/serve.mjs +41 -0
  120. package/assets/worker-kits/growthub-creative-video-pipeline-v1/studio/src/App.jsx +210 -0
  121. package/assets/worker-kits/growthub-creative-video-pipeline-v1/studio/src/app.css +194 -0
  122. package/assets/worker-kits/growthub-creative-video-pipeline-v1/studio/src/main.jsx +10 -0
  123. package/assets/worker-kits/growthub-creative-video-pipeline-v1/studio/vite.config.js +8 -0
  124. package/assets/worker-kits/growthub-creative-video-pipeline-v1/templates/edit-plan.md +66 -0
  125. package/assets/worker-kits/growthub-creative-video-pipeline-v1/templates/generative-plan.md +83 -0
  126. package/assets/worker-kits/growthub-creative-video-pipeline-v1/templates/pipeline-brief.md +129 -0
  127. package/assets/worker-kits/growthub-creative-video-pipeline-v1/templates/project.md +68 -0
  128. package/assets/worker-kits/growthub-creative-video-pipeline-v1/templates/self-eval.md +67 -0
  129. package/assets/worker-kits/growthub-creative-video-pipeline-v1/validation-checklist.md +52 -0
  130. package/assets/worker-kits/growthub-creative-video-pipeline-v1/workers/creative-video-pipeline-operator/CLAUDE.md +109 -0
  131. package/dist/index.js +42 -33
  132. package/package.json +1 -1
@@ -0,0 +1,41 @@
1
+ ---
2
+ id: creative-video-pipeline/video-edit
3
+ name: creative-video-pipeline-video-edit
4
+ description: Prepare the Stage 3 edit handoff for the VIDEO_USE_HOME fork and collect final video output.
5
+ version: 1.0.0
6
+ triggers:
7
+ - "run edit stage"
8
+ - "stage 3 edit"
9
+ - "assemble final video"
10
+ - "video-use edit"
11
+ selfEval:
12
+ criteria:
13
+ - "edit-plan.md written from generative manifest and brief"
14
+ - "VIDEO_USE_HOME is set and resolves to a cloned video-use fork"
15
+ - "Handoff to video-use fork executed — do not duplicate video-use pipeline logic"
16
+ - "final.mp4 copied to output/<client>/<project>/final/"
17
+ - "project.md and trace.jsonl updated with Stage 3 completion"
18
+ maxRetries: 3
19
+ ---
20
+
21
+ # Video Edit Sub-Skill
22
+
23
+ ## Role
24
+ Execute Stage 3: delegate edit to the `VIDEO_USE_HOME` video-use fork and collect final output.
25
+
26
+ ## Dependencies
27
+ - `VIDEO_USE_HOME` — absolute path to video-use fork clone
28
+ - `ELEVENLABS_API_KEY` — for ElevenLabs Scribe word-level transcription
29
+ - `ffmpeg` — must be on PATH inside the video-use fork environment
30
+
31
+ ## Process
32
+ 1. Read `output/<client>/<project>/generative/manifest.json` to identify source clips
33
+ 2. Read `output/<client>/<project>/brief/pipeline-brief.md` for editing guidelines
34
+ 3. Write `output/<client>/<project>/edit-plan.md` from `templates/edit-plan.md`
35
+ 4. Delegate to video-use fork — do NOT inline video-use logic here
36
+ 5. Copy final rendered `final.mp4` to `output/<client>/<project>/final/final.mp4`
37
+ 6. Append Stage 3 completion to `project.md` and `trace.jsonl`
38
+
39
+ ## Handoff
40
+ The video-use fork owns the full Scribe → word-boundary EDL → FFmpeg render pipeline.
41
+ This sub-skill's only job is to form the `edit-plan.md` handoff and collect the output artifact.
@@ -0,0 +1,302 @@
1
+ # Creative Video Pipeline — Operator Runbook
2
+
3
+ > **Who this is for:** Any agent operating inside `${CREATIVE_VIDEO_PIPELINE_HOME:-$HOME/creative-video-pipeline}/` and running the three-stage creative video pipeline.
4
+ > Read this file fully before starting. Every section is a required step.
5
+
6
+ ---
7
+
8
+ ## QUICK REFERENCE
9
+
10
+ | What you need | Where to find it |
11
+ |---|---|
12
+ | This runbook | `skills.md` ← you are here |
13
+ | Routing menu | `SKILL.md` |
14
+ | Agent contract | `workers/creative-video-pipeline-operator/CLAUDE.md` |
15
+ | Brief template | `templates/pipeline-brief.md` |
16
+ | Brand kit template | `brands/_template/brand-kit.md` |
17
+ | Generative plan template | `templates/generative-plan.md` |
18
+ | Edit plan template | `templates/edit-plan.md` |
19
+ | Session memory | `.growthub-fork/project.md` |
20
+ | Output directory | `output/<client-slug>/<project-slug>/` |
21
+ | Adapter contracts | `docs/adapter-contracts.md` |
22
+ | Pipeline architecture | `docs/pipeline-architecture.md` |
23
+
24
+ ---
25
+
26
+ ## STAGE 0 — PREPARE
27
+
28
+ ### 0a. Environment check
29
+
30
+ ```bash
31
+ bash setup/check-deps.sh
32
+ node setup/verify-env.mjs
33
+ ```
34
+
35
+ If deps fail, stop and return remediation only. Do not invent API keys or hardcode paths.
36
+
37
+ ### 0b. Verify generative adapter
38
+
39
+ ```bash
40
+ bash helpers/check-generative-adapter.sh
41
+ ```
42
+
43
+ Prints active adapter (`growthub-pipeline` or `byo-api-key`) and which keys are set.
44
+
45
+ ### 0c. Auth pre-flight (growthub-pipeline adapter only)
46
+
47
+ ```bash
48
+ growthub auth whoami --json
49
+ ```
50
+
51
+ If not authenticated, run `growthub auth login` before proceeding.
52
+
53
+ ### 0d. Create or load brand kit
54
+
55
+ ```bash
56
+ # New client
57
+ cp ${CREATIVE_VIDEO_PIPELINE_HOME:-$HOME/creative-video-pipeline}/brands/_template/brand-kit.md \
58
+ ${CREATIVE_VIDEO_PIPELINE_HOME:-$HOME/creative-video-pipeline}/brands/<client-slug>/brand-kit.md
59
+
60
+ # Existing client
61
+ cat ${CREATIVE_VIDEO_PIPELINE_HOME:-$HOME/creative-video-pipeline}/brands/<client-slug>/brand-kit.md
62
+ ```
63
+
64
+ Required fields: `client_name`, `slug`, `primary_service`, `tone`, `messaging_guardrails`, `cta_text`, `colors`.
65
+
66
+ ---
67
+
68
+ ## STAGE 1 — BRIEF
69
+
70
+ Sub-skill: `skills/brief-generation/SKILL.md`
71
+
72
+ ### 1a. Build scene structure
73
+
74
+ From the brand kit and campaign intent, produce a scene table:
75
+
76
+ ```
77
+ Scene 1 — Hook N variations (A–E), same creative concept
78
+ Scene 2 — Problem consistent across all hook variations
79
+ Scene 3 — Solution consistent across all hook variations
80
+ Scene N — CTA consistent across all hook variations
81
+ ```
82
+
83
+ Hook sources (in priority order):
84
+ 1. `${CREATIVE_STRATEGIST_HOME:-$HOME/creative-strategist}/templates/hooks-library/500-winning-hooks.csv` — if the creative-strategist kit is installed
85
+ 2. Inline hook reasoning from brand kit tone and `approved_phrases`
86
+
87
+ ### 1b. Write the brief
88
+
89
+ Fill `templates/pipeline-brief.md` and write the output to:
90
+
91
+ ```
92
+ output/<client-slug>/<project-slug>/brief/pipeline-brief.md
93
+ ```
94
+
95
+ Required sections:
96
+ 1. Brand constraints box — from `messaging_guardrails`
97
+ 2. Scene structure table
98
+ 3. Hook variations A–E for Scene 1
99
+ 4. Per-scene production notes (visual direction, VO, on-screen text)
100
+ 5. Editing guidelines
101
+ 6. Appendix: AI generation prompts (labeled OPTIONAL) — used in Stage 2
102
+
103
+ ### 1c. Append to session memory
104
+
105
+ ```bash
106
+ # After completing Stage 1:
107
+ # Append to .growthub-fork/project.md with: stage, client, brief path, hook count, scene count
108
+ ```
109
+
110
+ **Self-eval unit for Stage 1:** The completed `pipeline-brief.md` for one creative concept.
111
+
112
+ ---
113
+
114
+ ## STAGE 2 — GENERATE
115
+
116
+ Sub-skill: `skills/generative-execution/SKILL.md`
117
+
118
+ ### 2a. Resolve adapter
119
+
120
+ ```bash
121
+ bash helpers/check-generative-adapter.sh
122
+ ```
123
+
124
+ ### 2b. Build generative plan
125
+
126
+ Fill `templates/generative-plan.md` with:
127
+ - Node bindings (which scenes become video clips, which become images)
128
+ - Reference images (if any — as typed data URLs per `@growthub/api-contract` ref spec)
129
+ - Provider model choice
130
+ - Prompts from Stage 1 brief Appendix
131
+
132
+ ### 2c. Execute — growthub-pipeline path (primary)
133
+
134
+ ```bash
135
+ bash helpers/run-pipeline.sh
136
+ ```
137
+
138
+ Or directly:
139
+
140
+ ```bash
141
+ # Auth pre-flight
142
+ growthub auth whoami --json || { echo "Not authenticated. Run: growthub auth login"; exit 1; }
143
+
144
+ # Execute
145
+ growthub pipeline execute '<json-payload>'
146
+ ```
147
+
148
+ Pipeline payload shape (`DynamicRegistryPipeline`):
149
+ ```json
150
+ {
151
+ "pipelineId": "<uuid>",
152
+ "executionMode": "hosted",
153
+ "nodes": [
154
+ {
155
+ "nodeId": "video-gen-1",
156
+ "slug": "video-generation",
157
+ "bindings": {
158
+ "videoModel": "veo-3.1-generate-001",
159
+ "prompt": "<scene prompt from brief>",
160
+ "seconds": 8,
161
+ "aspectRatio": "9:16",
162
+ "creativeCount": 1,
163
+ "refs": [
164
+ { "name": "brand_reference", "dataUrl": "data:image/jpeg;base64,<base64>" }
165
+ ]
166
+ }
167
+ }
168
+ ]
169
+ }
170
+ ```
171
+
172
+ Parse streaming NDJSON output with `isExecutionEvent` from `@growthub/api-contract/events`.
173
+
174
+ ### 2d. Execute — byo-api-key path (secondary)
175
+
176
+ Set `VIDEO_MODEL_PROVIDER` and the corresponding provider key in `.env`.
177
+ The adapter in `lib/adapters/generative/index.js` routes to the correct provider SDK.
178
+
179
+ ### 2e. Write generative manifest
180
+
181
+ After execution, write `output/<client>/<project>/generative/manifest.json` per `output-standards.md`.
182
+
183
+ ### 2f. Append to session memory
184
+
185
+ Record: execution id, artifact count, provider used, artifact URLs.
186
+
187
+ **Self-eval unit for Stage 2:** `manifest.json` with at least one artifact URL per scene in the brief.
188
+
189
+ ---
190
+
191
+ ## STAGE 3 — EDIT
192
+
193
+ Sub-skill: `skills/video-edit/SKILL.md`
194
+
195
+ ### 3a. Verify video-use fork
196
+
197
+ ```bash
198
+ ls "${VIDEO_USE_HOME:-$HOME/video-use}/skills.md" || {
199
+ echo "video-use fork not found. Run: bash setup/clone-fork.sh"
200
+ exit 1
201
+ }
202
+ ```
203
+
204
+ ### 3b. Stage generated clips
205
+
206
+ Copy/link generated clips from `output/<client>/<project>/generative/` into `${VIDEO_USE_HOME}/<project>/`.
207
+
208
+ ### 3c. Write edit plan
209
+
210
+ Fill `templates/edit-plan.md` and write to `output/<client>/<project>/final/edit-plan.md`.
211
+
212
+ Minimum contents:
213
+ - Source clips list (from generative manifest)
214
+ - Cut strategy aligned to scene structure from brief
215
+ - Overlay plan (captions, on-screen text from brief scenes)
216
+ - Music direction
217
+ - Final duration target
218
+
219
+ ### 3d. Hand off to video-use agent
220
+
221
+ The video-use agent reads from its `${VIDEO_USE_HOME}/skills.md` runbook. Pass:
222
+ 1. `output/<client>/<project>/brief/pipeline-brief.md` — scene + VO structure
223
+ 2. `output/<client>/<project>/final/edit-plan.md` — cut strategy
224
+
225
+ The video-use fork pipeline:
226
+ ```
227
+ inventory → transcribe (ElevenLabs Scribe) → pack phrase-level transcript
228
+ → EDL generation (word-boundary cuts)
229
+ → render (FFmpeg + overlays)
230
+ → self-eval (up to 3 iterations)
231
+ → final.mp4 at ${VIDEO_USE_HOME}/<project>/edit/final.mp4
232
+ ```
233
+
234
+ ### 3e. Copy final output
235
+
236
+ ```bash
237
+ mkdir -p output/<client>/<project>/final
238
+ cp "${VIDEO_USE_HOME}/<project>/edit/final.mp4" output/<client>/<project>/final/final.mp4
239
+ ```
240
+
241
+ ### 3f. Append to session memory
242
+
243
+ Record: edit decision count, render duration, final.mp4 path, QA pass status.
244
+
245
+ **Self-eval unit for Stage 3:** `final.mp4` exists, passes QA checklist, duration matches target.
246
+
247
+ ---
248
+
249
+ ## NON-NEGOTIABLE RULES
250
+
251
+ 1. Stage 1 brief must be sourced from `brand-kit.md` — no brand details from memory.
252
+ 2. Stage 2 generative execution goes through the adapter contract — never raw API calls outside it.
253
+ 3. Stage 3 edit delegates to `VIDEO_USE_HOME` fork — never duplicate its pipeline inline.
254
+ 4. `output/<client>/<project>/` is the single output root — no other write locations.
255
+ 5. Append to `.growthub-fork/project.md` at every stage boundary.
256
+ 6. `ELEVENLABS_API_KEY` never appears in any output artifact.
257
+ 7. Provider API keys never appear in any output artifact.
258
+ 8. Brief AI generation prompts live in the Appendix only — never inline in scene blocks.
259
+
260
+ ---
261
+
262
+ ## FOLDER STRUCTURE
263
+
264
+ ```
265
+ ${CREATIVE_VIDEO_PIPELINE_HOME:-$HOME/creative-video-pipeline}/
266
+ ├── skills.md ← this file — read first, every session
267
+ ├── SKILL.md ← routing menu — read before skills.md
268
+ ├── QUICKSTART.md
269
+ ├── .env.example
270
+ ├── workers/
271
+ │ └── creative-video-pipeline-operator/CLAUDE.md
272
+ ├── brands/
273
+ │ ├── _template/brand-kit.md
274
+ │ ├── growthub/brand-kit.md
275
+ │ └── NEW-CLIENT.md
276
+ ├── templates/
277
+ │ ├── pipeline-brief.md
278
+ │ ├── generative-plan.md
279
+ │ └── edit-plan.md
280
+ ├── setup/
281
+ │ ├── check-deps.sh
282
+ │ ├── verify-env.mjs
283
+ │ ├── clone-fork.sh
284
+ │ └── install-skill.sh
285
+ ├── helpers/
286
+ │ ├── run-pipeline.sh
287
+ │ └── check-generative-adapter.sh
288
+ ├── skills/
289
+ │ ├── brief-generation/SKILL.md
290
+ │ ├── generative-execution/SKILL.md
291
+ │ └── video-edit/SKILL.md
292
+ ├── docs/
293
+ │ ├── adapter-contracts.md
294
+ │ ├── pipeline-architecture.md
295
+ │ ├── governed-workspace-primitives.md
296
+ │ └── vercel-deployment.md
297
+ ├── output/
298
+ │ └── <client-slug>/<project-slug>/{brief/,generative/,final/}
299
+ ├── studio/ ← Vite local shell
300
+ └── apps/
301
+ └── creative-video-pipeline/ ← Next.js / Vercel app
302
+ ```
@@ -0,0 +1,12 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Creative Video Pipeline</title>
7
+ </head>
8
+ <body>
9
+ <div id="root"></div>
10
+ <script type="module" src="/src/main.jsx"></script>
11
+ </body>
12
+ </html>
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "growthub-creative-video-pipeline-studio",
3
+ "version": "1.0.0",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "growthub-creative-video-pipeline-studio",
9
+ "version": "1.0.0",
10
+ "dependencies": {
11
+ "react": "^18.3.1",
12
+ "react-dom": "^18.3.1"
13
+ },
14
+ "devDependencies": {
15
+ "@vitejs/plugin-react": "^4.3.1",
16
+ "vite": "^5.4.2"
17
+ }
18
+ }
19
+ }
20
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "growthub-creative-video-pipeline-studio",
3
+ "version": "1.0.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "dev": "vite",
8
+ "build": "vite build",
9
+ "preview": "vite preview",
10
+ "serve": "node serve.mjs"
11
+ },
12
+ "dependencies": {
13
+ "react": "^18.3.1",
14
+ "react-dom": "^18.3.1"
15
+ },
16
+ "devDependencies": {
17
+ "@vitejs/plugin-react": "^4.3.1",
18
+ "vite": "^5.4.2"
19
+ }
20
+ }
@@ -0,0 +1,41 @@
1
+ #!/usr/bin/env node
2
+ // Minimal static server for the built Vite shell.
3
+ // Usage: node serve.mjs [--port 5180]
4
+ import http from "node:http";
5
+ import fs from "node:fs";
6
+ import path from "node:path";
7
+ import { fileURLToPath } from "node:url";
8
+
9
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
10
+ const DIST = path.resolve(__dirname, "dist");
11
+ const PORT = Number(process.env.PORT ?? 5180);
12
+
13
+ const mime = {
14
+ ".html": "text/html; charset=utf-8",
15
+ ".js": "application/javascript; charset=utf-8",
16
+ ".css": "text/css; charset=utf-8",
17
+ ".svg": "image/svg+xml",
18
+ ".json": "application/json; charset=utf-8",
19
+ };
20
+
21
+ function serve(req, res) {
22
+ const url = decodeURIComponent(req.url?.split("?")[0] ?? "/");
23
+ const file = url === "/" ? "/index.html" : url;
24
+ const full = path.resolve(DIST, "." + file);
25
+ if (!full.startsWith(DIST)) { res.statusCode = 403; res.end("Forbidden"); return; }
26
+ fs.readFile(full, (err, buf) => {
27
+ if (err) {
28
+ fs.readFile(path.resolve(DIST, "index.html"), (err2, fallback) => {
29
+ if (err2) { res.statusCode = 404; res.end("Not found"); return; }
30
+ res.setHeader("Content-Type", mime[".html"]); res.end(fallback);
31
+ });
32
+ return;
33
+ }
34
+ res.setHeader("Content-Type", mime[path.extname(full)] ?? "application/octet-stream");
35
+ res.end(buf);
36
+ });
37
+ }
38
+
39
+ http.createServer(serve).listen(PORT, () => {
40
+ console.log(`[creative-video-pipeline-studio] serving ${DIST} on http://localhost:${PORT}`);
41
+ });
@@ -0,0 +1,210 @@
1
+ import React, { useState } from "react";
2
+
3
+ const stages = [
4
+ {
5
+ id: "brief",
6
+ label: "Brief",
7
+ step: "01",
8
+ description: "Brand kit → scene structure → hooks → pipeline-brief.md",
9
+ outputPath: "output/<client>/<project>/brief/pipeline-brief.md",
10
+ },
11
+ {
12
+ id: "generative",
13
+ label: "Generate",
14
+ step: "02",
15
+ description: "growthub pipeline execute → image/video artifacts",
16
+ outputPath: "output/<client>/<project>/generative/manifest.json",
17
+ },
18
+ {
19
+ id: "edit",
20
+ label: "Edit",
21
+ step: "03",
22
+ description: "video-use fork → ElevenLabs Scribe → EDL → FFmpeg → final.mp4",
23
+ outputPath: "output/<client>/<project>/final/final.mp4",
24
+ },
25
+ ];
26
+
27
+ const adapterDocs = [
28
+ ["growthub-pipeline", "Routes through growthub pipeline execute + CMS video-generation node. Requires GROWTHUB_BRIDGE_ACCESS_TOKEN."],
29
+ ["byo-api-key", "Routes through explicit provider SDK. Set VIDEO_MODEL_PROVIDER (veo | fal | runway) + provider key."],
30
+ ];
31
+
32
+ const providerKeys = [
33
+ ["ELEVENLABS_API_KEY", "Required for Stage 3 — ElevenLabs Scribe transcription", true],
34
+ ["GROWTHUB_BRIDGE_ACCESS_TOKEN", "growthub-pipeline adapter — from growthub auth login", false],
35
+ ["GOOGLE_AI_API_KEY", "BYOK: VIDEO_MODEL_PROVIDER=veo", false],
36
+ ["FAL_API_KEY", "BYOK: VIDEO_MODEL_PROVIDER=fal", false],
37
+ ["RUNWAY_API_KEY", "BYOK: VIDEO_MODEL_PROVIDER=runway", false],
38
+ ];
39
+
40
+ export default function App() {
41
+ const [settingsOpen, setSettingsOpen] = useState(false);
42
+
43
+ return (
44
+ <main className="shell">
45
+ <aside className="sidebar">
46
+ <div className="brand">
47
+ <span className="brand-mark">CV</span>
48
+ <span>Creative Video Pipeline</span>
49
+ </div>
50
+ <nav className="nav">
51
+ <a href="#pipeline">Pipeline</a>
52
+ <a href="#brief">Brief</a>
53
+ <a href="#generative">Generative</a>
54
+ <a href="#edit">Edit</a>
55
+ <a href="#settings" onClick={(e) => { e.preventDefault(); setSettingsOpen(!settingsOpen); }}>
56
+ Settings
57
+ </a>
58
+ </nav>
59
+ <div className="sidebar-footer">
60
+ <span className="status-dot" />
61
+ Local Vite shell
62
+ </div>
63
+ </aside>
64
+
65
+ <section className="main">
66
+ <div className="utility-bar">
67
+ <div>
68
+ <strong>Growthub Creative Video Pipeline</strong>
69
+ <span>Brief → Generate → Edit — governed workspace with Vite local shell and Vercel app parity.</span>
70
+ </div>
71
+ <div className="utility-actions">
72
+ <a href="#settings" onClick={(e) => { e.preventDefault(); setSettingsOpen(!settingsOpen); }}>
73
+ API Keys
74
+ </a>
75
+ <span className="pill">kit v1</span>
76
+ </div>
77
+ </div>
78
+
79
+ <header className="page-heading" id="pipeline">
80
+ <span className="eyebrow">Three-stage pipeline</span>
81
+ <h1>Brief to final video.</h1>
82
+ <p>
83
+ Brand-grounded brief, generative images and video via the growthub pipeline or BYOK provider, and
84
+ transcript-anchored editing via the video-use fork — all in one governed workspace.
85
+ </p>
86
+ </header>
87
+
88
+ <section className="pipeline-strip" id="pipeline-stages">
89
+ {stages.map((stage) => (
90
+ <article className="stage-card" key={stage.id} id={stage.id}>
91
+ <span className="stage-step">{stage.step}</span>
92
+ <strong>{stage.label}</strong>
93
+ <p>{stage.description}</p>
94
+ <code>{stage.outputPath}</code>
95
+ </article>
96
+ ))}
97
+ </section>
98
+
99
+ <section className="hero-grid">
100
+ <article className="hero-card primary">
101
+ <span>Adapter</span>
102
+ <strong>growthub-pipeline</strong>
103
+ <p>Primary path. Routes through hosted CMS video-generation node (veo-3.1-generate-001). Requires Growthub auth.</p>
104
+ </article>
105
+ <article className="hero-card">
106
+ <span>BYOK</span>
107
+ <strong>byo-api-key</strong>
108
+ <p>Secondary path. Explicit provider keys (Veo / fal / Runway). Normalizes to same artifact contract.</p>
109
+ </article>
110
+ <article className="hero-card">
111
+ <span>Edit</span>
112
+ <strong>video-use fork</strong>
113
+ <p>Stage 3 delegates to VIDEO_USE_HOME. ElevenLabs Scribe + FFmpeg render + self-eval loop.</p>
114
+ </article>
115
+ </section>
116
+
117
+ <section className="adapter-grid">
118
+ {adapterDocs.map(([name, desc]) => (
119
+ <article className="card" key={name}>
120
+ <h3>{name}</h3>
121
+ <p>{desc}</p>
122
+ </article>
123
+ ))}
124
+ </section>
125
+
126
+ <section className="ops-strip">
127
+ <article>
128
+ <span>01</span>
129
+ <strong>Brand Kit</strong>
130
+ <p>Scene structure and hooks sourced from brand-kit.md — not memory.</p>
131
+ </article>
132
+ <article>
133
+ <span>02</span>
134
+ <strong>CLI Pipeline</strong>
135
+ <p>growthub pipeline execute routes to CMS video-generation node.</p>
136
+ </article>
137
+ <article>
138
+ <span>03</span>
139
+ <strong>video-use Fork</strong>
140
+ <p>Scribe → word-boundary EDL → FFmpeg render → final.mp4.</p>
141
+ </article>
142
+ <article>
143
+ <span>04</span>
144
+ <strong>Governed</strong>
145
+ <p>Every stage appends to project.md and trace.jsonl.</p>
146
+ </article>
147
+ </section>
148
+
149
+ {settingsOpen && (
150
+ <section className="settings-panel" id="settings">
151
+ <div className="settings-header">
152
+ <h2>API Key Settings</h2>
153
+ <p>
154
+ Configure the generative adapter and provider keys. Both paths normalize to the same
155
+ GenerativeArtifact[] object. Set keys in your fork&apos;s <code>.env</code> file.
156
+ </p>
157
+ </div>
158
+
159
+ <div className="setup-grid">
160
+ <article className="setup-card">
161
+ <span>Primary</span>
162
+ <strong>Growthub Pipeline</strong>
163
+ <p>Set <code>CREATIVE_VIDEO_PIPELINE_GENERATIVE_ADAPTER=growthub-pipeline</code> and authenticate via <code>growthub auth login</code>.</p>
164
+ <code>GROWTHUB_BRIDGE_ACCESS_TOKEN</code>
165
+ </article>
166
+ <article className="setup-card">
167
+ <span>Secondary</span>
168
+ <strong>BYOK Provider</strong>
169
+ <p>Set <code>CREATIVE_VIDEO_PIPELINE_GENERATIVE_ADAPTER=byo-api-key</code> and <code>VIDEO_MODEL_PROVIDER</code>.</p>
170
+ <code>GOOGLE_AI_API_KEY / FAL_API_KEY / RUNWAY_API_KEY</code>
171
+ </article>
172
+ <article className="setup-card">
173
+ <span>Required</span>
174
+ <strong>ElevenLabs Scribe</strong>
175
+ <p>Required for Stage 3 — word-level transcription for the video-use EDL pipeline.</p>
176
+ <code>ELEVENLABS_API_KEY</code>
177
+ </article>
178
+ </div>
179
+
180
+ <div className="key-list">
181
+ {providerKeys.map(([key, desc, required]) => (
182
+ <article className="key-row" key={key}>
183
+ <div>
184
+ <code>{key}</code>
185
+ <span className={`key-badge ${required ? "required" : "optional"}`}>
186
+ {required ? "required" : "conditional"}
187
+ </span>
188
+ </div>
189
+ <p>{desc}</p>
190
+ </article>
191
+ ))}
192
+ </div>
193
+
194
+ <p className="settings-note">
195
+ Keys are read from your fork&apos;s <code>.env</code> file. See <code>.env.example</code> for all available options.
196
+ Never commit API keys to the repo.
197
+ </p>
198
+ </section>
199
+ )}
200
+ </section>
201
+
202
+ <aside className="quick-actions">
203
+ <button onClick={() => setSettingsOpen(!settingsOpen)}>Configure API keys</button>
204
+ <button>View brief output</button>
205
+ <button>View generative output</button>
206
+ <button>Open final video</button>
207
+ </aside>
208
+ </main>
209
+ );
210
+ }