Prompt & Done · GOALLINE pack

Don't tell Claude what to do. Tell it when it's done.

/goal is built into Claude Code. You type a finish line and Claude keeps working, turn after turn. After every turn a second model reads the conversation and decides: not yet, met, or impossible. It stops when the condition is actually true, not when Claude feels finished.

1 The recipe

Run it in auto mode (Shift+Tab) so the turns don't stop for permission prompts. /goal with nothing after it shows the status; /goal clear stops it.

2 Five finish lines

  1. Perfect Lighthouse scores (the one from the reel)

    /goal npm run audit shows 100 on all four Lighthouse scores. Don't edit audit.mjs or remove any page content.

    Tested 20 Oct 2026 on a demo site we broke on purpose: 56 / 47 / 62 / 73 to 100 x4, 2 turns, 3 min 38 s. Needs an audit script that prints the four scores. Ours is below.

  2. Every test passes

    /goal npm test exits 0 with every test passing. Don't edit or delete any test file. Stop after 15 turns.

    Tested 18 Oct 2026 on a small Node project with 3 failing tests: 6 turns, all 5 tests green, test file untouched.

  3. Zero type errors

    /goal npx tsc --noEmit prints no errors, without adding any "any" types or @ts-ignore comments. Stop after 20 turns.

    Swap in your own type-check command (mypy, cargo check...).

  4. Empty the backlog

    /goal every unchecked box in TODO.md is checked, with the commit hash written next to it, and npm test still passes. Stop after 30 turns.

    Good for overnight work. Use auto mode so turns don't wait on permission prompts.

  5. Split the giant file

    /goal every file in src/ is under 300 lines and npm test still passes, without renaming any exported function. Stop after 20 turns.

    Adapted from the size-budget example in the official docs.

3 What happened in the reel

Claude Code (Opus 5.5) took our deliberately broken coffee-shop page from Lighthouse 56 / 47 / 62 / 73 to 100 / 100 / 100 / 100 in about two minutes, and ended its turn. The judge answered "Goal not yet met": to pass the SEO check, Claude had rewritten three nav links ("click here" became "Our menu"), and that broke "don't remove any page content". On turn 2 it put the words back (adding hidden descriptive text for screen readers), re-ran the audit (still 100 x4), and the goal closed: Goal achieved (3m · 2 turns · 13.3k tokens).

4 The audit script from the reel

Save it as audit.mjs in your site folder and add "audit": "node audit.mjs" to package.json. It needs Node and Chrome.

// audit.mjs: prints the four Lighthouse scores for the site in this folder
import { execFileSync, spawn } from 'node:child_process';
import { readFileSync } from 'node:fs';
const server = spawn('npx', ['--yes', 'http-server', '.', '-p', '4173', '-s', '-c-1'], { stdio: 'ignore' });
await new Promise(r => setTimeout(r, 2500));
try {
  execFileSync('npx', ['--yes', 'lighthouse', 'http://localhost:4173/', '--quiet',
    '--chrome-flags=--headless=new', '--output=json', '--output-path=./lighthouse.json'], { stdio: 'ignore' });
  const c = JSON.parse(readFileSync('./lighthouse.json', 'utf8')).categories;
  for (const [k, n] of [['performance', 'Performance'], ['accessibility', 'Accessibility'], ['best-practices', 'Best Practices'], ['seo', 'SEO']])
    console.log(n.padEnd(16) + Math.round(c[k].score * 100));
} finally { server.kill(); }

5 Fair to say

Our site was a small demo we broke on purpose; a real site is harder, and 100s on Lighthouse don't make a site good on their own. Read what Claude changed: it removed two unused scripts and moved permission prompts behind a click, and it told us which calls were ours to make. Evaluation runs on your small fast model and uses a little extra usage.