Skip to main content

Set up enforcement

Your memory layer exists. Every AI agent in your stack is still ignoring it. This step changes that.

Pick a connection

preset AI exposes your memory layer to agents three ways. Pick the one that matches where you want guidance and enforcement to land:

  • MCP server: for Claude Code, Cursor, Windsurf, VS Code Agent Mode, and Zed. Gives the agent generation-time access to your presets, constraints, and validation tools. Recommended for most teams, but the client still controls which tools it calls.
  • GitHub Action: for PRs. Runs preset validate on every commit and posts a comment with violations and fixes. Configure it as a required check when violations must block merge; this is the non-skippable enforcement point.
  • CLI pre-commit hook: for individual machines. Catches violations before they leave the developer's laptop.

You can combine them. MCP guides and validates during generation, the GitHub Action enforces at review, and pre-commit provides an earlier local check.

Install the MCP server

For Claude Code (most common):

claude mcp add --transport http preset https://mcp.presetai.dev/mcp

For Cursor, Windsurf, VS Code Agent, and Zed, see the developer quickstarts. Supported clients use guided or command-based setup, with manual configuration where needed.

The MCP server runs over OAuth: no API keys to rotate. Your AI tool authenticates once; its MCP client can then query the memory layer.

Try generation-time guidance

Open your AI tool and ask it to generate something your design system has a pattern for. A realistic first prompt:

Generate a destructive confirmation dialog for the delete account flow.

A connected tool can query your presets before it writes. When its workflow calls preset AI first, you'll get a response that looks more like this:

Using btn.destructive-confirm from your preset (matched at 94% confidence). It requires a confirmation dialog: I'll include that too.

Compare to the same prompt without preset AI, where the tool invents a button, guesses at a color, and calls the dialog whatever it felt like in the moment.

If validation receives something forbidden, <button onClick={window.confirm(...)}>, for example, preset AI returns the violation and the approved alternative. Whether that stops the current generation depends on the client workflow. A required GitHub check is what prevents the violation from merging.

Make validation required

Add the preset AI GitHub Action to your repository, configure its failure behavior, then make the check required in your branch protection rules. Follow CI integration for the workflow, authentication, and threshold prerequisites. To enforce your workspace's presets and rules—not only the Action's generic defaults—configure the full DB-backed validation inputs (supabase-url, supabase-key, and design-system-id). Once configured, a failed required check prevents the pull request from merging.

Raise the bar over time

Start permissive. The default configuration is a floor, not a ceiling: it blocks the worst violations and leaves soft patterns as suggestions. As your team gets comfortable, tighten.

You can:

  • Add forbidden primitives to block specific anti-patterns (hardcoded hex colors, raw <select> elements, inline styles).
  • Write context rules that change behavior based on file location (stricter in src/app/, looser in src/dev/).
  • Route intents to presets (any "submit button" maps to btn.primary).

Every rule lives in your memory layer. When agents read the layer, they read the rules too. A forbidden primitive becomes an instruction the tool incorporates before generation, not a gate it slams into afterward.

What's next

Was this page helpful?

Last reviewed by @jschuyler
All systems operationalDocsDevelopersPlatformPricing
PrivacyTerms© 2026 fndd, LLC