Create Project and Global Rules
Rules provide durable instructions that should apply without repeating them in each prompt. Use them for repository conventions, verification requirements, architectural boundaries, and personal preferences.
Create a rule
- Open Settings → Agents → Rules.
- Choose project or global scope.
- Create or open a rule file.
- Write one focused set of instructions.
- Save the file and use Reload.
Project rules belong to the current repository and can be shared with the team. Global rules apply across your projects.
Write a useful rule
State the behavior, where it applies, and how the agent can verify it. Prefer checkable instructions over broad preferences. For example:
# API changes
- Preserve existing response fields unless the task changes the contract.
- Update integration tests for every endpoint behavior change.
- Run the API test suite before completing the task.
Split unrelated concerns into different rules. Remove instructions that no longer match the repository.
Rules guide behavior; they do not grant permission. Configure execution boundaries under Permissions and Auto-Approve.
Older rule locations can be discovered during migration, but new project rules should use the location created by the current Reasoning interface.