Docs site
The docs/ folder served as a searchable site, with llms.txt and an MCP server for agents.
What
apps/docs is a small Next.js app built with Fumadocs. It
renders the docs/ folder at the repo root: the plan, the architecture page, the
guides and the anecdotes. Nothing is copied; the Markdown you read on GitHub is the
same file the site serves.
Besides pages, it exposes the docs in three ways that are meant for agents:
| Route | What it returns |
|---|---|
/llms.txt | an index of every page with its description |
/llms-full.txt | every page as Markdown, in one file |
/api/mcp | an MCP server with list_pages, get_page(url), search(query) |
Search for humans is the dialog behind ⌘K; it calls /api/search (Orama, built at
compile time, no external service).
Why
Contributor docs are only useful if they are easy to find and easy to feed to an
agent. GitHub gives us neither search across pages nor a Markdown feed. Fumadocs gives
both for little code, and its MCP server is the same kind of tool Vektos measures:
"what happens when an agent has a search tool over the project docs?"
The MCP server here is a dogfooding step. When the rag package exists (week 3), the
Ask AI chat will use it, and we will be able to compare the two.
Try it
bun run docs # http://localhost:3001 opens the architecture pageThen, in another terminal:
curl -s localhost:3001/llms.txt
curl -s "localhost:3001/api/search?query=preflight"Connect an agent to the MCP server with:
{ "mcpServers": { "vektos-docs": { "url": "http://localhost:3001/api/mcp" } } }and ask it to search the docs for "escape hatch". You should see a search call,
then a get_page call on /docs/guides/03-graders.
Extend it
- New page. Add a
.mdfile underdocs/with a frontmattertitle:anddescription:. Do not repeat the title as an# H1; the layout renders it. Add the file name to thepagesarray of the folder'smeta.jsonto control its position. - New folder. Create it with a
meta.json(title,pages) and list the folder indocs/meta.json. - Links. Relative links between files (
./02-lint.md,../anecdotes/01-token-table.md) work on GitHub and on the site:createRelativeLinkrewrites them at build time. - Diagrams. A
```mermaidblock is rendered to SVG on the server by Pele (src/components/mermaid.tsx), so no client-side Mermaid is shipped. Colors follow the site theme through CSS variables inglobal.css. - MDX options live in
apps/docs/source.config.ts. Collections live insrc/lib/source.tsthrough the macro API.
Known gaps
- Content changes outside
apps/docsare not always noticed by the build cache. If a page looks stale afternext build, deleteapps/docs/.nextandapps/docs/.source. - Tailwind is a dependency of Fumadocs UI and is used only inside
apps/docs. The design system stays on Panda; nothing from Tailwind leaks intopackages/ds. PLAN.mdis long and written as a working document. It is served as is.next-themes@0.4.6renders its theme<script>on the client too, and React 19.2+ warns about it in dev.src/components/provider.tsxgives that client copy a non-JStypeso the warning goes away; the server copy still applies the theme before first paint. Remove the wrapper once next-themes#385 ships a fix.- No Ask AI yet. It comes with the
ragpackage so it can use our own retrieval. - The site is not deployed.
bun run docs:buildproduces a standard Next.js output.