Why agents do well here. Every extension surface an agent touches has a machine-checkable contract: routes generate a 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 withbun create mercur-app@latest 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. 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. It is the equivalent of a grading loop the agent can run itself:
Because these are objective, an agent can define what “done” looks like, run the checks, read the output, and iterate until they pass, instead of stopping at “looks plausible.”
More AI tooling
The bundled docs are the foundation. Layer more on top:Skills
Add the official Medusa agent skills for the framework Mercur runs on.
MCP server
Let your editor search the docs live via Model Context Protocol.
llms.txt index and a full
llms-full.txt you can load as context.