Make your docs queryable for coding agents
Coding agents called a small docs search CLI 1,122 times across 327 of my sessions on one project. How it works, why it stayed with the agency, and the open-source version you can use.
, filed under ai, coding-agents, sqlite, documentation, tooling
On one project, coding agents called a docs search CLI I built 1,122 times, across 327 of my roughly 610 sessions on it. That’s the agents in my own sessions choosing to ask the docs for context, in over half of them, instead of guessing.
By the end the project had 291 documents: requirements, specs, schema notes, meeting notes and client communications. The CLI had pulled 4,307 decisions, requirements and risks out of them. Another developer on the team later planned the same approach for a different project, and I built a public version, wiki0.
Your docs folder is a dumping ground
Specs, meeting notes, client emails, schema notes. It grows every week, and every agent session starts by guessing which bits matter, or reading far too much of it.
The risk isn’t only wasted context. It’s an agent confidently building against a requirement that was superseded two meetings ago.
There were too many docs to hand an agent all of them. The CLI was pivotal in making sure the agents got the right context when they needed it.
How it works
It’s small, local and has no dependencies beyond Node’s built-in SQLite:
- Indexing: documents go into SQLite full-text search (FTS5), with BM25 ranking weighted towards file paths and headings.
- Source priority: specs outrank meeting notes, and superseded material is ranked down.
- Office formats: it ingests PDFs and Office documents, not just Markdown.
- Fact extraction: it pulls out decisions, requirements and risks, so an agent can ask for those directly.
- Context in every result: the relevant section, the text around it, and where it came from.
- Drift check: it compares what the docs say with what the code does.
It started as a question in a session: would SQLite full-text search cut the research phase at the start of each session? The first version was built within the hour.
Making agents actually use it
A tool nobody calls is just more files. The project’s agent instructions told every agent to query the docs first, and five of the project’s agent skills called it directly. That’s where the call count comes from.
Why it stayed with the agency
The CLI didn’t go to the client at handover, and that was deliberate. The client got the application they bought. The docs corpus and the tooling we used to build it stayed with the agency. I’ve written about how that handover works.
Try it yourself
wiki0 is the public tool that grew out of this: local-first AI memory as a Markdown wiki, backed by SQLite search and MCP tools. Point it at your docs, tell your agents to query it first, and see how often they do.
A docs folder isn’t documentation if nothing reads it. Make it something your agents can query.
If your team’s agents keep working from stale or missing context, let’s talk.