AI rules for AI-assisted development

By default, LLM's knowledge of Uniform will be limited to what was indexed by LLM using public internet and subject to the cutoff date. To enhance your prompting with the latest knowledge of Uniform, it is highly recommended to feed Uniform-specific AI rules into your LLM context.

That's why we are maintaining the library of Uniform-specific rules to help your LLM tools work with better accuracy. Feeding these rules to your LLM will help it understand the context of the project and the specific requirements of Uniform.

You can find the library of rules here.

  1. rules/uniform.mdc - describes the core principles and concepts of Uniform
  2. rules/uniform-sdk.mdc - describes the Uniform SDK and its capabilities
  1. rules/uniform-next-page-router.mdc - for Next.js Page Router
  2. rules/uniform-next-app-router.mdc - for Next.js App Router

The rules files under rules/optional-personal-preferences contain non-essential rules that contain alternative defaults, highly recommended to review those and adjust to your liking.

To use AI rules, you need to add them to your LLM context. This varies per AI tool.

The easiest way to install AI rules is using the Uniform CLI. This method supports both Cursor and Claude Code:

npx @uniformdev/cli@latest ai rules install

This command will automatically download and configure the AI rules for your project, placing them in the appropriate location for your AI tool.

If you prefer to set up the rules manually or need custom configuration, you can follow the instructions below.

  1. Download the rules from the GitHub repository and place them in the .cursor folder in your project root.

  2. Open a new chat window and add the desired rules into your context when working with Uniform.

cursor-add-rules-to-context
Add AI rules to your context

Point Claude Code to the folder with the rules to augment its understanding of Uniform specifics.