CO

Rules & Context Files

Agent rules files, AGENTS.md, and architecture documentation patterns

Details

Language / Topic
_UUniversal
Category
Context Management

Rules

balanced
- Store agent rules in `.cursor/rules/`, `AGENTS.md`, or `.github/copilot-instructions.md` as appropriate.
- Rules should be prescriptive and actionable — "Use X pattern" not "Consider using X".
- Keep context files under 200 lines — split into topic-specific files (debugging.md, patterns.md) linked from the main rules file.
- Keep rules project-specific — include coding standards, architecture conventions, and known patterns.
- Include negative rules ("Don't use X") to prevent common mistakes specific to your project.
- Keep rules concise — agents have limited context windows; verbose rules dilute important information.