Rules
Rules are always-on coding standards. When installed, they’re loaded into every conversation your AI agent has — no manual invocation needed.
When to use rules
Use rules for standards that should always apply:
- Code style and formatting conventions
- Architecture patterns (“use MSW for mock data fetching”)
- Safety constraints (“never modify .env files”)
- Commit message formats
- Testing requirements
How rules work
- You write a rule in braid with a title and content
braid installwrites it as a native file for each agent- The agent reads the rule automatically at conversation start
Where rules are installed
Each agent stores rules differently. braid handles the format conversion:
| Agent | Location |
|---|---|
| Claude Code | .claude/rules/ |
| Cursor | .cursor/rules/ |
| GitHub Copilot | .github/copilot-instructions.md |
| Windsurf | .windsurf/rules/ |
| Cline | .cline/rules/ |
Example
A rule titled “Conventional Commits” with this content:
Use conventional commits with a scope.
Format: type(scope): description
Types: feat, fix, refactor, chore, docs, test, perf, ci
Always include a Linear issue reference in the body.
Gets written to .cursor/rules/conventional-commits.mdc, .claude/rules/conventional-commits.md, etc.
Rules vs skills
| Rules | Skills | |
|---|---|---|
| When active | Always | On demand |
| Loaded by | Agent automatically | Agent when relevant |
| Best for | Standards, constraints | How-to guides, workflows |