Agentic Software Factory · 2026-07-17

Variations: 9x Mockups from One Prompt

Image generation is the cheapest way to explore design space. One prompt returns nine wildly different mockups; you pick with your eyes, then hand the winner back to a coding agent as a reference image.

TL;DR

🤖 Have your agent set this up — paste this into it:

Fetch https://indigo-kayak-2zw8.here.now/agent.md?raw and follow it to set this up in my current project. Run the success check at the end and show me the result.

Quick start

Fastest possible taste — 9 website mockups landing in ./mockups/ (needs the Codex CLI; the agy version is in the prompt library):

Before you run it: this launches Codex — a paid agent — with sandboxing and approval prompts disabled (--dangerously-bypass-approvals-and-sandbox). Read the command first and run it only in a project where you're comfortable with the cost and with an unsandboxed agent writing files.

mkdir -p mockups
codex exec --dangerously-bypass-approvals-and-sandbox 'Use the $imagegen skill to generate 9 WILDLY different website homepage mockups for a landing page for an indie coffee roaster. The subject stays identical in all 9 - ONLY the visual style varies. One built-in image_gen call per mockup. After each image completes, copy it from $CODEX_HOME/generated_images/ into ./mockups/ as mockup-01.png ... mockup-09.png. Announce progress after each one.'
ls mockups/

Prompt library

The first two prompts use a {{SUBJECT}} placeholder — replace it before pasting, or let the run scripts (below) substitute it for you. Keep the subject identical across all 9; that's what makes the results comparable.

Codex — 9x wildly different website mockups

Codex CLI ($imagegen skill) your project root mockups/mockup-01.png … mockup-09.png + 9 named style directions

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.

agy (Antigravity) — 9x wildly different mobile mockups

agy (Google Antigravity CLI) your project root mockups/mockup-01.png … mockup-09.png, phone aspect, 9 named directions

Generate 9 WILDLY different mobile app UI mockups for {{SUBJECT}} using your
generate_image tool.

Rules:
- SUBJECT is constant across all 9 — same app, same home screen (listing feed,
  search, one primary action). ONLY the visual style varies.
- 9 divergent directions, e.g.: iOS glass minimal, material-you expressive,
  neo-brutalist, dark luxury, pastel neumorphic, retro pixel, editorial serif,
  cyberpunk neon, paper-collage tactile. Name each before generating.
- One generate_image call per mockup with ImageName mockup_01 ... mockup_09.
- Phone aspect ratio (9:19-ish), single screen per image.
- After each generation, use run_command to copy the artifact into
  ./mockups/ as mockup-01.png ... mockup-09.png.
- If you hit an image quota error, report it immediately with the reset time
  instead of retrying silently.
- Announce progress after each image.

JSON status contract — for scripting image gen at scale

any image-gen agent driven from bash append to your generation prompt one parseable JSON line per run — this is how inspiration-board loops over 200 styles unattended

Respond with ONLY a JSON object (no markdown, no explanation):
- Success:     {"status":"ok","path":"<output_path>"}
- Quota error: {"status":"quota_exhausted","reset_seconds":<N>,"reset_time":"<ISO8601>"}
- Other error: {"status":"error","message":"<description>"}

Converge — rebuild the winner as real code

Codex or Claude Code project root, after picking a winner (replace 0N) winner/index.html — real text and layout, no bitmap backgrounds

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.

Set it up (agent guide)

