llmdoc
Website · 简体中文
Persistent engineering context that helps coding agents understand a repository
without rediscovering its architecture every session.
- Preserve decisions, constraints, and cross-module contracts that source code
does not explain cheaply.
- Retrieve only the context a task needs, then verify exact facts against the
live repository.
- Recheck knowledge semantically as code evolves instead of accumulating stale
implementation notes.
Start in 60 seconds
You need Node.js 18 or newer and a Git repository. Choose the path that matches
your repository and agent.
New repository with Claude Code
Add the marketplace and install the plugin:
/plugin marketplace add TokenRollAI/llmdoc
/plugin install llmdoc@llmdoc-plugin
If the install summary says Run /reload-plugins to activate., run that
command. If the reload warns about rereading the conversation, rerun it as
/reload-plugins --force. Once the plugin is active, initialize the repository:
/llmdoc:init
New repository with Codex
Add the marketplace and start Codex from the repository:
codex plugin marketplace add TokenRollAI/llmdoc
codex
Inside Codex, run /plugins, open the llmdoc-plugin marketplace, and install
llmdoc. Review the plugin and its hooks before enabling them. Then start a new
Codex session in the repository and ask:
Use the llmdoc:init skill to initialize this repository.
Antigravity (agy CLI / App / IDE)
Install the plugin from GitHub and check that it appears in the plugin list.
agy plugin install https://github.com/TokenRollAI/llmdoc/tree/main/plugins/antigravity
agy plugin list
For a local checkout, run agy plugin install ./plugins/antigravity from the repository root.
Open your project and run /init to create its knowledge base. When a workspace already
contains llmdoc/, SessionStart loads its context automatically. Ask the llmdoc skill
about a design decision, or run /update to review recent changes.
Antigravity plugin guide
Repository that already has llmdoc/
Open its knowledge map immediately—no plugin is required for direct CLI use:
npx -y @tokenroll/llmdoc tree
npx -y @tokenroll/llmdoc search "revision"
@tokenroll/llmdoc is external tooling. Do not add it to the consumer project's
package.json or lockfile, and never use the unrelated bare package name
npx llmdoc. For reproducible runs, pin the package spec:
npx -y @tokenroll/llmdoc@<version> <command>. The package exposes the llmdoc
bin; the scoped npx form keeps it outside the consumer repository.
How it works
flowchart LR
K[Stable knowledge in llmdoc/] --> R[Task-scoped retrieval]
R --> S[Source verification]
S --> U[Semantic maintenance]
U --> K
llmdoc/ stores durable engineering meaning—not a copy of the repository. An
agent first retrieves the smallest useful knowledge set, uses source and tests
for current facts, and later verifies affected knowledge. A code change creates
a review obligation; it does not automatically create a documentation rewrite.
Two operating layers
- Agent workflows own judgment and safe closeout. Invoke them through the
host's command or skill interface.
- Runtime CLI owns retrieval and deterministic mechanics. Call it with the
scoped npx command, directly or from a workflow.
The workflows are not equivalent CLI commands:
init creates a small, high-value V3 knowledge surface when none exists.
update semantically verifies affected knowledge; unchanged documents can be
recorded as verified without inventing prose changes.
prune reduces duplicate, fragmented, or cheaply reconstructable knowledge;
the CLI only supplies a read-only report.
dream runs offline consolidation (auditing hot stale docs without code
diffs, clustering pending reflections, repairing search blind spots, and
tuning startup preload); schedule it through an external Harness cron gated
by dream --check --quiet.
upgrade migrates legacy/V2 knowledge. It runs only when the user explicitly
asks for it and must never be suggested or folded into another workflow.
Every explicit workflow reports exactly one result state: success,
no_change, dry_run, incomplete, or failed.
Daily use
Apply this routing gate before broad exploration and again when entering a new
subsystem:
- Concept, contract, term, or “where is X?” →
search <query>
- Context for concrete source files →
context --files <path...>
- Cold start or unclear scope →
tree
- Known topic or kind →
index --topic <topic> / index --kind <kind>
- Bodies already identified →
show <path...>
These are alternatives, not a fixed sequence. Once llmdoc narrows the working
set, use native tools for exact source text, line numbers, test behavior,
counts, and Git state.