Back to .md Directory

AI Agent Behavior & Coding Standards

Defines coding standards and AI agent behavior rules for a project, emphasizing minimalism, clarity, modularity, and boundaries.

May 2, 2026
0 downloads
1 views
ai agent
View source

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., calculateTotalPrice instead of calc).

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 /dist or /build directories.
  • Only run tests using the npm test command.

What's inside

4 sections covering core philosophy, simplicity, modularity, and boundaries with 8 bullet points.

Change this for your project

  • Replace npm test with your own test command if different
  • Replace /dist or /build with 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