Coding agents
Beignet's conventions are enforced by tooling — beignet lint checks
dependency direction, beignet doctor reports registration and structure
drift, and generators produce canonical output. That makes a Beignet app
unusually legible to coding agents: an agent can generate an artifact, check
its own work, and fix drift without guessing at project conventions. Three
integration points connect agents to that tooling.
The scaffolded guide files
beignet create writes AGENTS.md and CLAUDE.md at the app root. Agents
that follow the AGENTS.md convention read AGENTS.md automatically, and
Claude reads CLAUDE.md; both files contain the same conventions and also
apply to humans.
It carries the conventions an agent cannot discover by reading code:
- Registration is not automatic. A route group, schedule, task, or
outbox registry entry must be registered in its central
server/file before it runs. The guide lists what to register where, and notes thatbeignet doctor --fixrepairs most registration drift. - Prefer generators.
beignet makeoutput lands in the right place, wires registries, and passeslintanddoctor; hand-written files often miss a wiring step. - The validation loop. Run the app's Biome lint,
beignet lint,beignet doctor --strict, tests, and typecheck after each change, and treat findings as the next task. - Placement rules and the naming grammar. Where feature artifacts live,
and how
defineX,createX, andcreateXProviderdivide the API.
The guide deliberately excludes anything discoverable from the code or
covered elsewhere: the README.md owns setup and run instructions, and
AGENTS.md and CLAUDE.md own conventions. Keeping them short keeps agents
reading them.
The MCP server
beignet mcp runs a Model Context Protocol server over stdio, exposing the
CLI's inspection and generation commands as tools:
| Tool | What it does |
|---|---|
routes | List the app's routes and contracts. Read-only. |
doctor | Report framework drift as JSON diagnostics. Accepts { strict?: boolean }, default true. Read-only. |
doctor_fix | Apply doctor's low-risk fixes: route-group, schedule, task, and outbox registration drift. Listener drift stays report-only and must be fixed by hand. |
lint | Report architecture and dependency-direction diagnostics. Read-only. |
make | Run a generator with { artifact, name, ...options } — the same artifact kinds as beignet make. |
Tool outputs are exactly the JSON the CLI's --json flags produce, so
anything written against beignet doctor --json or beignet lint --json
reads MCP results unchanged.
Generated apps ship a .mcp.json that registers the server through the
app's package runner, so Claude Code picks it up with zero configuration.
Other clients, such as Cursor and VS Code, take the same command in their
own config files (.cursor/mcp.json or .vscode/mcp.json):
{
"mcpServers": {
"beignet": {
"command": "bunx",
"args": ["beignet", "mcp"]
}
}
}In npm, pnpm, or yarn apps, use npx as the command instead. Both runners
resolve the app-local beignet bin that generated apps install, so the
server always matches the app's CLI version.
llms.txt
The docs site publishes two plain-text views of itself, rebuilt on every docs build:
- https://beignetjs.com/llms.txt — an llms.txt-style index mirroring the docs navigation: every page with its title, URL, and description.
- https://beignetjs.com/llms-full.txt — the full text of every docs page in one file.
Use the index when an agent should navigate to the right page and fetch it; use the full file when an agent retrieves grep-style over the whole corpus.
See the CLI reference for the beignet mcp command and
App architecture for the structure the conventions in
AGENTS.md and CLAUDE.md describe.