TokenRollAI/llmdoc

TokenRoll LLMDoc for Coding Agent

What it solves

llmdoc provides a structured, doc-driven workflow for AI coding assistants (specifically Claude Code and Codex) to maintain up-to-date project documentation. It prevents the AI from losing context or relying on outdated information by automating the creation and synchronization of a documentation skeleton that the AI itself can read and update.

How it works

The system uses a dedicated llmdoc/ directory to store project knowledge. It operates through two primary commands:

  • /llmdoc:init: Analyzes the repository to create a documentation skeleton, including architecture, overview, and reference docs, and synchronizes a global index.
  • /llmdoc:update: Uses git commit history (watermarking) to detect changes since the last sync. It selects an update mode (fast, analysis, or full) based on the size and risk of the changes to update the relevant documentation and record reflections on workflow lessons.

It manages context via a lifecycle system that distinguishes between "cold starts" (loading core skills and essential packs) and "compact re-entry" (resuming tasks using a state object to avoid reloading everything).

Who it’s for

Developers using Claude Code or Codex who want their AI assistants to have a persistent, structured memory of their project's architecture and implementation intent without manually writing every doc update.

Highlights

  • Commit-based synchronization: Tracks changes via a watermark (sync.md) to ensure only necessary updates are performed.
  • Adaptive update modes: Automatically chooses between fast, analysis, and full update paths based on the risk and authorship of changes.
  • Coded documentation layout: Organizes knowledge into specific categories like must/ (cold-start context), architecture/, and memory/ (reflections and decisions).
  • Context budget management: Implements a deterministic proxy for startup budget (e.g., 24 KiB) to prevent context window overflow in large monoliths.
  • Integrated agent roles: Utilizes specialized internal agents (investigator, worker, recorder, reflector) to gather evidence and maintain stable docs.

Related

  • Project
  • Project
  • Dispatch
  • Project
  • Project