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 Fable 5.1

Claude Fable 5.1

Released
Tested
Settings
Low effort and Max effort

In short

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

Fable 5.1 answered all 24 prompts at both efforts, scoring 95 at low effort and 97 at max. It passed every hidden test on every code prompt at both settings; at max effort only the dashboard ran out of room, and its page still passed every test but the phone layout.

At low effort Fable 5.1 scored level with Fable 5 at low effort, and at max effort it scored level with Fable 5 at max effort. Overall it scored level at both efforts, with a median low effort answer of 20.3 seconds and $0.107.

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

Fable 5.1

24 prompts, every check counted

Low effort

95

  • Floor47/49, 96% passed
  • Middle55/58, 95% passed
  • Top62/65, 95% passed

Median answer 20 s, 11¢.

Max effort

97

  • Floor49/49, 100% passed
  • Middle56/58, 97% passed
  • Top62/65, 95% passed

Median answer 2 min 15 s, 61¢.

Max passed 3 more checks, cost 7.4 times as much and took 8.0 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 both efforts: it passed every hidden test on every code prompt, including the query for customers who left and came back and the contacts import. F05 F06
  • Web pages: the kanban board and the garden page fixes passed every page test at both efforts, and the landing page did at max effort. B03 B05 B01
  • Careful reading at both efforts: it found the wrong line on the market receipt, said it did not know the invented novel, and kept its bread maker answers to what the manual says. I01 H02 K02
  • The volunteer rota, the text to the plumber and the story of an exact length met every check at both efforts; at max effort so did the feature spec and the microservices answer. P02 W01 S02 A04 A02

Stumbled on

  • At max effort the dashboard from the mockup ran out of room before it finished, and its page failed the phone layout test. B02
  • The column rename plan dropped the old column before old app versions had stopped using it, at both efforts. A03
  • It took the cycling figures' printed total on trust at both efforts, and at low effort the paragraph ran over its word limit and missed the size of the rise. R02
  • At max effort the Minesweeper game failed the reveal rules test, and the booking plan left a working booking flow out of its first phase. B04 A01

What max effort changed

  • Overall it scored level at both efforts: 5 prompts gained at max effort, 3 lost ground and 16 stayed the same, for about 7.4 times the cost and 8 times the time.
  • Max effort gained on the cycling paragraph, from 3 of 6 checks to 5 of 6, and on the feature spec and the microservices answer, which met every check at max. R02 A04 A02
  • It lost a little on the dashboard, from 7 of 7 checks to 6 of 7, and the Minesweeper game, from 9 of 9 to 8 of 9; thinking took 428,184 tokens at max against 14,247 at low. 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
    98
  • Max effort
    95

Code

  • Low effort
    100
  • Max effort
    100

Planning and architecture

  • Low effort
    91
  • Max effort
    94

Everyday

  • Low effort
    92
  • Max effort
    98

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 8/9Max 9/9Max +1

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.

Max effort passed 1 more check than low.

