~ 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 ★★ 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.
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.
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.
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.
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.
everything below is the same three bodies, put to work. the wiki is the memory
body on a shelf.
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.
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 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 --><navid="manifest"><ahref="#fold"data-witness="771feff36…"data-char-count="75"><spanclass="title">The Fold</span><spanclass="summary">Append-only memory;
correction is supersession.</span></a></nav><sectionid="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.
grab the file. open memory.doc.html
— a portable memory document. save it, or just hand your AI the address.
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.
ask a question whose answer lives in one section — then check which section it chose.
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 number
what it proves
the receipt
72.5 MB
one sealed file, far past any context window — a model read its way through and cited its way back
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.
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.
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
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.
with the builder. sections in, conformant document out, witnesses computed for you:
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.