# Marketing Asset QA Workflow

**Owner:** ARIA
**Created:** 2026-02-17
**Updated:** 2026-02-23
**Requested by:** Xian

## Core Principle

**Users receive PERFECT assets.** QA and fixes happen BEFORE delivery — the user never sees broken versions.

## Workflow: Generate → QA → Fix → Deliver → Log

### Step 1: Generate Asset

**For image assets — use the Asset Generator pipeline (MANDATORY):**

Load the `asset-generator` skill. All image generation goes through the unified pipeline:

```bash
python3 /home/aria/projects/marketing-qa-reviewer/generate.py \
  --product <product> \
  --platform <platform> \
  --subject "<subject>" \
  --setting "<setting>" \
  --message "<key_message>" \
  --audience "<audience>"
```

The pipeline automatically handles:
- Loading aesthetic profile from `agency/brand/aesthetic-profiles/<product>.md`
- Loading style fragment from `skills/image-prompt-standards/styles/`
- Checking visual consistency anchor in `products/<slug>/marketing/approved/`
- Batch generating 3 variants + pre-screening
- Running full 5-layer QA internally
- Smart retry with critique-driven prompt mutation (up to 5 attempts)

**Do NOT manually assemble prompts or call nano-banana-pro directly for marketing assets.**
The generator is the single entry point. See `skills/asset-generator/SKILL.md` for full usage.

For caption/video text: skip the generator, proceed directly to generation.

### Step 2: Automatic QA Review (BEFORE DELIVERY)
**Immediately after generation, before showing to user:**
- Review for:
  - **Text errors**: Typos, duplicate words, grammar issues
  - **Branding**: Wrong product name, wrong handle, wrong logo
  - **Design quality**: Readability, contrast, alignment
  - **Brand consistency**: Correct colors, logo, typography for this product
  - **Technical**: Resolution, format, file integrity
  - **Aesthetic profile match**: Does the image match the product's primary style, mood, and photography direction? Load `agency/brand/aesthetic-profiles/<product>.md` and check against it. Does it hit the avoid list? If yes → fail.
  - **Visual consistency**: If 2+ approved assets exist in `products/<slug>/marketing/approved/`, use the `image` tool to compare against the 2 most recent. Check for lighting, color grade, compositional language, and environment match. Drift = fail. See `agency/processes/visual-consistency.md` for drift signals.

### Step 3: Fix → Re-QA Loop (Until Pass)
**If QA finds warnings or failures:**
- **DO NOT deliver the broken asset**
- Fix the issue immediately:
  - Typos → fix in template/prompt, regenerate
  - Wrong branding → correct and regenerate
  - Design issues → adjust and regenerate
  - Caption errors → rewrite
- **Re-run QA on the fixed version**
- **If still has issues → fix again → QA again**
- **Repeat until QA status = PASS**

```
┌─────────┐    ┌─────────┐    ┌─────────┐
│ Generate │───▶│   QA    │───▶│  Pass?  │
└─────────┘    └─────────┘    └────┬────┘
                                   │
                    ┌──────────────┴──────────────┐
                    │ NO                          │ YES
                    ▼                             ▼
               ┌─────────┐                  ┌─────────┐
               │   Fix   │                  │ Deliver │
               └────┬────┘                  └─────────┘
                    │
                    └───────▶ Back to QA
```

### Step 4: Deliver ONLY After QA Pass
**Only when QA status = PASS:**
- Send the final, clean asset to the user
- User sees only the perfect version
- No "here's the broken one, I'll fix it" — just deliver quality
- **Never deliver warning or fail status assets**

### Step 5: Log Review + Fixes to Content Review Dashboard
**After successful delivery:**
- Log to `/home/aria/products/social-qa-dashboard/qa-reports.json`:
  - Initial QA result (pass/warning/fail)
  - What issues were found (if any)
  - What fixes were applied (if any)
  - Final status (should be `pass` or `fixed`)
  - Timestamps for review and fix

## QA Report Schema

```json
{
  "path": "/path/to/asset.png",
  "type": "image|video|caption",
  "status": "pass|fixed",
  "reviewedAt": "2026-02-20T10:00:00Z",
  "aestheticProfile": {
    "product": "overture|worklane|vector|alignly|clocklane|encore",
    "primaryStyle": "cinematic-editorial|authentic-imperfection|bold-kinetic|warm-documentary|precise-documentary|quiet-luxury",
    "profileMatch": "pass|fail",
    "avoidListViolations": []
  },
  "visualConsistency": {
    "anchorAssetsChecked": true,
    "consistencyStatus": "pass|fail|no-anchor",
    "driftNotes": ""
  },
  "initialFindings": [
    {
      "type": "warning|fail",
      "category": "branding|aesthetic|consistency|text|technical",
      "issue": "Typo: 'Ovreture' instead of 'Overture'"
    }
  ],
  "fixes": [
    {
      "issue": "Typo in product name",
      "action": "Regenerated with correct spelling",
      "fixedAt": "2026-02-20T10:01:00Z"
    }
  ],
  "notes": "Additional context if needed"
}
```

## What Gets Logged

| Scenario | Log Entry |
|----------|-----------|
| Generated, passed QA first try | `status: "pass"`, no fixes |
| Generated, had issues, fixed | `status: "fixed"`, `initialFindings` + `fixes` arrays populated |
| Multiple fix iterations | Log each fix attempt in `fixes` array |

## Branding Review Workflow (Xian — 2026-02-23)

This is the mandatory step-by-step process for every asset generation.

**Step 1 — Identify Product**
- Determine which product the asset belongs to before anything else.

