AI Agent Behavior & Coding Standards
Defines coding standards and AI agent behavior rules for a project, emphasizing minimalism, clarity, modularity, and boundaries.
What this file does
Defines coding standards and AI agent behavior rules for a project, emphasizing minimalism, clarity, modularity, and boundaries.
When to use it
- Establishing AI agent coding conventions in a new project
- Enforcing YAGNI and DRY principles in team workflows
- Setting file modification restrictions for build directories
- Standardizing naming and modularity across a codebase
AI Agent Behavior & Coding Standards
1. Core Philosophy: Minimal & Essential
- YAGNI (You Ain't Gonna Need It): Write the minimum amount of code necessary to satisfy the requirements. Do not over-engineer or add "future-proofing" features unless explicitly asked.
- Conciseness: Avoid boilerplate. If a library or native function can do it, use that instead of writing custom logic.
2. Simplicity & Clarity
- Readability first: Write code that is easy for a human to understand immediately. Avoid complex one-liners or "clever" hacks.
- Naming: Use descriptive, verbose variable and function names (e.g.,
calculateTotalPriceinstead ofcalc).
3. Modularity
- Single Responsibility: Each function or component should do exactly one thing.
- File Structure: Break large files into smaller, specific modules.
- DRY (Don't Repeat Yourself): Extract repeated logic into shared utility functions immediately.
4. Boundaries
- Never modify files in the
/distor/builddirectories. - Only run tests using the
npm testcommand.
What's inside
4 sections covering core philosophy, simplicity, modularity, and boundaries with 8 bullet points.
Change this for your project
- Replace
npm testwith your own test command if different - Replace
/distor/buildwith your own output directories
Where it goes
Keep it in your repository where the agent or team that needs it will read it.
Related Documents
System Prompt
Defines the identity, capabilities, response style, and spec workflow for an AI assistant named Kiro that helps developers build features incrementally.
World Engine AI Coding Instructions
Defines game scope, architecture, ESLint rules, git workflow, and open-source research policy for a strategic fantasy RPG project.
GitHub Copilot Instructions
Defines coding standards, architecture rules, PR expectations, and output format for a Laravel + Inertia + Vue 3 project.
Business Intelligence Dashboard - Comprehensive GitHub Copilot Instructions
Defines the full stack, setup commands, security rules, and testing strategy for a Next.js SaaS analytics platform with multi-tenant isolation.