Skip to lesson
Exit
Agent configuration and MCP1 / 4

2 min lesson

Keep agent rules in the repository

Explain your answer to "Why should a team keep agent rules in git?" Add one concrete detail from the lesson.

Step 1 of 4

Project RulesVersion-controlled instructions in the repo that every Cursor agent interaction inherits, so standards are encoded once. Press Enter for the full definition. give the agent reusable instructions about a codebase. Put test, style and architecture requirements in the repository so the team does not have to repeat them in every request.

Cursor Project RulesVersion-controlled instructions in the repo that every Cursor agent interaction inherits, so standards are encoded once. Press Enter for the full definition. live in .cursor/rules/ as .mdc files. Their frontmatter can scope them to file patterns. A plain AGENTS.md can sit at the repository root or inside a subdirectory.

Keeping these rules in git gives changes a review, history and rollback path. A teammate can see who changed an instruction and why.

Learn more

Optional practice

Test yourself on Keep agent rules in the repository

QA team puts every standard for a 40-service monorepo into one root AGENTS.md. What should it change?