@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,67 @@
1
+ # Self-evaluation template — v1 primitive (Growthub, capability-agnostic)
2
+
3
+ A skill's `selfEval` contract declares **what good looks like** (`criteria[]`) and **the retry ceiling** (`maxRetries`). The agent drives the loop; this file is the pattern the agent follows at every unit of work.
4
+
5
+ The contract is defined in `@growthub/api-contract/skills::SkillSelfEval` and is **capability-agnostic** — the same primitive applies to code edits, copy drafts, CRM rules, API payloads, asset renders, audit passes, and every other domain. The "unit of work" is the smallest reversible change the skill operates on; concrete boundaries are defined in the kit's own `skills.md` operator runbook, not here.
6
+
7
+ ## Loop
8
+
9
+ ```
10
+ for attempt in 1..maxRetries: # default maxRetries = 3
11
+ generate — produce a proposal (whatever the skill produces)
12
+ apply — materialise the proposal against the fork
13
+ self-evaluate — for each criterion in skill.selfEval.criteria:
14
+ check → pass / fail / needs-confirmation
15
+ record — append to project.md (human) + trace.jsonl (machine)
16
+
17
+ if all criteria pass: break
18
+ if attempt == maxRetries: park with needs_confirmation note. Stop.
19
+ ```
20
+
21
+ ## What each attempt writes
22
+
23
+ ### Human row — append to `.growthub-fork/project.md` "Session log"
24
+
25
+ ```md
26
+ ### 2026-04-23 18:40 UTC · <skill-slug>
27
+ - **Plan.** What you intend to do this unit of work.
28
+ - **Changes.** Material change applied (must correspond to a trace event).
29
+ - **Self-eval.** attempt 2/3 — criterion "<one of skill.selfEval.criteria>" ✗ (<note>). Retrying.
30
+ - **Outcome.** retry-pending / pass / parked.
31
+ - **Next.** What the next attempt (or next session) should pick up.
32
+ ```
33
+
34
+ ### Machine row — append to `.growthub-fork/trace.jsonl` (via `appendKitForkTraceEvent`)
35
+
36
+ ```json
37
+ {
38
+ "ts": "2026-04-23T18:40:00.000Z",
39
+ "forkId": "<fork-id>",
40
+ "kitId": "<kit-id>",
41
+ "type": "self_eval_recorded",
42
+ "summary": "attempt 2/3 failed on <criterion>",
43
+ "detail": {
44
+ "skill": "<skill-slug>",
45
+ "attempt": 2,
46
+ "maxRetries": 3,
47
+ "criterion": "<one of skill.selfEval.criteria>",
48
+ "outcome": "fail",
49
+ "notes": "<short explanation>"
50
+ }
51
+ }
52
+ ```
53
+
54
+ ## Hard rules
55
+
56
+ 1. **Never exceed `maxRetries`.** At the ceiling, park with a `needs_confirmation` note and stop. Do not loop forever.
57
+ 2. **Record every attempt.** Even the first pass. Continuity depends on a complete journal.
58
+ 3. **Keep `project.md` and `trace.jsonl` in sync.** One without the other is a protocol violation.
59
+ 4. **Preserve prior entries.** Append-only. Never rewrite history.
60
+
61
+ ## Bound the blast radius
62
+
63
+ Evaluate at the smallest unit of work the skill operates on, not only at the end of a multi-step run. The retry ceiling applies to that unit — so a bad attempt does not sink the whole job.
64
+
65
+ What counts as a "unit of work" is **kit-specific** and lives in that kit's `skills.md` operator runbook — not in this agnostic template. A kit picks its own smallest reversible boundary and documents it in `skills.md`; this template does not prescribe one.
66
+
67
+ The agnostic SDK (`@growthub/api-contract/skills::SkillSelfEval`) does not encode any domain-specific boundaries — it only carries `criteria[]`, `maxRetries`, and `traceTo`. See `SKILL.md::selfEval.criteria` in this kit for the concrete checks, and `skills.md` for the kit-specific unit of work.
@@ -0,0 +1,26 @@
1
+ # Database Provider Setup Plan
2
+
3
+ This file name is retained for compatibility with older agency portal notes. The v1 worker-kit contract is not Supabase-specific.
4
+
5
+ Use `AGENCY_PORTAL_DATA_ADAPTER` to select persistence:
6
+
7
+ - `postgres` with `DATABASE_URL`
8
+ - `qstash-kv` with `QSTASH_KV_REST_URL` and `QSTASH_KV_REST_TOKEN`
9
+ - `provider-managed` for a hosted database surface outside this kit
10
+
11
+ Supabase may be used only as one Postgres-compatible provider behind `DATABASE_URL`. Do not add Supabase SDK dependencies or Supabase-only assumptions to the starter unless a user explicitly chooses that provider in their own fork.
12
+
13
+ ## Selected Provider
14
+
15
+ - Adapter:
16
+ - Provider:
17
+ - Required env:
18
+ - Migration owner:
19
+ - Backup owner:
20
+
21
+ ## Validation
22
+
23
+ ```bash
24
+ node setup/verify-env.mjs
25
+ cd apps/agency-portal && npm run build
26
+ ```
@@ -0,0 +1,11 @@
1
+ # Workspace Brief — Template
2
+
3
+ Use this template to capture what a new custom workspace is for.
4
+
5
+ - Client:
6
+ - Project slug:
7
+ - Goals (3 bullets max):
8
+ - Surface area (which worker kits this workspace composes):
9
+ - Out of scope:
10
+ - Success criteria:
11
+ - First heal checkpoint:
@@ -0,0 +1,32 @@
1
+ # Agency Portal Starter — Validation Checklist
2
+
3
+ - [ ] `kit.json` is schema-v2 valid and identifies `growthub-agency-portal-starter-v1`.
4
+ - [ ] Every path in `kit.json.frozenAssetPaths` exists.
5
+ - [ ] `SKILL.md`, `templates/project.md`, `templates/self-eval.md`, `helpers/README.md`, and `skills/README.md` are present.
6
+ - [ ] `studio/` builds with `npm run build`.
7
+ - [ ] `apps/agency-portal/` builds with `npm run build`.
8
+ - [ ] `node setup/verify-env.mjs` validates the selected adapters.
9
+ - [ ] Vercel root is `apps/agency-portal`.
10
+ - [ ] Persistence adapter is documented as `postgres`, `qstash-kv`, or `provider-managed`.
11
+ - [ ] Auth and payment adapters are documented without provider lock-in.
12
+ - [ ] Integration adapter is documented as `static`, `growthub-bridge`, or `byo-api-key`.
13
+ - [ ] `/settings/integrations` renders a dedicated sidebar nav page, not home-page integration content.
14
+ - [ ] Data pipeline objects are explicit: Windsor AI, Google Sheets blended data, Google Analytics, Shopify, Meta Facebook/Instagram.
15
+ - [ ] MCP connection integrations are explicit: Asana, Slack, GoHighLevel, Google Drive, Notion.
16
+ - [ ] Growthub bridge mode shows active/connected status when normalized MCP account rows are returned by the bridge.
17
+ - [ ] `growthub-connection-normalizer.js` accepts both SDK/profile-style `integrations[]` and GH app MCP `accounts[]` payloads.
18
+ - [ ] Unknown active MCP providers are preserved as discovered workspace integrations instead of being dropped.
19
+ - [ ] BYO API key mode works from `AGENCY_PORTAL_BYO_CONNECTIONS_JSON` using the same object shape.
20
+ - [ ] Windsor BYO mode works with `WINDSOR_API_KEY` alone and renders Windsor AI as connected.
21
+ - [ ] Windsor API key path is supported as `WINDSOR_API_KEY` and represented as a first-class data pipeline object.
22
+ - [ ] CLI discovery/list/export path succeeds:
23
+ ```bash
24
+ growthub kit list --family studio --json
25
+ growthub kit download growthub-agency-portal-starter-v1 --out /tmp/agency-portal-qa --yes
26
+ ```
27
+ - [ ] Fork registration/status path succeeds on an exported workspace:
28
+ ```bash
29
+ growthub kit fork register /tmp/agency-portal-qa/growthub-agent-worker-kit-agency-portal-starter-v1
30
+ growthub kit fork status <fork-id>
31
+ ```
32
+ - [ ] Governed forks record material changes to `.growthub-fork/project.md` and `.growthub-fork/trace.jsonl`.
@@ -0,0 +1,75 @@
1
+ # Agency Portal Operator — Agent Operating Instructions
2
+
3
+ **Kit:** `growthub-agency-portal-starter-v1`
4
+ **Worker ID:** `agency-portal-operator`
5
+ **Version:** `1.0.0`
6
+
7
+ ## Role
8
+
9
+ You operate the Agency Portal Starter as a governed workspace built from the custom workspace starter primitive. Keep the Growthub local-first Vite shell in `studio/`; operate the deployable Vercel/serverless portal under `apps/agency-portal/`.
10
+
11
+ ## Source Of Truth
12
+
13
+ 1. `.growthub-fork/project.md`
14
+ 2. `SKILL.md`
15
+ 3. `skills.md`
16
+ 4. `docs/governed-workspace-primitives.md`
17
+ 5. `docs/adapter-contracts.md`
18
+ 6. `docs/vercel-serverless-deployment.md`
19
+ 7. `docs/vite-ui-shell-guide.md`
20
+ 8. `validation-checklist.md`
21
+
22
+ ## Hard Rules
23
+
24
+ - Do not collapse the kit into the Vercel app. The kit root is the governed workspace; `studio/` is the local-first Vite operator shell; `apps/agency-portal/` is the serverless app payload.
25
+ - Do not hardcode one database provider into the worker-kit contract. Persistence is selected by adapter env: `postgres`, `qstash-kv`, or `provider-managed`.
26
+ - Do not hardcode payments. Payments are selected by `AGENCY_PORTAL_PAYMENT_ADAPTER`.
27
+ - Do not move third-party provider tokens into source. Growthub bridge mode consumes hosted GH app connection state; BYO mode references env names and normalized metadata only.
28
+ - Do not place integration lists on the home dashboard. Use the dedicated sidebar route `/settings/integrations`.
29
+ - Do not collapse data pipelines and operational integrations into one opaque bucket. Data pipeline objects and MCP connection integrations stay distinct under the unified integrations page.
30
+ - Do not treat cloud deployment as the local runtime. Local Growthub operation stays first; Vercel is the clean serverless deployment lane.
31
+ - Every material change in a governed fork records to `.growthub-fork/project.md` and `.growthub-fork/trace.jsonl`.
32
+
33
+ ## Integration Model
34
+
35
+ Model the GH app primitive without importing the GH app runtime:
36
+
37
+ - Catalog metadata: `id`, `provider`, `name`, `description`, `category`, `authType`.
38
+ - User connection state: `isConnected`, `isActive`, `connectionId`, `connectionMetadata`.
39
+ - Worker-kit lane: `lane`, `objectType`, `authPath`, `setupMode`.
40
+
41
+ Data pipeline objects:
42
+
43
+ - Windsor AI
44
+ - Google Sheets blended data
45
+ - Google Analytics
46
+ - Shopify
47
+ - Meta Facebook/Instagram
48
+
49
+ MCP connection integrations:
50
+
51
+ - Asana
52
+ - Slack
53
+ - GoHighLevel
54
+ - Google Drive
55
+ - Notion
56
+
57
+ `growthub-bridge` means hosted GH app authority resolves active connections. `byo-api-key` means the exported workspace owns explicit setup through env vars and `AGENCY_PORTAL_BYO_CONNECTIONS_JSON`.
58
+
59
+ ## Verification
60
+
61
+ ```bash
62
+ bash setup/check-deps.sh
63
+ node setup/verify-env.mjs
64
+ cd studio && npm install && npm run build
65
+ cd apps/agency-portal && npm install && npm run build
66
+ ```
67
+
68
+ CLI export/fork verification:
69
+
70
+ ```bash
71
+ growthub kit list --family studio --json
72
+ growthub kit download growthub-agency-portal-starter-v1 --out /tmp/agency-portal-qa --yes
73
+ growthub kit fork register /tmp/agency-portal-qa/growthub-agent-worker-kit-agency-portal-starter-v1
74
+ growthub kit fork status <fork-id>
75
+ ```
@@ -0,0 +1,28 @@
1
+ # Growthub Creative Video Pipeline — governed workspace env template
2
+ #
3
+ # Keep real provider secrets in your local .env.local or deployment provider.
4
+
5
+ # Local workspace placement
6
+ CREATIVE_VIDEO_PIPELINE_HOME=
7
+ CREATIVE_STRATEGIST_HOME=
8
+ VIDEO_USE_HOME=
9
+
10
+ # Local studio shell
11
+ CREATIVE_VIDEO_PIPELINE_STUDIO_PORT=5180
12
+
13
+ # Stage 2 adapter
14
+ # Supported values: growthub-pipeline, byo-api-key
15
+ CREATIVE_VIDEO_PIPELINE_GENERATIVE_ADAPTER=growthub-pipeline
16
+ GROWTHUB_BRIDGE_BASE_URL=
17
+ GROWTHUB_BRIDGE_ACCESS_TOKEN=
18
+
19
+ # BYOK adapter values, only used when CREATIVE_VIDEO_PIPELINE_GENERATIVE_ADAPTER=byo-api-key
20
+ # Supported values: veo, fal, runway
21
+ VIDEO_MODEL_PROVIDER=
22
+ GOOGLE_AI_API_KEY=
23
+ FAL_KEY=
24
+ RUNWAY_API_KEY=
25
+
26
+ # Stage 3 video-use fork
27
+ ELEVENLABS_API_KEY=
28
+
@@ -0,0 +1,118 @@
1
+ # Creative Video Pipeline — Quickstart
2
+
3
+ This kit is a governed Growthub workspace with three runtime surfaces:
4
+
5
+ - `studio/` — local-first Vite operator shell.
6
+ - `apps/creative-video-pipeline/` — Vercel-ready pipeline dashboard and API key settings.
7
+ - Three-stage pipeline: Brief → Generate → Edit.
8
+
9
+ ## 0. Discover, export, and register
10
+
11
+ ```bash
12
+ growthub discover
13
+ growthub kit list --family studio
14
+ growthub kit download growthub-creative-video-pipeline-v1 --out ./creative-video-pipeline --yes
15
+ growthub kit fork register ./creative-video-pipeline
16
+ growthub kit fork status <fork-id>
17
+ ```
18
+
19
+ Natural-language prompt for an agent after export:
20
+
21
+ ```text
22
+ Read SKILL.md, skills.md, QUICKSTART.md, docs/adapter-contracts.md, and
23
+ workers/creative-video-pipeline-operator/CLAUDE.md. Run setup checks, verify
24
+ the generative adapter, and confirm the video-use fork path before starting work.
25
+ ```
26
+
27
+ ## 1. Verify the governed workspace
28
+
29
+ ```bash
30
+ cp .env.example .env
31
+ bash setup/check-deps.sh
32
+ node setup/verify-env.mjs
33
+ ```
34
+
35
+ Set adapter env in `.env`. Defaults are documented in `.env.example`.
36
+
37
+ ## 2. Clone the video-use fork (Stage 3 dependency)
38
+
39
+ ```bash
40
+ bash setup/clone-fork.sh
41
+ bash setup/install-skill.sh
42
+ ```
43
+
44
+ This clones `browser-use/video-use` into `${VIDEO_USE_HOME:-$HOME/video-use}` and installs it as a Claude Code skill.
45
+
46
+ ## 3. Configure the generative adapter
47
+
48
+ ### Option A — Growthub pipeline (primary, recommended)
49
+
50
+ ```bash
51
+ growthub auth login
52
+ growthub auth whoami
53
+ ```
54
+
55
+ In `.env`:
56
+ ```
57
+ CREATIVE_VIDEO_PIPELINE_GENERATIVE_ADAPTER=growthub-pipeline
58
+ GROWTHUB_BRIDGE_ACCESS_TOKEN=<token from growthub auth>
59
+ GROWTHUB_BRIDGE_BASE_URL=<growthub hosted base url>
60
+ ELEVENLABS_API_KEY=<your key>
61
+ ```
62
+
63
+ ### Option B — BYOK
64
+
65
+ In `.env`:
66
+ ```
67
+ CREATIVE_VIDEO_PIPELINE_GENERATIVE_ADAPTER=byo-api-key
68
+ VIDEO_MODEL_PROVIDER=veo # veo | fal | runway
69
+ GOOGLE_AI_API_KEY=<your key> # if VIDEO_MODEL_PROVIDER=veo
70
+ ELEVENLABS_API_KEY=<your key>
71
+ ```
72
+
73
+ Both options normalize to the same `GenerativeArtifact[]` object shape.
74
+
75
+ ## 4. Run the local Vite shell
76
+
77
+ ```bash
78
+ cd studio
79
+ npm install
80
+ npm run dev
81
+ ```
82
+
83
+ Open `http://localhost:5180`. The shell shows the three-stage pipeline status, output viewer, and settings panel.
84
+
85
+ ## 5. Run the Vercel app locally
86
+
87
+ ```bash
88
+ cd apps/creative-video-pipeline
89
+ npm install
90
+ npm run dev
91
+ ```
92
+
93
+ Open `http://localhost:3000`. Navigate to `/settings/keys` to configure the generative adapter and API keys.
94
+
95
+ ## 6. Run the pipeline
96
+
97
+ Follow `skills.md` for the complete three-stage runbook:
98
+
99
+ ```
100
+ Stage 1 — Brief brand-kit.md → scene structure → hooks → pipeline-brief.md
101
+ Stage 2 — Generate growthub pipeline execute OR BYOK → generative/manifest.json
102
+ Stage 3 — Edit video-use fork → EDL → FFmpeg → final/final.mp4
103
+ ```
104
+
105
+ ## 7. Deploy to Vercel
106
+
107
+ Use `apps/creative-video-pipeline` as the Vercel project root.
108
+
109
+ ```bash
110
+ cd apps/creative-video-pipeline
111
+ npm run build
112
+ ```
113
+
114
+ Connect to Vercel with root directory `apps/creative-video-pipeline`. Set adapter env per `docs/adapter-contracts.md` and `docs/vercel-deployment.md`.
115
+
116
+ ## 8. Governed operation
117
+
118
+ Read `SKILL.md`, `skills.md`, and `workers/creative-video-pipeline-operator/CLAUDE.md` before material changes. Record every stage completion to `.growthub-fork/project.md` and `.growthub-fork/trace.jsonl`.
@@ -0,0 +1,103 @@
1
+ ---
2
+ name: growthub-creative-video-pipeline-v1
3
+ description: "Chainable worker kit that composes a creative brief, generative image/video via the growthub pipeline or BYOK, and video editing via the video-use fork into a single governed pipeline. Use when the user says: \"creative video pipeline\", \"brief to video\", \"generative video pipeline\", \"fork growthub-creative-video-pipeline-v1\"."
4
+ triggers:
5
+ - creative video pipeline
6
+ - brief to video
7
+ - generative video pipeline
8
+ - video content pipeline
9
+ - fork growthub-creative-video-pipeline-v1
10
+ progressiveDisclosure: true
11
+ sessionMemory:
12
+ path: .growthub-fork/project.md
13
+ selfEval:
14
+ criteria:
15
+ - Stage 1 brief is grounded in brand-kit.md — scene structure, hooks, and guardrails sourced from file, not memory.
16
+ - Stage 2 generative execution routes through growthub pipeline execute (primary) or explicit BYOK adapter — no ad-hoc API calls outside the adapter contract.
17
+ - Stage 3 video edit delegates to VIDEO_USE_HOME fork — edit-plan.md is the handoff artifact, final.mp4 lands at output/<client>/<project>/final/.
18
+ - .growthub-fork/project.md is appended to at each stage boundary and self-eval outcome.
19
+ - .growthub-fork/trace.jsonl receives a typed event for each material change.
20
+ maxRetries: 3
21
+ traceTo: .growthub-fork/trace.jsonl
22
+ helpers:
23
+ - path: helpers/run-pipeline.sh
24
+ description: Auth pre-flight + growthub pipeline execute passthrough
25
+ - path: helpers/check-generative-adapter.sh
26
+ description: Print current adapter mode and which provider keys are set
27
+ subSkills:
28
+ - name: brief-generation
29
+ path: skills/brief-generation/SKILL.md
30
+ - name: generative-execution
31
+ path: skills/generative-execution/SKILL.md
32
+ - name: video-edit
33
+ path: skills/video-edit/SKILL.md
34
+ mcpTools: []
35
+ ---
36
+
37
+ # Creative Video Pipeline — Governed Workspace
38
+
39
+ Discovery entry and routing menu for `growthub-creative-video-pipeline-v1`. Family: `studio`. Agent contract: `workers/creative-video-pipeline-operator/CLAUDE.md`.
40
+
41
+ ## When to use this skill
42
+
43
+ When the user's intent matches any trigger above, or when an agent is dropped into a fork whose `.growthub-fork/fork.json` declares `kitId: "growthub-creative-video-pipeline-v1"`.
44
+
45
+ ## Decision tree
46
+
47
+ ```
48
+ Fork exists (.growthub-fork/fork.json)?
49
+ ├── No → growthub kit download growthub-creative-video-pipeline-v1 --out <path>
50
+ │ growthub kit fork register <path>
51
+
52
+ └── Yes → read in this order:
53
+ 1. .growthub-fork/project.md — session memory (primitive #3)
54
+ 2. SKILL.md (this file) — routing menu (primitive #1)
55
+ 3. skills.md — operator runbook
56
+ 4. workers/creative-video-pipeline-operator/CLAUDE.md — agent contract
57
+ 5. QUICKSTART.md — first-run steps
58
+ 6. runtime-assumptions.md — host requirements
59
+ 7. .growthub-fork/policy.json — what you may touch
60
+ 8. .growthub-fork/trace.jsonl (tail 20) — recent machine history
61
+ ```
62
+
63
+ ## Three-stage pipeline
64
+
65
+ ```
66
+ Stage 1 — Brief brand-kit.md → hooks → scene structure
67
+ output: output/<client>/<project>/brief/pipeline-brief.md
68
+
69
+ Stage 2 — Generate growthub pipeline execute (primary)
70
+ OR BYOK provider adapter (secondary)
71
+ output: output/<client>/<project>/generative/
72
+
73
+ Stage 3 — Edit video-use fork (VIDEO_USE_HOME)
74
+ ElevenLabs Scribe → EDL → FFmpeg
75
+ output: output/<client>/<project>/final/final.mp4
76
+ ```
77
+
78
+ ## Activation
79
+
80
+ Primary: `growthub pipeline execute` with the `video-generation` CMS node (veo-3.1-generate-001).
81
+ Secondary: BYOK path via `CREATIVE_VIDEO_PIPELINE_GENERATIVE_ADAPTER=byo-api-key`.
82
+
83
+ Both normalize to the same `GenerativeArtifact[]` object. The UI shell renders whichever path produced the artifacts.
84
+
85
+ ## The six primitives (same shape across every Growthub worker kit)
86
+
87
+ 1. **`SKILL.md`** — this file.
88
+ 2. **Symlinked pointer** — repo-root `AGENTS.md` is authoritative.
89
+ 3. **`.growthub-fork/project.md`** — session memory, seeded at init from `templates/project.md`.
90
+ 4. **Self-evaluation** — generate → apply → evaluate → record; retry up to `maxRetries` (3); mirrors the Fork Sync Agent loop.
91
+ 5. **`skills/`** — sub-skill lanes: `brief-generation`, `generative-execution`, `video-edit`.
92
+ 6. **`helpers/`** — `run-pipeline.sh`, `check-generative-adapter.sh`.
93
+
94
+ ## Related files
95
+
96
+ - `skills.md` — full 3-stage operator runbook
97
+ - `QUICKSTART.md` — first-run steps
98
+ - `runtime-assumptions.md` — host requirements (FFmpeg, ElevenLabs, CLI, video-use fork)
99
+ - `output-standards.md` — output dir structure
100
+ - `docs/adapter-contracts.md` — generative adapter contracts
101
+ - `docs/pipeline-architecture.md` — chain composition detail
102
+ - `templates/project.md` — session-memory seed
103
+ - `templates/self-eval.md` — self-evaluation pattern
@@ -0,0 +1,20 @@
1
+ # Creative Video Pipeline app — deployment env template
2
+
3
+ # Supported values: growthub-pipeline, byo-api-key
4
+ CREATIVE_VIDEO_PIPELINE_GENERATIVE_ADAPTER=growthub-pipeline
5
+
6
+ # growthub-pipeline adapter
7
+ GROWTHUB_BRIDGE_BASE_URL=
8
+ GROWTHUB_BRIDGE_ACCESS_TOKEN=
9
+
10
+ # byo-api-key adapter
11
+ # Supported values: veo, fal, runway
12
+ VIDEO_MODEL_PROVIDER=
13
+ GOOGLE_AI_API_KEY=
14
+ FAL_KEY=
15
+ RUNWAY_API_KEY=
16
+
17
+ # Stage 3 edit pipeline handoff
18
+ VIDEO_USE_HOME=
19
+ ELEVENLABS_API_KEY=
20
+
@@ -0,0 +1,33 @@
1
+ # creative-video-pipeline — Next.js App
2
+
3
+ Next.js 16 + React 19 app for the Growthub Creative Video Pipeline worker kit. Vercel-deployable.
4
+
5
+ ## Dev
6
+
7
+ ```bash
8
+ npm install
9
+ npm run dev
10
+ ```
11
+
12
+ ## Build
13
+
14
+ ```bash
15
+ npm run build
16
+ npm start
17
+ ```
18
+
19
+ ## Deploy
20
+
21
+ ```bash
22
+ vercel --prod
23
+ ```
24
+
25
+ See `docs/vercel-deployment.md` for environment variable configuration.
26
+
27
+ ## Routes
28
+
29
+ | Route | Purpose |
30
+ |-------|---------|
31
+ | `/` | Pipeline dashboard — stage status, adapter state |
32
+ | `/settings/keys` | API key configuration reference |
33
+ | `/api/pipeline` | GET — returns live adapter config + pipeline stage state |
@@ -0,0 +1,27 @@
1
+ import { NextResponse } from "next/server";
2
+ import { readAdapterConfig } from "@/lib/adapters/env";
3
+ import { describeGenerativeAdapter } from "@/lib/adapters/generative/index";
4
+ import { pipelineStages, stageStatus } from "@/lib/domain/pipeline";
5
+
6
+ export const dynamic = "force-dynamic";
7
+
8
+ export function GET() {
9
+ const config = readAdapterConfig();
10
+ const generative = describeGenerativeAdapter();
11
+
12
+ return NextResponse.json({
13
+ kit: "growthub-creative-video-pipeline-v1",
14
+ adapter: generative,
15
+ config: {
16
+ generativeAdapter: config.generativeAdapter,
17
+ videoUseHome: config.videoUseHome,
18
+ hasElevenLabsKey: config.hasElevenLabsKey,
19
+ hasBridgeToken: config.hasBridgeToken,
20
+ videoModelProvider: config.videoModelProvider,
21
+ },
22
+ stages: pipelineStages.map((s) => ({
23
+ ...s,
24
+ status: stageStatus.PENDING,
25
+ })),
26
+ });
27
+ }