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.

Package-shipped skills

Beignet packages ship TanStack Intent skills with the npm package version that contains the code they describe. Generated apps trust the relevant Beignet packages through package.json#intent.skills, so an agent can load the guidance that matches the installed Beignet version instead of relying on a copied file that drifts.

Start with Intent from the app root:

bunx @tanstack/intent@latest install
bunx @tanstack/intent@latest list
bunx @tanstack/intent@latest load @beignet/core#app-architecture

Use the matching runner for the app's package manager, such as npx, pnpm dlx, or yarn dlx.

Load the narrow skill for the task:

SkillUse it for
@beignet/core#app-architectureSchemas, contracts, use cases, errors, ports, policies, workflows, seeds, tests, and core imports
@beignet/next#routes-serverRoute groups, central registration, server context, Next route handlers, OpenAPI, devtools, uploads, storage, webhooks, schedules, and outbox drains
@beignet/react-query#clientTyped clients, query/mutation/infinite options, feature client helpers, hooks, cache keys, invalidation, and client/server boundary fixes
@beignet/react-hook-form#formsContract-backed forms, Standard Schema resolvers, root form errors, React Query mutations, transforming body schemas, and form boundaries
@beignet/react-uploads#uploads-clientTyped upload clients, React upload hooks, progress, abort/reset behavior, upload callbacks, invalidation, and upload client boundaries
@beignet/provider-db-drizzle#database-providerDrizzle provider setup, schema placement, config, DbPort typing, repositories, Unit of Work, audit, idempotency, outbox, migrations, and doctor drift
@beignet/provider-auth-better-auth#auth-providerBetter Auth setup, auth routes, AuthPort typing, deferred port registration, server context, auth hooks, policies, tests, and doctor drift
@beignet/cli#app-structureGenerators, full-slice recipes, db schema sync, beignet.config.*, route inspection, lint, doctor, MCP tools, and generated app structure

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:

The guide deliberately excludes anything discoverable from the code or covered elsewhere: package skills own framework-specific agent guidance, the README.md owns setup and run instructions, and AGENTS.md and CLAUDE.md own app-local 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:

ToolWhat it does
app_mapProject the source-backed app graph by optional feature or node kinds. Read-only.
explainExplain any mapped concept or diagnostic with { kind, target }; returns source evidence, relationships, conventions, findings, suggested files, and follow-up commands. Read-only.
checkRun the complete validation loop and return versioned step results, bounded failure output, durations, and overall ok. Accepts { preflight?: boolean, timeoutMs?: number } and cancels the active script with the request. It does not apply Beignet fixes, but app scripts retain their normal side effects, so this is an execution tool.
dbRun generate, migrate, seed, or reset with { command, dryRun?, timeoutMs? }. Returns the matching versioned CLI/library report with bounded output, request cancellation, and a command timeout. Database scripts retain their app-owned side effects; dryRun reports the script without simulating its SQL or data changes.
db_schema_syncIdempotently sync app-owned Beignet provider-table schema re-exports with { dialect?, tables?, output?, dryRun? }. It writes source unless dryRun is true and never generates or applies SQL migrations.
routesList the app's routes and contracts. Read-only.
doctorReport framework drift as JSON diagnostics. Accepts { strict?: boolean }, default true. Read-only.
doctor_fix_planPlan low-risk repairs with stable operation IDs, hashes, exact patches, and current doctor diagnostics. Read-only.
doctor_fixApply low-risk repairs. Pass { planId, fixIds? } from doctor_fix_plan for guarded application; omitting both preserves apply-all. Its JSON matches guarded CLI apply, including planId and operationIds.
lintReport architecture and dependency-direction diagnostics. Read-only.
makeRun a generator with { artifact, name, ...options } — the same artifact kinds as beignet make.
provider_addAdd a provider setup preset with { preset, dryRun? }; presets match beignet provider add.

Tool outputs are exactly the JSON the CLI's --json flags produce, so anything written against beignet map --json, beignet explain ... --json, beignet check --json, beignet db ... --json, beignet doctor --json, or beignet lint --json reads MCP results unchanged. For persistent generated work, the intended coding loop is app_map to orient, explain to focus one concept, make or an edit to change it, db_schema_sync when provider tables changed, db with generate then migrate, and check to verify the whole app.

Generated apps ship a .mcp.json that registers the server through the app-local @beignet/cli bin, 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": "./node_modules/.bin/beignet",
      "args": ["mcp"]
    }
  }
}

Run the MCP client from the app root so the relative bin path resolves to the installed app version. For one-off usage outside an installed app, use the scoped package name with a registry runner, such as bunx @beignet/cli mcp or npx @beignet/cli mcp; never use the unscoped beignet npm name.

llms.txt

The docs site publishes two plain-text views of itself, rebuilt on every docs build:

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.