<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: dotdot</title>
    <description>The latest articles on DEV Community by dotdot (@dotdotgod).</description>
    <link>https://dev.to/dotdotgod</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3692480%2Fe47154fc-d671-4a21-893d-ef3d6f8c6bad.jpg</url>
      <title>DEV Community: dotdot</title>
      <link>https://dev.to/dotdotgod</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dotdotgod"/>
    <language>en</language>
    <item>
      <title>AI Agent Memory Starts with a Documentation Table of Contents</title>
      <dc:creator>dotdot</dc:creator>
      <pubDate>Sun, 19 Jul 2026 08:13:24 +0000</pubDate>
      <link>https://dev.to/dotdotgod/ai-agent-memory-starts-with-a-documentation-table-of-contents-4h3</link>
      <guid>https://dev.to/dotdotgod/ai-agent-memory-starts-with-a-documentation-table-of-contents-4h3</guid>
      <description>&lt;p&gt;Good project memory for AI agents is not a larger pile of documents. It is a &lt;strong&gt;hierarchical table of contents&lt;/strong&gt; that helps an agent reach the right document quickly and ignore irrelevant ones. Directories identify document roles and parent topics, filenames name individual entries, and each &lt;code&gt;README.md&lt;/code&gt; routes the agent to the next level. When a subject grows, a single file can be promoted into a directory with its own README and supporting documents. Paths, filenames, README indexes, and headings can therefore work like a book, letting an agent find the relevant specs, architecture, tests, and plans without reading the entire project.&lt;/p&gt;

&lt;h2&gt;
  
  
  More Documentation Does Not Mean Better Memory
&lt;/h2&gt;

&lt;p&gt;When documents are mixed in one directory or stored under names such as &lt;code&gt;NOTES.md&lt;/code&gt; and &lt;code&gt;FINAL.md&lt;/code&gt;, an agent cannot tell which file contains the current spec, architecture, or test strategy without opening it. When the path exposes the role, as in &lt;code&gt;docs/spec/CLI_INTERFACE.md&lt;/code&gt;, &lt;code&gt;docs/arch/CLI_ARCHITECTURE.md&lt;/code&gt;, and &lt;code&gt;docs/test/CLI_INTERFACE.md&lt;/code&gt;, the table of contents distinguishes the spec, architecture, and tests before any body is loaded.&lt;/p&gt;

&lt;p&gt;Good project memory does not expose everything all the time. Paths and indexes help an agent find what the current task needs and exclude documents with different roles before reading them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Project Documentation Is a Book
&lt;/h2&gt;

&lt;p&gt;We rarely read a book from the first page to the last when looking for one answer. We inspect the table of contents and move to the relevant part and chapter. Project documentation can follow the same model.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docs/
├── README.md                         # Table of contents for the whole book
├── concept/                          # Part 1: Core concepts
│   ├── README.md                     # Part 1 index
│   └── CONTEXT_CURATION.md           # Chapter: Context curation
├── spec/                             # Part 2: Product behavior
│   ├── README.md                     # Part 2 index
│   ├── PROJECT_INITIALIZER.md        # Chapter 1: Project initialization
│   └── cli/                          # Chapter 2: CLI
│       ├── README.md                 # Chapter 2 index
│       └── CONFIG_COMMAND.md         # Chapter 2, section 1: config command
├── arch/                             # Part 3: Architecture and constraints
│   ├── README.md                     # Part 3 index
│   └── DOCS_STRUCTURE.md             # Chapter: Documentation structure
└── test/                             # Part 4: Tests
    ├── README.md                     # Part 4 index
    └── CLI_INTERFACE.md              # Chapter: CLI regression tests
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Read this structure as a route through nested indexes. &lt;code&gt;spec/&lt;/code&gt; is the top-level index for product specs, and &lt;code&gt;PROJECT_INITIALIZER.md&lt;/code&gt; is one entry beneath it. When the CLI subject grows, &lt;code&gt;cli/&lt;/code&gt; becomes a new child index and &lt;code&gt;cli/README.md&lt;/code&gt; routes readers within it. &lt;code&gt;CONFIG_COMMAND.md&lt;/code&gt; is one entry in that child index. In book terms, these correspond to Part 2, Part 2 Chapter 1, Part 2 Chapter 2, and Part 2 Chapter 2 Section 1.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Full path&lt;/th&gt;
&lt;th&gt;Role in the table of contents&lt;/th&gt;
&lt;th&gt;Book notation&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;docs/README.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Top-level index for the whole book&lt;/td&gt;
&lt;td&gt;Full table of contents&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;docs/spec/README.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Area index for product behavior&lt;/td&gt;
&lt;td&gt;Part 2 index&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;docs/spec/PROJECT_INITIALIZER.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Project initialization entry&lt;/td&gt;
&lt;td&gt;Part 2, Chapter 1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;docs/spec/cli/README.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Child index for CLI documents&lt;/td&gt;
&lt;td&gt;Part 2, Chapter 2 index&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;docs/spec/cli/CONFIG_COMMAND.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;config command entry&lt;/td&gt;
&lt;td&gt;Part 2, Chapter 2, Section 1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;docs/arch/DOCS_STRUCTURE.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Architecture of the documentation system&lt;/td&gt;
&lt;td&gt;A chapter in Part 3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;docs/test/CLI_INTERFACE.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Test strategy for CLI behavior&lt;/td&gt;
&lt;td&gt;A chapter in Part 4&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A small subject starts as one indexed file. When it grows, it becomes a directory with a &lt;code&gt;README.md&lt;/code&gt; and its own child entries. The filename names the entry, while the full path is its address from the top-level index.&lt;/p&gt;

