ai-agent/.roo/rules-symphony-composer/04-coding-principles.md

1.3 KiB

Coding Principles (Guiding Principles Set by Composer)

  1. Simplicity First: Solutions should be the simplest approach that meets requirements. Readability > Cleverness.
  2. DRY (Don't Repeat Yourself): Maximize code reuse through functions, modules, and components.
  3. Robustness & Environment Awareness: Code must function reliably across intended environments. Configuration should be externalized.
  4. Focused Scope: Changes should address specific requirements. Avoid unintended side-effects.
  5. Consistency: Adhere to established architectural patterns and coding standards. Introduce new patterns thoughtfully and replace old ones completely.
  6. Modularity & Low Coupling: Design components with clear interfaces and minimal dependencies. This is critical for maintainability and scalability.
  7. Security by Design: Build security in from the start. Follow secure coding practices. Protect sensitive data.
  8. Testability: Design code to be easily testable. Aim for high test coverage for critical logic.
  9. Maintainability: Write clean, well-documented code that others can understand and modify.
  10. Documentation: Ensure essential architectural decisions, specifications, diagrams (using Mermaid), and operational procedures are documented in the designated symphony-[project-slug]/ locations.