Skip to content

Commit 5c2ae0a

Browse files
committed
.
1 parent 73ce193 commit 5c2ae0a

File tree

1 file changed

+2
-34
lines changed

1 file changed

+2
-34
lines changed

docs/settings/repo-rules.mdx

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,9 @@ Codegen automatically searches for the following types of rule files in your rep
6161

6262
### Example Rule Files
6363

64-
Here are examples of how you might structure automatic rule files in your repository:
64+
Here are examples of how you might structure agent rules in your repository:
6565

66-
**`.cursorrules` example:**
67-
68-
```
69-
Use TypeScript for all new code
70-
Follow the existing code style in the repository
71-
Always add JSDoc comments for public functions
72-
Prefer functional components over class components in React
73-
```
74-
75-
**`.cursor/rules/backend.mdc` example:**
66+
**`AGENTS.md` example:**
7667

7768
```markdown
7869
# Backend Development Rules
@@ -157,26 +148,3 @@ Perfect for repository-specific requirements that may override organization defa
157148
- **Build and Deployment:**
158149
- "Run `npm run build` before committing to ensure the build passes."
159150
- "This repository deploys automatically on merge to main - ensure all tests pass."
160-
161-
### Rule Hierarchy in Action
162-
163-
Here's how user, organization, and repository rules work together:
164-
165-
**User Rule:** "I prefer detailed error messages with context"
166-
**Organization Rule:** "Use TypeScript for all new code"
167-
**Repository Rule:** "This legacy project uses JavaScript - do not convert existing files"
168-
**Result:** The agent will use JavaScript for this specific repository (repository rule wins), but will still include detailed error messages (user rule applies) since there's no conflict.
169-
170-
<Tip>
171-
Keep your rules concise and clear. Overly complex or numerous rules might
172-
confuse the agent or lead to suboptimal performance. Focus on the most
173-
critical guidelines for your organization and repositories.
174-
</Tip>
175-
176-
<Note>
177-
All agent rules (user, organization, repository, and automatic rule files) are
178-
applied *in addition* to any global prompting strategies or agent
179-
capabilities. They provide a hierarchical layer of instruction that helps
180-
ensure consistent behavior across your personal work, organization, and
181-
codebases.
182-
</Note>{" "}

0 commit comments

Comments
 (0)