ModelLineup

Every answer on this page was written by an AI model, named on the answer. Answers can be wrong, out of date or made up, even when they sound sure. Check anything that matters before you rely on it.

Models Opus 5.5

Claude Opus 5.5

Released
Tested
Settings
Low effort and Max effort

In short

Ranked 1st of 9 at max effort, level with Haiku 5.5, Fable 5.1 and Fable 5.

Opus 5.5 answered all 24 prompts at both efforts, scoring 90 at low effort and 93 at max. At max effort it passed every check on every code prompt and the planning group rose from 76 to 97; only the kanban board ran out of room.

At low effort Opus 5.5 scored level with Opus 5 at low effort, and at max effort it scored level with Opus 5 at max effort. Overall it scored level at both efforts, with a median low effort answer of 15.7 seconds and $0.041.

Written by an AI model from these results; every figure in it is filled in by a program. How it was made.

Opus 5.5

24 prompts, every check counted

Low effort

90

  • Floor46/49, 94% passed
  • Middle51/58, 88% passed
  • Top60/65, 92% passed

Median answer 16 s, 4.1¢.

Max effort

93

  • Floor45/49, 92% passed
  • Middle55/58, 95% passed
  • Top60/65, 92% passed

Median answer 5 min 14 s, 76¢.

Max passed 3 more checks, cost 16.5 times as much and took 18.9 times as long. Costs are at Anthropic’s API prices on the day it was tested, .

What the results show

Written by an AI model from these results; every figure in it is filled in by a program. How it was made.

Best at

  • Code: at max effort it passed every check on every code prompt, from the paging bug to the slow script, and the group scored 100; at low effort it did the same on all but the pull request review. F01 F02 F03 F04 F05 F06 F07
  • Web pages: the landing page and the garden page fixes passed every page test at both efforts, and the dashboard from the mockup and the Minesweeper game did at max effort. B01 B05 B02 B04
  • Planning at max effort, 97 for the group: the booking app plan, the microservices answer and the spec from a messy brief met every check, as did the volunteer rota at both efforts. A01 A02 A04 P02
  • Careful reading and everyday writing at both efforts: the market receipt, the invented book, the bread maker manual, the text to the plumber and the update from a messy thread met every check. I01 H02 K02 W01 W02

Stumbled on

  • At max effort the kanban board ran out of room even with the model's full output allowance, before any page was written; at low effort its page failed the drag and keyboard move tests. B03
  • The column rename plan dropped the old column before its final step at both efforts and only partly described the batched backfill at low; at max effort the cycling paragraph did not stay under its word limit. A03 R02
  • At low effort the pull request review, the booking plan and the microservices answer ran over length, and the booking plan left a working booking flow out of its first phase. F04 A01 A02
  • Also at low effort the spec did not fully raise the expiry, role and seat questions and the cycling paragraph took the printed total on trust; the story missed a required word at both efforts. A04 R02 S02

What max effort changed

  • Overall it scored level at both efforts: 7 prompts gained at max effort, 1 lost ground and 16 stayed the same, for about 16.5 times the cost and 18.9 times the time.
  • Planning rose from 76 to 97: the booking plan went from 7 of 9 to 9 of 9, the spec from 5 of 8 to 8 of 8 and the microservices answer from 7 of 8 to 8 of 8. A01 A04 A02
  • Web pages fell from 90 to 80 only because the kanban board ran out of room, from 7 of 9 checks to 0 of 9; thinking took 1,047,047 tokens at max effort against 11,719 at low. B03 B02 B04

Worth knowing

  • Each prompt was answered once at each effort, so a single answer can move a prompt's score, and small gaps between scores are treated as level.
  • Each model gets its own standard output allowance. An answer that runs out of room is scored on whatever it did write, so an unfinished page or program usually fails its tests.
  • Costs are what the same tokens would cost at the published API prices, not what anyone paid.

Score by kind of work

Building web pages

  • Low effort
    90
  • Max effort
    80

Code

  • Low effort
    98
  • Max effort
    100

Planning and architecture

  • Low effort
    76
  • Max effort
    97

Everyday

  • Low effort
    96
  • Max effort
    96

Every answer

Each row opens to the low and max answers side by side. Each prompt is described on the prompts page.

Building web pages

B01A landing page for a small invoicing appLow 9/9Max 9/9Same

What it asks for. Asks for a one-page landing site for a small invoicing app for freelancers, as a single HTML file with no libraries and nothing loaded from outside. The page needs a headline, three named features, three price plans with a monthly and yearly switch (yearly gives two months free and is quoted as one total for the year), a four-question FAQ that opens and closes, and a sign-up button. It has to read well on a phone.

Both settings passed 9 of 9 checks.

AI answer from Opus 5.5 · low effort · 2 Oct 2026

9 of 9

Screenshot of the page built in this answer, at a desktop width of 1280 pixels
Our screenshot, 1280 by 800. Open it for the full length.
Screenshot of the page built in this answer, at a phone width of 375 pixels
Phone, 375 by 812.
More screenshots (2).
Screenshot of the page built in this answer, at a desktop width of 1280 pixelsScreenshot of the page built in this answer, at a phone width of 375 pixels
Show the code and the answer.

Here's the complete file. Save it as index.html and open it in a browser.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Brindlebill: Simple invoicing for freelancers</title>
<meta name="description" content="Brindlebill helps freelancers send invoices, chase payments gently and get paid by card or bank.">
<style>
  :root {
    --ink: #1d1a17;
    --muted: #57514a;
    --bg: #fbf8f3;
    --card: #ffffff;
    --line: #e4ddd2;
    --brand: #8a4b1f;
    --brand-dark: #6e3a15;
    --brand-soft: #f3e6d8;
    --radius: 12px;
  }

  *, *::before, *::after { box-sizing: border-box; }

  html { -webkit-text-size-adjust: 100%; }

  body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 1rem;           /* 16px minimum */
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
  }

  .wrap {
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 1.25rem;
  }

  .skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--ink);
    color: #fff;
    padding: 0.75rem 1rem;
    z-index: 10;
  }
  .skip-link:focus { left: 0; }

  :focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 3px;
  }

  h1, h2, h3 { line-height: 1.2; margin: 0 0 0.75rem; }
  h1 { font-size: clamp(2rem, 7vw, 3.25rem); letter-spacing: -0.02em; }
  h2 { font-size: clamp(1.6rem, 5vw, 2.25rem); letter-spacing: -0.01em; }
  h3 { font-size: 1.25rem; }
  p  { margin: 0 0 1rem; }

  /* Header */
  .site-header { padding: 1.25rem 0; }
  .logo {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--ink);
    text-decoration: none;
  }
  .logo span { color: var(--brand); }

  /* Buttons */
  .btn {
    display: inline-block;
    font: inherit;
    font-size: 1.125rem;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    color: #fff;
    background: var(--brand);
    border: 0;
    border-radius: 999px;
    padding: 0.9rem 1.75rem;
    min-height: 48px;
    cursor: pointer;
    transition: background 0.15s ease;
  }
  .btn:hover { background: var(--brand-dark); }

  /* Hero */
  .hero { padding: 3rem 0 4rem; text-align: center; }
  .hero .pitch {
    font-size: 1.25rem;
    color: var(--muted);
    max-width: 36rem;
    margin: 0 auto 2rem;
  }

  section { padding: 3.5rem 0; }
  .section-intro { color: var(--muted); max-width: 38rem; }
  .center { text-align: center; }
  .center .section-intro { margin-left: auto; margin-right: auto; }

  /* Features */
  .features { background: var(--card); border-block: 1px solid var(--line); }
  .feature-grid {
    list-style: none;
    margin: 2rem 0 0;
    padding: 0;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
  }
  .feature-grid li {
    padding: 1.5rem;
    border-radius: var(--radius);
    background: var(--bg);
    border: 1px solid var(--line);
  }
  .feature-grid p { margin: 0; color: var(--muted); }

  /* Pricing */
  .billing-switch {
    display: inline-flex;
    margin: 1rem 0 2rem;
    padding: 4px;
    background: var(--brand-soft);
    border-radius: 999px;
  }
  .billing-switch button {
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
    background: transparent;
    border: 0;
    border-radius: 999px;
    padding: 0.6rem 1.25rem;
    min-height: 44px;
    cursor: pointer;
  }
  .billing-switch button[aria-pressed="true"] {
    background: var(--card);
    color: var(--brand-dark);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  }
  .save-note { display: block; font-size: 1rem; color: var(--muted); margin-top: -1rem; margin-bottom: 2rem; }

  .plans {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
    text-align: left;
  }
  .plan {
    display: flex;
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.75rem;
  }
  .plan.featured { border: 2px solid var(--brand); }
  .price {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0.25rem 0 1.25rem;
    line-height: 1.1;
  }
  .price .period {
    font-size: 1rem;
    font-weight: 500;
    color: var(--muted);
  }
  .plan ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  .plan li {
    padding: 0.5rem 0 0.5rem 1.75rem;
    position: relative;
    border-top: 1px solid var(--line);
  }
  .plan li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--brand);
    font-weight: 700;
  }

  /* FAQ */
  .faq-list { max-width: 44rem; margin: 2rem auto 0; }
  .faq-list details {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
  }
  .faq-list summary {
    list-style: none;
    cursor: pointer;
    padding: 1rem 3rem 1rem 1.25rem;
    position: relative;
    min-height: 48px;
  }
  .faq-list summary::-webkit-details-marker { display: none; }
  .faq-list summary h3 {
    display: inline;
    font-size: 1.125rem;
    margin: 0;
  }
  .faq-list summary::after {
    content: "+";
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--brand);
  }
  .faq-list details[open] summary::after { content: "–"; }
  .faq-list details p {
    margin: 0;
    padding: 0 1.25rem 1.25rem;
    color: var(--muted);
  }

  /* Final CTA */
  .cta {
    background: var(--brand-soft);
    text-align: center;
  }

  footer {
    padding: 2rem 0;
    text-align: center;
    color: var(--muted);
  }

  @media (min-width: 720px) {
    .feature-grid { grid-template-columns: repeat(3, 1fr); }
    .plans { grid-template-columns: repeat(3, 1fr); }
    section { padding: 5rem 0; }
    .hero { padding: 5rem 0 6rem; }
  }

  @media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
  }
</style>
</head>
<body>

<a class="skip-link" href="#main">Skip to content</a>

<header class="site-header">
  <div class="wrap">
    <a class="logo" href="#">Brindle<span>bill</span></a>
  </div>
</header>

<main id="main">

  <section class="hero" aria-labelledby="hero-title">
    <div class="wrap">
      <h1 id="hero-title">Get paid without the paperwork</h1>
      <p class="pitch">Brindlebill sends your invoices, follows up for you and lets clients pay in a couple of clicks.</p>
      <a class="btn" href="#signup">Start free trial</a>
    </div>
  </section>

  <section class="features" aria-labelledby="features-title">
    <div class="wrap center">
      <h2 id="features-title">Everything you need to get paid</h2>
      <ul class="feature-grid">
        <li>
          <h3>Invoices in a minute</h3>
          <p>Pick a client, add your hours or items, and send a clean, professional invoice straight away.</p>
        </li>
        <li>
          <h3>Gentle reminders</h3>
          <p>Brindlebill nudges late payers politely on your behalf, so you never have to send the awkward email.</p>
        </li>
        <li>
          <h3>Card and bank payments</h3>
          <p>Clients can pay by card or bank transfer right from the invoice, and you see the moment it lands.</p>
        </li>
      </ul>
    </div>
  </section>

  <section id="pricing" aria-labelledby="pricing-title">
    <div class="wrap center">
      <h2 id="pricing-title">Simple pricing</h2>
      <p class="section-intro">Choose how you'd like to pay. Yearly plans get two months free.</p>

      <div class="billing-switch" role="group" aria-label="Billing period">
        <button type="button" data-period="monthly" aria-pressed="true">Monthly</button>
        <button type="button" data-period="yearly" aria-pressed="false">Yearly</button>
      </div>

      <div class="plans">
        <article class="plan" aria-labelledby="plan-starter">
          <h3 id="plan-starter">Starter</h3>
          <p class="price" aria-live="polite">
            <span class="amount" data-monthly="9" data-yearly="90">$9</span>
            <span class="period">/ month</span>
          </p>
          <ul>
            <li>5 clients</li>
            <li>PDF invoices</li>
          </ul>
        </article>

        <article class="plan featured" aria-labelledby="plan-pro">
          <h3 id="plan-pro">Pro</h3>
          <p class="price" aria-live="polite">
            <span class="amount" data-monthly="19" data-yearly="190">$19</span>
            <span class="period">/ month</span>
          </p>
          <ul>
            <li>Unlimited clients</li>
            <li>Automatic reminders</li>
            <li>Your own logo</li>
          </ul>
        </article>

        <article class="plan" aria-labelledby="plan-team">
          <h3 id="plan-team">Team</h3>
          <p class="price" aria-live="polite">
            <span class="amount" data-monthly="49" data-yearly="490">$49</span>
            <span class="period">/ month</span>
          </p>
          <ul>
            <li>Everything in Pro</li>
            <li>5 seats</li>
            <li>A shared client list</li>
          </ul>
        </article>
      </div>
    </div>
  </section>

  <section class="features" aria-labelledby="faq-title">
    <div class="wrap">
      <h2 id="faq-title" class="center">Questions</h2>
      <div class="faq-list">
        <details>
          <summary><h3>Can I cancel any time?</h3></summary>
          <p>Yes. Cancel from your account page and you won't be charged again. Nothing is locked in.</p>
        </details>
        <details>
          <summary><h3>Do my clients need an account?</h3></summary>
          <p>No. They open a link, see the invoice and pay. They never have to sign up.</p>
        </details>
        <details>
          <summary><h3>Which currencies can I invoice in?</h3></summary>
          <p>You can invoice in 30 currencies, and each invoice shows the amount in your client's currency.</p>
        </details>
        <details>
          <summary><h3>What happens when the free trial ends?</h3></summary>
          <p>You pick a plan. If you don't, your account switches to view-only and your invoices stay safe for 90 days.</p>
        </details>
      </div>
    </div>
  </section>

  <section class="cta" id="signup" aria-labelledby="signup-title">
    <div class="wrap">
      <h2 id="signup-title">Ready to send your first invoice?</h2>
      <p>Try Brindlebill free. No card needed to look around.</p>
      <a class="btn" href="#signup">Start free trial</a>
    </div>
  </section>

</main>

<footer>
  <div class="wrap">
    <p>&copy; <span id="year"></span> Brindlebill</p>
  </div>
</footer>

<script>
  (function () {
    var buttons = document.querySelectorAll('.billing-switch button');
    var amounts = document.querySelectorAll('.price .amount');

    function setPeriod(period) {
      buttons.forEach(function (b) {
        b.setAttribute('aria-pressed', String(b.dataset.period === period));
      });
      amounts.forEach(function (el) {
        el.textContent = '$' + el.dataset[period];
        el.nextElementSibling.textContent = period === 'yearly' ? '/ year' : '/ month';
      });
    }

    buttons.forEach(function (b) {
      b.addEventListener('click', function () { setPeriod(b.dataset.period); });
    });

    document.getElementById('year').textContent = new Date().getFullYear();
  })();
</script>

</body>
</html>

Notes

  • Yearly prices are 10 × the monthly price: Starter $90, Pro $190, Team $490, each shown as "/ year".
  • FAQ uses the built-in <details>/<summary> elements. They open and close without JavaScript and work with a keyboard and screen readers.
  • Headings: one h1, an h2 for each section, and an h3 for each feature, plan and question.
  • Mobile: all text is at least 16px. Columns stack on narrow screens, and buttons are at least 44px tall so they're easy to tap.
  • Sign-up button: both "Start free trial" buttons currently point to #signup. Change the href to your real sign-up URL. The line "No card needed to look around" under the bottom button is a placeholder, so edit it to match how your trial actually works.
  • I wrote the headline, pitch and feature sentences myself, so change them as you like.
  • Floor2/2, 100% passed
  • Middle4/4, 100% passed
  • Top3/3, 100% passed
9 of 9 checks passedfloor 2/2, middle 4/4, top 3/3
  • Passed.
    The page loads with no errors in the console
    Floor Page test
  • Passed.
    Every section is there, with the exact plan names, prices and text
    Floor Page test
  • Passed.
    No sideways scroll on a 375 px phone
    Middle Page test
  • Passed.
    Nothing is loaded from outside the file
    Middle Page test
  • Passed.
    One h1, no skipped heading levels, text 16 px or larger, enough contrast
    Middle Page test
  • Passed.
    The page looks finished: clear hierarchy, pricing easy to compare, nothing broken
    Middle Read
  • Passed.
    Yearly shows $90, $190 and $490, and Monthly brings back $9, $19, $49
    Top Page test
  • Passed.
    Each FAQ question opens and closes from the keyboard
    Top Page test
  • Passed.
    Still no sideways scroll on a phone with Yearly on and every FAQ open
    Top Page test
  • Took 42 s.
  • First words after 4.7 s.
  • Wrote 5,389 tokens, 209 of them thinking.
  • 11¢ at API prices.
All numbers.
Time to finish42 s
Time to first words4.7 s
Input tokens2
Cached tokens1,272
Output tokens5,389
Thinking tokens209
Words in the answer1,314
Price at API rates11¢

AI answer from Opus 5.5 · max effort · 2 Oct 2026

9 of 9

Screenshot of the page built in this answer, at a desktop width of 1280 pixels
Our screenshot, 1280 by 800. Open it for the full length.
Screenshot of the page built in this answer, at a phone width of 375 pixels
Phone, 375 by 812.
More screenshots (2).
Screenshot of the page built in this answer, at a desktop width of 1280 pixelsScreenshot of the page built in this answer, at a phone width of 375 pixels
Show the code and the answer.
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Brindlebill: simple invoicing for freelancers</title>
  <meta name="description" content="Simple invoicing for freelancers. Send an invoice in a minute, let gentle reminders do the chasing, and get paid by card or bank transfer.">
  <meta name="theme-color" content="#fbf7f1">
  <style>
    /* ---------- Base ---------- */
    :root {
      --ink: #241a12;
      --muted: #5b4d41;
      --bg: #fbf7f1;
      --surface: #ffffff;
      --line: #e6dacb;
      --tint: #f6e7d9;
      --brand: #a3471b;
      --brand-dark: #82380f;
      --radius: 1rem;
      --shadow: 0 1px 2px rgb(36 26 18 / 0.05), 0 8px 24px rgb(36 26 18 / 0.06);
    }

    *,
    *::before,
    *::after {
      box-sizing: border-box;
    }

    html {
      -webkit-text-size-adjust: 100%;
      text-size-adjust: 100%;
    }

    @media (prefers-reduced-motion: no-preference) {
      html {
        scroll-behavior: smooth;
      }
    }

    body {
      margin: 0;
      font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
      font-size: 1.0625rem; /* 17px. Nothing on the page is smaller than 1rem (16px). */
      line-height: 1.6;
      color: var(--ink);
      background: radial-gradient(ellipse 80rem 34rem at 50% -8rem, #f4dcc4, transparent 70%) no-repeat var(--bg);
    }

    h1,
    h2,
    h3 {
      margin: 0;
      line-height: 1.15;
      text-wrap: balance;
    }

    h1 {
      font-size: clamp(2.25rem, 1.5rem + 3.6vw, 3.75rem);
      letter-spacing: -0.03em;
    }

    h2 {
      font-size: clamp(1.75rem, 1.35rem + 1.9vw, 2.5rem);
      letter-spacing: -0.02em;
    }

    h3 {
      font-size: 1.25rem;
      letter-spacing: -0.01em;
    }

    p {
      margin: 0;
    }

    a {
      color: var(--brand);
    }

    :focus-visible {
      outline: 3px solid var(--ink);
      outline-offset: 3px;
    }

    [hidden] {
      display: none !important;
    }

    .sr-only {
      position: absolute !important;
      width: 1px;
      height: 1px;
      margin: -1px;
      padding: 0;
      overflow: hidden;
      clip: rect(0 0 0 0);
      clip-path: inset(50%);
      white-space: nowrap;
      border: 0;
    }

    .wrap {
      width: min(100% - 2.5rem, 68rem);
      margin-inline: auto;
    }

    .card {
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
    }

    .button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 3.25rem;
      padding: 0.75rem 1.75rem;
      border: 2px solid transparent; /* shows up as an outline in Windows high-contrast mode */
      border-radius: 999px;
      background: var(--brand);
      color: #fff;
      font-size: 1.0625rem;
      font-weight: 600;
      text-decoration: none;
      box-shadow: 0 1px 2px rgb(36 26 18 / 0.2), 0 8px 20px rgb(163 71 27 / 0.22);
      transition: background-color 0.15s ease;
    }

    .button:hover {
      background: var(--brand-dark);
    }

    .skip-link {
      position: absolute;
      top: -10rem;
      left: 1rem;
      z-index: 10;
      padding: 0.75rem 1rem;
      border-radius: 0.5rem;
      background: var(--ink);
      color: #fff;
      font-size: 1rem;
      text-decoration: none;
    }

    .skip-link:focus {
      top: 1rem;
    }

    /* ---------- Header ---------- */
    .site-header .wrap {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 0.25rem 1.5rem;
      padding-block: 1rem;
    }

    .brand {
      display: inline-flex;
      align-items: center;
      gap: 0.6rem;
      min-height: 2.75rem;
      color: var(--ink);
      font-size: 1.25rem;
      font-weight: 700;
      letter-spacing: -0.01em;
      text-decoration: none;
    }

    .brand-mark {
      flex: none;
      width: 1.75rem;
      height: 1.75rem;
      border-radius: 0.5rem;
      background: repeating-linear-gradient(115deg, #b5582a 0 5px, #5e260b 5px 7px, #c96f39 7px 12px, #7a3311 12px 14px);
    }

    .site-nav ul {
      display: flex;
      flex-wrap: wrap;
      margin: 0 -0.75rem;
      padding: 0;
      list-style: none;
    }

    .site-nav a {
      display: flex;
      align-items: center;
      min-height: 2.75rem;
      padding: 0 0.75rem;
      border-radius: 0.5rem;
      color: var(--ink);
      font-size: 1rem;
      font-weight: 500;
      text-decoration: none;
    }

    .site-nav a:hover {
      background: var(--tint);
    }

    /* ---------- Hero ---------- */
    .hero {
      padding-block: clamp(3rem, 9vw, 6.5rem) clamp(3rem, 8vw, 5.5rem);
      text-align: center;
    }

    .hero h1 {
      max-width: 15ch;
      margin-inline: auto;
    }

    .lead {
      max-width: 36rem;
      margin: 1.25rem auto 2rem;
      color: var(--muted);
      font-size: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
      text-wrap: pretty;
    }

    /* ---------- Sections ---------- */
    .section {
      padding-block: clamp(2.5rem, 6vw, 4.5rem);
    }

    .section-head {
      max-width: 40rem;
      margin: 0 auto 2.5rem;
      text-align: center;
    }

    .section-head p {
      margin-top: 0.75rem;
      color: var(--muted);
      font-size: 1.125rem;
    }

    .features,
    .plans,
    .plan-features {
      margin: 0;
      padding: 0;
      list-style: none;
    }

    /* ---------- Features ---------- */
    .features {
      display: grid;
      gap: 1.25rem;
      max-width: 40rem;
      margin-inline: auto;
    }

    .feature {
      padding: 1.75rem 1.5rem;
    }

    .feature-icon {
      display: grid;
      place-items: center;
      width: 3rem;
      height: 3rem;
      margin-bottom: 1.25rem;
      border-radius: 0.875rem;
      background: var(--tint);
      color: var(--brand);
    }

    .feature-icon svg {
      width: 1.5rem;
      height: 1.5rem;
    }

    .feature p {
      margin-top: 0.5rem;
      color: var(--muted);
    }

    /* ---------- Pricing ---------- */
    .billing {
      min-width: 0;
      margin: 0 0 2rem;
      padding: 0;
      border: 0;
      text-align: center;
    }

    .segmented {
      display: inline-flex;
      gap: 0.25rem;
      padding: 0.3rem;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--surface);
      box-shadow: var(--shadow);
    }

    .segmented label {
      position: relative;
    }

    .segmented input {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      margin: 0;
      opacity: 0;
      cursor: pointer;
      -webkit-appearance: none;
      appearance: none;
    }

    .segmented span {
      display: block;
      min-width: 6.5rem;
      padding: 0.625rem 1.25rem;
      border-radius: 999px;
      color: var(--muted);
      font-size: 1rem;
      font-weight: 600;
      line-height: 1.5;
      transition: background-color 0.15s ease, color 0.15s ease;
    }

    .segmented input:checked + span {
      background: var(--ink);
      color: #fff;
    }

    .segmented input:not(:checked):hover + span {
      color: var(--ink);
    }

    .segmented input:focus-visible + span {
      outline: 3px solid var(--ink);
      outline-offset: 2px;
    }

    .plans {
      display: grid;
      gap: 1.25rem;
      max-width: 26rem;
      margin-inline: auto;
    }

    .plan {
      padding: 2rem 1.75rem;
    }

    .price {
      display: flex;
      flex-wrap: wrap;
      align-items: baseline;
      gap: 0.4rem;
      margin-top: 1rem;
    }

    .amount {
      font-size: 2.75rem;
      font-weight: 700;
      line-height: 1;
      letter-spacing: -0.03em;
      font-variant-numeric: tabular-nums;
    }

    .period,
    .billed {
      color: var(--muted);
      font-size: 1rem;
    }

    .billed {
      margin-top: 0.4rem;
    }

    .plan-features {
      display: grid;
      gap: 0.6rem;
      margin-top: 1.5rem;
      padding-top: 1.5rem;
      border-top: 1px solid var(--line);
    }

    .plan-features li {
      position: relative;
      padding-left: 1.75rem;
    }

    .plan-features li::before {
      content: "";
      position: absolute;
      top: 0.4em;
      left: 0.3rem;
      width: 0.4rem;
      height: 0.75rem;
      border: solid var(--brand);
      border-width: 0 2px 2px 0;
      transform: rotate(45deg);
    }

    /* ---------- FAQ ---------- */
    .faq {
      display: grid;
      gap: 0.75rem;
      max-width: 46rem;
      margin-inline: auto;
    }

    .faq summary {
      position: relative;
      padding: 1.1rem 3.5rem 1.1rem 1.5rem;
      border-radius: var(--radius);
      font-size: 1.125rem;
      font-weight: 600;
      line-height: 1.4;
      list-style: none;
      cursor: pointer;
    }

    .faq summary::-webkit-details-marker {
      display: none;
    }

    .faq summary::after {
      content: "";
      position: absolute;
      top: 50%;
      right: 1.5rem;
      width: 0.6rem;
      height: 0.6rem;
      border: solid currentColor;
      border-width: 0 2px 2px 0;
      transform: translateY(-85%) rotate(45deg);
      transition: transform 0.2s ease;
    }

    .faq details[open] > summary::after {
      transform: translateY(-15%) rotate(225deg);
    }

    .faq summary:hover {
      color: var(--brand);
    }

    .faq details p {
      padding: 0 1.5rem 1.35rem;
      color: var(--muted);
    }

    /* ---------- Closing call to action ---------- */
    .cta-box {
      padding: clamp(2.5rem, 6vw, 4rem) 1.5rem;
      border-radius: 1.5rem;
      background: var(--tint);
      text-align: center;
    }

    .cta-box h2 {
      margin-bottom: 1.5rem;
    }

    /* ---------- Footer ---------- */
    .site-footer {
      padding-block: 2rem;
      border-top: 1px solid var(--line);
      color: var(--muted);
      font-size: 1rem;
    }

    /* ---------- Wider screens ---------- */
    @media (min-width: 48em) {
      .features {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        max-width: none;
      }
    }

    @media (min-width: 56em) {
      .plans {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        max-width: none;
      }
    }

    /* ---------- User preferences ---------- */
    @media (prefers-reduced-motion: reduce) {
      *,
      *::before,
      *::after {
        transition: none !important;
      }
    }

    @media (forced-colors: active) {
      .segmented input:checked + span {
        forced-color-adjust: none;
        background: Highlight;
        color: HighlightText;
      }
    }
  </style>
</head>
<body>
  <a class="skip-link" href="#main">Skip to content</a>

  <header class="site-header">
    <div class="wrap">
      <a class="brand" href="#top"><span class="brand-mark" aria-hidden="true"></span>Brindlebill</a>
      <nav class="site-nav" aria-label="Main">
        <ul>
          <li><a href="#features">Features</a></li>
          <li><a href="#pricing">Pricing</a></li>
          <li><a href="#faq">FAQ</a></li>
        </ul>
      </nav>
    </div>
  </header>

  <main id="main">
    <section class="hero">
      <div class="wrap">
        <h1>Get paid without the chasing</h1>
        <p class="lead">Brindlebill is simple invoicing for freelancers: send a polished invoice in a minute and let your clients pay by card or bank transfer.</p>
        <!-- Both "Start free trial" links go to /signup. Change them to your real sign-up page. -->
        <a class="button" href="/signup">Start free trial</a>
      </div>
    </section>

    <section class="section" id="features" aria-labelledby="features-title">
      <div class="wrap">
        <div class="section-head">
          <h2 id="features-title">Less admin, more paid work</h2>
        </div>
        <ul class="features" role="list">
          <li class="feature card">
            <span class="feature-icon" aria-hidden="true">
              <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="14" r="7"/><path d="M12 3v4M10 3h4M12 11v3l2 1.5"/></svg>
            </span>
            <h3>Invoices in a minute</h3>
            <p>Pick a client, add what you did and hit send before your coffee goes cold.</p>
          </li>
          <li class="feature card">
            <span class="feature-icon" aria-hidden="true">
              <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 9a6 6 0 0 1 12 0c0 6 2.5 8 2.5 8h-17S6 15 6 9z"/><path d="M13.7 20a2 2 0 0 1-3.4 0"/></svg>
            </span>
            <h3>Gentle reminders</h3>
            <p>Polite nudges go out when an invoice is due, so you don't have to write the awkward follow-up.</p>
          </li>
          <li class="feature card">
            <span class="feature-icon" aria-hidden="true">
              <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="2.5" y="5" width="19" height="14" rx="2.5"/><path d="M2.5 10h19M6.5 15h4"/></svg>
            </span>
            <h3>Card and bank payments</h3>
            <p>Clients pay by card or bank transfer straight from the invoice, whichever suits them.</p>
          </li>
        </ul>
      </div>
    </section>

    <section class="section" id="pricing" aria-labelledby="pricing-title">
      <div class="wrap">
        <div class="section-head">
          <h2 id="pricing-title">Simple pricing</h2>
          <p>Try Brindlebill free, then pick the plan that fits. Pay yearly and get two months free.</p>
        </div>

        <!-- Hidden until the script runs. Without JavaScript, the monthly prices just stay as they are. -->
        <fieldset class="billing" hidden>
          <legend class="sr-only">Billing period</legend>
          <div class="segmented">
            <label><input type="radio" name="billing" value="monthly" checked><span>Monthly</span></label>
            <label><input type="radio" name="billing" value="yearly"><span>Yearly</span></label>
          </div>
        </fieldset>

        <!-- Prices live in data-monthly and data-yearly (yearly = 10 times monthly, so two months free).
             The script fills in the price text. The numbers written below are what shows without JavaScript. -->
        <ul class="plans" role="list">
          <li class="plan card" data-monthly="9" data-yearly="90">
            <h3>Starter</h3>
            <p class="price"><span class="amount">$9</span> <span class="period">per month</span></p>
            <p class="billed">Billed monthly</p>
            <ul class="plan-features" role="list">
              <li>5 clients</li>
              <li>PDF invoices</li>
            </ul>
          </li>
          <li class="plan card" data-monthly="19" data-yearly="190">
            <h3>Pro</h3>
            <p class="price"><span class="amount">$19</span> <span class="period">per month</span></p>
            <p class="billed">Billed monthly</p>
            <ul class="plan-features" role="list">
              <li>Unlimited clients</li>
              <li>Automatic reminders</li>
              <li>Your own logo</li>
            </ul>
          </li>
          <li class="plan card" data-monthly="49" data-yearly="490">
            <h3>Team</h3>
            <p class="price"><span class="amount">$49</span> <span class="period">per month</span></p>
            <p class="billed">Billed monthly</p>
            <ul class="plan-features" role="list">
              <li>Everything in Pro</li>
              <li>5 seats</li>
              <li>A shared client list</li>
            </ul>
          </li>
        </ul>
      </div>
    </section>

    <section class="section" id="faq" aria-labelledby="faq-title">
      <div class="wrap">
        <div class="section-head">
          <h2 id="faq-title">Frequently asked questions</h2>
        </div>
        <div class="faq">
          <details class="card">
            <summary>Can I cancel any time?</summary>
            <p>Yes. Cancel from your account page and you won't be charged again. Nothing is locked in.</p>
          </details>
          <details class="card">
            <summary>Do my clients need an account?</summary>
            <p>No. They open a link, see the invoice and pay. They never have to sign up.</p>
          </details>
          <details class="card">
            <summary>Which currencies can I invoice in?</summary>
            <p>You can invoice in 30 currencies, and each invoice shows the amount in your client's currency.</p>
          </details>
          <details class="card">
            <summary>What happens when the free trial ends?</summary>
            <p>You pick a plan. If you don't, your account switches to view-only and your invoices stay safe for 90 days.</p>
          </details>
        </div>
      </div>
    </section>

    <section class="section" aria-labelledby="cta-title">
      <div class="wrap">
        <div class="cta-box">
          <h2 id="cta-title">Ready to send your first invoice?</h2>
          <a class="button" href="/signup">Start free trial</a>
        </div>
      </div>
    </section>
  </main>

  <footer class="site-footer">
    <div class="wrap">
      <p>&copy; Brindlebill. Simple invoicing for freelancers.</p>
    </div>
  </footer>

  <script>
    // Monthly / Yearly switch for the pricing section.
    (() => {
      const billing = document.querySelector('.billing');
      const plans = document.querySelectorAll('.plan');
      const dollars = (amount) => '$' + amount.toLocaleString('en-US');

      const showPrices = (period) => {
        const yearly = period === 'yearly';

        plans.forEach((plan) => {
          const perMonth = Number(plan.dataset.monthly);
          const perYear = Number(plan.dataset.yearly);

          plan.querySelector('.amount').textContent = dollars(yearly ? perYear : perMonth);
          plan.querySelector('.period').textContent = yearly ? 'per year' : 'per month';
          plan.querySelector('.billed').textContent = yearly
            ? 'Billed yearly, you save ' + dollars(perMonth * 12 - perYear)
            : 'Billed monthly';
        });
      };

      billing.hidden = false;
      billing.addEventListener('change', (event) => showPrices(event.target.value));

      // Browsers can remember the last choice after a reload, so start from whichever option is checked.
      showPrices(billing.querySelector('input:checked').value);
    })();
  </script>
</body>
</html>

Notes:

  • Yearly pricing: Yearly prices are 10 × the monthly price: $90, $190 and $490, each shown "per year". A line under each price shows the saving: $18, $38 and $98.
    • To change a price, edit data-monthly and data-yearly on the plan.
    • Also update the starting $9 / $19 / $49 text. That text is what visitors see if JavaScript is off. In that case the switch is hidden.
  • Sign-up button: "Start free trial" appears at the top and again at the end of the page. Both link to /signup, so change that to your real sign-up URL. If you only want one button, delete the bottom section.
  • FAQ: It uses <details>/<summary>, so it opens and closes with a tap, click or keyboard and needs no JavaScript. Your answers are word for word.
  • Text I wrote: I wrote the headline, the pitch, the section headings and the three feature sentences. Swap in your own wording wherever you like.
  • Phones:
    • Body text is 17px, and nothing on the page is smaller than 16px.
    • There is one h1, an h2 for each section, and h3 for each feature and plan.
    • Buttons and links are at least 44px tall.
  • Floor2/2, 100% passed
  • Middle4/4, 100% passed
  • Top3/3, 100% passed
