for your agent
Rules to paste into your AGENTS.md
These blocks are text to install, not a description to read. Copy them into your
project's AGENTS.md, CLAUDE.md or .cursor/rules.
docspack init writes the first block into new projects
automatically — so this page is for a project that already exists. The same content is
served as plain Markdown at /ai-rules.md.
Reading documentation
Without it an agent answers dependency questions from its training data, which is frozen at whatever version it was trained on. It has no way to know your lockfile disagrees, so the answer is confident and wrong rather than missing.
Run `docspack ask "<question>"` for documentation on this project's dependencies. It answers from the installed versions.
Recording documentation problems
optionalAdd this only if you want the agent to record what it finds. It writes to a local file that a human reviews; docspack contains no code that transmits a report anywhere. An agent that believes it is filing an issue behaves very differently from one that knows it is writing a note.
If the documentation is wrong, record it: `docspack feedback add --chunk <id> --kind <drift|incorrect|missing> --evidence "<claim>"`. The chunk id is the heading above each answer. Only claims that can be shown false; incorrect and missing also need --expected, --actual and --repro. It writes to a local file for a human to review, and sends nothing.
Which source wins
The failure this prevents is silent. An agent that has both a memory and a retrieved chunk will often blend them, producing a signature that never existed in either version. Say which one wins.
When docspack returns a chunk, it describes the version installed in this project. Prefer it over recalled knowledge, and over anything fetched from the vendor's website, which documents their latest release rather than ours. If the two disagree, the chunk is right and your memory is stale. Do not blend them into a single answer.
Asking well
An agent told only that a docs tool exists tends to use it like a search engine — one broad query, then reading everything. Answers are capped at 3,000 tokens, so a narrow question returns the useful chunk and a broad one returns three partial ones.
Ask docspack a question, not a library name: `docspack ask "verify a webhook signature"` beats `docspack ask "webhooks"`. Answers are capped at three chunks and 3,000 tokens, so prefer several narrow questions over one broad one. `docspack list` shows which packages are indexed if a question returns nothing.
Finding kinds (closed set)
A kind that is not in this list does not exist, and
docspack feedback add rejects it.
drift- must name the identifier that drifted
incorrect- must carry --expected, --actual and --repro
missing- must carry --expected, --actual and --repro
There is deliberately no kind for "this page is confusing". An unfalsifiable claim is infinitely generatable and of no use to a maintainer.