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/web#fetch-serverWeb Fetch server composition, CLI web profiles, Bun and serverless mounting, raw/native responses, lifecycle, and adapter-level tests
@beignet/devtools#runtime-safetyDevtools provider and route separation, non-development authorization, redaction, persistence, watchers, and production safety
@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/agent-auth-better-auth#agent-capabilitiesTyped agent capabilities, registries, authoritative delegated service context, Agent Auth grants, schema conversion, and execution tests
@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 app's guidance and focused feature maps as resources plus the CLI's inspection, generation, and operational commands as tools.

Resources are read-only:

ResourceWhat it provides
beignet://app/guidanceThe bounded app-local AGENTS.md instructions, or concise fallback guidance when the file is absent.
beignet://app/features/{feature}A source-backed app-map projection for one feature. MCP clients can list available features and complete feature names.
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.
task_runRun a registered task with { name, input?, tenant?, module?, timeoutMs? } in an isolated process. Returns the matching versioned CLI/library report.
schedule_runRun a registered schedule with { name, payload?, runId?, attempt?, scheduledAt?, triggeredAt?, source?, module?, timeoutMs? } in an isolated process.
outbox_inspectRead outbox state with list or show. Read-only, with operation-specific inputs and the matching CLI/library report.
outbox_runRun drain, requeue, purge, or prune. Purge and prune accept dryRun; every operation is treated as state-changing.
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. Plans cover mechanical registration drift, managed default provider-table exports, generated test support, and eligible direct OpenAPI arrays. Read-only.
doctor_fixApply low-risk repairs. Pass { planId, fixIds? } from doctor_fix_plan for guarded application; omitting both preserves apply-all. Custom or ambiguous registry, runtime-manifest, and schema code remains diagnostic-only. 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.

Operational tools isolate app code from the long-lived MCP server, bound the structured result, and stop the complete process tree when the request is cancelled or its timeout expires. Optional module overrides must remain app-relative; the server rejects paths outside the app root where it started. Cancellation and timeouts cannot roll back side effects that already completed. Inspect app state before retrying an interrupted operation or one that reports a cleanup failure. 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, beignet lint --json, beignet task run ... --json, beignet schedule run ... --json, or beignet outbox ... --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, the relevant task, schedule, or outbox tool when operational work is required, 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.