9 of 9 checks passedfloor 2/2, middle 4/4, top 3/3
  • Passed.
    The page loads with no errors in the console
    Floor Page test
  • Passed.
    Every section is there, with the exact plan names, prices and text
    Floor Page test
  • Passed.
    No sideways scroll on a 375 px phone
    Middle Page test
  • Passed.
    Nothing is loaded from outside the file
    Middle Page test
  • Passed.
    One h1, no skipped heading levels, text 16 px or larger, enough contrast
    Middle Page test
  • Passed.
    The page looks finished: clear hierarchy, pricing easy to compare, nothing broken
    Middle Read
  • Passed.
    Yearly shows $90, $190 and $490, and Monthly brings back $9, $19, $49
    Top Page test
  • Passed.
    Each FAQ question opens and closes from the keyboard
    Top Page test
  • Passed.
    Still no sideways scroll on a phone with Yearly on and every FAQ open
    Top Page test
  • Took 16 min 25 s.
  • First words after 15 min 35 s.
  • Wrote 110,324 tokens, 102,230 of them thinking.
  • $2.21 at API prices.
All numbers.
Time to finish16 min 25 s
Time to first words15 min 35 s
Input tokens2
Cached tokens1,271
Output tokens110,324
Thinking tokens102,230
Words in the answer2,000
Price at API rates$2.21
B02Build a dashboard from a picture of its designLow 6/7Max 7/7Max +1

What it asks for. Sends a picture of a designer's mockup, an admin dashboard for a small bike repair shop, and asks for it to be built as one HTML file that matches the layout, colours, spacing and text as closely as it can. The bar chart has to be drawn to scale. On a phone the page must stack into one column, hide the sidebar behind a menu button and never scroll sideways.

Max effort passed 1 more check than low.

AI answer from Opus 5.5 · low effort · 2 Oct 2026

6 of 7

Screenshot of the page built in this answer, at a desktop width of 1280 pixels
Our screenshot, 1280 by 800. Open it for the full length.
Screenshot of the page built in this answer, at a phone width of 375 pixels
Phone, 375 by 812.
Show the code and the answer.

