feat(creative): 3D production pipeline (Fase 1 MVP)
Summary
Adds a new API-first 3D creative pipeline at src/agents/gaming_cmo/creative/ for generating Unity-ready game assets via Tripo H3.1 (image→3D) and OpenAI GPT Image 1.5 (concepts), with local rembg for background removal. Off by default behind CMO_CREATIVE_ENABLED.
This module is independent from the existing creative_pipeline.py (Scenario/Layer/Seeles for 2D marketing creatives). Both can coexist.
What's in
-
Module
src/agents/gaming_cmo/creative/(package): providers, pipeline stages, validators, library, CLI. -
Migration
database/migrations/008_creative_pipeline.sql— 6 newcreative_*tables (briefs, concepts, jobs, job_stages, assets, provider_configs). -
CLI subcommand:
cmoagent creative brief|briefs|library|cost. In-memory fallback whenDATABASE_URLunset. -
Setup portal extension:
creative_apisblock surfaces API key slots (encrypted via existing connector_config flow). -
Budget integration: per-stage guardrail through existing
BudgetEnforcerwithcreativescope. -
Tests: 44 new in
tests/test_creative_3d_pipeline.py. Renamed fromtest_creative_pipeline.pyto avoid collision. -
Docs: design spec + implementation plan under
docs/superpowers/. -
Hardening fixes from code review: path-traversal block in
LocalFSStorage.get,BudgetGuard/BudgetEnforcersignature parity, last-resort exception handling so failed jobs never stay inRUNNING.
Stack chosen (state of the art, April 2026)
| Role | Provider |
|---|---|
| Core image→3D | Tripo H3.1 (GDC March 2026) |
| Concepts | OpenAI GPT Image 1.5 |
| Background removal | rembg (local) |
Fase 2 will add Rodin Gen-2, Hunyuan 3.5 via Fal, MJ V8, Flux 2, A/B mode, web portal.
Test plan
-
uv run pytest tests/— 243 PASS (44 new + 199 existing, no regressions) -
CLI smoke: python -m agents.gaming_cmo creative brief --text "..." --asset-type propreturns success JSON -
Module import smoke: from agents.gaming_cmo.creative import creative_enabledreturns False by default -
Code review by python-reviewer: 2 CRITICAL + 4 HIGH findings fixed before submitting -
DB migration 008_creative_pipeline.sqlapplied against staging Postgres -
Real API smoke against Tripo + OpenAI sandboxes once keys are in setup portal -
CEO walkthrough of CLI flow on a real brief