# Consolidation Protocol

Run this **before** building or updating any competitor page.
Prevents duplicate paths, orphaned assets, and version drift.

---

## Pre-Flight Checklist

```bash
# 1. Find all versions of this brand
find public/etoro-competition -type d | grep -i "[brand-name]" | sort

# 2. Identify canonical path (kebab-case, no -live or -v2 suffix)
# Canonical: trading-212/   NOT: trading212-live/, trading212/, trading-212-v2/

# 3. Count assets per version
for dir in <found-dirs>; do echo "$dir: $(ls $dir/assets/ 2>/dev/null | wc -l) assets"; done
```

## Merge Steps

1. **Inventory all assets** across every version — list by filename, dimensions, source tier
2. **Audit each image** (Step 0B) — discard error pages, WAF blocks, sub-700px screenshots, 120×90 thumbnails
3. **Pick best-per-slot** — highest res wins; prefer T1/T2 (agency/OOH) over T3/T4 (screenshots)
4. **Copy keepers to canonical `assets/`** — do not overwrite if canonical already has a better version
5. **Update `slot-manifest.json`** — every placed image must have a slot entry with `tier`, `why`, `dimensions_required`
6. **Delete non-canonical paths** — `git rm -r [old-path]`
7. **Update hub `index.html`** — ensure card link + image src point to canonical path only

## Image Quality Gate

Minimum dimensions per slot type:

| Slot | Min Width | Min Height | Notes |
|------|-----------|------------|-------|
| Hero (A) | 1100px | 600px | Landscape. No portrait crops. |
| TL;DR alongside | 600px | 750px | Portrait 4:5 preferred |
| Color/type alongside | 800px | 400px | — |
| B-grid cell | 700px | 400px | Reject sub-700px |
| C-strip panel | 800px | 500px | — |
| App Store screenshot | 1000px | 1800px | Portrait. 1242×2208 ideal. |
| OOH / campaign | 1200px | 700px | — |

**Auto-reject:** anything 120×90, 480×360, or with visible error text / CAPTCHA / "Access Denied"

## Naming Convention

```
[brand]-[descriptor]-[variant].jpg
t212-ooh-canarywharf.jpg        ✅
t212-app-screens.jpg            ✅
trading212-webapp-list-01.png   ✅ (from external source, preserve original name)
screenshot_2024_01_01.png       ❌ (rename before committing)
new-hero.jpg                    ❌ (too vague)
```

Junk assets go to `assets/_junk/` — never delete outright until page is confirmed live and correct.

## Post-Merge

- [ ] `slot-manifest.json` updated with all placed images
- [ ] Hub `index.html` points to canonical path
- [ ] `git status` shows no orphaned assets in non-canonical paths
- [ ] `git rm -r` any deleted version folders
- [ ] Commit: `cleanup: consolidate [brand] → canonical path, [N] assets`
