@growthub/cli 0.8.1 → 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.
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/.env.example +28 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/QUICKSTART.md +118 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/SKILL.md +103 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/apps/creative-video-pipeline/.env.example +20 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/apps/creative-video-pipeline/README.md +33 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/apps/creative-video-pipeline/app/api/pipeline/route.js +27 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/apps/creative-video-pipeline/app/globals.css +203 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/apps/creative-video-pipeline/app/layout.jsx +14 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/apps/creative-video-pipeline/app/page.jsx +131 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/apps/creative-video-pipeline/app/settings/keys/page.jsx +154 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/apps/creative-video-pipeline/lib/adapters/env.js +14 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/apps/creative-video-pipeline/lib/adapters/generative/index.js +31 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/apps/creative-video-pipeline/lib/domain/pipeline.js +30 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/apps/creative-video-pipeline/next.config.js +10 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/apps/creative-video-pipeline/package-lock.json +17 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/apps/creative-video-pipeline/package.json +17 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/apps/creative-video-pipeline/postcss.config.mjs +3 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/apps/creative-video-pipeline/vercel.json +5 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/brands/NEW-CLIENT.md +21 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/brands/_template/brand-kit.md +123 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/brands/growthub/brand-kit.md +123 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/bundles/growthub-creative-video-pipeline-v1.json +83 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/docs/adapter-contracts.md +73 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/docs/governed-workspace-primitives.md +50 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/docs/pipeline-architecture.md +61 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/docs/starter-kit-overview.md +33 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/docs/vercel-deployment.md +42 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/examples/pipeline-brief-sample.md +56 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/growthub-meta/README.md +9 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/growthub-meta/kit-standard.md +24 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/helpers/README.md +8 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/helpers/check-generative-adapter.sh +41 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/helpers/run-pipeline.sh +30 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/kit.json +148 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/output/README.md +23 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/output-standards.md +63 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/runtime-assumptions.md +61 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/setup/check-deps.sh +63 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/setup/clone-fork.sh +18 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/setup/install-skill.sh +10 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/setup/verify-env.mjs +50 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/skills/README.md +11 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/skills/brief-generation/SKILL.md +42 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/skills/generative-execution/SKILL.md +86 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/skills/video-edit/SKILL.md +41 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/skills.md +302 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/studio/index.html +12 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/studio/package-lock.json +20 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/studio/package.json +20 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/studio/serve.mjs +41 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/studio/src/App.jsx +210 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/studio/src/app.css +194 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/studio/src/main.jsx +10 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/studio/vite.config.js +8 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/templates/edit-plan.md +66 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/templates/generative-plan.md +83 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/templates/pipeline-brief.md +129 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/templates/project.md +68 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/templates/self-eval.md +67 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/validation-checklist.md +52 -0
- package/assets/worker-kits/growthub-creative-video-pipeline-v1/workers/creative-video-pipeline-operator/CLAUDE.md +109 -0
- package/dist/index.js +9 -0
- package/package.json +1 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Runtime Assumptions — Creative Video Pipeline
|
|
2
|
+
|
|
3
|
+
## Required dependencies
|
|
4
|
+
|
|
5
|
+
| Dependency | Version | Purpose |
|
|
6
|
+
|---|---|---|
|
|
7
|
+
| Node.js | >= 20 | CLI, Vite dev, Next.js dev |
|
|
8
|
+
| Git | any | Fork registration |
|
|
9
|
+
| FFmpeg | any | Stage 3 video render |
|
|
10
|
+
| Python 3 | >= 3.11 | video-use upstream pipeline |
|
|
11
|
+
| pip | any | video-use install |
|
|
12
|
+
|
|
13
|
+
Optional:
|
|
14
|
+
|
|
15
|
+
| Dependency | Purpose |
|
|
16
|
+
|---|---|
|
|
17
|
+
| yt-dlp | Downloading online source clips for Stage 3 |
|
|
18
|
+
|
|
19
|
+
## Required secrets
|
|
20
|
+
|
|
21
|
+
| Env var | Required when | Notes |
|
|
22
|
+
|---|---|---|
|
|
23
|
+
| `ELEVENLABS_API_KEY` | Always (Stage 3) | ElevenLabs Scribe word-level transcription |
|
|
24
|
+
| `GROWTHUB_BRIDGE_ACCESS_TOKEN` | `ADAPTER=growthub-pipeline` | Auth token from `growthub auth login` |
|
|
25
|
+
| `GROWTHUB_BRIDGE_BASE_URL` | `ADAPTER=growthub-pipeline` | Growthub hosted base URL |
|
|
26
|
+
| `GOOGLE_AI_API_KEY` | `ADAPTER=byo-api-key`, `PROVIDER=veo` | Google AI / Vertex key |
|
|
27
|
+
| `FAL_API_KEY` | `ADAPTER=byo-api-key`, `PROVIDER=fal` | fal.ai key |
|
|
28
|
+
| `RUNWAY_API_KEY` | `ADAPTER=byo-api-key`, `PROVIDER=runway` | Runway key |
|
|
29
|
+
|
|
30
|
+
## Workspace paths
|
|
31
|
+
|
|
32
|
+
| Path | Default | Purpose |
|
|
33
|
+
|---|---|---|
|
|
34
|
+
| `CREATIVE_VIDEO_PIPELINE_HOME` | `$HOME/creative-video-pipeline` | Kit workspace root |
|
|
35
|
+
| `VIDEO_USE_HOME` | `$HOME/video-use` | video-use upstream fork |
|
|
36
|
+
| `CREATIVE_STRATEGIST_HOME` | `$HOME/creative-strategist` | Optional: hooks library source |
|
|
37
|
+
|
|
38
|
+
## Growthub CLI
|
|
39
|
+
|
|
40
|
+
Minimum version: `0.4.3`. Verify:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
growthub --version
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Required for `growthub pipeline execute` (Stage 2, primary adapter) and `growthub kit fork` commands.
|
|
47
|
+
|
|
48
|
+
## video-use fork
|
|
49
|
+
|
|
50
|
+
Cloned to `${VIDEO_USE_HOME:-$HOME/video-use}` by `setup/clone-fork.sh`. Registered as a Claude Code skill by `setup/install-skill.sh`. Required for Stage 3.
|
|
51
|
+
|
|
52
|
+
## Claude Code skill
|
|
53
|
+
|
|
54
|
+
`~/.claude/skills/video-use` symlink must be present for conversational edit flow. Set up by `setup/install-skill.sh`.
|
|
55
|
+
|
|
56
|
+
## Credential hygiene
|
|
57
|
+
|
|
58
|
+
- No secrets are stored in this kit.
|
|
59
|
+
- All secrets live in the per-fork `.env` (not committed).
|
|
60
|
+
- `ELEVENLABS_API_KEY` must never appear in any output artifact.
|
|
61
|
+
- Provider keys must never appear in any output artifact.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
PASS=0; FAIL=0
|
|
5
|
+
|
|
6
|
+
check() {
|
|
7
|
+
if command -v "$1" &>/dev/null; then
|
|
8
|
+
echo " [ok] $1"
|
|
9
|
+
((PASS++))
|
|
10
|
+
else
|
|
11
|
+
echo " [missing] $1"
|
|
12
|
+
((FAIL++))
|
|
13
|
+
fi
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
echo "=== growthub-creative-video-pipeline-v1 dependency check ==="
|
|
17
|
+
echo ""
|
|
18
|
+
echo "CLI tools:"
|
|
19
|
+
check growthub
|
|
20
|
+
check node
|
|
21
|
+
check npm
|
|
22
|
+
check ffmpeg
|
|
23
|
+
|
|
24
|
+
echo ""
|
|
25
|
+
echo "Optional (video-use fork):"
|
|
26
|
+
if [ -n "${VIDEO_USE_HOME:-}" ] && [ -d "$VIDEO_USE_HOME" ]; then
|
|
27
|
+
echo " [ok] VIDEO_USE_HOME=$VIDEO_USE_HOME"
|
|
28
|
+
else
|
|
29
|
+
echo " [missing] VIDEO_USE_HOME — set and point to video-use fork clone"
|
|
30
|
+
fi
|
|
31
|
+
|
|
32
|
+
echo ""
|
|
33
|
+
echo "Environment:"
|
|
34
|
+
for var in CREATIVE_VIDEO_PIPELINE_GENERATIVE_ADAPTER ELEVENLABS_API_KEY; do
|
|
35
|
+
if [ -n "${!var:-}" ]; then
|
|
36
|
+
echo " [ok] $var"
|
|
37
|
+
else
|
|
38
|
+
echo " [missing] $var"
|
|
39
|
+
fi
|
|
40
|
+
done
|
|
41
|
+
|
|
42
|
+
ADAPTER="${CREATIVE_VIDEO_PIPELINE_GENERATIVE_ADAPTER:-growthub-pipeline}"
|
|
43
|
+
if [ "$ADAPTER" = "growthub-pipeline" ]; then
|
|
44
|
+
for var in GROWTHUB_BRIDGE_ACCESS_TOKEN GROWTHUB_BRIDGE_BASE_URL; do
|
|
45
|
+
if [ -n "${!var:-}" ]; then
|
|
46
|
+
echo " [ok] $var"
|
|
47
|
+
else
|
|
48
|
+
echo " [missing] $var (required for growthub-pipeline adapter)"
|
|
49
|
+
fi
|
|
50
|
+
done
|
|
51
|
+
elif [ "$ADAPTER" = "byo-api-key" ]; then
|
|
52
|
+
for var in VIDEO_MODEL_PROVIDER; do
|
|
53
|
+
if [ -n "${!var:-}" ]; then
|
|
54
|
+
echo " [ok] $var"
|
|
55
|
+
else
|
|
56
|
+
echo " [missing] $var (required for byo-api-key adapter)"
|
|
57
|
+
fi
|
|
58
|
+
done
|
|
59
|
+
fi
|
|
60
|
+
|
|
61
|
+
echo ""
|
|
62
|
+
echo "Result: $PASS ok, $FAIL missing"
|
|
63
|
+
[ "$FAIL" -eq 0 ] && echo "All required dependencies present." || echo "Fix missing items before running the pipeline."
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
DEST="${VIDEO_USE_HOME:-$HOME/video-use}"
|
|
5
|
+
|
|
6
|
+
if [ -d "$DEST/.git" ]; then
|
|
7
|
+
echo "video-use fork already cloned at $DEST"
|
|
8
|
+
exit 0
|
|
9
|
+
fi
|
|
10
|
+
|
|
11
|
+
echo "Clone the video-use fork into $DEST, then re-run this script or set VIDEO_USE_HOME."
|
|
12
|
+
echo ""
|
|
13
|
+
echo " git clone <your-video-use-fork-url> $DEST"
|
|
14
|
+
echo ""
|
|
15
|
+
echo "After cloning, install dependencies:"
|
|
16
|
+
echo " cd $DEST && npm install"
|
|
17
|
+
echo ""
|
|
18
|
+
echo "Then set VIDEO_USE_HOME=$DEST in your .env.local"
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
SKILL_SRC="$(cd "$(dirname "$0")/.." && pwd)/SKILL.md"
|
|
5
|
+
DEST_DIR="$HOME/.claude/skills/growthub-creative-video-pipeline"
|
|
6
|
+
|
|
7
|
+
mkdir -p "$DEST_DIR"
|
|
8
|
+
cp "$SKILL_SRC" "$DEST_DIR/SKILL.md"
|
|
9
|
+
echo "Skill installed to $DEST_DIR/SKILL.md"
|
|
10
|
+
echo "Reload Claude Code (or open a new session) to activate."
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { readFileSync, existsSync } from "fs";
|
|
3
|
+
import { resolve } from "path";
|
|
4
|
+
|
|
5
|
+
const ROOT = new URL("..", import.meta.url).pathname;
|
|
6
|
+
const envFile = resolve(ROOT, ".env.local");
|
|
7
|
+
|
|
8
|
+
if (existsSync(envFile)) {
|
|
9
|
+
const lines = readFileSync(envFile, "utf8").split("\n");
|
|
10
|
+
for (const line of lines) {
|
|
11
|
+
const trimmed = line.trim();
|
|
12
|
+
if (!trimmed || trimmed.startsWith("#")) continue;
|
|
13
|
+
const [key, ...rest] = trimmed.split("=");
|
|
14
|
+
if (key && rest.join("=")) process.env[key] = rest.join("=");
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const REQUIRED = [
|
|
19
|
+
"CREATIVE_VIDEO_PIPELINE_GENERATIVE_ADAPTER",
|
|
20
|
+
"ELEVENLABS_API_KEY",
|
|
21
|
+
];
|
|
22
|
+
|
|
23
|
+
const ADAPTER_DEPS = {
|
|
24
|
+
"growthub-pipeline": ["GROWTHUB_BRIDGE_ACCESS_TOKEN", "GROWTHUB_BRIDGE_BASE_URL"],
|
|
25
|
+
"byo-api-key": ["VIDEO_MODEL_PROVIDER"],
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const errors = [];
|
|
29
|
+
|
|
30
|
+
for (const key of REQUIRED) {
|
|
31
|
+
if (!process.env[key]) errors.push(`Missing required: ${key}`);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const adapter = process.env.CREATIVE_VIDEO_PIPELINE_GENERATIVE_ADAPTER ?? "growthub-pipeline";
|
|
35
|
+
const adapterDeps = ADAPTER_DEPS[adapter] ?? [];
|
|
36
|
+
for (const key of adapterDeps) {
|
|
37
|
+
if (!process.env[key]) errors.push(`Missing for ${adapter} adapter: ${key}`);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (!process.env.VIDEO_USE_HOME) {
|
|
41
|
+
errors.push("Missing VIDEO_USE_HOME (required for Stage 3)");
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (errors.length) {
|
|
45
|
+
console.error("Environment verification failed:");
|
|
46
|
+
for (const e of errors) console.error(` - ${e}`);
|
|
47
|
+
process.exit(1);
|
|
48
|
+
} else {
|
|
49
|
+
console.log("Environment verified.");
|
|
50
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# skills/
|
|
2
|
+
|
|
3
|
+
Sub-skills for the creative-video-pipeline operator. Each sub-skill is a self-contained governed primitive with its own SKILL.md.
|
|
4
|
+
|
|
5
|
+
| Sub-skill | Stage | Purpose |
|
|
6
|
+
|-----------|-------|---------|
|
|
7
|
+
| brief-generation | Stage 1 | Brand-grounded creative brief from brand-kit.md |
|
|
8
|
+
| generative-execution | Stage 2 | Adapter-routed generative image/video execution |
|
|
9
|
+
| video-edit | Stage 3 | video-use fork delegation: Scribe → EDL → FFmpeg |
|
|
10
|
+
|
|
11
|
+
The top-level `SKILL.md` at the kit root composes all three sub-skills into the full three-stage pipeline.
|
package/assets/worker-kits/growthub-creative-video-pipeline-v1/skills/brief-generation/SKILL.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: creative-video-pipeline/brief-generation
|
|
3
|
+
name: creative-video-pipeline-brief-generation
|
|
4
|
+
description: Generate the Stage 1 brand-grounded pipeline brief from the worker kit brand kit and write output artifacts.
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
triggers:
|
|
7
|
+
- "generate creative brief"
|
|
8
|
+
- "run brief stage"
|
|
9
|
+
- "stage 1 brief"
|
|
10
|
+
- "write pipeline brief"
|
|
11
|
+
selfEval:
|
|
12
|
+
criteria:
|
|
13
|
+
- "Brief is sourced exclusively from brand-kit.md — no invented brand attributes"
|
|
14
|
+
- "Scene structure matches brand hook patterns"
|
|
15
|
+
- "pipeline-brief.md written to output/<client>/<project>/brief/"
|
|
16
|
+
- "project.md appended with Stage 1 completion"
|
|
17
|
+
- "trace.jsonl event written for stage-complete"
|
|
18
|
+
maxRetries: 3
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
# Brief Generation Sub-Skill
|
|
22
|
+
|
|
23
|
+
## Role
|
|
24
|
+
Generate a brand-grounded creative brief for Stage 1 of the creative video pipeline.
|
|
25
|
+
|
|
26
|
+
## Input
|
|
27
|
+
- `brands/<client>/brand-kit.md` — brand constraints, audience, hooks, tone
|
|
28
|
+
- `CREATIVE_STRATEGIST_HOME` (optional) — for 500-winning-hooks.csv reference
|
|
29
|
+
- Client name + project name
|
|
30
|
+
|
|
31
|
+
## Process
|
|
32
|
+
1. Read `brands/<client>/brand-kit.md` in full
|
|
33
|
+
2. Identify brand tone, audience, hook patterns, and platform format
|
|
34
|
+
3. Populate `templates/pipeline-brief.md` — do not invent brand attributes
|
|
35
|
+
4. Write output to `output/<client>/<project>/brief/pipeline-brief.md`
|
|
36
|
+
5. Append Stage 1 completion entry to `.growthub-fork/project.md`
|
|
37
|
+
6. Append `{"type":"stage-complete","stage":"brief","ts":"<iso>"}` to `trace.jsonl`
|
|
38
|
+
|
|
39
|
+
## Output
|
|
40
|
+
- `output/<client>/<project>/brief/pipeline-brief.md`
|
|
41
|
+
- Updated `.growthub-fork/project.md`
|
|
42
|
+
- Updated `trace.jsonl`
|
package/assets/worker-kits/growthub-creative-video-pipeline-v1/skills/generative-execution/SKILL.md
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: creative-video-pipeline/generative-execution
|
|
3
|
+
name: creative-video-pipeline-generative-execution
|
|
4
|
+
description: Run Stage 2 generative execution through the selected adapter and write the generative manifest.
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
triggers:
|
|
7
|
+
- "run generative stage"
|
|
8
|
+
- "stage 2 generate"
|
|
9
|
+
- "generate video"
|
|
10
|
+
- "execute pipeline generation"
|
|
11
|
+
selfEval:
|
|
12
|
+
criteria:
|
|
13
|
+
- "Adapter selected from CREATIVE_VIDEO_PIPELINE_GENERATIVE_ADAPTER env var"
|
|
14
|
+
- "growthub-pipeline path: DynamicRegistryPipeline JSON assembled from brief, growthub pipeline execute called directly"
|
|
15
|
+
- "byo-api-key path: VIDEO_MODEL_PROVIDER resolved, provider SDK called"
|
|
16
|
+
- "manifest.json written to output/<client>/<project>/generative/ with execution results"
|
|
17
|
+
- "project.md and trace.jsonl updated with Stage 2 completion"
|
|
18
|
+
maxRetries: 3
|
|
19
|
+
helpers:
|
|
20
|
+
- "helpers/check-generative-adapter.sh"
|
|
21
|
+
- "helpers/run-pipeline.sh"
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
# Generative Execution Sub-Skill
|
|
25
|
+
|
|
26
|
+
## Role
|
|
27
|
+
Execute Stage 2 via the official growthub CLI + `@growthub/api-contract` SDK. No custom execution layer.
|
|
28
|
+
|
|
29
|
+
## Adapter: growthub-pipeline (primary)
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# Auth pre-flight
|
|
33
|
+
growthub auth whoami --json || { echo "Run: growthub auth login"; exit 1; }
|
|
34
|
+
|
|
35
|
+
# Assemble DynamicRegistryPipeline from the Stage 1 brief, then execute:
|
|
36
|
+
growthub pipeline execute '<DynamicRegistryPipeline JSON>'
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**`DynamicRegistryPipeline` shape (from `@growthub/api-contract`):**
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"pipelineId": "<uuid>",
|
|
43
|
+
"executionMode": "hosted",
|
|
44
|
+
"nodes": [
|
|
45
|
+
{
|
|
46
|
+
"nodeId": "video-gen-1",
|
|
47
|
+
"slug": "video-generation",
|
|
48
|
+
"bindings": {
|
|
49
|
+
"videoModel": "veo-3.1-generate-001",
|
|
50
|
+
"prompt": "<scene prompt from brief>",
|
|
51
|
+
"seconds": 8,
|
|
52
|
+
"aspectRatio": "9:16",
|
|
53
|
+
"creativeCount": 1,
|
|
54
|
+
"refs": [
|
|
55
|
+
{ "name": "brand_reference", "dataUrl": "data:image/jpeg;base64,<base64>" }
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The CLI streams NDJSON `ExecutionEvent` objects typed by `@growthub/api-contract`. Use `isExecutionEvent()` to validate each line. The `complete` event signals success; the `error` event signals failure.
|
|
64
|
+
|
|
65
|
+
## Adapter: byo-api-key (secondary)
|
|
66
|
+
Resolve `VIDEO_MODEL_PROVIDER` (veo | fal | runway), call the provider SDK directly.
|
|
67
|
+
|
|
68
|
+
## Output
|
|
69
|
+
Write `output/<client>/<project>/generative/manifest.json`:
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"kitId": "growthub-creative-video-pipeline-v1",
|
|
73
|
+
"adapter": "growthub-pipeline",
|
|
74
|
+
"executionId": "<from complete event>",
|
|
75
|
+
"createdAt": "<iso>",
|
|
76
|
+
"artifacts": [/* urls/paths from execution output */]
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Process
|
|
81
|
+
1. Read `CREATIVE_VIDEO_PIPELINE_GENERATIVE_ADAPTER`
|
|
82
|
+
2. Run `helpers/check-generative-adapter.sh`
|
|
83
|
+
3. Assemble `DynamicRegistryPipeline` JSON from Stage 1 brief prompts and reference images
|
|
84
|
+
4. Execute: `bash helpers/run-pipeline.sh '<payload>'`
|
|
85
|
+
5. Write `manifest.json` from the execution result
|
|
86
|
+
6. Append Stage 2 completion to `project.md` and `trace.jsonl`
|
|
@@ -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
|
+
```
|