Skip to content

feat: Creative Studio — material (物料) production capability#2

Merged
oratis merged 6 commits into
feat/growth-cuddler-pilotfrom
feat/growth-creative-studio
Jul 4, 2026
Merged

feat: Creative Studio — material (物料) production capability#2
oratis merged 6 commits into
feat/growth-cuddler-pilotfrom
feat/growth-creative-studio

Conversation

@oratis

@oratis oratis commented Jul 4, 2026

Copy link
Copy Markdown
Owner

The material (物料) production capability for the Cuddler growth OS. Turns a brief into a DCO variant matrix of platform-fitted ad creative, and imports Cuddler scenes as review-gated creatives. Stacked on #1.

Grounded in research: IAB Dynamic Content Ads schema (base creative + swappable slots), the open-source creative-automation pipeline pattern (brief → multi-format localized assets), and published 2025–26 platform specs (TikTok in-feed 9:16 1080×1920 5–60s ≤500MB; Meta Reels/Feed; Google App; Apple Search Ads).

Pipeline

Brief → variant matrix (platform × format × hook × language) → platform-fitted copy → spec validation → produce → review → push

Modules (src/lib/growth/, all pure + unit-tested)

  • creative-specs.ts — per-platform spec registry + validateCreative (conforms / needs_resize / needs_transcode / rejected; ASA → uses store page)
  • creative-copy.tsgenerateCopy fitted to each platform's char limits (LLM + deterministic fallback; output never exceeds maximums)
  • creative-brief.tsbuildVariantMatrix DCO fan-out (deduped, capped, truncation reported)
  • storyboard.ts — hook → scene → end-card composition; a Cuddler scene ref becomes the scene segment
  • scene-import.ts — scene → review-gated Creative + LLM/fallback tagging

Schema

Creative.sourceRef/tags; CreativeBrief; CreativeVariant (DCO matrix cell) + migration.

Surfaces

POST/GET /api/creatives/studio · POST /api/ingest/scenes (HMAC, idempotent) · /creatives/studio UI (brief → matrix with spec lights) + sidebar entry.

Gates

Review-gated (imported scenes = reviewStatus=pending — the IP/authorization gate); spec-safe (no push until conforms); bounded matrix (cap 40, truncation reported).

Verification

138 vitest · prisma validate/generate · tsc · eslint · next build — all green.

Not included (needs external services)

Actual asset rendering (variants → Seedream/Seedance2 jobs), transcode/crop, and platform push of produced creatives.

🤖 Generated with Claude Code

oratis and others added 6 commits July 4, 2026 22:43
WHAT (additive):
- Creative.sourceRef + tags (scene provenance + LLM creative tags)
- CreativeBrief: a production brief (product/audience/angle/platforms/languages)
- CreativeVariant: DCO matrix cell (platform×format×hook×language) with fitted
  copy + produced Creative link + platform-spec conformance status
- IAB Dynamic Content Ads aligned (base + swappable slots); back-relations;
  FKs cascade; prisma validate/generate + tsc clean

Ref: docs/growth/00-cuddler-first-redesign.md §6

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…dation

The core of the material (物料) capability. Per-platform/placement specs (TikTok
in-feed, Meta Reels/Feed, Google App, Apple Search Ads) grounded in published
2025–26 guidance, in one editable place. validateCreative distinguishes fixable
issues: needs_resize (dims/ratio) vs needs_transcode (duration/size/container)
vs rejected (wrong kind); ASA → not_applicable (uses store product page).
11 vitest cases.

Ref: docs/growth/03-creative-studio.md

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…back)

fitText/fitCopy (word-boundary truncation within limits), validateCopy,
generateCopy (LLM asked to respect char limits, deterministic fallback when no
key, output always fitted so it never exceeds platform maximums). 12 vitest cases.

Ref: docs/growth/03-creative-studio.md

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
buildVariantMatrix: brief → platform×format×hook×language cells (IAB DCO
fan-out), deduped + capped with truncation reported. buildStoryboard: hook→
scene→end-card structure with cumulative timings; a Cuddler scene ref becomes
the scene segment. 8 vitest cases.

Ref: docs/growth/03-creative-studio.md · 01-5k-pilot-plan.md §P4

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
WHAT:
- scene-import.ts: parseScenes + mapSceneToCreative (source=imported_scene,
  reviewStatus=pending) + tagScenes (LLM character/emotion/style/language with
  deterministic fallback) + fallbackTags
- POST /api/ingest/scenes?org=: HMAC-authed, idempotent by (orgId, sourceRef),
  imports scenes as review-gated Creatives — must pass creatives/review before
  any platform push (IP/authorization gate)
- 6 vitest cases; tsc + eslint clean

Ref: docs/growth/00-cuddler-first-redesign.md §6

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
WHAT:
- POST /api/creatives/studio: brief → buildVariantMatrix → generate platform-
  fitted copy per variant → CreativeVariant rows (spec status); GET list/detail
- /creatives/studio: brief form (product/audience/angle/hooks/platforms/langs)
  → variant matrix table with spec-status lights; sidebar entry
- docs/growth/03-creative-studio.md — full pipeline spec
- 138 vitest total; tsc + eslint + next build clean

Ref: docs/growth/03-creative-studio.md · 00-cuddler-first-redesign.md §6

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@oratis oratis merged commit cd35d5b into feat/growth-cuddler-pilot Jul 4, 2026
oratis added a commit that referenced this pull request Jul 4, 2026
Brings the Creative Studio (物料) capability and P21 Growth Agent that were
merged into intermediate stacked branches. main now has the full P18–P21 stack.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant