doc.html

~ AI memory you can open, read, keep or share ~ ~ a format for long-term AI memory · simple HTML, code optional · memory extendable to all things HTML · open source ~
★ welcome to dochtml.org ★ a project made with love ♥ ★ Unlimited AI Memory! (maybe) ★ an alternative to compaction and an answer to context rot ★ opens in any browser, in any decade that uses HTML ★ sign the guestbook on your way out ★

HTML is all you need.

Near-limitless AI memory, kept in a plain local HTML file you own.
An addressable wiki that remembers it all.
The fix for context rot — across models, across apps, across years.

A doc.html is one ordinary HTML file — the plain kind people have been making since the early 90s. The same HTML happens to work for memory and instruction an AI agent or human can read, navigate, and update. Markdown is a low-bandwidth bridge that can only go so far. The file's manifest serves as a summary a model can retain in context, the way a skills.md or agents.md file would. One file can outgrow any context window, but a model or human can still retain all of the knowledge. Text, media — anything that can be shared with HTML can serve as addressable memory you can navigate, retrieve, update, and even share.

The document carries its own map. Read only what you need.

no server. no account. no javascript. open source

In the beginning was the word

Today the words are tokens, and there are only so many tokens an AI model can ingest before succumbing to context rot and hallucinations. There is a way to keep the knowledge without losing the thread. doc.html.

— what didn't survive —
prompts.app
memory.vendor.db
chunks.index
session.history
knowledge.doc.html

three bodies, one format

<nav id="manifest"> #who-i-am sha256 a3f… #decisions sha256 9b2… #open-work sha256 c71… <section id="who-i-am"> <section id="decisions"> <section id="open-work"> ← the map ← the witness ← the payload (only this gets read)

one file: the map on top, the pinned sections below

the document you can query

One file is a document with its index up front. Many files, linked, are a corpus: combine them, and a model can retrieve from the set the way it would from a database or a RAG index — with no database running and no index built. It pulls the sections a question needs and cites them by id and hash. It works; the receipts wall below holds the score.

see the map — the smallest one »

see it in the browser window »

memory.doc.html 05/12 database: sqlite e41… 05/28 deploy: heroku 77c… superseded ↓ 06/02 voice: keep it terse 1fa… 07/07 deploy: fly.io supersedes 05/28 — old bytes stay b09… ▮ + append — nothing is ever erased hand it to a model; it reads what it needs

corrections supersede; history stays addressable

the memory you keep

This is what your agents.md or CLAUDE.md wants to grow into: the decisions, conventions and gotchas of your project, kept long-term in one file any model can open. When a decision turns out wrong you append the correction; it supersedes, and the old entry stays, still saying why it made sense at the time. Next year's model opens the same file and already knows what you decided today.

start your memory file »

see it in the browser window »

you · turn 0041 model A · turn 0042 — the app closed · the model changed — the file didn't notice you · turn 0043 model B · turn 0044 ▮ the thread continues… ← every turn pinned

turn 0042 by one model, turn 0044 by another — same conversation

the chat that continuesnewest body

Context rot hits conversations first: the longer the thread runs, the less of it the model actually holds. A chat body writes the conversation down as it happens — every turn addressable, finished turns sealed with a hash — so a model can rejoin a conversation it was never in, and the thread outlives the app it happened in.

continue a conversation »

see it in the browser window »

what the trinity builds

everything below is the same three bodies, put to work. the wiki is the memory body on a shelf.

✓ answer your question starts here ↓ 3 pages read · 6 stayed folded

the model walks the links like a librarian, not a vacuum

the wiki that remembers

A wiki of doc.html pages, linked like any other website. A model checks the index, pulls the two pages the question needs, and leaves the rest on the shelf. A human can open those same pages in a browser and see an ordinary wiki page — because it is one. Our wiki also serves as documentation for the format — read more here.

walk the real wiki »

see it in the browser window »

on the shelf right now — six essays, each its own pinned page:

agents.html #steer-core — always read <nav id="manifest"> #the-rules #the-runs #the-refs … #the-rules — waits to be asked #the-runs — waits to be asked the model changes · the knowledge remains

the steer core is always read; everything else waits behind the map

the agent's inheritance

The memory body with a job. agents.html is this repository's own memory: instructions, decisions, and unfinished work in one file every agent opens on arrival. A short steer core is read every time; the rest waits behind the manifest until a task names it. We run the project on it — including the section that lists what has not been demonstrated.

read the repo's own memory »

see it in the browser window »

how it works — give the model a map, not a pile

1
orient

read the manifest — a few KB, even for a huge document.

2
select

name the two or three sections the question actually needs.

3
hydrate

load exactly those bytes — nothing else enters context.

