Skip to content

feat(creative): 3D production pipeline (Fase 1 MVP)

isidro requested to merge claude/mystifying-ardinghelli-d23d57 into main

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 new creative_* tables (briefs, concepts, jobs, job_stages, assets, provider_configs).
  • CLI subcommand: cmoagent creative brief|briefs|library|cost. In-memory fallback when DATABASE_URL unset.
  • Setup portal extension: creative_apis block surfaces API key slots (encrypted via existing connector_config flow).
  • Budget integration: per-stage guardrail through existing BudgetEnforcer with creative scope.
  • Tests: 44 new in tests/test_creative_3d_pipeline.py. Renamed from test_creative_pipeline.py to avoid collision.
  • Docs: design spec + implementation plan under docs/superpowers/.
  • Hardening fixes from code review: path-traversal block in LocalFSStorage.get, BudgetGuard/BudgetEnforcer signature parity, last-resort exception handling so failed jobs never stay in RUNNING.

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 prop returns success JSON
  • Module import smoke: from agents.gaming_cmo.creative import creative_enabled returns False by default
  • Code review by python-reviewer: 2 CRITICAL + 4 HIGH findings fixed before submitting
  • DB migration 008_creative_pipeline.sql applied 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

References

Merge request reports