{
  "id": "2026-04-28-marketing-studio-design-cc8da59f3b",
  "scope": "redkey",
  "source_of_truth": "repo",
  "source_path": "docs/specs/2026-04-28-marketing-studio-design.md",
  "source_kind": "markdown",
  "visibility": "internal",
  "renderer_id": "design_doc.dreamborn-forge.generated.v1",
  "design_system": "dreamborn-design-system:forge",
  "generated_at": "2026-05-09T13:00:55.689Z",
  "artifact_type": "design_doc",
  "schema_version": "design_doc.generated.v1",
  "title": "Marketing Studio — Design Spec",
  "summary": "Marketing Studio — Design Spec Date: 2026 04 28 Status: Approved — ready for implementation planning Branch: feature/marketing agents Client: DreamBorn Problem The marketing operation exists — Nova plans, Harper writes, Jade posts, Rosa designs — but there's no place to actually work. Content lives in Google Drive folders. Justin's \"approval\" is an exec gate...",
  "format_source": "markdown",
  "sections": [
    {
      "title": "Marketing Studio — Design Spec",
      "level": 1,
      "body": "**Date:** 2026-04-28\n**Status:** Approved — ready for implementation planning\n**Branch:** feature/marketing-agents\n**Client:** DreamBorn\n\n---"
    },
    {
      "title": "Problem",
      "level": 2,
      "body": "The marketing operation exists — Nova plans, Harper writes, Jade posts, Rosa designs — but there's no place to actually work. Content lives in Google Drive folders. Justin's \"approval\" is an exec gate that shows up in an inbox. Pieces that go to his personal LinkedIn and X need his voice on them, not just his sign-off, but the workflow doesn't give him a workspace — it gives him a file to read and a button to click. The loop between what agents produce and what Justin actually wants to publish is broken because there's no studio — no place where strategy gets set, themes get shaped, drafts get edited, and the full week's content pipeline is visible and in-motion at once.\n\n---"
    },
    {
      "title": "Goal",
      "level": 2,
      "body": "Justin operates as a creative director — not a content approver. He sets themes, shapes angles, finishes the voice on pieces that carry his name, and the agents handle everything else at volume. The Studio surfaces ideas, produces drafts, generates images, and publishes automatically. Justin's time in it is judgment and taste, not production. The output is an enormous, always-on content operation across every channel that sounds like him because he was actually involved — not because an agent guessed.\n\n---"
    },
    {
      "title": "Non-Negotiables",
      "level": 2,
      "body": "- Every piece on Justin's personal channels (LinkedIn, X) has his voice on it before it publishes — no exceptions\n- The Studio is the only place Justin does marketing work — no Drive, no inbox, no other tool\n- Agent-to-agent communication is machine-readable JSON — no prose workflow documents between agents\n- Approved content publishes automatically — zero manual posting steps after approval\n- Volume never excuses generic output — the system produces at scale without sounding like a bot\n\n---"
    },
    {
      "title": "What Wrong Looks Like",
      "level": 2,
      "body": "- Justin clicking Approve without editing — just clearing a queue\n- Content that opens with \"AI is transforming industries…\" or any generic AI take\n- A piece going out on Justin's LinkedIn that doesn't sound like Justin\n- Nova proposing themes Justin would never use\n- Content stuck in a queue because something broke and nobody noticed\n- Justin going anywhere other than the Studio to do marketing work\n\n---"
    },
    {
      "title": "Success Metrics",
      "level": 2,
      "body": "- 14+ pieces published per week across all 5 channels, consistently\n- Justin's active time in the Studio under 2 hours/week\n- 100% of approved content auto-publishes with no manual steps\n- Zero weeks where a channel goes dark due to pipeline failure\n\n---"
    },
    {
      "title": "Architecture Overview",
      "level": 2,
      "body": "Three interconnected systems:\n\n```\nBezelBrain               Content Intelligence Layer        Studio\n(idea + thinking)   +   (evidence + voice + visual)  →   (the workspace)\n      ↓                           ↓                              ↓\nNova retrieves              Rosa retrieves                Justin directs,\nconcepts before             visuals by concept            edits, approves,\nplanning                    before generating             publishes\n```\n\n---"
    },
    {
      "title": "System 1 — Content Intelligence Layer",
      "level": 2,
      "body": "A unified semantic library. One table, six asset types, one retrieval model. Every asset is stored with a concept embedding (pgvector, `text-embedding-3-small`, 1536-dim) — same infrastructure as `agent_memory` and BezelBrain."
    },
    {
      "title": "Asset Types",
      "level": 3,
      "body": "| Type | Description | Who adds | Who reads |\n|---|---|---|---|\n| `thinking` | Ideas, observations, architecture insights | Justin via BezelBrain | Nova |\n| `evidence` | Stats, data points, research — with source + date + context | Justin via Studio quick-capture | Harper, Jade |\n| `voice` | Justin's own quotes and phrases worth keeping | Justin via Studio | Harper, Jade |\n| `social_proof` | Customer testimonials, outcomes, stories | Justin via Studio | Harper, Jade |\n| `visual` | AI-generated backgrounds, brand elements, Rosa's outputs | Rosa (auto) | Rosa |\n| `published` | Every published piece with engagement data | Ivy (auto) | Nova, Harper |"
    },
    {
      "title": "Schema: `cil_assets` table",
      "level": 3,
      "body": "```sql\nid              uuid primary key\nclient_id       text                        -- 'dreamborn'\ntype            text                        -- thinking | evidence | voice | social_proof | visual | published\nconcept         text                        -- human-readable description of what this is\nembedding       vector(1536)                -- pgvector — semantic search index\ncontent         text                        -- the asset content (stat text, quote, testimonial, etc.)\nmetadata        jsonb                       -- type-specific fields (see below)\nsource          text                        -- URL, person name, event, etc.\nsource_date     date                        -- when the stat/quote was originally from\ntags            text[]\nused_count      int default 0               -- how many times retrieved + used\nlast_used_at    timestamptz\ncreated_by      text                        -- 'justin' | agent slug\ncreated_at      timestamptz default now()\n```"
    },
    {
      "title": "Type-specific metadata",
      "level": 3,
      "body": "```json\n// evidence\n{ \"source_name\": \"Gartner\", \"source_url\": \"...\", \"verified\": true }\n\n// voice\n{ \"context\": \"June workshop\", \"platform\": \"spoken | written\" }\n\n// social_proof\n{ \"company\": \"Acme Co\", \"person\": \"John Smith\", \"role\": \"VP Supply Chain\", \"outcome\": \"...\" }\n\n// visual\n{ \"generation_prompt\": \"...\", \"model\": \"gemini-imagen-3 | higgsfield\", \"dimensions\": \"1200x630\", \"piece_id\": \"...\" }\n\n// published\n{ \"channel\": \"linkedin\", \"published_url\": \"...\", \"piece_id\": \"...\", \"engagement\": {} }\n```"
    },
    {
      "title": "Quick Capture (Studio UI)",
      "level": 3,
      "body": "Justin pastes a stat, quote, or testimonial into the Studio capture panel. Studio:\n1. Auto-detects type (evidence / voice / social_proof) based on content pattern\n2. Extracts source, date, attribution where present\n3. Embeds via OpenAI → stores in `cil_assets`\n4. Available to all agents in next run"
    },
    {
      "title": "Retrieval (agents)",
      "level": 3,
      "body": "```python"
    },
    {
      "title": "Harper before writing — same pattern as retrieve_memories()",
      "level": 1,
      "body": "results = match_cil_assets(\n    query_embedding=embed(task_brief),\n    asset_types=[\"evidence\", \"voice\", \"social_proof\"],\n    client_id=\"dreamborn\",\n    limit=10\n)"
    },
    {
      "title": "Injected into brief as ## Content Intelligence section",
      "level": 1,
      "body": "```\n\n---"
    },
    {
      "title": "Principle",
      "level": 3,
      "body": "AI generates the visual concept. Code renders the brand layer. Justin edits text inline. Background is cached and reused across pieces.\n\n```\nNova writes image_concept in CAMPAIGN.json\n  \"The read receipt. Certainty. Permanence. Something verifiable.\"\n        ↓\nRosa checks cil_assets (type=visual) for semantic match first\n  → Match found? Reuse cached background. Skip generation.\n  → No match? Call Gemini Imagen / Higgsfield API with prompt\n        ↓\nAI generates background scene — unique per concept\nRosa stores result in cil_assets (type=visual) with concept embedding\n        ↓\nRosa composites brand layer on top\n  DreamBorn fonts (DM Sans / Fraunces / Bebas Neue)\n  Logo (docs/img/logos/dreamborn/...)\n  Text fields from CONTENT.json (title, hook, stat, byline)\n  HTML/CSS → Puppeteer → PNG\n        ↓\nStudio displays composed image\nJustin edits text fields inline → Puppeteer re-renders text layer only (<1 second)\nJustin wants new visual? → Rosa regenerates background only\n```"
    },
    {
      "title": "Two-Layer Architecture",
      "level": 3,
      "body": "| Layer | Source | Cost | Speed | Editable |\n|---|---|---|---|---|\n| Background | AI generation (Gemini / Higgsfield) | API credit per image | 3–8 seconds | Regenerate on request |\n| Brand + text | HTML/CSS → Puppeteer | Zero | <1 second | Inline, instant |"
    },
    {
      "title": "Inline Text Editing",
      "level": 3,
      "body": "Text displayed in the image (title, hook, stat, byline) is stored as fields in `CONTENT.json` — never baked into the AI background. Studio renders text fields as overlay. Justin clicks any text element in the image preview → editable input appears → types → Puppeteer re-composites text layer → updated image shown in under 1 second. Background never touched."
    }
  ],
  "html_path": "artifacts/2026-04-28-marketing-studio-design-cc8da59f3b.html",
  "json_path": "artifacts/2026-04-28-marketing-studio-design-cc8da59f3b.json"
}