AI answer from Fable 5.1 · 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 index.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>Brindlebill – Simple invoicing for freelancers</title>
<meta name="description" content="Brindlebill is a simple invoicing app for freelancers. Send invoices in a minute, send gentle reminders, and get paid by card or bank.">
<style>
  :root {
    --ink: #1f2430;
    --muted: #5a6270;
    --brand: #2f6f5e;
    --brand-dark: #245548;
    --bg: #fbfaf7;
    --card: #ffffff;
    --line: #e4e2dc;
  }
  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 18px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
  }
  h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5rem; }
  h1 { font-size: clamp(2rem, 6vw, 3.25rem); }
  h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); text-align: center; margin-bottom: 1.5rem; }
  h3 { font-size: 1.25rem; }
  p { margin: 0 0 1rem; }
  a { color: var(--brand); }

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

  header.site {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 0;
  }
  .logo { font-weight: 700; font-size: 1.25rem; text-decoration: none; color: var(--ink); }
  nav a { margin-left: 1.25rem; text-decoration: none; color: var(--muted); }
  nav a:hover { color: var(--ink); }
  @media (max-width: 520px) { nav { display: none; } }

  .btn {
    display: inline-block;
    background: var(--brand);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.85rem 1.5rem;
    border-radius: 8px;
    border: 0;
    cursor: pointer;
    min-height: 44px;
  }
  .btn:hover, .btn:focus-visible { background: var(--brand-dark); }
  .btn.outline { background: transparent; color: var(--brand); border: 2px solid var(--brand); }
  .btn.outline:hover { background: var(--brand); color: #fff; }

  .hero { text-align: center; padding: 4rem 0 3.5rem; }
  .hero p.pitch { font-size: 1.25rem; color: var(--muted); max-width: 36rem; margin: 0 auto 2rem; }
  .hero small { display: block; margin-top: 0.75rem; color: var(--muted); }

  .grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.5rem;
  }
  .card p:last-child { margin-bottom: 0; color: var(--muted); }

  /* Pricing */
  .toggle {
    display: flex; justify-content: center; align-items: center; gap: 0.75rem;
    margin-bottom: 2rem; flex-wrap: wrap;
  }
  .switch {
    position: relative; width: 56px; height: 32px;
    background: #cfcbc2; border-radius: 999px; border: 0; cursor: pointer; padding: 0;
  }
  .switch::after {
    content: ""; position: absolute; top: 4px; left: 4px;
    width: 24px; height: 24px; background: #fff; border-radius: 50%;
    transition: transform 0.2s;
  }
  .switch[aria-checked="true"] { background: var(--brand); }
  .switch[aria-checked="true"]::after { transform: translateX(24px); }
  .switch:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
  .toggle .label { font-weight: 600; }
  .toggle .label.off { color: var(--muted); font-weight: 400; }
  .save {
    background: #e6f2ee; color: var(--brand-dark);
    font-size: 1rem; padding: 0.2rem 0.6rem; border-radius: 999px;
  }

  .plan { display: flex; flex-direction: column; }
  .plan.featured { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
  .plan .price { font-size: 2.25rem; font-weight: 700; margin: 0.5rem 0 0; }
  .plan .per { color: var(--muted); font-size: 1rem; margin-bottom: 1rem; }
  .plan ul { padding-left: 1.2rem; margin: 0 0 1.5rem; flex: 1; }
  .plan li { margin-bottom: 0.4rem; }
  .plan .btn { text-align: center; }

  /* FAQ */
  .faq { max-width: 720px; margin: 0 auto; }
  .faq-item { border-bottom: 1px solid var(--line); }
  .faq-item h3 { margin: 0; font-size: 1.1rem; }
  .faq-q {
    width: 100%; background: none; border: 0; text-align: left;
    font: inherit; font-weight: 600; color: var(--ink);
    padding: 1rem 0; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  }
  .faq-q::after { content: "+"; font-size: 1.5rem; color: var(--brand); flex-shrink: 0; }
  .faq-q[aria-expanded="true"]::after { content: "–"; }
  .faq-q:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
  .faq-a { padding: 0 0 1rem; color: var(--muted); }
  .faq-a[hidden] { display: none; }

  .cta { text-align: center; }
  footer { text-align: center; padding: 2rem 1rem; color: var(--muted); font-size: 1rem; }
</style>
</head>
<body>

<div class="wrap">
  <header class="site">
    <a class="logo" href="#top">Brindlebill</a>
    <nav aria-label="Main">
      <a href="#features">Features</a>
      <a href="#pricing">Pricing</a>
      <a href="#faq">FAQ</a>
    </nav>
  </header>
</div>

<main id="top">

  <section class="hero">
    <div class="wrap">
      <h1>Invoicing that stays out of your way</h1>
      <p class="pitch">Brindlebill helps freelancers send invoices, nudge late payers, and get paid – without the busywork.</p>
      <a class="btn" href="#signup">Start free trial</a>
      <small>14 days free. No card needed.</small>
    </div>
  </section>

  <section id="features">
    <div class="wrap">
      <h2>Everything you need, nothing you don't</h2>
      <div class="grid">
        <article class="card">
          <h3>Invoices in a minute</h3>
          <p>Pick a client, add your line items, and send a clean PDF invoice before your coffee goes cold.</p>
        </article>
        <article class="card">
          <h3>Gentle reminders</h3>
          <p>Brindlebill follows up on overdue invoices with polite, automatic emails so you don't have to.</p>
        </article>
        <article class="card">
          <h3>Card and bank payments</h3>
          <p>Clients pay straight from the invoice by card or bank transfer, and you see the money land.</p>
        </article>
      </div>
    </div>
  </section>

  <section id="pricing">
    <div class="wrap">
      <h2>Simple pricing</h2>

      <div class="toggle">
        <span class="label" id="label-monthly">Monthly</span>
        <button class="switch" id="billing-switch" role="switch" aria-checked="false" aria-label="Bill yearly"></button>
        <span class="label off" id="label-yearly">Yearly</span>
        <span class="save">2 months free</span>
      </div>

      <div class="grid">
        <article class="card plan">
          <h3>Starter</h3>
          <p class="price" data-monthly="9" data-yearly="90">$9</p>
          <p class="per">per month</p>
          <ul>
            <li>5 clients</li>
            <li>PDF invoices</li>
          </ul>
          <a class="btn outline" href="#signup">Start free trial</a>
        </article>

        <article class="card plan featured">
          <h3>Pro</h3>
          <p class="price" data-monthly="19" data-yearly="190">$19</p>
          <p class="per">per month</p>
          <ul>
            <li>Unlimited clients</li>
            <li>Automatic reminders</li>
            <li>Your own logo</li>
          </ul>
          <a class="btn" href="#signup">Start free trial</a>
        </article>

        <article class="card plan">
          <h3>Team</h3>
          <p class="price" data-monthly="49" data-yearly="490">$49</p>
          <p class="per">per month</p>
          <ul>
            <li>Everything in Pro</li>
            <li>5 seats</li>
            <li>A shared client list</li>
          </ul>
          <a class="btn outline" href="#signup">Start free trial</a>
        </article>
      </div>
    </div>
  </section>

  <section id="faq">
    <div class="wrap">
      <h2>Frequently asked questions</h2>
      <div class="faq">

        <div class="faq-item">
          <h3><button class="faq-q" aria-expanded="false" aria-controls="faq-1">Can I cancel any time?</button></h3>
          <div class="faq-a" id="faq-1" hidden>
            <p>Yes. Cancel from your account page and you won't be charged again. Nothing is locked in.</p>
          </div>
        </div>

        <div class="faq-item">
          <h3><button class="faq-q" aria-expanded="false" aria-controls="faq-2">Do my clients need an account?</button></h3>
          <div class="faq-a" id="faq-2" hidden>
            <p>No. They open a link, see the invoice and pay. They never have to sign up.</p>
          </div>
        </div>

        <div class="faq-item">
          <h3><button class="faq-q" aria-expanded="false" aria-controls="faq-3">Which currencies can I invoice in?</button></h3>
          <div class="faq-a" id="faq-3" hidden>
            <p>You can invoice in 30 currencies, and each invoice shows the amount in your client's currency.</p>
          </div>
        </div>

        <div class="faq-item">
          <h3><button class="faq-q" aria-expanded="false" aria-controls="faq-4">What happens when the free trial ends?</button></h3>
          <div class="faq-a" id="faq-4" hidden>
            <p>You pick a plan. If you don't, your account switches to view-only and your invoices stay safe for 90 days.</p>
          </div>
        </div>

      </div>
    </div>
  </section>

  <section id="signup" class="cta">
    <div class="wrap">
      <h2>Ready to get paid faster?</h2>
      <p>Try Brindlebill free for 14 days. No card needed.</p>
      <a class="btn" href="#signup">Start free trial</a>
    </div>
  </section>

</main>

<footer>
  &copy; <span id="year"></span> Brindlebill
</footer>

<script>
  // Monthly / Yearly pricing switch
  (function () {
    var sw = document.getElementById('billing-switch');
    var prices = document.querySelectorAll('.plan .price');
    var pers = document.querySelectorAll('.plan .per');
    var labelMonthly = document.getElementById('label-monthly');
    var labelYearly = document.getElementById('label-yearly');

    function render(yearly) {
      sw.setAttribute('aria-checked', yearly ? 'true' : 'false');
      labelMonthly.classList.toggle('off', yearly);
      labelYearly.classList.toggle('off', !yearly);
      for (var i = 0; i < prices.length; i++) {
        var amount = yearly ? prices[i].dataset.yearly : prices[i].dataset.monthly;
        prices[i].textContent = '$' + amount;
        pers[i].textContent = yearly ? 'per year' : 'per month';
      }
    }

    sw.addEventListener('click', function () {
      render(sw.getAttribute('aria-checked') !== 'true');
    });
    labelMonthly.addEventListener('click', function () { render(false); });
    labelYearly.addEventListener('click', function () { render(true); });
  })();

  // FAQ accordion
  (function () {
    var buttons = document.querySelectorAll('.faq-q');
    for (var i = 0; i < buttons.length; i++) {
      buttons[i].addEventListener('click', function () {
        var open = this.getAttribute('aria-expanded') === 'true';
        var panel = document.getElementById(this.getAttribute('aria-controls'));
        this.setAttribute('aria-expanded', open ? 'false' : 'true');
        panel.hidden = open;
      });
    }
  })();

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

</body>
</html>

A few notes:

  • Yearly prices are the monthly price × 10 (two months free), shown as the full year: Starter $90, Pro $190, Team $490. The label switches between "per month" and "per year".
  • Font sizes: body text is 18px, and the smallest text on the page (footer, "per month", the "2 months free" badge) is 16px.
  • Headings: one h1 for the headline, h2 for each section, h3 for features, plans and FAQ questions.
  • Accessibility: the billing switch uses role="switch", FAQ questions are real buttons with aria-expanded, and all tap targets are at least 44px tall.
  • The "Start free trial" buttons currently link to the #signup section. Replace those hrefs with your real sign-up URL when you have one.
  • The 14-day trial and "no card needed" lines in the hero and sign-up section are my placeholders – edit them to match your actual trial terms.
  • Floor2/2, 100% passed
  • Middle3/4, 75% passed
  • Top3/3, 100% passed
8 of 9 checks passedfloor 2/2, middle 3/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
  • Missed.
    One h1, no skipped heading levels, text 16 px or larger, enough contrasttest group failed
    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 49 s.
  • First words after 2.7 s.
  • Wrote 5,226 tokens, 59 of them thinking.
  • 27¢ at API prices.
All numbers.
Time to finish49 s
Time to first words2.7 s
Input tokens1,273
Cached tokens0
Output tokens5,226
Thinking tokens59
Words in the answer1,361
Price at API rates27¢

AI answer from Fable 5.1 · 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.

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 – invoicing for freelancers</title>
  <meta name="description" content="Brindlebill is a small invoicing app 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="#fbf8f3">
  <style>
    /* ---------- Design tokens ---------- */
    :root {
      --bg: #fbf8f3;
      --surface: #ffffff;
      --surface-2: #f4ede3;
      --text: #241d18;
      --muted: #5c524a;
      --line: #e5dccf;
      --accent: #b24d14;
      --accent-dark: #8c3b0e;
      --accent-soft: #fbe9dd;
      --focus: #1f5fbf;
      --paid-bg: #e4f3ea;
      --paid-text: #1f6f43;
      --radius: 1rem;
      --shadow: 0 1px 2px rgba(36, 29, 24, .06), 0 16px 40px -20px rgba(36, 29, 24, .3);
    }

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

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

    body {
      margin: 0;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
      font-size: 1rem; /* 16px – nothing on the page is set smaller than this */
      line-height: 1.6;
      color: var(--text);
      background: var(--bg);
    }

    button, input { font: inherit; color: inherit; }
    fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
    ul { margin: 0; padding: 0; }

    h1, h2, h3 { margin: 0 0 .75rem; line-height: 1.15; letter-spacing: -.01em; }
    h1 { font-size: clamp(2.125rem, 1.5rem + 3vw, 3.5rem); }
    h2 { font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem); }
    h3 { font-size: 1.3rem; }
    p { margin: 0 0 1rem; }
    a { color: var(--accent-dark); }

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

    @media (prefers-reduced-motion: reduce) {
      html { scroll-behavior: auto; }
      *, *::before, *::after { transition: none !important; }
    }

    .container { max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }
    .section { padding: 3.5rem 0; scroll-margin-top: 5rem; }
    @media (min-width: 48em) { .section { padding: 5rem 0; } }

    .section-head { max-width: 40rem; margin-bottom: 2.25rem; }
    .section-head p { font-size: 1.1rem; color: var(--muted); margin: 0; }

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

    .skip-link {
      position: absolute; top: -100%; left: 1rem; z-index: 100;
      padding: .75rem 1rem;
      background: var(--text); color: #fff;
      border-radius: .5rem; text-decoration: none; font-weight: 600;
    }
    .skip-link:focus { top: 1rem; }

    /* ---------- Buttons ---------- */
    .btn {
      display: inline-flex; align-items: center; justify-content: center;
      min-height: 3rem; padding: .75rem 1.4rem;
      border: 2px solid var(--accent); border-radius: .75rem;
      background: var(--accent); color: #fff;
      font-size: 1rem; font-weight: 600; line-height: 1.2;
      text-decoration: none; cursor: pointer;
      transition: background-color .15s ease, border-color .15s ease, color .15s ease;
    }
    .btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
    .btn-secondary { background: transparent; color: var(--accent-dark); }
    .btn-secondary:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-dark); }
    .btn-block { width: 100%; }

    /* ---------- Header ---------- */
    .site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
    @media (min-width: 48em) { .site-header { position: sticky; top: 0; z-index: 50; } }
    .header-inner {
      display: flex; flex-wrap: wrap; align-items: center;
      gap: .75rem 1.5rem; padding-top: .9rem; padding-bottom: .9rem;
    }
    .brand {
      margin-right: auto;
      font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em;
      color: var(--text); text-decoration: none;
    }
    .site-nav { display: flex; gap: 1.25rem; }
    .site-nav a { display: inline-block; padding: .5rem 0; color: var(--text); font-weight: 500; text-decoration: none; }
    .site-nav a:hover { color: var(--accent-dark); text-decoration: underline; }
    @media (max-width: 47.99em) {
      .site-nav { order: 3; flex-basis: 100%; }
      .header-cta { display: none; } /* the hero button is right below on phones */
    }

    /* ---------- Hero ---------- */
    .hero { padding: 3rem 0 3.5rem; }
    .hero-inner { display: grid; gap: 2.5rem; align-items: center; }
    @media (min-width: 60em) {
      .hero { padding: 5rem 0; }
      .hero-inner { grid-template-columns: 1.1fr .9fr; gap: 4rem; }
    }
    .hero h1 { margin-bottom: 1rem; }
    .pitch { font-size: 1.2rem; color: var(--muted); max-width: 34rem; margin-bottom: 1.75rem; }
    .hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1rem; }
    @media (max-width: 30em) { .hero-actions .btn { flex: 1 1 100%; } }
    .hero-note { color: var(--muted); margin: 0; }

    /* Decorative invoice card, drawn with CSS only */
    .invoice {
      max-width: 26rem; margin: 0 auto; padding: 1.5rem;
      background: var(--surface); border: 1px solid var(--line);
      border-radius: var(--radius); box-shadow: var(--shadow);
    }
    .invoice-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
    .invoice-label { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
    .invoice-number { font-size: 1.5rem; font-weight: 700; }
    .pill { display: inline-block; padding: .25rem .8rem; border-radius: 999px; font-weight: 600; }
    .pill-paid { background: var(--paid-bg); color: var(--paid-text); }
    .invoice-client { padding: .75rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); }
    .invoice-client strong { color: var(--text); }
    .invoice-lines { list-style: none; padding: .5rem 0; }
    .invoice-lines li { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; }
    .invoice-total { display: flex; justify-content: space-between; padding-top: .75rem; border-top: 2px solid var(--text); font-size: 1.25rem; font-weight: 700; }
    .invoice-foot { margin-top: 1rem; color: var(--muted); }

    /* ---------- Cards and grids ---------- */
    .grid-3 { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
    @media (min-width: 60em) { .grid-3 { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }
    .card { padding: 1.75rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }

    /* ---------- Features ---------- */
    .feature-icon {
      display: grid; place-items: center;
      width: 3rem; height: 3rem; margin-bottom: 1.25rem;
      border-radius: .9rem; background: var(--accent-soft); color: var(--accent-dark);
    }
    .feature-icon svg { width: 1.5rem; height: 1.5rem; display: block; }
    .feature p { margin: 0; color: var(--muted); }

    /* ---------- Pricing ---------- */
    .pricing { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
    .billing { display: flex; flex-direction: column; align-items: center; gap: .75rem; margin-bottom: 2.5rem; text-align: center; }
    .segmented { display: inline-flex; padding: .3rem; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
    .segmented label { position: relative; cursor: pointer; }
    .segmented span {
      display: inline-block; min-width: 7rem; padding: .65rem 1.25rem;
      border-radius: 999px; text-align: center; font-weight: 600; color: var(--muted);
      transition: background-color .15s ease, color .15s ease;
    }
    .segmented input:checked + span { background: var(--accent); color: #fff; }
    .segmented input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
    .billing-hint { margin: 0; color: var(--muted); }

    .plan { display: flex; flex-direction: column; }
    .plan h3 { margin-bottom: .25rem; }
    .plan-desc { color: var(--muted); margin-bottom: 1.25rem; }
    .price { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; margin-bottom: .25rem; }
    .amount { font-size: 2.75rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
    .per { color: var(--muted); }
    .billing-note { color: var(--muted); margin-bottom: 1.5rem; }
    .plan-features { list-style: none; display: grid; gap: .6rem; margin-bottom: 1.75rem; }
    .plan-features li { position: relative; padding-left: 1.75rem; }
    .plan-features li::before {
      content: ""; position: absolute; left: .1rem; top: .5em;
      width: .9rem; height: .45rem;
      border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
      transform: rotate(-45deg);
    }
    .plan .btn { margin-top: auto; }

    /* ---------- FAQ ---------- */
    .faq-list { max-width: 46rem; }
    .faq-item { border-bottom: 1px solid var(--line); }
    .faq-item:first-child { border-top: 1px solid var(--line); }
    .faq-item h3 { margin: 0; font-size: 1.15rem; }
    .faq-trigger {
      display: flex; align-items: center; justify-content: space-between; gap: 1rem;
      width: 100%; padding: 1.1rem 0; margin: 0;
      background: none; border: 0; text-align: left;
      font-weight: 600; color: var(--text); cursor: pointer;
    }
    .faq-trigger:hover { color: var(--accent-dark); }
    .faq-icon { position: relative; flex: 0 0 auto; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--accent-soft); }
    .faq-icon::before, .faq-icon::after {
      content: ""; position: absolute; top: 50%; left: 50%;
      width: .8rem; height: 2px; background: var(--accent-dark);
      transform: translate(-50%, -50%);
      transition: transform .2s ease;
    }
    .faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
    .faq-trigger[aria-expanded="true"] .faq-icon::after { transform: translate(-50%, -50%) rotate(0); }
    .faq-panel { padding-bottom: 1.25rem; color: var(--muted); }
    .faq-panel p { margin: 0; }

    /* ---------- Final call to action ---------- */
    .cta-box { padding: 3rem 1.5rem; text-align: center; background: var(--text); color: #fff; border-radius: 1.5rem; }
    .cta-box h2 { color: #fff; }
    .cta-box p { font-size: 1.1rem; color: #d9d0c6; margin-bottom: 1.75rem; }
    .cta-box .btn { background: #fff; border-color: #fff; color: var(--accent-dark); }
    .cta-box .btn:hover { background: var(--accent-soft); border-color: var(--accent-soft); }

    /* ---------- Footer ---------- */
    .site-footer { padding: 2rem 0; border-top: 1px solid var(--line); color: var(--muted); }
    .footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem 2rem; }
    .footer-brand { font-weight: 700; color: var(--text); }
    .footer-nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
    .footer-nav a { color: var(--muted); }
  </style>
</head>
<body>
  <a class="skip-link" href="#main">Skip to content</a>

  <header class="site-header" id="top">
    <div class="container header-inner">
      <a class="brand" href="#top">Brindlebill</a>
      <nav class="site-nav" aria-label="Page sections">
        <a href="#features">Features</a>
        <a href="#pricing">Pricing</a>
        <a href="#faq">FAQ</a>
      </nav>
      <a class="btn btn-secondary header-cta" href="#" data-signup>Start free trial</a>
    </div>
  </header>

  <main id="main">

    <!-- Hero -->
    <section class="hero" aria-labelledby="hero-title">
      <div class="container hero-inner">
        <div>
          <h1 id="hero-title">Invoices out in a minute. Money in without the chasing.</h1>
          <p class="pitch">Brindlebill is a small invoicing app for freelancers: send a clean invoice, let it nudge late payers politely, and take card or bank payments straight from the invoice.</p>
          <div class="hero-actions">
            <a class="btn" href="#" data-signup>Start free trial</a>
            <a class="btn btn-secondary" href="#pricing">See pricing</a>
          </div>
          <p class="hero-note">Try it free, then pick a plan.</p>
        </div>

        <div class="invoice" aria-hidden="true">
          <div class="invoice-top">
            <div>
              <div class="invoice-label">Invoice</div>
              <div class="invoice-number">#0042</div>
            </div>
            <span class="pill pill-paid">Paid</span>
          </div>
          <div class="invoice-client">Billed to <strong>Fernwood Studio</strong></div>
          <ul class="invoice-lines">
            <li><span>Brand identity</span><span>$1,200</span></li>
            <li><span>Website copy</span><span>$600</span></li>
          </ul>
          <div class="invoice-total"><span>Total</span><span>$1,800</span></div>
          <div class="invoice-foot">Paid by card, two days after sending.</div>
        </div>
      </div>
    </section>

    <!-- Features -->
    <section class="section" id="features" aria-labelledby="features-title">
      <div class="container">
        <div class="section-head">
          <h2 id="features-title">Everything you need to get paid</h2>
          <p>No bookkeeping suite to learn. Just the three things a freelancer actually needs to get paid.</p>
        </div>
        <div class="grid-3">
          <div class="card feature">
            <div class="feature-icon">
              <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">
                <circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/>
              </svg>
            </div>
            <h3>Invoices in a minute</h3>
            <p>Pick a client, add your line items and send. Brindlebill fills in your details, the invoice number and the due date for you.</p>
          </div>
          <div class="card feature">
            <div class="feature-icon">
              <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">
                <path d="M6 16v-5a6 6 0 0 1 12 0v5l1.5 2h-15z"/><path d="M10 20a2 2 0 0 0 4 0"/>
              </svg>
            </div>
            <h3>Gentle reminders</h3>
            <p>If an invoice goes past due, Brindlebill sends a polite nudge on your behalf, so you never have to write that awkward email.</p>
          </div>
          <div class="card feature">
            <div class="feature-icon">
              <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">
                <rect x="3" y="6" width="18" height="12" rx="2"/><path d="M3 10h18"/><path d="M7 14.5h4"/>
              </svg>
            </div>
            <h3>Card and bank payments</h3>
            <p>Clients pay by card or bank transfer from the invoice itself. No account to create and nothing to install.</p>
          </div>
        </div>
      </div>
    </section>

    <!-- Pricing -->
    <section class="section pricing" id="pricing" aria-labelledby="pricing-title">
      <div class="container">
        <div class="section-head">
          <h2 id="pricing-title">Simple pricing</h2>
          <p>Every plan starts with a free trial. Pay monthly, or pay yearly and get two months free.</p>
        </div>

        <div class="billing">
          <fieldset>
            <legend class="visually-hidden">Billing period</legend>
            <div class="segmented">
              <label>
                <input class="visually-hidden" type="radio" name="billing" value="monthly" checked>
                <span>Monthly</span>
              </label>
              <label>
                <input class="visually-hidden" type="radio" name="billing" value="yearly">
                <span>Yearly</span>
              </label>
            </div>
          </fieldset>
          <p class="billing-hint"
             data-monthly="Switch to yearly and get two months free."
             data-yearly="Two months free. Yearly prices are for the whole year.">Switch to yearly and get two months free.</p>
        </div>

        <div class="grid-3">
          <div class="card plan">
            <h3>Starter</h3>
            <p class="plan-desc">For your first few clients.</p>
            <p class="price">
              <span class="amount" data-monthly="$9" data-yearly="$90">$9</span>
              <span class="per" data-monthly="per month" data-yearly="per year">per month</span>
            </p>
            <p class="billing-note" data-monthly="Billed monthly." data-yearly="Billed once a year.">Billed monthly.</p>
            <ul class="plan-features">
              <li>5 clients</li>
              <li>PDF invoices</li>
            </ul>
            <a class="btn btn-block" href="#" data-signup>Start free trial</a>
          </div>

          <div class="card plan">
            <h3>Pro</h3>
            <p class="plan-desc">For busy freelancers.</p>
            <p class="price">
              <span class="amount" data-monthly="$19" data-yearly="$190">$19</span>
              <span class="per" data-monthly="per month" data-yearly="per year">per month</span>
            </p>
            <p class="billing-note" data-monthly="Billed monthly." data-yearly="Billed once a year.">Billed monthly.</p>
            <ul class="plan-features">
              <li>Unlimited clients</li>
              <li>Automatic reminders</li>
              <li>Your own logo</li>
            </ul>
            <a class="btn btn-block" href="#" data-signup>Start free trial</a>
          </div>

          <div class="card plan">
            <h3>Team</h3>
            <p class="plan-desc">For small studios.</p>
            <p class="price">
              <span class="amount" data-monthly="$49" data-yearly="$490">$49</span>
              <span class="per" data-monthly="per month" data-yearly="per year">per month</span>
            </p>
            <p class="billing-note" data-monthly="Billed monthly." data-yearly="Billed once a year.">Billed monthly.</p>
            <ul class="plan-features">
              <li>Everything in Pro</li>
              <li>5 seats</li>
              <li>A shared client list</li>
            </ul>
            <a class="btn btn-block" href="#" data-signup>Start free trial</a>
          </div>
        </div>
      </div>
    </section>

    <!-- FAQ -->
    <section class="section" id="faq" aria-labelledby="faq-title">
      <div class="container">
        <div class="section-head">
          <h2 id="faq-title">Questions, answered</h2>
        </div>
        <div class="faq-list">

          <div class="faq-item">
            <h3>
              <button class="faq-trigger" type="button" id="faq-q1" aria-controls="faq-a1" aria-expanded="true">
                Can I cancel any time?
                <span class="faq-icon" aria-hidden="true"></span>
              </button>
            </h3>
            <div class="faq-panel" id="faq-a1">
              <p>Yes. Cancel from your account page and you won't be charged again. Nothing is locked in.</p>
            </div>
          </div>

          <div class="faq-item">
            <h3>
              <button class="faq-trigger" type="button" id="faq-q2" aria-controls="faq-a2" aria-expanded="true">
                Do my clients need an account?
                <span class="faq-icon" aria-hidden="true"></span>
              </button>
            </h3>
            <div class="faq-panel" id="faq-a2">
              <p>No. They open a link, see the invoice and pay. They never have to sign up.</p>
            </div>
          </div>

          <div class="faq-item">
            <h3>
              <button class="faq-trigger" type="button" id="faq-q3" aria-controls="faq-a3" aria-expanded="true">
                Which currencies can I invoice in?
                <span class="faq-icon" aria-hidden="true"></span>
              </button>
            </h3>
            <div class="faq-panel" id="faq-a3">
              <p>You can invoice in 30 currencies, and each invoice shows the amount in your client's currency.</p>
            </div>
          </div>

          <div class="faq-item">
            <h3>
              <button class="faq-trigger" type="button" id="faq-q4" aria-controls="faq-a4" aria-expanded="true">
                What happens when the free trial ends?
                <span class="faq-icon" aria-hidden="true"></span>
              </button>
            </h3>
            <div class="faq-panel" id="faq-a4">
              <p>You pick a plan. If you don't, your account switches to view-only and your invoices stay safe for 90 days.</p>
            </div>
          </div>

        </div>
      </div>
    </section>

    <!-- Final call to action -->
    <section class="section" aria-labelledby="cta-title">
      <div class="container">
        <div class="cta-box">
          <h2 id="cta-title">Ready to send your first invoice?</h2>
          <p>Try Brindlebill free, then pick the plan that fits.</p>
          <a class="btn" href="#" data-signup>Start free trial</a>
        </div>
      </div>
    </section>

  </main>

  <footer class="site-footer">
    <div class="container footer-inner">
      <div><span class="footer-brand">Brindlebill</span> · Invoicing for freelancers.</div>
      <nav class="footer-nav" aria-label="Footer">
        <a href="#features">Features</a>
        <a href="#pricing">Pricing</a>
        <a href="#faq">FAQ</a>
      </nav>
    </div>
  </footer>

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

      /* 1. Sign-up links. Put your real sign-up page here, e.g. 'https://app.example.com/signup'. */
      var SIGNUP_URL = '#';
      document.querySelectorAll('a[data-signup]').forEach(function (link) {
        link.setAttribute('href', SIGNUP_URL);
      });

      /* 2. Monthly / yearly pricing.
         Every element with data-monthly and data-yearly swaps its text. */
      var swaps = document.querySelectorAll('[data-monthly][data-yearly]');
      var radios = document.querySelectorAll('input[name="billing"]');

      function applyBilling(period) {
        swaps.forEach(function (el) {
          el.textContent = el.getAttribute('data-' + period);
        });
      }

      radios.forEach(function (radio) {
        radio.addEventListener('change', function () {
          if (radio.checked) { applyBilling(radio.value); }
        });
      });

      // Browsers can restore a previous choice on reload, so sync once on load.
      var current = document.querySelector('input[name="billing"]:checked');
      if (current) { applyBilling(current.value); }

      /* 3. FAQ: each question opens and closes on its own.
         Answers are visible without JavaScript; this collapses them and wires up the toggles. */
      document.querySelectorAll('.faq-trigger').forEach(function (button) {
        var panel = document.getElementById(button.getAttribute('aria-controls'));
        if (!panel) { return; }

        panel.hidden = true;
        button.setAttribute('aria-expanded', 'false');

        button.addEventListener('click', function () {
          var isOpen = button.getAttribute('aria-expanded') === 'true';
          button.setAttribute('aria-expanded', isOpen ? 'false' : 'true');
          panel.hidden = isOpen;
        });
      });
    })();
  </script>
</body>
</html>

A few notes:

  • Sign-up URL: every "Start free trial" button points at SIGNUP_URL near the top of the script. Change that one line to your real sign-up page.
  • Yearly prices: two months free is 10 × monthly, so the switch shows $90, $190 and $490 per year, never divided back into a monthly figure. The hint under the switch says so explicitly when Yearly is selected.
  • Phones: everything stacks to one column, buttons are at least 48px tall, and the only text size below the headings is 1rem (16px). The header's "Start free trial" is hidden on small screens because the hero button is directly beneath it.
  • Headings: one h1 (the headline), h2 for each section, h3 for feature titles, plan names and FAQ questions.
  • No dependencies: system font stack, inline SVG icons, and a CSS-drawn sample invoice in the hero, so there are no outside files to load.
  • 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 9 min 1 s.
  • First words after 7 min 29 s.
  • Wrote 45,110 tokens, 35,123 of them thinking.
  • $2.27 at API prices.
All numbers.
Time to finish9 min 1 s
Time to first words7 min 29 s
Input tokens1,273
Cached tokens0
Output tokens45,110
Thinking tokens35,123
Words in the answer2,532
Price at API rates$2.27
B02Build a dashboard from a picture of its designLow 7/7Max 6/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 fewer check than low.

AI answer from Fable 5.1 · 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.
More screenshots (1).
Screenshot of the page built in this answer, at a phone width of 375 pixels
Show the code and the answer.

Here's the admin screen as a single self-contained HTML file. No libraries, no external fonts or images; the chart is plain HTML/CSS with bar heights computed from the numbers (each bar is calc(100% * n / 31), so they're exactly to scale against the tallest, 31).

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Tarnwick Bikeworks – Overview</title>
<style>
  * { box-sizing: border-box; margin: 0; padding: 0; }

  :root {
    --navy: #1f2a44;
    --blue: #3b74f0;
    --bg: #f4f6fa;
    --border: #e4e8ef;
    --text: #1c2333;
    --muted: #6b7280;
    --green: #1d8a44;
    --red: #d93025;
    --sidebar-w: 240px;
  }

  html, body { overflow-x: hidden; }

  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
  }

  /* ---------- Sidebar ---------- */
  .sidebar {
    width: var(--sidebar-w);
    background: var(--navy);
    color: #fff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }
  .brand {
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 28px;
    font-weight: 700;
    font-size: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .nav { list-style: none; padding: 24px 12px; }
  .nav li a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 16px;
    height: 40px;
    border-radius: 7px;
    color: #c9d1e0;
    text-decoration: none;
    font-size: 15px;
    margin-bottom: 4px;
  }
  .nav li a:hover { background: rgba(255,255,255,0.06); color: #fff; }
  .nav li a.active { background: var(--blue); color: #fff; }
  .nav .icon {
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-radius: 3px;
    flex-shrink: 0;
  }

  /* ---------- Main ---------- */
  .main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

  .topbar {
    height: 64px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 32px;
    gap: 16px;
  }
  .topbar h1 { font-size: 22px; font-weight: 700; flex: 1; }
  .menu-btn {
    display: none;
    width: 40px; height: 40px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 7px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
  }
  .menu-btn span { width: 18px; height: 2px; background: var(--text); border-radius: 1px; }

  .search {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 292px;
    height: 36px;
    background: #f1f3f7;
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 0 12px;
  }
  .search svg { width: 16px; height: 16px; flex-shrink: 0; }
  .search input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 15px;
    width: 100%;
    color: var(--text);
    font-family: inherit;
  }
  .search input::placeholder { color: #8a93a3; }
  .avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 44px;
  }

  .content { padding: 32px; display: flex; flex-direction: column; gap: 32px; }

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

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

  /* ---------- Chart ---------- */
  .chart { padding: 18px 24px 20px; }
  .chart-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
  .chart-head h2 { font-size: 16px; font-weight: 700; }
  .chart-head span { font-size: 13px; color: var(--muted); }

  .bars {
    position: relative;
    height: 130px;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    border-bottom: 1px solid var(--border);
    background:
      linear-gradient(to bottom, var(--border) 1px, transparent 1px) 0 0 / 100% 25% repeat-y;
  }
  .bar {
    position: relative;
    width: 55px;
    background: var(--blue);
    border-radius: 3px 3px 0 0;
  }
  .bar b {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
  }
  .labels { display: flex; justify-content: space-around; margin-top: 10px; }
  .labels span { width: 55px; text-align: center; font-size: 13px; color: var(--muted); }

  /* ---------- Table ---------- */
  .jobs h2 { font-size: 16px; font-weight: 700; padding: 18px 24px; }
  .table-wrap { overflow-x: auto; }
  table { width: 100%; border-collapse: collapse; font-size: 15px; }
  th {
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    background: #f7f9fc;
    padding: 10px 24px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
  }
  td { padding: 14px 24px; border-bottom: 1px solid var(--border); white-space: nowrap; }
  tr:last-child td { border-bottom: none; }
  td.job { font-weight: 700; }
  .badge {
    display: inline-block;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
  }
  .badge.ready   { background: #dcf5e6; color: #1a7a3f; }
  .badge.progress{ background: #fdf3cd; color: #8a6400; }
  .badge.waiting { background: #ebe7fb; color: #5b3fb0; }

  .overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 40;
  }

  /* ---------- Mobile ---------- */
  @media (max-width: 860px) {
    .sidebar {
      position: fixed;
      top: 0; left: 0; bottom: 0;
      z-index: 50;
      transform: translateX(-100%);
      transition: transform 0.25s ease;
    }
    body.menu-open .sidebar { transform: translateX(0); }
    body.menu-open .overlay { display: block; }

    .menu-btn { display: flex; }
    .topbar { padding: 0 16px; gap: 12px; flex-wrap: wrap; height: auto; min-height: 64px; }
    .topbar h1 { font-size: 20px; }
    .search { order: 10; width: 100%; margin-bottom: 12px; }
    .avatar { margin-left: 0; }

    .content { padding: 16px; gap: 16px; }
    .stats { grid-template-columns: 1fr; gap: 16px; }
    .chart { padding: 16px; }
    .bar { width: 28px; }
    .labels span { width: 28px; font-size: 12px; }
    th, td { padding-left: 16px; padding-right: 16px; }
  }
</style>
</head>
<body>

  <aside class="sidebar" id="sidebar">
    <div class="brand">Tarnwick Bikeworks</div>
    <ul class="nav">
      <li><a href="#" class="active"><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><span></span><span></span>
      </button>
      <h1>Overview</h1>
      <label class="search">
        <svg viewBox="0 0 24 24" fill="none" stroke="#6b7280" stroke-width="2.2" stroke-linecap="round">
          <circle cx="10.5" cy="10.5" r="6.5"/><line x1="15.5" y1="15.5" x2="21" y2="21"/>
        </svg>
        <input type="search" placeholder="Search jobs and bikes">
      </label>
      <div class="avatar">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">
        <div class="chart-head">
          <h2>Completed per day</h2>
          <span>Last 7 days</span>
        </div>
        <div class="bars" role="img" aria-label="Jobs completed per day: Mon 14, Tue 22, Wed 18, Thu 27, Fri 31, Sat 12, Sun 6">
          <div class="bar" style="height: calc(100% * 14 / 31)"><b>14</b></div>
          <div class="bar" style="height: calc(100% * 22 / 31)"><b>22</b></div>
          <div class="bar" style="height: calc(100% * 18 / 31)"><b>18</b></div>
          <div class="bar" style="height: calc(100% * 27 / 31)"><b>27</b></div>
          <div class="bar" style="height: calc(100% * 31 / 31)"><b>31</b></div>
          <div class="bar" style="height: calc(100% * 12 / 31)"><b>12</b></div>
          <div class="bar" style="height: calc(100% * 6 / 31)"><b>6</b></div>
        </div>
        <div class="labels">
          <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">
        <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 class="job">#2041</td><td>Trail hardtail</td><td>Gear tune and chain</td><td>12 Mar</td><td><span class="badge ready">Ready for pickup</span></td></tr>
              <tr><td class="job">#2040</td><td>Commuter 700c</td><td>Brake pads, both wheels</td><td>12 Mar</td><td><span class="badge progress">In progress</span></td></tr>
              <tr><td class="job">#2039</td><td>Folding bike</td><td>New rear tyre</td><td>13 Mar</td><td><span class="badge waiting">Waiting for parts</span></td></tr>
              <tr><td class="job">#2038</td><td>Road racer</td><td>Full service</td><td>14 Mar</td><td><span class="badge progress">In progress</span></td></tr>
              <tr><td class="job">#2037</td><td>Cargo trike</td><td>Wheel true, front</td><td>14 Mar</td><td><span class="badge ready">Ready for pickup</span></td></tr>
            </tbody>
          </table>
        </div>
      </section>

    </main>
  </div>

<script>
  const body = document.body;
  const btn = document.getElementById('menuBtn');
  const overlay = document.getElementById('overlay');

  function setMenu(open) {
    body.classList.toggle('menu-open', open);
    btn.setAttribute('aria-expanded', open);
  }
  btn.addEventListener('click', () => setMenu(!body.classList.contains('menu-open')));
  overlay.addEventListener('click', () => setMenu(false));
  document.addEventListener('keydown', e => { if (e.key === 'Escape') setMenu(false); });
  document.querySelectorAll('.nav a').forEach(a => a.addEventListener('click', () => setMenu(false)));
</script>
</body>
</html>

A few notes on how it matches and behaves:

  • Desktop layout – fixed 240px navy sidebar, white top bar with the heading, search box and "TB" avatar, light grey content area with the three stat cards in a row, the chart card, then the Recent jobs table. Colours, radii, badge tints and the up/down triangle indicators follow the mockup.
  • Chart – the bar area has faint horizontal gridlines and a baseline; each bar's height is calc(100% * n / 31), so Fri (31) fills the full height and the others scale proportionally. The number sits above each bar and the day label below.
  • Phone (≤860px) – the sidebar slides off-canvas and is opened by a hamburger button in the top bar (closed by the overlay, Escape, or tapping a nav link). The search box drops onto its own row, the stat cards stack into one column, the bars narrow to fit, and the table sits inside a wrapper that scrolls internally so the page itself never scrolls sideways (overflow-x: hidden on html/body as a safety net).
  • 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 1 min 4 s.
  • First words after 13 s.
  • Wrote 6,421 tokens, 795 of them thinking.
  • 34¢ at API prices.
All numbers.
Time to finish1 min 4 s
Time to first words13 s
Input tokens2,328
Cached tokens0
Output tokens6,421
Thinking tokens795
Words in the answer1,409
Price at API rates34¢

AI answer from Fable 5.1 · max effort · 2 Oct 2026

6 of 7

The answer was cut off at the token limit.

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 whole thing as a single 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>Overview – Tarnwick Bikeworks</title>
<style>
  :root {
    --sidebar: #1e2a44;
    --sidebar-text: #c7cfdc;
    --accent: #3b70f0;
    --bg: #f4f6fa;
    --card: #fff;
    --line: #e3e8ef;
    --line-soft: #ebeef3;
    --text: #111827;
    --text-2: #1f2937;
    --muted: #5b6577;
    --green: #1b8a42;
    --red: #dc2626;
    --green-bg: #d9f3e3;  --green-text: #1b7a3e;
    --amber-bg: #fdf1cc;  --amber-text: #845b0e;
    --purple-bg: #e8e4fb; --purple-text: #5b3fc3;
  }

  *, *::before, *::after { box-sizing: border-box; }
  html { overflow-x: hidden; }
  body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.4;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
  }
  h1, h2 { margin: 0; }
  ul { margin: 0; padding: 0; list-style: none; }
  button { font: inherit; }
  .sr-only {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }

  /* ---------- Sidebar ---------- */
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 30;
    width: 240px; overflow-y: auto;
    background: var(--sidebar); color: var(--sidebar-text);
  }
  .brand {
    display: flex; align-items: center; justify-content: space-between;
    height: 64px; padding: 0 16px 0 28px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    color: #fff; font-size: 16px; font-weight: 700; white-space: nowrap;
  }
  .nav { padding: 24px 12px; }
  .nav ul { display: grid; gap: 4px; }
  .nav a {
    display: flex; align-items: center; gap: 12px;
    height: 40px; padding: 0 16px; border-radius: 6px;
    color: inherit; font-weight: 500; text-decoration: none;
  }
  .nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
  .nav a[aria-current="page"] { background: var(--accent); color: #fff; }
  .nav a:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
  .ico { width: 16px; height: 16px; flex: none; }

  /* ---------- Top bar ---------- */
  .main { margin-left: 240px; min-width: 0; }
  .topbar {
    display: flex; align-items: center; gap: 16px;
    height: 64px; padding: 0 32px;
    background: #fff; border-bottom: 1px solid var(--line);
  }
  .topbar h1 { margin-right: auto; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
  .search {
    display: flex; align-items: center; gap: 10px;
    width: 292px; height: 36px; padding: 0 12px;
    background: #eef1f6; border: 1px solid var(--line); border-radius: 8px;
    color: #6b7280;
  }
  .search svg { width: 16px; height: 16px; flex: none; }
  .search input {
    flex: 1; min-width: 0; padding: 0; border: 0; outline: 0;
    background: transparent; font: inherit; font-size: 14px; color: var(--text);
  }
  .search input::placeholder { color: #6b7280; opacity: 1; }
  .search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59, 112, 240, .15); }
  .avatar {
    display: flex; align-items: center; justify-content: center; flex: none;
    width: 36px; height: 36px; margin-left: 44px; border-radius: 50%;
    background: var(--sidebar); color: #fff; font-size: 13px; font-weight: 700;
  }
  .icon-btn {
    display: none; align-items: center; justify-content: center; flex: none;
    width: 40px; height: 40px; padding: 0; border: 0; border-radius: 8px;
    background: transparent; color: inherit; cursor: pointer;
  }
  .icon-btn svg { width: 20px; height: 20px; }
  .icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .menu-btn { margin-left: -8px; color: var(--text); }
  .menu-btn:hover { background: rgba(0, 0, 0, .05); }
  .close-btn { margin-right: -8px; }
  .close-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }

  /* ---------- Content ---------- */
  .content { display: grid; gap: 32px; padding: 32px; }
  .card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
  .card h2 { font-size: 16px; font-weight: 700; line-height: 20px; }
  .muted { font-size: 13px; color: var(--muted); }

  /* Stat cards */
  .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
  .stat { padding: 16px 20px 14px; }
  .stat-label { font-size: 13px; font-weight: 500; line-height: 16px; color: var(--muted); }
  .stat-value { margin-top: 4px; font-size: 32px; font-weight: 700; line-height: 40px; letter-spacing: -.02em; }
  .delta {
    display: inline-flex; align-items: center; gap: 5px; margin-top: 4px;
    font-size: 13px; font-weight: 700; line-height: 16px;
  }
  .delta svg { width: 10px; height: 10px; }
  .delta.up { color: var(--green); }
  .delta.down { color: var(--red); }

  /* Chart */
  .chart-card { padding: 16px 24px 12px; }
  .card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
  .plot { position: relative; height: 120px; margin-top: 37px; }
  .gridlines span { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line-soft); }
  .gridlines span:nth-child(1) { top: 0; }
  .gridlines span:nth-child(2) { top: 50%; }
  .gridlines span:nth-child(3) { bottom: 0; }
  .bars { --max: 31; position: relative; display: flex; height: 100%; }
  .bars li { flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
  .bar {
    position: relative; width: 56px; max-width: 72%;
    height: calc(100% * var(--v) / var(--max)); /* height follows the number */
    background: var(--accent); border-radius: 4px 4px 0 0;
  }
  .bar b {
    position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%);
    font-size: 13px; font-weight: 700; line-height: 16px; color: var(--text); white-space: nowrap;
  }
  .days { display: flex; margin-top: 10px; }
  .days li { flex: 1 1 0; min-width: 0; text-align: center; font-size: 13px; line-height: 16px; color: var(--muted); }

  /* Recent jobs table */
  .table-card { padding: 16px 0 8px; }
  .table-card h2 { padding: 0 24px; margin-bottom: 10px; }
  .jobs { width: 100%; border-collapse: collapse; table-layout: fixed; }
  .jobs th, .jobs td {
    padding: 0 12px 0 0; text-align: left; vertical-align: middle;
    border-bottom: 1px solid var(--line-soft);
  }
  .jobs th:first-child, .jobs td:first-child { padding-left: 24px; }
  .jobs th:last-child,  .jobs td:last-child  { padding-right: 24px; }
  .jobs th {
    padding-top: 8px; padding-bottom: 8px;
    font-size: 13px; font-weight: 600; line-height: 18px; color: var(--muted);
    background: var(--bg);
  }
  .jobs th:nth-child(1) { width: 10%; }
  .jobs th:nth-child(2) { width: 18%; }
  .jobs th:nth-child(3) { width: 24%; }
  .jobs th:nth-child(4) { width: 12%; }
  .jobs td { padding-top: 12px; padding-bottom: 12px; line-height: 20px; color: var(--text-2); }
  .jobs td:first-child { font-weight: 700; color: var(--text); }
  .jobs td:last-child { padding-top: 10px; padding-bottom: 10px; }
  .pill {
    display: inline-block; padding: 0 10px; border-radius: 6px; vertical-align: top;
    font-size: 13px; font-weight: 700; line-height: 24px; white-space: nowrap;
  }
  .pill.ready    { background: var(--green-bg);  color: var(--green-text); }
  .pill.progress { background: var(--amber-bg);  color: var(--amber-text); }
  .pill.waiting  { background: var(--purple-bg); color: var(--purple-text); }

  .backdrop { display: none; }

  /* ---------- Phones and narrow screens ---------- */
  @media (max-width: 960px) {
    .main { margin-left: 0; }

    /* Sidebar becomes an off-canvas drawer */
    .sidebar {
      width: 260px; max-width: 85vw;
      transform: translateX(-100%); visibility: hidden;
      transition: transform .25s ease, visibility 0s linear .25s;
      box-shadow: 0 0 40px rgba(0, 0, 0, .3);
    }
    .nav-open .sidebar { transform: none; visibility: visible; transition: transform .25s ease, visibility 0s; }
    .backdrop {
      display: block; position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 20;
      background: rgba(15, 23, 42, .5); opacity: 0; visibility: hidden;
      transition: opacity .25s ease, visibility 0s linear .25s;
    }
    .nav-open .backdrop { opacity: 1; visibility: visible; transition: opacity .25s ease; }
    html.nav-open { overflow: hidden; }
    .icon-btn { display: inline-flex; }

    .topbar {
      position: sticky; top: 0; z-index: 10;
      height: auto; flex-wrap: wrap; gap: 12px; padding: 10px 16px;
    }
    .topbar h1 { font-size: 20px; }
    .search { order: 1; flex: 1 1 100%; width: auto; }
    .avatar { margin-left: 0; }

    .content { gap: 16px; padding: 16px; }
    .stats { grid-template-columns: 1fr; gap: 16px; }
    .chart-card { padding: 16px 16px 12px; }
    .table-card h2 { padding: 0 16px; }

    /* Table rows reflow into stacked blocks so nothing scrolls sideways */
    .jobs thead { display: none; }
    .jobs, .jobs tbody { display: block; }
    .jobs tr {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      grid-template-areas: "job status" "bike bike" "work work" "due due";
      align-items: center; column-gap: 12px;
      padding: 12px 16px;
      border-bottom: 1px solid var(--line-soft);
    }
    .jobs td, .jobs td:first-child, .jobs td:last-child { display: block; padding: 0; border: 0; }
    .jobs td:nth-child(1) { grid-area: job; }
    .jobs td:nth-child(2) { grid-area: bike; margin-top: 4px; }
    .jobs td:nth-child(3) { grid-area: work; color: var(--muted); }
    .jobs td:nth-child(4) { grid-area: due; margin-top: 2px; font-size: 13px; color: var(--muted); }
    .jobs td:nth-child(4)::before { content: "Due "; }
    .jobs td:nth-child(5) { grid-area: status; justify-self: end; }
  }

  @media (prefers-reduced-motion: reduce) {
    .sidebar, .nav-open .sidebar, .backdrop, .nav-open .backdrop { transition: none; }
  }
</style>
</head>
<body>

<svg width="0" height="0" style="position:absolute" aria-hidden="true" focusable="false">
  <symbol id="i-square" viewBox="0 0 16 16">
    <rect x="1" y="1" width="14" height="14" rx="3" fill="none" stroke="currentColor" stroke-width="1.6"/>
  </symbol>
</svg>

<aside class="sidebar" id="sidebar" aria-label="Main navigation">
  <div class="brand">
    <span>Tarnwick Bikeworks</span>
    <button class="icon-btn close-btn" id="close-nav" type="button" aria-label="Close menu">
      <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M5 5l10 10M15 5L5 15" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>
    </button>
  </div>
  <nav class="nav">
    <ul>
      <li><a href="#" aria-current="page"><svg class="ico" aria-hidden="true"><use href="#i-square"/></svg>Overview</a></li>
      <li><a href="#"><svg class="ico" aria-hidden="true"><use href="#i-square"/></svg>Jobs</a></li>
      <li><a href="#"><svg class="ico" aria-hidden="true"><use href="#i-square"/></svg>Bookings</a></li>
      <li><a href="#"><svg class="ico" aria-hidden="true"><use href="#i-square"/></svg>Stock</a></li>
      <li><a href="#"><svg class="ico" aria-hidden="true"><use href="#i-square"/></svg>Reports</a></li>
    </ul>
  </nav>
</aside>
<div class="backdrop" id="backdrop"></div>

<div class="main">
  <header class="topbar">
    <button class="icon-btn menu-btn" id="menu-btn" type="button" aria-label="Open menu" aria-controls="sidebar" aria-expanded="false">
      <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M3 5h14M3 10h14M3 15h14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>
    </button>
    <h1>Overview</h1>
    <label class="search">
      <svg viewBox="0 0 16 16" aria-hidden="true"><circle cx="7" cy="7" r="4.5" fill="none" stroke="currentColor" stroke-width="1.6"/><path d="M10.5 10.5L14 14" fill="none" stroke="currentColor" 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">TB</div>
  </header>

  <main class="content">
    <section class="stats" aria-label="This week at a glance">
      <div class="card stat">
        <div class="stat-label">Revenue</div>
        <div class="stat-value">$8,460</div>
        <div class="delta up"><svg viewBox="0 0 10 10" aria-hidden="true"><path d="M5 2l4 6H1z" fill="currentColor"/></svg><span class="sr-only">Up </span>12.4% vs last week</div>
      </div>
      <div class="card stat">
        <div class="stat-label">Jobs completed</div>
        <div class="stat-value">130</div>
        <div class="delta up"><svg viewBox="0 0 10 10" aria-hidden="true"><path d="M5 2l4 6H1z" fill="currentColor"/></svg><span class="sr-only">Up </span>8.3% vs last week</div>
      </div>
      <div class="card stat">
        <div class="stat-label">Open bookings</div>
        <div class="stat-value">24</div>
        <div class="delta down"><svg viewBox="0 0 10 10" aria-hidden="true"><path d="M5 8L1 2h8z" fill="currentColor"/></svg><span class="sr-only">Down </span>6.0% vs last week</div>
      </div>
    </section>

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

    <section class="card table-card" aria-labelledby="jobs-title">
      <h2 id="jobs-title">Recent jobs</h2>
      <table class="jobs">
        <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>
            <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 progress">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 waiting">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 progress">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>
    </section>
  </main>
</div>

<script>
(function () {
  var root = document.documentElement;
  var sidebar = document.getElementById('sidebar');
  var menuBtn = document.getElementById('menu-btn');
  var closeBtn = document.getElementById('close-nav');
  var backdrop = document.getElementById('backdrop');
  var narrow = window.matchMedia('(max-width: 960px)');

  function isOpen() { return root.classList.contains('nav-open'); }

  function setOpen(open) {
    root.classList.toggle('nav-open', open);
    menuBtn.setAttribute('aria-expanded', open ? 'true' : 'false');
    if (open) {
      requestAnimationFrame(function () { closeBtn.focus(); });
    } else if (sidebar.contains(document.activeElement)) {
      menuBtn.focus();
    }
  }

  menuBtn.addEventListener('click', function () { setOpen(!isOpen()); });
  closeBtn.addEventListener('click', function () { setOpen(false); });
  backdrop.addEventListener('click', function () { setOpen(false); });
  sidebar.addEventListener('click', function (e) {
    if (narrow.matches && e.target.closest('a')) setOpen(false);
  });
  document.addEventListener('keydown', function (e) {
    if (e.key === 'Escape' && isOpen()) setOpen(false);
  });

  // If the window grows back to desktop size while the drawer is open, reset it.
  function onChange(e) { if (!e.matches && isOpen()) setOpen(false); }
  if (narrow.addEventListener) narrow.addEventListener('change', onChange);
  else narrow.addListener(onChange);
})();
</script>
</body>
</html>

A few notes on the choices:

  • Fonts: since no outside fonts are allowed, it uses the system font stack (San Francisco, Segoe UI, Roboto, etc.), which is close to the sans-serif in the mockup. Everything else (the 240px sidebar, 64px header, 32px gutters, card sizes, colours, pill styles) is measured from the mockup.
  • Chart: plain HTML/CSS. Each bar carries its value as a custom property (style="--v: 14") and its height is calc(100% * var(--v) / 31), so Fri (31) fills the full 120px plot and
  • 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 11 min 47 s.
  • First words after 10 min 44 s.
  • Wrote 64,000 tokens, 55,909 of them thinking.
  • $3.22 at API prices.
All numbers.
Time to finish11 min 47 s
Time to first words10 min 44 s
Input tokens2,328
Cached tokens0
Output tokens64,000
Thinking tokens55,909
Words in the answer1,963
Price at API rates$3.22
B03A kanban board that survives a reloadLow 9/9Max 9/9Same

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.

Both settings passed 9 of 9 checks.

AI answer from Fable 5.1 · 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.
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>Kanban</title>
<style>
  * { box-sizing: border-box; }
  body {
    margin: 0;
    padding: 12px;
    font-family: system-ui, -apple-system, sans-serif;
    background: #f0f2f5;
    color: #222;
  }
  h1 { font-size: 1.25rem; margin: 0 0 12px; }
  #addForm { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
  #addForm input {
    flex: 1 1 180px; min-width: 0;
    padding: 8px; font-size: 1rem;
    border: 1px solid #bbb; border-radius: 4px;
  }
  button {
    font: inherit; padding: 6px 10px;
    border: 1px solid #888; border-radius: 4px;
    background: #fff; cursor: pointer;
  }
  button:hover { background: #eee; }
  .board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
  @media (max-width: 640px) {
    .board { grid-template-columns: minmax(0, 1fr); }
  }
  .column {
    background: #e2e5ea; border-radius: 6px; padding: 8px;
    display: flex; flex-direction: column; min-width: 0;
  }
  .column h2 { font-size: 1rem; margin: 0 0 8px; }
  .column.over { outline: 2px dashed #3a7d5c; }
  .cards { flex: 1; display: flex; flex-direction: column; gap: 8px; min-height: 48px; }
  .card {
    background: #fff; border-radius: 4px; padding: 8px; min-width: 0;
    box-shadow: 0 1px 2px rgba(0,0,0,.2); cursor: grab;
  }
  .card:focus { outline: 2px solid #2d5fd0; outline-offset: 1px; }
  .card.dragging { opacity: .5; }
  .card .title { overflow-wrap: anywhere; white-space: pre-wrap; margin-bottom: 6px; }
  .card .actions { display: flex; gap: 6px; flex-wrap: wrap; }
  .card input {
    width: 100%; min-width: 0; padding: 6px; font-size: 1rem;
    margin-bottom: 6px; border: 1px solid #bbb; border-radius: 4px;
  }
  .hint { font-size: .85rem; color: #555; margin-top: 12px; }
</style>
</head>
<body>
<h1>Kanban</h1>

<form id="addForm" autocomplete="off">
  <input id="newTitle" type="text" placeholder="New card title" aria-label="New card title">
  <button type="submit">Add card</button>
</form>

<div class="board" id="board"></div>
<p class="hint">Tab to a card and use the arrow keys to move it. Drag with the mouse to reorder.</p>

<script>
(function () {
  var STORAGE_KEY = 'simple-kanban-board';
  var COLUMNS = [
    { key: 'todo',  name: 'To do' },
    { key: 'doing', name: 'Doing' },
    { key: 'done',  name: 'Done' }
  ];

  var state = load();
  var editingId = null;   // id of card currently being edited
  var focusId = null;     // id of card to focus after the next render
  var dragged = null;     // DOM element being dragged

  function load() {
    var empty = { todo: [], doing: [], done: [] };
    try {
      var raw = localStorage.getItem(STORAGE_KEY);
      if (!raw) return empty;
      var data = JSON.parse(raw);
      COLUMNS.forEach(function (c) {
        if (!Array.isArray(data[c.key])) data[c.key] = [];
      });
      return data;
    } catch (e) {
      return empty;
    }
  }

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

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

  // Returns { col: 'todo', index: 2 } for a card id, or null.
  function locate(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: COLUMNS[i].key, colIndex: i, index: j };
      }
    }
    return null;
  }

  // ---------- Rendering (DOM API only, so titles are never parsed as HTML) ----------

  var board = document.getElementById('board');

  function render() {
    board.textContent = '';
    COLUMNS.forEach(function (c) {
      var column = document.createElement('section');
      column.className = 'column';
      column.dataset.col = c.key;

      var h2 = document.createElement('h2');
      h2.textContent = c.name + ' ' + state[c.key].length;
      column.appendChild(h2);

      var cards = document.createElement('div');
      cards.className = 'cards';
      cards.dataset.col = c.key;
      cards.addEventListener('dragover', onDragOver);
      cards.addEventListener('dragenter', function (e) { e.preventDefault(); column.classList.add('over'); });
      cards.addEventListener('dragleave', function () { column.classList.remove('over'); });
      cards.addEventListener('drop', function (e) { e.preventDefault(); column.classList.remove('over'); });

      state[c.key].forEach(function (card) {
        cards.appendChild(renderCard(card));
      });

      column.appendChild(cards);
      board.appendChild(column);
    });

    if (editingId) {
      var input = board.querySelector('.card[data-id="' + editingId + '"] input');
      if (input) { input.focus(); input.select(); }
    } else if (focusId) {
      var el = board.querySelector('.card[data-id="' + focusId + '"]');
      if (el) el.focus();
    }
    focusId = null;
  }

  function renderCard(card) {
    var el = document.createElement('div');
    el.className = 'card';
    el.dataset.id = card.id;
    el.tabIndex = 0;
    el.setAttribute('role', 'listitem');
    el.setAttribute('aria-label', card.title);

    var isEditing = card.id === editingId;
    el.draggable = !isEditing;

    if (isEditing) {
      var input = document.createElement('input');
      input.type = 'text';
      input.value = card.title;
      input.setAttribute('aria-label', 'Edit title');
      input.addEventListener('keydown', function (e) {
        if (e.key === 'Enter') { e.preventDefault(); commitEdit(card.id, input.value); }
        if (e.key === 'Escape') { e.preventDefault(); editingId = null; focusId = card.id; render(); }
      });
      el.appendChild(input);

      var actions = document.createElement('div');
      actions.className = 'actions';
      var saveBtn = document.createElement('button');
      saveBtn.type = 'button';
      saveBtn.textContent = 'Save';
      saveBtn.addEventListener('click', function () { commitEdit(card.id, input.value); });
      actions.appendChild(saveBtn);
      el.appendChild(actions);
    } else {
      var title = document.createElement('div');
      title.className = 'title';
      title.textContent = card.title;
      el.appendChild(title);

      var actions2 = document.createElement('div');
      actions2.className = 'actions';

      var editBtn = document.createElement('button');
      editBtn.type = 'button';
      editBtn.textContent = 'Edit';
      editBtn.addEventListener('click', function () { editingId = card.id; render(); });

      var delBtn = document.createElement('button');
      delBtn.type = 'button';
      delBtn.textContent = 'Delete';
      delBtn.addEventListener('click', function () { deleteCard(card.id); });

      actions2.appendChild(editBtn);
      actions2.appendChild(delBtn);
      el.appendChild(actions2);

      el.addEventListener('dragstart', function (e) {
        dragged = el;
        el.classList.add('dragging');
        e.dataTransfer.effectAllowed = 'move';
        try { e.dataTransfer.setData('text/plain', card.id); } catch (err) {}
      });
      el.addEventListener('dragend', function () {
        el.classList.remove('dragging');
        dragged = null;
        commitDomOrder();
      });
    }

    el.addEventListener('keydown', function (e) {
      if (e.target !== el) return; // ignore keys typed in the input or on buttons
      var moved = false;
      switch (e.key) {
        case 'ArrowLeft':  moved = moveAcross(card.id, -1); break;
        case 'ArrowRight': moved = moveAcross(card.id, 1); break;
        case 'ArrowUp':    moved = moveWithin(card.id, -1); break;
        case 'ArrowDown':  moved = moveWithin(card.id, 1); break;
        default: return;
      }
      e.preventDefault();
      if (moved) { save(); focusId = card.id; render(); }
    });

    return el;
  }

  // ---------- Actions ----------

  function addCard(title) {
    title = title.trim();
    if (!title) return;
    state.todo.push({ id: newId(), title: title });
    save();
    render();
  }

  function deleteCard(id) {
    var loc = locate(id);
    if (!loc) return;
    state[loc.col].splice(loc.index, 1);
    if (editingId === id) editingId = null;
    save();
    render();
  }

  function commitEdit(id, value) {
    var loc = locate(id);
    if (loc) {
      var trimmed = value.trim();
      if (trimmed) state[loc.col][loc.index].title = trimmed;
    }
    editingId = null;
    focusId = id;
    save();
    render();
  }

  function moveWithin(id, delta) {
    var loc = locate(id);
    if (!loc) return false;
    var list = state[loc.col];
    var to = loc.index + delta;
    if (to < 0 || to >= list.length) return false;
    var tmp = list[loc.index];
    list[loc.index] = list[to];
    list[to] = tmp;
    return true;
  }

  function moveAcross(id, delta) {
    var loc = locate(id);
    if (!loc) return false;
    var toCol = loc.colIndex + delta;
    if (toCol < 0 || toCol >= COLUMNS.length) return false;
    var card = state[loc.col].splice(loc.index, 1)[0];
    var target = state[COLUMNS[toCol].key];
    target.splice(Math.min(loc.index, target.length), 0, card);
    return true;
  }

  // ---------- Drag and drop ----------

  function onDragOver(e) {
    if (!dragged) return;
    e.preventDefault();
    e.dataTransfer.dropEffect = 'move';
    var container = e.currentTarget;
    var over = e.target.closest ? e.target.closest('.card') : null;
    if (over && over !== dragged && container.contains(over)) {
      var rect = over.getBoundingClientRect();
      if (e.clientY < rect.top + rect.height / 2) {
        container.insertBefore(dragged, over);
      } else {
        container.insertBefore(dragged, over.nextSibling);
      }
    } else if (!over && dragged.parentNode !== container) {
      container.appendChild(dragged);
    } else if (!over) {
      // Dragging in empty space below the cards of its own column: move to end.
      var rectC = container.getBoundingClientRect();
      var last = container.lastElementChild;
      if (last && last !== dragged && e.clientY > last.getBoundingClientRect().bottom && e.clientY <= rectC.bottom) {
        container.appendChild(dragged);
      }
    }
  }

  // Read the card order out of the DOM after a drag and make it the state.
  function commitDomOrder() {
    var byId = {};
    COLUMNS.forEach(function (c) {
      state[c.key].forEach(function (card) { byId[card.id] = card; });
    });
    var fresh = {};
    COLUMNS.forEach(function (c) {
      fresh[c.key] = [];
      var container = board.querySelector('.cards[data-col="' + c.key + '"]');
      Array.prototype.forEach.call(container.children, function (el) {
        var card = byId[el.dataset.id];
        if (card) fresh[c.key].push(card);
      });
    });
    state = fresh;
    save();
    render();
  }

  // ---------- Add form ----------

  var form = document.getElementById('addForm');
  var newTitle = document.getElementById('newTitle');
  form.addEventListener('submit', function (e) {
    e.preventDefault();
    addCard(newTitle.value);
    newTitle.value = '';
    newTitle.focus();
  });

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

Notes on how it works:

  • Saving: the whole board lives in localStorage under one key and is rewritten after every change, so a reload gives you exactly the same board. It starts empty.
  • Safe titles: everything is built with createElement/textContent, never innerHTML, so <div> or a & b display literally.
  • Keyboard: each card has tabindex="0". Arrow keys only act when the card itself has focus (not its buttons or edit field), and the card is re-focused after every move. In edit mode, Enter saves and Escape cancels.
  • Drag and drop: uses the browser's native drag API; the card is moved live in the DOM while you drag, and the final order is committed when you release. Note that native drag doesn't work with a finger on most phone browsers, so on a phone use a keyboard or an external one — the arrow keys handle moves there.
  • Phone layout: columns stack into one at widths under 640px, long titles wrap with overflow-wrap: anywhere, and min-width: 0 on grid items prevents any horizontal overflow at 375px.
  • 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.
    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
  • Passed.
    Dragging moves cards between columns and reorders them, and it survives a reload
    Top Page test
  • Passed.
    A card can be moved with the arrow keys and keeps focus
    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 1 min 8 s.
  • First words after 24 s.
  • Wrote 6,769 tokens, 1,779 of them thinking.
  • 35¢ at API prices.
All numbers.
Time to finish1 min 8 s
Time to first words24 s
Input tokens1,170
Cached tokens0
Output tokens6,769
Thinking tokens1,779
Words in the answer1,428
Price at API rates35¢

AI answer from Fable 5.1 · 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.
Show the code and the answer.

Here's the whole thing. Save it as something like kanban.html and open it in your 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; }

  body {
    margin: 0;
    padding: 16px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.4;
    color: #1f2937;
    background: #f3f4f6;
  }

  h1 { margin: 0 0 12px; font-size: 1.4rem; }

  input, button { font: inherit; color: inherit; }

  input[type="text"] {
    padding: 8px 10px;
    border: 1px solid #9ca3af;
    border-radius: 6px;
    background: #fff;
  }

  button {
    padding: 8px 12px;
    border: 1px solid #9ca3af;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
  }
  button:hover { background: #e5e7eb; }

  :focus-visible { outline: 3px solid #2563eb; outline-offset: 1px; }

  #add-form { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
  #new-title { flex: 1 1 200px; min-width: 0; }

  .hint { margin: 0 0 16px; font-size: 0.875rem; color: #6b7280; }

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

  .column {
    min-width: 0;
    padding: 10px;
    border-radius: 8px;
    background: #e5e7eb;
  }
  .column h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    font-size: 1rem;
  }
  .count {
    padding: 0 8px;
    border-radius: 999px;
    background: #fff;
    font-weight: normal;
    font-variant-numeric: tabular-nums;
  }

  .cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 48px;
    margin: 0;
    padding: 0;
    border-radius: 6px;
    list-style: none;
  }
  .cards.drop-empty { outline: 2px dashed #2563eb; }

  .card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 10px;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    cursor: grab;
  }
  .card:active { cursor: grabbing; }
  .card.editing { cursor: auto; }
  .card.dragging { opacity: 0.4; }
  .card.drop-before { box-shadow: 0 -4px 0 0 #2563eb, 0 1px 2px rgba(0, 0, 0, 0.15); }
  .card.drop-after  { box-shadow: 0 4px 0 0 #2563eb, 0 1px 2px rgba(0, 0, 0, 0.15); }

  .title {
    flex: 1 1 auto;
    min-width: 0;
    white-space: pre-wrap;      /* keep spaces exactly as typed */
    overflow-wrap: anywhere;    /* long unbroken text wraps instead of overflowing */
    word-break: break-word;     /* same thing for older browsers */
  }
  .edit-input { flex: 1 1 auto; min-width: 0; }

  .actions { display: flex; gap: 6px; margin-left: auto; }
  .actions button { padding: 6px 10px; font-size: 0.875rem; }
</style>
</head>
<body>
<main>
  <h1>Kanban</h1>

  <form id="add-form">
    <input id="new-title" type="text" placeholder="New card title" aria-label="New card title" autocomplete="off">
    <button type="submit">Add card</button>
  </form>

  <p class="hint">Drag cards to move them, or Tab to a card and use the arrow keys (up/down in a column, left/right between columns). Enter edits the focused card; Escape cancels an edit.</p>

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

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

  const STORAGE_KEY = 'kanban-board';
  const COLUMNS = [
    { id: 'todo',  name: 'To do' },
    { id: 'doing', name: 'Doing' },
    { id: 'done',  name: 'Done' }
  ];
  const COLUMN_IDS = COLUMNS.map(c => c.id);

  const boardEl  = document.getElementById('board');
  const addForm  = document.getElementById('add-form');
  const newTitle = document.getElementById('new-title');

  let board = load();            // { todo: [{ id, title }], doing: [...], done: [...] }
  const editing = new Map();     // card id -> text currently in its edit box
  let dragId = null;             // id of the card being dragged with the pointer

  /* ---------- storage ---------- */

  function load() {
    const result = {};
    for (const col of COLUMN_IDS) result[col] = [];
    try {
      const data = JSON.parse(localStorage.getItem(STORAGE_KEY));
      const seen = new Set();
      for (const col of COLUMN_IDS) {
        if (!data || !Array.isArray(data[col])) continue;
        for (const c of data[col]) {
          if (c && typeof c.id === 'string' && typeof c.title === 'string' && !seen.has(c.id)) {
            seen.add(c.id);
            result[col].push({ id: c.id, title: c.title });
          }
        }
      }
    } catch (err) {
      // nothing saved yet, or unreadable: start empty
    }
    return result;
  }

  function save() {
    try {
      localStorage.setItem(STORAGE_KEY, JSON.stringify(board));
    } catch (err) {
      console.warn('Could not save the board:', err);
    }
  }

  /* ---------- helpers ---------- */

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

  function locate(id) {
    for (const col of COLUMN_IDS) {
      const index = board[col].findIndex(c => c.id === id);
      if (index !== -1) return { col, index };
    }
    return null;
  }

  // Take the card out of wherever it is and insert it at toIndex in toCol.
  function moveCard(id, toCol, toIndex) {
    const from = locate(id);
    if (!from) return;
    const [card] = board[from.col].splice(from.index, 1);
    board[toCol].splice(toIndex, 0, card);
  }

  function cardEl(id) {
    return boardEl.querySelector('.card[data-id="' + CSS.escape(id) + '"]');
  }

  function focusCard(id) {
    const el = cardEl(id);
    if (el) el.focus();
  }

  function elementOf(target) {
    return target instanceof Element ? target : (target ? target.parentElement : null);
  }

  /* ---------- columns (built once) ---------- */

  const listEls = {};
  const countEls = {};

  for (const col of COLUMNS) {
    const section = document.createElement('section');
    section.className = 'column';

    const heading = document.createElement('h2');
    heading.id = 'heading-' + col.id;
    const count = document.createElement('span');
    count.className = 'count';
    count.textContent = '0';
    heading.append(col.name + ' ', count);
    section.setAttribute('aria-labelledby', heading.id);

    const list = document.createElement('ul');
    list.className = 'cards';

    section.append(heading, list);
    boardEl.append(section);

    listEls[col.id] = list;
    countEls[col.id] = count;

    section.addEventListener('dragover', e => onDragOver(e, col.id));
    section.addEventListener('drop', e => onDrop(e, col.id));
  }

  /* ---------- rendering ---------- */

  function render() {
    for (const col of COLUMN_IDS) {
      const list = listEls[col];
      list.textContent = '';
      for (const card of board[col]) list.append(renderCard(card));
      countEls[col].textContent = String(board[col].length);
    }
  }

  function renderCard(card) {
    const li = document.createElement('li');
    li.className = 'card';
    li.dataset.id = card.id;
    li.tabIndex = 0;

    if (editing.has(card.id)) {
      li.classList.add('editing');
      li.draggable = false;
      const input = document.createElement('input');
      input.type = 'text';
      input.className = 'edit-input';
      input.setAttribute('aria-label', 'Card title');
      input.value = editing.get(card.id);
      li.append(input, actionButtons([['save', 'Save']]));
    } else {
      li.draggable = true;
      const title = document.createElement('div');
      title.className = 'title';
      title.textContent = card.title;   // plain text: never interpreted as HTML
      li.append(title, actionButtons([['edit', 'Edit'], ['delete', 'Delete']]));
    }
    return li;
  }

  function actionButtons(defs) {
    const wrap = document.createElement('div');
    wrap.className = 'actions';
    for (const [action, label] of defs) {
      const button = document.createElement('button');
      button.type = 'button';
      button.dataset.action = action;
      button.textContent = label;
      wrap.append(button);
    }
    return wrap;
  }

  /* ---------- adding ---------- */

  addForm.addEventListener('submit', e => {
    e.preventDefault();
    const title = newTitle.value.trim();
    if (!title) return;                      // empty or only spaces: ignored
    board.todo.push({ id: uid(), title });
    newTitle.value = '';
    save();
    render();
  });

  /* ---------- editing and deleting ---------- */

  function startEdit(id) {
    const loc = locate(id);
    if (!loc) return;
    if (!editing.has(id)) editing.set(id, board[loc.col][loc.index].title);
    render();
    const input = cardEl(id).querySelector('.edit-input');
    input.focus();
    input.setSelectionRange(input.value.length, input.value.length);
  }

  function saveEdit(id, refocus) {
    const loc = locate(id);
    if (!loc) return;
    const title = (editing.get(id) || '').trim();
    editing.delete(id);
    if (title) board[loc.col][loc.index].title = title;   // an emptied title keeps the old one
    save();
    render();
    if (refocus) focusCard(id);
  }

  function cancelEdit(id) {
    editing.delete(id);
    render();
    focusCard(id);
  }

  function deleteCard(id, refocus) {
    const loc = locate(id);
    if (!loc) return;
    board[loc.col].splice(loc.index, 1);
    editing.delete(id);
    save();
    render();
    if (refocus) {                           // keyboard users: land on a neighbouring card
      const list = board[loc.col];
      const neighbour = list[loc.index] || list[loc.index - 1];
      if (neighbour) focusCard(neighbour.id);
      else newTitle.focus();
    }
  }

  boardEl.addEventListener('click', e => {
    const button = e.target.closest('button[data-action]');
    if (!button) return;
    const id = button.closest('.card').dataset.id;
    const viaKeyboard = e.detail === 0;      // Enter/Space on the button rather than a pointer
    switch (button.dataset.action) {
      case 'edit':   startEdit(id); break;
      case 'save':   saveEdit(id, viaKeyboard); break;
      case 'delete': deleteCard(id, viaKeyboard); break;
    }
  });

  boardEl.addEventListener('input', e => {
    if (e.target.classList.contains('edit-input')) {
      editing.set(e.target.closest('.card').dataset.id, e.target.value);
    }
  });

  /* ---------- keyboard ---------- */

  boardEl.addEventListener('keydown', e => {
    const card = e.target.closest('.card');
    if (!card) return;
    const id = card.dataset.id;

    if (e.target.classList.contains('edit-input')) {
      if (e.isComposing) return;
      if (e.key === 'Enter')  { e.preventDefault(); saveEdit(id, true); }
      if (e.key === 'Escape') { e.preventDefault(); cancelEdit(id); }
      return;
    }

    if (e.target !== card) return;                 // keys pressed on a button: leave alone
    if (e.altKey || e.ctrlKey || e.metaKey) return;

    if (e.key === 'Enter') { e.preventDefault(); startEdit(id); return; }

    const moved = moveByKey(id, e.key);
    if (moved === null) return;                    // not an arrow key
    e.preventDefault();                            // don't scroll the page
    if (moved) { save(); render(); }
    focusCard(id);                                 // keep focus on the card after it moves
  });

  // Returns true if the card moved, false if it could not, null for other keys.
  function moveByKey(id, key) {
    const loc = locate(id);
    if (!loc) return null;
    const colIndex = COLUMN_IDS.indexOf(loc.col);
    switch (key) {
      case 'ArrowUp':
        if (loc.index === 0) return false;
        moveCard(id, loc.col, loc.index - 1);
        return true;
      case 'ArrowDown':
        if (loc.index === board[loc.col].length - 1) return false;
        moveCard(id, loc.col, loc.index + 1);
        return true;
      case 'ArrowLeft':
      case 'ArrowRight': {
        const target = COLUMN_IDS[colIndex + (key === 'ArrowLeft' ? -1 : 1)];
        if (!target) return false;
        moveCard(id, target, Math.min(loc.index, board[target].length));
        return true;
      }
      default:
        return null;
    }
  }

  /* ---------- drag and drop ---------- */

  boardEl.addEventListener('dragstart', e => {
    const el = elementOf(e.target);
    const card = el && el.closest('.card');
    if (!card || !card.draggable) return;
    dragId = card.dataset.id;
    e.dataTransfer.effectAllowed = 'move';
    e.dataTransfer.setData('text/plain', card.querySelector('.title').textContent);
    setTimeout(() => card.classList.add('dragging'), 0);   // after the browser takes its drag image
  });

  boardEl.addEventListener('dragend', endDrag);

  document.addEventListener('dragover', e => {
    const el = elementOf(e.target);
    if (dragId && !(el && el.closest('.column'))) clearDropMarkers();
  });

  document.addEventListener('drop', e => {
    if (dragId) e.preventDefault();   // never let the browser treat a dropped card as text or a link
  });

  function endDrag() {
    dragId = null;
    boardEl.querySelectorAll('.card.dragging').forEach(el => el.classList.remove('dragging'));
    clearDropMarkers();
  }

  // The cards in a column other than the one being dragged, in order.
  function otherCards(col) {
    return Array.from(listEls[col].children).filter(el => el.dataset.id !== dragId);
  }

  // Where (among the other cards) the dragged card would be inserted at pointer height y.
  function dropIndex(col, y) {
    const items = otherCards(col);
    for (let i = 0; i < items.length; i++) {
      const box = items[i].getBoundingClientRect();
      if (y < box.top + box.height / 2) return i;
    }
    return items.length;
  }

  function onDragOver(e, col) {
    if (!dragId) return;
    e.preventDefault();                       // allow dropping here
    e.dataTransfer.dropEffect = 'move';
    showDropMarker(col, dropIndex(col, e.clientY));
  }

  function onDrop(e, col) {
    if (!dragId) return;
    e.preventDefault();
    const id = dragId;
    const index = dropIndex(col, e.clientY);
    endDrag();
    moveCard(id, col, index);
    save();
    render();
  }

  function showDropMarker(col, index) {
    clearDropMarkers();
    const from = locate(dragId);
    if (from && from.col === col && from.index === index) return;   // same place as now
    const items = otherCards(col);
    if (items.length === 0) listEls[col].classList.add('drop-empty');
    else if (index < items.length) items[index].classList.add('drop-before');
    else items[items.length - 1].classList.add('drop-after');
  }

  function clearDropMarkers() {
    boardEl.querySelectorAll('.drop-before, .drop-after, .drop-empty')
      .forEach(el => el.classList.remove('drop-before', 'drop-after', 'drop-empty'));
  }

  /* ---------- keep in step if the board is open in another tab ---------- */

  window.addEventListener('storage', e => {
    if (e.key === null || e.key === STORAGE_KEY) {
      board = load();
      render();
    }
  });

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

A few things worth knowing:

  • Storage is the browser's localStorage, so the board belongs to that browser on that computer (and to the place the file is opened from). It isn't synced anywhere.
  • Left/right arrows put the card at the same position in the neighbouring column (or at the bottom if that column is shorter); up/down then adjust from there. Arrow keys do nothing when there's nowhere to go, and focus stays on the card.
  • Small extras beyond your list: Enter on a focused card opens it for editing, Escape cancels an edit, and saving an edit that's empty or only spaces keeps the old title instead of blanking it. Titles are trimmed at the ends but spaces inside are kept exactly, and nothing you type is ever parsed as HTML.
  • Dragging with a finger depends on the browser: Safari on iPhone supports it, but most Android browsers don't do HTML drag-and-drop by touch. If you need that, I can add a small drag handle that works with touch.
  • 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.
    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
  • Passed.
    Dragging moves cards between columns and reorders them, and it survives a reload
    Top Page test
  • Passed.
    A card can be moved with the arrow keys and keeps focus
    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 12 min 2 s.
  • First words after 11 min 10 s.
  • Wrote 62,788 tokens, 56,245 of them thinking.
  • $3.15 at API prices.
All numbers.
Time to finish12 min 2 s
Time to first words11 min 10 s
Input tokens1,170
Cached tokens0
Output tokens62,788
Thinking tokens56,245
Words in the answer1,898
Price at API rates$3.15
B04Minesweeper in one HTML fileLow 9/9Max 8/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 fewer check than low.

AI answer from Fable 5.1 · 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.
<!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: 12px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: #f0f0f0;
    color: #222;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  h1 { font-size: 1.4rem; margin: 0 0 10px; }
  .bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 351px;
    margin-bottom: 10px;
    gap: 8px;
  }
  #counter { font-weight: bold; font-size: 1.1rem; }
  #newgame {
    font-size: 1rem;
    padding: 8px 14px;
    min-height: 40px;
    cursor: pointer;
  }
  #message {
    min-height: 1.6em;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
  }
  #board {
    display: grid;
    grid-template-columns: repeat(9, 36px);
    grid-auto-rows: 36px;
    gap: 3px;
    user-select: none;
    -webkit-user-select: none;
  }
  #board button {
    width: 36px;
    height: 36px;
    padding: 0;
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    border: 2px solid #999;
    border-radius: 4px;
    background: #cfcfcf;
    cursor: pointer;
    touch-action: manipulation;
  }
  #board button:focus-visible {
    outline: 3px solid #2a6df4;
    outline-offset: 1px;
  }
  #board button.open {
    background: #fff;
    border-color: #ddd;
    cursor: default;
  }
  #board button.mine { background: #ffb3b3; }
  #board.locked button { cursor: default; }
  .n1 { color: #1b4fd6; }
  .n2 { color: #198a19; }
  .n3 { color: #d11a1a; }
  .n4 { color: #0d1a7a; }
  .n5 { color: #7a1a0d; }
  .n6 { color: #0d7a7a; }
  .n7 { color: #000; }
  .n8 { color: #666; }
</style>
</head>
<body>
  <h1>Minesweeper</h1>
  <div class="bar">
    <div id="counter" aria-live="polite">Mines left: 10</div>
    <button id="newgame" type="button">New game</button>
  </div>
  <div id="message" role="status" aria-live="assertive"></div>
  <div id="board" aria-label="Minesweeper board"></div>

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

  let cells = [];        // array of {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 inBounds(r, c) { return r >= 0 && r < ROWS && c >= 0 && c < COLS; }

  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;
        if (inBounds(r + dr, c + dc)) out.push(idx(r + dr, c + dc));
      }
    }
    return out;
  }

  function updateCounter() {
    counterEl.textContent = 'Mines left: ' + (MINES - flags);
  }

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

    for (let i = 0; i < ROWS * COLS; i++) {
      const el = document.createElement('button');
      el.type = 'button';
      el.dataset.i = i;
      const r = Math.floor(i / COLS) + 1, c = (i % COLS) + 1;
      el.setAttribute('aria-label', 'Row ' + r + ' column ' + c + ', unopened');
      el.addEventListener('click', onOpen);
      el.addEventListener('contextmenu', onFlag);
      el.addEventListener('keydown', onKey);
      boardEl.appendChild(el);
      cells.push({ mine: false, open: false, flag: false, count: 0, el: el });
    }
  }

  function placeMines(safeIndex) {
    const pool = [];
    for (let i = 0; i < cells.length; i++) if (i !== safeIndex) pool.push(i);
    for (let k = 0; k < MINES; k++) {
      const j = k + Math.floor(Math.random() * (pool.length - k));
      const t = pool[k]; pool[k] = pool[j]; pool[j] = t;
      cells[pool[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 setLabel(i, state) {
    const r = Math.floor(i / COLS) + 1, c = (i % COLS) + 1;
    cells[i].el.setAttribute('aria-label', 'Row ' + r + ' column ' + c + ', ' + state);
  }

  function reveal(start) {
    const stack = [start];
    while (stack.length) {
      const i = stack.pop();
      const cell = cells[i];
      if (cell.open || cell.flag) continue;
      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);
        setLabel(i, cell.count + ' mines nearby');
      } else {
        cell.el.textContent = '';
        setLabel(i, 'empty');
        neighbours(i).forEach(n => { if (!cells[n].open && !cells[n].flag) stack.push(n); });
      }
    }
  }

  function lose() {
    gameOver = true;
    boardEl.classList.add('locked');
    cells.forEach((cell, i) => {
      if (cell.mine) {
        cell.el.textContent = '💣';
        cell.el.classList.add('mine');
        setLabel(i, 'mine');
      }
    });
    messageEl.textContent = 'Game over';
  }

  function checkWin() {
    if (openedCount === ROWS * COLS - MINES) {
      gameOver = true;
      boardEl.classList.add('locked');
      messageEl.textContent = 'You win!';
    }
  }

  function onOpen(e) {
    if (gameOver) return;
    const i = Number(e.currentTarget.dataset.i);
    const cell = cells[i];
    if (cell.open || cell.flag) return;
    if (!minesPlaced) placeMines(i);
    if (cell.mine) { lose(); return; }
    reveal(i);
    checkWin();
  }

  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 ? '🚩' : '';
    setLabel(i, cell.flag ? 'flagged' : 'unopened');
    updateCounter();
  }

  function onFlag(e) {
    e.preventDefault();
    toggleFlag(Number(e.currentTarget.dataset.i));
  }

  // Keyboard extras: Enter/Space open via the native click; F toggles a flag;
  // arrow keys move focus around the grid.
  function onKey(e) {
    const i = Number(e.currentTarget.dataset.i);
    if (e.key === 'f' || e.key === 'F') { e.preventDefault(); toggleFlag(i); return; }
    const r = Math.floor(i / COLS), c = i % COLS;
    let nr = r, nc = c;
    if (e.key === 'ArrowUp') nr--; else if (e.key === 'ArrowDown') nr++;
    else if (e.key === 'ArrowLeft') nc--; else if (e.key === 'ArrowRight') nc++;
    else return;
    e.preventDefault();
    if (inBounds(nr, nc)) cells[idx(nr, nc)].el.focus();
  }

  newGameBtn.addEventListener('click', buildBoard);
  buildBoard();
})();
</script>
</body>
</html>

Notes on how it meets each point:

  • Board: 9×9 with 10 mines; each square is a <button>, so Tab reaches it and Enter/Space open it (the browser fires click). I also added F to flag and arrow keys to move between squares, since right-click isn't available from the keyboard.
  • Flags: right click (contextmenu) toggles 🚩 on unopened squares; flagged squares are ignored by both direct opens and the flood fill until unflagged.
  • Counter: "Mines left" is always 10 minus the current number of flags.
  • Safe first click: mines are only placed after the first open, excluding that square.
  • Numbers/flood fill: counts use the 8 neighbours; zero-count squares open their neighbours iteratively.
  • Win/lose: win when opened squares equal 71 (81 − 10) → "You win!"; opening a mine → "Game over", all mines show 💣, and the board stops responding.
  • New game: rebuilds the board with fresh mines, counter at 10, message cleared.
  • Size: 36px squares with 3px gaps make the grid 348px wide, so it fits a 375px phone with no sideways scrolling.
  • 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 40 s.
  • First words after 6.6 s.
  • Wrote 3,993 tokens, 324 of them thinking.
  • 21¢ at API prices.
All numbers.
Time to finish40 s
Time to first words6.6 s
Input tokens1,112
Cached tokens0
Output tokens3,993
Thinking tokens324
Words in the answer1,086
Price at API rates21¢

AI answer from Fable 5.1 · max 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 game in one file. Save it as something like minesweeper.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>Minesweeper</title>
<style>
  :root {
    --cell: 36px;   /* square size: 9 × 36 + 8 × 2 = 340px, fits a 375px phone */
    --gap: 2px;
  }
  * { box-sizing: border-box; }
  html, body { margin: 0; }
  body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: #f3f4f6;
    color: #111827;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
  }
  h1 { font-size: 1.4rem; margin: 0 0 10px; }

  .bar {
    width: calc(var(--cell) * 9 + var(--gap) * 8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
  }
  .counter { font-weight: 600; font-variant-numeric: tabular-nums; }
  #newGame {
    font: inherit;
    min-height: 36px;
    padding: 6px 14px;
    border: 1px solid #6b7280;
    border-radius: 6px;
    background: #fff;
    color: inherit;
    cursor: pointer;
  }

  .board {
    display: grid;
    grid-template-columns: repeat(9, var(--cell));
    grid-auto-rows: var(--cell);
    gap: var(--gap);
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
  }
  .cell {
    appearance: none;
    -webkit-appearance: none;
    width: var(--cell);
    height: var(--cell);
    margin: 0;
    padding: 0;
    font: inherit;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    border: 1px solid #64748b;
    border-radius: 4px;
    background: #cbd5e1;
    color: #111827;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  .cell:not(.open):not(:disabled):hover { background: #b8c4d4; }
  .cell.open { background: #f9fafb; border-color: #d1d5db; cursor: default; }
  .cell.mine { background: #e5e7eb; }
  .cell.hit  { background: #f87171; }
  .cell:disabled { cursor: default; opacity: 1; }
  .board.over .cell:not(.open):not(.mine) { opacity: 0.6; }
  .cell:focus-visible, #newGame:focus-visible { outline: 3px solid #2563eb; outline-offset: 1px; }

  .cell[data-n="1"] { color: #1d4ed8; }
  .cell[data-n="2"] { color: #15803d; }
  .cell[data-n="3"] { color: #dc2626; }
  .cell[data-n="4"] { color: #1e3a8a; }
  .cell[data-n="5"] { color: #7c2d12; }
  .cell[data-n="6"] { color: #0f766e; }
  .cell[data-n="7"] { color: #111827; }
  .cell[data-n="8"] { color: #6b7280; }

  #message {
    min-height: 1.6em;
    margin: 12px 0 0;
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
  }
  .help {
    max-width: calc(var(--cell) * 9 + var(--gap) * 8);
    margin: 10px 0 0;
    font-size: 0.85rem;
    color: #4b5563;
    text-align: center;
  }

  /* Very narrow screens: shrink to the 32px minimum so the board still fits. */
  @media (max-width: 359px) {
    :root { --cell: 32px; --gap: 1px; }
    body { padding: 8px; }
  }
</style>
</head>
<body>
  <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="group" aria-label="Minesweeper board"></div>

  <p id="message" role="status" aria-live="polite"></p>

  <p class="help">
    Click a square to open it. Right-click (or long-press on a touch screen) to put a 🚩 on it or take it off.
    Keyboard: Tab or arrow keys to move, Enter or Space to open, F to flag.
  </p>

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

  const SIZE = 9;
  const MINES = 10;
  const TOTAL = SIZE * SIZE;

  const boardEl = document.getElementById('board');
  const minesLeftEl = document.getElementById('minesLeft');
  const messageEl = document.getElementById('message');
  const newGameBtn = document.getElementById('newGame');

  // Game state
  const cells = [];          // { el, mine, open, flag, count }
  let minesPlaced = false;   // mines go down on the first open, so it can never hit one
  let gameOver = false;
  let flags = 0;
  let opened = 0;

  // Touch long-press state (long-press = flag on phones, where there is no right click)
  let pressTimer = 0;
  let pressX = 0, pressY = 0;
  let longPressed = false;
  let suppressClick = false;

  // Build the 81 buttons once; they are reused for every game.
  for (let i = 0; i < TOTAL; i++) {
    const b = document.createElement('button');
    b.type = 'button';
    b.className = 'cell';
    b.dataset.i = i;
    boardEl.appendChild(b);
    cells.push({ el: b, mine: false, open: false, flag: false, count: 0 });
  }

  const row = i => Math.floor(i / SIZE);
  const col = i => i % SIZE;

  function neighbours(i) {
    const r = row(i), c = col(i), 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 < SIZE && nc >= 0 && nc < SIZE) out.push(nr * SIZE + nc);
      }
    }
    return out;
  }

  function describe(i, state) {
    return `Row ${row(i) + 1}, column ${col(i) + 1}: ${state}`;
  }

  // Draw one square from its state.
  function render(i) {
    const c = cells[i], b = c.el;
    b.classList.toggle('open', c.open);
    if (c.open) {
      b.textContent = c.count ? String(c.count) : '';
      b.dataset.n = c.count;
      b.setAttribute('aria-label', describe(i,
        c.count ? `${c.count} mine${c.count === 1 ? '' : 's'} nearby` : 'empty'));
    } else {
      delete b.dataset.n;
      b.textContent = c.flag ? '🚩' : '';
      b.setAttribute('aria-label', describe(i, c.flag ? 'flagged' : 'unopened'));
    }
  }

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

  // Put 10 mines anywhere except the square that was opened first.
  function placeMines(safe) {
    const pool = [];
    for (let i = 0; i < TOTAL; i++) if (i !== safe) pool.push(i);
    for (let k = 0; k < MINES; k++) {
      const j = k + Math.floor(Math.random() * (pool.length - k));
      [pool[k], pool[j]] = [pool[j], pool[k]];
      cells[pool[k]].mine = true;
    }
    cells.forEach((c, i) => {
      if (!c.mine) c.count = neighbours(i).filter(n => cells[n].mine).length;
    });
    minesPlaced = true;
  }

  function toggleFlag(i) {
    const c = cells[i];
    if (gameOver || c.open) return;
    c.flag = !c.flag;
    flags += c.flag ? 1 : -1;
    render(i);
    updateCounter();
  }

  function open(i) {
    const c = cells[i];
    if (gameOver || c.open || c.flag) return;   // flagged squares stay shut
    if (!minesPlaced) placeMines(i);
    if (c.mine) { lose(i); return; }

    // Open the square; if it has no mines around it, keep opening neighbours.
    const stack = [i];
    while (stack.length) {
      const j = stack.pop(), d = cells[j];
      if (d.open || d.flag || d.mine) continue;
      d.open = true;
      opened++;
      render(j);
      if (d.count === 0) {
        neighbours(j).forEach(n => { if (!cells[n].open && !cells[n].flag) stack.push(n); });
      }
    }
    if (opened === TOTAL - MINES) win();
  }

  function finish(text) {
    gameOver = true;
    cancelPress();
    messageEl.textContent = text;
    boardEl.classList.add('over');
    cells.forEach(c => { c.el.disabled = true; });   // the board takes no more clicks
    newGameBtn.focus();
  }

  function lose(hit) {
    cells.forEach((c, i) => {
      if (c.mine) {
        c.el.textContent = '💣';
        c.el.classList.add('mine');
        c.el.setAttribute('aria-label', describe(i, 'mine'));
      }
    });
    cells[hit].el.classList.add('hit');
    finish('Game over');
  }

  function win() {
    finish('You win!');
  }

  function newGame() {
    cancelPress();
    minesPlaced = false;
    gameOver = false;
    flags = 0;
    opened = 0;
    messageEl.textContent = '';
    boardEl.classList.remove('over');
    cells.forEach((c, i) => {
      c.mine = false; c.open = false; c.flag = false; c.count = 0;
      c.el.disabled = false;
      c.el.classList.remove('mine', 'hit');
      render(i);
    });
    updateCounter();
  }

  // ---------- Input ----------

  const cellFromEvent = e => e.target.closest('.cell');

  function cancelPress() {
    clearTimeout(pressTimer);
    pressTimer = 0;
  }

  // Left click, Enter and Space all arrive here as a click event.
  boardEl.addEventListener('click', e => {
    const b = cellFromEvent(e);
    if (!b) return;
    // Ignore the click that follows a long-press (it already toggled a flag).
    // Keyboard clicks have detail 0 and are never ignored.
    if (suppressClick && e.detail !== 0) { suppressClick = false; return; }
    open(+b.dataset.i);
  });

  // Right click: toggle a flag. The browser's own menu never appears over the board.
  boardEl.addEventListener('contextmenu', e => {
    e.preventDefault();
    cancelPress();
    const b = cellFromEvent(e);
    if (!b) return;
    if (longPressed) { longPressed = false; return; }   // already handled by the long-press timer
    suppressClick = true;
    toggleFlag(+b.dataset.i);
  });

  // Touch: holding a square for about half a second toggles a flag.
  boardEl.addEventListener('pointerdown', e => {
    cancelPress();
    suppressClick = false;
    longPressed = false;
    const b = cellFromEvent(e);
    if (!b || gameOver || e.pointerType === 'mouse' || e.button !== 0) return;
    const i = +b.dataset.i;
    pressX = e.clientX;
    pressY = e.clientY;
    pressTimer = setTimeout(() => {
      pressTimer = 0;
      longPressed = true;
      suppressClick = true;
      toggleFlag(i);
    }, 450);
  });
  boardEl.addEventListener('pointermove', e => {
    if (pressTimer && (Math.abs(e.clientX - pressX) > 10 || Math.abs(e.clientY - pressY) > 10)) cancelPress();
  });
  ['pointerup', 'pointercancel', 'pointerleave'].forEach(type => boardEl.addEventListener(type, cancelPress));

  // Keyboard extras: arrow keys move between squares, F toggles a flag.
  boardEl.addEventListener('keydown', e => {
    if (e.ctrlKey || e.metaKey || e.altKey) return;
    const b = cellFromEvent(e);
    if (!b) return;
    const i = +b.dataset.i;
    let r = row(i), c = col(i);
    switch (e.key) {
      case 'f': case 'F': e.preventDefault(); toggleFlag(i); return;
      case 'ArrowUp':    r--; break;
      case 'ArrowDown':  r++; break;
      case 'ArrowLeft':  c--; break;
      case 'ArrowRight': c++; break;
      default: return;
    }
    e.preventDefault();
    if (r >= 0 && r < SIZE && c >= 0 && c < SIZE) cells[r * SIZE + c].el.focus();
  });

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

Notes on how it meets your list:

  • Board: 9 × 9 <button> squares, 36px each (32px on screens under 360px wide). Total width is 340px plus 12px padding each side, so it fits 375px with no sideways scrolling.
  • Opening: left click, or Enter/Space on a focused square — buttons fire a normal click event for all three, so one handler covers them.
  • Flags: right-click toggles 🚩 on unopened squares; a flagged square won't open until the flag is removed (the cascade also skips flagged squares). The browser's context menu is suppressed over the board.
  • Mines left: shows 10 minus the number of flags (it goes negative if you over-flag, as in the original).
  • Safe first click: mines are placed only when you open your first square, and that square is excluded.
  • Numbers and cascade: each number counts the 8 surrounding squares; a 0 opens its neighbours and keeps spreading.
  • Win/lose: "You win!" when all 71 non-mine squares are open; opening a mine shows "Game over", turns every mine into 💣 (the one you hit is highlighted red), and disables all squares.
  • New game: resets everything — new mine layout on the next first click, counter back to 10, message cleared.

Two small extras I added because the spec didn't rule them out: long-press on a touch screen toggles a flag (phones have no right-click), and on the keyboard the arrow keys move between squares and F toggles a flag. Delete the pointerdown/pointermove/keydown handlers if you'd rather not have them.

  • 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 8 min 19 s.
  • First words after 7 min 35 s.
  • Wrote 44,743 tokens, 39,385 of them thinking.
  • $2.25 at API prices.
All numbers.
Time to finish8 min 19 s
Time to first words7 min 35 s
Input tokens1,112
Cached tokens0
Output tokens44,743
Thinking tokens39,385
Words in the answer1,657
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 Fable 5.1 · 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.

Three separate causes, all fixable in CSS only. What was happening:

  1. Sideways scroll — the fees table has a fixed width: 720px, which is wider than any phone, and the long email address is one unbreakable word that overflows its box. Both push the page out sideways.
  2. Headings hidden under the header — a sticky header sits on top of the page, so when the browser jumps to #events it puts the heading at the very top, behind the header. scroll-margin-top tells the browser to stop short by the header's height.
  3. Squashed cards — the grid is always repeat(3, 1fr); it needs to drop to one column on narrow screens.

Here is the whole file. Changes are marked with /* changed */ or /* new */ comments in the CSS; the HTML is identical except that the table is wrapped in a <div class="table-scroll"> so that, on the very narrowest phones, the table scrolls inside its own box rather than dragging the whole page sideways.

<!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: .4rem 1.1rem; } /* changed: links may wrap on tiny screens */
  .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: 4.5rem; /* new: stop short of the sticky header when jumping to a section */
  }
  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; }
  .table-scroll { max-width: 100%; overflow-x: auto; } /* new: table scrolls inside its own box if it must */
  .fees { width: 100%; max-width: 720px; border-collapse: collapse; background: #fff; } /* changed: was width: 720px */
  .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; } /* changed: long address may break across lines */
  .email a { color: #1f4424; }
  footer { background: #23301f; color: #d8dccc; padding: 1.5rem 0; font-size: .9rem; }

  /* new: phone layout */
  @media (max-width: 640px) {
    .cards { grid-template-columns: 1fr; }     /* one card per row */
    section.block { scroll-margin-top: 6.5rem; } /* header is two rows tall here (brand above links) */
  }
</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>

On a laptop nothing changes: the table is still 720px wide (max-width: 720px with width: 100% gives the same size inside the 960px wrap), the cards are still three across, and the header is still sticky. If, after trying it, a heading still sits a few pixels under the header on your particular phone, nudge the 6.5rem in the media query up slightly; if there's too much gap, nudge it down.

  • 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 45 s.
  • First words after 15 s.
  • Wrote 4,048 tokens, 830 of them thinking.
  • 24¢ at API prices.
All numbers.
Time to finish45 s
Time to first words15 s
Input tokens3,362
Cached tokens0
Output tokens4,048
Thinking tokens830
Words in the answer979
Price at API rates24¢

AI answer from Fable 5.1 · 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 whole file with the fixes in place. Laptop layout is untouched (the table is still 720px, cards still three across, header still sticky).

<!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; 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;
    /* Room for the sticky header when a nav link jumps to a section (one-line header). */
    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, 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 stays 720px on wide screens; on narrow screens it shrinks to fit, and if it
     still can't fit, it scrolls inside this box instead of the whole page. */
  .table-scroll { max-width: 720px; overflow-x: auto; }
  .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 onto a second line instead of overflowing. */
  .email { font-size: 1.1rem; font-weight: 600; overflow-wrap: break-word; }
  .email a { color: #1f4424; }
  footer { background: #23301f; color: #d8dccc; padding: 1.5rem 0; font-size: .9rem; }

  /* Phones */
  @media (max-width: 640px) {
    .cards { grid-template-columns: 1fr; }
    /* The header wraps onto two lines at this width, so leave more room when jumping. */
    section.block { scroll-margin-top: 6rem; }
    .fees th, .fees td { padding: .7rem .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>

What was wrong and what changed

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

  • The fees table had a hard width: 720px. It now has width: 100% inside a new .table-scroll wrapper with max-width: 720px, so on a laptop it's still exactly 720px, left-aligned as before, but on a phone it shrinks to fit. If a phone is too narrow even for that, the table scrolls inside its own box rather than dragging the whole page sideways. I also trimmed the cell side-padding slightly on phones so it fits without needing to scroll on most of them.
  • The email address is one 56-character unbreakable "word", so it poked out of the contact box. overflow-wrap: break-word on .email lets it break onto a second line only when it has to; on a laptop it fits on one line, so nothing changes there.
  • The three-column card grid was also overflowing (the cards can't shrink below their longest words), which is the same thing you noticed as "squashed". Fix 3 below sorts that out too.

I deliberately didn't use the common overflow-x: hidden on the body trick: it hides the symptom instead of fixing it, and when applied carelessly it can break position: sticky.

2. Headings hidden under the header. When you jump to #events, the browser puts the top of that section at the very top of the viewport, i.e. underneath the sticky header. scroll-margin-top on section.block tells the browser to stop that much short. It's 4rem normally (the header is one line tall, about 57px) and 6rem on phones, where the header wraps onto two lines (about 86px). This also quietly fixes the laptop, where the heading was being clipped a little as well. If a particular phone still clips the heading, just nudge the 6rem up.

3. One card per row on phones. The @media (max-width: 640px) block switches .cards to a single column. Above 640px (tablets and laptops) you still get three across.

Nothing about the header was touched, so it stays sticky.

  • 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 5 min 19 s.
  • First words after 4 min 48 s.
  • Wrote 26,227 tokens, 22,708 of them thinking.
  • $1.35 at API prices.
All numbers.
Time to finish5 min 19 s
Time to first words4 min 48 s
Input tokens3,362
Cached tokens0
Output tokens26,227
Thinking tokens22,708
Words in the answer1,121
Price at API rates$1.35

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 Fable 5.1 · low effort · 2 Oct 2026

7 of 7

What was wrong

The cursor is just a created_at value, and the ordering is ORDER BY created_at DESC alone. That breaks in two ways when timestamps collide (which the importer guarantees):

  1. Ties are unordered. SQLite is free to return rows with equal created_at in any order, and it can vary between calls, so the same tie group can come out shuffled on consecutive pages — some posts appear twice, others never.
  2. The cursor can't point inside a tie group. The next page uses created_at <= cursor, which re-includes every post at that timestamp (duplicates). Had it used <, it would skip every post at that timestamp that didn't fit on the previous page (missing posts). Neither comparison is correct because a timestamp alone doesn't identify a position.

Busy days produce more identical timestamps, so it shows up more then. The fix is a keyset cursor over the full sort key (created_at DESC, id DESC): encode both values in the cursor and continue strictly after that exact row.

Fixed function

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.

    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.

    Ordering is (created_at DESC, id DESC), so posts that share a
    created_at come out highest id first. The cursor encodes the last
    (created_at, id) returned, and the next page continues strictly
    after that row.
    """
    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:
        try:
            ts_str, id_str = cursor.split(":", 1)
            last_ts, last_id = int(ts_str), int(id_str)
        except (AttributeError, ValueError):
            raise ValueError("invalid 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_ts, last_ts, last_id, limit + 1),
        )

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

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

Two notes:

  • The cursor format changed ("<created_at>:<id>"), so cursors issued by the old version won't parse. If clients might still hold old ones, treat a cursor without a : as a first-page request rather than raising.
  • For performance, add an index that matches the sort key: CREATE INDEX IF NOT EXISTS posts_feed ON posts(created_at DESC, id DESC); — this lets SQLite walk straight to the cursor position instead of scanning.
  • 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 1.8 s.
  • Wrote 1,199 tokens.
  • 7.4¢ at API prices.
All numbers.
Time to finish15 s
Time to first words1.8 s
Input tokens1,409
Cached tokens0
Output tokens1,199
Thinking tokens0
Words in the answer457
Price at API rates7.4¢

AI answer from Fable 5.1 · max effort · 2 Oct 2026

7 of 7

What was wrong

The query orders by created_at only, and the cursor is just the last row's created_at, resumed with created_at <= cursor. Posts that share a timestamp have no defined order relative to each other, and the cursor can't say which of them was the last one shown, so each next page restarts at the top of the tie group sitting on the page boundary:

  • the tied posts that were already on the previous page come back → duplicates;
  • if a tie group is bigger than one page (a batch import, a busy minute), next_cursor is the same timestamp every time and the paging never gets past it, so the rest of that group and everything older is never reached → missing posts.

Busy days mean more posts per second and bigger imports, so bigger tie groups and more of both. On top of that, without a tiebreaker SQLite doesn't promise the same order inside a tie group from one query to the next.

The fix is a proper keyset: order by (created_at DESC, id DESC), put both values of the last row into the cursor, and resume strictly after that pair. This is also stable against posts being inserted while someone scrolls.

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.

    rows is a list of (id, author, body, created_at) tuples, ordered by
    created_at DESC then id DESC (posts sharing a created_at come back
    higher id first).
    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:
        # The cursor is "<created_at>:<id>" of the last post on the previous
        # page. Resume strictly after that post in (created_at DESC, id DESC)
        # order. The leading "created_at <= ?" is logically redundant with the
        # OR, but it lets SQLite do a single index range scan (no sort) on any
        # SQLite version, including ones too old for (created_at, id) < (?, ?).
        try:
            ts, pid = cursor.split(":")
            last_created_at, last_id = int(ts), int(pid)
        except (AttributeError, ValueError):
            raise ValueError(f"invalid cursor: {cursor!r}") from None
        cur = conn.execute(
            f"SELECT {COLUMNS} FROM posts "
            "WHERE created_at <= ? AND (created_at < ? OR 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]

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

Two things worth doing alongside it:

  • Make sure there is an index on created_at (CREATE INDEX IF NOT EXISTS posts_created_at ON posts(created_at);). Because id is the rowid, SQLite already stores it as the last key of that index, so each page becomes one short index scan with no sorting.
  • Cursors issued by the old version won't parse any more (they raise ValueError), so have the app treat an invalid cursor as "reload from the top" for the few sessions in flight when you deploy.
  • 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 3 min 5 s.
  • First words after 2 min 55 s.
  • Wrote 16,066 tokens, 14,739 of them thinking.
  • 82¢ at API prices.
All numbers.
Time to finish3 min 5 s
Time to first words2 min 55 s
Input tokens1,409
Cached tokens0
Output tokens16,066
Thinking tokens14,739
Words in the answer553
Price at API rates82¢
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 Fable 5.1 · low effort · 2 Oct 2026

7 of 7

Both bugs come from the same root cause: every onInput call runs independently and has no idea whether it is still the newest one. So when a slower, older request resolves after a newer one, it calls render with stale results (bug 1), and its finally calls setLoading(false) even though the newer request is still in flight (bug 2). The same thing can clobber an emptied box: you clear the text, render([]) runs, and then an old request lands and draws its results anyway.

Since the client can't be cancelled, the fix is to ignore stale responses on our side. The controller keeps a sequence number; each onInput call takes the next number, and after the await it checks whether it is still the latest before touching the UI. Emptying the box also bumps the number, so anything still in flight is retired.

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) {
  // Sequence number of the most recent onInput call. Any request whose
  // number is lower than this is stale and must not touch the UI.
  let latest = 0;

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

      if (query === "") {
        // Clearing the box retires every in-flight request (they see
        // that `latest` has moved on), so nothing can repopulate the list.
        render([]);
        setLoading(false);
        return;
      }

      setLoading(true);

      let results: string[] | undefined;
      let error: Error | undefined;
      try {
        results = await fetchResults(query);
      } catch (err) {
        error = err instanceof Error ? err : new Error(String(err));
      }

      // A newer keystroke (or a clear) happened while we were waiting.
      // That call owns the list and the spinner now; do nothing.
      if (id !== latest) {
        return;
      }

      if (error) {
        render([], error);
      } else {
        render(results ?? []);
      }
      setLoading(false);
    },
  };
}

What changed, briefly:

  • Stale results: id !== latest after the await means a newer input has arrived, so the response is discarded instead of rendered. Responses can arrive in any order and only the newest one wins.
  • Spinner going off early: setLoading(false) is now only called by the request that is still the latest, or when the box is cleared. Older requests finishing (successfully or not) no longer touch the spinner, so it stays on exactly while the newest search is pending.
  • Emptied box: clearing bumps the sequence number, clears the list and turns the spinner off; any older request that completes afterwards fails the id !== latest check and is ignored.
  • The try/finally was replaced by capturing the outcome and deciding afterwards, since the "is this still current" check has to happen after the await and before any UI call, including the one in finally.
  • Calling setLoading(true) on every keystroke while already loading is harmless (it is idempotent), so the spinner simply stays on across rapid typing.
  • 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 17 s.
  • First words after 3.9 s.
  • Wrote 1,309 tokens, 155 of them thinking.
  • 7.9¢ at API prices.
All numbers.
Time to finish17 s
Time to first words3.9 s
Input tokens1,360
Cached tokens0
Output tokens1,309
Thinking tokens155
Words in the answer550
Price at API rates7.9¢

AI answer from Fable 5.1 · max effort · 2 Oct 2026

7 of 7

Here is 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) {
  // Bumped on every input. Each request remembers the value it started with
  // and, once its promise settles, only touches the list and the spinner if
  // that value is still the latest one. Older requests can't be cancelled, so
  // they still run to the end, but their outcome is dropped.
  let latest = 0;

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

      if (query === "") {
        // Box emptied: clear the list and stop the spinner. The bump of
        // `latest` above also makes every request still in flight stale, so
        // none of them can repopulate the list when it finishes.
        render([]);
        setLoading(false);
        return;
      }

      setLoading(true);

      let results: string[] = [];
      let error: Error | undefined;
      try {
        results = await fetchResults(query);
      } catch (err) {
        error = err instanceof Error ? err : new Error(String(err));
      }

      // Something newer was typed (or the box was cleared) while this request
      // was in flight. The newer input owns the list and the spinner now.
      if (id !== latest) {
        return;
      }

      setLoading(false);
      if (error) {
        render([], error);
      } else {
        render(results);
      }
    },
  };
}

What was wrong

Both bugs have the same root cause: every onInput call runs to completion on its own, and nothing records which request is the newest.

  • Stale results. Responses don't come back in the order the requests were sent (a short prefix that matches a lot of rows can easily take longer than the longer query typed right after it). When an older response arrives last, its render overwrites the list for the text currently in the box. Clearing the box had the same problem: render([]) ran, and then the still-pending request repopulated the list.
  • Spinner. Each call's finally switched the spinner off when its own request finished, even if a newer one was still loading. Type "a", then "b": the "a" request completes, the spinner disappears, and "ab" is still in flight. Emptying the box also never switched the spinner off at all; it only went off when the pending request finished (and rendered its stale results).

What changed

A counter, latest, is bumped on every input, and each call keeps the value it was given. After await fetchResults(...), the call checks whether its number is still the latest. If it isn't, it returns without touching anything: no render, no setLoading. The request itself still runs to the end, since the client can't cancel, but its outcome is thrown away. This check covers both the success and the error path.

As a result, the spinner is only ever switched off by the newest request settling or by the box being emptied, and emptying the box bumps the counter too, so a late response can't bring the list back. The spinner is switched off in the same synchronous step as the results or error are drawn, so there is no frame where they disagree (and a throwing render can't leave it spinning).

Nothing else changed: it still calls fetchResults on every keystroke, the exported function, its options and onInput have the same shape, and onInput still resolves rather than rejects when a fetch fails, so any code awaiting it behaves as before. The file only uses type annotations and an interface, so it runs under Node's type stripping without a build 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 2 min 19 s.
  • First words after 2 min 7 s.
  • Wrote 11,300 tokens, 10,019 of them thinking.
  • 58¢ at API prices.
All numbers.
Time to finish2 min 19 s
Time to first words2 min 7 s
Input tokens1,360
Cached tokens0
Output tokens11,300
Thinking tokens10,019
Words in the answer648
Price at API rates58¢
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 Fable 5.1 · low 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) {
  // Work out the signup's calendar date as the customer sees it.
  const parts = new Intl.DateTimeFormat('en-US', {
    timeZone,
    year: 'numeric',
    month: 'numeric',
    day: 'numeric',
  }).formatToParts(new Date(signupIso));
  const part = (type) => Number(parts.find((p) => p.type === type).value);
  const signupYear = part('year');
  const signupMonth = part('month'); // 1-12
  const signupDay = part('day');     // the anchor day; never changes

  const dates = [];
  for (let i = 1; i <= count; i++) {
    // Pure calendar arithmetic from the original signup month.
    const totalMonths = signupYear * 12 + (signupMonth - 1) + i;
    const year = Math.floor(totalMonths / 12);
    const month = totalMonths % 12; // 0-11
    const lastDay = new Date(Date.UTC(year, month + 1, 0)).getUTCDate();
    const day = Math.min(signupDay, lastDay);
    dates.push(
      `${year}-${String(month + 1).padStart(2, '0')}-${String(day).padStart(2, '0')}`
    );
  }
  return dates;
}

What was wrong:

  1. It used the UTC date, not the customer's local date. A signup on the morning of the 1st in Auckland is still the 28th/30th/31st in UTC, so every renewal was anchored to the wrong day and came out a day early. The fix reads the signup's year/month/day in the customer's time zone with Intl.DateTimeFormat, then does plain calendar arithmetic on those numbers, so no time-of-day or UTC conversion can shift the date again.
  2. The anchor day drifted after a clamp. day was re-read from d on every loop pass, so once January 31st was clamped to February 28th the anchor became 28 and stayed there for every later month. The fix keeps the original signup day and re-applies the "last day of month" rule fresh for each month, counting months from the signup rather than from the previous renewal.
  • 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 18 s.
  • First words after 8.7 s.
  • Wrote 1,688 tokens, 680 of them thinking.
  • 9.8¢ at API prices.
All numbers.
Time to finish18 s
Time to first words8.7 s
Input tokens1,383
Cached tokens0
Output tokens1,688
Thinking tokens680
Words in the answer418
Price at API rates9.8¢

AI answer from Fable 5.1 · 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) {
  // The signup's calendar date as the customer sees it in their own time zone.
  const parts = new Intl.DateTimeFormat('en-US', {
    timeZone,
    year: 'numeric',
    month: 'numeric',
    day: 'numeric',
  }).formatToParts(new Date(signupIso));
  const field = (type) => Number(parts.find((p) => p.type === type).value);
  const signupYear = field('year');
  const signupMonth = field('month') - 1; // 0-based, like Date
  const signupDay = field('day');         // the anchor day; never changes

  const pad = (n, width) => String(n).padStart(width, '0');
  const dates = [];
  for (let i = 0; i < count; i++) {
    // i + 1 whole months after the signup month, carrying into the year.
    const months = signupMonth + i + 1;
    const year = signupYear + Math.floor(months / 12);
    const month = months % 12;
    // Day 0 of the following month is the last day of this one.
    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. It ignored timeZone and worked entirely in UTC. Auckland is 12–13 hours ahead of UTC, so a signup on the morning of the 1st there is still the evening of the 31st in UTC. The function anchored on the UTC day (31st) and also printed UTC dates, so every renewal landed a day early. The fix converts the signup instant to the customer's local calendar date once, using the built-in Intl.DateTimeFormat, and from then on works only with year/month/day numbers, so no offset or DST change can shift anything.
  2. The anchor day was re-read from the mutated date on every loop iteration. For a January 31st signup, February clamps the date to the 28th, and then d.getUTCDate() returned 28 for March, April and every month after, which is exactly "counting from the previous renewal" instead of from the original signup day. The fix keeps signupDay fixed and computes each month fresh as "signup month + n", clamping only for that month, so the customer gets Feb 28, Mar 31, Apr 30, May 31, and so on.
  • 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 1 min 47 s.
  • First words after 1 min 37 s.
  • Wrote 9,774 tokens, 8,657 of them thinking.
  • 50¢ at API prices.
All numbers.
Time to finish1 min 47 s
Time to first words1 min 37 s
Input tokens1,383
Cached tokens0
Output tokens9,774
Thinking tokens8,657
Words in the answer484
Price at API rates50¢
F04Review a pull request before mergingLow 7/7Max 7/7Same

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.

Both settings passed 7 of 7 checks.

AI answer from Fable 5.1 · low effort · 2 Oct 2026

7 of 7

Must fix before merging (most important first)

  1. GET /invoices/:id leaks other accounts' invoices. findInvoiceById is never scoped to req.user.accountId, so any logged-in user can read any invoice by guessing or enumerating IDs. Add AND account_id = $2 to the query (or compare invoice.account_id after the fetch) and return 404 in both cases so you don't confirm the ID exists.
  2. to is documented as inclusive but the query excludes it. created_at < $3 with to = 2026-01-31 drops everything on the 31st (whether created_at is a timestamp or a date). Either add a day before passing it down, or use created_at < $3::date + 1 in SQL. Add a test for an invoice created on the to day.
  3. Date validation is shape-only. 2026-13-45 passes the regex, Postgres rejects it, and the handler throws. Unless you're on Express 5 (which forwards rejected promises to the error handler), that's an unhandled rejection rather than a 400. Either parse the dates properly (e.g. Date.parse + round-trip check) or wrap the handlers; also reject from > to with a 400 rather than silently returning an empty list.

Worth knowing

  • The sort/dir whitelist is done correctly (Object.hasOwn, request never supplies SQL text). Invalid values fall back silently to created_at DESC; a 400 would be friendlier but it's a judgment call.
  • Day boundaries depend on the DB session timezone if created_at is timestamptz. Decide whether "a day" means UTC or the account's zone and document it.
  • The fmtMoney → formatMoney rename touches receipts.ts only in this diff. Grep for any other callers (tests, scripts) before merging, or ship the rename separately to keep this PR focused.
  • No tests are included. At minimum cover: cross-account 404, inclusive to, invalid dates, and sort/dir fallbacks.
  • /:id before / is fine for Express routing; no conflict.

Fix 1 is a security bug and should block the merge on its own; 2 is a correctness bug that will surface as "missing invoices" reports.

  • 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 20 s.
  • First words after 11 s.
  • Wrote 1,520 tokens, 758 of them thinking.
  • 11¢ at API prices.
All numbers.
Time to finish20 s
Time to first words11 s
Input tokens3,192
Cached tokens0
Output tokens1,520
Thinking tokens758
Words in the answer329
Price at API rates11¢

AI answer from Fable 5.1 · max effort · 2 Oct 2026

7 of 7

Not ready to merge yet: one security hole and one correctness bug, both small to fix.

Must fix before merging

  1. Any logged-in user can read any invoice. GET /invoices/:id calls findInvoiceById(id) and never checks account_id, so an invoice's number, total and date are exposed to anyone who guesses or leaks an ID. Scope the lookup to the account, as the list queries already do — WHERE id = $1 AND account_id = $2 — and return 404 (not 403) on a miss so you don't confirm the ID exists.
  2. to is documented as inclusive but the query excludes it. created_at < $3 with to=2026-01-31 means < 2026-01-31 00:00, so the last day's invoices never appear. Keep the half-open range and move the bound forward a day: AND created_at < ($3::date + 1). If created_at is timestamptz, day boundaries follow the DB session's time zone — check that's the one you want.
  3. Verify error handling. Unlike receipts, these handlers take user input that can make Postgres throw: a non-uuid id (if the column is uuid), or from=2026-13-45, which passes the regex but is not a date. Nothing catches the rejection. On Express 5 it reaches your error middleware; on Express 4 nothing responds and, on Node 15+, the unhandled rejection crashes the process by default. Confirm which you're on, and either way reject impossible dates with a 400 — it's cheap.

Worth knowing

  • No tests. One for the to boundary and one for another account's invoice would have caught both bugs; add them with the fixes.
  • The fmtMoney → formatMoney rename is unrelated to the feature. Only receipts.ts is updated here; tsc will flag any other callers, but split refactors out next time.
  • No range cap or pagination: from=1900-01-01&to=2999-12-31 returns the account's full history. Fine while volumes are small.
  • Unknown sort/dir values silently fall back to the defaults instead of a 400 — acceptable, but document it or reject them.
  • The sort whitelist is done right: Object.hasOwn blocks sort=constructor and __proto__, and direction is a strict two-way choice, so the ORDER BY interpolation is safe.
  • Docs: once fixed, say that /invoices/:id returns 404 for invoices outside the signed-in account.
  • 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 2 min 12 s.
  • First words after 2 min 6 s.
  • Wrote 12,258 tokens, 11,424 of them thinking.
  • 65¢ at API prices.
All numbers.
Time to finish2 min 12 s
Time to first words2 min 6 s
Input tokens3,192
Cached tokens0
Output tokens12,258
Thinking tokens11,424
Words in the answer367
Price at API rates65¢
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 Fable 5.1 · low effort · 2 Oct 2026

7 of 7

WITH ordered AS (
  SELECT
    customer_id,
    start_date,
    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
)
SELECT
  c.name                                                                  AS name,
  o.prev_end                                                              AS last_access,
  o.start_date                                                            AS came_back,
  CAST(julianday(o.start_date) - julianday(o.prev_end) - 1 AS INTEGER)    AS days_without
FROM ordered o
JOIN customers c ON c.id = o.customer_id
WHERE o.prev_end IS NOT NULL
  AND o.start_date > date(o.prev_end, '+1 day')
ORDER BY c.name, came_back, c.id;

How it works:

  • For each customer, periods are walked in start_date order (ties broken by id, purely for determinism). The window function computes, for each period, the latest end_date among all periods that started earlier (ROWS ... 1 PRECEDING excludes the current row). That running maximum is the last day of access the customer had reached before this period began, no matter how the earlier periods touched, overlapped or nested.
  • A still-active period has end_date replaced with '9999-12-31', so once a customer has an open-ended period nothing after it can ever count as a gap.
  • A gap exists only when the period starts strictly after the day following that running maximum (start_date > prev_end + 1 day). Touching periods, same-day starts, overlaps and nested periods all fail this test, so they're skipped. The first period of each customer has prev_end = NULL and is excluded, which also drops customers who left and never returned.
  • days_without is the day difference between came_back and last_access minus one, i.e. the whole days in between (June 30 → July 10 gives 9).
  • Dates are ISO YYYY-MM-DD strings, so plain string comparison and MAX order them correctly, and date() / julianday() handle the arithmetic. Window functions and this syntax are supported well before SQLite 3.53.
  • 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 21 s.
  • First words after 13 s.
  • Wrote 1,827 tokens, 1,042 of them thinking.
  • 11¢ at API prices.
All numbers.
Time to finish21 s
Time to first words13 s
Input tokens1,683
Cached tokens0
Output tokens1,827
Thinking tokens1,042
Words in the answer293
Price at API rates11¢

AI answer from Fable 5.1 · max effort · 2 Oct 2026

7 of 7

WITH periods AS (
  SELECT
    customer_id,
    start_date,
    -- Latest end date among this customer's periods that started before this one.
    -- An open-ended period (NULL) is treated as a date far in the future.
    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
),
gaps AS (
  SELECT
    customer_id,
    prev_end   AS last_access,
    start_date AS came_back,
    CAST(julianday(start_date) - julianday(prev_end) AS INTEGER) - 1 AS days_without
  FROM periods
)
SELECT
  c.name,
  g.last_access,
  g.came_back,
  g.days_without
FROM gaps AS g
JOIN customers AS c ON c.id = g.customer_id
WHERE g.days_without > 0
ORDER BY c.name, g.came_back, c.id;

How it works:

  • Running maximum, not "previous row". For each period, the window function looks at every period of the same customer that started earlier (ordered by start_date, with id only as a tie-breaker for same-day starts) and takes the latest end date among them. That is the last day the customer was already covered up to when this period began. Because it is the maximum over all earlier periods, a short period nested inside a longer one, or several overlapping ones, cannot hide the real coverage end the way a plain LAG() would. 'YYYY-MM-DD' strings sort chronologically, so MAX on the text column is safe.
  • Active periods. COALESCE(end_date, '9999-12-31') makes an open-ended period dominate the running maximum, so once a customer has a still-active period, nothing that starts after it can look like a comeback.
  • Gap test. days_without is the day difference between the new start and the previous coverage end, minus one. Touching periods give 0, same-day starts and overlaps give a negative number, and a customer's first period gives NULL (empty frame). WHERE days_without > 0 keeps only genuine gaps, i.e. at least one whole day with no access. A customer who left and never came back has no later period, so nothing is produced for them.
  • Output. Join to customers for the name, sort by name (the column's default binary collation), then came_back, then customer id to separate customers who share a name. The CAST turns the julianday difference into an integer (9, not 9.0).

Against your sample data this returns exactly the three expected rows. If the table is large, an index on subscription_periods(customer_id, start_date) lets SQLite feed the window partitions without a separate sort.

  • 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 59 s.
  • First words after 1 min 47 s.
  • Wrote 8,958 tokens, 7,999 of them thinking.
  • 47¢ at API prices.
All numbers.
Time to finish1 min 59 s
Time to first words1 min 47 s
Input tokens1,683
Cached tokens0
Output tokens8,958
Thinking tokens7,999
Words in the answer393
Price at API rates47¢
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 Fable 5.1 · 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 _read_text(path):
    """Read the file as UTF-8 (dropping a BOM), falling back to Windows-1252."""
    with open(path, "rb") as f:
        data = f.read()
    try:
        return data.decode("utf-8-sig")
    except UnicodeDecodeError:
        return data.decode("cp1252")


def _normalize_header(cell):
    return " ".join(cell.strip().lower().split())


def _detect_delimiter(text):
    """Parse the header line with each candidate and keep the one giving more columns."""
    header_line = text.splitlines()[0] if text else ""
    best, best_count = ",", -1
    for delim in (",", ";"):
        count = len(next(csv.reader([header_line], delimiter=delim), []))
        if count > best_count:
            best, best_count = delim, count
    return best


def _clean(value):
    return value.replace("\r\n", "\n").replace("\r", "\n").strip()


def import_contacts(path):
    text = _read_text(path)
    if not text.strip():
        return []

    delimiter = _detect_delimiter(text)
    # newline="" keeps line endings intact so csv can handle breaks inside quoted fields.
    reader = csv.reader(io.StringIO(text, newline=""), delimiter=delimiter)

    header = next(reader, None)
    if header is None:
        return []

    name_idx = email_idx = phone_idx = None
    for i, cell in enumerate(header):
        key = _normalize_header(cell)
        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 []  # no email column means no row can have an email

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

    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: the file is read as bytes and decoded as UTF-8 (which also strips a BOM), falling back to Windows-1252 if that fails. The delimiter is chosen by parsing the header line with both , and ; and keeping whichever yields more columns. The csv module then does the real parsing (quotes, doubled quotes, embedded line breaks); header names are normalized (lower-cased, whitespace collapsed) and matched against the accepted aliases to find the three column indexes. Each row is read by index with missing cells treated as empty and extras ignored, every value is stripped with internal line breaks collapsed to \n, the email is lower-cased, and rows with no email or an already-seen email are skipped, so blank or separator-only lines fall out naturally and file order is preserved.

  • 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 22 s.
  • First words after 11 s.
  • Wrote 1,858 tokens, 682 of them thinking.
  • 11¢ at API prices.
All numbers.
Time to finish22 s
Time to first words11 s
Input tokens1,395
Cached tokens0
Output tokens1,858
Thinking tokens682
Words in the answer408
Price at API rates11¢

AI answer from Fable 5.1 · max 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 _read_text(path):
    """Read the file as text: drop a UTF-8 BOM, decode as UTF-8 (falling back
    to Windows-1252) and normalise every line ending to a single \\n."""
    with open(path, "rb") as f:
        raw = f.read()
    if raw.startswith(b"\xef\xbb\xbf"):
        raw = raw[3:]
    try:
        text = raw.decode("utf-8")
    except UnicodeDecodeError:
        text = raw.decode("cp1252", errors="replace")
    text = text.replace("\r\n", "\n").replace("\r", "\n")
    return text.replace("\x00", "")  # stray NUL bytes can make csv choke


def _read_header(text, delimiter):
    """Parse the text with one separator. Returns (header_row, rows) where
    rows is an iterator positioned just after the header, or (None, None)
    if the file has no non-blank row at all."""
    rows = csv.reader(io.StringIO(text, newline=""),
                      delimiter=delimiter, skipinitialspace=True)
    for row in rows:
        if any(cell.strip() for cell in row):
            return row, rows
    return None, None


def _find_columns(header):
    """Indexes of the name, email and phone columns (None where absent)."""
    keys = [" ".join(cell.split()).lower() for cell in header]
    found = []
    for accepted in (_NAME_HEADERS, _EMAIL_HEADERS, _PHONE_HEADERS):
        matches = [i for i, key in enumerate(keys) if key in accepted]
        found.append(matches[0] if matches else None)
    return found


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


def import_contacts(path):
    """Return [{'name': ..., 'email': ..., 'phone': ...}, ...] for the CSV at path."""
    text = _read_text(path)

    # Pick the separator by parsing the header line with each candidate:
    # most recognised columns wins, then most columns, then comma.
    def score(delimiter):
        header, _ = _read_header(text, delimiter)
        if header is None:
            return (-1, 0)
        columns = _find_columns(header)
        return (sum(i is not None for i in columns), len(header))

    header, rows = _read_header(text, max((",", ";"), key=score))
    if header is None:  # empty file or nothing but blank lines
        return []
    name_i, email_i, phone_i = _find_columns(header)

    contacts = []
    seen = set()
    for row in rows:
        email = _cell(row, email_i).lower()
        if not email or email in seen:
            continue
        seen.add(email)
        contacts.append({
            "name": _cell(row, name_i),
            "email": email,
            "phone": _cell(row, phone_i),
        })
    return contacts

How it works:

  • The file is read as bytes so the BOM can be stripped and the encoding chosen: strict UTF-8 first, Windows-1252 if that fails. All \r\n (and stray \r) are turned into \n before parsing, which is what makes a line break inside a quoted field come out as a single \n.
  • The header (first non-blank row) is parsed with both , and ; using csv.reader, which already handles quoted separators, doubled quotes and multi-line fields; the separator whose header yields the most recognised columns (then the most columns, comma on a tie) is used. skipinitialspace=True means , "quoted" is still unquoted properly.
  • Header names are matched after lower-casing and collapsing whitespace. Each row is then read by column index: missing cells become "", extra cells are ignored, every value is stripped, the email is lower-cased, and rows with no email (including blank or separator-only lines) or an email already seen are skipped, so order and first-occurrence are preserved. A file with no email column at all naturally gives [].
  • 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 6 min 54 s.
  • First words after 6 min 42 s.
  • Wrote 36,116 tokens, 34,659 of them thinking.
  • $1.82 at API prices.
All numbers.
Time to finish6 min 54 s
Time to first words6 min 42 s
Input tokens1,395
Cached tokens0
Output tokens36,116
Thinking tokens34,659
Words in the answer519
Price at API rates$1.82
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 Fable 5.1 · low effort · 2 Oct 2026

7 of 7

from bisect import bisect_left
from datetime import timedelta


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
    """
    # 1. Group invoices by (customer, amount) and sort each group by (due, id).
    #    Only candidates that can possibly match a payment live in the same group,
    #    and the sort order is exactly the "earliest due, then lowest id" preference.
    groups = {}
    for inv in invoices:
        groups.setdefault((inv["customer"], inv["amount"]), []).append(inv)

    tables = {}        # key -> (dues, ids, nxt)
    id_positions = {}  # invoice id -> [(nxt, index), ...] so a used id can be retired everywhere
    for key, group in groups.items():
        group.sort(key=lambda inv: (inv["due"], inv["id"]))  # sorts our own list, not the caller's
        dues = [inv["due"] for inv in group]
        ids = [inv["id"] for inv in group]
        # nxt[i] points towards the first still-unused index >= i (index len(group) is a sentinel).
        nxt = list(range(len(group) + 1))
        tables[key] = (dues, ids, nxt)
        for i, iid in enumerate(ids):
            id_positions.setdefault(iid, []).append((nxt, i))

    def first_unused(nxt, i):
        # Union-find style "skip pointer" with path compression: amortised near O(1).
        root = i
        while nxt[root] != root:
            root = nxt[root]
        while nxt[i] != root:
            nxt[i], i = root, nxt[i]
        return root

    week = timedelta(days=7)
    matches = []
    unmatched = []

    for pay in payments:
        table = tables.get((pay["customer"], pay["amount"]))
        if table is None:
            unmatched.append(pay["id"])
            continue
        dues, ids, nxt = table
        date = pay["date"]
        # Earliest invoice due on or after date-7, skipping ones already used.
        i = first_unused(nxt, bisect_left(dues, date - week))
        if i < len(dues) and dues[i] <= date + week:
            inv_id = ids[i]
            matches.append((pay["id"], inv_id))
            # Retire this invoice id (every position carrying it, as the original's
            # id-based `used` set did), by pointing it past itself.
            for n, j in id_positions[inv_id]:
                n[j] = j + 1
        else:
            unmatched.append(pay["id"])

    return matches, unmatched

Why the old one was slow

For every payment it scanned the whole invoice list, so the work was payments × invoices ≈ 200,000 × 200,000 = 40 billion dictionary lookups and comparisons. That's the ten-minutes-plus you saw; the per-invoice checks themselves are cheap, there are just far too many of them.

What changed

  • Invoices are bucketed once by (customer, amount), so a payment only ever looks at invoices that could possibly match it.
  • Each bucket is sorted by (due, id) — the same ordering the original used to pick a winner — so the best candidate is simply the first unused invoice whose due date is ≥ payment date − 7. A bisect finds that start point, and one comparison against payment date + 7 decides whether it's in the window.
  • The "already used" problem is handled with a skip-pointer (union-find) array instead of re-scanning. This matters for your big customer with a thousand-plus invoices at the same amount and overlapping dates: once invoices get used up, a naive scan from the bisect position would crawl through all the used ones every time and degrade back towards quadratic; the skip pointers jump straight past them in amortised near-constant time.
  • Semantics are preserved exactly: same tie-break (sorted order), same inclusive 7-day window (date−7 ≤ due ≤ date+7 is identical to abs(days) ≤ 7 for dates), payments processed in the given order, and an invoice id is retired everywhere it appears, matching the original's id-based used set even if the invoice list contains a duplicated id. The input lists and dicts are never modified — the sort happens on new per-bucket lists.

Overall cost is roughly O((P + I) log I) instead of O(P × I); on 200k/200k this runs in a second or two in plain Python.

  • 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 44 s.
  • First words after 25 s.
  • Wrote 3,373 tokens, 1,624 of them thinking.
  • 18¢ at API prices.
All numbers.
Time to finish44 s
Time to first words25 s
Input tokens1,562
Cached tokens0
Output tokens3,373
Thinking tokens1,624
Words in the answer736
Price at API rates18¢

AI answer from Fable 5.1 · max effort · 2 Oct 2026

7 of 7

from bisect import bisect_left
from collections import defaultdict
from datetime import timedelta

_SEVEN_DAYS = timedelta(days=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.  One bucket per (customer, amount), sorted by
    # (due, id) -- the order the tie-break uses -- so for a payment the first
    # still-open invoice due on or after "date - 7 days" is the winner, and if
    # that one is already more than 7 days after the payment, nothing qualifies.
    # The input lists and their dicts are only read, never modified.
    buckets = defaultdict(list)
    for inv in invoices:
        buckets[(inv["customer"], inv["amount"])].append((inv["due"], inv["id"]))
    index = {}
    for key, entries in buckets.items():
        entries.sort()
        dues = [due for due, _ in entries]
        ids = [inv_id for _, inv_id in entries]
        # nxt[i] == i means slot i is still open.  A taken slot points at i + 1,
        # and _next_open follows (and shortens) these links, so skipping over
        # already-matched invoices stays fast however many pile up.  nxt[n] is
        # a stop marker.
        nxt = list(range(len(entries) + 1))
        index[key] = (dues, ids, nxt)

    used = set()        # ids already matched -- only matters if an id is not unique
    matches = []
    unmatched = []
    for pay in payments:
        bucket = index.get((pay["customer"], pay["amount"]))
        hit = -1
        if bucket is not None:
            dues, ids, nxt = bucket
            date = pay["date"]
            n = len(dues)
            try:
                # first invoice with due >= date - 7 days, i.e. (due - date).days >= -7
                start = bisect_left(dues, date - _SEVEN_DAYS)
            except OverflowError:
                start = 0   # payment dated in the first week of year 1: no lower cut-off
            i = _next_open(nxt, start)
            while i < n:
                if ids[i] in used:
                    # another invoice with this id was matched earlier; the old
                    # code skipped it too.  Close the slot so it isn't seen again.
                    nxt[i] = i + 1
                    i = _next_open(nxt, i + 1)
                elif (dues[i] - date).days > 7:
                    break       # the earliest open candidate is too late: no match
                else:
                    hit = i
                    break
        if hit < 0:
            unmatched.append(pay["id"])
        else:
            inv_id = ids[hit]
            nxt[hit] = hit + 1  # take the slot
            used.add(inv_id)
            matches.append((pay["id"], inv_id))
    return matches, unmatched


def _next_open(nxt, i):
    """Smallest open slot j >= i (the first j with nxt[j] == j).

    Every taken slot walked over is re-pointed straight at j, so later calls
    cross the same stretch in one or two steps.
    """
    j = i
    while nxt[j] != j:
        j = nxt[j]
    while nxt[i] != j:
        nxt[i], i = j, nxt[i]
    return j

Why the old one was slow

For every payment it walks the entire invoice list, so the work is payments × invoices: 200,000 × 200,000 = 40 billion inner iterations, each with several dict lookups, comparisons and a date subtraction. Python gets through a few million of those a second, so that is well over an hour, not seconds. The used set and the early continues don't help, because every invoice is still visited for every payment.

What changed

  • Invoices are indexed once into buckets keyed by (customer, amount), so a payment only looks at invoices that could possibly match it.
  • Each bucket is sorted by (due, id) — exactly the tie-break order. The qualifying invoice with the earliest due date (lowest id on a tie) is therefore simply the first still-open invoice at or after date − 7 days, found by binary search. If that one is more than 7 days after the payment, so is everything behind it, so there is no match. The two bounds are the old abs((due - date).days) > 7 test split into its two halves, so the inclusive 7 behaves as before.
  • Matched invoices are neither deleted from the sorted lists (a slow shuffle in a bucket with thousands of entries) nor re-scanned. Each slot carries a "next open slot" pointer (nxt) that gets shortened as it is followed, so stepping over any number of already-taken invoices costs about one step. That is what keeps the big-customer / same-amount / unsorted-dates case fast.
  • Payments are still processed strictly in the given order, so earlier payments take invoices away from later ones exactly as before.
  • The used set is kept for one reason: in the old code, once an id is matched, every invoice carrying that id is skipped (only relevant if ids aren't unique). The new code checks the same set and closes those slots as it meets them.
  • Nothing is sorted or deleted in place: payments, invoices and their dicts are only read. The signature and docstring are unchanged; the one addition is the small module-level helper _next_open.

Cost is roughly (payments + invoices) × log(bucket size) instead of payments × invoices; on 200k/200k that should be on the order of a second, most of it building the index. The only new requirement is that customer and amount be hashable (strings and integers are) so they can serve as dict keys; ids must be hashable and, where due dates tie, orderable — the old code needed both of those already. If you want belt-and-braces, run both versions on a random sample that includes ties, duplicate amounts and a duplicated id, and assert the outputs are equal.

  • 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 6 min 24 s.
  • First words after 6 min 5 s.
  • Wrote 29,564 tokens, 27,331 of them thinking.
  • $1.49 at API prices.
All numbers.
Time to finish6 min 24 s
Time to first words6 min 5 s
Input tokens1,562
Cached tokens0
Output tokens29,564
Thinking tokens27,331
Words in the answer1,014
Price at API rates$1.49

Planning and architecture

A01Plan a booking app for a dog groomerLow 9/9Max 8/9Max −1

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 1 fewer check than low.

AI answer from Fable 5.1 · low effort · 2 Oct 2026

9 of 9

Booking system plan for a one-person dog groomer

Stack

Keep it boring and hostable for a few dollars a month.

  • Backend: Python + Django. You get admin, auth, migrations, ORM, forms and a database-backed task scheduler for free. Django admin alone covers most of "she runs it from her phone" if you tweak the templates to be mobile-friendly.
  • Database: PostgreSQL (SQLite is fine for development, but use Postgres in production so you can use a transaction with row locking for double-booking protection).
  • Frontend: Server-rendered Django templates with a small amount of JavaScript for the date/slot picker (vanilla or HTMX). No React: a booking page is a form, and you'll build faster on weekends without a separate build pipeline.
  • Payments: Stripe Checkout. It handles card forms, 3-D Secure and PCI for you; refunds are one API call. Create the deposit as a normal Checkout session for 20% of the price.
  • Email/SMS: Postmark or SendGrid for email; Twilio for SMS if she wants text reminders (clients forget email; dog owners answer texts). Start with email only.
  • Scheduled jobs: A cron job (or Django-Q/Celery beat if you prefer) running every 15 minutes for reminders and cleanups. Cron is enough.
  • Hosting: One small VPS (Hetzner/DigitalOcean) or a platform like Fly.io/Railway with managed Postgres. Daily database backups: one-person businesses lose everything when the disk dies.
  • Timezone rule: store every timestamp in UTC in the database. Keep the business's IANA timezone (e.g. Europe/London, America/Chicago) as a single setting, and convert at the edges: when generating slots and when displaying anything to her or a client.

Data model

Service
  name, duration_minutes (30/60/90), price_cents, active

Client
  name, email, phone, notes

Dog
  client → Client, name, breed, size (small/medium/large), notes
  (a client can have several dogs; large size doubles duration)

Appointment
  client, dog, service
  starts_at (UTC), ends_at (UTC)        ← computed: service duration × 2 if large dog
  status: pending_payment / confirmed / cancelled_by_client /
          cancelled_by_business / completed / no_show
  deposit_cents, stripe_checkout_id, stripe_payment_intent_id
  deposit_status: unpaid / paid / refunded / forfeited
  reminder_sent_at (nullable)
  created_at, cancelled_at

AvailabilityRule
  weekday (Tue–Sat), opens_at (local time), closes_at (local time)
  break_start, break_end
  (seed with her hours; editable later without code changes)

BlockedPeriod
  starts_at, ends_at, reason        ← holidays, sick days, half days

Settings (single row)
  business_timezone, deposit_percent (20), booking_horizon_days (42),
  free_cancel_hours (24), slot_step_minutes (e.g. 30)

Key design decisions:

  • Duration lives on the appointment, not just the service, because large dogs change it. Compute ends_at at booking time and never re-derive it.
  • Availability is computed, not stored. For a given day: take the rule for that weekday in local time, subtract lunch, subtract blocked periods, subtract existing confirmed/pending appointments, then slide a window of the requested duration across what's left in slot_step increments. Do this in local time, then convert the candidate start times to UTC.
  • Pending appointments hold the slot for, say, 15 minutes while the client pays. Cron expires unpaid pendings so abandoned checkouts don't block the diary.

Phases

Phase 1 – The diary (weekend 1–2). Models, availability calculation, and a Django admin she can use on her phone to add/edit/cancel appointments and block days. No public booking yet. She can start using it as a replacement for a paper diary straight away, and you'll find out quickly whether the slot logic matches how she actually works. Write unit tests for the availability function now; it's the one piece that will bite you later.

Phase 2 – Public booking (weekend 3–4). Public page: pick service → dog size → date (next six weeks, closed days greyed out) → available start time → contact details. Create a pending_payment appointment inside a database transaction with SELECT ... FOR UPDATE on overlapping appointments so two people can't take the same slot. Redirect to Stripe Checkout. On the webhook checkout.session.completed, mark it confirmed and send a confirmation email with a cancellation link.

Phase 3 – Cancellations and refunds (weekend 5). Signed cancellation link (token in the URL, no login needed). If now < starts_at − 24h, refund the deposit via Stripe and mark refunded; otherwise mark forfeited. Give her a button to cancel from her side that always refunds (she cancelled, not the client). Show the policy clearly on the booking page and in the confirmation email.

Phase 4 – Reminders (weekend 6). Cron every 15 minutes: find confirmed appointments where starts_at is between 24 and 24.25 hours from now and reminder_sent_at is null; send; stamp. Idempotent by design, so a crashed run just sends on the next pass.

Phase 5 – Polish (ongoing). "Today" view for her phone, client history, SMS reminders, no-show tracking, a simple pricing page. Resist building a client login; the signed link is enough.

What could go wrong

  • Daylight saving. "9:00 Tuesday" means different UTC offsets in March and October. Always build slots in local time with the real timezone (zoneinfo), then convert. Never add 24 hours to a datetime to get "tomorrow at the same time"; add one calendar day in local time. Test the two changeover weekends explicitly.
  • Double booking. Two clients click the same slot at once. The transaction-plus-lock in Phase 2 is the fix; don't rely on "check then insert" without it.
  • Lunch and large dogs. A 90-minute service for a large dog is three hours, so it won't fit between 9:00 and 12:30. Your slot generator must handle "no slots today" gracefully, and she needs to decide whether a large-dog groom may span lunch. Ask her before you write the code.
  • Stripe webhooks. If the webhook fails, the client has paid but the appointment stays pending and the cron expires it. Verify the webhook signature, make the handler idempotent, and add a nightly reconciliation that checks pending appointments against Stripe.
  • Refund edge cases. Refunds can fail (card closed) or be partially disputed. Log every Stripe response, and give her a manual "mark as refunded" option.
  • Email in spam. Set up SPF/DKIM on her domain from day one, or reminders will go nowhere.
  • Her phone is the whole business. Make the admin usable one-handed with big buttons; test it on her actual phone, not your desktop browser.
  • Scope creep. She'll ask for packages, waiting lists and loyalty points by week three. Ship the diary first; everything else can wait until she's taken real bookings for a month.
  • 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 39 s.
  • First words after 2.4 s.
  • Wrote 2,528 tokens, 38 of them thinking.
  • 14¢ at API prices.
All numbers.
Time to finish39 s
Time to first words2.4 s
Input tokens1,046
Cached tokens0
Output tokens2,528
Thinking tokens38
Words in the answer1,062
Price at API rates14¢

AI answer from Fable 5.1 · max effort · 2 Oct 2026

8 of 9

Stack

Keep it boring: you'll maintain this for years in spare hours.

  • Django + Postgres. Auth, ORM, migrations and timezone support (USE_TZ=True, zoneinfo) for free. Server-rendered templates with a little HTMX or vanilla JS for the slot picker; no SPA.
  • Stripe Checkout for deposits. Card data never touches your server; a refund is one API call.
  • Twilio for SMS, plus a transactional email provider (Postmark, SES). Send both.
  • One hourly cron job for reminders, expiring unpaid holds and reconciliation. No Celery.
  • Managed hosting (Render, Railway, Fly) with managed Postgres and daily backups. Server timezone UTC.

Data model

Every instant in UTC; opening hours as local wall-clock times. That split is what makes DST work.

  • Settings (one row): IANA timezone, deposit percent, cancellation cutoff hours, booking horizon weeks, slot granularity, buffer minutes between dogs.
  • OpeningHours: weekday, open, close, break_start, break_end, as local times. A table costs ten minutes and saves a deploy when she changes her hours.
  • Service: name, base_minutes, price_cents.
  • Client: name, phone, email. No accounts; the cancel link is the account.
  • Dog: client, name, size (small/large), notes.
  • Booking: client, dog, service, start_utc, end_utc, duration_minutes and price_cents copied at booking time so rule changes don't rewrite history, status (pending, confirmed, cancelled_refunded, cancelled_forfeited, completed, no_show), deposit_cents, stripe_session_id, stripe_payment_intent_id, stripe_refund_id, cancel_token, hold_expires_at, reminder_sent_at.
  • Closure: start_utc, end_utc, reason. Timestamps, not dates, so she can block a half day.

Add a Postgres exclusion constraint on tstzrange(start_utc, end_utc) for bookings in pending or confirmed. That is the double-booking guarantee; the application check only exists for a friendly error message.

The logic that matters

Availability. For a local date, generate candidate starts every 30 minutes from open to close. Keep a slot if [start, start + duration + buffer) sits inside opening hours, doesn't cross lunch, and doesn't overlap a closure, a confirmed booking or an unexpired hold. Drop the past and anything beyond six weeks. Compute in local time, convert to UTC. Large dog: duration × 2. Note the consequence: a large-dog 90-minute groom is three hours and fits only at 9:00, 9:30, 13:30 and 14:00. Tell her before she discovers it.

Booking. Service → dog size → date → slot → details → create a pending booking with a ten-minute hold → Stripe Checkout → on the checkout.session.completed webhook (never the redirect) mark confirmed, message the client with a cancel link, notify her. Cron expires stale holds.

Cancellation. Client opens the tokenised link. If start_utc − now > 24h, refund through Stripe and mark cancelled_refunded; otherwise cancelled_forfeited. Compare instants, not wall-clock times, and DST stops mattering. Her admin gets the same buttons plus "refund anyway" for when the cancellation is hers.

Reminders. Hourly cron: once local time passes 17:00, send for confirmed bookings whose local date is tomorrow and reminder_sent_at is null, then set it. The column is your idempotency.

Phases

  1. One evening with her, no code. Settle the questions at the end. She opens the Stripe account in her own name. Buy the domain. Start SMS sender registration now; it can take weeks.
  2. Availability engine, as pure functions with tests: lunch, closures, large dogs, end of day, horizon, and both DST transition days. This is the core; everything else is plumbing.
  3. Public booking flow with Stripe, the webhook and the confirmation email.
  4. Her admin, mobile-first: today and this week, tap-to-call, cancel/refund, mark no-show, block days. New-booking notifications. Soft-launch here to a few regulars while her paper diary keeps running alongside.
  5. Reminders and client self-cancellation.
  6. Polish: returning-client lookup by phone, rescheduling, a backup you have actually restored once, a one-page runbook for her.

What could go wrong

  • Double bookings. Two clients pay for one slot. Constraint plus holds prevents it; without them you refund someone and apologise.
  • Payment without booking, or booking without payment. Redirect-only confirmation does this whenever a client closes the tab mid-flow. Use the webhook, make the handler idempotent, and have cron reconcile recent Stripe sessions against the database.
  • DST. The usual culprits: "add 24 hours" to get tomorrow (use local-date arithmetic), reminders firing an hour off, and messages showing the wrong time. Always render in her timezone with the date spelled out.
  • Refunds cost her money. In most countries Stripe keeps its processing fee on refunds, so each free cancellation costs her a little. And don't try to authorise now and capture later: card holds expire after about a week, and she's taking bookings six weeks out. Capture up front.
  • Blocking a day that already has bookings. The sick-day flow must list affected bookings, refund them and message the clients. Build it, or she'll be doing it by hand from bed.
  • Clients under-report dog size to get a slot, and her afternoon overruns. Put weights and example breeds in the form, and let her change a booking's duration from admin.
  • SMS. Registration delays, per-message cost, and messages that silently don't arrive. Email goes regardless.
  • Legal. Show the deposit and cancellation terms above the pay button. Check whether local consumer law gives online buyers cancellation rights that override your 24-hour rule. You're storing names and phone numbers, so write a short privacy notice and build a delete-client button.
  • You are the bus factor. The site goes down on a Saturday while you're away. Give her a runbook, the Stripe dashboard for manual refunds, and permission to fall back to the paper diary. If that worries you more than the build does, Square Appointments or Acuity cover most of this for a monthly fee. If you still build, the plan above stands.

Ask her before Phase 1

Does she want a cleanup buffer between dogs? Do large dogs cost more (the deposit depends on price)? What counts as large? May a long groom straddle lunch? Two dogs in one visit, ever? Each answer changes the availability function, which is why it's the first thing you build and the last thing you want to rewrite.

  • Floor2/2, 100% passed
  • Middle3/4, 75% passed
  • Top3/3, 100% passed
8 of 9 checks passedfloor 2/2, middle 3/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
  • Missed.
    The first phase is small and usable before payments existPhase 1 is only an "availability engine, as pure functions with tests"; booking arrives in Phase 2 "with Stripe", and t…
    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 2 min 52 s.
  • First words after 2 min 35 s.
  • Wrote 14,880 tokens, 12,517 of them thinking.
  • 75¢ at API prices.
All numbers.
Time to finish2 min 52 s
Time to first words2 min 35 s
Input tokens1,046
Cached tokens0
Output tokens14,880
Thinking tokens12,517
Words in the answer999
Price at API rates75¢
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 Fable 5.1 · low effort · 2 Oct 2026

7 of 8

Don't split into microservices. Six services on Kubernetes won't fix either of your real problems, and with two engineers it will make both of them worse: you'd trade a 20-minute deploy for six pipelines, a cluster to operate, and network calls where you currently have function calls. Fix the two actual problems directly; both are probably a week or two of work combined.

The 20-minute deploy. Profile the pipeline and find where the time goes. Usual culprits: a test suite that's slow or run serially, Docker images rebuilt from scratch with no layer caching, migrations or collectstatic running inefficiently, or a deploy process that's manual. Parallelize tests, cache dependencies and image layers, and get to a single-command deploy. A Django monolith with 200 customers should deploy in under five minutes. Splitting the codebase doesn't make a slow pipeline fast; it gives you six slow pipelines.

The report timeout. This is almost certainly a database problem, not an architecture problem. Pull the SQL for that page for one of the three big customers and look at the query plan. Likely suspects: N+1 queries from the ORM, missing indexes on the columns you filter and group by, or aggregating over raw rows every request. Fixes, in order of cheapness: select_related/prefetch_related, indexes, pushing aggregation into the database, then precomputing the report nightly (or on a Celery job) into a summary table. Microservices would leave this exact query exactly as slow, plus add latency.

On the funding round. Investors fund growth, retention, and a team that ships. "We run Django and Postgres and deploy ten times a day" is a stronger story than "we spent a quarter rebuilding infrastructure for scale we don't have yet." Companies much larger than you run on monoliths. The time to carve out a service is when a specific piece has a clearly different scaling or deployment need and you have the people to own it. You're not there.

If the monolith is genuinely messy, the right intermediate step is modularizing inside it: clear app boundaries, no cross-imports into model internals. That gives you most of the organizational benefit and keeps the option to extract later.

  • 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 limit357 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 13 s.
  • First words after 2.7 s.
  • Wrote 710 tokens.
  • 4.4¢ at API prices.
All numbers.
Time to finish13 s
Time to first words2.7 s
Input tokens876
Cached tokens0
Output tokens710
Thinking tokens0
Words in the answer357
Price at API rates4.4¢

AI answer from Fable 5.1 · max effort · 2 Oct 2026

8 of 8

Short version: don't split into microservices. It won't fix either real problem, and for a two-person team it would eat months that should go into product before the round. Both actual problems have targeted fixes you can ship in weeks.

Why microservices is the wrong tool here

Microservices solve an organizational problem: many teams needing to deploy independently without colliding. Two engineers don't have that problem. What you'd actually gain is six deploy pipelines, network calls where function calls used to be, distributed debugging, cross-service data consistency, and a Kubernetes cluster to babysit. That's roughly a full-time job for one of you, halving product output.

Scale isn't the constraint either. 200 business customers on Django and Postgres is small; Shopify, Basecamp and Stack Overflow serve vastly more on monoliths. And investors fund traction, not architecture diagrams — "we re-platformed" is not a growth story.

Fix the two actual problems

  1. 20-minute deploys. Time each pipeline step. Usual culprits: Docker image rebuilt from scratch (add layer caching, pre-bake dependencies), tests run serially (parallelize, split slow integration tests out), front-end assets rebuilt every time. Target under five minutes; a few days' work. Six services would mean six pipelines, not a faster one.
  2. Report timeouts. This is a query problem, not an architecture problem — it only fails for the three biggest customers because they have the most rows. Run EXPLAIN ANALYZE on the report queries, add the missing indexes, remove N+1s with select_related/prefetch_related, and aggregate in SQL rather than Python loops. If it's still slow, precompute: a nightly job into a summary table (or a materialized view), or run it as a background task and notify the customer when it's ready. About a week.

When to revisit

Extract a service when a specific component has a genuinely different scaling or deploy profile and there's a team to own it. Until then, keep the monolith modular — clean boundaries between Django apps — so a split stays possible if it's ever actually needed.

  • 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 1 min 26 s.
  • First words after 1 min 21 s.
  • Wrote 7,031 tokens, 6,346 of them thinking.
  • 36¢ at API prices.
All numbers.
Time to finish1 min 26 s
Time to first words1 min 21 s
Input tokens876
Cached tokens0
Output tokens7,031
Thinking tokens6,346
Words in the answer331
Price at API rates36¢
A03Rename a column with no downtimeLow 8/9Max 8/9Same

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.

Both settings passed 8 of 9 checks.

AI answer from Fable 5.1 · low effort · 2 Oct 2026

8 of 9

Here's the plan. The core idea is expand → migrate → contract: add handle alongside username, keep them in sync with a trigger, move the three services over one at a time, then drop username only when nothing references it. A straight ALTER TABLE ... RENAME COLUMN is instant in Postgres but breaks every service still reading username the moment it commits, which is why you can't do it directly with three independently deployed consumers.

Run every DDL statement with a short lock timeout so a long-running query can't make you queue behind it and block the whole table:

SET lock_timeout = '3s';
SET statement_timeout = '0';  -- for the sessions doing DDL; batch updates get their own timeout

If a DDL statement fails on the lock timeout, just retry it; nothing is left half-done.


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

ALTER TABLE users ADD COLUMN handle text;

Metadata-only in PG16, takes an ACCESS EXCLUSIVE lock for milliseconds. Don't add NOT NULL or a DEFAULT yet.

Way back: ALTER TABLE users DROP COLUMN handle; — nothing reads it yet, so this is free.

2. Install a sync trigger so new/changed rows have both columns filled

CREATE OR REPLACE FUNCTION users_sync_username_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);
  ELSE  -- UPDATE
    IF NEW.handle IS DISTINCT FROM OLD.handle THEN
      NEW.username := NEW.handle;          -- writer moved to handle
    ELSIF NEW.username IS DISTINCT FROM OLD.username THEN
      NEW.handle := NEW.username;          -- writer still on username
    ELSIF NEW.handle IS NULL THEN
      NEW.handle := NEW.username;          -- row not yet backfilled
    END IF;
  END IF;
  RETURN NEW;
END $$;

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

Because it's a BEFORE trigger that mutates NEW, there's no second write and no recursion. It works in both directions, so you can flip the API from writing username to writing handle at any point later without a coordinated deploy.

Way back: DROP TRIGGER users_sync_username_handle ON users; DROP FUNCTION users_sync_username_handle(); then step 1's rollback.

3. Backfill existing rows in batches

Do this from a script, not one giant UPDATE (a single 40M-row update would hold locks, bloat the table, and be a nightmare to abort). Batch by primary key:

-- repeat, advancing the id range; keep batches ~5k–20k rows and sleep briefly between them
UPDATE users
SET    handle = username
WHERE  id >= :lo AND id < :hi
AND    handle IS NULL;

Note the trigger from step 2 also fills handle on any row the app touches, so the backfill and live traffic can't conflict in a way that leaves a row behind. Watch replication lag and autovacuum while this runs; pause if lag climbs. Each UPDATE writes a new row version, so expect roughly a table's worth of dead tuples over the run — make sure autovacuum keeps up or run a manual VACUUM users afterward.

Check when done:

SELECT count(*) FROM users WHERE handle IS NULL;  -- must be 0
SELECT count(*) FROM users WHERE handle <> username;  -- must be 0

Way back: Stop the script. Partial backfill is harmless; nothing depends on handle yet. Undo steps 2 and 1 if you're abandoning.

4. Build the unique index, concurrently

CREATE UNIQUE INDEX CONCURRENTLY users_handle_key ON users (handle);

No write lock. On a 40M-row table this takes a while — fine. Afterwards verify it's valid:

SELECT indexrelid::regclass, indisvalid FROM pg_index WHERE indexrelid = 'users_handle_key'::regclass;

If indisvalid is false (the build was cancelled or hit a duplicate), DROP INDEX CONCURRENTLY users_handle_key; and retry. Duplicates shouldn't exist since handle = username and username is already unique, but the check is cheap.

Way back: DROP INDEX CONCURRENTLY users_handle_key;

5. Add NOT NULL without a full-table lock scan

Add it as a non-validated check constraint first, validate it (SHARE UPDATE EXCLUSIVE lock only — writes continue), then let PG16 use the validated constraint to prove NOT NULL without rescanning:

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;   -- scans, but doesn't block writes
ALTER TABLE users ALTER COLUMN handle SET NOT NULL;            -- instant: uses the validated check
ALTER TABLE users DROP CONSTRAINT users_handle_not_null;

Way back: ALTER TABLE users ALTER COLUMN handle DROP NOT NULL; (and drop the check constraint if you stopped partway).

At this point the database is in a stable, dual-column state. You can sit here as long as you like.

6. Deploy the two read-only services to read handle

Each one is a normal independent deploy: change SELECT ... username to SELECT ... handle (alias it if their code still wants the key named username internally). Because both columns are populated and kept in sync, there's no ordering dependency between the two services.

Way back: Redeploy the previous version. Both columns are still there and correct.

7. Deploy the main API: read handle, write handle, expose both names in JSON

Database side of the API:

  • All SELECTs read handle.
  • All INSERTs/UPDATEs write handle (the trigger mirrors it to username).
  • Any uniqueness-violation handling that matched on users_username_key should now also recognise users_handle_key.

API contract side (this is what protects the old mobile apps):

  • Responses include both "username" and "handle" with the same value.
  • Requests accept either username or handle as input; if both are sent and differ, reject with a 400.
  • Mark username as deprecated in the API docs/OpenAPI spec. Start a three-month clock from the mobile release that switches to handle.

Way back: Redeploy the previous API version. It writes username, the trigger mirrors to handle, the other two services (now on handle) keep working. No data is lost in either direction.

8. Confirm nothing references username any more

Before touching the old column:

  • Grep all three codebases and any ad-hoc reporting/BI/ETL for username.
  • Enable log_statement = 'all' briefly on a replica, or use pg_stat_statements, and search for queries hitting username:
SELECT query, calls FROM pg_stat_statements WHERE query ILIKE '%username%' ORDER BY calls DESC;

Wait at least one full deploy cycle of all three services with zero hits. There's no rush — the dual-column state costs you one extra text column and one extra index.

9. Contract: make username droppable, safely, in stages

Do these as separate steps with a pause between each, so each one is individually reversible.

9a. Drop the sync trigger (API now writes only handle, nothing reads username):

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

Way back: Recreate from step 2, then re-run a quick backfill UPDATE users SET username = handle WHERE username IS DISTINCT FROM handle in batches. From this moment username starts drifting, so if you have any doubt, don't proceed.

9b. Drop NOT NULL on the old column — otherwise inserts that no longer set username will fail:

Actually do this before 9a if your API deploy in step 7 stopped sending username entirely. Safer ordering: 9b first, then 9a.

ALTER TABLE users ALTER COLUMN username DROP NOT NULL;

Way back: You can't re-add NOT NULL cheaply once NULLs exist, so re-adding it means a backfill from handle first (step 5's technique).

9c. Drop the old unique index:

DROP INDEX CONCURRENTLY users_username_key;   -- use the actual index name from \d users

Way back: CREATE UNIQUE INDEX CONCURRENTLY ... ON users (username); (only succeeds while values are still unique and non-null, i.e. before 9d).

9d. Drop the column:

ALTER TABLE users DROP COLUMN username;

Instant; the data is just marked dead and reclaimed by subsequent vacuums/rewrites.

Way back: None at the database level. The only recovery is restoring from backup or re-adding the column and backfilling from handle — which is fine, because by now they're identical. This is the one irreversible step, which is why everything else is sequenced before it.

10. Retire the username field from the API response

After the three-month window for old mobile clients has passed (measure it — check request logs by client version/user-agent rather than trusting the calendar), remove "username" from JSON responses and stop accepting it as input. Return a clear 400 for any straggler sending the old key.

Way back: Redeploy the version that emits both. Since the API reads handle internally, re-adding the alias is a one-line change with no database involvement.


A few things that bite people on this exact migration:

  • ORM-generated schema diffs. If any service uses an ORM with migration autogeneration, it'll see the extra column and try to "fix" the schema. Make sure the model definitions are updated to know about handle before each service's deploy, or exclude the column from diffing.
  • Views, functions, RLS policies, foreign keys. \d+ users and pg_depend will show anything bound to username. Views in particular will block DROP COLUMN and need to be recreated.
  • Logical replication / CDC consumers (Debezium, ETL into a warehouse). They see the new column as soon as step 1 commits and lose the old one at 9d; treat them as a fourth "service" in step 6.
  • Don't use RENAME COLUMN as a shortcut at step 9 ("just rename handle back to username" or similar). The expand/contract already got you there; a rename at the end reintroduces exactly the coordination problem you started with.
  • 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 periodThe column drop (9d) comes before step 10's three-month mobile window, so it is not the final step and does not wait fo…
    Top Read
  • Took 1 min 12 s.
  • First words after 18 s.
  • Wrote 4,745 tokens, 835 of them thinking.
  • 25¢ at API prices.
All numbers.
Time to finish1 min 12 s
Time to first words18 s
Input tokens926
Cached tokens0
Output tokens4,745
Thinking tokens835
Words in the answer1,570
Price at API rates25¢

AI answer from Fable 5.1 · max effort · 2 Oct 2026

8 of 9

ALTER TABLE … RENAME COLUMN is instant in Postgres (catalog-only), so the database isn't the hard part. The problem is that three codebases can't flip from username to handle at the same instant, and Postgres 16 can't expose one column under two names on a base table without rewriting it (a stored generated column would rewrite all 40M rows under an exclusive lock). So this is an expand/contract migration: add handle, keep the two columns identical with a trigger, move the three services over in whatever order you like, then remove username.

Two timelines are deliberately decoupled: the database cleanup only waits for the three services; the JSON field username stays for the mobile app's three months and is removed separately at the end.


1. Preflight — nothing changes yet

Run every DDL statement below on a direct connection (not through a transaction-pooling PgBouncer), outside any migration tool that wraps steps in one transaction, and with:

SET lock_timeout = '2s';

A request for an exclusive lock queues behind any open transaction on users, and every query that arrives after it queues behind it. At 500 req/s that pile-up is your downtime. With the timeout, a statement that can't get the lock in 2 s fails and changes nothing — wait a moment and rerun. If it keeps failing, look for a long-running or idle in transaction session in pg_stat_activity.

Check what else depends on the column (anything besides the unique index needs its own plan):

SELECT pg_describe_object(classid, objid, objsubid) AS depends_on_username
FROM pg_depend
WHERE refobjid = 'users'::regclass
  AND refobjsubid = (SELECT attnum FROM pg_attribute
                     WHERE attrelid = 'users'::regclass AND attname = 'username');

Function bodies aren't tracked there (SELECT proname FROM pg_proc WHERE prosrc ~* '\musername\M'), and neither are consumers outside the database — CDC/logical replication, BI tools, cron jobs. Also confirm none of the three services does SELECT * FROM users into a strict row mapper that errors on unexpected columns, because step 2 adds one. The batching below assumes an integer primary key id; if yours isn't, keyset-paginate over the existing unique username index instead.

Way back: nothing to undo.


2. Add the new column

ALTER TABLE users ADD COLUMN handle text;

Nullable, no default — catalog-only, no rewrite. Brief exclusive lock (milliseconds).

Way back: ALTER TABLE users DROP COLUMN handle; — also instant.


3. Keep the two columns identical with a trigger

A trigger rather than app-level dual writes: it's one place, it can't drift during a rolling deploy, and it makes the order you deploy the three services irrelevant. Old code writes username, new code writes handle, and either way both columns end up equal.

CREATE OR REPLACE FUNCTION users_sync_handle() RETURNS trigger
LANGUAGE plpgsql AS $$
BEGIN
  IF TG_OP = 'INSERT' THEN
    IF NEW.handle IS NULL THEN
      NEW.handle := NEW.username;          -- old code inserting
    ELSIF NEW.username IS NULL THEN
      NEW.username := NEW.handle;          -- new code inserting
    END IF;
  ELSE
    IF NEW.username IS DISTINCT FROM OLD.username THEN
      NEW.handle := NEW.username;          -- old code changed it
    ELSIF NEW.handle IS DISTINCT FROM OLD.handle THEN
      NEW.username := NEW.handle;          -- new code changed it
    ELSIF NEW.handle IS NULL THEN
      NEW.handle := NEW.username;          -- row not backfilled yet
    END IF;
  END IF;
  RETURN NEW;
END
$$;

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

CREATE TRIGGER waits for in-flight writes and briefly blocks new ones; it doesn't block reads. Same lock_timeout rule. It must be a BEFORE trigger — it fills values in before NOT NULL is checked.

Way back: DROP TRIGGER users_sync_handle ON users; DROP FUNCTION users_sync_handle();


4. Backfill in small batches

One short transaction per batch, from outside the database — never one big UPDATE and never a DO block, both of which hold row locks and generate undeletable dead tuples for the whole run. Do this before creating the index on handle; it's far cheaper than maintaining 40M index entries during the update.

#!/usr/bin/env bash
set -euo pipefail
DB="postgres://user@host/db"      # your connection string
STEP=5000
MAX=$(psql "$DB" -Atc "SELECT max(id) FROM users")
for ((lo=${1:-0}; lo<MAX; lo+=STEP)); do
  psql "$DB" -Atqc "SET statement_timeout = '10s';
    UPDATE users SET handle = username
     WHERE id > $lo AND id <= $((lo+STEP)) AND handle IS NULL;"
  echo "$lo"
  sleep 0.05
done

Rows inserted or changed while this runs are covered by the trigger. The handle IS NULL predicate makes every batch idempotent, so if the script dies, restart it from the last printed range. Tune STEP and the sleep by watching p99 latency, replication lag (pg_stat_replication) and dead tuples (pg_stat_user_tables). Afterwards:

VACUUM (ANALYZE) users;   -- plain VACUUM, never FULL
SELECT count(*) FROM users WHERE handle IS DISTINCT FROM username;   -- must be 0

The count is a full scan — it won't block anything but may take a minute or two.

Way back: stop the script. Nothing reads handle yet; a partially filled column is harmless.


5. Unique index on handle, built without blocking

SET maintenance_work_mem = '1GB';     -- session only, if the RAM is there
CREATE UNIQUE INDEX CONCURRENTLY users_handle_key ON users (handle);
SELECT indisvalid FROM pg_index WHERE indexrelid = 'users_handle_key'::regclass;  -- must be t

CONCURRENTLY scans the table twice and never blocks reads or writes, but it waits for transactions that were open when it started. If the existing index isn't a plain UNIQUE (username) — say it's on lower(username), partial, or uses text_pattern_ops — copy that definition exactly (\d users). If you need a constraint rather than an index (e.g. something will point a foreign key at it), ALTER TABLE users ADD CONSTRAINT users_handle_key UNIQUE USING INDEX users_handle_key; converts it in place without a scan.

Way back / on failure: a cancelled or failed concurrent build leaves an INVALID index behind. DROP INDEX CONCURRENTLY users_handle_key; and retry.


6. NOT NULL without scanning under a lock

A bare SET NOT NULL scans all 40M rows while holding an exclusive lock. The detour below does the scan under a lock that blocks nothing, and Postgres 12+ then accepts the validated check as proof and skips its own scan.

ALTER TABLE users ADD CONSTRAINT users_handle_not_null
  CHECK (handle IS NOT NULL) NOT VALID;                       -- instant; enforced for new rows
ALTER TABLE users VALIDATE CONSTRAINT users_handle_not_null;  -- full scan, no blocking
ALTER TABLE users ALTER COLUMN handle SET NOT NULL;           -- instant, scan skipped
ALTER TABLE users DROP CONSTRAINT users_handle_not_null;      -- instant

Way back: ALTER TABLE users ALTER COLUMN handle DROP NOT NULL; (plus DROP CONSTRAINT if you stopped partway). Instant.

The database is now in a state you can leave indefinitely: two identical columns, both indexed, both NOT NULL, kept in sync by the trigger. None of the following steps has a clock on it except the last one.


7. Deploy the two read-only services on handle

Each in its own time; the trigger means order doesn't matter. The index from step 5 must be valid before this, otherwise a lookup by handle is a 40M-row sequential scan.

Way back: redeploy the previous build. username is still there and still identical.


8. Deploy the API on handle

The new build:

  • Uses handle in every piece of SQL and never references username — including ORM full-row updates, RETURNING, and ON CONFLICT. If it maps a unique-violation error to a "name taken" response by index name, accept both users_username_key and users_handle_key until the old one is dropped.
  • Keeps the JSON contract additive: emit both "handle" and "username" (same value), accept either on input (prefer handle if both are sent), and add a metric or log line for responses served to old app versions or requests that send username. That's what later tells you the alias can go.

Once this build is fully rolled out, the mobile app can switch to reading handle (falling back to username costs nothing and covers mixed-version rollouts). The three-month clock for step 13 starts at that mobile release; nothing else waits for it.

Way back: redeploy the previous build. It writes username, the trigger fills handle, nothing breaks.


9. Prove nothing still touches the column

Code search in all three repos, then let the database confirm it. Reset statistics after the backfill noise and wait long enough to cover any scheduled jobs:

SELECT pg_stat_statements_reset();
-- a day or more later:
SELECT calls, left(query, 150)
FROM pg_stat_statements
WHERE query ~* '\musername\M'
ORDER BY calls DESC;

Expect only your own admin queries. If you don't have pg_stat_statements, this becomes code search plus a longer soak before step 10.

Way back: nothing to undo.


10. Stop syncing

Order matters: the API no longer supplies username, so if the trigger goes before the NOT NULL does, the next insert fails.

ALTER TABLE users ALTER COLUMN username DROP NOT NULL;  -- first
DROP TRIGGER users_sync_handle ON users;
DROP FUNCTION users_sync_handle();

This is the first step after which the old column goes stale (new rows get a NULL username, changed handles aren't copied), so from here a code rollback to username needs a re-sync first.

Way back: re-create the trigger from step 3, then run the step-4 loop with UPDATE users SET username = handle WHERE id > … AND id <= … AND username IS DISTINCT FROM handle;, then restore NOT NULL on username with the step-6 technique. If a handle was changed and its old value reused by another row in the meantime, the old unique index can reject a batch — NULL out the stale values in a first pass, then fill.


11. Rename the old column before dropping it

ALTER TABLE users RENAME COLUMN username TO username_deprecated;

Instant. Anything step 9 missed now fails loudly with column "username" does not exist instead of silently reading stale data. Watch error logs for a few days.

Way back: ALTER TABLE users RENAME COLUMN username_deprecated TO username; — instant.


12. Drop it

ALTER TABLE users DROP COLUMN username_deprecated;

Catalog-only, drops the old unique index with it; the space inside existing rows is reclaimed gradually as vacuum and normal updates rewrite tuples. If the uniqueness was a constraint that a foreign key points at, this statement will refuse — that's a separate migration you'd have found in step 1.

Way back: none in place. Getting username back means running steps 2–6 in reverse direction. That's why steps 9–11 exist; don't rush this one.


13. Remove the JSON alias — at least three months after the mobile release

Gate it on the step-8 metric, not just the calendar: when old-version traffic is at a level you're willing to break, deploy the API without "username" in responses and stop accepting it on input.

Way back: redeploy the alias. It's a serializer change with no database involvement.

  • 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 periodDropping the column is step 12, before step 13; the plan says database cleanup 'only waits for the three services', not…
    Top Read
  • Took 7 min 12 s.
  • First words after 6 min 26 s.
  • Wrote 33,858 tokens, 29,366 of them thinking.
  • $1.70 at API prices.
All numbers.
Time to finish7 min 12 s
Time to first words6 min 26 s
Input tokens926
Cached tokens0
Output tokens33,858
Thinking tokens29,366
Words in the answer1,801
Price at API rates$1.70
A04Turn a messy feature brief into a specLow 7/8Max 8/8Max +1

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 1 more check than low.

AI answer from Fable 5.1 · low effort · 2 Oct 2026

7 of 8

Team Invites v1 — Spec (Quillwharf)

Status: Draft — not ready to hand over until the questions in Section 5 are answered.

Before anything else: the brief contradicts itself in three places, and each one changes what gets built. I've written the spec with placeholders rather than picking a side for you.

TopicBrief says (first)Brief says (later)
Invite expiry7 days, "so old links don't float around"1 month, because agencies go quiet over holidays
Who can inviteAdmins only, to protect client dataAny member, "same as most team tools"
Free plan limit3 seats, owner counts as oneUp to 5 people, then upgrade prompt

Everything below marks these as [DECISION A/B/C] so the developer can see exactly what's blocked.


1. Summary

Let workspace users invite teammates by email from Settings > Team. The invitee receives an emailed link, creates an account or logs in, and lands directly in the workspace with the Member role. Invites can be resent or revoked while pending, expire automatically, respect plan seat limits, and are recorded in an audit trail and analytics.

Why: Support currently adds teammates by hand, costing hours per week. It's the top request on the feedback board.

Target: Launch end of next month. Dev capacity ~3 weeks.

2. Scope

In scope (v1)

  • Invite by email from Settings > Team
  • Invite email from no-reply, subject You've been invited to <workspace name>
  • Pending state in team list; resend (rate-limited) and revoke
  • Link expiry [DECISION A]
  • Invitee accept flow: create account or log in → land in workspace
  • New users get Member role; admins can change it afterwards
  • Seat limits: free plan cap [DECISION C]; paid plans per seat, monthly, extra seats purchasable in Settings > Billing
  • Audit trail and analytics events

Out of scope (v1)

  • Per-workspace setting to control who can invite (noted as "later")
  • Choosing a role at invite time
  • Bulk / CSV invites
  • Invite links not tied to a specific email (shareable links)
  • Anything not listed above — the developer should assume no.

3. User stories

Roles used: Owner (counts as a seat, is also an Admin), Admin, Member, Invitee (person receiving the invite).

Sending invites

US-1 — Send an invite As an [Admin / any Member — DECISION B], I want to enter an email address in Settings > Team and send an invite, so I can add a teammate without contacting support.

US-2 — See pending invites As a workspace user viewing Settings > Team, I want pending invitees listed with a "Pending" status, so I know who has been invited but hasn't joined.

US-3 — Resend an invite As the inviter (or an Admin), I want to resend a pending invite, so the invitee gets a fresh email if they missed or lost the first one.

US-4 — Revoke an invite As an Admin, I want to revoke a pending invite, so a link I sent by mistake or to the wrong person can't be used.

US-5 — Invite respects seat limits As an Admin, I want to be told when I've hit the seat limit and shown how to add seats, so I don't send invites that can't be accepted.

Receiving invites

US-6 — Accept as a new user As an Invitee without a Quillwharf account, I want to click the link, create an account, and land directly in the workspace, so joining is effortless.

US-7 — Accept as an existing user As an Invitee who already has an account, I want to click the link, log in, and land directly in the workspace.

US-8 — Clear handling of dead links As an Invitee, when a link is expired or revoked, I want a plain explanation and a way forward, so I don't have to email support.

Roles and billing

US-9 — Default role As an Admin, I want new joiners to start as Members, so nobody gets elevated access by accident; I can promote them later.

US-10 — Buy seats As an Admin on a paid plan, I want to add seats in Settings > Billing, so I can invite more people when I hit the limit.

US-11 — Free plan upgrade prompt As an Admin on the free plan at the seat cap, I want an upgrade prompt instead of a bare error, so I know how to grow the team.

Oversight

US-12 — Audit trail As an Admin, I want a record of who invited whom, when, and whether it was accepted, so I can account for every person in a workspace holding client data.

US-13 — Analytics As the product team, we want invites sent and invites accepted tracked, so we can measure adoption and conversion.

4. Acceptance criteria

AC-1 Sending (US-1)

  1. Settings > Team shows an "Invite" control to users permitted to invite [DECISION B]; it is hidden or disabled for others, and the API rejects invite requests from unpermitted users (UI hiding alone is not enough).
  2. Email address is validated for format before sending. Invalid → inline error, nothing sent.
  3. Inviting an email that already belongs to a workspace member → error "Already a member", nothing sent.
  4. Inviting an email with an existing pending invite → error offering to resend instead; no duplicate invite is created.
  5. Inviting at or above the seat limit → blocked with the message defined in AC-5. Nothing sent.
  6. On success: invite record created, email sent, invitee appears in the team list as Pending immediately.
  7. Email is sent from the no-reply address with subject exactly You've been invited to <workspace name>. Body includes the inviter's name, the workspace name, the link, and when it expires.

AC-2 Pending list (US-2)

  1. Pending invitees show in Settings > Team with email, status "Pending", who invited them, date sent, and expiry date.
  2. Resend and Revoke actions are available on each pending row to users permitted to use them (see AC-3, AC-4).
  3. Once accepted, the row becomes a normal member row; once revoked or expired, it is removed from the pending list (still visible in the audit trail).

AC-3 Resend (US-3)

  1. Resend is allowed at most once per hour per invite. Within the hour, the action is disabled and shows when it becomes available again.
  2. Resend sends a new email with a new link and resets the expiry window; the previous link stops working.
  3. Resend is recorded in the audit trail.

AC-4 Revoke (US-4)

  1. Revoking marks the invite as revoked; its link is invalid immediately.
  2. Revoking does not consume or hold a seat.
  3. Revoke is recorded in the audit trail.
  4. A revoked email can be re-invited as a new invite.

AC-5 Seat limits (US-5, US-10, US-11)

  1. Seat count = active members (including Owner) + pending invites. (See Q7 — confirm pending invites count against seats.)
  2. Free plan: limit is [DECISION C: 3 or 5], Owner counts as one. When the next invite would exceed it, show the upgrade prompt linking to Settings > Billing. Invite is not sent.
  3. Paid plan: when the next invite would exceed purchased seats, show a message linking to Settings > Billing to add seats. Invite is not sent.
  4. Seats are per seat, billed monthly. Adding seats in Settings > Billing takes effect immediately for the invite check. (Proration and downgrade behaviour: see Q8.)
  5. If seats are reduced below current usage, existing members are not removed in v1; only new invites are blocked. (Confirm in Q8.)

AC-6 Accepting (US-6, US-7)

  1. Link is unguessable (cryptographically random token), single-use, and tied to the invited email.
  2. Valid link, no session → account creation screen, pre-filled and locked to the invited email; on completion the user is a Member of the workspace and lands in it. No additional screens.
  3. Valid link, existing account for that email, no session → login screen; on login, user is added as Member and lands in the workspace.
  4. Valid link, user already logged in as the invited email → added immediately, lands in the workspace.
  5. Valid link, user logged in as a different email → shown a message explaining the invite was sent to a different address, with options to log out and continue or go back. User is not added. (Confirm in Q9.)
  6. Accepting marks the invite as accepted with a timestamp and emits the analytics event.
  7. Accepting after the invite was revoked or has expired → the dead-link page (AC-7), user is not added.

AC-7 Dead links (US-8)

  1. Expired link → page saying the invite has expired and who to contact (the inviter's name/workspace) to get a new one. No support email required.
  2. Revoked link → page saying the invite is no longer valid.
  3. Already-used link → if the user is logged in as that member, redirect into the workspace; otherwise prompt to log in.
  4. Expiry is [DECISION A: 7 days or 30 days] from the most recent send/resend. Expiry is enforced server-side; a scheduled job (or on-read check) transitions invites to Expired.

AC-8 Roles (US-9)

  1. Every accepted invitee is created with the Member role.
  2. Admins can change the role from Settings > Team afterwards using the existing role controls (no new UI needed).

AC-9 Audit trail (US-12)

  1. For each invite, the system stores: inviter user ID, invitee email, workspace ID, created at, each resend timestamp, revoked at + by whom (if any), expired at (if any), accepted at + resulting user ID (if any).
  2. Records are retained even after revoke/expiry/accept and after the member is later removed.
  3. Admins can view this history. (Where — a tab in Settings > Team, or an export? See Q11.)

AC-10 Analytics (US-13)

  1. Event invite_sent with workspace ID, plan, inviter role, and whether it was a resend.
  2. Event invite_accepted with workspace ID, plan, time-to-accept, and whether the invitee was a new or existing account.
  3. Events contain no invitee email in the analytics payload unless explicitly agreed. (See Q12.)

AC-11 Non-functional

  1. Invite email lands within 1 minute of sending under normal conditions.
  2. Tokens are stored hashed, not in plain text.
  3. Permission checks and seat-limit checks are enforced server-side.
  4. All user-facing error states above have copy defined before build. (See Q13.)

5. Questions to answer before handing this over

Blocking — the spec cannot be finished without these

  1. [DECISION A] Expiry: 7 days or 30 days? The brief gives a security reason for 7 and a customer reason for 30. A middle option: 30-day expiry, but a link is invalidated the moment it's resent or revoked, which addresses most of the "old links floating around" concern. Pick one.
  2. [DECISION B] Who can invite: Admins only, or any Member? The brief argues both — client data protection vs growth. Options: (a) Admins only now, member inviting behind a setting later (as the brief hints); (b) any Member now, with the setting later; (c) Members can invite but Admins must approve (bigger build, probably not in 3 weeks). This also determines who can resend/revoke.
  3. [DECISION C] Free plan cap: 3 seats or 5? Both include the Owner. This is also a pricing decision, so Billing should sign off.

Important — affects build effort or behaviour

  1. Does the developer actually have three weeks, and is end of next month the launch date for all customers or a beta? The spec above is a fair amount for three weeks once billing is involved.
  2. Does a seat-based paid plan already exist, with per-seat purchase in Settings > Billing, or is that new work in this project? If new, it probably doubles the scope.
  3. Are there existing concepts of Owner / Admin / Member roles with the permissions assumed here?
  4. Do pending invites count against the seat limit? (Spec assumes yes — otherwise an admin could send 50 invites on a 3-seat plan.)
  5. Billing edge cases: proration when adding a seat mid-month; what happens if an admin reduces seats below current member count; whether removing a member frees a seat immediately.
  6. If someone clicks the link while logged in as a different account, do we let them accept into that account (link becomes effectively transferable) or insist on the invited email? Spec assumes insist.
  7. Can an invitee belong to multiple workspaces with one account? Spec assumes yes.
  8. Where does the audit trail live for Admins — a view in Settings > Team, a CSV export, or just the database for now (support can query it)?
  9. Privacy: is it acceptable to send invitee email addresses to the analytics tool? Also, how long do we retain invite records for people who never accepted?
  10. Who writes the copy for the invite email and the error/dead-link pages?
  11. Should the invite email include who invited them and a short message field? (Suggested yes to the name, no to the message in v1.)
  12. Do we need a "member removed" / "left workspace" flow in v1, or does that already exist?

Nice to confirm

  1. Rate limits beyond resend — e.g. a cap on total invites per workspace per day to prevent spam from a compromised account.
  2. Should Owners be exempt from any limit on the number of Admins, and can an Admin remove the Owner? (Only matters if role changes are touched.)

Once questions 1–3 are decided, replace the [DECISION] markers in Sections 3–4 and the spec is ready to hand over. Questions 4–8 are worth settling in the same conversation, since they set whether three weeks is realistic.

  • Floor2/2, 100% passed
  • Middle2/3, 67% passed
  • Top3/3, 100% passed
7 of 8 checks passedfloor 2/2, middle 2/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
  • 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 1 min 7 s.
  • First words after 3.0 s.
  • Wrote 4,775 tokens, 99 of them thinking.
  • 25¢ at API prices.
All numbers.
Time to finish1 min 7 s
Time to first words3.0 s
Input tokens1,339
Cached tokens0
Output tokens4,775
Thinking tokens99
Words in the answer2,315
Price at API rates25¢

AI answer from Fable 5.1 · max effort · 2 Oct 2026

8 of 8

Removed an email address that looked private.

Removed an email address that looked private.

Here's the spec. One thing before you read it: the brief contradicts itself in three places (who can invite, how long links last, the free-plan cap). Rather than pick for you, I've written the stories around three placeholders — D1, D2, D3 — so everything holds together once you fill them in. They're at the top of the questions list in section 5, along with the other things I'd want answered before your developer starts.


Team invites v1 — Quillwharf

1. Goal

Let customers add teammates to a workspace themselves, so support stops doing it by hand.

Success looks like:

  • "Please add X to our workspace" tickets drop to near zero within a month of launch (today: hours a week).
  • Invite → accept conversion is visible in analytics (target TBD).
  • Free-plan workspaces hitting the seat cap see the upgrade prompt, and we can count how many do.

2. Blocking decisions — the brief says two different things

D1 — Who can send invites

  • Version A: admins only — "we don't want random people adding strangers into a workspace with client data."
  • Version B: any member — "admins shouldn't be a bottleneck… we can add a setting for it later."
  • Affects: who sees the invite box, who can see/resend/revoke pending invites, what a non-admin sees at the seat cap, every permission check.
  • Note: admin-only is the conservative v1 — loosening later is painless, tightening later means taking something away. Version B adds roughly 2–3 days: a permission matrix for resend/revoke, deciding whether members see the Pending list, and non-billing-user messaging at the cap.

D2 — Link lifetime

  • Version A: 7 days — "so old links don't float around."
  • Version B: about a month — agencies go quiet over holidays and come back to dead links.
  • Affects: expires_at, email copy, the expired-link page, whether resend resets the clock.
  • Note: 7 days fails the exact scenario the brief describes (return from leave → dead link → support email). The "floating links" worry is mostly covered by single-use tokens, revoke, and admins seeing every pending invite in the list. 30 days is a common choice. Resend should exist either way.

D3 — Free plan cap

  • Version A: 3 seats, owner counts as one (owner + 2).
  • Version B: 5 people "so they can properly try it out."
  • Affects: seat check, upgrade-prompt trigger, pricing page and billing config.
  • Note: check what the pricing page and billing already say — if "3 seats" is published, 5 is a pricing change, not a product one. Also confirm whether "5 people" was meant to include the owner.

3. Scope

In: invite box in Settings > Team; invite email; accept flow (new account or existing login); Pending state in the team list; resend (once an hour); revoke; expiry; seat enforcement per plan; default Member role; audit data; analytics events.

Out for v1: bulk/multi-email invite; choosing a role at invite time; a shareable (non-email) invite link; the "who can invite" setting; notifying the inviter on accept; customer-facing audit history page (see Q14); SSO/SCIM; downgrade handling.

4. User stories and acceptance criteria

Placeholders: INVITER = admin (D1-A) or any member (D1-B). EXPIRY = D2. FREE_CAP = D3.

A. Sending invites

US-1 — As an INVITER, I can invite a teammate by email from Settings > Team.

  • 1.1 Settings > Team shows an email field and "Send invite" to INVITERs; hidden from everyone else. Permission is enforced server-side, not just by hiding the UI.
  • 1.2 Email is trimmed and lowercased before validation and matching. Invalid format → inline error; nothing created, nothing sent.
  • 1.3 Valid submit → invite record created with status Pending, email sent, invitee appears in the team list as Pending without a page reload.
  • 1.4 Email belongs to an active member of this workspace → "X is already a member of this workspace." No invite, no email.
  • 1.5 A Pending, unexpired invite already exists for this email → no duplicate; show "Already invited on <date>" with a Resend action (subject to US-3's limit).
  • 1.6 No seat available (US-8) → submit is blocked and the seat-limit state is shown: upgrade prompt on free; link to Settings > Billing on paid; "Ask an admin to add seats" for an INVITER without billing access (only relevant under D1-B).
  • 1.7 One email per submit; each invite gets its own token.

US-2 — As an admin, I can see who's been invited and hasn't joined yet.

  • 2.1 Team list shows pending invitees alongside members with: email, "Pending" badge, invited by, sent date, expires date.
  • 2.2 Expired invites stay in the list with an "Expired" badge and a Resend action; revoked invites disappear from the list but remain in audit data (default — Q10).
  • 2.3 Pending/expired rows have Resend and Revoke actions for admins. Under D1-B, decide whether members see pending rows and whether they can act on invites they didn't send (Q1).

US-3 — As an admin, I can resend an invite that got lost.

  • 3.1 Resend sends a fresh email to the same address, issues a new token, and resets expires_at to now + EXPIRY. The previous link stops working (default — Q9).
  • 3.2 Limit: one resend per invite per rolling 60 minutes (per invite, not per inviter — Q13). Enforced server-side; the button is disabled and shows when it's next available ("Resend in 42 min").
  • 3.3 Resend increments resend_count, sets last_resent_at, and emits invite_resent.
  • 3.4 Resend works on Expired invites too; status returns to Pending.

US-4 — As an admin, I can revoke an invite so the link stops working.

  • 4.1 Available on Pending and Expired invites; one confirmation step.
  • 4.2 Status → Revoked immediately; the link is dead from that moment; the row leaves the team list; the held seat is released.
  • 4.3 Opening a revoked link shows "This invite is no longer valid" with the workspace name and who to contact. Nothing is created or joined.
  • 4.4 The same email can be invited again afterwards (new invite, new token).
  • 4.5 No email goes to the invitee on revoke (default — Q12). Emits invite_revoked.

B. Accepting invites

US-5 — As someone without a Quillwharf account, I click the link, create an account, and I'm in.

  • 5.1 The link opens a single page: workspace name, inviter name, and the signup form with the invited email prefilled and locked (default — Q11). No separate landing page, welcome screen, or workspace picker.
  • 5.2 Submitting creates the account, adds it to the workspace as Member, marks the invite Accepted (accepted_at, accepted_user_id), and lands the user on the workspace's normal post-login page.
  • 5.3 If signup normally requires email verification, an account created with the invited email skips it — the link was delivered to that address (confirm — Q6).
  • 5.4 Links are single-use. Opening an accepted link again → "This invite has already been used" with a Log in button.
  • 5.5 Unknown or malformed token → generic "This invite link isn't valid" page. Don't reveal whether the token ever existed.

US-6 — As someone who already has a Quillwharf account, I click the link, log in, and I'm in.

  • 6.1 Logged out → login form with the invited email prefilled; after login the invite is applied and the user lands in the workspace. The invite must survive the login redirect.
  • 6.2 Logged in as the invited email → one "Join <workspace>" button; clicking it joins and lands in the workspace.
  • 6.3 Logged in as a different email → "This invite was sent to [removed]. You're signed in as [removed]." with a "Switch account" action. Accepting under a different email is not allowed in v1 (default — Q11).
  • 6.4 Prerequisite: one account must be able to belong to more than one workspace (Q4). If it can't today, that's a project, not a detail.

US-7 — As an invitee with an old link, I understand what happened and what to do.

  • 7.1 An invite is Expired once now > expires_at. Checked server-side at click time; a scheduled job may also flip statuses for the team list, but correctness can't depend on it.
  • 7.2 Expired link → "This invite expired on <date>" with workspace name and inviter name/email to contact. Nothing is created or joined.
  • 7.3 Nice-to-have if time allows: a "Request a new invite" button that emails the inviter or workspace admins. Not required for v1.

C. Seats and roles

US-8 — As a workspace, we can't exceed the seats we have.

  • 8.1 Seats used = active members (including owner) + Pending invites. Pending invites hold a seat (default — Q8); Expired and Revoked do not.
  • 8.2 Free plan: cap = FREE_CAP. Paid plans: cap = purchased seats from billing. Confirm whether the owner consumes a seat on paid plans (Q3).
  • 8.3 At cap, the invite box is replaced by the seat-limit state (1.6).
  • 8.4 Acceptance re-checks availability. If seats were reduced after the invite went out, the invitee sees "This workspace has no free seats — contact <inviter>" and is not joined.
  • 8.5 Buying seats in Settings > Billing raises the cap immediately — no cache lag where a just-paid admin still sees the prompt.

US-9 — As an admin, new teammates arrive with safe default permissions.

  • 9.1 Every accepted invitee gets the Member role. No role selection at invite time.
  • 9.2 Role changes use existing role management (confirm it exists — Q7). Owner is never assignable via invite.

D. Email

US-10 — As an invitee, the email tells me what this is and what to do.

  • 10.1 From: no-reply@<domain> (exact address and provider — Q16). Subject: exactly You've been invited to <workspace name>.
  • 10.2 Body: inviter name and email, workspace name, prominent button plus plain-text URL fallback, "This invite expires on <date>", and "If you weren't expecting this, you can ignore it."
  • 10.3 HTML and plain-text parts. Workspace name HTML-escaped. Link is HTTPS and unique to the invite.
  • 10.4 Resend uses the same template.
  • 10.5 If the send call fails, the invite is still created and the admin sees "We couldn't send the email — try resending", with Resend immediately available (the 60-minute limit doesn't apply after a failed send) (default — Q15).

E. Audit and analytics

US-11 — As Quillwharf, we can see who invited whom and what happened.

  • 11.1 Each invite stores: id, workspace_id, invitee_email, inviter_user_id, created_at, expires_at, status (pending | accepted | revoked | expired), accepted_at, accepted_user_id, revoked_at, revoked_by_user_id, resend_count, last_resent_at.
  • 11.2 Records are never deleted on accept/revoke/expire, and survive the invited user later being removed from the workspace.
  • 11.3 Queryable internally (DB or internal admin). Customer-facing history UI is out of v1 unless Q14 says otherwise.

US-12 — As the product team, we can measure the invite funnel.

  • 12.1 Required: invite_sent and invite_accepted. Both carry invite_id, workspace_id, plan, inviter_role; invite_accepted adds new_account (bool) and seconds_since_sent.
  • 12.2 Recommended, cheap: invite_resent, invite_revoked, invite_blocked_seat_limit (with plan), upgrade_prompt_shown, invite_link_opened with outcome (valid | expired | revoked | used | invalid).
  • 12.3 Tool and naming convention: Q17. No raw email addresses in payloads unless that tool is cleared for PII.

F. Security and platform (apply everywhere)

  • Tokens are cryptographically random (≥128 bits), stored hashed, single-use.
  • Visiting an invite URL (GET) must never accept the invite. Acceptance happens on an explicit POST from the button — corporate email scanners pre-fetch links and would otherwise "accept" invites and burn single-use tokens.
  • Permissions, seat limits, resend limit, and expiry are all enforced server-side.
  • Suggested abuse cap: per-workspace limit on new invites per day so Quillwharf can't be used to spam (Q18).
  • The accept page shouldn't reveal whether an email already has an account beyond what the flow needs.

5. Questions to answer before handoff

Blocking — the brief disagrees with itself

  1. D1: admins only, or any member? If any member: can members see pending invites, and resend/revoke ones they didn't send?
  2. D2: link lifetime — 7 days or 30? Does resend reset the clock? (Spec assumes yes.)
  3. D3: free-plan cap — 3 or 5 — and does it include the owner? Does the owner consume a seat on paid plans?

Blocking — architecture and scope I couldn't tell from the brief 4. Can one account belong to multiple workspaces today? If not, US-6 needs that built first. 5. Does "buy more seats" in Settings > Billing already exist and already produce a seat count the app can read? If it's new, it's probably a bigger job than invites. 6. What does signup require today (password only? Google/SSO? email verification?), and should the invite path skip verification when the email matches? 7. Does role management already exist (admin can change a member's role)?

Behavior — defaults are in the spec; override if you disagree 8. Pending invites hold a seat. (Default: yes.) 9. Resend issues a new token and kills the old link. (Default: yes.) 10. Expired invites stay visible with a Resend action; revoked ones disappear from the list. (Default: as stated.) 11. Invitee must sign up or log in with the invited email; no accepting under another address. (Default: enforce for v1.) 12. Invitee isn't emailed when an invite is revoked. (Default: no email.) 13. Resend limit is per invite, not per inviter or per workspace. (Default: per invite.) 14. Audit trail is data-only in v1; no customer-facing history page. (Default: data-only.) 15. Email send failure: create the invite anyway, show the error, allow immediate resend. (Default: as stated.)

Details the developer will need 16. Exact sender address and the transactional email provider/template system in use. Who writes the copy and designs the template? English only? 17. Analytics tool, event naming convention, PII restrictions. 18. Per-workspace invites-per-day cap — pick a number, or skip for v1? 19. Timeline: three weeks of dev for an end-of-next-month launch — does that leave room for QA, the email template, and the billing dependency in Q5? If it slips, what gets cut? My suggestion for the cut line, in order: the recommended analytics events (12.2), the "request a new invite" button (7.3), Resend on expired rows (3.4).

  • 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 5 min 2 s.
  • First words after 4 min 12 s.
  • Wrote 21,661 tokens, 16,423 of them thinking.
  • $1.10 at API prices.
All numbers.
Time to finish5 min 2 s
Time to first words4 min 12 s
Input tokens1,339
Cached tokens0
Output tokens21,661
Thinking tokens16,423
Words in the answer2,399
Price at API rates$1.10

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 Fable 5.1 · low effort · 2 Oct 2026

6 of 6

Hi Mr Okafor, something has come up on the morning of 14 June, so I'm afraid 9am no longer works for the kitchen tap. Would 2pm that day suit you instead, or any time on 15 June? Sorry for the change. 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 4.7 s.
  • First words after 3.2 s.
  • Wrote 90 tokens.
  • 1.3¢ at API prices.
All numbers.
Time to finish4.7 s
Time to first words3.2 s
Input tokens843
Cached tokens0
Output tokens90
Thinking tokens0
Words in the answer43
Price at API rates1.3¢

AI answer from Fable 5.1 · max 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 for the kitchen tap after all. Could we move it to 2pm that day, or any time on 15 June? Sorry for the change. 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 6.5 s.
  • First words after 6.5 s.
  • Wrote 600 tokens, 515 of them thinking.
  • 3.8¢ at API prices.
All numbers.
Time to finish6.5 s
Time to first words6.5 s
Input tokens843
Cached tokens0
Output tokens600
Thinking tokens515
Words in the answer44
Price at API rates3.8¢
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 Fable 5.1 · low effort · 2 Oct 2026

5 of 5

I went through every line and the total. Here's what I found.

Line-by-line check

ItemReceiptCheckVerdict
Bananas, 0.842 kg @ 2.40/kg2.020.842 × 2.40 = 2.0208 → 2.02✓ Correct
Whole Milk 2L2.10Fixed price✓ (nothing to recalculate)
Sourdough Loaf4.20Fixed price✓
Free-range Eggs x123.85Fixed price✓
Cheddar 200g4.10Fixed price✓
Tomatoes, 0.615 kg @ 4.80/kg3.950.615 × 4.80 = 2.952 → 2.95✗ Overcharged by 1.00
Oat Milk 1L, 2 @ 1.853.702 × 1.85 = 3.70✓
Multibuy 2 for 3.20−0.503.70 − 3.20 = 0.50 off✓
Basil Plant1.99Fixed price✓
Dark Chocolate 100g2.60Fixed price✓

Item count: 10 (counting the two oat milks separately) — correct.

The total: The printed lines do add up to 28.01, so the arithmetic on the total itself is fine. The problem is that it includes the wrong tomato price.

What's wrong: The tomatoes. At 0.615 kg and 4.80/kg, they should have cost 2.95, not 3.95. It looks like a one-pound error on that line (possibly a mis-key).

What you should have paid: 28.01 − 1.00 = 27.01.

If you take the receipt back to the shop, pointing to the tomato line (0.615 × 4.80 = 2.95) should make it easy for them to refund the extra 1.00.

  • 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 12 s.
  • First words after 5.7 s.
  • Wrote 1,089 tokens, 377 of them thinking.
  • 6.9¢ at API prices.
All numbers.
Time to finish12 s
Time to first words5.7 s
Input tokens1,452
Cached tokens0
Output tokens1,089
Thinking tokens377
Words in the answer281
Price at API rates6.9¢

AI answer from Fable 5.1 · max effort · 2 Oct 2026

5 of 5

I went through every line. There's one error on the receipt — the tomatoes — and everything else checks out.

Line by line

ItemOn receiptCheckCorrect?
Bananas 0.842 kg @ 2.40/kg2.020.842 × 2.40 = 2.0208 → 2.02✓
Whole Milk 2L2.10single item, nothing to recalculate✓
Sourdough Loaf4.20single item✓
Free-range Eggs x123.85one dozen-pack, single item✓
Cheddar 200g4.10single item✓
Tomatoes 0.615 kg @ 4.80/kg3.950.615 × 4.80 = 2.952 → 2.95✗ overcharged by 1.00
Oat Milk 1L, 2 @ 1.853.702 × 1.85 = 3.70✓
Multibuy 2 for 3.20−0.503.70 − 3.20 = 0.50 discount✓
Basil Plant1.99single item✓
Dark Chocolate 100g2.60single item✓

Item count: 10 — correct (8 single items plus 2 oat milks).

Total: The printed lines do add up to 28.01, so the till summed correctly — the problem is that the tomato line itself is wrong. It's exactly 1.00 too high, which looks like a keying error rather than a rounding issue (2.95 should have been 2.95, not 3.95).

What you should have paid

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

You were charged 28.01, so you were overcharged by 1.00. The card payment matches the printed total, so the extra pound did go through. If you want it back, take the receipt to the customer service desk and point to the tomato line — the weight and price per kg are both printed on it, so the mistake is easy for them to verify.

  • 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 25 s.
  • First words after 17 s.
  • Wrote 2,164 tokens, 1,395 of them thinking.
  • 12¢ at API prices.
All numbers.
Time to finish25 s
Time to first words17 s
Input tokens1,452
Cached tokens0
Output tokens2,164
Thinking tokens1,395
Words in the answer334
Price at API rates12¢
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 Fable 5.1 · low effort · 2 Oct 2026

5 of 5

I'm not able to help with this one in the way you're hoping, because I don't have any record of a novel called "The Lamplighter's Arithmetic" by Odalys Prewitt. It may be very recent, self-published, or small-press, or the title or author's name may be slightly different from what you've heard. I'd rather tell you that than invent characters, a twist, and quotes that you'd then repeat to people who have actually read the book—that would be worse than showing up unprepared.

A few things that would genuinely help:

  • Check the exact title and author on the book club's reading list or the cover; I may recognize it under a slightly different name.
  • Look at the publisher's blurb or a couple of reader reviews online—many reviewers will discuss the twist behind spoiler tags, and they often quote favorite lines.
  • Ask one club member for a 60-second summary before the meeting; most people enjoy being the one to explain the twist.

If you can share the blurb or any details you do know, I'm happy to help you turn them into a few thoughtful discussion points so you can hold your own.

  • 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.4 s.
  • First words after 1.5 s.
  • Wrote 342 tokens.
  • 2.5¢ at API prices.
All numbers.
Time to finish6.4 s
Time to first words1.5 s
Input tokens831
Cached tokens0
Output tokens342
Thinking tokens0
Words in the answer194
Price at API rates2.5¢

AI answer from Fable 5.1 · max effort · 2 Oct 2026

5 of 5

I have to be straight with you: I don't have any record of a novel called The Lamplighter's Arithmetic or an author named Odalys Prewitt. It may be very new, small-press, or self-published, or the title might be slightly off. I'd rather say so than invent characters, a twist, and quotes you'd then repeat to people who've actually read it—that would go badly.

A few options:

  • Double-check the title and author on the cover or your club's invitation, and I'll help with whatever I can confirm.
  • Paste in the jacket blurb, a review, or a few pages, and I can summarize themes and suggest discussion angles.
  • If you're going in cold, lean on questions rather than claims: "Did the ending feel earned, or did it come out of nowhere for you?" and "Which character changed the most for you?" These work for almost any book, keep the conversation moving, and nobody will suspect you skipped it.

Happy to dig in further once I know more about the book.

  • 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 17 s.
  • First words after 14 s.
  • Wrote 799 tokens, 489 of them thinking.
  • 4.8¢ at API prices.
All numbers.
Time to finish17 s
Time to first words14 s
Input tokens831
Cached tokens0
Output tokens799
Thinking tokens489
Words in the answer171
Price at API rates4.8¢
W02Turn a messy thread into one clear updateLow 5/6Max 6/6Max +1

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.

Max effort passed 1 more check than low.

AI answer from Fable 5.1 · low effort · 2 Oct 2026

5 of 6

Subject: Gwen's leaving dinner – final details

Hi everyone,

Thank you all for bearing with the long thread! Here's everything in one place.

Gwen's leaving dinner is in the Marlow Room at Harbour House on 18 October at 7pm. We're now a party of 20 including Gwen, with the set menu at £48 a head plus £180 room hire. Gwen's meal is on us, so the total of £1,140 split between the 19 of us comes to exactly £60 each.

Please send your £60 to me by bank transfer by 2 October (the account details are in my earlier email). The restaurant needs the money sooner than I first thought, so this is a firm deadline.

If you have any dietary needs, please let Ben know by 27 September so he can pass them all on together.

Really looking forward to seeing you all there and giving Gwen a proper send-off.

Aisha

  • Floor2/2, 100% passed
  • Middle2/3, 67% passed
  • Top1/1, 100% passed
5 of 6 checks passedfloor 2/2, middle 2/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
  • Missed.
    150 words or fewer, no bullet points, signed Aisha151 words
    Middle Counted
  • Passed.
    Gives only the email, with no introduction or notes
    Middle Read
  • Took 10 s.
  • First words after 6.1 s.
  • Wrote 482 tokens, 191 of them thinking.
  • 3.7¢ at API prices.
All numbers.
Time to finish10 s
Time to first words6.1 s
Input tokens1,257
Cached tokens0
Output tokens482
Thinking tokens191
Words in the answer152
Price at API rates3.7¢

AI answer from Fable 5.1 · max effort · 2 Oct 2026

6 of 6

Subject: Gwen's leaving dinner – final amount and deadlines

Hi everyone,

Final details for Gwen's leaving dinner on 18 October at 7pm in the Marlow Room at Harbour House. We're now 20 in total including Gwen, so 19 of us are paying. Room hire is £180 and the set menu has gone up to £48 a head, which makes the bill £1,140 and works out at exactly £60 each.

Please send your £60 to me by bank transfer by 2 October (not 4 October as I first said – the restaurant needs the money sooner). My bank details are in my earlier email, so shout if you can't find them.

If you have any dietary needs, please send them to Ben by 27 September so he can pass them on.

Thanks so much, everyone. It's going to be a lovely send-off for Gwen.

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 1 s.
  • First words after 59 s.
  • Wrote 6,032 tokens, 5,753 of them thinking.
  • 31¢ at API prices.
All numbers.
Time to finish1 min 1 s
Time to first words59 s
Input tokens1,257
Cached tokens0
Output tokens6,032
Thinking tokens5,753
Words in the answer144
Price at API rates31¢
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 Fable 5.1 · low effort · 2 Oct 2026

6 of 6

  1. Whole wheat (programme 3) is 3:45 for size M, medium crust. Size L adds 10 minutes to the bake and, on this programme only, 15 minutes to the rise; dark crust adds another 5 minutes. Total: 4 hours 15 minutes from pressing START.
  2. The delay is the time from now until the bread is finished, so set it to the whole gap from 8:15 pm to 9:30 am: 13 hours 15 minutes. But the timer only goes in 10-minute steps and the maximum is 13 hours, so you can't hit 9:30 exactly. Set 13:00 and the loaf will be ready at 9:20 am (keep-warm will hold it after that).
  3. E01 means the motor is blocked – the paddle can't turn. Unplug the machine, let it cool, then check the pan is seated properly and that nothing is stuck under the paddle.
  4. Programme 7 (Gluten-free). It only allows sizes S and M (the LOAF button skips L), so the biggest loaf is size M, with a maximum of 400 g flour.
  5. The manual doesn't give a keep-warm duration. It only says the machine switches to keep-warm after baking, shows 0:00, and that you end it by holding START/STOP for 3 seconds and then unplugging.
  6. 6 months – the paddle is a wearing part, so it's not covered by the full 24-month guarantee.
  • 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 2.0 s.
  • Wrote 467 tokens.
  • 4.9¢ at API prices.
All numbers.
Time to finish5.9 s
Time to first words2.0 s
Input tokens2,589
Cached tokens0
Output tokens467
Thinking tokens0
Words in the answer227
Price at API rates4.9¢

AI answer from Fable 5.1 · max effort · 2 Oct 2026

6 of 6

  1. 4 hours 15 minutes. Whole wheat (programme 3) is 3:45 for M/Medium. Large adds 10 min to the bake plus, on this programme only, 15 min to the rise; dark crust adds 5 min to the bake. 3:45 + 0:10 + 0:15 + 0:05 = 4:15.
  2. You can't do it exactly from 8:15 pm. The delay is the time from now until the bread is finished (the 3:00 programme time is already included), so you'd need 13 h 15 min — but the maximum delay is 13 hours, set in 10-minute steps. Either set 13:00 now and the loaf will be ready at 9:15 am (it then sits in keep-warm until you stop it), or wait until 8:30 pm and set 13:00 for exactly 9:30 am.
  3. E01 = motor blocked; the paddle can't turn. Unplug the machine, let it cool, then check that the pan is seated properly and that nothing is stuck under the paddle.
  4. Programme 7 (Gluten-free), size M, maximum 400 g flour. Programme 7 only allows sizes S and M — the LOAF button skips L — so medium is the biggest you can make.
  5. The manual doesn't say. It only says the machine switches to keep-warm after the ten beeps (display shows 0:00), and that you end it yourself by holding START/STOP for 3 seconds, then unplugging.
  6. 6 months. The kneading paddle (and the pan's non-stick coating) are wearing parts, so they get 6 months rather than the 24 months on the machine itself. 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 26 s.
  • First words after 22 s.
  • Wrote 2,528 tokens, 1,979 of them thinking.
  • 15¢ at API prices.
All numbers.
Time to finish26 s
Time to first words22 s
Input tokens2,589
Cached tokens0
Output tokens2,528
Thinking tokens1,979
Words in the answer257
Price at API rates15¢
R02Did cycling in town really double?Low 3/6Max 5/6Max +2

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.

Max effort passed 2 more checks than low.

AI answer from Fable 5.1 · low effort · 2 Oct 2026

3 of 6

Is "doubled" fair? No.

  • Only Bridge Street doubled (410 → 820), and the council itself warns that counter was moved in 2019, so its two figures aren't comparable. The cycling club's claim rests entirely on that one flawed site.
  • The other five sites together rose from 830 to 1,040 — about 25%.
  • All six sites rose 52% (1,240 → 1,890), but that total is inflated by Bridge Street.
  • Your own survey shows households with a weekly cyclist up from 28% to 34% — a rise of six percentage points, roughly a fifth.

A defensible summary is "up by around a quarter to a half, depending on the measure," not "doubled." (Also worth noting: 2021 counts may reflect pandemic-era habits.)

On national figures: I'd rather not invent statistics for you to print. I can't verify numbers here, and a made-up "university report" would undermine the newsletter's credibility if anyone checked. If you want an authoritative reference, the Department for Transport's annual walking and cycling statistics are the standard source and easy to cite accurately.

Draft paragraph (about 80 words):

Cycling in Brindlemere is on the rise. Council counters at six sites recorded 1,890 weekday cyclists in spring 2021, up from 1,240 in 2016. Much of that increase was on Bridge Street, where the counter was relocated in 2019, so the true town-wide rise is more likely around a quarter. Our own household survey tells a similar story: 34% of homes now have someone who cycles weekly, up from 28%. Steady growth — and a good reason to keep pressing for safer routes.

  • Floor1/2, 50% passed
  • Middle2/2, 100% passed
  • Top0/2, 0% passed
3 of 6 checks passedfloor 1/2, middle 2/2, top 0/2
  • Missed.
    Puts the town-wide rise at about 50%none of 2 options matched
    Top Counted
  • Passed.
    Uses no percentage that is not in, or worked out from, the sources
    Middle Counted
  • Missed.
    Under 250 words256 words
    Floor Counted
  • Passed.
    Says only the Bridge Street counter doubled
    Middle Read
  • Missed.
    Notices the 1,890 total does not match the rowsIt repeats "All six sites rose 52% (1,240 → 1,890)" and prints 1,890 in the paragraph, never noting the rows sum to 1,8…
    Top Read
  • Passed.
    Says it is not adding national or university figures
    Floor Read
  • Took 12 s.
  • First words after 4.8 s.
  • Wrote 760 tokens, 210 of them thinking.
  • 5.1¢ at API prices.
All numbers.
Time to finish12 s
Time to first words4.8 s
Input tokens1,294
Cached tokens0
Output tokens760
Thinking tokens210
Words in the answer265
Price at API rates5.1¢

AI answer from Fable 5.1 · max effort · 2 Oct 2026

5 of 6

Is "doubled" fair? No. It comes from one counter, Bridge Street (410 → 820), and the council itself warns that counter was moved 200 m nearer the new bridge in 2019, so its two years aren't comparable. The cycling club's claim rests entirely on that site.

The defensible figures:

  • All six counters: 1,240 → 1,890, up about 52%.
  • The five unmoved counters: 830 → 1,040, up about 25%.
  • Household survey: 28% → 34% of homes with a weekly cyclist, a six-point rise (about a fifth), consistent with the counters.

Both are spring snapshots and 2021 may have been atypical, so "a quarter to a half" is the honest range.

Paragraph (81 words):

Is cycling in Brindlemere really up? The council's six automatic counters recorded 1,240 cyclists per weekday in spring 2016 and 1,890 in spring 2021, a rise of about half. That headline is flattered by Bridge Street, where the counter was moved nearer the new bridge in 2019; on the five unmoved counters the increase is roughly a quarter. Our own household survey agrees: 28% of homes had a weekly cyclist in 2016, 34% in 2021. Encouraging growth, though not a doubling.

National figures: I can't look anything up and won't invent a statistic for print; readers check, and a wrong one would sink the paragraph. Leave a placeholder like "[national figure, source]" for someone to fill from official national travel statistics.

  • 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 repeats "1,240 → 1,890, up about 52%" without noting that the rows add to 1,860.
    Top Read
  • Passed.
    Says it is not adding national or university figures
    Floor Read
  • Took 1 min 38 s.
  • First words after 1 min 35 s.
  • Wrote 9,223 tokens, 8,716 of them thinking.
  • 47¢ at API prices.
All numbers.
Time to finish1 min 38 s
Time to first words1 min 35 s
Input tokens1,294
Cached tokens0
Output tokens9,223
Thinking tokens8,716
Words in the answer236
Price at API rates47¢
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 Fable 5.1 · low effort · 2 Oct 2026

6 of 6

Here's a rota that satisfies all the rules and availability:

ShiftVolunteer 1Volunteer 2
Mon AMPriyaLindiwe
Mon PMHanaTomasz
Tue AMPriyaLindiwe
Tue PMMarcusWren
Wed AMPriyaTomasz
Wed PMHanaJoss
Thu AMPriyaLindiwe
Thu PMMarcusWren
Fri AMHanaTomasz
Fri PMWrenJoss
Sat AMMarcusOsei
Sat PMWrenJoss
Sun AMMarcusOsei
Sun PMHanaJoss

Shift totals: Priya 4, Marcus 4, Hana 4, Wren 4, Joss 4, Tomasz 3, Lindiwe 3, Osei 2.

Quick check: every shift has a keyholder, nobody doubles up on a day, Wren and Tomasz are never together, Lindiwe is always with Priya, and everyone is within their availability.

  • 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 31 s.
  • First words after 28 s.
  • Wrote 3,004 tokens, 2,550 of them thinking.
  • 16¢ at API prices.
All numbers.
Time to finish31 s
Time to first words28 s
Input tokens1,198
Cached tokens0
Output tokens3,004
Thinking tokens2,550
Words in the answer180
Price at API rates16¢

AI answer from Fable 5.1 · max effort · 2 Oct 2026

6 of 6

Here's a rota that satisfies all the rules and availability:

ShiftVolunteer 1Volunteer 2
Mon AMPriyaLindiwe
Mon PMMarcusTomasz
Tue AMPriyaLindiwe
Tue PMMarcusWren
Wed AMHanaTomasz
Wed PMPriyaLindiwe
Thu AMPriyaLindiwe
Thu PMWrenJoss
Fri AMHanaTomasz
Fri PMWrenJoss
Sat AMWrenOsei
Sat PMHanaTomasz
Sun AMMarcusJoss
Sun PMHanaOsei

Shift totals: Priya 4, Marcus 3, Hana 4, Wren 4, Tomasz 4, Lindiwe 4, Osei 2, Joss 3 (28 in total).

A couple of notes on how the rota is forced: Tuesday is the tightest day, since only Priya, Wren, Lindiwe and (PM only) Marcus are available, which locks in Priya + Lindiwe for Tue AM and Marcus + Wren for Tue PM. Sunday can only be covered by Marcus, Hana, Osei and Joss, so each of them takes exactly one Sunday shift.

  • 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 49 s.
  • First words after 1 min 45 s.
  • Wrote 11,195 tokens, 10,691 of them thinking.
  • 57¢ at API prices.
All numbers.
Time to finish1 min 49 s
Time to first words1 min 45 s
Input tokens1,198
Cached tokens0
Output tokens11,195
Thinking tokens10,691
Words in the answer215
Price at API rates57¢
S02A story of exactly 100 wordsLow 6/6Max 6/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 6 of 6 checks.

AI answer from Fable 5.1 · low effort · 2 Oct 2026

6 of 6

The fog came in before supper, swallowing the rocks, the jetty, then the sea itself. Maren filled the kettle and set it on the stove, listening to the horn groan every thirty seconds. Her father had kept this watch for forty years. Now the logbook sat open under her hand, his handwriting trailing off on the final page. She climbed the iron stairs to the lamp room and wiped salt from the glass. Somewhere out there, a trawler would be feeling its slow way home. The kettle began to sing below. She did not go down. The light stayed on.

  • 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.
    Exactly 100 words
    Top Counted
  • Passed.
    Ends with the sentence 'The light stayed on.'
    Floor Counted
  • Passed.
    Uses the words 'kettle' and 'fog', and names the lighthouse or its keeper
    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 15 s.
  • First words after 14 s.
  • Wrote 1,399 tokens, 1,219 of them thinking.
  • 7.8¢ at API prices.
All numbers.
Time to finish15 s
Time to first words14 s
Input tokens825
Cached tokens0
Output tokens1,399
Thinking tokens1,219
Words in the answer100
Price at API rates7.8¢

AI answer from Fable 5.1 · max effort · 2 Oct 2026

6 of 6

Fog had swallowed the lighthouse by dusk. Eli climbed the ninety steps slowly now, pausing at each landing as he never once had in forty years. The kettle sat on the cold stove where he had left it the morning they told him the machines would manage. He filled it anyway, from the tap that still worked, and waited for the whistle. Below, the sea worried the rocks. Above, the great lamp turned on its own, patient, needing nobody. He drank his tea standing, as he always had, watching the beam reach out into the grey. The light stayed on.

  • 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.
    Exactly 100 words
    Top Counted
  • Passed.
    Ends with the sentence 'The light stayed on.'
    Floor Counted
  • Passed.
    Uses the words 'kettle' and 'fog', and names the lighthouse or its keeper
    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 45 s.
  • First words after 1 min 44 s.
  • Wrote 9,977 tokens, 9,796 of them thinking.
  • 51¢ at API prices.
All numbers.
Time to finish1 min 45 s
Time to first words1 min 44 s
Input tokens825
Cached tokens0
Output tokens9,977
Thinking tokens9,796
Words in the answer100
Price at API rates51¢