**Step 2 — Load Product Branding + Aesthetic Profile**
- Retrieve existing branding from Symphony (if available): colors, logos, typography, reference materials
- **Also load the aesthetic profile:** `agency/brand/aesthetic-profiles/<product>.md`
  - Extract: primary style, visual mood, prompt fragments, color direction, avoid list
  - This is the visual quality standard for this product — not just the logo and colors

**Step 3 — Apply Current Standards**
- Apply Social Media Asset Standards from the asset type guide: `skills/image-prompt-standards/asset-types/<type>.md`
  - Covers: dimensions, formats, compositional rules, quality gate checklist
- Apply aesthetic style standard from: `skills/image-prompt-standards/styles/<primary-style>.md`
  - Covers: core prompt fragments, lighting recipe, environment variants, negative prompts

**Step 4 — Generate Asset**
- Produce the asset using only approved branding elements for that product
- No generic designs, no cross-product element mixing

**Step 5 — Validate Before Finalizing**
Check all of the following before delivery:

*Branding checks:*
- ✅ Correct logo?
- ✅ Correct colors?
- ✅ Correct product identity?
- ✅ Meets asset type specs (dimensions, format)?
- ✅ No cross-brand contamination?

*Aesthetic checks (new):*
- ✅ Matches product's primary style from aesthetic profile?
- ✅ Nothing on the avoid list present?
- ✅ Lighting, mood, composition match the style fragment?
- ✅ Visual consistent with existing campaign assets (if applicable)?

**Step 6 — Flag Exceptions**
- If branding is incomplete, conflicting, or unclear → flag for human review
- Do not guess or use generic fallbacks

---

## Branding Standards (Added by Xian — 2026-02-23)

**Core Objective:** Every generated asset must be accurate to each product's branding identity and consistent with its approved visual standards.

### Rules

1. **Treat each product as a separate brand**
   - Each product has its own: brand colors, logos, typography, visual style, marketing references
   - **Never mix branding elements between products**

2. **Tie every asset to the correct product branding**
   - Before generating, identify which product the asset belongs to
   - Use only that product's approved branding elements
   - Output must visually match the product's brand identity

3. **Preserve brand consistency across all assets**
   - Keep consistent: colors, logo usage, layout style, tone/messaging, graphic treatments
   - Avoid generic designs if brand-specific references exist

4. **Do not assume missing branding details**
   - If branding details are incomplete → mark asset as **Needs Review / Clarification**
   - Prefer safe placeholders or neutral layouts over incorrect branding

## Guardrails (Xian — 2026-02-23)

**Hard rules — no exceptions:**
- ❌ Never reuse another product's logo or color palette
- ❌ Never invent official branding elements
- ❌ Never override existing approved branding in Symphony without evidence
- ✅ Prefer review flags over incorrect output
- ✅ Keep product-to-brand mapping strict and traceable

## Required Output Format (Per Asset)

Every generated or reviewed asset must return:

| Field | Description |
|-------|-------------|
| **Product Name** | Which product this asset belongs to |
| **Asset Type** | Blog Hero / Social Card / Ad Creative / Campaign Lead |
| **Branding Source Used** | Symphony / uploaded screenshots / provided standards |
| **Aesthetic Profile Used** | `agency/brand/aesthetic-profiles/<product>.md` |
| **Primary Style Applied** | e.g., Cinematic Editorial, Warm Documentary |
| **Branding Status** | `Pass` / `Warning` / `Needs Review` |
| **Aesthetic Status** | `Pass` / `Fail` — matches profile? avoid list clear? |
| **Consistency Status** | `Pass` / `Fail` / `No Anchor` — campaign visual match |
| **Notes** | e.g., missing logo, style drift, avoid list violation |

---

## Standing Instructions

1. **NEVER deliver broken assets** — fix first, deliver second
2. **Be transparent in logs** — record what was wrong and how it was fixed
3. **Keep dashboard current** — update immediately after each generation
4. **Add new products automatically** — if product not in dashboard, create entry
5. **Silent to user about fixes** — they just get the perfect asset (unless they ask about the process)
6. **Always verify product branding before generating** — no cross-product element mixing

## Dashboard

- **File:** `/home/aria/products/social-qa-dashboard/qa-reports.json`
- **URL:** https://social-qa-dashboard.dev.apps.symph.co

---

## Trend-Aware Asset Generation (Xian — 2026-02-23)

### Core Rule
- **Trend execution** — follow current social media and design trends in *how* assets are built
- **Brand identity** — branding always governs *what* they look like
- In short: **follow trends in execution, follow branding in identity**

### What to Track per Platform
- **Content formats** — static, carousel, short-form video, story, reel
- **Layout/composition patterns** — visual hierarchy, spacing, hook placement
- **First-frame hooks** — attention-grabbing openers for video/reel content
- **Typography treatment** — styles allowed within brand guidelines
- **Motion/editing style** — pacing, cuts, transitions (for video)
- **CTA styles** — engagement patterns that are converting right now
- **Platform norms** — Facebook vs TikTok vs Instagram vs LinkedIn differ significantly

### Generation Checklist (Trend-Aware)
1. Check product branding profile first
2. Check Social Media Standards (if provided for product)
3. Select trend patterns that *fit* the product
4. Generate using a brand-safe version of the trend
5. If trend conflicts with brand → skip or flag for review

### Optional Output Note per Asset
Include a short line when generating:
- **Trend Applied:** e.g., "Short-form hook-first layout"
- **Brand Safety Check:** e.g., "Uses approved palette and logo placement"

### Guardrails
- ❌ Don't apply trendy styles that conflict with branding or guidelines
- ❌ Don't force a trend if it reduces clarity, trust, or brand consistency
- ✅ Flag risky trend usage — mark as "Needs Review" rather than auto-applying