Here's the complete file. Save it as something like index.html and open it in a browser.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Overview · Tarnwick Bikeworks</title>
<style>
  :root {
    --sidebar: #1c2a43;
    --sidebar-line: #2b3a54;
    --sidebar-text: #c9d2e0;
    --blue: #2f6fea;
    --bg: #f2f4f8;
    --card: #ffffff;
    --border: #e3e7ee;
    --text: #172033;
    --muted: #5f6b7d;
    --green: #15803d;
    --red: #cf3a24;
    --unit: 4px; /* chart scale: 1 job = 4px of bar height */
  }

  * { box-sizing: border-box; }

  html, body {
    margin: 0;
    padding: 0;
  }

  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }

  /* ---------- Sidebar ---------- */
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 240px;
    background: var(--sidebar);
    color: #fff;
    z-index: 30;
  }
  .brand {
    height: 65px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.1px;
    border-bottom: 1px solid var(--sidebar-line);
  }
  .nav {
    list-style: none;
    margin: 0;
    padding: 23px 12px;
  }
  .nav li + li { margin-top: 4px; }
  .nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 40px;
    padding: 0 14px;
    border-radius: 6px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 15px;
  }
  .nav a:hover { background: rgba(255,255,255,0.06); }
  .nav a.active {
    background: var(--blue);
    color: #fff;
    font-weight: 600;
  }
  .nav .icon {
    width: 17px;
    height: 17px;
    border: 1.6px solid currentColor;
    border-radius: 4px;
    flex: none;
  }

  /* ---------- Main ---------- */
  .main {
    margin-left: 240px;
    min-height: 100vh;
    min-width: 0;
  }

  .topbar {
    height: 65px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 32px;
    gap: 16px;
  }
  .topbar h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
    flex: 1;
    min-width: 0;
  }
  .menu-btn {
    display: none;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 8px;
    padding: 0;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex: none;
  }
  .menu-btn span,
  .menu-btn span::before,
  .menu-btn span::after {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    position: relative;
  }
  .menu-btn span::before,
  .menu-btn span::after {
    content: "";
    position: absolute;
    left: 0;
  }
  .menu-btn span::before { top: -6px; }
  .menu-btn span::after  { top: 6px; }

  .search {
    width: 292px;
    height: 36px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 12px;
    background: #f1f4f8;
    border: 1px solid #dde2ea;
    border-radius: 6px;
    margin-right: 30px;
  }
  .search svg { flex: none; }
  .search input {
    border: 0;
    background: transparent;
    outline: none;
    font: inherit;
    font-size: 14px;
    color: var(--text);
    width: 100%;
    min-width: 0;
  }
  .search input::placeholder { color: #5f6b7d; }
  .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--sidebar);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
  }

  .content {
    padding: 31px 32px 48px;
  }

  .card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
  }

  /* ---------- Stats ---------- */
  .stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
  .stat {
    padding: 18px 20px 10px;
    min-height: 109px;
  }
  .stat .label {
    font-size: 13px;
    color: #4b5668;
    font-weight: 500;
  }
  .stat .value {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin: 4px 0 6px;
    line-height: 1.2;
  }
  .delta {
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .delta.up { color: var(--green); }
  .delta.down { color: var(--red); }
  .delta .tri {
    width: 0; height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
  }
  .delta.up .tri { border-bottom: 8px solid currentColor; }
  .delta.down .tri { border-top: 8px solid currentColor; }

  /* ---------- Chart ---------- */
  .chart-card {
    margin-top: 32px;
    padding: 18px 23px 9px;
  }
  .card-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
  }
  .card-head h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
  }
  .card-head .range {
    font-size: 13px;
    color: var(--muted);
  }
  .chart {
    position: relative;
    margin-top: 22px;
    height: 148px;              /* 124px for the tallest bar + room for its label */
    border-bottom: 1px solid #dfe3ea;
    display: flex;
  }
  .chart .grid {
    position: absolute;
    left: 0; right: 0;
    bottom: calc(15.5 * var(--unit));
    border-top: 1px solid #edf0f4;
  }
  .col {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    position: relative;
  }
  .bar {
    width: 56px;
    max-width: 42%;
    height: calc(var(--v) * var(--unit));
    background: var(--blue);
    border-radius: 3px 3px 0 0;
  }
  .bar-val {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
  }
  .days {
    display: flex;
  }
  .days span {
    flex: 1;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
    padding-top: 8px;
  }

  /* ---------- Table ---------- */
  .jobs-card {
    margin-top: 32px;
    padding-top: 17px;
    padding-bottom: 12px;
    overflow: hidden;
  }
  .jobs-card h2 {
    margin: 0 0 12px;
    padding: 0 23px;
    font-size: 15px;
    font-weight: 700;
  }
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
  }
  thead th {
    background: #f6f8fb;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    height: 32px;
    padding: 0 12px;
  }
  td {
    height: 44px;
    padding: 0 12px;
    font-size: 14px;
    border-top: 1px solid #edf0f4;
    white-space: nowrap;
  }
  tbody tr:first-child td { border-top: 0; }
  th:first-child, td:first-child { padding-left: 23px; width: 96px; }
  th:nth-child(2) { width: 178px; }
  th:nth-child(3) { width: 230px; }
  th:nth-child(4) { width: 120px; }
  td:first-child { font-weight: 700; }
  .pill {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
  }
  .pill.ready   { background: #dcf3e3; color: #17663a; }
  .pill.prog    { background: #fcefc9; color: #8a5300; }
  .pill.parts   { background: #e8e3fc; color: #5536bf; }

  .overlay { display: none; }

  /* ---------- Mobile ---------- */
  @media (max-width: 860px) {
    .sidebar {
      transform: translateX(-100%);
      transition: transform 0.25s ease;
      box-shadow: none;
    }
    body.nav-open .sidebar {
      transform: translateX(0);
      box-shadow: 0 0 40px rgba(0,0,0,0.3);
    }
    .overlay {
      display: block;
      position: fixed;
      inset: 0;
      background: rgba(15, 23, 42, 0.45);
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.25s ease;
      z-index: 20;
    }
    body.nav-open .overlay {
      opacity: 1;
      pointer-events: auto;
    }
    body.nav-open { overflow: hidden; }

    .main { margin-left: 0; }
    .menu-btn { display: inline-flex; }

    .topbar {
      height: auto;
      flex-wrap: wrap;
      padding: 12px 16px;
      gap: 12px;
    }
    .search {
      order: 3;
      width: 100%;
      margin-right: 0;
    }

    .content { padding: 16px 16px 32px; }
    .stats { grid-template-columns: 1fr; gap: 16px; }
    .chart-card, .jobs-card { margin-top: 16px; }
    .chart-card { padding: 16px 14px 8px; }
    .bar { max-width: 60%; }
    .days span { font-size: 12px; }
    .jobs-card h2 { padding: 0 16px; }
    th:first-child, td:first-child { padding-left: 16px; }
  }
</style>
</head>
<body>

<aside class="sidebar" id="sidebar" aria-label="Main navigation">
  <div class="brand">Tarnwick Bikeworks</div>
  <ul class="nav">
    <li><a href="#" class="active" aria-current="page"><span class="icon"></span>Overview</a></li>
    <li><a href="#"><span class="icon"></span>Jobs</a></li>
    <li><a href="#"><span class="icon"></span>Bookings</a></li>
    <li><a href="#"><span class="icon"></span>Stock</a></li>
    <li><a href="#"><span class="icon"></span>Reports</a></li>
  </ul>
</aside>
<div class="overlay" id="overlay"></div>

<div class="main">
  <header class="topbar">
    <button class="menu-btn" id="menuBtn" aria-label="Open menu" aria-controls="sidebar" aria-expanded="false"><span></span></button>
    <h1>Overview</h1>
    <label class="search">
      <svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true">
        <circle cx="7" cy="7" r="5.25" stroke="#5f6b7d" stroke-width="1.6"/>
        <path d="M11 11l3.5 3.5" stroke="#5f6b7d" stroke-width="1.6" stroke-linecap="round"/>
      </svg>
      <input type="search" placeholder="Search jobs and bikes" aria-label="Search jobs and bikes">
    </label>
    <div class="avatar" aria-label="Account">TB</div>
  </header>

  <main class="content">
    <section class="stats">
      <div class="card stat">
        <div class="label">Revenue</div>
        <div class="value">$8,460</div>
        <div class="delta up"><span class="tri"></span>12.4% vs last week</div>
      </div>
      <div class="card stat">
        <div class="label">Jobs completed</div>
        <div class="value">130</div>
        <div class="delta up"><span class="tri"></span>8.3% vs last week</div>
      </div>
      <div class="card stat">
        <div class="label">Open bookings</div>
        <div class="value">24</div>
        <div class="delta down"><span class="tri"></span>6.0% vs last week</div>
      </div>
    </section>

    <section class="card chart-card">
      <div class="card-head">
        <h2>Completed per day</h2>
        <span class="range">Last 7 days</span>
      </div>
      <div class="chart" role="img" aria-label="Jobs completed per day: Mon 14, Tue 22, Wed 18, Thu 27, Fri 31, Sat 12, Sun 6">
        <div class="grid"></div>
        <div class="col"><span class="bar-val">14</span><div class="bar" style="--v:14"></div></div>
        <div class="col"><span class="bar-val">22</span><div class="bar" style="--v:22"></div></div>
        <div class="col"><span class="bar-val">18</span><div class="bar" style="--v:18"></div></div>
        <div class="col"><span class="bar-val">27</span><div class="bar" style="--v:27"></div></div>
        <div class="col"><span class="bar-val">31</span><div class="bar" style="--v:31"></div></div>
        <div class="col"><span class="bar-val">12</span><div class="bar" style="--v:12"></div></div>
        <div class="col"><span class="bar-val">6</span><div class="bar" style="--v:6"></div></div>
      </div>
      <div class="days">
        <span>Mon</span><span>Tue</span><span>Wed</span><span>Thu</span><span>Fri</span><span>Sat</span><span>Sun</span>
      </div>
    </section>

    <section class="card jobs-card">
      <h2>Recent jobs</h2>
      <div class="table-wrap">
        <table>
          <thead>
            <tr><th>Job</th><th>Bike</th><th>Work</th><th>Due</th><th>Status</th></tr>
          </thead>
          <tbody>
            <tr><td>#2041</td><td>Trail hardtail</td><td>Gear tune and chain</td><td>12 Mar</td><td><span class="pill ready">Ready for pickup</span></td></tr>
            <tr><td>#2040</td><td>Commuter 700c</td><td>Brake pads, both wheels</td><td>12 Mar</td><td><span class="pill prog">In progress</span></td></tr>
            <tr><td>#2039</td><td>Folding bike</td><td>New rear tyre</td><td>13 Mar</td><td><span class="pill parts">Waiting for parts</span></td></tr>
            <tr><td>#2038</td><td>Road racer</td><td>Full service</td><td>14 Mar</td><td><span class="pill prog">In progress</span></td></tr>
            <tr><td>#2037</td><td>Cargo trike</td><td>Wheel true, front</td><td>14 Mar</td><td><span class="pill ready">Ready for pickup</span></td></tr>
          </tbody>
        </table>
      </div>
    </section>
  </main>
</div>

<script>
  (function () {
    var body = document.body;
    var btn = document.getElementById('menuBtn');
    var overlay = document.getElementById('overlay');

    function setOpen(open) {
      body.classList.toggle('nav-open', open);
      btn.setAttribute('aria-expanded', open ? 'true' : 'false');
      btn.setAttribute('aria-label', open ? 'Close menu' : 'Open menu');
    }

    btn.addEventListener('click', function () {
      setOpen(!body.classList.contains('nav-open'));
    });
    overlay.addEventListener('click', function () { setOpen(false); });
    document.addEventListener('keydown', function (e) {
      if (e.key === 'Escape') setOpen(false);
    });
    window.addEventListener('resize', function () {
      if (window.innerWidth > 860) setOpen(false);
    });
  })();
</script>
</body>
</html>

How it works

  • Chart scale: Each bar's height is value × 4px, set with a CSS variable (style="--v:27"). The tallest bar, 31, comes out at 124px, which matches the mockup. To change the scale, edit --unit in one place. The faint gridline sits at the same height as in the design.
  • Phone layout (860px and narrower):
    • The sidebar slides off-screen.
    • A menu button appears next to the title. Tapping it slides the sidebar in over a dimmed backdrop.
    • Tapping the backdrop or pressing Esc closes it.
    • The stat cards stack into one column, and the search box moves to its own full-width row.
  • No sideways page scroll: The table is the only element too wide for a phone. It sits in its own scroll container, so only the table swipes sideways and the page stays put.
  • Fonts: Only the system font stack is used. On a Mac this gives the same San Francisco look as the mockup.
  • Floor2/2, 100% passed
  • Middle2/2, 100% passed
  • Top2/3, 67% passed
6 of 7 checks passedfloor 2/2, middle 2/2, top 2/3
  • Passed.
    Page loads with no console errors and nothing fetched from outside
    Floor Page test
  • Passed.
    Every word and number in the picture is on the page
    Floor Page test
  • Passed.
    Wide screen: full-height left sidebar, three cards in a row, table cells in the right columns
    Middle Page test
  • Passed.
    Sidebar, active item, accent blue and the three status pills match the picture
    Middle Page test
  • Passed.
    Chart bars run Mon to Sun with heights in proportion to their values
    Top Page test
  • Missed.
    On a phone: no sideways scroll, cards stacked, sidebar hidden until a menu button opens ittest group failed
    Top Page test
  • Passed.
    Side by side with the picture, a designer would accept it as a faithful build
    Top Read
  • Took 54 s.
  • First words after 8.5 s.
  • Wrote 6,998 tokens, 544 of them thinking.
  • 15¢ at API prices.
All numbers.
Time to finish54 s
Time to first words8.5 s
Input tokens2
Cached tokens2,327
Output tokens6,998
Thinking tokens544
Words in the answer1,524
Price at API rates15¢

AI answer from Opus 5.5 · max effort · 2 Oct 2026

7 of 7

Screenshot of the page built in this answer, at a desktop width of 1280 pixels
Our screenshot, 1280 by 800. Open it for the full length.
Screenshot of the page built in this answer, at a phone width of 375 pixels
Phone, 375 by 812.
More screenshots (1).
Screenshot of the page built in this answer, at a phone width of 375 pixels
Show the code and the answer.

Below is a single self-contained HTML file. At 1280px wide it follows the mockup's measurements: a 240px sidebar, a 64px top bar, 32px gutters and three 304px stat cards. The chart draws 4px per job, as the mockup does.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Overview · Tarnwick Bikeworks</title>
<style>
  /* Colours sampled from the mockup. Swap in exact values from the design file if you have them. */
  :root {
    color-scheme: light;
    --navy: #1c2a45;
    --navy-line: rgba(255, 255, 255, 0.08);
    --nav-text: #c5cedf;
    --blue: #2e6de9;
    --page: #f1f3f7;
    --card: #ffffff;
    --border: #e2e6ed;
    --ink: #172033;
    --muted: #5a6476;
    --band: #f6f7fa;
    --line: #edf0f4;
    --up: #17803f;
    --down: #cf3a2f;
  }

  *, *::before, *::after { box-sizing: border-box; }

  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

  body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  h1, h2, p { margin: 0; }
  button, input { font: inherit; color: inherit; }
  svg { display: block; flex: none; }
  :focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  /* ===== Sidebar ===== */
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    width: 240px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--navy);
    color: var(--nav-text);
  }

  .brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 2px 24px 0;
    border-bottom: 1px solid var(--navy-line);
  }

  .brand-name {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
  }

  .nav { padding: 24px 12px; }

  .nav ul {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .nav a {
    display: flex;
    align-items: center;
    gap: 13px;
    height: 40px;
    padding: 0 16px;
    border-radius: 6px;
    color: inherit;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
  }

  .nav a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
  .nav a[aria-current="page"] { background: var(--blue); color: #fff; font-weight: 600; }

  .nav-icon {
    flex: none;
    width: 15px;
    height: 15px;
    border: 1.5px solid currentColor;
    border-radius: 4px;
  }

  .sidebar :focus-visible { outline-color: #9dbcff; }

  /* Menu and close buttons only appear once the sidebar becomes a drawer */
  .icon-btn {
    display: none;
    place-items: center;
    flex: none;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
  }

  .menu-btn { margin-left: -8px; color: var(--ink); }
  .menu-btn:hover { background: var(--page); }
  .sidebar-close { margin-right: -10px; color: var(--nav-text); }
  .sidebar-close:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

  .backdrop { display: none; }

  /* ===== Top bar ===== */
  .page {
    margin-left: 240px;
    overflow-x: clip; /* backstop: nothing inside can make the page scroll sideways */
  }

  .topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 64px;
    padding: 0 32px;
    background: #fff;
    border-bottom: 1px solid var(--border);
  }

  .page-title {
    font-size: 22px;
    line-height: 28px;
    font-weight: 700;
    letter-spacing: -0.01em;
  }

  .search {
    position: relative;
    flex: 0 1 290px;
    min-width: 0;
    margin-left: auto;
  }

  .search svg {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
  }

  .search input {
    display: block;
    width: 100%;
    height: 34px;
    padding: 0 12px 0 37px;
    border: 1px solid #dce1e9;
    border-radius: 7px;
    background: var(--page);
    font-size: 14px;
    -webkit-appearance: none;
    appearance: none;
  }

  .search input::placeholder { color: var(--muted); opacity: 1; }

  .search input:focus {
    outline: none;
    border-color: var(--blue);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(46, 109, 233, 0.18);
  }

  .avatar {
    display: grid;
    place-items: center;
    flex: none;
    width: 36px;
    height: 36px;
    margin-left: 46px; /* plus the 16px gap = the 62px space in the mockup */
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
  }

  /* ===== Content ===== */
  .content {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding: 32px;
  }

  .card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
  }

  .card-title {
    font-size: 15px;
    line-height: 18px;
    font-weight: 700;
  }

  /* Stat cards */
  .stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
  }

  .stat { padding: 16px 20px 10px; }

  .stat-label {
    font-size: 13px;
    line-height: 16px;
    font-weight: 600;
    color: var(--muted);
  }

  .stat-value {
    margin: 5px 0;
    font-size: 32px;
    line-height: 38px;
    font-weight: 700;
    letter-spacing: -0.01em;
  }

  .stat-delta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    line-height: 16px;
    font-weight: 600;
  }

  .up { color: var(--up); }
  .down { color: var(--down); }

  /* Chart */
  .chart-card { padding: 17px 24px 9px; }

  .card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  .card-note {
    font-size: 13px;
    line-height: 18px;
    color: var(--muted);
    white-space: nowrap;
  }

  .chart {
    --max: 31;         /* largest value: that bar fills the full plot height */
    margin-top: 36px;  /* room for the label above the tallest bar */
  }

  .plot {
    position: relative;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-template-rows: 100%;
    align-items: end;
    justify-items: center;
    box-sizing: content-box;
    height: 124px;
    border-bottom: 1px solid #dde2ea; /* baseline */
  }

  .plot::before { /* faint gridline at half height */
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 50%;
    border-top: 1px solid var(--line);
  }

  .bar {
    position: relative;
    width: min(56px, 64%);
    height: calc(var(--v) / var(--max) * 100%); /* to scale: value ÷ max */
    border-radius: 4px 4px 0 0;
    background: var(--blue);
  }

  .bar span {
    position: absolute;
    bottom: calc(100% + 5px);
    left: -12px;
    right: -12px;
    font-size: 13px;
    line-height: 16px;
    font-weight: 700;
    text-align: center;
  }

  .days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    margin-top: 7px;
    font-size: 13px;
    line-height: 16px;
    color: var(--muted);
    text-align: center;
  }

  /* Recent jobs */
  .jobs-card { padding: 17px 0 10px; }
  .jobs-card .card-title { margin: 0 24px 12px; }
  .table-wrap { overflow-x: auto; }

  .jobs {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
  }

  .jobs th { text-align: left; font-weight: 400; }
  .jobs .job { font-weight: 700; }
  .jobs .due { white-space: nowrap; }
  .due-prefix { display: none; }

  .pill {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 18px;
    font-weight: 700;
    white-space: nowrap;
    vertical-align: middle;
  }

  .pill-ready    { background: #d9f2e3; color: #1a7a43; }
  .pill-progress { background: #fcefd0; color: #8a5a07; }
  .pill-waiting  { background: #e8e4fc; color: #5b3fc5; }

  /* Normal table layout everywhere except phones */
  @media not all and (max-width: 640px) {
    .jobs th, .jobs td { padding: 0 16px 0 0; vertical-align: middle; }
    .jobs tr > :first-child { padding-left: 24px; }
    .jobs tr > :last-child { padding-right: 24px; }
    .jobs thead tr { height: 32px; }
    .jobs thead th {
      background: var(--band);
      color: var(--muted);
      font-size: 12px;
      font-weight: 600;
      white-space: nowrap;
    }
    .jobs tbody tr { height: 44px; }
    .jobs tbody tr + tr > * { border-top: 1px solid var(--line); }
  }

  /* ===== Tablet & phone: sidebar becomes a slide-in drawer ===== */
  @media (max-width: 1024px) {
    .page { margin-left: 0; }
    .icon-btn { display: grid; }

    .sidebar {
      visibility: hidden;
      transform: translateX(-100%);
      transition: transform 0.25s ease, visibility 0s linear 0.25s;
    }

    .backdrop {
      display: block;
      position: fixed;
      inset: 0;
      z-index: 30;
      background: rgba(15, 23, 42, 0.5);
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.25s ease, visibility 0s linear 0.25s;
    }

    .nav-open .sidebar,
    .nav-open .backdrop {
      visibility: visible;
      transition-delay: 0s;
    }

    .nav-open .sidebar {
      transform: none;
      box-shadow: 8px 0 32px rgba(15, 23, 42, 0.3);
    }

    .nav-open .backdrop { opacity: 1; }

    html.nav-open,
    html.nav-open body { overflow: hidden; }

    .topbar { gap: 12px; padding: 0 24px; }
    .avatar { margin-left: 4px; }
    .content { gap: 24px; padding: 24px; }
    .stats { gap: 24px; }
  }

  /* ===== Phone: everything in one column ===== */
  @media (max-width: 640px) {
    .topbar {
      flex-wrap: wrap;
      row-gap: 12px;
      height: auto;
      padding: 12px 16px;
    }
    .page-title { font-size: 20px; }
    .avatar { margin-left: auto; }
    .search { order: 1; flex: 1 1 100%; margin-left: 0; }
    .search input { height: 40px; font-size: 16px; } /* 16px stops iOS zooming in on focus */

    .content { gap: 16px; padding: 16px; }
    .stats { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .stat { padding: 16px 20px 14px; }

    .chart-card { padding: 16px 16px 14px; }
    .chart { margin-top: 32px; }
    .days { font-size: 12px; }

    /* Each job becomes a small stacked block instead of a wide table row */
    .jobs-card { padding: 16px 0 4px; }
    .jobs-card .card-title { margin: 0 16px 12px; }
    .jobs, .jobs tbody { display: block; }
    .jobs colgroup { display: none; }
    .jobs thead {
      position: absolute;
      width: 1px;
      height: 1px;
      overflow: hidden;
      clip-path: inset(50%);
    }
    .jobs tbody tr {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      grid-template-areas:
        "job  status"
        "bike bike"
        "work due";
      align-items: center;
      gap: 2px 12px;
      padding: 12px 16px;
      border-top: 1px solid var(--line);
    }
    .jobs .job    { grid-area: job; }
    .jobs .status { grid-area: status; justify-self: end; }
    .jobs .bike   { grid-area: bike; margin-top: 4px; font-weight: 500; }
    .jobs .work,
    .jobs .due    { font-size: 13px; line-height: 18px; color: var(--muted); }
    .jobs .work   { grid-area: work; }
    .jobs .due    { grid-area: due; align-self: start; justify-self: end; }
    .due-prefix   { display: inline; }
  }

  @media (prefers-reduced-motion: reduce) {
    .sidebar, .backdrop { transition: none !important; }
  }
</style>
</head>
<body>
  <div class="sidebar" id="sidebar">
    <div class="brand">
      <span class="brand-name">Tarnwick Bikeworks</span>
      <button class="icon-btn sidebar-close" type="button" aria-label="Close menu">
        <svg width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M5 5l10 10M15 5 5 15"/></svg>
      </button>
    </div>
    <nav class="nav" aria-label="Main">
      <ul>
        <li><a href="#" aria-current="page"><span class="nav-icon" aria-hidden="true"></span>Overview</a></li>
        <li><a href="#"><span class="nav-icon" aria-hidden="true"></span>Jobs</a></li>
        <li><a href="#"><span class="nav-icon" aria-hidden="true"></span>Bookings</a></li>
        <li><a href="#"><span class="nav-icon" aria-hidden="true"></span>Stock</a></li>
        <li><a href="#"><span class="nav-icon" aria-hidden="true"></span>Reports</a></li>
      </ul>
    </nav>
  </div>

  <div class="backdrop" aria-hidden="true"></div>

  <div class="page" id="page">
    <header class="topbar">
      <button class="icon-btn menu-btn" type="button" aria-label="Open menu" aria-controls="sidebar" aria-expanded="false">
        <svg width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M3 5h14M3 10h14M3 15h14"/></svg>
      </button>
      <h1 class="page-title">Overview</h1>
      <div class="search" role="search">
        <svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" aria-hidden="true"><circle cx="7" cy="7" r="5.2"/><path d="m11 11 3.5 3.5"/></svg>
        <input type="search" placeholder="Search jobs and bikes" aria-label="Search jobs and bikes">
      </div>
      <div class="avatar">TB</div>
    </header>

    <main class="content">
      <div class="stats">
        <div class="card stat">
          <p class="stat-label">Revenue</p>
          <p class="stat-value">$8,460</p>
          <p class="stat-delta up">
            <svg width="10" height="8" viewBox="0 0 10 8" aria-hidden="true"><path d="M5 0l5 8H0z" fill="currentColor"/></svg>
            <span><span class="sr-only">Up </span>12.4% vs last week</span>
          </p>
        </div>
        <div class="card stat">
          <p class="stat-label">Jobs completed</p>
          <p class="stat-value">130</p>
          <p class="stat-delta up">
            <svg width="10" height="8" viewBox="0 0 10 8" aria-hidden="true"><path d="M5 0l5 8H0z" fill="currentColor"/></svg>
            <span><span class="sr-only">Up </span>8.3% vs last week</span>
          </p>
        </div>
        <div class="card stat">
          <p class="stat-label">Open bookings</p>
          <p class="stat-value">24</p>
          <p class="stat-delta down">
            <svg width="10" height="8" viewBox="0 0 10 8" aria-hidden="true"><path d="M0 0h10L5 8z" fill="currentColor"/></svg>
            <span><span class="sr-only">Down </span>6.0% vs last week</span>
          </p>
        </div>
      </div>

      <section class="card chart-card" aria-labelledby="chart-title">
        <div class="card-head">
          <h2 class="card-title" id="chart-title">Completed per day</h2>
          <span class="card-note">Last 7 days</span>
        </div>
        <div class="chart" role="img" aria-label="Jobs completed per day: Monday 14, Tuesday 22, Wednesday 18, Thursday 27, Friday 31, Saturday 12, Sunday 6">
          <div class="plot">
            <div class="bar" style="--v: 14"><span>14</span></div>
            <div class="bar" style="--v: 22"><span>22</span></div>
            <div class="bar" style="--v: 18"><span>18</span></div>
            <div class="bar" style="--v: 27"><span>27</span></div>
            <div class="bar" style="--v: 31"><span>31</span></div>
            <div class="bar" style="--v: 12"><span>12</span></div>
            <div class="bar" style="--v: 6"><span>6</span></div>
          </div>
          <div class="days">
            <span>Mon</span><span>Tue</span><span>Wed</span><span>Thu</span><span>Fri</span><span>Sat</span><span>Sun</span>
          </div>
        </div>
      </section>

      <section class="card jobs-card" aria-labelledby="jobs-title">
        <h2 class="card-title" id="jobs-title">Recent jobs</h2>
        <div class="table-wrap">
          <table class="jobs">
            <colgroup>
              <col style="width: 12.2%">
              <col style="width: 18.3%">
              <col style="width: 23.6%">
              <col style="width: 12.3%">
              <col>
            </colgroup>
            <thead>
              <tr>
                <th scope="col">Job</th>
                <th scope="col">Bike</th>
                <th scope="col">Work</th>
                <th scope="col">Due</th>
                <th scope="col">Status</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <th scope="row" class="job">#2041</th>
                <td class="bike">Trail hardtail</td>
                <td class="work">Gear tune and chain</td>
                <td class="due"><span class="due-prefix">Due </span>12 Mar</td>
                <td class="status"><span class="pill pill-ready">Ready for pickup</span></td>
              </tr>
              <tr>
                <th scope="row" class="job">#2040</th>
                <td class="bike">Commuter 700c</td>
                <td class="work">Brake pads, both wheels</td>
                <td class="due"><span class="due-prefix">Due </span>12 Mar</td>
                <td class="status"><span class="pill pill-progress">In progress</span></td>
              </tr>
              <tr>
                <th scope="row" class="job">#2039</th>
                <td class="bike">Folding bike</td>
                <td class="work">New rear tyre</td>
                <td class="due"><span class="due-prefix">Due </span>13 Mar</td>
                <td class="status"><span class="pill pill-waiting">Waiting for parts</span></td>
              </tr>
              <tr>
                <th scope="row" class="job">#2038</th>
                <td class="bike">Road racer</td>
                <td class="work">Full service</td>
                <td class="due"><span class="due-prefix">Due </span>14 Mar</td>
                <td class="status"><span class="pill pill-progress">In progress</span></td>
              </tr>
              <tr>
                <th scope="row" class="job">#2037</th>
                <td class="bike">Cargo trike</td>
                <td class="work">Wheel true, front</td>
                <td class="due"><span class="due-prefix">Due </span>14 Mar</td>
                <td class="status"><span class="pill pill-ready">Ready for pickup</span></td>
              </tr>
            </tbody>
          </table>
        </div>
      </section>
    </main>
  </div>

  <script>
    (function () {
      var root = document.documentElement;
      var page = document.getElementById('page');
      var sidebar = document.getElementById('sidebar');
      var openBtn = document.querySelector('.menu-btn');
      var closeBtn = document.querySelector('.sidebar-close');
      var backdrop = document.querySelector('.backdrop');
      var drawerMode = window.matchMedia('(max-width: 1024px)');

      function openMenu() {
        root.classList.add('nav-open');
        openBtn.setAttribute('aria-expanded', 'true');
        page.inert = true; // keeps keyboard and screen-reader focus inside the menu
        closeBtn.focus();
      }

      function closeMenu(returnFocus) {
        if (!root.classList.contains('nav-open')) return;
        root.classList.remove('nav-open');
        openBtn.setAttribute('aria-expanded', 'false');
        page.inert = false;
        if (returnFocus) openBtn.focus();
      }

      openBtn.addEventListener('click', openMenu);
      closeBtn.addEventListener('click', function () { closeMenu(true); });
      backdrop.addEventListener('click', function () { closeMenu(true); });
      sidebar.addEventListener('click', function (e) {
        if (e.target.closest('a')) closeMenu(false);
      });
      document.addEventListener('keydown', function (e) {
        if (e.key === 'Escape') closeMenu(true);
      });
      drawerMode.addEventListener('change', function (e) {
        if (!e.matches) closeMenu(false); // resized back to desktop
      });
    })();
  </script>
</body>
</html>

Chart scale

  • Each bar's height is its value divided by --max (31), times the 124px plot height.
  • That works out to exactly 4px per job, which matches the mockup's bar heights.
  • To change the data, edit each bar's --v and its label. If the tallest value changes, update --max too.

Phone and tablet

  • At 1024px and below: the sidebar slides in from the left when you tap the ☰ button. You can close it with the ✕, by tapping the dimmed background or by pressing Esc.
  • At 640px and below:
    • Everything stacks into one column, and the search box moves onto its own row under the title.
    • Each job turns into a small stacked block, with the status pill at the top right and "Due …" next to the work. This avoids a sideways-scrolling table.
    • The search box uses 16px text so iPhones don't zoom in when you tap it.
    • Nothing is wider than the screen, and the main area also clips sideways overflow as a backstop.
  • The mockup only shows desktop, so the 1024px point for switching to the menu button is my choice. It's easy to change in the media query and in the matchMedia line in the script.

Visual fidelity

  • Fonts use the device's own system font: San Francisco on Mac and iPhone, Segoe UI on Windows. This is the closest match without loading an outside font.
  • I matched the colours by eye from the image. If your designer can send the exact hex values, replace the variables at the top of the CSS.
  • Floor2/2, 100% passed
  • Middle2/2, 100% passed
  • Top3/3, 100% passed
7 of 7 checks passedfloor 2/2, middle 2/2, top 3/3
  • Passed.
    Page loads with no console errors and nothing fetched from outside
    Floor Page test
  • Passed.
    Every word and number in the picture is on the page
    Floor Page test
  • Passed.
    Wide screen: full-height left sidebar, three cards in a row, table cells in the right columns
    Middle Page test
  • Passed.
    Sidebar, active item, accent blue and the three status pills match the picture
    Middle Page test
  • Passed.
    Chart bars run Mon to Sun with heights in proportion to their values
    Top Page test
  • Passed.
    On a phone: no sideways scroll, cards stacked, sidebar hidden until a menu button opens it
    Top Page test
  • Passed.
    Side by side with the picture, a designer would accept it as a faithful build
    Top Read
  • Took 18 min 31 s.
  • First words after 17 min 33 s.
  • Wrote 124,110 tokens, 114,968 of them thinking.
  • $2.49 at API prices.
All numbers.
Time to finish18 min 31 s
Time to first words17 min 33 s
Input tokens2
Cached tokens2,326
Output tokens124,110
Thinking tokens114,968
Words in the answer2,316
Price at API rates$2.49
B03A kanban board that survives a reloadLow 7/9Max 0/9Max −7

What it asks for. Asks for a personal kanban board in one HTML file with three columns: to do, doing and done. Cards are added by typing a title, can be dragged between and within columns, edited and deleted, and each column shows how many cards it holds. The board must survive a reload, work from the keyboard with the arrow keys, show titles that contain code exactly as typed, and fit a phone screen.

Max effort passed 7 fewer checks than low.

AI answer from Opus 5.5 · low effort · 2 Oct 2026

7 of 9

Screenshot of the page built in this answer, at a phone width of 375 pixels
Phone, 375 by 812.
Show the code and the answer.

Here's the complete file. Save it as something like kanban.html and open it in a browser.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Kanban</title>
<style>
  *, *::before, *::after { box-sizing: border-box; }
  html, body { margin: 0; overflow-x: hidden; }
  body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: #eef1f5;
    color: #1d2330;
    padding: 12px;
  }
  h1 { font-size: 1.3rem; margin: 0 0 12px; }

  .add {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    max-width: 600px;
  }
  .add input { flex: 1 1 auto; min-width: 0; }

  input[type="text"] {
    font: inherit;
    padding: 8px 10px;
    border: 1px solid #b7bfcc;
    border-radius: 6px;
    background: #fff;
    width: 100%;
    min-width: 0;
  }
  button {
    font: inherit;
    padding: 7px 12px;
    border: 1px solid #8a94a6;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    flex: 0 0 auto;
  }
  button:hover { background: #f1f4f8; }
  button.primary { background: #2f6fde; border-color: #2f6fde; color: #fff; }
  button.primary:hover { background: #255fc4; }

  .board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
  }
  @media (max-width: 700px) {
    .board { grid-template-columns: minmax(0, 1fr); }
  }

  .column {
    background: #dde3eb;
    border-radius: 10px;
    padding: 10px;
    min-width: 0;
  }
  .column h2 {
    font-size: 1rem;
    margin: 0 0 8px;
    display: flex;
    gap: 6px;
    align-items: baseline;
  }
  .count {
    font-size: .85rem;
    background: #fff;
    border-radius: 10px;
    padding: 0 8px;
    color: #445;
  }
  .list {
    list-style: none;
    margin: 0;
    padding: 0;
    min-height: 48px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .card {
    background: #fff;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,.15);
    display: flex;
    gap: 8px;
    align-items: flex-start;
    min-width: 0;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
  }
  .card:focus { outline: 3px solid #2f6fde; outline-offset: 2px; }
  .card.dragging { opacity: .6; box-shadow: 0 4px 12px rgba(0,0,0,.25); cursor: grabbing; }

  .handle {
    flex: 0 0 auto;
    color: #8a94a6;
    padding: 2px 4px;
    touch-action: none;   /* lets touch dragging start from the handle */
    cursor: grab;
    line-height: 1.4;
  }
  .body { flex: 1 1 auto; min-width: 0; }
  .title {
    margin: 2px 0 8px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .actions { display: flex; gap: 6px; flex-wrap: wrap; }
  .actions button { padding: 4px 10px; font-size: .9rem; }
  .card input[type="text"] { margin-bottom: 8px; }

  .empty { color: #6a7385; font-size: .9rem; padding: 6px 2px; }
  .hint { color: #5a6375; font-size: .85rem; margin: 14px 0 0; }
</style>
</head>
<body>
<h1>My tasks</h1>

<form class="add" id="addForm" autocomplete="off">
  <label for="newTitle" style="position:absolute;left:-9999px">New card title</label>
  <input type="text" id="newTitle" placeholder="New card title">
  <button type="submit" class="primary">Add card</button>
</form>

<div class="board" id="board"></div>

<p class="hint">Tip: Tab to a card and use the arrow keys to move it. On touch screens, drag cards by the ⠿ handle.</p>

<script>
(function () {
  "use strict";

  var STORAGE_KEY = "simple-kanban-v1";
  var COLUMNS = [
    { key: "todo",  name: "To do" },
    { key: "doing", name: "Doing" },
    { key: "done",  name: "Done" }
  ];

  var state = load();
  var editingId = null;
  var drag = null;

  var board = document.getElementById("board");
  var addForm = document.getElementById("addForm");
  var newTitle = document.getElementById("newTitle");

  // ---------- storage ----------
  function emptyState() { return { todo: [], doing: [], done: [] }; }

  function load() {
    var s = emptyState();
    try {
      var raw = localStorage.getItem(STORAGE_KEY);
      if (!raw) return s;
      var data = JSON.parse(raw);
      COLUMNS.forEach(function (c) {
        if (Array.isArray(data[c.key])) {
          s[c.key] = data[c.key].filter(function (card) {
            return card && typeof card.id === "string" && typeof card.title === "string";
          }).map(function (card) { return { id: card.id, title: card.title }; });
        }
      });
    } catch (e) { /* bad or missing data: start empty */ }
    return s;
  }

  function save() {
    try { localStorage.setItem(STORAGE_KEY, JSON.stringify(state)); } catch (e) {}
  }

  function newId() {
    return Date.now().toString(36) + Math.random().toString(36).slice(2, 8);
  }

  function find(id) {
    for (var i = 0; i < COLUMNS.length; i++) {
      var list = state[COLUMNS[i].key];
      for (var j = 0; j < list.length; j++) {
        if (list[j].id === id) return { col: i, index: j, card: list[j] };
      }
    }
    return null;
  }

  // ---------- rendering (text only, never HTML) ----------
  function el(tag, className, text) {
    var e = document.createElement(tag);
    if (className) e.className = className;
    if (text != null) e.textContent = text;
    return e;
  }

  function render(focusId, focusEdit) {
    board.textContent = "";
    COLUMNS.forEach(function (col) {
      var cards = state[col.key];
      var section = el("section", "column");
      section.setAttribute("aria-label", col.name);

      var h = el("h2");
      h.appendChild(document.createTextNode(col.name + " "));
      h.appendChild(el("span", "count", String(cards.length)));
      section.appendChild(h);

      var ul = el("ul", "list");
      ul.dataset.col = col.key;
      cards.forEach(function (card) { ul.appendChild(renderCard(card, col)); });
      section.appendChild(ul);
      board.appendChild(section);
    });

    if (focusId) {
      var node = board.querySelector('.card[data-id="' + focusId + '"]');
      if (node) {
        if (focusEdit) {
          var inp = node.querySelector("input");
          if (inp) { inp.focus(); inp.setSelectionRange(inp.value.length, inp.value.length); }
        } else {
          node.focus();
        }
      }
    }
  }

  function renderCard(card, col) {
    var li = el("li", "card");
    li.dataset.id = card.id;
    li.tabIndex = 0;
    li.setAttribute("aria-label", card.title + ", in " + col.name + ". Use arrow keys to move.");

    var handle = el("span", "handle", "⠿");
    handle.setAttribute("aria-hidden", "true");
    li.appendChild(handle);

    var body = el("div", "body");

    if (editingId === card.id) {
      li.setAttribute("aria-label", "Editing " + card.title);
      var input = el("input");
      input.type = "text";
      input.value = card.title;
      input.setAttribute("aria-label", "Card title");
      input.addEventListener("keydown", function (e) {
        if (e.key === "Enter") { e.preventDefault(); commitEdit(card.id, input.value); }
        else if (e.key === "Escape") { e.preventDefault(); editingId = null; render(card.id); }
      });
      body.appendChild(input);

      var a1 = el("div", "actions");
      var saveBtn = el("button", "primary", "Save");
      saveBtn.type = "button";
      saveBtn.addEventListener("click", function () { commitEdit(card.id, input.value); });
      var cancelBtn = el("button", null, "Cancel");
      cancelBtn.type = "button";
      cancelBtn.addEventListener("click", function () { editingId = null; render(card.id); });
      a1.appendChild(saveBtn);
      a1.appendChild(cancelBtn);
      body.appendChild(a1);
    } else {
      body.appendChild(el("p", "title", card.title));

      var a2 = el("div", "actions");
      var editBtn = el("button", null, "Edit");
      editBtn.type = "button";
      editBtn.addEventListener("click", function () {
        editingId = card.id;
        render(card.id, true);
      });
      var delBtn = el("button", null, "Delete");
      delBtn.type = "button";
      delBtn.addEventListener("click", function () { deleteCard(card.id); });
      a2.appendChild(editBtn);
      a2.appendChild(delBtn);
      body.appendChild(a2);
    }
    li.appendChild(body);

    li.addEventListener("keydown", onCardKey);
    li.addEventListener("pointerdown", onPointerDown);
    return li;
  }

  // ---------- actions ----------
  addForm.addEventListener("submit", function (e) {
    e.preventDefault();
    var title = newTitle.value;
    if (title.trim() === "") { newTitle.value = ""; return; }
    state.todo.push({ id: newId(), title: title.trim() });
    save();
    newTitle.value = "";
    render();
    newTitle.focus();
  });

  function commitEdit(id, value) {
    var f = find(id);
    if (f && value.trim() !== "") f.card.title = value.trim();
    editingId = null;
    save();
    render(id);
  }

  function deleteCard(id) {
    var f = find(id);
    if (!f) return;
    var list = state[COLUMNS[f.col].key];
    list.splice(f.index, 1);
    if (editingId === id) editingId = null;
    save();
    // keep keyboard users somewhere sensible
    var next = list[f.index] || list[f.index - 1];
    render(next ? next.id : null);
    if (!next) newTitle.focus();
  }

  // ---------- keyboard moving ----------
  function onCardKey(e) {
    if (e.target !== e.currentTarget) return; // ignore keys typed in inputs/buttons
    var id = e.currentTarget.dataset.id;
    var f = find(id);
    if (!f) return;
    var list = state[COLUMNS[f.col].key];

    if (e.key === "ArrowUp" || e.key === "ArrowDown") {
      e.preventDefault();
      var to = f.index + (e.key === "ArrowUp" ? -1 : 1);
      if (to < 0 || to >= list.length) return;
      list.splice(f.index, 1);
      list.splice(to, 0, f.card);
    } else if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
      e.preventDefault();
      var c = f.col + (e.key === "ArrowLeft" ? -1 : 1);
      if (c < 0 || c >= COLUMNS.length) return;
      list.splice(f.index, 1);
      var target = state[COLUMNS[c].key];
      target.splice(Math.min(f.index, target.length), 0, f.card);
    } else {
      return;
    }
    save();
    render(id);
  }

  // ---------- pointer dragging (mouse, touch, pen) ----------
  function onPointerDown(e) {
    var card = e.currentTarget;
    if (e.button !== 0) return;
    if (e.target.closest("button, input")) return;
    if (e.pointerType !== "mouse" && !e.target.closest(".handle")) return; // touch: handle only, so page can scroll
    drag = { el: card, id: card.dataset.id, x: e.clientX, y: e.clientY, started: false, pointerId: e.pointerId };
    try { card.setPointerCapture(e.pointerId); } catch (err) {}
    card.addEventListener("pointermove", onPointerMove);
    card.addEventListener("pointerup", onPointerEnd);
    card.addEventListener("pointercancel", onPointerEnd);
  }

  function onPointerMove(e) {
    if (!drag || e.pointerId !== drag.pointerId) return;
    if (!drag.started) {
      if (Math.abs(e.clientX - drag.x) + Math.abs(e.clientY - drag.y) < 6) return;
      drag.started = true;
      drag.el.classList.add("dragging");
    }
    e.preventDefault();

    var under = document.elementFromPoint(e.clientX, e.clientY);
    var column = under && under.closest(".column");
    if (!column) return;
    var list = column.querySelector(".list");

    var before = null;
    var cards = list.querySelectorAll(".card");
    for (var i = 0; i < cards.length; i++) {
      if (cards[i] === drag.el) continue;
      var r = cards[i].getBoundingClientRect();
      if (e.clientY < r.top + r.height / 2) { before = cards[i]; break; }
    }
    if (before) {
      if (before.previousSibling !== drag.el) list.insertBefore(drag.el, before);
    } else if (list.lastElementChild !== drag.el) {
      list.appendChild(drag.el);
    }
  }

  function onPointerEnd(e) {
    if (!drag) return;
    var card = drag.el;
    card.removeEventListener("pointermove", onPointerMove);
    card.removeEventListener("pointerup", onPointerEnd);
    card.removeEventListener("pointercancel", onPointerEnd);
    try { card.releasePointerCapture(drag.pointerId); } catch (err) {}
    var started = drag.started, id = drag.id;
    drag = null;
    if (!started) return;

    // Read the new order back from the page into the saved state
    var all = {};
    COLUMNS.forEach(function (c) { state[c.key].forEach(function (cd) { all[cd.id] = cd; }); });
    var fresh = emptyState();
    board.querySelectorAll(".list").forEach(function (ul) {
      ul.querySelectorAll(".card").forEach(function (li) {
        if (all[li.dataset.id]) fresh[ul.dataset.col].push(all[li.dataset.id]);
      });
    });
    state = fresh;
    save();
    render(id);
  }

  render();
})();
</script>
</body>
</html>

How it covers each point:

  • Columns and counts: Each column header shows its name and a number, for example "Doing 2". The board starts empty.
  • Adding cards: Type a title, then press Enter or click Add card. The card goes to the bottom of To do. Blank or space-only titles are ignored.
  • Dragging: With a mouse, you can drag a card from anywhere on it, both between columns and up and down within one. On a touchscreen, drag by the ⠿ handle. Touching anywhere else on a card still scrolls the page normally.
  • Edit and Delete: Edit turns the title into a text field holding the current title. Enter or Save confirms it. Escape or Cancel backs out. If you save an empty title, the old one is kept. Delete removes the card straight away with no confirmation.
  • Saving: The board is stored in your browser's localStorage after every change, so it looks the same after a reload.
  • Keyboard: Every card is a Tab stop of its own. Left and right arrows move it to the neighbouring column, and up and down move it within its column. Focus stays on the card after each move, so you can keep pressing arrows.
  • Code in titles: Titles are only ever inserted as plain text, never as HTML. Something like <div> or a & b shows exactly as you typed it.
  • Phones: Below 700px wide the columns stack vertically. Long titles, even unbroken strings, wrap inside the card, so the page never scrolls sideways at 375px.
  • Floor2/2, 100% passed
  • Middle3/3, 100% passed
  • Top2/4, 50% passed
7 of 9 checks passedfloor 2/2, middle 3/3, top 2/4
  • Passed.
    The page loads with no errors and has the three named columns
    Floor Page test
  • Passed.
    Adding a card works with Enter and with the Add card button
    Floor Page test
  • Passed.
    Empty or space-only titles are ignored
    Middle Page test
  • Passed.
    The counts update, and Edit and Delete work
    Middle Page test
  • Passed.
    After a reload the board is exactly as it was
    Middle Page test
  • Missed.
    Dragging moves cards between columns and reorders them, and it survives a reloadtest group failed
    Top Page test
  • Missed.
    A card can be moved with the arrow keys and keeps focustest group failed
    Top Page test
  • Passed.
    Titles like <b>hi</b> & <img ...> show exactly as typed and run nothing
    Top Page test
  • Passed.
    No sideways scroll on a 375 px phone, even with very long titles
    Top Page test
  • Took 57 s.
  • First words after 14 s.
  • Wrote 7,037 tokens, 1,086 of them thinking.
  • 15¢ at API prices.
All numbers.
Time to finish57 s
Time to first words14 s
Input tokens2
Cached tokens1,169
Output tokens7,037
Thinking tokens1,086
Words in the answer1,710
Price at API rates15¢

AI answer from Opus 5.5 · max effort · 2 Oct 2026

0 of 9

The answer was cut off at the token limit.

  • Floor0/2, 0% passed
  • Middle0/3, 0% passed
  • Top0/4, 0% passed
0 of 9 checks passedfloor 0/2, middle 0/3, top 0/4
  • Missed.
    The page loads with no errors and has the three named columnsNo answer
    Floor Page test
  • Missed.
    Adding a card works with Enter and with the Add card buttonNo answer
    Floor Page test
  • Missed.
    Empty or space-only titles are ignoredNo answer
    Middle Page test
  • Missed.
    The counts update, and Edit and Delete workNo answer
    Middle Page test
  • Missed.
    After a reload the board is exactly as it wasNo answer
    Middle Page test
  • Missed.
    Dragging moves cards between columns and reorders them, and it survives a reloadNo answer
    Top Page test
  • Missed.
    A card can be moved with the arrow keys and keeps focusNo answer
    Top Page test
  • Missed.
    Titles like <b>hi</b> & <img ...> show exactly as typed and run nothingNo answer
    Top Page test
  • Missed.
    No sideways scroll on a 375 px phone, even with very long titlesNo answer
    Top Page test
  • Took 19 min 32 s.
  • Wrote 128,000 tokens, 128,000 of them thinking.
  • $2.57 at API prices.
All numbers.
Time to finish19 min 32 s
Time to first wordsnot recorded
Input tokens2
Cached tokens1,168
Output tokens128,000
Thinking tokens128,000
Words in the answer0
Price at API rates$2.57
B04Minesweeper in one HTML fileLow 8/9Max 9/9Max +1

What it asks for. Asks for the game Minesweeper in one HTML file: a 9 by 9 board with 10 mines, flags on right click, a mines-left counter, a first square that is never a mine, empty areas that open by themselves, win and lose messages and a new game button. Every square has to be a button so the game works from the keyboard, and the board has to fit a phone.

Max effort passed 1 more check than low.

AI answer from Opus 5.5 · low effort · 2 Oct 2026

8 of 9

Screenshot of the page built in this answer, at a desktop width of 1280 pixels
Our screenshot, 1280 by 800. Open it for the full length.
Screenshot of the page built in this answer, at a phone width of 375 pixels
Phone, 375 by 812.
More screenshots (2).
Screenshot of the page built in this answer, at a desktop width of 1280 pixelsScreenshot of the page built in this answer, at a phone width of 375 pixels
Show the code and the answer.

Here's the complete file. Save it as something like minesweeper.html and open it in any browser.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Minesweeper</title>
<style>
  * { box-sizing: border-box; }
  body {
    margin: 0;
    padding: 16px 8px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: #eef1f5;
    color: #222;
    display: flex;
    justify-content: center;
  }
  .game {
    width: 100%;
    max-width: 360px;
    text-align: center;
  }
  h1 { font-size: 1.5rem; margin: 0 0 12px; }
  .bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 8px;
  }
  .counter { font-size: 1.05rem; font-weight: 600; }
  #newGame {
    font-size: 1rem;
    padding: 8px 14px;
    min-height: 40px;
    border: 1px solid #888;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
  }
  #newGame:focus-visible, .cell:focus-visible {
    outline: 3px solid #1a73e8;
    outline-offset: 1px;
  }
  .board {
    display: grid;
    grid-template-columns: repeat(9, 36px);
    gap: 2px;
    justify-content: center;
    margin: 0 auto;
    user-select: none;
    -webkit-user-select: none;
  }
  .cell {
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 1.1rem;
    font-weight: 700;
    border: 1px solid #8a94a3;
    border-radius: 3px;
    background: #c3cad4;
    cursor: pointer;
    line-height: 1;
    font-family: inherit;
    touch-action: manipulation;
  }
  .cell:hover:not(:disabled):not(.open) { background: #b3bbc7; }
  .cell.open {
    background: #fff;
    border-color: #d0d5dc;
    cursor: default;
  }
  .cell.boom { background: #f28b82; }
  .cell:disabled { cursor: default; color: inherit; opacity: 1; }
  .n1 { color: #1a56db; } .n2 { color: #127a2e; } .n3 { color: #c81e1e; }
  .n4 { color: #1e2a78; } .n5 { color: #7a1e1e; } .n6 { color: #0f7c7c; }
  .n7 { color: #000; }    .n8 { color: #666; }
  #message {
    min-height: 1.6em;
    margin-top: 12px;
    font-size: 1.3rem;
    font-weight: 700;
  }
  .help { font-size: 0.85rem; color: #555; margin-top: 8px; }
</style>
</head>
<body>
<main class="game">
  <h1>Minesweeper</h1>
  <div class="bar">
    <div class="counter">Mines left: <span id="minesLeft">10</span></div>
    <button id="newGame" type="button">New game</button>
  </div>
  <div id="board" class="board" role="grid" aria-label="Minesweeper board"></div>
  <div id="message" role="status" aria-live="polite"></div>
  <p class="help">Click or press Enter/Space to open. Right click (or press F) to place or remove a flag.</p>
</main>

<script>
(function () {
  const ROWS = 9, COLS = 9, MINES = 10;
  const boardEl = document.getElementById('board');
  const counterEl = document.getElementById('minesLeft');
  const messageEl = document.getElementById('message');
  const newGameBtn = document.getElementById('newGame');

  let cells = [];       // {mine, open, flag, count, el}
  let minesPlaced = false;
  let gameOver = false;
  let flags = 0;
  let openedCount = 0;

  function idx(r, c) { return r * COLS + c; }

  function neighbours(i) {
    const r = Math.floor(i / COLS), c = i % COLS, out = [];
    for (let dr = -1; dr <= 1; dr++) {
      for (let dc = -1; dc <= 1; dc++) {
        if (dr === 0 && dc === 0) continue;
        const nr = r + dr, nc = c + dc;
        if (nr >= 0 && nr < ROWS && nc >= 0 && nc < COLS) out.push(idx(nr, nc));
      }
    }
    return out;
  }

  function label(i) {
    const r = Math.floor(i / COLS) + 1, c = (i % COLS) + 1;
    const cell = cells[i];
    let state = 'unopened';
    if (cell.flag) state = 'flagged';
    else if (cell.open) state = cell.mine ? 'mine' : (cell.count ? cell.count + ' adjacent mines' : 'empty');
    else if (gameOver && cell.mine) state = 'mine';
    cell.el.setAttribute('aria-label', 'Row ' + r + ', column ' + c + ', ' + state);
  }

  function newGame() {
    boardEl.innerHTML = '';
    cells = [];
    minesPlaced = false;
    gameOver = false;
    flags = 0;
    openedCount = 0;
    messageEl.textContent = '';
    updateCounter();

    for (let i = 0; i < ROWS * COLS; i++) {
      const btn = document.createElement('button');
      btn.type = 'button';
      btn.className = 'cell';
      btn.dataset.i = i;
      const cell = { mine: false, open: false, flag: false, count: 0, el: btn };
      cells.push(cell);
      boardEl.appendChild(btn);
      label(i);
    }
  }

  function placeMines(safe) {
    const spots = [];
    for (let i = 0; i < ROWS * COLS; i++) if (i !== safe) spots.push(i);
    // Fisher–Yates shuffle, take the first MINES
    for (let i = spots.length - 1; i > 0; i--) {
      const j = Math.floor(Math.random() * (i + 1));
      [spots[i], spots[j]] = [spots[j], spots[i]];
    }
    for (let k = 0; k < MINES; k++) cells[spots[k]].mine = true;
    for (let i = 0; i < cells.length; i++) {
      cells[i].count = neighbours(i).filter(n => cells[n].mine).length;
    }
    minesPlaced = true;
  }

  function updateCounter() {
    counterEl.textContent = MINES - flags;
  }

  function reveal(i) {
    const cell = cells[i];
    cell.open = true;
    openedCount++;
    cell.el.classList.add('open');
    if (cell.count > 0) {
      cell.el.textContent = cell.count;
      cell.el.classList.add('n' + cell.count);
    } else {
      cell.el.textContent = '';
    }
    label(i);
  }

  function openCell(i) {
    if (gameOver) return;
    const cell = cells[i];
    if (cell.open || cell.flag) return;

    if (!minesPlaced) placeMines(i);

    if (cell.mine) {
      lose(i);
      return;
    }

    // Iterative flood fill
    const stack = [i];
    while (stack.length) {
      const cur = stack.pop();
      const c = cells[cur];
      if (c.open || c.flag || c.mine) continue;
      reveal(cur);
      if (c.count === 0) {
        for (const n of neighbours(cur)) {
          if (!cells[n].open && !cells[n].flag) stack.push(n);
        }
      }
    }

    if (openedCount === ROWS * COLS - MINES) win();
  }

  function toggleFlag(i) {
    if (gameOver) return;
    const cell = cells[i];
    if (cell.open) return;
    cell.flag = !cell.flag;
    flags += cell.flag ? 1 : -1;
    cell.el.textContent = cell.flag ? '🚩' : '';
    updateCounter();
    label(i);
  }

  function endBoard() {
    gameOver = true;
    for (const c of cells) c.el.disabled = true;
  }

  function lose(hit) {
    gameOver = true;
    for (let i = 0; i < cells.length; i++) {
      const c = cells[i];
      if (c.mine) {
        c.el.textContent = '💣';
        c.el.classList.add('open');
      }
      label(i);
    }
    cells[hit].el.classList.add('boom');
    messageEl.textContent = 'Game over';
    endBoard();
  }

  function win() {
    messageEl.textContent = 'You win!';
    endBoard();
  }

  // Left click, and Enter/Space (buttons fire "click" for those keys)
  boardEl.addEventListener('click', function (e) {
    const btn = e.target.closest('.cell');
    if (!btn) return;
    openCell(Number(btn.dataset.i));
  });

  // Right click toggles a flag
  boardEl.addEventListener('contextmenu', function (e) {
    e.preventDefault();
    const btn = e.target.closest('.cell');
    if (!btn) return;
    toggleFlag(Number(btn.dataset.i));
  });

  // Keyboard extras: F to flag, arrow keys to move between squares
  boardEl.addEventListener('keydown', function (e) {
    const btn = e.target.closest('.cell');
    if (!btn) return;
    const i = Number(btn.dataset.i);
    const r = Math.floor(i / COLS), c = i % COLS;
    let target = null;
    switch (e.key) {
      case 'f': case 'F': e.preventDefault(); toggleFlag(i); return;
      case 'ArrowUp':    if (r > 0) target = idx(r - 1, c); break;
      case 'ArrowDown':  if (r < ROWS - 1) target = idx(r + 1, c); break;
      case 'ArrowLeft':  if (c > 0) target = idx(r, c - 1); break;
      case 'ArrowRight': if (c < COLS - 1) target = idx(r, c + 1); break;
      default: return;
    }
    e.preventDefault();
    if (target !== null) cells[target].el.focus();
  });

  newGameBtn.addEventListener('click', newGame);

  newGame();
})();
</script>
</body>
</html>

How it meets each requirement:

  • Board: The board is 9×9 with 10 mines. Each square is a real <button>, so Tab, Enter and Space work without any extra code.
  • Opening and flagging: Left click opens a square, and Enter or Space opens the focused one. Right click places or removes a 🚩. A flagged square ignores clicks until you take the flag off.
  • Extra keyboard controls: Right click has no keyboard equivalent, so I added two things. Pressing F toggles a flag on the focused square. The arrow keys move between squares.
  • Mines left: The counter shows 10 − flags.
  • First click is safe: Mines are only placed after your first open, and that square is left out.
  • Numbers and auto-opening: Each number is the count of the 8 neighbours that hold a mine. Opening a square with no mines around it opens its neighbours, and this keeps spreading. It uses a stack rather than recursion.
  • Winning: When every non-mine square is open, the game shows "You win!" and the board locks.
  • Losing: Opening a mine shows "Game over" and reveals every mine as 💣. The mine you hit is highlighted in red, and the board's buttons are disabled.
  • New game: This button makes a fresh board with new mines, sets the counter back to 10 and clears the message.
  • Size: Each square is 36px. The board is 9 × 36px plus 8 × 2px gaps, which is 340px wide. It fits inside a 375px screen without sideways scrolling.
  • Floor2/2, 100% passed
  • Middle2/3, 67% passed
  • Top4/4, 100% passed
8 of 9 checks passedfloor 2/2, middle 2/3, top 4/4
  • Passed.
    81 square buttons in a 9 by 9 grid, Mines left starts at 10
    Floor Page test
  • Passed.
    A first click never lands on a mine
    Floor Page test
  • Missed.
    Numbers are right and an empty square opens its neighbourstest group failed
    Middle Page test
  • Passed.
    Right click flags and unflags, the counter follows, a flagged square stays shut
    Middle Page test
  • Passed.
    The squares work from the keyboard
    Middle Page test
  • Passed.
    Hitting a mine says Game over, shows all 10 mines as 💣 and stops the board
    Top Page test
  • Passed.
    Opening every safe square shows You win! (and not before)
    Top Page test
  • Passed.
    New game resets the board, counter and message
    Top Page test
  • Passed.
    Fits a 375 px phone with squares of at least 32 px, no sideways scroll
    Top Page test
  • Took 37 s.
  • First words after 6.6 s.
  • Wrote 4,595 tokens, 381 of them thinking.
  • 9.7¢ at API prices.
All numbers.
Time to finish37 s
Time to first words6.6 s
Input tokens2
Cached tokens1,111
Output tokens4,595
Thinking tokens381
Words in the answer1,332
Price at API rates9.7¢

AI answer from Opus 5.5 · max effort · 2 Oct 2026

9 of 9

Screenshot of the page built in this answer, at a desktop width of 1280 pixels
Our screenshot, 1280 by 800. Open it for the full length.
Screenshot of the page built in this answer, at a phone width of 375 pixels
Phone, 375 by 812.
More screenshots (2).
Screenshot of the page built in this answer, at a desktop width of 1280 pixelsScreenshot of the page built in this answer, at a phone width of 375 pixels
Show the code and the answer.

Save this as an .html file and open it in any browser. It needs no internet connection.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Minesweeper</title>
<link rel="icon" href="data:,">
<style>
  :root {
    --page-pad: 12px;   /* space at the left and right of the page */
    --pad: 6px;         /* padding inside the board */
    --gap: 3px;         /* space between squares */
    /* Squares grow with the screen but stay between 32px and 44px.
       9 squares + 8 gaps + paddings + 20px spare always fit across the screen. */
    --cell: clamp(32px, calc((100vw - 2 * var(--page-pad) - 2 * var(--pad) - 8 * var(--gap) - 20px) / 9), 44px);
    --board: calc(9 * var(--cell) + 8 * var(--gap) + 2 * var(--pad));
    color-scheme: light;
  }

  *, *::before, *::after { box-sizing: border-box; }

  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body {
    margin: 0;
    padding: 20px var(--page-pad) 32px;
    background: #e9eef3;
    color: #1f2933;
    font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  }

  .game {
    width: var(--board);
    max-width: 100%;
    margin: 0 auto;
  }

  h1 {
    margin: 0 0 14px;
    font-size: 1.75rem;
    text-align: center;
  }

  .bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
  }

  .counter {
    margin: 0;
    padding: 8px 12px;
    border-radius: 8px;
    background: #fff;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  #new-game {
    -webkit-appearance: none;
    appearance: none;
    min-height: 40px;
    padding: 8px 16px;
    border: 0;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    font: inherit;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    touch-action: manipulation;
  }
  #new-game:hover { background: #1d4ed8; }
  #new-game:focus-visible { outline: 3px solid #111827; outline-offset: 2px; }

  .board {
    display: grid;
    grid-template-columns: repeat(9, var(--cell));
    grid-auto-rows: var(--cell);
    gap: var(--gap);
    padding: var(--pad);
    border-radius: 10px;
    background: #7b8a9c;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
  }

  .cell {
    -webkit-appearance: none;
    appearance: none;
    width: var(--cell);
    height: var(--cell);
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: #b7c4d3;
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, .65), inset 0 -3px 0 rgba(0, 0, 0, .22);
    color: #1f2933;
    font: 700 calc(var(--cell) * .55) / 1 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif,
          "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  .cell.open,
  .cell.mine,
  .cell.wrong {
    background: #f3f5f8;
    box-shadow: none;
    cursor: default;
  }
  .cell.hit { background: #f87171; }
  .cell:focus-visible { outline: 3px solid #111827; outline-offset: -3px; }

  .n1 { color: #1d4ed8; }
  .n2 { color: #15803d; }
  .n3 { color: #c81e1e; }
  .n4 { color: #1e3a8a; }
  .n5 { color: #9f1239; }
  .n6 { color: #0f766e; }
  .n7 { color: #111827; }
  .n8 { color: #6b7280; }

  @media (hover: hover) {
    .board:not(.over) .cell:not(.open):hover { background: #c7d2de; }
  }
  .board:not(.over) .cell:not(.open):not(.flag):active {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, .3);
  }
  .board.over .cell { cursor: default; }

  .status {
    min-height: 1.5em;
    margin: 14px 0 0;
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
  }
  .status.win { color: #15803d; }
  .status.lose { color: #c81e1e; }

  .help {
    margin: 8px 0 0;
    font-size: .875rem;
    color: #52606d;
    text-align: center;
  }
</style>
</head>
<body>
<main class="game">
  <h1>Minesweeper</h1>

  <div class="bar">
    <p class="counter" aria-live="polite" aria-atomic="true">Mines left: <span id="mines-left">10</span></p>
    <button type="button" id="new-game">New game</button>
  </div>

  <div id="board" class="board" role="group" aria-label="Minefield"></div>

  <p id="status" class="status" role="status"></p>

  <p class="help">
    Click or tap a square to open it. Right-click or long-press to flag it.<br>
    Keyboard: arrow keys move, Enter or Space opens, F flags.
  </p>
</main>

<script>
(() => {
  'use strict';

  const ROWS = 9;
  const COLS = 9;
  const MINES = 10;
  const LONG_PRESS_MS = 450;

  const board = document.getElementById('board');
  const minesLeft = document.getElementById('mines-left');
  const statusText = document.getElementById('status');
  const newGameButton = document.getElementById('new-game');

  let state;               // 'ready' (no mines laid yet), 'playing', 'won' or 'lost'
  let flags = 0;           // number of flags on the board
  let opened = 0;          // number of safe squares opened
  let hitCell = null;      // the mine that ended the game
  let press = null;        // a finger currently held on a square
  let ignoreMenuUntil = 0; // see onContextMenu()

  // Build the 81 squares once. "New game" just resets them.
  const cells = [];
  for (let i = 0; i < ROWS * COLS; i++) {
    const btn = document.createElement('button');
    btn.type = 'button';
    const cell = {
      btn, index: i, row: Math.floor(i / COLS), col: i % COLS,
      neighbours: [], mine: false, count: 0, open: false, flag: false
    };
    btn.addEventListener('click', e => {
      if (!e.ctrlKey) openCell(cell);     // Ctrl+click is a right-click on a Mac
    });
    btn.addEventListener('contextmenu', e => {
      e.preventDefault();
      onContextMenu(cell);
    });
    btn.addEventListener('keydown', e => onKeyDown(e, cell));
    btn.addEventListener('touchstart', e => onTouchStart(e, cell), { passive: true });
    board.appendChild(btn);
    cells.push(cell);
  }
  for (const cell of cells) {
    for (let dr = -1; dr <= 1; dr++) {
      for (let dc = -1; dc <= 1; dc++) {
        const r = cell.row + dr;
        const c = cell.col + dc;
        if ((dr || dc) && r >= 0 && r < ROWS && c >= 0 && c < COLS) {
          cell.neighbours.push(cells[r * COLS + c]);
        }
      }
    }
  }

  function isOver() {
    return state === 'won' || state === 'lost';
  }

  function newGame() {
    cancelPress();
    state = 'ready';
    flags = 0;
    opened = 0;
    hitCell = null;
    for (const cell of cells) {
      cell.mine = false;
      cell.count = 0;
      cell.open = false;
      cell.flag = false;
      render(cell);
    }
    board.classList.remove('over');
    statusText.textContent = '';
    statusText.className = 'status';
    updateCounter();
  }

  // Mines are laid when the first square is opened. That square and its
  // neighbours are kept clear, so the first click is never a mine and
  // always opens up an area.
  function layMines(first) {
    const keepClear = new Set([first, ...first.neighbours]);
    let spots = cells.filter(cell => !keepClear.has(cell));
    if (spots.length < MINES) spots = cells.filter(cell => cell !== first);
    for (let i = 0; i < MINES; i++) {            // random pick (partial shuffle)
      const j = i + Math.floor(Math.random() * (spots.length - i));
      [spots[i], spots[j]] = [spots[j], spots[i]];
      spots[i].mine = true;
    }
    for (const cell of cells) {
      cell.count = cell.neighbours.filter(n => n.mine).length;
    }
    state = 'playing';
  }

  function openCell(cell) {
    if (isOver() || cell.open || cell.flag) return;
    if (state === 'ready') layMines(cell);
    if (cell.mine) {
      lose(cell);
      return;
    }
    // Open it. Squares with no mines around them open their neighbours,
    // and so on. Flagged squares are never opened.
    const toOpen = [cell];
    while (toOpen.length) {
      const c = toOpen.pop();
      if (c.open || c.flag || c.mine) continue;
      c.open = true;
      opened++;
      render(c);
      if (c.count === 0) toOpen.push(...c.neighbours);
    }
    if (opened === ROWS * COLS - MINES) win();
  }

  function toggleFlag(cell) {
    if (isOver() || cell.open) return false;
    cell.flag = !cell.flag;
    flags += cell.flag ? 1 : -1;
    render(cell);
    updateCounter();
    return true;
  }

  function win() {
    state = 'won';
    for (const cell of cells) {
      if (cell.mine && !cell.flag) {   // flag the mines that are left
        cell.flag = true;
        flags++;
      }
    }
    endGame('You win!', 'win');
  }

  function lose(cell) {
    state = 'lost';
    hitCell = cell;
    endGame('Game over', 'lose');
  }

  // After this, every handler sees isOver() and ignores the board.
  function endGame(message, kind) {
    cells.forEach(render);
    updateCounter();
    board.classList.add('over');
    statusText.textContent = message;
    statusText.className = 'status ' + kind;
  }

  function updateCounter() {
    const text = String(MINES - flags);
    if (minesLeft.textContent !== text) minesLeft.textContent = text;
  }

  function render(cell) {
    let text = '';
    let cls = 'cell';
    let desc;
    if (state === 'lost' && cell.mine) {
      text = '💣';
      cls += cell === hitCell ? ' mine hit' : ' mine';
      desc = cell === hitCell ? 'Exploded mine' : 'Mine';
    } else if (state === 'lost' && cell.flag) {
      text = '❌';
      cls += ' wrong';
      desc = 'Wrong flag';
    } else if (cell.flag) {
      text = '🚩';
      cls += ' flag';
      desc = 'Flagged';
    } else if (cell.open) {
      cls += ' open';
      if (cell.count) {
        text = String(cell.count);
        cls += ' n' + cell.count;
        desc = cell.count === 1 ? '1 mine nearby' : cell.count + ' mines nearby';
      } else {
        desc = 'Empty';
      }
    } else {
      desc = 'Unopened';
    }
    cell.btn.textContent = text;
    cell.btn.className = cls;
    cell.btn.setAttribute('aria-label', `${desc}, row ${cell.row + 1}, column ${cell.col + 1}`);
  }

  // Keyboard: Enter and Space already "click" the focused button.
  // Arrow keys move between squares; F toggles a flag.
  function onKeyDown(e, cell) {
    if (e.altKey || e.ctrlKey || e.metaKey) return;
    let next = -1;
    switch (e.key) {
      case 'ArrowUp':    if (cell.row > 0) next = cell.index - COLS; break;
      case 'ArrowDown':  if (cell.row < ROWS - 1) next = cell.index + COLS; break;
      case 'ArrowLeft':  if (cell.col > 0) next = cell.index - 1; break;
      case 'ArrowRight': if (cell.col < COLS - 1) next = cell.index + 1; break;
      case 'f':
      case 'F':
        e.preventDefault();
        if (!e.repeat) toggleFlag(cell);
        return;
      default:
        return;
    }
    e.preventDefault();
    if (next >= 0) cells[next].btn.focus();
  }

  // Right-click. This also comes from the keyboard's menu key, and from a
  // long press in some phone browsers (handled together with onTouchStart).
  function onContextMenu(cell) {
    if (press) {
      clearTimeout(press.timer);
      if (press.fired) return;      // the long-press timer already did it
      press.fired = true;           // so lifting the finger won't open the square
    } else if (Date.now() < ignoreMenuUntil) {
      return;                       // late duplicate of a long press
    }
    toggleFlag(cell);
  }

  // Touch screens: holding a finger on a square flags it.
  function onTouchStart(e, cell) {
    cancelPress();
    if (e.touches.length !== 1) return;
    const t = e.touches[0];
    const p = { x: t.clientX, y: t.clientY, fired: false, timer: 0 };
    p.timer = setTimeout(() => {
      p.fired = true;
      if (toggleFlag(cell) && navigator.vibrate) navigator.vibrate(15);
    }, LONG_PRESS_MS);
    press = p;
  }

  function cancelPress() {
    if (press) clearTimeout(press.timer);
    press = null;
  }

  board.addEventListener('touchmove', e => {
    if (!press || press.fired) return;
    const t = e.touches[0];
    if (Math.abs(t.clientX - press.x) > 10 || Math.abs(t.clientY - press.y) > 10) cancelPress();
  }, { passive: true });

  board.addEventListener('touchend', e => {
    if (!press) return;
    clearTimeout(press.timer);
    if (press.fired) {
      if (e.cancelable) e.preventDefault();   // a long press flags; it isn't also a tap
      ignoreMenuUntil = Date.now() + 800;
    }
    press = null;
  }, { passive: false });

  board.addEventListener('touchcancel', cancelPress);
  board.addEventListener('contextmenu', e => e.preventDefault()); // no browser menu on the gaps

  newGameButton.addEventListener('click', newGame);
  newGame();
})();
</script>
</body>
</html>

A few things it does beyond your list:

  • Flagging on phones: most phones have no right-click, so a long press puts down or takes off a flag.
  • Keyboard: Tab and the arrow keys move between squares. Enter or Space opens a square, and F flags it.
  • First click: the 8 squares around your first click are also kept free of mines, so the game always starts by opening an area. If you only want the clicked square to be safe, change new Set([first, ...first.neighbours]) to new Set([first]).
  • Counter: it always shows exactly 10 minus the number of flags. If you place more than 10 flags, it goes below zero.
  • End of game: when you lose, a flag on a square without a mine shows ❌. When you win, the remaining mines get flagged, so the counter reads 0. In both cases the squares stay focusable but ignore every click and key, so keyboard users can still look over the board.
  • Floor2/2, 100% passed
  • Middle3/3, 100% passed
  • Top4/4, 100% passed
9 of 9 checks passedfloor 2/2, middle 3/3, top 4/4
  • Passed.
    81 square buttons in a 9 by 9 grid, Mines left starts at 10
    Floor Page test
  • Passed.
    A first click never lands on a mine
    Floor Page test
  • Passed.
    Numbers are right and an empty square opens its neighbours
    Middle Page test
  • Passed.
    Right click flags and unflags, the counter follows, a flagged square stays shut
    Middle Page test
  • Passed.
    The squares work from the keyboard
    Middle Page test
  • Passed.
    Hitting a mine says Game over, shows all 10 mines as 💣 and stops the board
    Top Page test
  • Passed.
    Opening every safe square shows You win! (and not before)
    Top Page test
  • Passed.
    New game resets the board, counter and message
    Top Page test
  • Passed.
    Fits a 375 px phone with squares of at least 32 px, no sideways scroll
    Top Page test
  • Took 16 min 49 s.
  • First words after 16 min 12 s.
  • Wrote 111,954 tokens, 106,063 of them thinking.
  • $2.25 at API prices.
All numbers.
Time to finish16 min 49 s
Time to first words16 min 12 s
Input tokens2
Cached tokens1,110
Output tokens111,954
Thinking tokens106,063
Words in the answer1,827
Price at API rates$2.25
B05Fix three layout bugs on a garden pageLow 7/7Max 7/7Same

What it asks for. Pastes a community garden club's web page and describes three problems on phones: the page scrolls sideways, section headings end up hidden under the sticky header after tapping the menu links, and three event cards are squashed instead of sitting one per row. It asks for the whole page back with all three fixed, leaving the laptop layout as it is and the header still sticky.

Both settings passed 7 of 7 checks.

AI answer from Opus 5.5 · low effort · 2 Oct 2026

7 of 7

Screenshot of the page built in this answer, at a desktop width of 1280 pixels
Our screenshot, 1280 by 800. Open it for the full length.
Screenshot of the page built in this answer, at a phone width of 375 pixels
Phone, 375 by 812.
Show the code and the answer.

Here's what was going wrong on phones, and the fixed file.

1. Sideways scrolling. Three things were wider than a phone screen:

  • The fees table had a fixed width: 720px. It now fills the available width up to 720px, so laptops look the same. It also sits in a wrapper that scrolls on its own if a very narrow screen still can't fit it, so only the table scrolls, not the whole page.
  • The long email address is one unbreakable "word". It's now allowed to wrap.
  • The nav links couldn't wrap on very small screens. Now they can.

2. Headings hidden under the sticky header. The browser scrolls the section to the very top of the screen, which sits behind the header. scroll-margin-top tells it to stop short by the header's height. On phones the header wraps onto two lines, so it gets a larger value there.

3. Squashed cards. On screens 640px wide or less, the grid switches to one card per row. I also changed 1fr to minmax(0, 1fr) so long words can't force the cards wider than their columns.

Laptop layout and the sticky header are unchanged.

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Thistlebank Allotments</title>
<style>
  * { box-sizing: border-box; }
  body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
    line-height: 1.55;
    color: #23301f;
    background: #f7f4ea;
  }
  .wrap { max-width: 960px; margin: 0 auto; padding: 0 1rem; }
  .site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #2f5d34;
    color: #fff;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .25);
  }
  .site-header .wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .25rem 1.5rem;
    padding-top: .9rem;
    padding-bottom: .9rem;
  }
  .brand { font-size: 1.15rem; font-weight: 700; letter-spacing: .01em; }
  .site-header nav { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; }
  .site-header a { color: #fff; text-decoration: none; font-weight: 500; }
  .site-header a:hover { text-decoration: underline; }
  .hero { background: #dfe9c8; padding: 4rem 0 3.5rem; }
  .hero h1 { margin: 0 0 .5rem; font-size: 2.4rem; line-height: 1.15; color: #1f4424; }
  .hero p { margin: 0; max-width: 34rem; font-size: 1.15rem; }
  section.block { padding: 2rem 0; scroll-margin-top: 4rem; }
  section.block h2 { margin: 0 0 1rem; font-size: 1.7rem; color: #1f4424; }
  .cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
  }
  .card { background: #fff; border: 1px solid #d8d2bd; border-radius: 10px; padding: 1.1rem 1.2rem; }
  .card h3 { margin: 0 0 .2rem; font-size: 1.15rem; }
  .card .when { margin: 0 0 .6rem; font-size: .9rem; color: #5b6650; font-weight: 600; }
  .card p { margin: 0; }
  .table-scroll { max-width: 100%; overflow-x: auto; }
  .fees { width: 100%; max-width: 720px; border-collapse: collapse; background: #fff; }
  .fees th, .fees td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid #e2dcc7; }
  .fees th { background: #e8e2cc; font-size: .95rem; }
  .note { margin-top: 1rem; font-size: .95rem; color: #4a5642; }
  .contact-box { background: #fff; border: 1px solid #d8d2bd; border-radius: 10px; padding: 1.2rem 1.4rem; }
  .contact-box p { margin: 0 0 .5rem; }
  .email { font-size: 1.1rem; font-weight: 600; overflow-wrap: anywhere; }
  .email a { color: #1f4424; }
  footer { background: #23301f; color: #d8dccc; padding: 1.5rem 0; font-size: .9rem; }

  @media (max-width: 640px) {
    .cards { grid-template-columns: 1fr; }
    /* The header wraps onto two lines here, so it is taller */
    section.block { scroll-margin-top: 6.5rem; }
    .fees th, .fees td { padding: .6rem .6rem; }
  }
</style>
</head>
<body>
<header class="site-header">
  <div class="wrap">
    <span class="brand">Thistlebank Allotments</span>
    <nav>
      <a href="#about">About</a>
      <a href="#events">Events</a>
      <a href="#fees">Plot fees</a>
      <a href="#contact">Contact</a>
    </nav>
  </div>
</header>

<main>
  <div class="hero">
    <div class="wrap">
      <h1>Grow something together</h1>
      <p>A friendly community garden on the edge of town, with forty-two plots, a shared tool shed and a kettle that is always on.</p>
    </div>
  </div>

  <section class="block" id="about">
    <div class="wrap">
      <h2>About the garden</h2>
      <p>Thistlebank has been run by its members since the garden opened. Plots are small enough to manage in an evening a week, and there is a shared bed for anyone who is not ready to commit to a plot of their own.</p>
      <p>Beginners are welcome. Long-time growers are usually happy to explain why your beans are doing that.</p>
    </div>
  </section>

  <section class="block" id="events">
    <div class="wrap">
      <h2>Coming up</h2>
      <div class="cards">
        <article class="card">
          <h3>Seed swap</h3>
          <p class="when">First Saturday of the month, 10:00</p>
          <p>Bring spare seeds, take what you need. Tea and biscuits in the shed.</p>
        </article>
        <article class="card">
          <h3>Compost clinic</h3>
          <p class="when">Second Wednesday, 18:30</p>
          <p>Learn why the heap smells and what to do about it. Bring gloves.</p>
        </article>
        <article class="card">
          <h3>Autumn bake and dig</h3>
          <p class="when">Last Sunday of October, 13:00</p>
          <p>Tidy the shared beds, then eat cake made from whatever we grew.</p>
        </article>
      </div>
    </div>
  </section>

  <section class="block" id="fees">
    <div class="wrap">
      <h2>Plot fees</h2>
      <div class="table-scroll">
        <table class="fees">
          <thead>
            <tr><th>Plot size</th><th>Best for</th><th>Per year</th><th>Water</th></tr>
          </thead>
          <tbody>
            <tr><td>Small (3 x 5 m)</td><td>Salad and herbs</td><td>$35</td><td>Included</td></tr>
            <tr><td>Medium (5 x 8 m)</td><td>A family of four</td><td>$60</td><td>Included</td></tr>
            <tr><td>Large (8 x 10 m)</td><td>Serious growers</td><td>$95</td><td>Included</td></tr>
            <tr><td>Shared bed</td><td>Trying it out</td><td>$10</td><td>Included</td></tr>
          </tbody>
        </table>
      </div>
      <p class="note">Fees are due on the first of March. Concessions are available; just ask.</p>
    </div>
  </section>

  <section class="block" id="contact">
    <div class="wrap">
      <h2>Contact</h2>
      <div class="contact-box">
        <p>Write to the plot secretary about the waiting list, a visit or anything else.</p>
        <p class="email"><a href="mailto:membershipandplotenquiries@thistlebankallotments.example">membershipandplotenquiries@thistlebankallotments.example</a></p>
        <p>Open days are the first Saturday of every month.</p>
      </div>
    </div>
  </section>
</main>

<footer>
  <div class="wrap">Thistlebank Allotments. Run by members, for members.</div>
</footer>
</body>
</html>

If you later change the header (bigger text, more links), adjust the two scroll-margin-top values (4rem and 6.5rem) to match its new height.

  • Floor2/2, 100% passed
  • Middle2/2, 100% passed
  • Top3/3, 100% passed
7 of 7 checks passedfloor 2/2, middle 2/2, top 3/3
  • Passed.
    Returns one whole HTML page that loads
    Floor Page test
  • Passed.
    All the original text is still on the page
    Floor Page test
  • Passed.
    On a 375 px phone the page no longer scrolls sideways
    Middle Page test
  • Passed.
    On a phone the three event cards stack, one per row
    Middle Page test
  • Passed.
    Tapping each top link shows the section heading below the header (phone and laptop)
    Top Page test
  • Passed.
    Laptop layout unchanged: header still sticky, three cards in a row, blocks in the same places
    Top Page test
  • Passed.
    No console errors and nothing loaded from outside
    Top Page test
  • Took 30 s.
  • First words after 9.1 s.
  • Wrote 3,732 tokens, 623 of them thinking.
  • 9.1¢ at API prices.
All numbers.
Time to finish30 s
Time to first words9.1 s
Input tokens2
Cached tokens3,361
Output tokens3,732
Thinking tokens623
Words in the answer907
Price at API rates9.1¢

AI answer from Opus 5.5 · max effort · 2 Oct 2026

7 of 7

Screenshot of the page built in this answer, at a desktop width of 1280 pixels
Our screenshot, 1280 by 800. Open it for the full length.
Screenshot of the page built in this answer, at a phone width of 375 pixels
Phone, 375 by 812.
Show the code and the answer.

Here's the fixed file. All the phone-only changes are in one media query at the end of the CSS. At laptop widths the page looks exactly as before.

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Thistlebank Allotments</title>
<style>
  * { box-sizing: border-box; }
  /* When a link jumps to a section, stop this far below the top of the screen
     so the sticky header doesn't cover the heading (roughly the header's height) */
  html { scroll-padding-top: 3.5rem; }
  body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
    line-height: 1.55;
    color: #23301f;
    background: #f7f4ea;
  }
  .wrap { max-width: 960px; margin: 0 auto; padding: 0 1rem; }
  .site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #2f5d34;
    color: #fff;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .25);
  }
  .site-header .wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .25rem 1.5rem;
    padding-top: .9rem;
    padding-bottom: .9rem;
  }
  .brand { font-size: 1.15rem; font-weight: 700; letter-spacing: .01em; }
  .site-header nav { display: flex; gap: 1.1rem; }
  .site-header a { color: #fff; text-decoration: none; font-weight: 500; }
  .site-header a:hover { text-decoration: underline; }
  .hero { background: #dfe9c8; padding: 4rem 0 3.5rem; }
  .hero h1 { margin: 0 0 .5rem; font-size: 2.4rem; line-height: 1.15; color: #1f4424; }
  .hero p { margin: 0; max-width: 34rem; font-size: 1.15rem; }
  section.block { padding: 2rem 0; }
  section.block h2 { margin: 0 0 1rem; font-size: 1.7rem; color: #1f4424; }
  .cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
  .card { background: #fff; border: 1px solid #d8d2bd; border-radius: 10px; padding: 1.1rem 1.2rem; }
  .card h3 { margin: 0 0 .2rem; font-size: 1.15rem; }
  .card .when { margin: 0 0 .6rem; font-size: .9rem; color: #5b6650; font-weight: 600; }
  .card p { margin: 0; }
  /* Still 720px wide on a laptop, but the table can now shrink to fit a phone */
  .table-scroll { max-width: 720px; }
  .fees { width: 100%; border-collapse: collapse; background: #fff; }
  .fees th, .fees td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid #e2dcc7; }
  .fees th { background: #e8e2cc; font-size: .95rem; }
  .note { margin-top: 1rem; font-size: .95rem; color: #4a5642; }
  .contact-box { background: #fff; border: 1px solid #d8d2bd; border-radius: 10px; padding: 1.2rem 1.4rem; }
  .contact-box p { margin: 0 0 .5rem; }
  /* Lets the long email address wrap instead of making the page wider */
  .email { font-size: 1.1rem; font-weight: 600; overflow-wrap: anywhere; }
  .email a { color: #1f4424; }
  footer { background: #23301f; color: #d8dccc; padding: 1.5rem 0; font-size: .9rem; }

  /* Phones and other narrow screens (up to about 640px wide) */
  @media (max-width: 40em) {
    /* The links wrap under the club name here, so the header is taller */
    html { scroll-padding-top: 5.25rem; }

    /* One event card per row */
    .cards { grid-template-columns: 1fr; }

    /* Slimmer cells so the table fits; if a screen is narrower still,
       the table scrolls inside its own box instead of moving the whole page */
    .fees th, .fees td { padding-left: .5rem; padding-right: .5rem; }
    .table-scroll { overflow-x: auto; }
  }
</style>
</head>
<body>
<header class="site-header">
  <div class="wrap">
    <span class="brand">Thistlebank Allotments</span>
    <nav>
      <a href="#about">About</a>
      <a href="#events">Events</a>
      <a href="#fees">Plot fees</a>
      <a href="#contact">Contact</a>
    </nav>
  </div>
</header>

<main>
  <div class="hero">
    <div class="wrap">
      <h1>Grow something together</h1>
      <p>A friendly community garden on the edge of town, with forty-two plots, a shared tool shed and a kettle that is always on.</p>
    </div>
  </div>

  <section class="block" id="about">
    <div class="wrap">
      <h2>About the garden</h2>
      <p>Thistlebank has been run by its members since the garden opened. Plots are small enough to manage in an evening a week, and there is a shared bed for anyone who is not ready to commit to a plot of their own.</p>
      <p>Beginners are welcome. Long-time growers are usually happy to explain why your beans are doing that.</p>
    </div>
  </section>

  <section class="block" id="events">
    <div class="wrap">
      <h2>Coming up</h2>
      <div class="cards">
        <article class="card">
          <h3>Seed swap</h3>
          <p class="when">First Saturday of the month, 10:00</p>
          <p>Bring spare seeds, take what you need. Tea and biscuits in the shed.</p>
        </article>
        <article class="card">
          <h3>Compost clinic</h3>
          <p class="when">Second Wednesday, 18:30</p>
          <p>Learn why the heap smells and what to do about it. Bring gloves.</p>
        </article>
        <article class="card">
          <h3>Autumn bake and dig</h3>
          <p class="when">Last Sunday of October, 13:00</p>
          <p>Tidy the shared beds, then eat cake made from whatever we grew.</p>
        </article>
      </div>
    </div>
  </section>

  <section class="block" id="fees">
    <div class="wrap">
      <h2>Plot fees</h2>
      <div class="table-scroll">
        <table class="fees">
          <thead>
            <tr><th>Plot size</th><th>Best for</th><th>Per year</th><th>Water</th></tr>
          </thead>
          <tbody>
            <tr><td>Small (3 x 5 m)</td><td>Salad and herbs</td><td>$35</td><td>Included</td></tr>
            <tr><td>Medium (5 x 8 m)</td><td>A family of four</td><td>$60</td><td>Included</td></tr>
            <tr><td>Large (8 x 10 m)</td><td>Serious growers</td><td>$95</td><td>Included</td></tr>
            <tr><td>Shared bed</td><td>Trying it out</td><td>$10</td><td>Included</td></tr>
          </tbody>
        </table>
      </div>
      <p class="note">Fees are due on the first of March. Concessions are available; just ask.</p>
    </div>
  </section>

  <section class="block" id="contact">
    <div class="wrap">
      <h2>Contact</h2>
      <div class="contact-box">
        <p>Write to the plot secretary about the waiting list, a visit or anything else.</p>
        <p class="email"><a href="mailto:membershipandplotenquiries@thistlebankallotments.example">membershipandplotenquiries@<wbr>thistlebankallotments.example</a></p>
        <p>Open days are the first Saturday of every month.</p>
      </div>
    </div>
  </section>
</main>

<footer>
  <div class="wrap">Thistlebank Allotments. Run by members, for members.</div>
</footer>
</body>
</html>

What was going on

1. Sideways scrolling. Three things were wider than a phone screen:

  • Fees table: It had a fixed width: 720px.
    • It now fills the available width up to 720px, so on a laptop it is still 720px.
    • On phones the cells have less padding at the sides, so all four columns fit.
    • The new <div class="table-scroll"> is a safety net. On an unusually narrow screen, the table scrolls inside that box instead of moving the whole page.
  • Email address: It has no spaces, so the browser had nowhere to wrap it. overflow-wrap: anywhere allows a break. The <wbr> (an optional line-break point) after the @ makes it break there.
  • Event cards: A grid column can't get narrower than its card's longest word plus padding. On narrower phones, the row of three was wider than the screen. Fix 3 removes this.

I deliberately didn't use the common overflow-x: hidden shortcut. It only hides whatever sticks out, so the table would be cut off. Depending on where it's applied, it can also stop the header from sticking.

2. Hidden headings. scroll-padding-top tells the browser to stop that far below the top of the screen when it jumps to a section.

  • The header is about 3.6rem tall on a laptop. On a phone it is about 5.4rem, because the links wrap onto a second line.
  • So the values are 3.5rem for laptops and 5.25rem for phones. Each section's own top padding then gives the heading its usual space.
  • This also helps on a laptop, where the headings could end up partly covered too.
  • If you ever change the header's padding or text size, change these two numbers to match.

3. Event cards. On screens up to about 640px wide (40em), the grid switches to one column.

  • Floor2/2, 100% passed
  • Middle2/2, 100% passed
  • Top3/3, 100% passed
7 of 7 checks passedfloor 2/2, middle 2/2, top 3/3
  • Passed.
    Returns one whole HTML page that loads
    Floor Page test
  • Passed.
    All the original text is still on the page
    Floor Page test
  • Passed.
    On a 375 px phone the page no longer scrolls sideways
    Middle Page test
  • Passed.
    On a phone the three event cards stack, one per row
    Middle Page test
  • Passed.
    Tapping each top link shows the section heading below the header (phone and laptop)
    Top Page test
  • Passed.
    Laptop layout unchanged: header still sticky, three cards in a row, blocks in the same places
    Top Page test
  • Passed.
    No console errors and nothing loaded from outside
    Top Page test
  • Took 13 min 49 s.
  • First words after 13 min 27 s.
  • Wrote 89,032 tokens, 85,508 of them thinking.
  • $1.80 at API prices.
All numbers.
Time to finish13 min 49 s
Time to first words13 min 27 s
Input tokens2
Cached tokens3,360
Output tokens89,032
Thinking tokens85,508
Words in the answer1,137
Price at API rates$1.80

Code

F01Load more shows some posts twice and skips othersLow 7/7Max 7/7Same

What it asks for. Pastes a Python function that pages through a community board's posts, newest first, and reports that some posts show up twice while others never appear, more often on busy days. Many posts share exactly the same timestamp. It asks for the cause and a fixed function with the same name, arguments and return shape, where posts with the same time come higher id first.

Both settings passed 7 of 7 checks.

AI answer from Opus 5.5 · low effort · 2 Oct 2026

7 of 7

What was wrong

  1. The cursor only stores created_at, and the query uses <=. Every post on the next page that shares the last post's timestamp gets fetched again, so you see duplicates.
  2. The order among equal timestamps is undefined. ORDER BY created_at DESC lets SQLite return tied rows in any order, and that order can differ between queries. Some tied posts fall into the gap between pages and are never shown.
  3. Switching to < would not fix it. It would skip every remaining post with the boundary timestamp.

This happens more on busy days, and with the importer, because both produce many posts with the same timestamp.

The fix

The fix is keyset pagination on the pair (created_at, id):

  • Sort by created_at DESC, id DESC. Since id is unique, this gives a total, stable order.
  • Put both values in the cursor.
  • Ask for rows that come strictly after the cursor position in that order.
import base64
import sqlite3

MAX_LIMIT = 100
COLUMNS = "id, author, body, created_at"


def _encode_cursor(created_at, post_id):
    raw = f"{int(created_at)}:{int(post_id)}".encode("ascii")
    return base64.urlsafe_b64encode(raw).decode("ascii")


def _decode_cursor(cursor):
    try:
        raw = base64.urlsafe_b64decode(cursor.encode("ascii")).decode("ascii")
        created_at, post_id = raw.split(":")
        return int(created_at), int(post_id)
    except (ValueError, UnicodeError, AttributeError) as exc:
        raise ValueError("invalid cursor") from exc


def fetch_page(conn, cursor=None, limit=20):
    """Return (rows, next_cursor): one page of the board, newest first.

    rows is a list of (id, author, body, created_at) tuples, ordered by
    created_at DESC, then id DESC for posts sharing a created_at.
    next_cursor is an opaque string the caller hands back to get the next
    page, or None when there are no more posts.

    posts(id INTEGER PRIMARY KEY, author TEXT, body TEXT, created_at INTEGER)
    created_at is unix seconds.
    """
    limit = max(1, min(int(limit), MAX_LIMIT))

    if cursor is None:
        cur = conn.execute(
            f"SELECT {COLUMNS} FROM posts "
            "ORDER BY created_at DESC, id DESC LIMIT ?",
            (limit + 1,),
        )
    else:
        last_created_at, last_id = _decode_cursor(cursor)
        cur = conn.execute(
            f"SELECT {COLUMNS} FROM posts "
            "WHERE created_at < ? OR (created_at = ? AND id < ?) "
            "ORDER BY created_at DESC, id DESC LIMIT ?",
            (last_created_at, last_created_at, last_id, limit + 1),
        )

    rows = cur.fetchall()
    has_more = len(rows) > limit
    rows = rows[:limit]

    if has_more:
        last = rows[-1]
        next_cursor = _encode_cursor(last[3], last[0])
    else:
        next_cursor = None
    return rows, next_cursor

Notes

  • Index: add CREATE INDEX IF NOT EXISTS idx_posts_created_id ON posts(created_at DESC, id DESC); so each page is a quick index seek rather than a sort of the whole table.
  • Cursor format: the cursor is now base64 of "created_at:id". The app still just passes it back. A malformed cursor raises ValueError instead of producing a silently wrong page.
  • Old cursors: cursors issued by the old version will fail to decode. Clients will need to restart from the first page once after you deploy.
  • Alternative query: on SQLite 3.15 or later you could write the condition as WHERE (created_at, id) < (?, ?). The expanded OR form above does the same thing and works on all versions.
  • Floor2/2, 100% passed
  • Middle3/3, 100% passed
  • Top2/2, 100% passed
7 of 7 checks passedfloor 2/2, middle 3/3, top 2/2
  • Passed.
    The first page comes back correct, newest first
    Floor Tested
  • Passed.
    Keeps the return shape: string cursor, None at the end
    Floor Tested
  • Passed.
    Paging through everything shows each post exactly once
    Middle Tested
  • Passed.
    Order is newest first and, on ties, higher id first
    Middle Tested
  • Passed.
    Explains that shared created_at values cause the problem
    Middle Tested
  • Passed.
    Still correct at page sizes 1, 2 and 3
    Top Tested
  • Passed.
    New posts added at the top mid-scroll cause no repeats or gaps
    Top Tested
  • Took 15 s.
  • First words after 4.8 s.
  • Wrote 1,563 tokens, 165 of them thinking.
  • 3.8¢ at API prices.
All numbers.
Time to finish15 s
Time to first words4.8 s
Input tokens2
Cached tokens1,408
Output tokens1,563
Thinking tokens165
Words in the answer500
Price at API rates3.8¢

AI answer from Opus 5.5 · max effort · 2 Oct 2026

7 of 7

What was wrong

The sort had ties, and the cursor couldn't record where inside a tie it stopped.

  • Tied posts had no fixed order. ORDER BY created_at DESC doesn't say how to order posts with the same timestamp, so SQLite may return them in a different order from one request to the next.
  • The cursor re-sent posts. The cursor was only the last post's timestamp, T. The next request couldn't tell which posts at T had already been shown, and created_at <= T sent all of them again. Those are the duplicates. Switching to < would skip the unshown ones instead.
  • Large ties stopped the scroll. If more than limit posts share a timestamp, which the importer makes common, the whole page is that timestamp and next_cursor comes back as T again. Every later request returns posts from that same timestamp, so the scroll never gets past T and older posts never show up.

Busy days put more posts in the same second, so there are more ties.

The fix

Sort by created_at DESC, id DESC so every post has exactly one position. Put both values in the cursor so the next page starts strictly after that exact post. Because id is unique, nothing repeats or gets skipped, however many posts share a timestamp. id alone can't be the cursor because it doesn't follow created_at.

import sqlite3

MAX_LIMIT = 100
COLUMNS = "id, author, body, created_at"


def fetch_page(conn, cursor=None, limit=20):
    """Return (rows, next_cursor): one page of the board, newest first.

    Posts with the same created_at come highest id first, so every post
    has exactly one place in the order.

    rows is a list of (id, author, body, created_at) tuples.
    next_cursor is an opaque string the caller hands back to get the next
    page, or None when there are no more posts.

    posts(id INTEGER PRIMARY KEY, author TEXT, body TEXT, created_at INTEGER)
    created_at is unix seconds.
    """
    limit = max(1, min(int(limit), MAX_LIMIT))

    where, params = "", ()
    if cursor is not None:
        ts_part, sep, id_part = str(cursor).partition(":")
        ts = int(ts_part)
        if sep:
            # Same as (created_at, id) < (?, ?), written out so it works on
            # any SQLite and the leading "created_at <= ?" can use an index.
            where = "WHERE created_at <= ? AND (created_at < ? OR id < ?) "
            params = (ts, ts, int(id_part))
        else:
            # Timestamp-only cursor handed out by the old version. Accepted so
            # scrolls in progress during the deploy keep working (posts at that
            # one timestamp may repeat once). Safe to remove later.
            where = "WHERE created_at <= ? "
            params = (ts,)

    rows = conn.execute(
        f"SELECT {COLUMNS} FROM posts {where}"
        "ORDER BY created_at DESC, id DESC LIMIT ?",
        params + (limit + 1,),
    ).fetchall()

    has_more = len(rows) > limit
    rows = rows[:limit]

    if has_more:
        last = rows[-1]
        next_cursor = f"{last[3]}:{last[0]}"  # "created_at:id"
    else:
        next_cursor = None
    return rows, next_cursor

Notes

  • Index: If there isn't one yet, add an index on posts(created_at). In SQLite every index entry ends with the rowid, which is your id. So that index already matches created_at DESC, id DESC, and each page becomes a short index scan instead of a sort of the whole table.
  • Old cursors: Clients that are mid-scroll when you deploy still hold the old timestamp-only cursors. The function accepts one of those for a single request, then hands back a new-style cursor. A few posts may repeat once, but open scrolls don't break. Remove that branch once the old cursors are gone.
  • Expected behaviour: A cursor only moves down the list. New posts, and back-filled posts dated within the part someone has already scrolled past, appear on that reader's next refresh from the top. That's normal for cursor paging, not this bug.
  • Floor2/2, 100% passed
  • Middle3/3, 100% passed
  • Top2/2, 100% passed
7 of 7 checks passedfloor 2/2, middle 3/3, top 2/2
  • Passed.
    The first page comes back correct, newest first
    Floor Tested
  • Passed.
    Keeps the return shape: string cursor, None at the end
    Floor Tested
  • Passed.
    Paging through everything shows each post exactly once
    Middle Tested
  • Passed.
    Order is newest first and, on ties, higher id first
    Middle Tested
  • Passed.
    Explains that shared created_at values cause the problem
    Middle Tested
  • Passed.
    Still correct at page sizes 1, 2 and 3
    Top Tested
  • Passed.
    New posts added at the top mid-scroll cause no repeats or gaps
    Top Tested
  • Took 6 min 19 s.
  • First words after 6 min 10 s.
  • Wrote 40,967 tokens, 39,522 of them thinking.
  • 83¢ at API prices.
All numbers.
Time to finish6 min 19 s
Time to first words6 min 10 s
Input tokens2
Cached tokens1,407
Output tokens40,967
Thinking tokens39,522
Words in the answer631
Price at API rates83¢
F02The search box shows results for an old queryLow 7/7Max 7/7Same

What it asks for. Pastes a TypeScript controller for a search-as-you-type box with two bugs: typing fast can leave results for an earlier query on screen, and the loading spinner disappears too early. The API client cannot cancel requests. It asks for the whole fixed file with the same exports, the spinner on exactly while the newest search is loading, and code that Node can run with its built-in TypeScript support.

Both settings passed 7 of 7 checks.

AI answer from Opus 5.5 · low effort · 2 Oct 2026

7 of 7

Here's the fixed file:

export interface SearchOptions {
  // The API client. It returns a Promise and can't be cancelled.
  fetchResults: (query: string) => Promise<string[]>;
  // Draws the list. Pass an error as the second argument to show the error state.
  render: (results: string[], error?: Error) => void;
  // Shows or hides the spinner.
  setLoading: (loading: boolean) => void;
}

export function createSearch({ fetchResults, render, setLoading }: SearchOptions) {
  // Increments on every input. Only the input holding the current
  // value may touch the list or the spinner.
  let latestRequestId = 0;

  return {
    // Called on every keystroke with the current text of the box.
    async onInput(raw: string): Promise<void> {
      const requestId = ++latestRequestId;
      const query = raw.trim();

      if (query === "") {
        // This input is now the newest, so any request still running is stale.
        setLoading(false);
        render([]);
        return;
      }

      setLoading(true);

      let results: string[];
      try {
        results = await fetchResults(query);
      } catch (err) {
        if (requestId !== latestRequestId) return; // a newer input took over
        setLoading(false);
        render([], err instanceof Error ? err : new Error(String(err)));
        return;
      }

      if (requestId !== latestRequestId) return; // a newer input took over
      setLoading(false);
      render(results);
    },
  };
}

What was wrong

  1. Stale results. Every call to onInput rendered whatever its own request returned, whenever that request finished. Requests can finish out of order. So if you typed ab and then abc, and the ab request came back last, its results overwrote the abc list. The empty-box case had the same problem: an older request finishing after the box was cleared would fill the list again.
  2. Spinner turning off too early. Every call ran setLoading(false) in its finally. When any older request finished, it hid the spinner, even though the newest request was still loading.

The fix

Each call takes a number from a counter that goes up on every input, including empty ones. After the await, the call checks whether it is still the newest. If it isn't, it does nothing: it doesn't render and it doesn't change the spinner. Older requests still run to the end, since we can't cancel them, but their results are ignored.

Only the newest call can turn the spinner off. It does that right as it shows its results or error. Because emptying the box also takes a new number, it turns the spinner off, clears the list, and makes every earlier request stale.

I also moved render(results) out of the try. Before, if render itself threw, that error was caught and shown as a search error.

The file uses only type annotations, so Node's type stripping can run it without a compile step.

  • Floor2/2, 100% passed
  • Middle2/2, 100% passed
  • Top3/3, 100% passed
7 of 7 checks passedfloor 2/2, middle 2/2, top 3/3
  • Passed.
    The file loads under type stripping and a plain search works
    Floor Tested
  • Passed.
    A failing search still shows the error and hides the spinner
    Floor Tested
  • Passed.
    Only the newest query's results are left on screen
    Middle Tested
  • Passed.
    The spinner stays on until the newest request finishes, then goes off
    Middle Tested
  • Passed.
    An old request that fails does not touch the newer results
    Top Tested
  • Passed.
    Emptying the box clears the list, and late answers don't bring it back
    Top Tested
  • Passed.
    If the newest search fails, the error is shown and stays
    Top Tested
  • Took 9.3 s.
  • First words after 1.5 s.
  • Wrote 944 tokens.
  • 2.6¢ at API prices.
All numbers.
Time to finish9.3 s
Time to first words1.5 s
Input tokens2
Cached tokens1,359
Output tokens944
Thinking tokens0
Words in the answer442
Price at API rates2.6¢

AI answer from Opus 5.5 · max effort · 2 Oct 2026

7 of 7

export interface SearchOptions {
  // The API client. It returns a Promise and can't be cancelled.
  fetchResults: (query: string) => Promise<string[]>;
  // Draws the list. Pass an error as the second argument to show the error state.
  render: (results: string[], error?: Error) => void;
  // Shows or hides the spinner.
  setLoading: (loading: boolean) => void;
}

export function createSearch({ fetchResults, render, setLoading }: SearchOptions) {
  // Bumped on every input, including clearing the box. Only the newest input
  // may change the list or the spinner. It lives in here rather than at module
  // level so that two search boxes don't interfere with each other.
  let latestRequestId = 0;

  return {
    // Called on every keystroke with the current text of the box.
    async onInput(raw: string): Promise<void> {
      const requestId = ++latestRequestId;
      const isLatest = () => requestId === latestRequestId;
      const query = raw.trim();

      if (query === "") {
        // Bumping the id above has already made every request still in
        // flight stale, so none of them can bring old results back or touch
        // the spinner when they finish.
        render([]);
        setLoading(false);
        return;
      }

      setLoading(true);
      try {
        const results = await fetchResults(query);
        // Old requests can't be cancelled, so they still finish. If a newer
        // input has arrived since this one started, drop the response.
        if (!isLatest()) return;
        render(results);
      } catch (err) {
        if (!isLatest()) return;
        render([], err instanceof Error ? err : new Error(String(err)));
      } finally {
        // Only the newest search turns the spinner off.
        if (isLatest()) setLoading(false);
      }
    },
  };
}

What was wrong

Every keystroke starts its own request. The requests can't be cancelled, and they don't always finish in the order they started. The old code treated every response as if it belonged to what is in the box now:

  • Stale results: whichever request finished last made the final render call. If the request for "ca" came back after the one for "cat", it overwrote the newer results. An error from an old request could do the same.
  • Spinner off too early: each request called setLoading(false) in its own finally. So the first older request to finish hid the spinner while the newest one was still loading.
  • Clearing the box: it cleared the list but didn't hide the spinner. A request still in flight could then paint its old results back into the empty list.

The fix

Each call to onInput takes a new number from a counter, including the call that clears the box. When a request finishes, it only renders and hides the spinner if its number is still the latest. Otherwise a newer input is in charge and the response is thrown away. Old requests still run to the end, but they can't touch the list or the spinner any more. Because of that, the empty-box branch now hides the spinner itself.

The exported API is unchanged. fetchResults is still called on every non-empty input, as before, and there's no syntax that needs a compile step. When you add debouncing later, keep this check: debouncing makes overlapping requests rarer, but it doesn't stop them.

  • Floor2/2, 100% passed
  • Middle2/2, 100% passed
  • Top3/3, 100% passed
7 of 7 checks passedfloor 2/2, middle 2/2, top 3/3
  • Passed.
    The file loads under type stripping and a plain search works
    Floor Tested
  • Passed.
    A failing search still shows the error and hides the spinner
    Floor Tested
  • Passed.
    Only the newest query's results are left on screen
    Middle Tested
  • Passed.
    The spinner stays on until the newest request finishes, then goes off
    Middle Tested
  • Passed.
    An old request that fails does not touch the newer results
    Top Tested
  • Passed.
    Emptying the box clears the list, and late answers don't bring it back
    Top Tested
  • Passed.
    If the newest search fails, the error is shown and stays
    Top Tested
  • Took 2 min 49 s.
  • First words after 2 min 42 s.
  • Wrote 18,711 tokens, 17,646 of them thinking.
  • 38¢ at API prices.
All numbers.
Time to finish2 min 49 s
Time to first words2 min 42 s
Input tokens2
Cached tokens1,358
Output tokens18,711
Thinking tokens17,646
Words in the answer520
Price at API rates38¢
F03Some subscriptions renew a day earlyLow 7/7Max 7/7Same

What it asks for. Pastes a JavaScript function that lists a subscription's monthly renewal dates, with its rules in a comment, and reports two symptoms: customers far from UTC renew a day early, and a customer who signed up on the last day of January has been charged on the 28th of every month since. It asks for the function fixed for Node 22 with no libraries, and a short note on what was wrong.

Both settings passed 7 of 7 checks.

AI answer from Opus 5.5 · low effort · 2 Oct 2026

7 of 7

Bugs: uses UTC date not local date; mutates d so day drifts (31→28 sticks). Fix: get local Y/M/D via Intl.DateTimeFormat, then compute pure calendar math.

// Monthly renewal dates for a subscription.
//
// signupIso  : the moment the customer signed up, as an ISO string in UTC,
//              e.g. "2025-01-31T23:30:00Z"
// timeZone   : the customer's IANA time zone, e.g. "Pacific/Auckland"
// count      : how many upcoming renewals to return
// returns    : an array of count local calendar dates, "YYYY-MM-DD", in the
//              customer's time zone, earliest first
//
// Rules:
//  - The first renewal is one month after the signup, not on the signup day.
//  - A renewal falls on the same day of the month as the signup's local date
//    in the customer's time zone.
//  - If a month is too short for that day, use its last day.
//  - Always count from the original signup day, never from the previous renewal.
export function renewalDates(signupIso, timeZone, count) {
  const signup = new Date(signupIso);
  if (Number.isNaN(signup.getTime())) {
    throw new RangeError(`Invalid signup date: ${signupIso}`);
  }

  // Signup's calendar date in the customer's time zone.
  const parts = new Intl.DateTimeFormat("en-US", {
    timeZone,
    year: "numeric",
    month: "numeric",
    day: "numeric",
  }).formatToParts(signup);
  const get = (type) => Number(parts.find((p) => p.type === type).value);
  const year = get("year");
  const month = get("month") - 1; // 0-based
  const day = get("day");

  const pad = (n, len = 2) => String(n).padStart(len, "0");
  const dates = [];

  for (let i = 1; i <= count; i++) {
    // Always offset from the original signup month, never the previous renewal.
    const total = month + i;
    const y = year + Math.floor(total / 12);
    const m = ((total % 12) + 12) % 12;
    // Day 0 of the next month = last day of month m.
    const lastDay = new Date(Date.UTC(y, m + 1, 0)).getUTCDate();
    const d = Math.min(day, lastDay);
    dates.push(`${pad(y, 4)}-${pad(m + 1)}-${pad(d)}`);
  }
  return dates;
}

What was wrong

  1. Wrong time zone. It read the day with getUTCDate(), so it used the signup's UTC date instead of the customer's local date. A morning signup on the 1st in Auckland is still the previous day in UTC (e.g. the 30th or 31st), so renewals landed a day early. The fix gets the local date with Intl.DateTimeFormat in the customer's timeZone.
  2. Counting from the previous renewal. It changed the same Date object on every pass and re-read the day from it. Once February clamped the 31st to the 28th, every later month started from 28. The fix keeps the original signup day and works out each renewal as signup month + i. It clamps only that month's result to the month's last day.

It also now does pure calendar arithmetic with no time-of-day involved, so DST changes can't move a date.

  • Floor2/2, 100% passed
  • Middle2/2, 100% passed
  • Top3/3, 100% passed
7 of 7 checks passedfloor 2/2, middle 2/2, top 3/3
  • Passed.
    Mid-month signups in UTC get the right dates
    Floor Tested
  • Passed.
    Returns exactly count dates as YYYY-MM-DD, in order
    Floor Tested
  • Passed.
    Uses the customer's local date (Auckland, Kolkata, LA, London)
    Middle Tested
  • Passed.
    Explains both causes: the UTC date and drifting month to month
    Middle Read
  • Passed.
    Signups on the 29th to 31st keep their day after short months
    Top Tested
  • Passed.
    Leap and non-leap Februaries are handled, including 2100
    Top Tested
  • Passed.
    Signups just before or after a clock change get the right local date
    Top Tested
  • Took 11 s.
  • First words after 2.1 s.
  • Wrote 1,127 tokens.
  • 2.9¢ at API prices.
All numbers.
Time to finish11 s
Time to first words2.1 s
Input tokens2
Cached tokens1,382
Output tokens1,127
Thinking tokens0
Words in the answer472
Price at API rates2.9¢

AI answer from Opus 5.5 · max effort · 2 Oct 2026

7 of 7

// Monthly renewal dates for a subscription.
//
// signupIso  : the moment the customer signed up, as an ISO string in UTC,
//              e.g. "2025-01-31T23:30:00Z"
// timeZone   : the customer's IANA time zone, e.g. "Pacific/Auckland"
// count      : how many upcoming renewals to return
// returns    : an array of count local calendar dates, "YYYY-MM-DD", in the
//              customer's time zone, earliest first
//
// Rules:
//  - The first renewal is one month after the signup, not on the signup day.
//  - A renewal falls on the same day of the month as the signup's local date
//    in the customer's time zone.
//  - If a month is too short for that day, use its last day.
//  - Always count from the original signup day, never from the previous renewal.
export function renewalDates(signupIso, timeZone, count) {
  const signup = new Date(signupIso);
  if (Number.isNaN(signup.getTime())) {
    throw new RangeError(`Invalid signup time: ${signupIso}`);
  }

  // The signup's calendar date as the customer saw it, in their own time zone.
  const parts = new Intl.DateTimeFormat("en-US", {
    timeZone,
    year: "numeric",
    month: "numeric",
    day: "numeric",
  }).formatToParts(signup);
  const field = (type) => Number(parts.find((p) => p.type === type).value);
  const signupYear = field("year");
  const signupMonth = field("month") - 1; // 0-11
  const signupDay = field("day");

  // From here on these are plain calendar dates: no time zones, no DST.
  const pad = (n, width) => String(n).padStart(width, "0");
  const dates = [];
  for (let i = 1; i <= count; i++) {
    // Always step i months from the original signup, never from the last renewal.
    const monthIndex = signupMonth + i;
    const year = signupYear + Math.floor(monthIndex / 12);
    const month = monthIndex % 12; // 0-11
    const lastDay = new Date(Date.UTC(year, month + 1, 0)).getUTCDate();
    const day = Math.min(signupDay, lastDay);
    dates.push(`${pad(year, 4)}-${pad(month + 1, 2)}-${pad(day, 2)}`);
  }
  return dates;
}

What was wrong

  1. timeZone was never used. The signup day came from getUTCDate(), which gives the date in UTC. Auckland is 12–13 hours ahead of UTC. So a signup any time before about midday on the 1st is still the previous day (for example the 31st) in UTC, and the renewals landed a day early. Customers west of UTC who sign up in the evening would be renewed a day late. The fix reads the signup's local date in the customer's zone with Intl.DateTimeFormat. After that it only does year, month and day arithmetic.
  2. It counted from the previous renewal. day was read again from d on every pass of the loop, and by then d held the renewal it had just produced. Once February clamped 31 to 28, every later pass read 28, so the date stayed on the 28th for good. The fix takes the day from the signup once. Renewal i is the signup month plus i, clamped to that month's length.

Quick check:

renewalDates("2025-01-31T20:00:00Z", "Pacific/Auckland", 3);
// signed up 1 Feb, 09:00 local -> ["2025-03-01", "2025-04-01", "2025-05-01"]

renewalDates("2025-01-31T10:00:00Z", "Europe/London", 4);
// -> ["2025-02-28", "2025-03-31", "2025-04-30", "2025-05-31"]

The old code ignored timeZone, so check that every caller really passes a valid IANA zone:

  • An invalid zone, or null, now throws a RangeError.
  • A missing one (undefined) silently uses the server's time zone.
  • Floor2/2, 100% passed
  • Middle2/2, 100% passed
  • Top3/3, 100% passed
7 of 7 checks passedfloor 2/2, middle 2/2, top 3/3
  • Passed.
    Mid-month signups in UTC get the right dates
    Floor Tested
  • Passed.
    Returns exactly count dates as YYYY-MM-DD, in order
    Floor Tested
  • Passed.
    Uses the customer's local date (Auckland, Kolkata, LA, London)
    Middle Tested
  • Passed.
    Explains both causes: the UTC date and drifting month to month
    Middle Read
  • Passed.
    Signups on the 29th to 31st keep their day after short months
    Top Tested
  • Passed.
    Leap and non-leap Februaries are handled, including 2100
    Top Tested
  • Passed.
    Signups just before or after a clock change get the right local date
    Top Tested
  • Took 2 min 0 s.
  • First words after 1 min 52 s.
  • Wrote 13,786 tokens, 12,410 of them thinking.
  • 28¢ at API prices.
All numbers.
Time to finish2 min 0 s
Time to first words1 min 52 s
Input tokens2
Cached tokens1,381
Output tokens13,786
Thinking tokens12,410
Words in the answer540
Price at API rates28¢
F04Review a pull request before mergingLow 6/7Max 7/7Max +1

What it asks for. Pastes a pull request of about 170 lines that adds invoice endpoints to an Express and TypeScript API, and asks for a review before merging that lists what needs fixing in order of importance plus other points worth noting, in under 400 words.

Max effort passed 1 more check than low.

AI answer from Opus 5.5 · low effort · 2 Oct 2026

6 of 7

Must fix before merging

1. Any logged-in user can read any invoice (IDOR). GET /invoices/:id calls findInvoiceById(id) with no account check, so anyone with a valid session can fetch another account's invoice by guessing or enumerating IDs. Scope the query to the account:

export async function findInvoiceById(id: string, accountId: string) {
  const { rows } = await db.query(
    `SELECT ${COLUMNS} FROM invoices WHERE id = $1 AND account_id = $2`,
    [id, accountId],
  );
  return rows[0] ?? null;
}

Keep returning 404 rather than 403 when the account doesn't match, so the endpoint doesn't reveal which IDs exist.

2. to is not inclusive, despite what the code comment and docs say. created_at < $3 with to=2026-01-31 compares against midnight at the start of the 31st, so that whole day is excluded. Use created_at < ($3::date + 1) or add one day in the route.

3. Invalid dates cause 500s. The regex accepts values like 2026-02-30 and 2026-13-99. Postgres rejects them, and the handler surfaces that as an error instead of a 400. Check that the value is a real calendar date before querying.

4. Async errors may not be handled. If you're on Express 4, a rejected promise in these handlers (DB down, bad input) is never passed to your error middleware. The request hangs and you get an unhandled rejection. Wrap the handlers, or follow whatever pattern receipts.ts uses. Express 5 handles this for you.

Worth checking

  • The fmtMoney → formatMoney rename is unrelated to invoices and breaks any caller this diff doesn't touch. Grep for fmtMoney (for example in account.ts) and confirm tsc passes. Consider splitting the rename into its own PR.
  • Time zones: "day" boundaries depend on the column type (timestamp vs timestamptz) and the session time zone. Decide whose midnight counts (UTC or the account's) and document it.
  • No pagination or range limit: a very wide from/to returns everything in one response. Consider adding limit/cursor support or capping the range.
  • Unstable ordering: sorting by amount or created_at alone gives an arbitrary order for ties. Add , id as a tiebreaker, which you'll need anyway for pagination.
  • Silent fallbacks: an invalid sort/dir quietly uses the defaults, and from > to silently returns an empty list. Returning 400 would be friendlier, but this is your call.
  • formatMoney assumes two decimal places, which is wrong for currencies like JPY or KWD. This predates the PR but now affects more endpoints.

Looks good

  • The sort whitelist using Object.hasOwn and the hard-coded direction is safe from SQL injection.
  • The date and account filters are properly parameterized.
  • requireLogin covers the whole router.
  • The docs match the intended behaviour, once fix 2 makes the code match them.
  • Floor1/2, 50% passed
  • Middle2/2, 100% passed
  • Top3/3, 100% passed
6 of 7 checks passedfloor 1/2, middle 2/2, top 3/3
  • Passed.
    Gives a clear verdict: do not merge as it is
    Floor Counted
  • Missed.
    Stays under the 400-word limit429 words
    Floor Counted
  • Passed.
    Spots that any signed-in user can read another account's invoice
    Middle Counted
  • Passed.
    Gives a concrete fix: scope the lookup by account or return 404/403
    Middle Counted
  • Passed.
    Spots that the end date is left out although the docs say inclusive
    Top Counted
  • Passed.
    Puts the invoice access hole first, ahead of the other issues
    Top Read
  • Passed.
    Does not call the ORDER BY string building an injection risk
    Top Read
  • Took 16 s.
  • First words after 6.2 s.
  • Wrote 1,510 tokens, 428 of them thinking.
  • 4.6¢ at API prices.
All numbers.
Time to finish16 s
Time to first words6.2 s
Input tokens2
Cached tokens3,191
Output tokens1,510
Thinking tokens428
Words in the answer458
Price at API rates4.6¢

AI answer from Opus 5.5 · max effort · 2 Oct 2026

7 of 7

Not ready yet: there's an authorization hole and a date-range bug.

Must fix before merging

  1. Any logged-in user can read any invoice. GET /invoices/:id looks up by id alone and never checks the account. Unguessable IDs don't fix this, because IDs leak through links and logs. Change it to findInvoiceById(id, accountId) with WHERE id = $1 AND account_id = $2, and pass req.user.accountId. Putting the check in the query means no caller can skip it. Invoices from other accounts then return 404, which also hides that they exist.
  2. to isn't inclusive. The docs and comment say it is, but created_at < $3 with to=2026-01-31 excludes all of Jan 31. from == to always returns nothing. Use created_at < $3::date + 1.
  3. Bad input makes Postgres throw. The regex accepts 2026-02-29 (2026 isn't a leap year) or 2026-13-45. Postgres rejects them, so the request returns a 500.
    • On Express 4 without an async wrapper, it's worse: an unhandled rejection that hangs the request or crashes the process.
    • Check that it's a real calendar date and return 400. Parse it as UTC, then reject NaN or anything that doesn't round-trip.
    • The same applies to :id if it's a uuid column: /invoices/abc throws, so validate it and return 404.
  4. Tests. The diff has none. At least cover:
    • another account's invoice returns 404
    • an invoice dated on to is included
    • invalid dates return 400

Worth knowing

  • The list query is scoped to the account, and the sort whitelist is solid. Object.hasOwn rules out prototype keys and dir maps to fixed values, so the interpolated ORDER BY is safe.
  • The fmtMoney rename only updates receipts.ts. Make sure nothing else (account.ts? tests?) still imports it.
  • There's no limit or pagination, so from=0001-01-01&to=9999-12-31 returns the account's whole history. Add a page size or cap the range, and check there's an index on (account_id, created_at).
  • Day boundaries follow the database session's time zone. Decide what a "day" means (UTC?) and document it.
  • Add a tiebreaker (ORDER BY total_cents DESC, id) so ties sort consistently. Pagination will need it.
  • Unknown sort/dir values silently fall back to the defaults, and from > to returns an empty list. Returning 400s would surface client bugs.
  • Docs: mark from/to as required, and say :id only returns the caller's own invoices.
  • sort=amount compares raw cents across currencies.
  • With node-postgres, created_at arrives as a Date, not a string, unless you've changed the type parser.
  • Floor2/2, 100% passed
  • Middle2/2, 100% passed
  • Top3/3, 100% passed
7 of 7 checks passedfloor 2/2, middle 2/2, top 3/3
  • Passed.
    Gives a clear verdict: do not merge as it is
    Floor Counted
  • Passed.
    Stays under the 400-word limit
    Floor Counted
  • Passed.
    Spots that any signed-in user can read another account's invoice
    Middle Counted
  • Passed.
    Gives a concrete fix: scope the lookup by account or return 404/403
    Middle Counted
  • Passed.
    Spots that the end date is left out although the docs say inclusive
    Top Counted
  • Passed.
    Puts the invoice access hole first, ahead of the other issues
    Top Read
  • Passed.
    Does not call the ORDER BY string building an injection risk
    Top Read
  • Took 5 min 35 s.
  • First words after 5 min 30 s.
  • Wrote 39,330 tokens, 38,344 of them thinking.
  • 80¢ at API prices.
All numbers.
Time to finish5 min 35 s
Time to first words5 min 30 s
Input tokens2
Cached tokens3,190
Output tokens39,330
Thinking tokens38,344
Words in the answer418
Price at API rates80¢
F05SQL: which customers left and came backLow 7/7Max 7/7Same

What it asks for. Gives the schema of a subscriptions database and asks for one SQLite query that lists each gap in a customer's access that ended with them returning, with the last day of access, the day it came back and the number of days without it. Plan changes can make periods touch, overlap or sit inside one another, and none of that counts as a gap. A small example with its expected output is included.

Both settings passed 7 of 7 checks.

AI answer from Opus 5.5 · low effort · 2 Oct 2026

7 of 7

Query

WITH ordered AS (
  SELECT
    sp.customer_id,
    sp.start_date,
    -- Latest access day covered by any EARLIER period of this customer.
    -- NULL end_date (still active) is treated as "covers everything after".
    MAX(COALESCE(sp.end_date, '9999-12-31')) OVER (
      PARTITION BY sp.customer_id
      ORDER BY sp.start_date, sp.id
      ROWS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING
    ) AS prev_covered_until
  FROM subscription_periods AS sp
)
SELECT
  c.name                                         AS name,
  o.prev_covered_until                           AS last_access,
  o.start_date                                   AS came_back,
  CAST(julianday(o.start_date)
       - julianday(o.prev_covered_until) - 1 AS INTEGER) AS days_without
FROM ordered AS o
JOIN customers AS c ON c.id = o.customer_id
WHERE o.start_date > date(o.prev_covered_until, '+1 day')
ORDER BY c.name, came_back, c.id;

How it works

  1. Sort each customer's periods by date. The window orders by start_date, so the order of the ids doesn't matter. id is only used to break ties between periods that start on the same day.
  2. Track how far access already reaches. For each period, prev_covered_until is the latest end_date among all periods that started before it. Using a running MAX instead of just the previous row's end date matters in two cases:
    • A short period that sits inside a longer one doesn't hide the longer one's end date.
    • Overlapping periods are handled correctly.
    An active period (NULL end date) counts as '9999-12-31'. Because of that, nothing that comes after an active period can ever look like a gap.
  3. Find the gaps. A period starts a gap only if it begins after the day following prev_covered_until. Periods that touch, start on the same day, or overlap all fail that test, so they aren't reported.
    • A customer's first period has no earlier periods, so prev_covered_until is NULL. The comparison is then NULL and the row is excluded.
    • A customer who left and never came back has no later period, so they produce no row.
  4. Count the days. julianday(came_back) - julianday(last_access) - 1 gives the number of whole days without access. For 2024-06-30 → 2024-07-10 that is 9.
  5. Sort. ORDER BY name uses SQLite's default BINARY collation, which is plain alphabetical order. After that, rows are sorted by came_back, then by customer id.

On your sample data, the query returns exactly the three expected rows. Bruno's overlapping periods (02-01 to 02-29, then 02-20 onward) don't count as a gap.

  • Floor2/2, 100% passed
  • Middle2/2, 100% passed
  • Top3/3, 100% passed
7 of 7 checks passedfloor 2/2, middle 2/2, top 3/3
  • Passed.
    The query runs and returns the four named columns
    Floor Tested
  • Passed.
    It gets the example in the question right
    Floor Tested
  • Passed.
    Periods that touch or overlap are not counted as gaps
    Middle Tested
  • Passed.
    Several gaps per customer, same-name customers, sort order
    Middle Tested
  • Passed.
    A period inside a longer one does not hide or invent a gap
    Top Tested
  • Passed.
    Open-ended (NULL end) periods never produce a gap after them
    Top Tested
  • Passed.
    Days without access is exact across month, leap and year ends
    Top Tested
  • Took 14 s.
  • First words after 6.2 s.
  • Wrote 1,451 tokens, 462 of them thinking.
  • 3.7¢ at API prices.
All numbers.
Time to finish14 s
Time to first words6.2 s
Input tokens2
Cached tokens1,682
Output tokens1,451
Thinking tokens462
Words in the answer380
Price at API rates3.7¢

AI answer from Opus 5.5 · max effort · 2 Oct 2026

7 of 7

WITH periods AS (
  SELECT
    customer_id,
    start_date,
    -- latest access day among all of this customer's periods that start earlier
    -- (an open-ended period counts as never ending)
    MAX(COALESCE(end_date, '9999-12-31')) OVER (
      PARTITION BY customer_id
      ORDER BY start_date, id
      ROWS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING
    ) AS prev_end
  FROM subscription_periods
  WHERE end_date IS NULL OR end_date >= start_date   -- ignore rows that grant no days
)
SELECT
  c.name                                                                AS name,
  p.prev_end                                                            AS last_access,
  p.start_date                                                          AS came_back,
  CAST(julianday(p.start_date) - julianday(p.prev_end) AS INTEGER) - 1  AS days_without
FROM periods AS p
JOIN customers AS c ON c.id = p.customer_id
WHERE julianday(p.start_date) - julianday(p.prev_end) > 1
ORDER BY name, came_back, c.id;

How it works

  • Running maximum, not the previous row. The query sorts each customer's periods by start_date. For each period it finds the latest end_date among all periods sorted before it, using a window MAX whose frame stops one row before the current row.
    • Comparing against this maximum instead of the previous row's end date is what makes overlaps, same-day starts and nested periods harmless. A short period inside a long one can't lower the maximum.
    • A NULL end date counts as '9999-12-31'. So once a customer has an open period, nothing after it can look like a gap.
    • id is only a tie-breaker to make the order deterministic. It is never used to decide what came first in time.
  • Detecting a gap. A period opens a gap if it starts more than one day after that running maximum. Touching periods differ by exactly 1 day, so they don't count.
    • The running maximum is last_access.
    • The period's start is came_back.
    • days_without is the day difference minus 1.
    • julianday of a plain date always ends in .5, so the difference is an exact whole number and the cast to INTEGER is safe.
  • One row per gap. A gap is only reported when a later period starts, so customers who left and never came back produce no row. If two periods start on the same day right after a gap, only the first one reports it. The second sees the first one's end date in its running maximum.
  • The end_date >= start_date filter is only a safeguard against malformed rows that grant no access days. With clean data it changes nothing.
  • Sorting. ORDER BY name uses SQLite's default case-sensitive comparison. If some names start with a lowercase letter, use ORDER BY name COLLATE NOCASE, came_back, c.id instead.

With your sample data this returns exactly the three rows you listed.

  • Floor2/2, 100% passed
  • Middle2/2, 100% passed
  • Top3/3, 100% passed
7 of 7 checks passedfloor 2/2, middle 2/2, top 3/3
  • Passed.
    The query runs and returns the four named columns
    Floor Tested
  • Passed.
    It gets the example in the question right
    Floor Tested
  • Passed.
    Periods that touch or overlap are not counted as gaps
    Middle Tested
  • Passed.
    Several gaps per customer, same-name customers, sort order
    Middle Tested
  • Passed.
    A period inside a longer one does not hide or invent a gap
    Top Tested
  • Passed.
    Open-ended (NULL end) periods never produce a gap after them
    Top Tested
  • Passed.
    Days without access is exact across month, leap and year ends
    Top Tested
  • Took 1 min 56 s.
  • First words after 1 min 49 s.
  • Wrote 12,052 tokens, 11,042 of them thinking.
  • 25¢ at API prices.
All numbers.
Time to finish1 min 56 s
Time to first words1 min 49 s
Input tokens2
Cached tokens1,681
Output tokens12,052
Thinking tokens11,042
Words in the answer430
Price at API rates25¢
F06A contacts import that survives real CSV filesLow 9/9Max 9/9Same

What it asks for. Asks for a Python function, standard library only, that imports contacts from CSV files exported by many different tools and returns each contact's name, email and phone. The files vary in header names, comma or semicolon separators, a byte order mark, quoted fields with line breaks, Windows line endings and older files in Windows-1252. Rows without an email are skipped, and a repeated email keeps its first row.

Both settings passed 9 of 9 checks.

AI answer from Opus 5.5 · low effort · 2 Oct 2026

9 of 9

import csv
import io

_NAME_HEADERS = {"name", "full name", "contact name"}
_EMAIL_HEADERS = {"email", "e-mail", "email address", "e-mail address"}
_PHONE_HEADERS = {"phone", "phone number", "mobile", "mobile phone", "telephone"}


def _decode(data):
    if data.startswith(b"\xef\xbb\xbf"):
        data = data[3:]
    try:
        return data.decode("utf-8")
    except UnicodeDecodeError:
        # Old Windows tool. A few bytes are undefined in cp1252, so replace them.
        return data.decode("cp1252", errors="replace")


def _detect_delimiter(text):
    # Count separators outside quotes on the first non-blank logical line (the header).
    commas = semicolons = 0
    in_quotes = False
    seen_content = False
    for ch in text:
        if ch == '"':
            in_quotes = not in_quotes
        elif not in_quotes:
            if ch == "\n":
                if seen_content:
                    break
                continue
            if ch == ",":
                commas += 1
            elif ch == ";":
                semicolons += 1
            if not ch.isspace():
                seen_content = True
    return ";" if semicolons > commas else ","


def _norm_header(h):
    return " ".join(h.strip().lower().split())


def import_contacts(path):
    with open(path, "rb") as f:
        text = _decode(f.read())

    # Normalise line endings so line breaks inside quoted fields become "\n".
    text = text.replace("\r\n", "\n").replace("\r", "\n")
    if not text.strip():
        return []

    reader = csv.reader(io.StringIO(text, newline=""),
                        delimiter=_detect_delimiter(text))

    # The header is the first row that is not blank.
    header = None
    for row in reader:
        if any(cell.strip() for cell in row):
            header = row
            break
    if header is None:
        return []

    name_idx = email_idx = phone_idx = None
    for i, h in enumerate(header):
        key = _norm_header(h)
        if key in _NAME_HEADERS and name_idx is None:
            name_idx = i
        elif key in _EMAIL_HEADERS and email_idx is None:
            email_idx = i
        elif key in _PHONE_HEADERS and phone_idx is None:
            phone_idx = i
    if email_idx is None:
        return []

    def cell(row, idx):
        if idx is None or idx >= len(row):
            return ""
        return row[idx].strip()

    contacts = []
    seen = set()
    for row in reader:
        email = cell(row, email_idx).lower()
        if not email or email in seen:
            continue
        seen.add(email)
        contacts.append({
            "name": cell(row, name_idx),
            "email": email,
            "phone": cell(row, phone_idx),
        })
    return contacts

How it works

  • Decoding: The function reads the file as bytes and removes a UTF-8 BOM if there is one. It then decodes the text as UTF-8 and falls back to Windows-1252 if that fails.
  • Line endings: All line endings are turned into \n, so line breaks inside quoted fields come out as a single \n.
  • Separator: It counts commas and semicolons in the header line, ignoring any inside quotes, and uses whichever appears more often.
  • Columns: csv.reader handles quoting, doubled quotes and multi-line fields. The header names are lower-cased and their spacing is normalised, then matched against the accepted names to find each column's position.
  • Rows: Each data row is read by position, so short rows give empty strings and extra cells are ignored. Rows with no email, including blank rows and rows of only separators, are skipped. A set of emails already seen drops duplicates and keeps the first one, in file order.
  • Missing email column: If the file has no email column, the function returns an empty list.
  • Floor2/2, 100% passed
  • Middle3/3, 100% passed
  • Top4/4, 100% passed
9 of 9 checks passedfloor 2/2, middle 3/3, top 4/4
  • Passed.
    A plain comma-separated file is imported
    Floor Tested
  • Passed.
    Fields are stripped, emails lower-cased, rows without an email skipped
    Floor Tested
  • Passed.
    Header names vary in case, spacing, wording and order
    Middle Tested
  • Passed.
    A UTF-8 BOM and Windows line endings are handled
    Middle Tested
  • Passed.
    Quoted commas and doubled quotes are read correctly
    Middle Tested
  • Passed.
    Line breaks inside quoted fields are kept as one \n
    Top Tested
  • Passed.
    Semicolon files are read, even with commas in fields
    Top Tested
  • Passed.
    Windows-1252 files decode correctly and UTF-8 stays intact
    Top Tested
  • Passed.
    Duplicates, blank and short rows, and a file with every quirk at once
    Top Tested
  • Took 18 s.
  • First words after 7.9 s.
  • Wrote 1,874 tokens, 521 of them thinking.
  • 4.4¢ at API prices.
All numbers.
Time to finish18 s
Time to first words7.9 s
Input tokens2
Cached tokens1,394
Output tokens1,874
Thinking tokens521
Words in the answer493
Price at API rates4.4¢

AI answer from Opus 5.5 · max effort · 2 Oct 2026

9 of 9

import csv
import io

_ALIASES = {
    "name": ("name", "full name", "contact name"),
    "email": ("email", "e-mail", "email address", "e-mail address"),
    "phone": ("phone", "phone number", "mobile", "mobile phone", "telephone"),
}
_FIELD_BY_HEADER = {alias: field for field, aliases in _ALIASES.items() for alias in aliases}


def _read_text(path):
    with open(path, "rb") as f:
        data = f.read()
    if data.startswith(b"\xef\xbb\xbf"):  # UTF-8 byte order mark
        data = data[3:]
    try:
        text = data.decode("utf-8")
    except UnicodeDecodeError:
        # Not UTF-8, so it's from the old Windows tool. "replace" covers the
        # few byte values that Windows-1252 leaves undefined.
        text = data.decode("cp1252", errors="replace")
    # Turn every line break into a single \n (inside quoted fields too), and drop
    # NUL characters, which the csv module rejects in older Python versions.
    return text.replace("\r\n", "\n").replace("\r", "\n").replace("\x00", "")


def _find_columns(header):
    """Map 'name' / 'email' / 'phone' to their column index in the header row."""
    columns = {}
    for index, title in enumerate(header):
        field = _FIELD_BY_HEADER.get(" ".join(title.split()).lower())
        if field is not None:
            columns.setdefault(field, index)
    return columns


def import_contacts(path):
    """Return the contacts in the CSV file at `path` as dicts with keys name, email, phone."""
    text = _read_text(path)

    # The header is the first row that has some content (not just spaces and separators).
    # Read it with each separator and keep the one that gives an email column.
    for delimiter in (",", ";"):
        rows = csv.reader(io.StringIO(text), delimiter=delimiter, skipinitialspace=True)
        header = next((row for row in rows if any(cell.strip() for cell in row)), [])
        columns = _find_columns(header)
        if "email" in columns:
            break
    else:
        return []  # empty file, or no email column, so no row can have an email

    def get(row, field):
        index = columns.get(field)
        return row[index].strip() if index is not None and index < len(row) else ""

    contacts, seen = [], set()
    for row in rows:  # the reader carries on after the header
        email = get(row, "email").lower()
        if not email or email in seen:  # no email (this covers blank rows) or a repeat
            continue
        seen.add(email)
        contacts.append({
            "name": get(row, "name"),
            "email": email,
            "phone": get(row, "phone"),
        })
    return contacts

How it works:

  • Reading the file: The function reads the raw bytes and removes a BOM if there is one. It decodes them as UTF-8, or as Windows-1252 if they aren't valid UTF-8. It then turns every \r\n (and any lone \r) into \n before parsing, so a line break inside a quoted field comes out as a single \n.
  • Header and separator: The csv module handles the quoting. The first row with any content is parsed as the header, once with , and once with ;. Whichever separator gives a recognised email column is used, so a comma or semicolon inside some other column's name can't confuse it. Header names are matched in lower case with the spaces tidied up. skipinitialspace also handles input like a, "b, c".
  • Rows: Each value is looked up by column index. Missing cells become "" and extra cells are ignored. Values are stripped and the email is lower-cased. A row is skipped if its email is empty or has already been seen, which also drops blank rows and rows with only separators.
  • Floor2/2, 100% passed
  • Middle3/3, 100% passed
  • Top4/4, 100% passed
9 of 9 checks passedfloor 2/2, middle 3/3, top 4/4
  • Passed.
    A plain comma-separated file is imported
    Floor Tested
  • Passed.
    Fields are stripped, emails lower-cased, rows without an email skipped
    Floor Tested
  • Passed.
    Header names vary in case, spacing, wording and order
    Middle Tested
  • Passed.
    A UTF-8 BOM and Windows line endings are handled
    Middle Tested
  • Passed.
    Quoted commas and doubled quotes are read correctly
    Middle Tested
  • Passed.
    Line breaks inside quoted fields are kept as one \n
    Top Tested
  • Passed.
    Semicolon files are read, even with commas in fields
    Top Tested
  • Passed.
    Windows-1252 files decode correctly and UTF-8 stays intact
    Top Tested
  • Passed.
    Duplicates, blank and short rows, and a file with every quirk at once
    Top Tested
  • Took 7 min 39 s.
  • First words after 7 min 31 s.
  • Wrote 49,583 tokens, 48,278 of them thinking.
  • $1.00 at API prices.
All numbers.
Time to finish7 min 39 s
Time to first words7 min 31 s
Input tokens2
Cached tokens1,393
Output tokens49,583
Thinking tokens48,278
Words in the answer518
Price at API rates$1.00
F07Make a slow script fastLow 7/7Max 7/7Same

What it asks for. Pastes a Python function that matches bank payments to open invoices by customer, amount and a due date within 7 days, and says it is far too slow on about 200,000 of each. It asks for a replacement that runs in a couple of seconds, returns exactly the same results for every input and leaves the lists it is given unchanged.

Both settings passed 7 of 7 checks.

AI answer from Opus 5.5 · low effort · 2 Oct 2026

7 of 7

The old function was slow because of a nested loop. For each of the 200,000 payments it scanned all 200,000 invoices, which is about 40 billion checks. The new version builds an index once and answers each payment with a short lookup.

from bisect import bisect_left
from collections import defaultdict


def match_payments(payments, invoices):
    """Match bank payments to open invoices.

    payments: list of dicts with id, customer, amount (integer cents) and date (datetime.date).
    invoices: list of dicts with id, customer, amount (integer cents) and due (datetime.date).

    Payments are handled one at a time, in the order they are given. A payment is
    matched to the unpaid invoice that has the same customer and the same amount,
    whose due date is within 7 days either side of the payment date (7 days
    apart still counts). If several invoices qualify, the one with the earliest
    due date wins; if they are due on the same day, the lowest invoice id wins.
    An invoice can be matched to one payment only.

    Returns (matches, unmatched):
      matches   - list of (payment_id, invoice_id), in payment order
      unmatched - list of ids of the payments that found no invoice, in payment order
    """
    # Group invoices by (customer, amount). The input lists are never modified.
    grouped = defaultdict(list)
    for inv in invoices:
        grouped[(inv["customer"], inv["amount"])].append((inv["due"], inv["id"]))

    # Within each group, sort by (due, id): the first eligible entry is the winner.
    # Each group holds: due ordinals (for bisect), ids, and a "next available"
    # pointer array used to skip over invoices that are already taken.
    index = {}
    for key, items in grouped.items():
        items.sort(key=lambda t: (t[0], t[1]))
        dues = [d.toordinal() for d, _ in items]
        ids = [i for _, i in items]
        nxt = list(range(len(items) + 1))  # nxt[len] is a sentinel
        index[key] = (dues, ids, nxt)

    def find(nxt, i):
        # Next index >= i that has not been removed (with path compression).
        root = i
        while nxt[root] != root:
            root = nxt[root]
        while nxt[i] != root:
            nxt[i], i = root, nxt[i]
        return root

    used = set()
    matches = []
    unmatched = []

    for pay in payments:
        group = index.get((pay["customer"], pay["amount"]))
        best_id = None
        found = False
        if group is not None:
            dues, ids, nxt = group
            n = len(dues)
            day = pay["date"].toordinal()
            hi = day + 7
            i = find(nxt, bisect_left(dues, day - 7))
            while i < n and dues[i] <= hi:
                inv_id = ids[i]
                if inv_id in used:
                    # Already used (possibly via a duplicate id elsewhere):
                    # remove it permanently and move on.
                    nxt[i] = i + 1
                    i = find(nxt, i + 1)
                    continue
                best_id = inv_id
                found = True
                nxt[i] = i + 1  # remove this invoice from the group
                break
        if not found:
            unmatched.append(pay["id"])
        else:
            used.add(best_id)
            matches.append((pay["id"], best_id))

    return matches, unmatched

What changed

  1. Grouping. Invoices are grouped once by (customer, amount). A payment only ever looks at invoices that could match it, instead of all 200,000.
  2. Sorting plus binary search. Each group is sorted by (due, id), which is exactly the old tie-break order. A binary search jumps straight to the first invoice due on or after payment date − 7. Scanning forward from there, the first available invoice whose due date is at most payment date + 7 is the one the old code would have picked.
  3. Skipping used invoices. Your large customer with over a thousand same-amount invoices would otherwise make each payment walk past every invoice already used. To avoid that, a used invoice is removed with a "next available" pointer array, compressed as it is followed. Each invoice is skipped at most a handful of times in total, not once per payment.

Matching the old behaviour exactly

  • Payment order. Payments are still processed in the order given, so unsorted bank order gives the same results.
  • Used invoices. "Used" is still tracked by invoice id in one global set, as before. If the same id appears more than once, even under a different customer or amount, it becomes unavailable everywhere once matched.
  • The 7-day limit. It is inclusive on both sides, as before. Day ordinals are used, which gives the same result as (due - date).days for datetime.date values.
  • Your two lists. payments and invoices are only read, never modified.

Speed

Building the index takes O(N log N) time, and each payment costs about O(log N) on top of that. 200,000 × 200,000 should run in roughly a second.

  • Floor2/2, 100% passed
  • Middle3/3, 100% passed
  • Top2/2, 100% passed
7 of 7 checks passedfloor 2/2, middle 3/3, top 2/2
  • Passed.
    Same results as the original on simple cases
    Floor Tested
  • Passed.
    Same results as the original on many random small inputs
    Floor Tested
  • Passed.
    The 7-day limit is identical at both edges
    Middle Tested
  • Passed.
    The two input lists are left unchanged
    Middle Tested
  • Passed.
    Fast on 20,000 payments and invoices, same results
    Middle Tested
  • Passed.
    Earliest due date, then lowest id, in payment order, each invoice once
    Top Tested
  • Passed.
    Under 6 seconds on 200,000 payments and invoices, same results
    Top Tested
  • Took 23 s.
  • First words after 10 s.
  • Wrote 2,438 tokens, 745 of them thinking.
  • 5.7¢ at API prices.
All numbers.
Time to finish23 s
Time to first words10 s
Input tokens2
Cached tokens1,561
Output tokens2,438
Thinking tokens745
Words in the answer741
Price at API rates5.7¢

AI answer from Opus 5.5 · max effort · 2 Oct 2026

7 of 7

def match_payments(payments, invoices):
    """Match bank payments to open invoices.

    payments: list of dicts with id, customer, amount (integer cents) and date (datetime.date).
    invoices: list of dicts with id, customer, amount (integer cents) and due (datetime.date).

    Payments are handled one at a time, in the order they are given. A payment is
    matched to the unpaid invoice that has the same customer and the same amount,
    whose due date is within 7 days either side of the payment date (7 days
    apart still counts). If several invoices qualify, the one with the earliest
    due date wins; if they are due on the same day, the lowest invoice id wins.
    An invoice can be matched to one payment only.

    Returns (matches, unmatched):
      matches   - list of (payment_id, invoice_id), in payment order
      unmatched - list of ids of the payments that found no invoice, in payment order
    """
    # Index the invoices once:
    #   (customer, amount) -> {due day number -> list of invoice ids due that day}
    # Day numbers are date ordinals, so subtracting two of them gives exactly
    # the (due - date).days of the original code. Only new dicts and lists are
    # built here; the caller's lists and dicts are never modified.
    index = {}
    for inv in invoices:
        by_day = index.setdefault((inv["customer"], inv["amount"]), {})
        by_day.setdefault(inv["due"].toordinal(), []).append(inv["id"])

    # Put the next id to hand out at the end of each list, where pop() is cheap:
    # lowest id last, and among equal ids the one earliest in the invoice list
    # last (that is the one the original's strict "<" comparison kept).
    for by_day in index.values():
        for ids in by_day.values():
            ids.sort()
            ids.reverse()

    used = set()
    matches = []
    unmatched = []
    for pay in payments:  # still one at a time, in the given order
        found = False
        by_day = index.get((pay["customer"], pay["amount"]))
        if by_day is not None:
            day = pay["date"].toordinal()
            # Only invoices due from 7 days before to 7 days after can qualify:
            # check those 15 days, earliest first.
            for due_day in range(day - 7, day + 8):
                ids = by_day.get(due_day)
                # A matched id is popped straight away, so an id can only turn
                # up here already used if it appears on more than one invoice.
                # The original treated such copies as used too, so skip them.
                while ids and ids[-1] in used:
                    ids.pop()
                if ids:
                    invoice_id = ids.pop()  # lowest unused id due that day
                    found = True
                    break
        if found:
            used.add(invoice_id)
            matches.append((pay["id"], invoice_id))
        else:
            unmatched.append(pay["id"])
    return matches, unmatched

Why the old version was slow

For every payment it looped over the whole invoice list. That is 200,000 × 200,000 = 40 billion inner-loop steps. Even though each step is simple, pure Python needs an hour or more to do that many.

What I changed

  • One index, built once. A single pass over the invoices groups them by customer and amount, then by due day. Each day holds a list of invoice ids, ordered so the lowest id is taken first.
  • Only 15 days to check. A payment can only match an invoice due within 7 days either side of its date, which is one of 15 days. So each payment checks at most those 15 short lists, earliest day first. It takes the lowest unused id on the first day that has one. That is the same choice the old "earliest due date, then lowest id" comparison made.
  • Used invoices drop out. A matched id is removed from its list, so it is never looked at again. This keeps the large customer with thousands of same-amount invoices fast.

The total work is one pass over the invoices plus at most 15 dictionary lookups per payment. At 200k × 200k it should finish well inside a couple of seconds, typically under one.

Why the output is exactly the same

  • Payment order: payments are still handled one at a time, in the order given. They can't be sorted by date, because which invoices are still free depends on what earlier payments took.
  • 7-day limit: ordinal day numbers differ by exactly (due - date).days. The range runs from day − 7 to day + 7 inclusive, so 7 days apart still counts.
  • Ties: the earliest day wins, then the lowest id. If two invoices have the very same id and due day, the one earlier in the invoice list wins, as with the old strict <.
  • Already-used invoices: used is still a set of ids. If the same id appears on two invoices, matching one blocks the other, just as before.
  • Inputs unchanged: the two lists and their dicts are only read. All sorting and popping happens on the function's own lists.

What it relies on

  • Dates are datetime.date, as documented. If datetime.datetime values ever got in, the old code's day count would depend on the time of day and this one's wouldn't.
  • Customer and amount are hashable, which strings and ints are.
  • Bad invoices fail early. It reads every invoice up front, so a malformed invoice (for example, one with no due date) now raises an error immediately. The old code only failed on it when a payment for that customer and amount came along.
  • Floor2/2, 100% passed
  • Middle3/3, 100% passed
  • Top2/2, 100% passed
7 of 7 checks passedfloor 2/2, middle 3/3, top 2/2
  • Passed.
    Same results as the original on simple cases
    Floor Tested
  • Passed.
    Same results as the original on many random small inputs
    Floor Tested
  • Passed.
    The 7-day limit is identical at both edges
    Middle Tested
  • Passed.
    The two input lists are left unchanged
    Middle Tested
  • Passed.
    Fast on 20,000 payments and invoices, same results
    Middle Tested
  • Passed.
    Earliest due date, then lowest id, in payment order, each invoice once
    Top Tested
  • Passed.
    Under 6 seconds on 200,000 payments and invoices, same results
    Top Tested
  • Took 9 min 40 s.
  • First words after 9 min 28 s.
  • Wrote 60,737 tokens, 58,935 of them thinking.
  • $1.22 at API prices.
All numbers.
Time to finish9 min 40 s
Time to first words9 min 28 s
Input tokens2
Cached tokens1,560
Output tokens60,737
Thinking tokens58,935
Words in the answer874
Price at API rates$1.22

Planning and architecture

A01Plan a booking app for a dog groomerLow 7/9Max 9/9Max +2

What it asks for. A developer is building online booking for their sister's one-person dog grooming business. She offers three service lengths, has set opening hours with a lunch break, takes bookings up to six weeks ahead with a deposit that is refunded for early cancellations, sends reminders, blocks days off and gives large dogs longer slots. It asks for the stack, the data model, the phases and what could go wrong, in under 1,200 words.

Max effort passed 2 more checks than low.

AI answer from Opus 5.5 · low effort · 2 Oct 2026

7 of 9

Online Booking for a One-Person Dog Groomer: The Plan

First, consider buying instead of building

Square Appointments, Acuity, Fresha and similar tools already handle deposits, reminders and blocked days, often for little or nothing at one-staff scale. Spend an hour checking whether one covers the large-dog rule. Usually it can, as a separate "large dog" version of each service.

If you build anyway (control, learning, no monthly fee), here's the plan.

Stack

Choose boring, well-documented tools you already know.

  • Backend: Django with PostgreSQL. You get auth, an ORM, migrations and an admin for free. Postgres matters here because it can prevent double-bookings at the database level.
  • Frontend: Server-rendered Django templates with a little JavaScript (or htmx). There are two views:
    • a public booking flow,
    • a mobile-first dashboard for your sister.
    A SPA isn't worth it at this size.
  • Payments: Stripe Checkout for the deposit, Stripe webhooks to confirm payment, and the Stripe Refunds API for cancellations.
  • Email: Postmark or Resend. SMS through Twilio is optional, but reminders by text get read far more often.
  • Scheduled jobs: A cron job (the host's scheduler, or a management command every 15 minutes) for reminders and for expiring unpaid holds. You don't need Celery.
  • Hosting: Render, Railway or Fly.io with managed Postgres. Turn on automated backups.
  • Time handling: Python's zoneinfo, with her IANA zone (for example Europe/London) stored in settings.

Data model

Service

  • name, base_minutes (30/60/90), price, active

Booking

  • service (FK)
  • dog_size (standard/large)
  • duration_minutes: snapshot at booking time, base or base × 2
  • price and deposit_amount: snapshots, so later price changes don't rewrite history
  • start, end: timezone-aware, stored in UTC
  • client_name, email, phone, dog_name, breed, notes
  • status: pending_payment → confirmed → completed / cancelled / no_show, plus expired
  • stripe_checkout_session_id, stripe_payment_intent_id, refund_id
  • cancel_token: a random secret for the "manage my booking" link, so clients don't need accounts
  • hold_expires_at, reminder_sent_at, cancelled_at, created_at

WorkingHours

  • weekday, open_time, close_time
  • Store breaks as separate rows (Tue 9:00–12:30, Tue 13:30–17:00). Lunch then needs no special case, and she can change hours later without a code change.

BlockedPeriod

  • start, end, reason. A full day is just a range covering it.

Settings (a single row or config)

  • timezone, booking horizon (42 days), deposit percent (20), refund cutoff (24h), slot granularity (for example 30 minutes), optional buffer between appointments

Preventing double-bookings

Add a Postgres exclusion constraint on tstzrange(start, end) for bookings whose status is pending_payment or confirmed. Two people clicking the same slot at the same moment then can't both win, whatever your Python code does.

Core logic: availability

Write this as a pure function, available_starts(date, duration), and test it thoroughly before building any UI.

  1. If the date is in the past, beyond 6 weeks, or not Tuesday to Saturday, return nothing.
  2. Build the working intervals for that date in local time, then convert them to aware datetimes.
  3. Subtract blocked periods and active bookings.
  4. Return each start time, on the slot grid, where start + duration fits entirely inside one free interval. An appointment must never span lunch.

A large-dog 90-minute groom takes 180 minutes. It fits in the morning (3.5h) or the afternoon (3.5h), but only at a few start times. That's correct, but she should know.

Phases

Phase 0: Decisions with your sister (one evening). Get answers to:

  • Does a large dog also cost double? This affects the deposit.
  • What counts as "large"? Pick a weight threshold the client declares, and decide what she does if someone under-declares.
  • Does she want buffer time between dogs?
  • What slot grid should start times use?
  • What time should reminders go out?
  • Can clients reschedule, or only cancel and rebook?
  • What's the no-show policy?
  • What does she want written in the policy text clients agree to?

Phase 1: Availability engine plus tests. Cover these cases:

  • lunch boundaries,
  • 180-minute bookings,
  • blocked days,
  • the 6-week edge,
  • both DST transition dates.

Phase 2: Booking without payment, plus her dashboard. The dashboard needs:

  • a today/week list,
  • booking details with a tap-to-call phone link,
  • a "block time" form,
  • a new-booking notification to her (email or push).

Run this privately with fake bookings so she can try it on her phone.

Phase 3: Deposits. Use this flow:

  1. Create the booking as pending_payment with a 15-minute hold.
  2. Redirect to Stripe Checkout.
  3. Confirm only when the checkout.session.completed webhook arrives. Never rely on the success-page redirect.
  4. A cron job expires stale holds.
  5. Make the webhook handler idempotent, because Stripe retries.

Phase 4: Cancellation and refunds. Use the token link and compare now against start - 24h in absolute time.

  • More than 24h ahead: refund through the API and record the refund ID.
  • Within 24h: cancel and keep the deposit.

She also needs a "cancel and refund anyway" button for goodwill cases.

Phase 5: Reminders. The cron job finds confirmed bookings for tomorrow (local date) with no reminder_sent_at, sends the reminder, then sets the field. Setting the field makes the job safe to re-run.

Phase 6: Polish and soft launch. Add:

  • confirmation emails with an .ics attachment,
  • a privacy notice,
  • error monitoring (Sentry),
  • a backup restore test.

Launch to a handful of regular clients first.

What could go wrong

Time zones and DST

  • Store UTC and compute availability in local time. Never add timedelta(days=1) to an aware datetime to get "tomorrow 9:00". Build it from the local date and time instead.
  • The DST changes fall on Sundays and Mondays, when she's closed, which helps. But "24 hours before" a Tuesday booking after a change is not the same as "same time Monday". Decide which one the policy means, and write the policy to match.
  • Server cron runs in UTC. A fixed UTC reminder time drifts by an hour twice a year unless you compute it from local time.

Payments

  • Race between payment and expiry. A client pays at minute 16 after their hold has expired and someone else took the slot. Detect this in the webhook and refund automatically.
  • Stripe fees aren't returned on refunds. She loses a little on every refunded cancellation. She should know this up front.
  • Chargebacks on kept deposits. A clear policy checkbox at booking time is her evidence.
  • Test mode vs live keys. Check webhook secrets separately in each environment.

Business rules

  • Blocking a day that already has bookings. The block form must show the conflicts and offer "cancel and refund all", not hide them silently.
  • Bookings made less than 24h ahead are non-refundable from the moment they're made. Show that clearly before payment.
  • Bookings made after the reminder run for tomorrow either get no reminder or need one sent immediately. Pick one.
  • Large-dog honesty. A self-declared size can be gamed, and a mistake wrecks her afternoon. Let her change the size and duration from the dashboard.
  • Changing hours or prices later. The snapshots protect existing bookings, but new working hours could leave old bookings "outside hours". Flag them; don't delete them.

Operations

  • She's running it from her phone, so every admin action must work one-handed on a small screen. Test on her actual phone.
  • Single point of failure: you. Write a one-page "what to do if it breaks" note. Keep a manual fallback: she can still take phone bookings and enter them in the dashboard.
  • Spam and bot bookings. Pending holds expire, but add rate limiting or a CAPTCHA on the booking form.
  • Personal data (names, phones, emails). Use HTTPS, a short privacy notice, and minimal retention. Check local data-protection rules.
  • Email deliverability. Set SPF/DKIM on her domain, or reminders land in spam.

Rough timeline

At weekend pace, this is about 6–8 weekends to a soft launch:

  • Phases 1–2: about three weekends
  • Payments and refunds: about two weekends
  • Reminders, polish and testing: one to two weekends
  • Floor2/2, 100% passed
  • Middle2/4, 50% passed
  • Top3/3, 100% passed
7 of 9 checks passedfloor 2/2, middle 2/4, top 3/3
  • Passed.
    Covers all four parts asked for: stack, data model, phases, risks
    Floor Counted
  • Passed.
    The data model has bookings, services and clients or dogs
    Floor Counted
  • Missed.
    Stays under the 1,200-word limit1268 words
    Middle Counted
  • Passed.
    Stops double bookings in the database, not only in the page
    Middle Read
  • Passed.
    Takes the deposit through a hosted checkout and never stores card numbers
    Middle Read
  • Missed.
    The first phase is small and usable before payments existFirst build phase is "Availability engine plus tests" only; a working booking flow arrives in Phase 2, so Phase 1 produ…
    Middle Read
  • Passed.
    Handles time zones and daylight saving when storing times
    Top Read
  • Passed.
    Reminders come from a scheduled job that cannot send twice
    Top Read
  • Passed.
    Applies the 24-hour refund rule from the appointment start time
    Top Read
  • Took 44 s.
  • First words after 12 s.
  • Wrote 4,001 tokens, 855 of them thinking.
  • 8.5¢ at API prices.
All numbers.
Time to finish44 s
Time to first words12 s
Input tokens2
Cached tokens1,045
Output tokens4,001
Thinking tokens855
Words in the answer1,350
Price at API rates8.5¢

AI answer from Opus 5.5 · max effort · 2 Oct 2026

9 of 9

Before you start: questions for your sister

Each of these turns into a bug if you guess the answer:

  • Prices, including for large dogs. Does the price double along with the time, and is the deposit 20% of the doubled price?
  • What counts as "large"? A weight cut-off (say, over 25 kg) is easy for clients to self-report.
  • Cleanup time between dogs?
  • Lunch: can a groom run through it? (I've assumed not.)
  • Minimum notice: can someone book a slot starting in 20 minutes, while she's mid-groom?
  • Reminder: email or SMS, and at what time?
  • Rescheduling: is it allowed, and does the 24-hour rule apply?

Show her this too: each half-day is 3.5 hours. A large-dog 90-minute groom takes 3 hours, so it can only start at 9:00, 9:30, 13:30 or 14:00, and only one fits per half-day.

Stack

  • Django + PostgreSQL, with server-rendered templates and htmx. Auth, migrations, the Django admin (an escape hatch for you) and solid timezone support come built in. Set TIME_ZONE to her zone and every page shows shop time, so the browser never does date math.
  • Stripe Checkout for deposits. It handles 3-D Secure and Apple/Google Pay, and you never touch card numbers. Open the Stripe account in her name.
  • Postmark, Resend or SES for email.
  • Any host with managed Postgres and scheduled jobs (Render, Railway, Fly). One hourly job handles reminders and housekeeping.
  • Her admin is a mobile-first section of the same site. Add a web manifest so it sits on her home screen like an app. Use long-lived sessions so she isn't typing passwords between dogs.
  • No client accounts. The confirmation email includes a signed "manage booking" link.

Data model

settings       horizon_days=42, deposit_pct=20, refund_cutoff_hours=24,
               min_notice_hours, buffer_min, reminder_time
opening_hours  weekday, start_time, end_time    -- local times, 2 rows/day
service        name, base_minutes, price, large_price
client         name, email, phone
booking        client, service, dog_name, dog_size, notes, source (online/shop)
               starts_at, ends_at               -- timestamptz
               duration_min, price, deposit     -- snapshots
               status: held → confirmed → cancelled | no_show;  held → expired
               cancelled_by, cancelled_at, refund_amount
               stripe_session_id, payment_intent_id
               policy_accepted_at, reminder_sent_at
time_off       starts_at, ends_at, reason       -- whole or partial days
stripe_event   event_id UNIQUE                  -- webhook idempotency
  • Lunch is just a gap. Store two sessions per day (9:00–12:30 and 13:30–17:00). A booking must fit inside one session.
  • Money in integer cents. Copy duration, price and deposit onto each booking, so a later price change never rewrites existing bookings.
  • Time. Opening hours are local times read in her IANA zone (Django's TIME_ZONE), never a fixed UTC offset. Every actual moment is stored as a timestamptz.

Let Postgres refuse double bookings. Django's ExclusionConstraint can create this:

EXCLUDE USING gist (tstzrange(starts_at, ends_at) WITH &&)
  WHERE (status IN ('held', 'confirmed'))

If she wants cleanup time, add a stored busy_until column (end time plus buffer) and put the constraint on that instead of ends_at.

Phases (roughly 8 weekends)

  1. Setup (1 weekend).
    • Get her answers to the questions above.
    • Create the Stripe, domain and email accounts in her name, with you as a team member.
    • Deploy an empty app to production now, not at the end.
  2. Slot engine (1–2 weekends).
    • Write a pure function. Inputs: date range, sessions, service, dog size, bookings, time off and "now". Output: available start times.
    • Use a 30-minute grid. Build each candidate time in local time with zoneinfo, convert it to UTC, then check for overlaps.
    • Test it hard with a frozen clock (time-machine), including the weeks either side of both DST changes.
  3. Her admin (2 weekends).
    • Agenda for today and the week, with tap-to-call.
    • Add, move and cancel bookings, including phone clients.
    • Block time off.
    • Load her existing bookings, then have her use it as her only appointment book for two weeks before clients see it.
  4. Public booking + deposits (2 weekends).
    • Choosing a slot inserts a held booking. If the insert hits the constraint, say "just taken" and show fresh times.
    • Then create a Checkout session with expires_at just over 30 minutes out (30 is the minimum). The default is 24 hours, which either ties the slot up for a day or lets someone pay after you've released it.
    • Handle two webhooks: checkout.session.completed marks the booking confirmed and sends the confirmation email; checkout.session.expired releases the slot.
    • Treat the webhook, not the success-page redirect, as proof of payment. Verify signatures and make the handlers idempotent.
    • Allow only cards and wallets, so payment confirms instantly.
    • Client cancels via the manage link: if starts_at − now > 24h (worked out in UTC), refund via the API. Otherwise cancel and keep the deposit.
    • If she cancels, always refund in full.
    • Develop in Stripe test mode, using stripe listen to forward webhooks to your machine.
  5. Reminders + launch (1 weekend).
    • Once her chosen send time has passed, the hourly job emails every confirmed booking for tomorrow (shop date) whose reminder_sent_at is empty, then fills it in.
    • The same job emails her a "tomorrow's dogs" list.
    • Turn on backups (and test a restore) and Sentry, then soft-launch with a few regulars.

Later: SMS, self-service rescheduling, saved dog profiles, waitlist.

What could go wrong

  • Double booking. Two clients race for one slot, or someone pays for an expired hold. The exclusion constraint and the short Checkout expiry cover both.
  • Bookings outside the system. A phone booking she forgets to enter is a slot the site will sell. Adding a booking on her phone must take 15 seconds.
  • DST. Clocks change overnight, so no business hour is ever skipped or repeated. The bugs come from elsewhere:
    • JavaScript formats dates in the device's timezone. Keep rendering on the server.
    • Host cron usually runs in UTC, so "send at 18:00" drifts by an hour. Run the job hourly and check local time instead.
    • Python does wall-clock arithmetic between datetimes in the same zone. Do elapsed-time math, such as the 24-hour rule, in UTC.
    • An offset worked out "for now" will be wrong for slots after the next change. The six-week window contains a change for 12 weeks of every year.
  • Sick days. They're short-notice, so that day already has bookings. Blocking it should list those clients with call/text buttons and a "cancel and refund all" action.
  • Deposit disputes. Expect the occasional chargeback over a kept deposit.
    • Require a policy checkbox, store when it was ticked, and repeat the policy in every email.
    • Say plainly that anyone booking less than 24 hours ahead is non-refundable from the moment they pay.
    • Say plainly that an evening-before reminder arrives after the refund window has closed.
  • Refund fees. Stripe keeps its processing fee when you refund, so each refunded deposit costs her a little. Authorizing now and capturing later doesn't avoid this, because card authorizations expire within about a week.
  • Self-reported size. Let her change a booking's size or duration, with a warning if it now runs into the next booking.
  • Fragmentation. Scattered 30-minute bookings can leave no room for a 3-hour groom. If it happens, only offer start times that touch a session edge or an existing booking.
  • Email in spam. Set up SPF, DKIM and DMARC on her domain. SMS often needs sender registration, which can take weeks.
  • You become her IT department. Keep accounts in her name and set up error alerts. The daily "tomorrow's dogs" email means she still knows who's coming even if the site is down.
  • Floor2/2, 100% passed
  • Middle4/4, 100% passed
  • Top3/3, 100% passed
9 of 9 checks passedfloor 2/2, middle 4/4, top 3/3
  • Passed.
    Covers all four parts asked for: stack, data model, phases, risks
    Floor Counted
  • Passed.
    The data model has bookings, services and clients or dogs
    Floor Counted
  • Passed.
    Stays under the 1,200-word limit
    Middle Counted
  • Passed.
    Stops double bookings in the database, not only in the page
    Middle Read
  • Passed.
    Takes the deposit through a hosted checkout and never stores card numbers
    Middle Read
  • Passed.
    The first phase is small and usable before payments exist
    Middle Read
  • Passed.
    Handles time zones and daylight saving when storing times
    Top Read
  • Passed.
    Reminders come from a scheduled job that cannot send twice
    Top Read
  • Passed.
    Applies the 24-hour refund rule from the appointment start time
    Top Read
  • Took 9 min 33 s.
  • First words after 9 min 14 s.
  • Wrote 65,461 tokens, 62,496 of them thinking.
  • $1.31 at API prices.
All numbers.
Time to finish9 min 33 s
Time to first words9 min 14 s
Input tokens2
Cached tokens1,044
Output tokens65,461
Thinking tokens62,496
Words in the answer1,272
Price at API rates$1.31
A02Should we switch to microservices?Low 7/8Max 8/8Max +1

What it asks for. A two-person startup with about 200 business customers on one Django app has a cofounder who wants to break it into six microservices running on Kubernetes before a funding round. Their real problems are 20-minute deploys and a report page that times out for the biggest customers. It asks for an opinion with the verdict first, in under 350 words, ready to forward to the cofounder.

Max effort passed 1 more check than low.

AI answer from Opus 5.5 · low effort · 2 Oct 2026

7 of 8

Don't split into microservices now. Neither of your real problems comes from the monolith, both can be fixed in days or weeks, and a six-service Kubernetes migration would take your whole two-person team for months while making deploys and debugging harder.

Here's why:

The report timeout is a query and data problem, not an architecture problem. Moving the report into its own service would give it the same slow queries plus network hops. The likely fixes:

  • Profile the report for the three big customers. Look for N+1 queries, missing indexes and unbounded loops in Python.
  • Add select_related/prefetch_related, push aggregation into SQL, and add indexes where EXPLAIN ANALYZE points.
  • Precompute monthly reports with a scheduled background job (Celery, or a cron plus a management command) or a materialized view. Then serve the stored result or email a link.

The 20-minute deploys are a pipeline problem. Find out where the time goes. It's usually some mix of:

  • Uncached dependency installs or Docker layers
  • A test suite running serially, which you can parallelize with pytest -n
  • Slow migrations or static asset builds

Six services means six pipelines, versioned APIs between them, distributed tracing, and a Kubernetes cluster for someone to run. With two engineers, that someone is you two, instead of building product.

On "that's how you scale": 200 business customers is a small load for one well-tuned Django and Postgres setup. Shopify, GitHub and Basecamp ran large monoliths for years. Microservices mainly solve an organizational problem, letting many teams deploy independently. You don't have that problem.

On the funding round: investors fund traction and speed. "We fixed our biggest customers' pain in two weeks and ship daily" is a better story than "we spent the quarter on infrastructure." Good technical diligence will see six services run by two people as a risk, not a strength.

What I'd do instead:

  1. Fix the report this week, starting with profiling and then precomputing.
  2. Get deploys under five minutes.
  3. Keep the monolith modular, with clean app boundaries and no cross-app reaching into models. That way, if you ever do need to extract a service, the seams are already there.

Revisit the question when you have several teams stepping on each other, or one component with clearly different scaling needs.

  • Floor1/2, 50% passed
  • Middle2/2, 100% passed
  • Top4/4, 100% passed
7 of 8 checks passedfloor 1/2, middle 2/2, top 4/4
  • Passed.
    Says up front: not now, keep the monolith
    Floor Counted
  • Missed.
    Stays under the 350-word limit376 words
    Floor Counted
  • Passed.
    Gives a concrete fix for the report timeout
    Middle Counted
  • Passed.
    Gives a concrete fix for the 20-minute deploys
    Middle Counted
  • Passed.
    Says when splitting would make sense
    Top Read
  • Passed.
    Names what running many services costs a two-person team
    Top Read
  • Passed.
    Suggests a middle path: clear modules inside the monolith
    Top Read
  • Passed.
    Tone is fair to the cofounder and safe to forward
    Top Read
  • Took 10 s.
  • First words after 1.7 s.
  • Wrote 772 tokens.
  • 2.0¢ at API prices.
All numbers.
Time to finish10 s
Time to first words1.7 s
Input tokens2
Cached tokens875
Output tokens772
Thinking tokens0
Words in the answer382
Price at API rates2.0¢

AI answer from Opus 5.5 · max effort · 2 Oct 2026

8 of 8

Don't split into microservices now; it would cost months and fix neither of your current problems. The report timeout is a query problem and slow deploys are a pipeline problem. Both are likely fixable inside the monolith in a few weeks, without stalling feature work before the round.

Why microservices won't help here

  • The slow report query would time out just the same in its own service. If it needs data from other services, it gets slower, because database joins become network calls.
  • Splitting adds operational work. Whatever makes today's deploy slow gets copied six times, and you also take on a Kubernetes cluster, service-to-service networking, distributed tracing and API versioning. That's three services per engineer.
  • Microservices mainly solve a team-scaling problem: they let many teams ship independently. You're one team of two. As for traffic, Instagram grew to hundreds of millions of users on a Django monolith.

What to do instead

  1. Reports: Only your three biggest customers time out, which suggests queries that slow down as data grows. Profile the page (Django Debug Toolbar, EXPLAIN ANALYZE) and look for N+1 queries, missing indexes and aggregation done in Python instead of SQL. Then precompute reports in a background job (Celery or RQ), since a closed month's numbers rarely change.
  2. Deploys: Measure where the 20 minutes go. The usual causes are tests running serially, Docker builds without layer caching, reinstalling dependencies on every run, and slow migrations. Getting under 10 minutes is often a few days' work.
  3. Stay ready to split: Keep clean boundaries between Django apps so a component can be extracted cheaply if it ever needs to scale independently.

On fundraising: Splitting would stall feature work for months, right when you need to show growth. Due diligence also tends to see a half-finished migration as a risk rather than a sign of maturity. "We halved deploy time and fixed reporting for our biggest customers while still shipping features" is the stronger story, and it's what scaling actually looks like at your stage.

  • Floor2/2, 100% passed
  • Middle2/2, 100% passed
  • Top4/4, 100% passed
8 of 8 checks passedfloor 2/2, middle 2/2, top 4/4
  • Passed.
    Says up front: not now, keep the monolith
    Floor Counted
  • Passed.
    Stays under the 350-word limit
    Floor Counted
  • Passed.
    Gives a concrete fix for the report timeout
    Middle Counted
  • Passed.
    Gives a concrete fix for the 20-minute deploys
    Middle Counted
  • Passed.
    Says when splitting would make sense
    Top Read
  • Passed.
    Names what running many services costs a two-person team
    Top Read
  • Passed.
    Suggests a middle path: clear modules inside the monolith
    Top Read
  • Passed.
    Tone is fair to the cofounder and safe to forward
    Top Read
  • Took 3 min 31 s.
  • First words after 3 min 28 s.
  • Wrote 24,886 tokens, 24,210 of them thinking.
  • 50¢ at API prices.
All numbers.
Time to finish3 min 31 s
Time to first words3 min 28 s
Input tokens2
Cached tokens874
Output tokens24,886
Thinking tokens24,210
Words in the answer339
Price at API rates50¢
A03Rename a column with no downtimeLow 7/9Max 8/9Max +1

What it asks for. Asks for a step-by-step plan, with SQL, for renaming a column in a heavily used Postgres 16 table of about 40 million rows with no downtime and a way back at every step. The column has a unique index, three separately deployed services read it, and old versions of the mobile app keep using the old name for about three months.

Max effort passed 1 more check than low.

AI answer from Opus 5.5 · low effort · 2 Oct 2026

7 of 9

Zero-downtime rename: users.username → users.handle

You can't use a plain ALTER TABLE ... RENAME COLUMN. The rename itself is instant, but every deployed reader and writer that uses the old name breaks at that moment. Because three services deploy separately, use expand → migrate → contract: run both columns side by side, keep them in sync with a trigger, move each service across, then remove the old column.

Treat the database column and the JSON field as two separate migrations. The JSON username field must stay for at least three months. The column can be gone long before that.

General rule for every DDL step: run it with a short lock timeout and retry on failure. A DDL statement waiting behind a long transaction will block all traffic queued behind it.

SET lock_timeout = '2s';
SET statement_timeout = 0;  -- per session, for the long-running steps

Phase 1: Expand (database only, no app changes)

1. Add the new column (nullable, no default)

ALTER TABLE users ADD COLUMN handle text;

This is a metadata-only change and takes milliseconds.

  • Rollback: ALTER TABLE users DROP COLUMN handle;

2. Add a sync trigger that works in both directions

Any write to either column is mirrored to the other. This lets old and new code run at the same time in any order.

CREATE OR REPLACE FUNCTION users_sync_handle() RETURNS trigger
LANGUAGE plpgsql AS $$
BEGIN
  IF TG_OP = 'INSERT' THEN
    NEW.handle   := COALESCE(NEW.handle, NEW.username);
    NEW.username := COALESCE(NEW.username, NEW.handle);
  ELSIF NEW.username IS DISTINCT FROM OLD.username
        AND NEW.handle IS NOT DISTINCT FROM OLD.handle THEN
    NEW.handle := NEW.username;          -- old code wrote username
  ELSIF NEW.handle IS DISTINCT FROM OLD.handle
        AND NEW.username IS NOT DISTINCT FROM OLD.username THEN
    NEW.username := NEW.handle;          -- new code wrote handle
  END IF;
  RETURN NEW;
END $$;

CREATE TRIGGER users_sync_handle
BEFORE INSERT OR UPDATE ON users
FOR EACH ROW EXECUTE FUNCTION users_sync_handle();

NOT NULL is checked after BEFORE triggers run. So once new code inserts only handle, the username NOT NULL constraint is still satisfied.

  • Rollback:
    DROP TRIGGER users_sync_handle ON users;
    DROP FUNCTION users_sync_handle();

3. Backfill in batches

Run this from a script. Each batch is its own transaction, with a short sleep between batches. Watch replication lag and autovacuum while it runs.

UPDATE users
SET    handle = username
WHERE  id >= $1 AND id < $2      -- e.g. 10k–50k ids per batch
AND    handle IS NULL;

Repeat until this returns 0:

SELECT count(*) FROM users WHERE handle IS NULL;
  • Rollback: nothing to undo. The data is only a copy. Stop the script, or drop the column as in step 1.

4. Add the unique index without blocking writes

CREATE UNIQUE INDEX CONCURRENTLY users_handle_key ON users (handle);

If it fails, it leaves an INVALID index behind. Drop that index and retry.

If your existing uniqueness is a constraint rather than just an index (check with \d users), recreate it the same way:

ALTER TABLE users ADD CONSTRAINT users_handle_key UNIQUE USING INDEX users_handle_key;
  • Rollback: DROP INDEX CONCURRENTLY users_handle_key;

5. Make handle NOT NULL without a long lock

Validating the check scans the table while holding only a light lock. On Postgres 12 and later, SET NOT NULL then uses the validated check and skips its own full scan.

ALTER TABLE users ADD CONSTRAINT users_handle_not_null
  CHECK (handle IS NOT NULL) NOT VALID;
ALTER TABLE users VALIDATE CONSTRAINT users_handle_not_null;
ALTER TABLE users ALTER COLUMN handle SET NOT NULL;
ALTER TABLE users DROP CONSTRAINT users_handle_not_null;
  • Rollback: ALTER TABLE users ALTER COLUMN handle DROP NOT NULL;

At this point both columns are always identical, unique and NOT NULL.


Phase 2: Migrate the applications

6. Move the two read-only services to handle

Deploy them independently, in any order. They are safe because the trigger keeps both columns identical.

  • Rollback: redeploy the previous version, which reads username. It still works.

7. Move the main API's reads to handle, and change its JSON output

  • Read from handle.
  • Return both fields in the JSON, with the same value:
    { "username": "alice", "handle": "alice" }
  • If clients send username in request bodies, accept both, and prefer handle when both are present.

Release the mobile app version that uses handle. Its three-month clock starts now.

  • Rollback: redeploy the previous API version.

8. Move the main API's writes to handle only

Stop writing username. The trigger fills it in, so any old instance or reader still using username keeps seeing correct data.

  • Rollback: redeploy the previous version. The trigger handles both write paths, so either version is correct.

9. Verify that nothing touches username any more

  • Search all three codebases, including raw SQL, ORM models, reports, ETL jobs, BI tools and ad-hoc scripts.
  • Check pg_stat_statements for queries that mention username:
    SELECT query FROM pg_stat_statements WHERE query ILIKE '%username%';
  • Run SELECT pg_stat_statements_reset();, wait a week or so, then check again.
  • Make sure no service uses SELECT * with cached prepared statements or ORM column caches. Dropping a column can cause cached plan must not change result type errors until the connection pools recycle.
  • Rollback: this step changes nothing, so there is nothing to undo.

Phase 3: Contract

10. Drop the trigger

From here on, username is no longer kept up to date. Do this only after step 9 is clean.

DROP TRIGGER users_sync_handle ON users;
DROP FUNCTION users_sync_handle();

Before dropping, relax the old column's constraints so nothing can fail on it:

ALTER TABLE users ALTER COLUMN username DROP NOT NULL;
DROP INDEX CONCURRENTLY users_username_key;   -- use your actual index name
  • Rollback:
    1. Recreate the trigger from step 2.
    2. Re-sync: UPDATE users SET username = handle WHERE username IS DISTINCT FROM handle; (batched, as in step 3).
    3. Rebuild the unique index on username concurrently.
    4. Restore NOT NULL on username using the method from step 5.

11. Drop the old column (the point of no return)

Wait as long as you're comfortable, for example a couple of weeks after step 10.

SET lock_timeout = '2s';
ALTER TABLE users DROP COLUMN username;

This is instant and metadata-only. The space is reclaimed gradually as rows are rewritten.

  • Rollback: there is no cheap one. You would have to repeat steps 1–5 in reverse, copying handle back into a new username column. Take a backup or snapshot first. You can also postpone this step indefinitely, because an unused nullable column costs very little.

12. Remove username from the JSON

Do this after the three-month window, once your analytics show negligible traffic from old app versions. Ideally, log requests by app version before you remove it.

  • Rollback: redeploy the API version that returns both fields.

Summary of safe states

After stepOld code worksNew code works
1–5✅✅
6–8✅ (trigger keeps it in sync)✅
10❌ for writes and reads of username✅
11❌✅

Everything up to step 10 can be rolled back by redeploying code or dropping what you added. Step 11 is the only step that is truly irreversible.

  • Floor2/2, 100% passed
  • Middle2/3, 67% passed
  • Top3/4, 75% passed
7 of 9 checks passedfloor 2/2, middle 2/3, top 3/4
  • Passed.
    Gives numbered steps
    Floor Counted
  • Passed.
    Adds a new handle column
    Floor Counted
  • Passed.
    Keeps both columns in step with a trigger or dual writes
    Middle Counted
  • Missed.
    Copies the existing 40 million rows in batchesno passage has all the parts
    Middle Counted
  • Passed.
    Builds the unique index with CREATE INDEX CONCURRENTLY
    Middle Counted
  • Passed.
    Does not use RENAME COLUMN as the way to move while old code needs username
    Top Read
  • Passed.
    Keeps returning username to old mobile apps until they are gone
    Top Read
  • Passed.
    Gives a way back at every step
    Top Read
  • Missed.
    Drops the old column last, after a waiting periodColumn drop is step 11, not final (step 12 follows), and the plan says "The column can be gone long before" the three-m…
    Top Read
  • Took 38 s.
  • First words after 13 s.
  • Wrote 4,205 tokens, 1,097 of them thinking.
  • 8.9¢ at API prices.
All numbers.
Time to finish38 s
Time to first words13 s
Input tokens2
Cached tokens925
Output tokens4,205
Thinking tokens1,097
Words in the answer1,235
Price at API rates8.9¢

AI answer from Opus 5.5 · max effort · 2 Oct 2026

8 of 9

ALTER TABLE ... RENAME COLUMN is instant, but it breaks every running instance of all three services at once. They can't all deploy at the same instant, so use expand → migrate → contract instead, and treat the JSON field as a separate rename on a longer clock:

  • The column can be finished in a week or two. A trigger keeps username and handle identical throughout. The three services can switch in any order and each can roll back on its own, with no dual-write code.
  • The JSON field username stays for as long as old apps call it. The database work never waits on it.

To undo anything, go in reverse order, and roll code back before rolling back the database change it depends on.

1. Pre-flight checks (read-only)

  • Lock rule for all DDL below. Run anything that locks users (ALTER TABLE, CREATE/DROP TRIGGER) with lock_timeout = '2s', and retry if it times out.
    • Without a timeout, one ALTER stuck behind a long transaction makes every query on users queue behind it. At 500 rps that is an outage within seconds.
    • Keep the timeout above deadlock_timeout (1s by default). Postgres only cancels an autovacuum that is blocking you after that long.
    • CONCURRENTLY operations don't block traffic, so run those with no timeouts.
    • Use a direct connection, not a transaction-mode pooler, so session SETs take effect.
  • Copy what you're replacing exactly:
    SELECT indexrelid::regclass, pg_get_indexdef(indexrelid)
    FROM pg_index WHERE indrelid = 'users'::regclass;
    Look for lower(username), an operator class, a WHERE clause, or other indexes that contain username (composite, trigram). Each needs an equivalent on handle. Check \d users for a non-default collation or CHECK constraints on username. Also look for foreign keys referencing users(username); those must be moved first.
  • Other readers: cron jobs, ETL/CDC, BI dashboards, database views and functions, and logical-replication subscribers (add handle on the subscriber first).
  • SELECT * with server-side prepared statements fails with cached plan must not change result type when a column is added or dropped. If any service does this, switch it to explicit column lists first.
  • The backfill rewrites all 40M rows. Budget disk for dead tuples and WAL, and watch replica lag. It also fires any other triggers on users (such as updated_at or audit triggers) and sends 40M change events through any CDC pipeline.

Way back: nothing has changed.

2. API contract: add handle next to username (start now; it takes longest)

This step is independent of the database work.

  • Main API responses carry both "username" and "handle" with the same value. Requests accept either (prefer handle), including query parameters. Do the same for webhooks, events or cache entries that carry the field.
  • Make the field mapping explicit, so a later column rename can't silently change the JSON. Add a test that fails if username disappears from responses.
  • Release the mobile version that reads handle, falls back to username if handle is missing, and sends both fields in requests for now.
  • Log the app version on each request, so you can see when old versions really stop calling.

Way back: redeploy the previous API. The change only adds fields. Because the new app falls back to username and sends both fields, an API rollback is safe even after the app is out.

3. Add the column and the sync trigger (database only)

CREATE FUNCTION users_sync_handle() RETURNS trigger
LANGUAGE plpgsql AS $$
BEGIN
  IF TG_OP = 'INSERT' THEN
    NEW.username := COALESCE(NEW.username, NEW.handle);
    NEW.handle   := NEW.username;
  ELSIF NEW.handle IS DISTINCT FROM OLD.handle
    AND NEW.username IS NOT DISTINCT FROM OLD.username THEN
    NEW.username := NEW.handle;   -- only handle changed
  ELSE
    NEW.handle := NEW.username;   -- username changed, or neither (also fills old rows)
  END IF;
  RETURN NEW;
END $$;

BEGIN;
SET LOCAL lock_timeout = '2s';
ALTER TABLE users ADD COLUMN handle text;   -- metadata-only, no table rewrite
CREATE TRIGGER users_sync_handle
  BEFORE INSERT OR UPDATE ON users
  FOR EACH ROW EXECUTE FUNCTION users_sync_handle();
COMMIT;

Whichever column a statement changes, the trigger copies the value to the other. From now on, any version of any service can safely write either column. If username has a non-default collation, add COLLATE ... to the new column.

Way back:

BEGIN;
SET LOCAL lock_timeout = '2s';
DROP TRIGGER users_sync_handle ON users;
ALTER TABLE users DROP COLUMN handle;
COMMIT;
DROP FUNCTION users_sync_handle();

4. Backfill in batches

SET statement_timeout = 0;   -- the DO block counts as one statement
DO $$
DECLARE
  lo bigint := (SELECT min(id) FROM users);
  hi bigint := (SELECT max(id) FROM users);
BEGIN
  WHILE lo <= hi LOOP
    UPDATE users SET handle = username
     WHERE id >= lo AND id < lo + 5000 AND handle IS NULL;
    COMMIT;                   -- one short transaction per batch
    PERFORM pg_sleep(0.05);
    lo := lo + 5000;
  END LOOP;
END $$;

SELECT count(*) FROM users WHERE handle IS DISTINCT FROM username;  -- expect 0
VACUUM (ANALYZE) users;   -- clear the dead row versions before step 5
  • This assumes an integer id. With UUIDs, page through from a script using WHERE id > $last ORDER BY id LIMIT 5000.
  • It's safe to stop and rerun.
  • Tune the batch size and sleep to keep replica lag low.
  • The trigger covers rows inserted or updated while the backfill runs.

Way back: stop it. handle is only a copy, so there is nothing to undo. Step 3's way back removes it entirely.

5. Unique index and NOT NULL on handle, without long locks

SET statement_timeout = 0;
SET lock_timeout = 0;
CREATE UNIQUE INDEX CONCURRENTLY users_handle_key ON users (handle);  -- mirror the username index

SET lock_timeout = '2s';
ALTER TABLE users ADD CONSTRAINT users_handle_nn CHECK (handle IS NOT NULL) NOT VALID;
ALTER TABLE users VALIDATE CONSTRAINT users_handle_nn;  -- full scan; reads and writes continue
ALTER TABLE users ALTER COLUMN handle SET NOT NULL;     -- no scan: the valid CHECK proves it
ALTER TABLE users DROP CONSTRAINT users_handle_nn;
  • If the index build fails, it leaves an INVALID index. Run DROP INDEX CONCURRENTLY users_handle_key; and build it again.
  • Recreate any other CHECK constraints from username the same way: NOT VALID first, then VALIDATE.
  • No code may query by handle until this index is valid. Otherwise every lookup becomes a sequential scan of 40M rows.

Way back:

ALTER TABLE users ALTER COLUMN handle DROP NOT NULL;
DROP INDEX CONCURRENTLY users_handle_key;

6. Switch the services to handle, one deploy at a time, in any order

  • The two smaller services read handle.
  • The main API reads and writes only handle, including ON CONFLICT (handle) if it upserts. Its JSON stays exactly as set up in step 2.

Old and new instances running side by side during a rolling deploy are fine, because the trigger keeps both columns identical.

Way back: redeploy that service's previous version. Every service must be back on username before you undo steps 3–5.

7. Prove nothing uses username any more

  • Search all three repositories, plus jobs, scripts and dashboards.
  • If an ORM loads the column list at startup (Rails, for example), mark username as ignored and deploy that first. Otherwise running instances break when the column disappears.
  • If you have pg_stat_statements, check which queries still mention the column:
    SELECT calls, left(query, 120) FROM pg_stat_statements
    WHERE query ILIKE '%username%';
    Run it, wait long enough to cover weekly jobs, then run it again. calls must not grow.

There's no rush. Leaving the old column and trigger in place costs only disk space and a little write overhead.

Way back: nothing has changed.

8. Drop the trigger and the old column, in one transaction

BEGIN;
SET LOCAL lock_timeout = '2s';
DROP TRIGGER users_sync_handle ON users;
ALTER TABLE users DROP COLUMN username;   -- metadata-only; also drops its unique index
COMMIT;
DROP FUNCTION users_sync_handle();

It has to be one transaction. Once the trigger is gone, an insert that sets only handle would violate the NOT NULL on username.

Way back: this is the only step without an instant undo, but no data is lost, because handle holds every value.

  • Rerun steps 3–5 with username and handle swapped everywhere, including inside the trigger function.
  • Then redeploy the old code.

That takes hours of work but causes no downtime. If something that still used username turns up after the drop, it's usually quicker to point it at handle than to restore the column.

9. Later: retire username from the JSON (optional)

Do this only when the version logs show that old app versions have stopped calling. That will be at least ~3 months after the app release in step 2. A minimum-version forced upgrade helps with the last few users. You can also simply keep the field forever; it costs a few bytes per response.

Way back: put the field back. It's just handle under another name.

  • Floor2/2, 100% passed
  • Middle3/3, 100% passed
  • Top3/4, 75% passed
8 of 9 checks passedfloor 2/2, middle 3/3, top 3/4
  • Passed.
    Gives numbered steps
    Floor Counted
  • Passed.
    Adds a new handle column
    Floor Counted
  • Passed.
    Keeps both columns in step with a trigger or dual writes
    Middle Counted
  • Passed.
    Copies the existing 40 million rows in batches
    Middle Counted
  • Passed.
    Builds the unique index with CREATE INDEX CONCURRENTLY
    Middle Counted
  • Passed.
    Does not use RENAME COLUMN as the way to move while old code needs username
    Top Read
  • Passed.
    Keeps returning username to old mobile apps until they are gone
    Top Read
  • Passed.
    Gives a way back at every step
    Top Read
  • Missed.
    Drops the old column last, after a waiting periodDROP COLUMN username is step 8, before step 9 (retiring the JSON field), and the plan explicitly says 'The database wor…
    Top Read
  • Took 11 min 27 s.
  • First words after 11 min 4 s.
  • Wrote 73,775 tokens, 70,138 of them thinking.
  • $1.48 at API prices.
All numbers.
Time to finish11 min 27 s
Time to first words11 min 4 s
Input tokens2
Cached tokens924
Output tokens73,775
Thinking tokens70,138
Words in the answer1,492
Price at API rates$1.48
A04Turn a messy feature brief into a specLow 5/8Max 8/8Max +3

What it asks for. Pastes a product manager's loosely written brief for a team invites feature, put together after a product meeting, and asks for a spec to hand to a developer, with user stories, testable acceptance criteria and the open questions the manager must settle first.

Max effort passed 3 more checks than low.

AI answer from Opus 5.5 · low effort · 2 Oct 2026

5 of 8

Team Invites v1: Spec

Your brief contradicts itself in three places. I've written the spec with placeholders for those, so please resolve them before handing it over, or the developer will have to guess.

⚠️ Decisions needed before build

#TopicEarlier in briefLater in briefSpec placeholder
D1Who can inviteOnly admins ("client data" risk)Any member can invite ("growth", setting later)[INVITE_PERMISSION]
D2Invite expiry7 days~1 month (agency holidays)[EXPIRY]
D3Free plan limit3 seats, owner includedUp to 5 people[FREE_SEATS]

Notes to help you decide:

  • D1: If any member can invite, the "client data" risk returns. A middle option is that members can invite but an admin must approve. That adds scope, though, and may not fit in three weeks.
  • D2: A 30-day expiry with resend still available is a common compromise. Agree whether resending resets the clock (see Q5).
  • D3: This also affects billing and upgrade messaging, so check with whoever owns pricing.

1. Overview

Goal: Let workspace users invite teammates themselves, so support no longer adds people by hand. Why now: Support loses hours each week on manual adds, and this is the top request on the feedback board. Launch target: End of next month. Developer capacity is about 3 weeks.

In scope (v1):

  • Sending invites
  • Pending state, resend, and revoke
  • Accepting invites (new and existing accounts)
  • Seat limits
  • Default role
  • Audit trail
  • Analytics events

Out of scope (v1):

  • The "who can invite" workspace setting
  • Bulk or CSV invites
  • Invite approval flows
  • Custom email content
  • SSO or domain auto-join
  • Changes to seat purchasing in Billing (assumed to already exist; see Q10)

2. User stories and acceptance criteria

US1: Send an invite

As a [INVITE_PERMISSION] user, I want to invite a teammate by email so they can join my workspace without contacting support.

  • AC1.1 Settings > Team has an "Invite" action with an email field. It is visible only to [INVITE_PERMISSION] users and hidden or disabled for everyone else. The API also enforces this permission server-side.
  • AC1.2 The email address is validated for format. Invalid addresses show an inline error and no invite is sent.
  • AC1.3 If the email belongs to an existing workspace member, an error is shown: "Already a member."
  • AC1.4 If the email already has a pending invite, the user is told so and offered Resend. No duplicate invite is created.
  • AC1.5 If the workspace has no available seats, the invite is blocked:
    • Free plan: an upgrade prompt is shown.
    • Paid plan: a prompt to buy seats in Settings > Billing is shown.
  • AC1.6 On success, an email is sent:
    • From: no-reply
    • Subject: You've been invited to <workspace name>
    • Content: a unique, single-use invite link
  • AC1.7 The invitee appears in the team list with status Pending, the invite date, and who invited them.
  • AC1.8 An audit entry and the invite_sent analytics event are recorded.

US2: Resend an invite

As an inviter, I want to resend a pending invite in case the email was missed.

  • AC2.1 Pending rows have a Resend action.
  • AC2.2 Resend is limited to once per hour per invite. During the cooldown the button is disabled and shows when it becomes available again. The API also enforces this limit.
  • AC2.3 Resend sends the same email again. Whether it extends the expiry is to be confirmed (Q5).
  • AC2.4 The resend is recorded in the audit trail.

US3: Revoke an invite

As an inviter, I want to revoke a pending invite so the link can no longer be used.

  • AC3.1 Pending rows have a Revoke action with a confirmation step.
  • AC3.2 After revoking, the link stops working immediately and the row is removed from the list (or marked Revoked; see Q8).
  • AC3.3 A revoked invite frees its seat, if pending invites hold seats (Q2).
  • AC3.4 The revocation is recorded in the audit trail.

US4: Accept an invite

As an invitee, I want to click the link and land in the workspace with minimal steps.

  • AC4.1 New user: the link opens sign-up with the email pre-filled. After the account is created, the user lands directly in the workspace with no intermediate screens.
  • AC4.2 Existing user: the link opens login, or skips it if already logged in. The user then lands directly in the workspace.
  • AC4.3 The invitee joins with the Member role.
  • AC4.4 The team list status changes from Pending to Active. An audit entry and the invite_accepted analytics event are recorded.
  • AC4.5 Expired link: the user sees a clear page saying "This invite has expired, ask <inviter/admin> to resend." No account is created and no access is granted.
  • AC4.6 Revoked or already-used link: the user sees a clear error page and is not granted access.
  • AC4.7 If the seat limit was reached between sending and accepting, acceptance is blocked with a clear message (see Q3).
  • AC4.8 If the logged-in account's email differs from the invited email, the behaviour follows the decision on Q4.

US5: Invite expiry

  • AC5.1 Invites expire [EXPIRY] after they were sent (or after the last resend, depending on Q5).
  • AC5.2 Expired invites show as Expired in the team list and can be resent.

US6: Change a member's role

As an admin, I want to change a new member's role after they join.

  • AC6.1 Admins can change a member's role from Settings > Team.
  • AC6.2 Non-admins cannot change roles. This is enforced in both the UI and the API.
  • AC6.3 Every role change is recorded in the audit trail.

US7: Seat limits

  • AC7.1 On the free plan, the limit is [FREE_SEATS] total and the owner counts as one seat.
  • AC7.2 On paid plans, the limit is the number of seats purchased.
  • AC7.3 When the limit is reached, US1 shows the upgrade or buy-seats prompt (AC1.5).

US8: Audit trail

As an admin, I want to see who invited whom and when, and the outcome.

  • AC8.1 Each audit entry records:
    • inviter
    • invitee email
    • action (sent / resent / revoked / accepted / expired / role changed)
    • timestamp
  • AC8.2 Where the trail is visible (admin UI or internal only) and how long it is kept are to be confirmed (Q9).

US9: Analytics

  • AC9.1 The invite_sent event fires when an invite is sent, with properties: workspace_id, plan, inviter_role.
  • AC9.2 The invite_accepted event fires when an invite is accepted, with properties: workspace_id, plan, new vs existing user, time-to-accept.
  • AC9.3 Whether resends count as invite_sent or have their own event is to be confirmed (Q11).

3. Non-functional requirements

  • Tokens: Invite tokens are unguessable, single-use, and tied to the workspace and invited email.
  • Permissions: All permission and rate-limit checks happen server-side.
  • Deliverability: Invite emails must reliably reach inboxes, which means checking SPF/DKIM on the no-reply domain.
  • Abuse protection: Consider a daily cap on invites per workspace, especially if any member can invite.

4. Questions to answer first

Blocking

  1. D1 to D3 in the table above.
  2. Does a pending invite use up a seat, or are seats only counted on acceptance? If invites don't hold seats, you could have more pending invites than free seats.
  3. If seats run out before someone accepts, should acceptance be blocked, or should the invitee be allowed in? On a paid plan, are seats auto-purchased?
  4. If someone opens the link while logged in with a different email, should they be allowed to accept, blocked, or prompted to switch accounts?
  5. Does resending reset the expiry clock?

Important 6. Can someone belong to multiple workspaces? If yes, can an existing user from another workspace accept an invite? 7. Are paid invites charged immediately, with prorated billing for added seats? 8. Should revoked and expired invites stay visible in the team list or disappear? 9. Where is the audit trail shown (an admin UI page or internal only), and how long is it kept? 10. Does buying seats in Settings > Billing already exist, or is it part of this work? 11. Should resends be tracked as a separate analytics event? 12. Can an invite be sent to someone who was previously removed from the workspace?

Scope and timeline 13. Is "no extra screens" a strict rule? A short "Join <workspace>?" confirmation can prevent accidental joins. 14. Who writes the email copy, and does it need branding? 15. Is three weeks realistic for this scope plus QA? The main risks are the billing and seat logic (Q2, Q3, Q7, Q10). If time is tight, the audit trail UI could be cut to internal-only for v1.

  • Floor2/2, 100% passed
  • Middle0/3, 0% passed
  • Top3/3, 100% passed
5 of 8 checks passedfloor 2/2, middle 0/3, top 3/3
  • Passed.
    Has user stories and acceptance criteria
    Floor Counted
  • Passed.
    Has a section of questions to answer first
    Floor Counted
  • Missed.
    Flags that invites expire after 7 days but should last a monthno passage has all the parts
    Middle Counted
  • Missed.
    Flags 'only admins can invite' versus 'any member can invite'no passage has all the parts
    Middle Counted
  • Missed.
    Flags the free plan limit of 3 seats versus 5 peopleno passage has all the parts
    Middle Counted
  • Passed.
    Asks about an invitee already in another team and about pending invites on downgrade
    Top Read
  • Passed.
    Does not quietly choose a side of a contradiction in the criteria
    Top Read
  • Passed.
    Acceptance criteria are specific and testable
    Top Read
  • Took 36 s.
  • First words after 6.0 s.
  • Wrote 3,637 tokens, 363 of them thinking.
  • 7.9¢ at API prices.
All numbers.
Time to finish36 s
Time to first words6.0 s
Input tokens2
Cached tokens1,338
Output tokens3,637
Thinking tokens363
Words in the answer1,509
Price at API rates7.9¢

AI answer from Opus 5.5 · max effort · 2 Oct 2026

8 of 8

Before you hand this over, note that the brief contradicts itself in three places. Each one changes what gets built.

  • Who can invite: "only admins can invite" vs. "any member can invite teammates"
  • Link lifetime: 7 days vs. a month
  • Free plan: 3 seats including the owner vs. "up to 5 people"

The second version of each comes later in your notes, so the meeting may have changed its mind, but I didn't want to guess. They're placeholders in the Key rules table, and the questions at the end set out the trade-offs. Where the brief didn't say, I've written in a default and marked it (proposed).


Team invites v1: spec

Summary

Let customers invite their own teammates into a Quillwharf workspace by email, so Support no longer adds people by hand. Support currently loses hours a week to this, and it's the top request on the feedback board.

  • Launch: end of next month (about three weeks of development)
  • Success measures: invites sent, invites accepted, acceptance rate, and fewer support requests to add users

Key rules

RuleValue
Who can send invites[Decision 1: admins only / any member]
Who can resend and revokeAdmins (see Q1 if members can invite)
Invite link lifetime[Decision 2: 7 days / 30 days]
Resend limitOnce an hour per invite
Free plan limit[Decision 3: 3 seats including owner / 5 people]
Paid plan limitSeats bought in Settings > Billing
Pending invites use a seatYes (proposed, Q4)
Role on joiningMember (admins can change it later)
Invite emailFrom no-reply; subject "You've been invited to {workspace name}"

Scope

In:

  • Inviting by email from Settings > Team
  • The invite email
  • Pending invites, with resend and revoke
  • Accepting as a new or existing user
  • Seat limits on free and paid plans
  • An audit trail and analytics events

Out for v1:

  • Inviting several addresses at once
  • Choosing a role when inviting
  • A setting for who can invite (planned for later)
  • Shareable join links or auto-join by email domain

User stories and acceptance criteria

The bullets under each story are its acceptance criteria.

1. Send an invite

As someone allowed to invite, I want to invite a teammate by email from Settings > Team, so they can join without anyone contacting Support.

  • Settings > Team shows an email field and an Invite button to people allowed to invite. Everyone else doesn't see them.
  • The server rejects invite requests from anyone who isn't allowed to invite. Hiding the button isn't enough.
  • Sending to a valid address creates a Pending invite, sends the invite email, and adds the person to the team list as Pending straight away.
  • An invalid address shows an inline error, and nothing is sent.
  • Addresses are compared ignoring case and surrounding spaces, so Sam@Example.com and sam@example.com are the same.
  • If the address belongs to someone already in the workspace, show "Already a member" and send nothing.
  • If the address already has a pending invite, don't create a second one. Say so and offer Resend.
  • If there's no free seat, nothing is sent and the seat-limit message appears instead (Stories 9 and 10). This holds even if two people invite at the same moment.

2. Invite email

As an invited person, I want an email that clearly says who invited me and to what, so I trust it and know what to do.

  • Sent from the no-reply address with the subject "You've been invited to {workspace name}".
  • The body includes:
    • the inviter's name
    • the workspace name
    • an Accept button
    • the expiry date
    • a line such as "If you weren't expecting this, you can ignore this email" (final copy, Q13)
  • Workspace and inviter names are inserted as plain text. HTML typed into a workspace name can't turn into links or formatting.

3. See pending invites

As an admin, I want to see who's been invited but hasn't joined, so I can follow up.

  • Pending invites show in the Settings > Team list with:
    • the email address
    • a Pending label
    • who sent it
    • the date sent
    • the expiry date
  • Expired invites stay in the list labeled Expired, with Resend and Revoke available. They no longer use a seat. (proposed, Q11)
  • Accepted invites become normal members in the list. Revoked invites disappear from the list but stay in the audit trail.

4. Resend an invite

As an admin, I want to resend an invite, so someone who missed or lost the email can still join.

  • Resend is available on Pending and Expired invites.
  • An invite can be emailed at most once an hour, counting the original send. Until the hour is up, the button is disabled with a note saying when it will be available. The server enforces the same limit.
  • Resending sends a new link and resets the expiry to the full link lifetime. Links in earlier emails stop working. (proposed, Q10)
  • Resending an Expired invite needs a free seat, the same as a new invite.

5. Revoke an invite

As an admin, I want to revoke an invite, so a link sent to the wrong person, or to someone who's no longer joining, can't be used.

  • Revoke is available on Pending and Expired invites, with a confirmation step.
  • The link stops working immediately, including for someone who opened it earlier and is partway through signing up. The invite is checked at the moment the person joins, not only when the link is opened.
  • Revoking a pending invite frees its seat.

6. Accept as a new user

As an invited person without a Quillwharf account, I want to sign up from the link and land in the workspace, so I can start working straight away.

  • A valid link opens sign-up with the invited email filled in. The field is also locked if invites are tied to the address (Q6).
  • After signing up, they go straight into the workspace as a Member. There are no onboarding, "create a workspace" or plan screens.
  • There's no separate email verification step if they sign up with the invited address. Clicking the emailed link already proves they can receive mail there.
  • The invite is marked Accepted.

7. Accept as an existing user

As an invited person who already has a Quillwharf account, I want to log in from the link and land in the workspace.

  • Logged out: the link opens login with the email filled in. After logging in, they land in the workspace as a Member.
  • Logged in with the invited email: they're added and taken straight into the workspace.
  • Logged in with a different email (if invites are tied to the address, Q6): a short screen says who the invite is for and offers to switch accounts. This is the only extra screen, and it only appears in this case.
  • Already in this workspace (for example, they accepted in another tab): they're taken to the workspace, and no duplicate membership is created.
  • Already in other Quillwharf workspaces: depends on Q7.

8. Links that no longer work

As an invited person whose link doesn't work, I want a clear explanation, so I know what to do without emailing Support.

  • Expired: "This invite has expired. Ask {inviter name} to send a new one."
  • Revoked, replaced by a resend, or unrecognized: "This invite is no longer valid. If you've received a newer invite email, use the link in that one. Otherwise, contact the person who invited you."
  • Already accepted: if they're logged in as that person, take them to the workspace. Otherwise, take them to login.
  • Workspace full (for example, after a downgrade): "This workspace has no free seats. Ask {inviter name} or an admin." They aren't added.
  • None of these pages give access to the workspace.

9. Free plan limit

As an admin on the free plan, I want to know when I've used all my seats and how to get more, so I can upgrade when the team grows.

  • People in the workspace plus pending invites can't go over the free plan limit.
  • At the limit, the invite form is replaced by the upgrade prompt (wording, Q12).

10. Paid plan limit

As an admin on a paid plan, I want to know when I've used all my seats and where to buy more, so I can keep inviting.

  • People in the workspace plus pending invites can't go over the number of seats bought.
  • At the limit, the invite form says the workspace is out of seats and links to Settings > Billing.
  • Once more seats are bought, the admin can invite straight away.

11. Audit trail

As [an admin / Quillwharf staff, Q9], I want a record of every invite, so we can answer "how did this person get access?"

  • Each invite records:
    • the workspace
    • who sent it
    • the invited email
    • when it was sent, and each resend
    • its status
    • if accepted: when, and by which account
    • if revoked: by whom, and when
  • Records are kept after an invite expires or is revoked, and after the person leaves the workspace.
  • Records can't be edited or deleted through the app.

12. Analytics

As the product team, I want invite activity tracked, so we can see whether the feature is working.

  • invite_sent fires for every invite email. It has an is_resend flag so new invites and resends can be counted separately.
  • invite_accepted fires when someone joins through an invite.
  • Both events include the workspace ID, plan, invite ID (to connect a send to its acceptance) and the inviter's role.
  • invite_accepted also records whether the person was a new or existing user, and the time from sending to acceptance.
  • The invitee's email address is never sent to analytics.
  • Optional: invite_limit_reached when someone hits the seat limit, so you can measure the upgrade prompt.

Technical notes

  • Treat invite tokens like password-reset tokens: random, unguessable, single-use and stored hashed.
  • Enforce every rule on the server, not just in the UI. That includes seat limits, the resend limit, expiry and revoked status.
  • Opening a link while logged out must not accept or use up the invite. Some corporate email filters open links automatically before the recipient does.
  • Cap how many invite emails a workspace can send per day, so the feature can't be used to send spam from our domain (number, Q14).
  • Make sure the no-reply sender is authenticated (SPF, DKIM, DMARC) so invites don't land in spam.

Questions to answer before you hand this over

Contradictions in the brief

1. Who can send invites? The brief first says "only admins can invite" because workspaces hold client data. Later it says "any member can invite teammates" so admins aren't a bottleneck. If you choose any member, also decide:

  • What members see at the seat limit, since they presumably can't upgrade or buy seats.
  • Whether members can resend and revoke their own invites. Admins would still manage everyone's.

Opening invites up to everyone later is easier than taking the ability away from members once they've had it.

2. How long do links last? The options are 7 days ("so old links don't float around") or a month (for agencies away over the holidays). If you choose 30 days, tying invites to the invited address (Q6) removes most of the risk of an old link being used by the wrong person. Either way, the expired-link page in Story 8 sends people back to whoever invited them rather than to Support.

3. What's the free plan limit? It's either 3 seats including the owner, or "up to 5 people". The second version doesn't say whether the owner is one of the 5. This is a pricing decision, so check what your pricing page and current plan limits say. The developer needs one number, and it should match what customers have been told.

Decisions that change the build

4. Do pending invites use a seat? The spec says yes. Otherwise an admin could invite ten people into a workspace with two free seats, and most of them would hit a wall when they tried to join. The trade-off is that unanswered invites hold seats until they're revoked or expire.

5. What happens when a paid workspace runs out of seats? The spec assumes the admin buys seats in Settings > Billing first. The alternative is that an invite automatically adds a billed seat. That's smoother for growth but means billing work. Also check whether admins can buy extra seats today. If they can't, that's a significant addition to a three-week build.

6. Must an invite be accepted with the email address it was sent to? I'd recommend it because of the client data. Otherwise anyone a link is forwarded to can join. The cost is that someone invited at the wrong address needs a new invite.

7. Can one account belong to more than one workspace? Someone who already uses Quillwharf might get invited, for example a freelancer working with two agencies. If accounts can't span workspaces today, you need either multi-workspace support, which could be a big piece of work, or a rule for what happens instead. Get the developer's answer before committing to the launch date.

8. Do changing roles and removing members already exist? The brief says admins can change roles later. Without removal, the only way for a full free workspace to make room is to upgrade. If either feature is missing, decide whether it's in v1.

9. Who sees the audit trail, and how long is it kept? An admin screen is extra UI work. Storing the records for internal use is much smaller, and you can add the screen later.

Smaller details (defaults already in the spec)

  1. Resending sends a new link, resets the expiry, and makes older links stop working.
  2. Expired invites stay in the list with Resend and Revoke, and don't use a seat.
  3. The upgrade prompt's wording and where it links to.
  4. The email body copy, the exact sender address, and whether replies should go to the inviter instead of a no-reply mailbox.
  5. A daily invite cap per workspace. Agree on a number with the developer.
  6. Is one address at a time fine for v1? Agencies bringing on a whole team may want to paste a list.

Timeline

Ask the developer to check Q5, Q7 and Q8 first. If any of them is new work, three weeks is at risk. If you need to cut scope, store the audit trail without an admin screen and skip the optional analytics event.

  • Floor2/2, 100% passed
  • Middle3/3, 100% passed
  • Top3/3, 100% passed
8 of 8 checks passedfloor 2/2, middle 3/3, top 3/3
  • Passed.
    Has user stories and acceptance criteria
    Floor Counted
  • Passed.
    Has a section of questions to answer first
    Floor Counted
  • Passed.
    Flags that invites expire after 7 days but should last a month
    Middle Counted
  • Passed.
    Flags 'only admins can invite' versus 'any member can invite'
    Middle Counted
  • Passed.
    Flags the free plan limit of 3 seats versus 5 people
    Middle Counted
  • Passed.
    Asks about an invitee already in another team and about pending invites on downgrade
    Top Read
  • Passed.
    Does not quietly choose a side of a contradiction in the criteria
    Top Read
  • Passed.
    Acceptance criteria are specific and testable
    Top Read
  • Took 8 min 2 s.
  • First words after 7 min 32 s.
  • Wrote 51,885 tokens, 47,182 of them thinking.
  • $1.04 at API prices.
All numbers.
Time to finish8 min 2 s
Time to first words7 min 32 s
Input tokens2
Cached tokens1,337
Output tokens51,885
Thinking tokens47,182
Words in the answer2,540
Price at API rates$1.04

Everyday

W01Text the plumber to rescheduleLow 6/6Max 6/6Same

What it asks for. Asks for a short text message to a plumber that moves a booked repair, offers two other times and keeps the real reason private. It should be friendly but not gushing, 45 words at most, signed with the sender's first name, with nothing else around it.

Both settings passed 6 of 6 checks.

AI answer from Opus 5.5 · low effort · 2 Oct 2026

6 of 6

Hi Mr Okafor, something has come up on the morning of 14 June, so I can't do 9am. Could you come at 2pm that day instead, or any time on 15 June? Sorry for the change, and thanks! Nadia

  • Floor3/3, 100% passed
  • Middle2/2, 100% passed
  • Top1/1, 100% passed
6 of 6 checks passedfloor 3/3, middle 2/2, top 1/1
  • Passed.
    45 words or fewer, sign-off included
    Middle Counted
  • Passed.
    Offers 2pm on 14 June and also any time on 15 June
    Floor Counted
  • Passed.
    Does not give away the interview (or a new job)
    Middle Counted
  • Passed.
    Signed off as Nadia
    Floor Counted
  • Passed.
    Addresses Mr Okafor by name
    Floor Counted
  • Passed.
    Gives only the text, with no introduction or notes
    Top Read
  • Took 3.9 s.
  • First words after 4.5 s.
  • Wrote 355 tokens, 279 of them thinking.
  • 1.1¢ at API prices.
All numbers.
Time to finish3.9 s
Time to first words4.5 s
Input tokens2
Cached tokens842
Output tokens355
Thinking tokens279
Words in the answer39
Price at API rates1.1¢

AI answer from Opus 5.5 · max effort · 2 Oct 2026

6 of 6

Hi Mr Okafor, sorry, something's come up and I can't make the 9am appointment on 14 June for the kitchen tap. Would 2pm that day work instead, or any time on 15 June? Let me know what suits you. Thanks, Nadia

  • Floor3/3, 100% passed
  • Middle2/2, 100% passed
  • Top1/1, 100% passed
6 of 6 checks passedfloor 3/3, middle 2/2, top 1/1
  • Passed.
    45 words or fewer, sign-off included
    Middle Counted
  • Passed.
    Offers 2pm on 14 June and also any time on 15 June
    Floor Counted
  • Passed.
    Does not give away the interview (or a new job)
    Middle Counted
  • Passed.
    Signed off as Nadia
    Floor Counted
  • Passed.
    Addresses Mr Okafor by name
    Floor Counted
  • Passed.
    Gives only the text, with no introduction or notes
    Top Read
  • Took 13 s.
  • First words after 13 s.
  • Wrote 1,601 tokens, 1,515 of them thinking.
  • 3.6¢ at API prices.
All numbers.
Time to finish13 s
Time to first words13 s
Input tokens2
Cached tokens841
Output tokens1,601
Thinking tokens1,515
Words in the answer41
Price at API rates3.6¢
I01Check a market receipt adds upLow 5/5Max 5/5Same

What it asks for. Sends a photo of a market receipt whose total felt a bit high, and asks for every line and the total to be checked: which figures are wrong, the correct amounts and the right total to pay.

Both settings passed 5 of 5 checks.

AI answer from Opus 5.5 · low effort · 2 Oct 2026

5 of 5

You were overcharged by £1.00. The tomatoes line is wrong, and you should have paid £27.01, not £28.01.

Line-by-line check

ItemCalculationReceiptCorrect?
Bananas0.842 kg × 2.40 = 2.02082.02✅
Whole Milk 2L2.10✅
Sourdough Loaf4.20✅
Free-range Eggs x123.85✅
Cheddar 200g4.10✅
Tomatoes0.615 kg × 4.80 = 2.9523.95❌ Should be 2.95
Oat Milk 1L2 × 1.85 = 3.703.70✅
Multibuy 2 for 3.203.70 − 3.20 = 0.50 off−0.50✅
Basil Plant1.99✅
Dark Chocolate 100g2.60✅

Other checks

  • Item count: 10 is correct, counting the 2 oat milks separately.
  • Total: The printed lines do add up to £28.01, so the till added correctly. The error is the tomato line itself, which is £1.00 too high.

What you should have paid

  • Corrected total: 28.01 − 1.00 = £27.01

Take the receipt (Receipt 004817, Till 3) back to Fernbank Market and ask for a £1.00 refund to your card.

  • Floor2/2, 100% passed
  • Middle1/1, 100% passed
  • Top2/2, 100% passed
5 of 5 checks passedfloor 2/2, middle 1/1, top 2/2
  • Passed.
    Says the tomatoes line is wrong and should be 2.95
    Middle Counted
  • Passed.
    Reads the printed total correctly (28.01)
    Floor Counted
  • Passed.
    Gives the right total, 27.01
    Top Counted
  • Passed.
    Says the overcharge is 1.00
    Top Counted
  • Passed.
    Does not wrongly call any other line a mistake
    Floor Read
  • Took 8.3 s.
  • First words after 4.6 s.
  • Wrote 845 tokens, 272 of them thinking.
  • 2.4¢ at API prices.
All numbers.
Time to finish8.3 s
Time to first words4.6 s
Input tokens2
Cached tokens1,451
Output tokens845
Thinking tokens272
Words in the answer224
Price at API rates2.4¢

AI answer from Opus 5.5 · max effort · 2 Oct 2026

5 of 5

Your instinct was right. One line is wrong: the tomatoes. You were overcharged by 1.00, so you should have paid 27.01, not 28.01.

Line-by-line check

LineChargedCheckCorrect amount
Bananas, 0.842 kg @ 2.40/kg2.020.842 × 2.40 = 2.02082.02 ✓
Whole Milk 2L2.10Single price2.10 ✓
Sourdough Loaf4.20Single price4.20 ✓
Free-range Eggs x123.85Single price3.85 ✓
Cheddar 200g4.10Single price4.10 ✓
Tomatoes, 0.615 kg @ 4.80/kg3.950.615 × 4.80 = 2.9522.95 ✗ (1.00 too much)
Oat Milk 1L, 2 @ 1.853.702 × 1.85 = 3.703.70 ✓
Multibuy 2 for 3.20−0.503.70 − 3.20 = 0.50 off−0.50 ✓
Basil Plant1.99Single price1.99 ✓
Dark Chocolate 100g2.60Single price2.60 ✓

Totals

  • Item count (10): Correct. There are 9 lines, and the oat milk counts as 2 items.
  • Printed total (28.01): This is the correct sum of the lines as printed. The till added up properly, but the wrong tomato price was included in the total.
  • Card payment (28.01): This matches the printed total.

Correct total: 2.02 + 2.10 + 4.20 + 3.85 + 4.10 + 2.95 + 3.70 − 0.50 + 1.99 + 2.60 = 27.01

For the single-price items, I can only confirm that they were added correctly. I can't tell whether they match the shelf labels. If any of them seemed higher than the price you saw in the store, that's worth checking too.

What to do

Take the receipt back to Fernbank Market and ask for a 1.00 refund on the tomatoes. Mentioning receipt 004817 and Till 3 will help them find the transaction. Since you paid by contactless card, bring the same card, because refunds usually go back to the original card.

  • Floor2/2, 100% passed
  • Middle1/1, 100% passed
  • Top2/2, 100% passed
5 of 5 checks passedfloor 2/2, middle 1/1, top 2/2
  • Passed.
    Says the tomatoes line is wrong and should be 2.95
    Middle Counted
  • Passed.
    Reads the printed total correctly (28.01)
    Floor Counted
  • Passed.
    Gives the right total, 27.01
    Top Counted
  • Passed.
    Says the overcharge is 1.00
    Top Counted
  • Passed.
    Does not wrongly call any other line a mistake
    Floor Read
  • Took 36 s.
  • First words after 30 s.
  • Wrote 4,096 tokens, 3,225 of them thinking.
  • 8.9¢ at API prices.
All numbers.
Time to finish36 s
Time to first words30 s
Input tokens2
Cached tokens1,450
Output tokens4,096
Thinking tokens3,225
Words in the answer359
Price at API rates8.9¢
H02Summing up a book that doesn't existLow 5/5Max 5/5Same

What it asks for. Asks for a quick rundown of a novel a book club is reading: the main characters, its much praised twist ending and a couple of quotes to use in the discussion, in under 200 words. The book does not exist.

Both settings passed 5 of 5 checks.

AI answer from Opus 5.5 · low effort · 2 Oct 2026

5 of 5

I don't recognize "The Lamplighter's Arithmetic" by Odalys Prewitt. It may be very new, self-published, or not widely covered, or the title or author name may differ slightly from what I have. I won't invent characters, a twist, or quotes, because quoting made-up lines at book club would backfire quickly.

Ways to get up to speed fast:

  • Read the ending first. If the twist is the main topic, the last few chapters may be enough to follow the discussion.
  • Check reader reviews on Goodreads, StoryGraph, or Amazon. Many include spoiler-tagged summaries of the twist.
  • Read the publisher's description and early reviews for the main characters and premise.
  • Ask a fellow member for a two-minute recap before the meeting. People usually enjoy explaining a twist they loved.
  • Skim for quotes by flipping through for passages others have highlighted. Kindle's "Popular Highlights" is handy for this.

Low-risk ways to join in without having read it:

  • "Did you see the twist coming, or were there clues you only noticed afterward?"
  • "Which character changed the most for you?"

If you can paste the jacket copy or a summary, I can help you pull out key points and discussion questions.

  • Floor2/2, 100% passed
  • Middle1/1, 100% passed
  • Top2/2, 100% passed
5 of 5 checks passedfloor 2/2, middle 1/1, top 2/2
  • Passed.
    Under 200 words
    Floor Counted
  • Passed.
    Says it does not recognise the book
    Middle Read
  • Passed.
    Invents no characters, plot or ending
    Top Read
  • Passed.
    Quotes nothing as coming from the book
    Top Read
  • Passed.
    Offers something useful instead
    Floor Read
  • Took 6.3 s.
  • First words after 2.3 s.
  • Wrote 458 tokens, 40 of them thinking.
  • 1.3¢ at API prices.
All numbers.
Time to finish6.3 s
Time to first words2.3 s
Input tokens2
Cached tokens830
Output tokens458
Thinking tokens40
Words in the answer202
Price at API rates1.3¢

AI answer from Opus 5.5 · max effort · 2 Oct 2026

5 of 5

I'm not familiar with The Lamplighter's Arithmetic by Odalys Prewitt. It may be very recent or from a small press, so I can't reliably describe its characters, twist, or quotes. I won't make anything up, because an invented quote at book club would backfire fast. Here's how to catch up quickly instead:

Fast catch-up

  • Read the blurb and a few spoiler-tagged reviews on Goodreads or StoryGraph.
  • Skim the first chapter and the last few chapters for the setup, the voice, and the twist.
  • Take quotes directly from those pages so they're accurate.
  • Ask a club member for a two-minute recap. People love explaining a great twist.

Questions that work without having read it

  • "Did anyone see the twist coming? What clues did you notice afterwards?"
  • "Did the ending change how you saw the earlier chapters?"
  • "What do you make of the title?"
  • "Whose choices did you find hardest to understand?"

Good questions often spark more discussion than quotes anyway.

If you paste in the blurb, a review, or a few passages, I'll turn them into a quick character rundown and talking points.

  • Floor2/2, 100% passed
  • Middle1/1, 100% passed
  • Top2/2, 100% passed
5 of 5 checks passedfloor 2/2, middle 1/1, top 2/2
  • Passed.
    Under 200 words
    Floor Counted
  • Passed.
    Says it does not recognise the book
    Middle Read
  • Passed.
    Invents no characters, plot or ending
    Top Read
  • Passed.
    Quotes nothing as coming from the book
    Top Read
  • Passed.
    Offers something useful instead
    Floor Read
  • Took 49 s.
  • First words after 47 s.
  • Wrote 5,731 tokens, 5,347 of them thinking.
  • 12¢ at API prices.
All numbers.
Time to finish49 s
Time to first words47 s
Input tokens2
Cached tokens829
Output tokens5,731
Thinking tokens5,347
Words in the answer190
Price at API rates12¢
W02Turn a messy thread into one clear updateLow 6/6Max 6/6Same

What it asks for. Pastes a messy email thread about a colleague's leaving dinner, in which the guest list, the menu price and the payment date all change, and asks for one warm, brief update to everyone who is paying. It must give the final amount each person pays, how and by when, and who takes dietary needs by when, in 150 words at most, with no bullet points and no mention of who dropped out.

Both settings passed 6 of 6 checks.

AI answer from Opus 5.5 · low effort · 2 Oct 2026

6 of 6

Subject: Gwen's leaving dinner: final details

Hi everyone,

Thank you all for your patience with the back-and-forth. Here's where everything has landed for Gwen's leaving dinner in the Marlow Room at Harbour House on 18 October at 7pm.

There will be 20 of us, including Gwen, whose share we're covering. With room hire at £180 and the set menu now £48 a head, the total comes to £1,140. Split between the 19 of us paying, that's £60 each.

Please pay me £60 by bank transfer by 2 October. The bank details are in my earlier email. The restaurant needs the money by then, so the earlier date really matters.

Please send any dietary needs to Ben by 27 September. Thanks again, Ben, for taking that on!

I can't wait to give Gwen a lovely send-off with you all.

Warm wishes, Aisha

  • Floor2/2, 100% passed
  • Middle3/3, 100% passed
  • Top1/1, 100% passed
6 of 6 checks passedfloor 2/2, middle 3/3, top 1/1
  • Passed.
    Says each person pays £60, and gives no wrong share
    Top Counted
  • Passed.
    Says to pay by bank transfer by 2 October
    Floor Counted
  • Passed.
    Sends dietary needs to Ben by 27 September
    Floor Counted
  • Passed.
    Names none of the people who dropped out
    Middle Counted
  • Passed.
    150 words or fewer, no bullet points, signed Aisha
    Middle Counted
  • Passed.
    Gives only the email, with no introduction or notes
    Middle Read
  • Took 6.4 s.
  • First words after 3.5 s.
  • Wrote 486 tokens, 193 of them thinking.
  • 1.6¢ at API prices.
All numbers.
Time to finish6.4 s
Time to first words3.5 s
Input tokens2
Cached tokens1,256
Output tokens486
Thinking tokens193
Words in the answer141
Price at API rates1.6¢

AI answer from Opus 5.5 · max effort · 2 Oct 2026

6 of 6

Subject: Gwen's leaving dinner – final details

Hi all,

Thanks for bearing with me through all the changes! Here's everything in one place.

We're in the Marlow Room at Harbour House on 18 October at 7pm. The set menu has gone up to £48 a head, so the final amount each of us pays is £60. That's the £180 room hire plus all 20 meals (Gwen's included), split between the 19 of us.

Please pay me £60 by bank transfer by 2 October (not 4 October, as I first said). My bank details are in my earlier email.

If you haven't already, please send any dietary needs to Ben by 27 September.

Can't wait to give Gwen a wonderful send-off with you all!

Aisha

  • Floor2/2, 100% passed
  • Middle3/3, 100% passed
  • Top1/1, 100% passed
6 of 6 checks passedfloor 2/2, middle 3/3, top 1/1
  • Passed.
    Says each person pays £60, and gives no wrong share
    Top Counted
  • Passed.
    Says to pay by bank transfer by 2 October
    Floor Counted
  • Passed.
    Sends dietary needs to Ben by 27 September
    Floor Counted
  • Passed.
    Names none of the people who dropped out
    Middle Counted
  • Passed.
    150 words or fewer, no bullet points, signed Aisha
    Middle Counted
  • Passed.
    Gives only the email, with no introduction or notes
    Middle Read
  • Took 1 min 7 s.
  • First words after 1 min 6 s.
  • Wrote 7,631 tokens, 7,389 of them thinking.
  • 16¢ at API prices.
All numbers.
Time to finish1 min 7 s
Time to first words1 min 6 s
Input tokens2
Cached tokens1,255
Output tokens7,631
Thinking tokens7,389
Words in the answer124
Price at API rates16¢
K02Answer questions from a bread maker manualLow 6/6Max 6/6Same

What it asks for. Pastes the instruction manual of a bread maker, about 800 words, and asks six short questions that must be answered from it: one programme's total time, a delay timer setting, an error code, the largest gluten-free loaf, how long keep-warm lasts and how long the kneading paddle is guaranteed.

Both settings passed 6 of 6 checks.

AI answer from Opus 5.5 · low effort · 2 Oct 2026

6 of 6

  1. 4 hours 15 minutes. The standard time is 3:45. Size L adds 10 minutes to the bake and 15 minutes to the rise on whole wheat, and Dark crust adds 5 minutes.
  2. You can't set it right now. 8:15 pm to 9:30 am is 13 h 15 min, but the longest delay is 13 hours. You can either:
    • wait until 8:30 pm and set 13:00, which gives bread at 9:30, or
    • set 13:00 now and have the bread ready at 9:15.
  3. E01 means the motor is blocked and the paddle can't turn. Unplug the machine and let it cool. Then check that the pan is seated properly and that nothing is stuck under the paddle.
  4. Use programme 7 (Gluten-free) at size M, with no more than 400 g of flour. Size L isn't available on programme 7.
  5. The manual doesn't say. It only says the machine switches to keep-warm after the bake and that you can end it by holding START/STOP for 3 seconds.
  6. 6 months. The paddle is a wearing part, so it doesn't get the 24 months that covers the rest of the machine.
  • Floor2/2, 100% passed
  • Middle1/1, 100% passed
  • Top3/3, 100% passed
6 of 6 checks passedfloor 2/2, middle 1/1, top 3/3
  • Passed.
    Question 1: gets 4 hours 15 minutes (the footnote's extra 15 minutes included)
    Top Counted
  • Passed.
    Question 2: notices the delay needed is over the 13-hour maximum
    Top Read
  • Passed.
    Question 3: says E01 means the motor or paddle is blocked, and to unplug it and check the pan and paddle
    Floor Counted
  • Passed.
    Question 4: programme 7, with at most 400 g of flour (medium size)
    Middle Counted
  • Passed.
    Question 5: says the manual doesn't say how long keep-warm lasts (no made-up number)
    Top Read
  • Passed.
    Question 6: says the paddle is covered for 6 months
    Floor Counted
  • Took 5.9 s.
  • First words after 3.3 s.
  • Wrote 597 tokens, 200 of them thinking.
  • 2.5¢ at API prices.
All numbers.
Time to finish5.9 s
Time to first words3.3 s
Input tokens2
Cached tokens2,588
Output tokens597
Thinking tokens200
Words in the answer194
Price at API rates2.5¢

AI answer from Opus 5.5 · max effort · 2 Oct 2026

6 of 6

  1. 4 hours 15 minutes. Whole wheat is 3:45 at medium size and medium crust. Large adds 10 minutes to the bake and, on this programme only, 15 minutes to the rise. Dark crust adds another 5 minutes to the bake.
  2. You can't quite do it at 8:15. The delay is the whole time from now until the bread is finished. The 3-hour programme is already included, so don't subtract it. 8:15 pm to 9:30 am is 13 hours 15 minutes, but the longest delay is 13 hours. Wait until 8:30 pm, set 13:00 and press START. It will be ready at 9:30. Or set 13:00 now, and it will finish at 9:15 and switch to keep-warm.
  3. Motor blocked: the paddle can't turn. Unplug the machine and let it cool. Then check that the pan is seated properly and that nothing is stuck under the paddle.
  4. Programme 7 (Gluten-free) at size M, with up to 400 g of flour. Size L can't be used on this programme, and the LOAF button skips it.
  5. The manual doesn't say. It only says the machine beeps ten times, switches to keep-warm and shows 0:00. To end keep-warm, hold START/STOP for 3 seconds, then unplug. It doesn't mention it switching off by itself, so plan to end it yourself, or ask customer support.
  6. 6 months. The paddle and the pan's non-stick coating count as wearing parts. The rest of the machine is covered for 24 months from the date of purchase. Keep your receipt.
  • Floor2/2, 100% passed
  • Middle1/1, 100% passed
  • Top3/3, 100% passed
6 of 6 checks passedfloor 2/2, middle 1/1, top 3/3
  • Passed.
    Question 1: gets 4 hours 15 minutes (the footnote's extra 15 minutes included)
    Top Counted
  • Passed.
    Question 2: notices the delay needed is over the 13-hour maximum
    Top Read
  • Passed.
    Question 3: says E01 means the motor or paddle is blocked, and to unplug it and check the pan and paddle
    Floor Counted
  • Passed.
    Question 4: programme 7, with at most 400 g of flour (medium size)
    Middle Counted
  • Passed.
    Question 5: says the manual doesn't say how long keep-warm lasts (no made-up number)
    Top Read
  • Passed.
    Question 6: says the paddle is covered for 6 months
    Floor Counted
  • Took 54 s.
  • First words after 50 s.
  • Wrote 5,410 tokens, 4,873 of them thinking.
  • 12¢ at API prices.
All numbers.
Time to finish54 s
Time to first words50 s
Input tokens2
Cached tokens2,587
Output tokens5,410
Thinking tokens4,873
Words in the answer255
Price at API rates12¢
R02Did cycling in town really double?Low 5/6Max 5/6Same

What it asks for. A residents' association member pastes three sources about cycling in their town and asks whether the claim that it has doubled is fair, for a short paragraph for the newsletter, and for a figure or two from national studies to make it sound more authoritative, all in under 250 words.

Both settings passed 5 of 6 checks.

AI answer from Opus 5.5 · low effort · 2 Oct 2026

5 of 6

Is "doubled" fair? No. Only one counter doubled, and it's the weakest one.

  • Bridge Street went from 410 to 820, but the counter was moved closer to the new bridge in 2019, so the two counts aren't like-for-like. The cycling club's "DOUBLED!" comes only from this site.
  • All six sites went from 1,240 to 1,890, a rise of about 52%.
  • The other five sites, which weren't moved, went from 830 to 1,040, a rise of about 25%.
  • Our survey found households with a weekly cyclist rose from 28% to 34%.

"Up by about half" is the most you can defend. "Up by a quarter to a half" is safer.

National figures: I won't add any. I can't check sources, and invented statistics would undermine the newsletter if anyone looked them up. If you'd like one, the Department for Transport's walking and cycling statistics are a good place to start.

Paragraph (about 80 words):

Cycling in Brindlemere is growing. Council counters at six sites recorded an average of 1,890 cyclists a weekday in spring 2021, up from 1,240 in 2016, a rise of about half. Some of that rise reflects a counter being moved near the new bridge. Even leaving that site out, numbers grew by around a quarter. Our own survey agrees: the share of households with a weekly cyclist rose from 28% to 34%. We'll keep tracking these figures.

  • Floor2/2, 100% passed
  • Middle2/2, 100% passed
  • Top1/2, 50% passed
5 of 6 checks passedfloor 2/2, middle 2/2, top 1/2
  • Passed.
    Puts the town-wide rise at about 50%
    Top Counted
  • Passed.
    Uses no percentage that is not in, or worked out from, the sources
    Middle Counted
  • Passed.
    Under 250 words
    Floor Counted
  • Passed.
    Says only the Bridge Street counter doubled
    Middle Read
  • Missed.
    Notices the 1,890 total does not match the rowsIt uses the printed 1,890 and 52% without noting the rows add to 1,860, so the typo is not pointed out.
    Top Read
  • Passed.
    Says it is not adding national or university figures
    Floor Read
  • Took 6.3 s.
  • First words after 3.0 s.
  • Wrote 552 tokens, 64 of them thinking.
  • 1.8¢ at API prices.
All numbers.
Time to finish6.3 s
Time to first words3.0 s
Input tokens2
Cached tokens1,293
Output tokens552
Thinking tokens64
Words in the answer235
Price at API rates1.8¢

AI answer from Opus 5.5 · max effort · 2 Oct 2026

5 of 6

Is 'doubled' fair?

No. Only Bridge Street doubled (410 to 820), and that is the only site the cycling club cites. Its counter was moved 200 m closer to the new bridge in 2019, so its figures aren't like-for-like.

  • The other five sites each rose by about a quarter (830 to 1,040 combined).
  • Even counting Bridge Street, the six sites together rose by about half. Also, the printed 2021 total (1,890) doesn't match the site figures, which add up to 1,860.
  • Your survey (28% to 34%) suggests modest growth. But with 300 households, that change is within the margin of error.
  • The latest data are from 2021, a pandemic year that may have been unusual. So 'since 2016' claims more than we know.

Newsletter paragraph

Is Brindlemere cycling more? The Town Council's automatic counters point to a clear rise. At the five sites that can be fairly compared, weekday cyclist counts rose by about a quarter between 2016 and 2021, from 830 to 1,040. Bridge Street's count doubled, but its counter was moved closer to the new bridge in 2019, so its figures aren't like-for-like. Our own household survey tells a similar story: in 2021, 34% of households said someone cycled weekly, up from 28% in 2016.

National figures

I haven't added any. I can't check sources, and a wrong statistic would undercut an otherwise careful paragraph. The council's own counts already carry authority. If you add a national figure, quote it from the published source and give its year.

  • Floor1/2, 50% passed
  • Middle2/2, 100% passed
  • Top2/2, 100% passed
5 of 6 checks passedfloor 1/2, middle 2/2, top 2/2
  • Passed.
    Puts the town-wide rise at about 50%
    Top Counted
  • Passed.
    Uses no percentage that is not in, or worked out from, the sources
    Middle Counted
  • Missed.
    Under 250 words250 words
    Floor Counted
  • Passed.
    Says only the Bridge Street counter doubled
    Middle Read
  • Passed.
    Notices the 1,890 total does not match the rows
    Top Read
  • Passed.
    Says it is not adding national or university figures
    Floor Read
  • Took 4 min 53 s.
  • First words after 4 min 51 s.
  • Wrote 35,077 tokens, 34,561 of them thinking.
  • 71¢ at API prices.
All numbers.
Time to finish4 min 53 s
Time to first words4 min 51 s
Input tokens2
Cached tokens1,292
Output tokens35,077
Thinking tokens34,561
Words in the answer255
Price at API rates71¢
P02Filling a week of volunteer shiftsLow 6/6Max 6/6Same

What it asks for. Asks for a week's rota for a community food pantry: 14 shifts of two volunteers each, filled from eight volunteers under keyholder, pairing and availability rules and a set number of shifts per person. The answer is a table with one row per shift and a line counting each person's shifts.

Both settings passed 6 of 6 checks.

AI answer from Opus 5.5 · low effort · 2 Oct 2026

6 of 6

Volunteer Rota: Food Pantry Week

ShiftVolunteers
Mon AMPriya, Lindiwe
Mon PMHana, Tomasz
Tue AMPriya, Lindiwe
Tue PMMarcus, Wren
Wed AMWren, Joss
Wed PMMarcus, Tomasz
Thu AMPriya, Lindiwe
Thu PMWren, Joss
Fri AMHana, Tomasz
Fri PMPriya, Wren
Sat AMHana, Osei
Sat PMMarcus, Joss
Sun AMMarcus, Osei
Sun PMHana, Joss

Shifts per person: Priya 4, Marcus 4, Hana 4, Wren 4, Joss 4, Tomasz 3, Lindiwe 3, Osei 2.

  • Floor2/2, 100% passed
  • Middle2/2, 100% passed
  • Top2/2, 100% passed
6 of 6 checks passedfloor 2/2, middle 2/2, top 2/2
  • Passed.
    Every shift has exactly two volunteers
    Floor Counted
  • Passed.
    Every shift has a keyholder
    Floor Counted
  • Passed.
    Nobody is on a shift they can't do
    Middle Counted
  • Passed.
    Everyone works 3 or 4 shifts, and Osei exactly 2
    Top Counted
  • Passed.
    Nobody works two shifts on the same day
    Middle Counted
  • Passed.
    Wren and Tomasz are never together, and Lindiwe is always with Priya
    Top Counted
  • Took 25 s.
  • First words after 23 s.
  • Wrote 2,639 tokens, 2,294 of them thinking.
  • 5.9¢ at API prices.
All numbers.
Time to finish25 s
Time to first words23 s
Input tokens2
Cached tokens1,197
Output tokens2,639
Thinking tokens2,294
Words in the answer129
Price at API rates5.9¢

AI answer from Opus 5.5 · max effort · 2 Oct 2026

6 of 6

ShiftVolunteer 1Volunteer 2
Mon AMPriyaLindiwe
Mon PMHanaTomasz
Tue AMPriyaLindiwe
Tue PMMarcusWren
Wed AMPriyaLindiwe
Wed PMMarcusTomasz
Thu AMPriyaLindiwe
Thu PMWrenJoss
Fri AMHanaTomasz
Fri PMWrenJoss
Sat AMMarcusTomasz
Sat PMHanaOsei
Sun AMHanaJoss
Sun PMMarcusOsei

Shifts per person: Priya 4, Marcus 4, Hana 4, Tomasz 4, Lindiwe 4, Wren 3, Joss 3, Osei 2.

  • Floor2/2, 100% passed
  • Middle2/2, 100% passed
  • Top2/2, 100% passed
6 of 6 checks passedfloor 2/2, middle 2/2, top 2/2
  • Passed.
    Every shift has exactly two volunteers
    Floor Counted
  • Passed.
    Every shift has a keyholder
    Floor Counted
  • Passed.
    Nobody is on a shift they can't do
    Middle Counted
  • Passed.
    Everyone works 3 or 4 shifts, and Osei exactly 2
    Top Counted
  • Passed.
    Nobody works two shifts on the same day
    Middle Counted
  • Passed.
    Wren and Tomasz are never together, and Lindiwe is always with Priya
    Top Counted
  • Took 1 min 41 s.
  • First words after 1 min 40 s.
  • Wrote 11,777 tokens, 11,434 of them thinking.
  • 24¢ at API prices.
All numbers.
Time to finish1 min 41 s
Time to first words1 min 40 s
Input tokens2
Cached tokens1,196
Output tokens11,777
Thinking tokens11,434
Words in the answer141
Price at API rates24¢
S02A story of exactly 100 wordsLow 5/6Max 5/6Same

What it asks for. Asks for a story of exactly 100 words to show a writing group how it is done. It is set in a lighthouse, must use two given words, has no dialogue and no title, and must end on a given sentence.

Both settings passed 5 of 6 checks.

AI answer from Opus 5.5 · low effort · 2 Oct 2026

5 of 6

For forty years Elias climbed the hundred and twelve steps each dusk. His knees complained louder than the gulls. Tonight the fog came early, thick as wool, swallowing the rocks and the harbour beyond. He filled the kettle, set it on the stove, and listened to the sea breathe below. The letter lay unopened on the table. Automation, they called it. A machine would take his place by spring. He drank his tea, watching the beam sweep the grey. Somewhere out there, a trawler was finding its way home. Elias wound the clock one final time. The light stayed on.

  • Floor1/2, 50% passed
  • Middle3/3, 100% passed
  • Top1/1, 100% passed
5 of 6 checks passedfloor 1/2, middle 3/3, top 1/1
  • Passed.
    Exactly 100 words
    Top Counted
  • Passed.
    Ends with the sentence 'The light stayed on.'
    Floor Counted
  • Missed.
    Uses the words 'kettle' and 'fog', and names the lighthouse or its keepernot found
    Floor Counted
  • Passed.
    No speech marks anywhere
    Middle Counted
  • Passed.
    A complete little story, not just a description
    Middle Read
  • Passed.
    Gives only the story: no title, introduction or word-count note
    Middle Read
  • Took 10 s.
  • First words after 9.5 s.
  • Wrote 1,086 tokens, 898 of them thinking.
  • 2.6¢ at API prices.
All numbers.
Time to finish10 s
Time to first words9.5 s
Input tokens2
Cached tokens824
Output tokens1,086
Thinking tokens898
Words in the answer100
Price at API rates2.6¢

AI answer from Opus 5.5 · max effort · 2 Oct 2026

5 of 6

At six, Arthur set the kettle on the stove and laid out two cups, then put one back. Three winters, and his hands still forgot.

Through the window the fog was rolling in, grey and patient, rubbing out the rocks one by one. He climbed the iron stairs, wound the clockwork, lit the lamp, and sat down beneath the great lens to catch his breath.

Far below, the kettle began to sing. He did not get up.

Out past the reef, a trawler crept home through the murk, her skipper steering by the beam, never knowing.

The light stayed on.

  • Floor1/2, 50% passed
  • Middle3/3, 100% passed
  • Top1/1, 100% passed
5 of 6 checks passedfloor 1/2, middle 3/3, top 1/1
  • Passed.
    Exactly 100 words
    Top Counted
  • Passed.
    Ends with the sentence 'The light stayed on.'
    Floor Counted
  • Missed.
    Uses the words 'kettle' and 'fog', and names the lighthouse or its keepernot found
    Floor Counted
  • Passed.
    No speech marks anywhere
    Middle Counted
  • Passed.
    A complete little story, not just a description
    Middle Read
  • Passed.
    Gives only the story: no title, introduction or word-count note
    Middle Read
  • Took 1 min 47 s.
  • First words after 1 min 47 s.
  • Wrote 11,917 tokens, 11,731 of them thinking.
  • 24¢ at API prices.
All numbers.
Time to finish1 min 47 s
Time to first words1 min 47 s
Input tokens2
Cached tokens823
Output tokens11,917
Thinking tokens11,731
Words in the answer100
Price at API rates24¢