[object Object]

← back to Model Arena

yolo idea 8: artifact source view (</> per pane) + README documents all 8 yolo features

0688aaa39ebcd6b28a42a37ffd1dc07224260513 · 2026-07-22 23:51:45 -0700 · Steve

Files touched

Diff

commit 0688aaa39ebcd6b28a42a37ffd1dc07224260513
Author: Steve <steve@designerwallcoverings.com>
Date:   Wed Jul 22 23:51:45 2026 -0700

    yolo idea 8: artifact source view (</> per pane) + README documents all 8 yolo features
---
 README.md         | 11 +++++++++++
 public/index.html | 10 ++++++++++
 yolo/IDEAS.md     |  1 +
 3 files changed, 22 insertions(+)

diff --git a/README.md b/README.md
index 34bfae6..8bbdc36 100644
--- a/README.md
+++ b/README.md
@@ -51,3 +51,14 @@ votes.jsonl, costlog.jsonl).
 - Basic auth on by default.
 - $0 by default; paid calls are per-battle opt-in with cost surfaced + ledgered.
 - No deploy config on purpose — launch is Steve-gated per ACCELERATOR.md.
+
+## Judging & analytics (added via /yolo run 2026-07-22)
+
+- **Artifact thumbnails** — every finished artifact is headless-rendered to a PNG (`/thumb/:id/:model`); the challenge grid shows a strip of real renders and battle panes show a click-to-run-live poster.
+- **AI auto-referee** — a local vision model (`qwen2.5vl:7b`, `VISION_MODEL` to override) *looks at* each rendered artifact and scores it 0–10 with a one-line reason; auto-runs when a battle settles and surfaces an **AI PICK** alongside the human 👑 crown. `$0` local. `POST /api/challenges/:id/judge` to re-run.
+- **ELO leaderboard** — ranked by ELO (K=24, crowned model beats every other that rendered) plus win%, cost-per-win, avg AI score, and a **human/AI agreement %** meta-metric.
+- **Blind judging** — toggle to anonymize models to "Model A/B/C" until a winner is crowned (kills brand bias).
+- **Real-workload presets** — a 🏭 Real Work challenge set (luxury product page, sortable catalog, marketing email, room visualizer, JSON→grid) beside the 🎮 Games set, moving the arena toward Steve's actual production decisions.
+- **Remix mode** — `POST /api/challenges/:id/remix` feeds the best artifact's HTML back to the models as "improve on this," spawning an evolutionary round (`remixOf`/`remixSource` lineage).
+- **Source view** — `</>` per pane shows the artifact's raw HTML.
+- **Daily generator** — `scripts/daily-challenge.js` runs a `$0` all-local battle on a rotating prompt + AI-judges it, to accrue real data. launchd install is drafted (gated) in `~/.claude/yolo-queue/pending-approval/`.
diff --git a/public/index.html b/public/index.html
index fd4ad49..2e0c797 100644
--- a/public/index.html
+++ b/public/index.html
@@ -110,6 +110,8 @@ tr.first td{color:var(--gold)}
 .blindtog{display:block;color:var(--dim);font-size:12px;margin:4px 0 10px;cursor:pointer;user-select:none}
 .blindtog input{accent-color:#a06bff;vertical-align:middle}
 .pane.blind .name{color:#a06bff;letter-spacing:2px}
+.srcview{height:460px;overflow:auto;margin:0;padding:12px;background:#05060d;color:#8fb8ff;font-size:11px;line-height:1.5;white-space:pre-wrap;word-break:break-word}
+.pane.winner .srcview{height:560px}
 .view{display:none}.view.on{display:block}
 </style>
 </head>
@@ -362,6 +364,7 @@ async function renderDetail(id, statusOnly){
           ${run.status==='done'&&c.winner!==run.model?`<button class="btn" data-win="${run.model}" title="Crown this model the winner of this battle — records a vote into the real-world win-rate ledger. One winner per battle; you can re-crown.">👑 Crown</button>`:''}
           ${!anon&&c.aiPick===run.model?'<span class="chip aipick">🤖 AI PICK</span>':''}
           ${c.winner===run.model?'<span class="chip winner">WINNER</span>':''}
+          ${run.status==='done'?`<button class="btn" data-src="${c.id}/${run.model}" title="View HTML source">&lt;/&gt;</button>`:''}
           ${(run.status==='error'||run.status==='done')?`<button class="btn pink" data-retry="${run.model}">↻</button>`:''}
         </span>
       </div>${bodyHtml}${run.aiReason&&run.status==='done'?`<div class="aireason">🤖 ${esc(run.aiReason)}</div>`:''}`;
@@ -379,6 +382,13 @@ async function renderDetail(id, statusOnly){
     const [cid,mid]=el.dataset.run.split('/');
     el.outerHTML = `<iframe sandbox="allow-scripts" src="${API}/artifact/${cid}/${mid}"></iframe>`;
   });
+  arena.querySelectorAll('[data-src]').forEach(b=>b.onclick=async e=>{
+    const [cid,mid]=e.target.dataset.src.split('/');
+    const body = e.target.closest('.pane').querySelector('iframe,.poster,.msg,.srcview');
+    if (body && body.classList.contains('srcview')){ openDetail(cid); return; } // toggle back
+    const html = await (await fetch(API+'/artifact/'+cid+'/'+mid)).text();
+    if (body){ const pre=document.createElement('pre'); pre.className='srcview'; pre.textContent=html; body.replaceWith(pre); }
+  });
   return c;
 }
 
diff --git a/yolo/IDEAS.md b/yolo/IDEAS.md
index 9221466..27228f5 100644
--- a/yolo/IDEAS.md
+++ b/yolo/IDEAS.md
@@ -20,3 +20,4 @@ Answering the /contrarian critique ("one builder vote = theater", "toy demos not
 - [DONE] #5 Real-workload presets (Strategist answer) — added a '🏭 Real Work' preset category (luxury product page, sortable catalog, sample-sale email, room visualizer, JSON→grid) alongside '🎮 Games'. Verified full stack (gen→render→AI-judge) on the product-page task; AI reasons were task-aware. Moves the arena toward Steve's real decisions, not just toy demos.
 - [DONE] #6 Daily auto-challenge generator — scripts/daily-challenge.js creates a $0 all-local battle on a day-rotating prompt, renders + AI-judges, logs to yolo/daily-log.jsonl (no auto-crown, keeps human vote pure). Test-run OK. launchd install DRAFTED to pending-approval (GATED, not installed).
 - [DONE] #7 Remix mode — feed a battle's best artifact's ACTUAL HTML (capped 14KB) back to the models as 'improve on this', spawning an evolutionary next-round battle (remixOf/remixSource lineage). Verified: remixed the product page, gemma produced an improved version. $0 local default.
+- [DONE] #8 Source view — </> per pane swaps the render for the raw HTML (scrollable), toggle back. README updated with all 8 features.

← 9944dae yolo idea 7: remix mode — feed the winning/AI-pick artifact'  ·  back to Model Arena  ·  yolo: log backlog + mid-run status (8 shipped, continuing) 0c1d691 →