This file defines coding style and design preferences for all AI Coding Agents (e.g., Gemini, Claude Code, Copilot).
Goal: produce code that is clear to humans and consistent for machines.
- Code must be readable by humans and regular for machines.
- Prefer clarity over cleverness.
- Naming must be explicit, avoid metaphors or hidden meaning.
- Consistency is more important than abstraction depth.
- Every layer of abstraction must provide clear value.
- Documentation (docstrings, comments) must capture purpose and usage, not just repetition.
- Avoid unnecessary duplication, but also avoid over-abstraction that hides logic.
- Always provide type hints and structured metadata (docstrings, schema).
- Specs and requirements must be preserved in code as structured reference (comments or annotations).
- Treat code as a shared medium between humans and AI; prefer explicitness over style.
- Always generate consistent formatting (follow language community conventions).
- Use docstrings + type hints for all public functions, classes, and modules.
- Keep function length moderate; split if exceeding ~50 lines.
- Avoid one-letter or context-free variable names.
- Keep imports explicit; avoid import *.
- Write comments for why, not for what.
- Avoid hidden "clever" tricks; prefer straightforward implementations.
- Prefer deterministic and reproducible outputs.