Complete guide to set up and use AI agent rules in your projects
.zip archiveExample: TYPESCRIPT.zip, PYTHON.zip, RUST.zip, etc.
.zip file.zip file (auto-extracts)unzip TYPESCRIPT.zip -d /path/to/your/project/
After extraction, you'll have 7 files:
AGENTS_RULES.md is the complete documentation that AI agents must read first.
Cursor automatically reads .cursorrules on project load. Then say:
Please read AGENTS_RULES.md completely before we start coding.
@workspace Please read the following files in order:
1. AGENTS_RULES.md (complete rules)
2. AGENTS.md (quick reference)
3. CONTRIBUTING.md (workflow)
Read them completely before we start coding.
AGENTS_RULES.mdAGENTS.mdCONTRIBUTING.mdI've attached AI agent configuration files for [LANGUAGE].
Please read AGENTS_RULES.md completely before we start coding.
This file contains:
- TDD/DDD workflow
- Language-specific best practices
- Git rules
- Testing requirements (90% coverage)
- Code quality principles
Confirm you've read and understood the rules before we proceed.
Before we start coding, please read these files in my project:
1. AGENTS_RULES.md - Complete AI agent rules (READ THIS FIRST)
2. AGENTS.md - Quick reference
3. CODE_QUALITY_PRINCIPLES.md - Quality guidelines
4. CONTRIBUTING.md - Contribution workflow
Key points to remember:
- Follow TDD (Test-Driven Development)
- Write tests first (Red-Green-Refactor)
- Maintain 90% code coverage minimum
- NEVER use git stash, git push, or git push --force
- ALWAYS ask for approval before committing
- Use conventional commit format: <type>(agt): <description>
Confirm you understand before we start.
After the AI confirms, ask:
What are the key rules you must follow?
Once the AI confirms understanding, you can start:
Let's implement [FEATURE].
Remember to follow the TDD workflow from AGENTS_RULES.md.
Let's implement [FEATURE] following TDD.
Please create a todo-list first.
Please re-read AGENTS_RULES.md, especially the [SECTION] part.
Review the Git Workflow section in AGENTS_RULES.md.
Prepare a commit but wait for my approval.
I've downloaded and extracted TYPESCRIPT.zip in my project.
Please read AGENTS_RULES.md completely before we start.
I've read AGENTS_RULES.md. Key points understood:
- TDD workflow (Red-Green-Refactor)
- Write tests first, 90% coverage minimum
- TypeScript best practices (no any, explicit types, Result pattern)
- Git rules (no stash/push, ask approval)
- Conventional commits
Ready to start. What would you like to implement?
Let's implement user authentication. Create a todo-list first.
Todo-list for user authentication:
1. [ ] Write acceptance test for user registration
2. [ ] Implement User domain model
3. [ ] Write unit tests for password hashing
4. [ ] Implement authentication service
5. [ ] Write integration tests
6. [ ] Verify 90% coverage
Shall I proceed?
You're not following the rules from AGENTS_RULES.md.
Please re-read the [SECTION] section and try again.
STOP! According to AGENTS_RULES.md, you must NEVER commit without my approval.
Please revert and ask for approval first.
You skipped writing tests first. According to AGENTS_RULES.md,
we follow TDD: write failing tests BEFORE implementation.
Let's start over with the test.
This code violates CODE_QUALITY_PRINCIPLES.md.
Please review the [PRINCIPLE] section and refactor.
AGENTS_RULES.md completelyRemember: The AI agent must read AGENTS_RULES.md completely before starting any work. This ensures consistent, high-quality code following TDD and DDD principles. ๐ฏ