Skip to main content
Rules are reusable directives you attach to a project on the platform. Each rule has a name (a concise title describing what it enforces) and a description (the full instruction set the AI follows during generation). Rules persist across generations and can be shared with teams, reused across different projects, and applied across different languages depending on how flexible the constraint is. Add once, enforce everywhere.

Adding a Rule

There are two ways to create and add rules on the platform:
1

Open Your Project

Open your project on the platform.
2

Go to the Prompting Section

Navigate to the prompting section of your project. The project must be in the prompting phase to add or create rules from here.
3

Add or Create a Rule

Add an existing rule to your project, or create a new one by entering a name (a concise title, e.g., “Require Test Coverage”) and a description (the full directive text).
4

Save

Save - the rule is enforced on all future generations for this project.
Adding and creating rules from the prompting section is only available while the project is in the prompting phase. If the project is past the prompting phase, you can only remove rules that were already added. To create new rules at any time, use Settings > Rules instead.

When to Use Rules

Add a rule when you want a quality constraint enforced consistently - rather than repeating the same instruction in every prompt. Rules are ideal for standards that apply across projects and teams: test coverage requirements, code style enforcement, security analysis, and performance profiling. Because rules can be shared with teams and reused across different projects and languages, they are especially valuable for organization-wide standards that should apply regardless of the specific codebase. If you need a constraint for a single generation only, include it directly in your prompt instead.

Using Templates as Rules

The rule templates provide 10 ready-to-use directive descriptions covering common quality and analysis dimensions. Copy a template’s description text and paste it into a new rule on the platform. You can also write your own custom rules from scratch. Custom rules follow the same format: a name and a description. Write the description as a directive - state what the AI should do, what patterns are forbidden, and what validation criteria apply.

Browse Rule Templates

Rule Templates

View all available rule templates and their descriptions