&lt;h2&gt;
  
  
  Directory Names Explain Document Roles
&lt;/h2&gt;

&lt;p&gt;A directory does more than group documents by topic. It tells an agent how to interpret the information inside.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;concept/&lt;/code&gt; explains mental models and core concepts.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;spec/&lt;/code&gt; defines the product's current specs.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;arch/&lt;/code&gt; explains architectural rationale, structure, and technical constraints.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;test/&lt;/code&gt; records regression tests and manual test procedures.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;report/&lt;/code&gt; preserves evidence from research and measurement.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;plan/&lt;/code&gt; records the intent of active work.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;archive/&lt;/code&gt; preserves completed work and historical context.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Consider this path:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docs/spec/cli/CONFIG_COMMAND.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;This document describes the CLI config command in the current product specs.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Paths change the meaning even when documents cover the same subject.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docs/arch/CLI_ARCHITECTURE.md
docs/test/CLI_INTERFACE.md
docs/archive/plan/cli-refactor/README.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first explains architecture, the second explains testing, and the third records historical work. Their paths reveal role and freshness even when their bodies use similar terms.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Filename Is a Chapter Title
&lt;/h2&gt;

&lt;p&gt;The following filenames distinguish files but do not explain their contents.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DOCUMENT_1.md
NOTES_NEW.md
FINAL_V2.md
MISC.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These names expose scope before the files are opened:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PROJECT_INITIALIZER.md
CLI_INTERFACE.md
LOAD_SNAPSHOT.md
VALIDATION_ARCHITECTURE.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A good filename works like a chapter title that is meaningful in the table of contents. Dotdotgod uses kebab-case for directories and UPPER_SNAKE_CASE for durable Markdown documents. &lt;code&gt;README.md&lt;/code&gt; is the predictable entry point for every directory.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;CONFIG_COMMAND.md&lt;/code&gt; is more useful than &lt;code&gt;API_1.md&lt;/code&gt; because it names behavior and domain instead of writing order. Stable, specific names let people and agents use the same vocabulary when finding and referencing documents.&lt;/p&gt;

&lt;h2&gt;
  
  
  README Is the Local Table of Contents
&lt;/h2&gt;

&lt;p&gt;Each directory's &lt;code&gt;README.md&lt;/code&gt; is a local index rather than a generic introduction.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# Product specifications&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; &lt;span class="sb"&gt;`CLI_INTERFACE.md`&lt;/span&gt;: user-facing CLI specs
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="sb"&gt;`PROJECT_INITIALIZER.md`&lt;/span&gt;: project initialization behavior
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="sb"&gt;`cli/`&lt;/span&gt;: detailed specs for individual CLI commands
&lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="sb"&gt;`plan-mode/`&lt;/span&gt;: plan mode and staged execution specs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An agent can read this README and choose the next document without opening every file in the directory. This is why adding, moving, or renaming a document should update the nearest README in the same change.&lt;/p&gt;

&lt;h2&gt;
  
  
  Increase the Depth of the Index as Documentation Grows
&lt;/h2&gt;

&lt;p&gt;Do not begin with a complex hierarchy. If a subject has one document, start with one file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docs/spec/PAYMENT.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When the domain grows into multiple documents, promote it to a directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docs/spec/payment/
├── README.md
├── LIST_API.md
├── SUMMARY_API.md
└── REFUND_POLICY.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;payment/README.md&lt;/code&gt; becomes the intermediate index between the spec area and its individual documents. An agent narrows the search in four steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Select a documentation area in &lt;code&gt;docs/README.md&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Select a product domain in &lt;code&gt;docs/spec/README.md&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Find the relevant behavior in &lt;code&gt;docs/spec/payment/README.md&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Read only the necessary section of the selected document.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The amount of possible context grows with the project, but an index keeps the context required for the current task small.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Good Index Also Says What Not to Read
&lt;/h2&gt;

&lt;p&gt;When changing the current behavior of a CLI command, inspect &lt;code&gt;docs/spec/cli/&lt;/code&gt; first. Read &lt;code&gt;docs/arch/&lt;/code&gt; when implementation constraints matter, &lt;code&gt;docs/test/&lt;/code&gt; when regression coverage matters, and &lt;code&gt;docs/archive/&lt;/code&gt; only when a historical decision is relevant.&lt;/p&gt;

&lt;p&gt;The documentation structure answers two questions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;What should the agent read now?&lt;/li&gt;
&lt;li&gt;What can the agent ignore for this task?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Good project memory is not a system that injects every document into every prompt. It provides a route to relevant information and a boundary that excludes irrelevant information.&lt;/p&gt;

&lt;h2&gt;
  
  
  Designing Project Memory Means Designing Addresses
&lt;/h2&gt;

&lt;p&gt;It is natural to begin project-memory design by asking what to store. First ask whether the information has a useful address.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Can a path and filename reveal a document's role and contents?&lt;/li&gt;
&lt;li&gt;Does every directory contain an index to the next relevant document, while separating current and historical information?&lt;/li&gt;
&lt;li&gt;Can the table of contents expand as documentation grows without making the agent read everything?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Directories divide the book into parts, filenames name chapters, README indexes route readers, and headings narrow a document into sections.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Designing documentation for AI is not cosmetic file organization. It is designing a table of contents that lets an agent reach the chapter required by the current question without reading the whole project.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>dotdotgodkit</category>
      <category>documentation</category>
      <category>agents</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
