Generate to diverge, code to converge — worked example

Detailed worked example with concrete prompts, observable outcomes, and the limits of the example.

Detailed worked example with concrete prompts, observable outcomes, and the limits of the example.

Act 1 — Diverge: ten styles, one subject

You

Give me 10 current popular web design styles.

Agent

Returned ten named style directions — the menu for the batch run.

You can't have taste about options you never saw. Naming the directions first is what makes the batch comparable later.

You

For each of these styles: Use $imagegen to mock up a mobile app for selling houses in a background thread.

Agent

Fired the generations as background jobs. The built-in image_gen tool saved every result under $CODEX_HOME/generated_images/ — not the project — so each finished image had to be copied into the workspace.

Two rules are already visible: the subject stays constant (a mobile app for selling houses — only the style varies), and the default save path is a trap the prompt has to handle.

You

hello? What is happening?

Agent

The batch had gone silent mid-run. It was still generating — but nothing said so. The session summary recorded the fix as an explicit preference: run each image generation as its own background job, and announce progress after every image.

That ping is why every prompt on this page now ends with "Announce progress after each one — never go silent."

Act 2 — Pick with your eyes, converge as code

You

Use the $imagegen skill, passing the ./refs/* files as references so output is guided by the actual styles.

Agent

Generated five bitmap mockup directions, copied them into mockups/, and built a gallery index.html that opened them side by side — a contact sheet.

The contact sheet is the decision instrument. This project's version polls every 5 seconds, so tiles fill in live while the run is still generating.

You

mock-03 is the winner. Rebuild it as actual HTML/CSS instead of an image-backed page.

Agent

Built the winner as a real page — real text, real layout, no bitmap backgrounds. Diverge, pick, converge: the full loop, one session.

Image generation explores; code generation commits. Neither replaces the other.

Act 3 — The same loop chose this page's theme

The candidates don't have to be images. A later session pointed the exact same workflow at this page's own design — wildly different page themes as the variations, Elo votes as the eyes. The lab lives in this project (template-lab/, votes in votes*.jsonl, outcome in RESULTS.md).

Agent

Stood up a local template lab: 8 wildly different themes rendered over this section's real content, paired into duels you arrow-key through, every vote appended to a JSONL file. Round 2 widened it to 12 themes (top 3 survivors + 9 new directions) under Elo pairing — 88 votes across two sessions:

Round 2 final standings (Elo, session 1 / session 2)
 1  V09 Gallery (Luxe × Brutalist)   1115 / 1047
 2  V13 Functionalist (Rams/Braun)   1055 / 1063
 3  V06 Luxe Minimal                 1035 / 1000
 …
12  V16 Riso Print                    880 /  936
Head-to-head: Gallery over Functionalist, 4–2 → Gallery shipped

Same discipline as the mockups: subject held constant (the real page content), only the style varies, and the picking is done with eyes — one duel at a time.

You

These are all WAAAAY too similar.

A refinement round had produced near-clones of the winner. Verdict recorded in the lab's RESULTS.md — near-clones can't be voted on, exactly the way nine same-ish posters can't be compared.

Agent

Rebuilt the round from scratch: 12 structurally distinct dialects on an oklch token system with variable system fonts, duels alternating light and dark, win-loss tracked per mode. 30 votes later:

Round 3b standings (30 votes, light/dark alternating)
 1  N02 Instrument Panel   1063   light 2-0   dark 2-0
 2  N08 Type Specimen      1048   light 0-1   dark 4-0
 3  N10 Chip Bar           1017   light 3-0   dark 0-2
 4  N00 Gallery (shipped)  1016   light 3-1   dark 0-1

Instrument Panel — the only theme undefeated in both modes — became the canonical template for every site in this workshop. The page you are reading is wearing the winner.

The artifact those sessions distilled

Every lesson above, folded into one liftable prompt. Replace {{SUBJECT}} and keep it constant across all nine — "announce progress" traces to the silent stall, the copy-out-of-$CODEX_HOME rule traces to the empty project folder, and "WILDLY different" traces to the too-similar round that broke the vote.

Use the $imagegen skill to generate 9 WILDLY different website homepage mockups
for {{SUBJECT}}.

Rules:
- The SUBJECT stays identical in all 9 — same product, same page type
  (homepage), same rough content (hero, nav, one CTA). ONLY the visual style
  varies. This is what makes them comparable.
- Pick 9 maximally divergent directions, e.g.: swiss/international typographic,
  neo-brutalist, glassmorphic dark, editorial magazine, retro terminal,
  playful memphis, luxury minimal, bento-grid dashboard, hand-drawn zine.
  Name each direction before generating.
- One built-in image_gen call per mockup (do NOT drop to the CLI fallback).
- Desktop aspect, full homepage visible, legible headline text.
- After each image completes, copy it from $CODEX_HOME/generated_images/
  into ./mockups/ as mockup-01.png ... mockup-09.png (match the direction
  order you announced).
- Announce progress after each one — never go silent.
- When all 9 exist, list the 9 directions next to their filenames.

When your eyes have picked, converge:

mockup-0N.png is the winner. Rebuild it as a real single-file HTML/CSS page at
./winner/index.html, using the image strictly as a visual reference — real
text, real layout, no bitmap backgrounds.

The full setup — both run scripts, the agy mobile version, and the live-updating contact-sheet gallery — is on the guide, mirrored for machines in agent.md.

The winning theme itself ships too: the here-now-workshop-page skill that built this page is downloadable and installable from the guide.

Source references