HTML

reWritable Is Harness Engineering You Can Do in an HTML File

The first post in this series established the formula: Agent = Model + Harness. Everything in an AI agent that is not the model — the loop, the tools, the memory, the verification — is harness. The second post argued that skills are harness engineering you can do in a markdown file: a SKILL.md is a packaged harness fragment that gets injected into Claude Code or DeepAgents or Cursor at the moment of relevance, no infrastructure code required.

This post proposes the next step in the same progression. If a skill is a harness fragment in a markdown file, a reWritable is a complete harness in an HTML file. Same compression move — taking what used to be infrastructure and shipping it as content — applied to the whole harness rather than a piece of one.

What reWritable is

A reWritable is a single .html file that opens in any browser and renders a document — a tracker, a press release, a budget, a letter, a kanban board, whatever the file happens to contain. The user hits ⌘K and types an instruction in plain English. The file rewrites itself: the agent receives the document, returns a modified document, and the new version replaces the old. ⌘Z walks back through previous versions. ⌘S commits the current state by writing the file back to disk in place (Chromium with the File System Access API) or by downloading an updated copy of itself (everywhere else).

No server. No install. No account. No build step.

The mental model is: it is like a Word document, but the document can rewrite itself. The deployment model is: drag it to your desktop. The collaboration model is: send the file. The recipient has everything.

A complete harness, not a fragment

The distinction between a skill and a reWritable is the distinction between a passenger and a car.

A skill is a harness fragment. The actual harness machinery — the loop, the memory, the tool execution, the prompt construction, the model call — lives in a host application that loaded the skill. A SKILL.md without Claude Code, DeepAgents, or Cursor is just a text file. The skill provides domain knowledge; the host provides everything else.

A reWritable is a complete harness. Small, opinionated, single-tool — but complete. The HTML file ships with its own loop (⌘K → modify → render), its own memory (an IndexedDB undo stack that doubles as a dialogue log), its own persistence (commit-in-place, with download fallback), and its own model call (OpenRouter, with the API key in sessionStorage so it never travels with the file). There is no host application. The browser is the runtime; the file is the harness; both arrive together.

This is why a reWritable is distributable in a way a skill is not. You cannot email a coworker a SKILL.md and expect anything to happen. You can email them a reWritable, and they have a working, self-modifying document on their desktop the moment they double-click it.

What the harness contains

The first post enumerated what production agent harnesses typically handle. Walking the list against reWritable:

Prompt construction. The runtime assembles a system prompt that frames the model as modifying a document — not building an app, not generating code. It passes the current document content and the user's instruction. No retrieval, no scratchpad, no multi-turn negotiation. One call, one transform.

Tool execution. The agent has exactly one tool: rewrite the document. There is no shell, no file system, no web search. The constraint is the point — the agent's outputs are bounded to a single artifact, which is what makes the system tractable for non-developer users.

Memory management. IndexedDB stores the current document plus an undo stack capped at ten entries. Each ⌘K pushes the prior state onto the stack. ⌘Z pops it. Ten levels of undo is also a ten-step replay of the conversation that produced the current document. The model has no memory between calls; the harness has memory across the entire lifetime of the file.

State persistence. The bootstrap inside the .html file holds an inline snapshot — a frozen serialization of the document and any structured data it depends on. On commit, the snapshot is rewritten with the current state. The file on disk is the durable artifact; IndexedDB is the working buffer.

Verification. This is the leg reWritable does not have. There is no automated test, no LLM-as-judge, no review agent. The user looks at the rendered document and decides. For a personal document tool used by a single human, this is the right tradeoff. For higher-stakes use, verification is the obvious extension point.

Four and a half out of five. By the definition the first post laid down, reWritable is a harness.

When the harness becomes the HTML document

The most useful framing for what is actually new about reWritable is structural, not technical.

In every other harness in production today, the harness and the artifact are clearly separate things. Claude Code is a harness; your repo is the artifact. clive is a harness; your terminal session is the artifact. DeepAgents is a harness; your project is the artifact. The harness is infrastructure that sits next to or wraps the artifact. You install one; you operate on the other.

In reWritable, the harness is fused into the artifact. The bootstrap, the loader, the runtime, the inline snapshot — all of it is in the same .html file as the document the user authors. There is no separate infrastructure to install. There is no host harness to register the artifact with. The harness travels with the document. Sharing the document shares the harness. Forking the document forks the harness. Archiving the document archives the harness.

This is the same compression move skills made, completed. Skills moved harness engineering from "write Python middleware" to "write a markdown file." reWritable moves it further: from "write a markdown file that loads into Claude Code" to "write an HTML file that runs anywhere a browser does." Each step shortens the distance between the person who has an idea and the artifact that embodies it.

Why this matters beyond the architecture

Two consequences follow that an infrastructure-first framing misses.

The first is a return to the document as a unit of ownership. Word, Excel, and PowerPoint were successful in the eighties and nineties for one structural reason: a document was a file you owned, on disk, that you could send. The cloud era broke that model. Documents moved to servers; the file became a pointer to a place where the actual document lived. reWritable returns the document to the form factor that worked: bytes on disk, ownable, sharable, archivable, modifiable without anyone's permission. The agent inside is a modernization. The file format is a restoration.

The second is the read/write web that Berners-Lee originally proposed. The web was meant to be a writable medium. It became read-only for most people because the editing surfaces stayed inside developer tools and behind cloud platforms. A reWritable is a writable web document at the file level — open it, change it, save it, send it. No platform. No deploy. No account.

These are not consequences of harness architecture in general. They are consequences of putting the harness inside the artifact. A skill loaded into Claude Code does not give your aunt a writable document. A reWritable does.

The deeper pattern

The progression across the three posts is a single argument about who gets to do harness engineering and how.

Infrastructure harnesses — Claude Code, DeepAgents, clive — are built by engineers who write Python or Go and deploy services. Skills moved harness engineering into markdown: anyone who can write documentation can encode domain knowledge that the agent will reliably execute. reWritable moves it into HTML: anyone who can describe a document can produce a self-modifying one, and anyone who can attach a file to an email can distribute it.

Each step in the progression does the same two things. It compresses the harness — the part that used to be infrastructure becomes content. And it expands the population of people who can ship one — from infrastructure engineers, to people who write documentation, to anyone who has ever used a Word document.

The model is the same for everyone. The harness used to be infrastructure. Now it ships in the file.

Unlock the Future of Business with AI

Dive into our immersive workshops and equip your team with the tools and knowledge to lead in the AI era.

Scroll to top