These steps mirror agent.md — the machine copy your agent fetches. Run everything from your project root. You need at least one of codex or agy on your PATH.

  1. Create the Codex prompt file. The run script extracts its first fenced block and substitutes the subject.
    # Codex prompt — 9x wildly different website mockups
    
    Replace `{{SUBJECT}}` with the site you're designing (keep it constant across all 9!).
    
    ```
    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.
    ```
    
    ## Follow-up (converge on a winner)
    
    ```
    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.
    ```
  2. Create the agy prompt file (same pattern, mobile mockups, plus the scripted status contract).
    # agy (Antigravity) prompt — 9x wildly different mobile mockups
    
    Replace `{{SUBJECT}}` with the app you're designing. Historical workshop subject:
    "a mobile app for selling houses".
    
    ```
    Generate 9 WILDLY different mobile app UI mockups for {{SUBJECT}} using your
    generate_image tool.
    
    Rules:
    - SUBJECT is constant across all 9 — same app, same home screen (listing feed,
      search, one primary action). ONLY the visual style varies.
    - 9 divergent directions, e.g.: iOS glass minimal, material-you expressive,
      neo-brutalist, dark luxury, pastel neumorphic, retro pixel, editorial serif,
      cyberpunk neon, paper-collage tactile. Name each before generating.
    - One generate_image call per mockup with ImageName mockup_01 ... mockup_09.
    - Phone aspect ratio (9:19-ish), single screen per image.
    - After each generation, use run_command to copy the artifact into
      ./mockups/ as mockup-01.png ... mockup-09.png.
    - If you hit an image quota error, report it immediately with the reset time
      instead of retrying silently.
    - Announce progress after each image.
    ```
    
    ## Scripted status contract (from the inspiration-board pipeline)
    
    When driving agy from bash at scale, demand machine-readable status:
    
    ```
    Respond with ONLY a JSON object (no markdown, no explanation):
    - Success:     {"status":"ok","path":"<output_path>"}
    - Quota error: {"status":"quota_exhausted","reset_seconds":<N>,"reset_time":"<ISO8601>"}
    - Other error: {"status":"error","message":"<description>"}
    ```
    
    This is the exact contract `generate.sh` in the inspiration-board pipeline uses
    to loop over 200 styles unattended, with a skip-if-exists guard (file > 100KB).
  3. Create the Codex run script.
    #!/bin/bash
    # Fire Codex $imagegen: 9 wildly different website mockups for one subject.
    # Usage: ./scripts/run-codex-mockups.sh "a landing page for an indie coffee roaster"
    set -euo pipefail
    
    SUBJECT="${1:?usage: $0 \"<subject, e.g. a landing page for an indie coffee roaster>\"}"
    DIR="$(cd "$(dirname "$0")/.." && pwd)"
    mkdir -p "$DIR/mockups"
    
    # Extract the first fenced block from the prompt file, substitute the subject.
    PROMPT="$(sed "s/{{SUBJECT}}/$(printf '%s' "$SUBJECT" | sed 's/[&/\]/\\&/g')/g" "$DIR/prompts/codex-9x-website.md" \
      | awk '/^```/{f++;next} f==1')"
    
    echo "── codex \$imagegen → 9 mockups for: $SUBJECT"
    echo "── output: $DIR/mockups/mockup-0{1..9}.png (watch mockups/index.html)"
    
    cd "$DIR"
    codex exec --dangerously-bypass-approvals-and-sandbox "$PROMPT"
  4. Create the agy run script (note it raises --print-timeout to 15m — the 5m default is too short for 9 images).
    #!/bin/bash
    # Fire agy (Google Antigravity CLI): 9 wildly different mobile mockups for one subject.
    # Usage: ./scripts/run-agy-mockups.sh "a mobile app for selling houses"
    set -euo pipefail
    
    SUBJECT="${1:?usage: $0 \"<subject, e.g. a mobile app for selling houses>\"}"
    DIR="$(cd "$(dirname "$0")/.." && pwd)"
    mkdir -p "$DIR/mockups"
    
    # Extract the first fenced block from the prompt file, substitute the subject.
    PROMPT="$(sed "s/{{SUBJECT}}/$(printf '%s' "$SUBJECT" | sed 's/[&/\]/\\&/g')/g" "$DIR/prompts/agy-9x-mobile.md" \
      | awk '/^```/{f++;next} f==1')"
    
    echo "── agy generate_image → 9 mobile mockups for: $SUBJECT"
    echo "── output: $DIR/mockups/mockup-0{1..9}.png (watch mockups/index.html)"
    
    cd "$DIR"
    agy -p "$PROMPT" --dangerously-skip-permissions --print-timeout 15m
  5. Create the contact-sheet gallery. It polls every 5 seconds, so tiles fill in live while the run generates.
    <!doctype html>
    <html lang="en">
    <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>9x Mockup Contact Sheet</title>
    <style>
      :root { color-scheme: dark; }
      body { margin: 0; font: 14px/1.4 ui-sans-serif, system-ui; background: #0d0f12; color: #e8e6e1; }
      header { padding: 20px 24px 8px; display: flex; align-items: baseline; gap: 12px; }
      h1 { font-size: 18px; margin: 0; letter-spacing: .02em; }
      header span { color: #8a8f98; font-size: 12px; }
      .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 16px 24px 32px; }
      figure { margin: 0; background: #16191e; border: 1px solid #262b33; border-radius: 10px; overflow: hidden; }
      .frame { aspect-ratio: 4 / 3; display: grid; place-items: center; background:
        repeating-conic-gradient(#14171c 0% 25%, #101318 0% 50%) 50% / 24px 24px; }
      .frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
      .frame .empty { color: #4a5058; font-size: 12px; text-align: center; padding: 12px; }
      figcaption { padding: 8px 12px; color: #b8bdc4; font-size: 12px; display: flex; justify-content: space-between; }
      figcaption b { color: #e8e6e1; font-weight: 600; }
      .frame img:hover { cursor: zoom-in; }
      dialog { border: 0; padding: 0; background: transparent; max-width: 92vw; }
      dialog img { max-width: 92vw; max-height: 92vh; border-radius: 8px; }
      dialog::backdrop { background: rgba(0,0,0,.8); }
    </style>
    </head>
    <body>
    <header>
      <h1>9x Wildly Different Mockups</h1>
      <span>same subject · nine styles · auto-refreshes every 5s while generating</span>
    </header>
    <div class="grid" id="grid"></div>
    <dialog id="zoom"><img id="zoomimg" alt=""></dialog>
    <script>
      const grid = document.getElementById('grid');
      const zoom = document.getElementById('zoom');
      const zoomimg = document.getElementById('zoomimg');
      for (let i = 1; i <= 9; i++) {
        const n = String(i).padStart(2, '0');
        const fig = document.createElement('figure');
        fig.innerHTML = `
          <div class="frame" data-n="${n}"><div class="empty">mockup-${n}.png<br>waiting…</div></div>
          <figcaption><b>#${n}</b><span class="dir" data-n="${n}"></span></figcaption>`;
        grid.appendChild(fig);
      }
      function tryLoad() {
        document.querySelectorAll('.frame').forEach(frame => {
          if (frame.querySelector('img')) return;
          const n = frame.dataset.n;
          const img = new Image();
          img.src = `mockup-${n}.png?t=${Date.now()}`;
          img.onload = () => {
            frame.innerHTML = '';
            frame.appendChild(img);
            img.addEventListener('click', () => { zoomimg.src = img.src; zoom.showModal(); });
          };
        });
      }
      zoom.addEventListener('click', () => zoom.close());
      tryLoad();
      setInterval(tryLoad, 5000);
    </script>
    </body>
    </html>
  6. Make the scripts executable and fire a run (background it — 9 images take a few minutes):
    chmod +x scripts/run-codex-mockups.sh scripts/run-agy-mockups.sh
    ./scripts/run-codex-mockups.sh "a landing page for an indie coffee roaster"
    # or, for mobile:
    ./scripts/run-agy-mockups.sh "a mobile app for selling houses"

Success check: nine numbered PNGs exist and the gallery shows nine tiles — same subject, nine styles.

ls mockups/mockup-0*.png
open mockups/index.html   # macOS; use xdg-open on Linux
mockups/mockup-01.png  mockups/mockup-02.png  mockups/mockup-03.png
mockups/mockup-04.png  mockups/mockup-05.png  mockups/mockup-06.png
mockups/mockup-07.png  mockups/mockup-08.png  mockups/mockup-09.png

Attachments — install the page skill

This is the exact here-now-workshop-page skill — with the Elo-voted Instrument Panel theme — that built every page in this workshop, published on this site byte-for-byte (SKILL.md plus its four templates/ files). Download all five, then npx skills copies the whole folder into your project's .agents/skills/, templates/ included. Two tested gotchas are baked in: .md URLs on here.now serve an HTML viewer, so the two markdown files must be fetched with ?raw; and the download is staged in ./page-skill/, not ./skills/ — the installer treats an existing ./skills/ as an agent's project skill dir and will clobber your download with a symlink.

mkdir -p page-skill/here-now-workshop-page/templates
curl -fsSL -o page-skill/here-now-workshop-page/SKILL.md "https://indigo-kayak-2zw8.here.now/skills/here-now-workshop-page/SKILL.md?raw"
curl -fsSL -o page-skill/here-now-workshop-page/templates/agent.md "https://indigo-kayak-2zw8.here.now/skills/here-now-workshop-page/templates/agent.md?raw"
curl -fsSL -o page-skill/here-now-workshop-page/templates/index.html "https://indigo-kayak-2zw8.here.now/skills/here-now-workshop-page/templates/index.html"
curl -fsSL -o page-skill/here-now-workshop-page/templates/styles.css "https://indigo-kayak-2zw8.here.now/skills/here-now-workshop-page/templates/styles.css"
curl -fsSL -o page-skill/here-now-workshop-page/templates/app.js "https://indigo-kayak-2zw8.here.now/skills/here-now-workshop-page/templates/app.js"
npx skills add ./page-skill --skill here-now-workshop-page -y

Design exploration stalls on production, not taste

You sit down to design a landing page. The usual move is to build one draft and iterate. Each iteration costs an hour or more, so you see maybe three directions before you commit. That is not a taste problem — it is a production problem: you cannot prefer an option you never saw. When a mockup costs a minute instead of an hour, exploring nine directions becomes the cheap default. Prior sessions on this machine show the whole loop fitting in one sitting: one run produced five bitmap mockup directions for a storefront, collected them into a gallery page, and finished with a chosen winner rebuilt as real code.

Two CLIs, one pattern

Codex ships an $imagegen skill that routes image requests through its built-in image_gen tool — no API key required, and its contract explicitly lists UI mockups and wireframes as intended uses. The Antigravity CLI exposes a generate_image tool the same way. Both run non-interactively (codex exec "…" / agy -p "…") and both follow the same batch rule: one image call per mockup, never a switch to an API fallback.

Two traps, both from real runs. Codex saves built-in image output under $CODEX_HOME/generated_images/ — if your prompt doesn't say "copy each image into ./mockups/", the run can succeed while your project folder stays empty. And agy's --print-timeout defaults to five minutes; nine images take longer, so the run script raises it to fifteen. The failure signal for both is the same: an empty contact sheet. Read the run log before blaming the model.

Hold the subject constant

Nine images are only useful if you can compare them, and they are only comparable if exactly one variable changes. "Make nine cool designs" gives you nine incomparable posters. "Same homepage, same hero, same call to action — nine styles" gives you a controlled experiment you can read at a glance. The inspiration-board pipeline enforces this discipline with a shared subject file appended to every style prompt, "so you can compare how each visual approach handles" the same material. Before you run, write your subject as one sentence that names the page type and its content; if a mockup comes back as a different page type, regenerate it — don't compare it.

From party trick to 200-style pipeline

Nine mockups is a live demo. Two hundred is a pipeline, and the difference is error handling. The inspiration-board project generates its images by driving the Antigravity CLI from a bash loop across 200 named web-design styles. Its generator demands machine-readable status from every run — the JSON contract in the prompt library above — fixes each output filename in advance, and skips any file already on disk above 100 KB, so quota-interrupted runs resume instead of restarting. When your own loop grows past a handful of images, adopt those in order: fixed names, skip-if-exists, JSON status, then background jobs with progress lines.

The variations idea applies twice there: the images are style variations, and the gallery pages themselves are twelve layout variations of the same image set — masonry grid, infinite scroll, carousel, lightbox, compare-split, magazine editorial, filmstrip, table list, mood board, fullscreen slideshow, grouped categories, search-first.

Bitmap to real code

The mockups are bitmaps — for deciding, not shipping. The loop closes when you pick one tile and hand it back to a coding agent as a reference image, using the converge prompt in the library. Your decision rule: pick the tile you would be embarrassed to lose. If no tile clears that bar, the styles were not divergent enough — widen the directions and rerun rather than polishing the least-bad option.

Appendix

Limits & caveats
  • The quota-handling and skip-guard evidence comes from one project's scripts driving one CLI. The sources do not establish that other agents fail the same way, or how often quota errors occur — only how this pipeline survives them.
  • No source here measures whether any generated direction is aesthetically better. That judgment stays with you.
  • A prior batch run stalled silently mid-generation and the operator had to ping the session ("hello? What is happening?"). The recorded lesson: run each image generation as its own background job and make the agent narrate progress.
  • Codex also has a gated CLI fallback for image generation (needs OPENAI_API_KEY and an explicit request). You never need it for this workflow — "many assets" still means one built-in call per asset.
  • --dangerously-bypass-approvals-and-sandbox and --dangerously-skip-permissions skip permission prompts. Use them in projects you trust, not on machines or folders you care about being prompted for.
  • agy image quota errors are real; the JSON status contract exists because retrying silently wastes the whole loop. Report the reset time instead.
  • The workshop agenda spells the skill $imgagegen — that's a typo; it's $imagegen.
Provenance

Sources: (1) the workshop agenda's "Variations" section brief; (2) the Codex imagegen skill contract installed with the Codex CLI at ~/.codex/skills/.system/imagegen/SKILL.md; (3) agy --help and agy models output captured locally on 2026-07-16; (4) the inspiration-board gallery source project (~/dev/story-generator/style-gallery) — its generator script, shared-subject file, 200-style data file, and twelve-layout variations directory; the JSON status contract is reproduced faithfully from it; (5) recorded summaries of prior local agent sessions from 2026-05 and 2026-06 (paraphrased; session identifiers deliberately omitted). The prompts, scripts, and gallery file on this page are reproduced verbatim from the workshop demo project. The live inspiration-board URL returned HTTP 200 when checked on 2026-07-16. No external citations or measurements were invented; no private identifiers are included. This page supersedes an earlier Scholarly Folio edition at this same URL; its caveats live in this appendix.