the manual
Documentation
13 pages, in reading order. They are the same documentation the tool answers from: @docspack/docspack is this directory, packaged by docspack.
Every page is also served as Markdown at /docs/<name>.md, and all of them at once in /llms-full.txt.
Getting started
- 01 docspack overview docspack gives AI coding agents the documentation of the dependencies a project actually installed. Documentation is distributed as npm packages, indexed locally into SQLite, and served to agents over the Model Context Protocol.
- 02 Installing and syncing docspack is a CLI. Run it with
npx docspack <command>, or install it as a dev dependency to pin the version your team uses. - 03 Connecting an agent There are two ways to give an agent the documentation. The command line is the simpler one and works everywhere; MCP is there for clients that prefer a declared tool.
- 04 Searching from the command line
docspack searchruns the same query an agent would, and prints the results. Use it to check that a package is indexed, to see what an agent will receive, or to find something yourself.
Authoring and trust
- 05 Authoring a documentation package A documentation package is a normal npm package whose payload is Markdown rather than code.
docspack initscaffolds one,docspack buildregenerates it,docspack doctorchecks it anddocspack previewshows what an agent would get back. - 06 Documenting an HTTP API An HTTP API is the one documentation topic most projects already describe in a machine-readable file.
docspack build --openapireads that file and writes one chunk per operation: - 07 Verifying documentation against code Documentation drifts when a library is renamed and its prose is not.
docspack verifycatches that class of error before a reader does: it compares the identifiers a package's chunks name against what the libraries it documents actually declare. - 08 Trust and safety Documentation packages are third-party input that ends up in a model's context. docspack treats them accordingly.
Going further
- 09 How docspack compares docspack overlaps with several things an agent can already do. The differences are worth being precise about, because most of them are not about capability but about which version of the truth reaches the model, and how much of it.
- 10 Writing documentation for agents A documentation package is read by a model, not a person browsing a website. That changes what belongs in it.
docspack doctorenforces most of this, so the rules below are what the warnings mean. - 11 Answers from the installed build Half of a well-documented library's exported names are mentioned nowhere in its own documentation. Measured against two projects that document themselves well, hono's site covers 51% of what hono exports and zod's covers 27%. Every one of those uncovered names is declared in the package sitting in
node_modules. - 12 One source, two audiences Documentation has two readers with incompatible needs. A person wants a page: navigation, prose, a table of contents. An agent wants a passage: small, self-contained, and matched to a question. Most projects serve them from two pipelines, and the two drift.
- 13 Indexing your own sources
docspack syncindexes documentation somebody published.docspack indexindexes material this project already has — notes, decision records, an export, rows out of a query — anddocspack recallanswers from it.
Beyond the manual
- The package format — every manifest field and the rules a consumer enforces, for anyone implementing the format
- Rules for your AGENTS.md — blocks to paste into a project so an agent reaches for the local documentation
- llms.txt — the agent-facing summary: install commands, the closed sets and every link on this page