Skip to main content

Five Projects, One Realization: The Document Is the Database

Five project icons forming a document-centric pipeline: publish, validate, embed, compress, manage — connected by structural metadata flows
· ~8 min read
Ryan Goodrich
Technical Writer, AI Enthusiast, and Developer Advocate

I didn't plan a portfolio. I planned a Markdown file. Then another one. Then five projects materialized around them like ice crystals on a cold window, each shaped by the same principle I didn't recognize until project number four. Apparently I need to build the same insight multiple times before I notice I keep building it.

The insight: documents are not content delivery vehicles. They are structured knowledge systems. Almost every AI tool in production today throws away the structure and keeps only the content. That's like buying a filing cabinet, dumping all the folders on the floor, and asking someone to find last quarter's tax return by feeling the texture of the paper.

I know this because I've now built five projects that all, in their own way, try to fix that mistake.

The Lineup

Let me introduce them in birth order. (I'm using "born" loosely. A project is "born" when it gets its first Markdown file. The code comes later. Sometimes much later.)

LlmsTxtKit parses llms.txt files, a standard where websites publish Markdown summaries of their content so AI systems can understand them without crawling every page. I built a C#/.NET library that fetches, parses, validates, caches, and generates context from these files. The idea is elegant: instead of making an AI read your whole website, hand it a curated summary. Give it the filing cabinet with the folders intact.

DocStratum validates those same files against the spec. Think ESLint, but for a Markdown standard defined by a blog post. If LlmsTxtKit is "here's how to read the file," DocStratum is "here's whether the file was written correctly."

FractalRecall is where things got interesting. Most retrieval systems (the "R" in RAG) chop documents into chunks, embed them as vectors, and search by similarity. The chunks are orphans. They know what they say but not what they are. FractalRecall's thesis is that if you tell the embedding model what kind of document a chunk came from--its domain, its authority status, its temporal context--retrieval quality improves. I tested this. It does. Twenty-four tokens of structural context improved my retrieval quality by 16.5%. That's less text than this sentence.

Haiku Protocol attacks the opposite end: instead of adding context, it compresses content. A Controlled Natural Language system that transforms verbose prose into dense, machine-readable strings. Same information, fewer tokens. If your context window is functionally 8K tokens despite the marketing department claiming 128K, every token you save on content is a token you can spend on structure.

Chronicle ties it together. I didn't realize that until embarrassingly late. Chronicle treats worldbuilding lore like a software codebase: Markdown files in a Git repo, YAML frontmatter for metadata, deterministic validation for consistency, FractalRecall for semantic search. Version-controlled fiction with CI/CD for your canon.

Five projects. Five different problems. One pattern I kept accidentally rediscovering.

The Pattern

Every one of these projects treats a document--not a database row, not a JSON object, not a feature vector--as the fundamental unit of knowledge. And every one insists that the structure of that document carries meaning the AI pipeline has an obligation to preserve.

LlmsTxtKit: your website is a structured document. Give AI the structure, not just the text.

DocStratum: that structure has rules. Verify them.

FractalRecall: when you embed that document for retrieval, the structure should travel with it.

Haiku Protocol: when you compress it, compress the prose. Not the structure.

Chronicle: manage these documents with the same rigor you'd give source code, because they are source code--for knowledge.

I could dress that up, but the pattern is blunt enough to say flat. The common thread isn't AI, isn't embeddings or context windows or Markdown parsing. It's a conviction that documents are databases--that a well-structured Markdown file with YAML frontmatter carries more retrievable intelligence than a row in PostgreSQL, because it carries both the content and the organizational context that makes the content findable.

Why This Matters

Here's what frustrates me about the current RAG ecosystem.

The standard workflow: take your documents, chop them into 512-token chunks, embed them as vectors, store them in a vector database, find the nearest neighbors at query time. Simple. Elegant. And it throws away everything that made those documents documents.

When you chunk a technical manual, you lose the chapter structure. Chunk a worldbuilding corpus, you lose the distinction between canonical lore and speculative drafts. Chunk a legal contract, you lose the hierarchy of clauses and subclauses that determines what's binding and what's illustrative. The chunks are semantically meaningful fragments floating in a void, stripped of the logical intelligence that we human authors spent hours building into the document's structure.

Then we bolt metadata back on after the fact--as database columns, filter fields, post-retrieval classification steps--and wonder why retrieval quality plateaus. We're reconstructing information that was right there in the original document. Before we destroyed it.

That's the filing cabinet problem. The structure was there. We threw it on the floor. Now we're building increasingly sophisticated AI systems to figure out which pile the tax return is in. We could have just kept the folders.

The Document as First-Class Citizen

The alternative is simpler than it sounds.

Treat the document as a first-class citizen in the AI pipeline. Not as a source of text to be extracted and discarded, but as a structured knowledge object whose organization carries meaning at every stage.

LlmsTxtKit does this at the publishing stage: give AI systems the document's structure directly instead of making them reconstruct it from HTML. DocStratum does it at validation: enforce structural consistency so the AI can trust what it receives. FractalRecall does it at embedding: encode structural context into the vector itself, so retrieval is structurally aware from the start. Haiku Protocol does it at compression: preserve structural relationships even when reducing token count. Chronicle does it at management: version-control documents with the same discipline we give code.

None of these ideas are individually revolutionary. But I haven't seen anyone connect them into a coherent pipeline. I think the reason is cultural: the AI industry sees documents as input—raw material to be processed and discarded. I see them as infrastructure. The load-bearing walls of a knowledge system.

The Accidental Architecture

I want to be clear: I did not plan this. I didn't sit down and decide to build five complementary projects forming a coherent document-centric AI pipeline. I built LlmsTxtKit because I was frustrated that AI couldn't read my website. DocStratum because the llms.txt files I was parsing were full of spec violations. FractalRecall because embedding retrieval kept returning the wrong documents. Haiku Protocol because context windows are smaller than advertised and I was angry about it. Chronicle because my worldbuilding corpus was a mess and I have very specific feelings about version control.

Each project solved a real problem. The pattern emerged after the projects existed.

I wrote the documentation first--obviously--but I wrote the unifying thesis last. That's probably the most honest thing a documentation-first developer has ever admitted.

The through-line, now that I can see it: the document is the database. The structure is the schema. The metadata is the index. The content is the data. Build your AI pipeline to respect that--from ingestion to retrieval to compression to delivery--and you get better results than treating text as an undifferentiated stream of tokens.

I have the experiment results to prove it. Those are stories for upcoming posts.


This is the first in a series connecting the AI and LLM Research projects. Next: how 24 tokens of metadata improved retrieval by 16.5%--and why losing 43% of my data somehow made things better.