← Experiments

Turd polishing

One project handed to a coding agent running a local model, which then kept improving it in unattended passes. Kept as it was when copied here; not maintained.

Browser OS, polished by a local model

A desktop that runs in a browser tab, with windows, a shell, a virtual filesystem and small apps (nine at first, eleven by version 17, fifteen by version 41). The pi coding agent built it and then kept improving it in unattended passes, running Qwen3.8-Flash-Next on one gaming PC through Strata. Each pass read the previous one's notes, chose what to fix next, and left notes for the one after. It has been run twice from the same starting code: version 01 is the first pass of the first run, versions 17 and 41 are from the second.

  1. Pass 1 · 45 minutes

    Version 01

    The first pass, stopped at its 45-minute limit. Windows that snap and maximise, a terminal, a file manager, an editor and Paint, with everything saved in the browser.

    Open version 01
  2. Second run · 17 passes · over 27 hours

    Version 17

    A second run, restarted from the original code with a written wishlist whose sections the passes took in turn, and the model thinking as hard as it can. Copied when the 17th pass finished.

    • Desktop icons that drag anywhere, and virtual desktops you can drag windows between
    • New apps: a clock with timers and alarms (and one drawn on the desktop), sticky notes and a synth
    • A launcher (Ctrl+Space) for apps, files, commands and sums, a live wallpaper and a screen saver
    • A shell with pipes, variables, $(…) substitution and manual pages, 52 commands in all
    Open version 17
  3. Second run · 41 passes · over 75 hours

    Version 41

    The same run as version 17, left going for another 24 passes. Copied when the 41st pass finished.

    • New apps: Photos, a gallery of every picture (screenshots included), a calendar and a task list kept as plain text files, and a system monitor
    • Alt+Tab window switching, a tiling guide shown while you drag or hold Alt, and touch and trackpad gestures on the desk
    • A file manager with grid and list views, previews, a Trash and Open with…, and a wallpaper that follows the time of day
    • A shell with if, for and while, your own functions and scripts, and sed, cut, join and column, 75 commands in all
    Open version 41

How the turd polisher works

The passes were run by turd-polish, a small skill for pi that turns a project into a loop with no end: copy it, improve the copy, leave notes, repeat. The loop is a plain Node script, not the model, so it keeps going whatever a pass decides, until someone creates a STOP file.

  1. Copy. Each pass copies the previous version into a new numbered folder (browser-os-01, browser-os-02, …) and works only there. Earlier versions are never changed, which is why any one of them can be put up here exactly as it was left.
  2. Start with no memory. Every pass is a fresh run of the agent that remembers nothing of the last one. What carries over is on disk: the code, and the notes the passes leave each other. These are a description of the project, a ranked list of improvements, and undone.md, which says what was done, what was not, and what the next pass should do.
  3. Pick the work. The pass reads those notes and the code, then chooses what to do. In the first run it picked the few improvements it judged most valuable, mostly fixes. In the second, every pass had to ship one feature a user would notice, on a theme taken in turn from the project's wishlist, VISION.md. A feature too big for one pass is handed on, and the next pass must finish it first.
  4. Look and test. It opens the desktop in a headless browser, screenshots it and critiques what it sees (the shots folder in each version), then runs the tests and adds new ones for what it changed.
  5. Hand off. It rewrites undone.md for the next pass and exits, and the loop starts the next one. A pass that gets cut off still leaves the notes it started with, so the next one picks up where it stopped.