Why agents do well here. Every extension surface an agent touches has a machine-checkable contract: routes generate the typed client (wrong calls fail to compile), pages follow file conventions the SDK validates at build time, and blocks are diffable source. An agent doesn’t need to guess whether its change works — the toolchain tells it.
How it works
When you install a Mercur project, the documentation is bundled as a dependency atnode_modules/@mercurjs/docs/. It mirrors the structure of this site:
Set up your project
New projects
Projects created withbunx @mercurjs/cli@rc create are ready out of the box. The template ships:
@mercurjs/docsas a dependency, so the docs land innode_moduleson install- an
AGENTS.mdand aCLAUDE.mdat the project root that tell agents to read the bundled docs first
AGENTS.md automatically when they start a session. There is nothing else to configure.
Existing projects
Add the docs dependency:AGENTS.md at the project root with a single, focused instruction:
AGENTS.md
CLAUDE.md; point it at the same instructions instead of duplicating them:
CLAUDE.md
What the agent reads
The workflow is deliberately simple: index first, then the page. An agent readsllms.txt to see what exists, then opens the one or two content/ pages relevant to the task before implementing. The bundled docs cover the full domain model (sellers, products, offers, attributes, commissions, payouts, order groups), the CLI, the typed API client, the dashboard SDK, module references, and how-to guides — so the agent looks up the correct contract rather than inventing one.
Verify its work
Mercur gives an agent a fast, machine-checkable way to know whether a change is correct — the equivalent of a grading loop it can run itself:| Check | What it proves |
|---|---|
bun run build | Types resolve and the generated client matches the routes |
bun run lint | Code conforms to the project’s rules |
Integration tests (packages/api) | Backend behavior still holds |
bunx @mercurjs/cli@rc diff | Local blocks vs. the registry — what changed and what drifted |
Beyond bundled docs
The bundled docs are for agents working inside your project. For chat assistants and hosted tools, Mercur also publishes its docs online:llms.txt
Feed the full documentation to Claude, ChatGPT, or any LLM.
MCP server
Let your editor search the docs live via Model Context Protocol.