4
verify

run the reader. it recomputes each section's SHA-256 and names any section that disagrees.

<!-- this is most of the format -->
<nav id="manifest">
  <a href="#fold" data-witness="771feff36…"
     data-char-count="75">
    <span class="title">The Fold</span>
    <span class="summary">Append-only memory;
      correction is supersession.</span>
  </a>
</nav>

<section id="fold" data-witness="771feff36…">
  <h1>The Fold</h1>
  <p>Memory is append-only; correction
    is supersession.</p>
</section>

try it in 60 seconds

no install, no account.

  1. grab the file. open memory.doc.html — a portable memory document. save it, or just hand your AI the address.
  2. hand it over, with this prompt:
    Read this document using the orientation it provides.
    Tell me what sections are available, then answer my
    question using only the relevant sections.
  3. ask a question whose answer lives in one section — then check which section it chose.
  4. check the bytes. the reader ships in the repo — clone it, and it recomputes every witness and prints how many verified:
    git clone https://github.com/NDOTO-G/doc.html
    cd doc.html
    node tools/verify.mjs examples/memory.doc.html

the receipts wall

sealed first, said second. where a number came from a sealed run, the tile takes you to it.

the numberwhat it provesthe receipt
72.5 MBone sealed file, far past any context window — a model read its way through and cited its way backapparatus-memori · PR #48
240/240every citation checked against the actual bytes. none inventedapparatus-memori · PR #48
1 bytechange a single character and the next check catches itthe record — integrity
4 langsfour readers, four languages, one written spec — a blind implementation matched every expected verdict; one raw-text cell split the fourreader-convergence · PR #72
2 readersa forged witness fooled one reader — the other refused. the forgiving parser was deleted, not patched, and the pair re-sealed as a unitreader repair · sealed
0vendors who can take this away from youpublic domain · no owner

a homepage holds the short rows — the evidence page carries the rest, losses included.

[ ↑ top ]

⚠ the limits, and what answers them

a format that names only its strengths leaves you to guess at the rest. these are the limits, each with its why and its answer.

  • the file doesn't check itself when you open it. That is a choice: the format demands no runtime behavior of a document, so the file stays inert, portable, and yours. Verification is a command you run — the power stays in your hands, not in the artifact.
  • a flat table of contents has a ceiling. Past a certain size the map itself blows the reading budget. That's why large documents fold into nested indexes — the limit and its answer ship together.
  • it spends tokens where RAG spends infrastructure. On the one comparison run it spent more tokens than a vanilla vector index — and needed nothing built or served. What the spend bought: citations by real address you can follow to the exact section, and, on questions that span sections, the right evidence found far more often.

each limit, with its figures and its bounds: » the evidence page · the record itself, kept as a doc.html

every section carries its hash

a witness is the SHA-256 of one section's exact bytes. recomputing a SHA-256 takes a stock library and nothing else. which bytes to hash is the one thing the format has to tell you.

$ python tools/verify.py examples/memory.doc.html
sections: 12

verified 12/12 sections (mismatches: 0, missing: 0)
WITNESS
VALID ✓

no key · no login
nothing to expire

two reference readers ship with the format, built differently on purpose — a document must convince both: [ verify.py ] · [ verify.mjs ] — and the wiki has its own pair, checking the shelf: root, leaves, pins: [ verify_wiki.py ] · [ verify_wiki.mjs ]

write your own — three ways in

  1. by hand. the whole grammar is about twenty lines — the sample above is nearly all of it. write your sections, give each an id, list them in the manifest, hash the bytes. any language with SHA-256 can do it.
  2. with the builder. sections in, conformant document out, witnesses computed for you:
    node tools/build-doc.mjs sections.json out.doc.html
  3. with a coding agent. hand it the spec and nothing else:
    Read SPEC.md and build a conformant doc.html for the content
    in [your source]. Implement every MUST, pass the Validation
    Matrix (§10), and satisfy the Definition of Done (§11).
    the agent needs only SPEC.md. no other project context.

what's new

  • v0.5.0 — reorganized around use new!
  • the wiki ships — shelf, pins, essays
  • v0.4.0 — the conversation surface, completed
  • first public release!!

webring: the old web

‹ prevrandomnext ›

this site is a proud member of the old web

visitors

you are visitor number 001337 since 07/07/26 — yes, it's fake. it was fake in 1999 too.

doc's guardian

(=^・ェ・^=)
guards the witnesses at night — feed daily
§ PUBLIC
DOMAIN
NO JS
TO READ
SHA-256
INSIDE
BEST VIEWED IN
ANY BROWSER
HUMAN
+ AGENT
chat: under construction
✍ sign the guestbook — humans and agents welcome