Plates — spec
Table of Contents
1. Purpose
Plates are the visual anchors for the sponsored-display banner
format. Each _dir directory in the site (research, current,
tools, events, _) gets a 1024×1024 master, cropped and derived
into IAB-standard slot dimensions (Interactive Advertising Bureau 2017). The
generation pipeline is Ollama flux2-klein locally (Mac), no cloud
API — the pipeline lives on the creative side of the two-team
architecture and its only output to the render side is the on-disk
plate + manifest.
The plates are greyscale only. The diagrams and text on the site
carry colour; the plates are the visual quiet. Chumbox-register
prompts (see src/wal_sh/adtech/plates/prompts.cljc) push the
generator into the "found photograph" corner of its distribution —
smartphone flash, unstyled backgrounds, tight crops. The prompt is
non-negotiable in style because dropping any of the three signature
clauses (on-camera flash, cropped too tightly, unstyled clutter)
returns a stock photo.
ORACLE: src/wal_sh/adtech/plates/gen.clj (bb-invoked generation),
src/wal_sh/adtech/plates/prompts.cljc (prompt data).
2. Requirements
- R1
- Every
_dirhas a<dir>-master.png, 1024×1024. - R2
- Every
(dir, slot)pair has a<dir>-<slot>.pngat IAB dimensions. - R3
- Greyscale only. No colour output at any stage.
- R4
- Manifest carries
model,prompt,sha256,width,height,alt,synthetic true. - R5
sha256matches the file on disk. Verified at manifest build time.- R6
- Derived plate ≤ per-slot
:max-bytescap. - R7
- >1 unique colour after conversion (else deleted as degenerate — a solid-grey plate is a failed generation).
- R8
- Idempotent — masters are cached;
--force-mastersblows the cache. Slot derivations re-run cheaply from cached masters. - R9
- Alt text describes the plate (what's in the image), not the article and never the headline. The plate is a decorative anchor, not editorial content — the alt reflects that.
3. Slot geometry
Masters (1024×1024) crop-then-derive into IAB slots via two curves:
| Slot | Output | Crop from master | Curve | :max-bytes |
|---|---|---|---|---|
leaderboard |
728×90 | 1024×260 | dither (posterize+o8x8) | 80 K |
billboard |
970×250 | 1024×500 | dither | 250 K |
mrec |
300×250 | 1024×853 | sigmoidal | 60 K |
mobile |
320×50 | 1024×400 | dither | 30 K |
Dither for anything under 128 px tall (1-bit is smaller and reads
as deliberate); sigmoidal for mrec, tall enough to hold gray.
Per-slot :max-bytes caps because dithered PNG doesn't compress
like sigmoidal PNG.
4. Contract signature
Generation (gen.clj, invoked via bb):
(-main "--dirs" "research,current,tools,events,_"
"--slots" "leaderboard,mrec,billboard,mobile"
["--force-masters"])
;; -> writes site/static/img/sponsored/*.png + manifest.json
Prompts (prompts.cljc, pure data):
style ; string — the seven signature clauses
negative ; string — negative clauses (no text, no logos, ...)
archetypes ; {dir -> subject-clause}
(prompt-for dir) ; -> composed prompt
iab-slots ; {slot -> {:w :h :gen}}
Manifest shape:
{
"generator": {"model": "flux2-klein", "version": "..."},
"plates": [
{"dir": "research", "slot": "leaderboard",
"src": "/static/img/sponsored/research-leaderboard.png",
"width": 728, "height": 90,
"alt": "A worn clipboard on a kitchen counter...",
"sha256": "0123abc...",
"seed": 12345,
"reproducible": true,
"synthetic": true},
...
]
}
5. Invocation
bb -e "(require '[wal-sh.adtech.plates.gen :as g]) \
(g/-main \"--dirs\" \"research,current,tools,events,_\" \
\"--slots\" \"leaderboard,mrec,billboard,mobile\")"
bb -x parses args as a babashka.cli map and breaks the pipeline;
prefer bb -e. --force-masters re-runs Ollama for all masters
(otherwise cached).
Current output: 20 plates in site/static/img/sponsored/*.png (5
dirs × 4 slots) plus manifest.json. ~1.1 MB derived; masters are
gitignored.
6. Prompt design
The style clause is seven verbatim strings joined by ", " — see
src/wal_sh/adtech/plates/prompts.cljc. Dropping any clause is
observed to make flux2-klein return a stock photo (styled lighting
overrides the found-photograph subject). The three anchors are:
- On-camera flash
- Cropped too tightly
- Cluttered unstyled background
The negative clause lists 20 negative terms (no text, no letters,
no logos, no clean minimal background). Two of these — no text and
no letters — are the constraint that forces the plate to carry no
copy; the sponsored-display format then puts every word on the
banner as DOM text.
Archetype subjects are keyed by _dir:
research— clipboard with hand-ringed data rowcurrent— before/after split-frame comparisontools— POV shot of an unmarked toolevents— hand-drawn arrow overlay on a plain wall_— bird feeder against blown-out sky (fallback)
Comment header on each archetype in prompts.cljc is the archetype
number (1..10 from the internal tone spec) so a future generation
review can regenerate the weakest first.
7. Related literature
- IAB Standard Ad Unit Portfolio (Interactive Advertising Bureau 2017) defines the target dimensions.
- ANA MFA studies (Association of National Advertisers 2023), (Association of National Advertisers 2024) on the quality-signal-free inventory pattern the plate register parodies.
- Zeng, Kohno & Roesner on bad ads (Zeng, Kohno, and Roesner 2020) catalogues the chumbox-register visual grammar the prompts are aimed at.
- Ali et al. on delivery discrimination
(Ali et al. 2019) motivates the
synthetic truemanifest field — provenance must be recorded at the creative level, not the container level. - Cloudflare Rocket Loader (Cloudflare, n.d.) on script-deferral pattern; comparable pattern used for the banner mount to keep CLS at zero.
8. Cross-references
- sponsored-display/spec.org — the consumer of the manifest.
Every banner renders
src+width+height+alt+sha256+seed. - sponsored-formats/spec.org — display format taxonomy.
- ORACLE:
src/wal_sh/adtech/plates/gen.clj(bb-invoked)src/wal_sh/adtech/plates/prompts.cljc(prompt data)site/static/img/sponsored/manifest.json(output)docs/plate-generation-workflow.md(creative-team runbook)
- web-history — the banner era on the fixed dimensions and standard-portfolio ancestry.
- Image Prompts for Annotation Systems — sibling flux2-klein banner-prompt file; same generation pipeline, article-banner rather than sponsored-plate consumer.
- Image Prompts for Agent Sandbox Practical Configs — same generator, different note; establishes the wal.sh house banner-prompt convention plates inverts.
9. Open questions
- Manifest schema v2. Per-plate sidecar JSON, thin index, rollback, A/B on plates. Captured in open work; the current v1 manifest is a single monolithic file.
- Prompt-drift measurement. flux2-klein output drifts over model updates; a "did the prompt still render the intended archetype?" audit is not yet automated. The archetype table's comment header gives the manual review order.
- Perceptual-hash-based dedup. Multiple generations for a single
(dir, slot)pair with different seeds occasionally produce near-duplicates; a perceptual-hash filter (pHash / dHash) would drop them. Currently manual.