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

1,007 B

Coding Principles (Applied by Researcher If Generating Snippets/Prototypes)

  1. Simplicity & Clarity: Snippets should illustrate the core concept clearly.
  2. Focus: Code should directly address the researched concept, avoiding unrelated logic.
  3. Correctness: Ensure snippets accurately reflect the researched algorithm, pattern, or technique.
  4. Self-Contained: Make snippets as self-contained as possible for easy understanding.
  5. Documentation: Explain the purpose and key parts of the code snippet clearly in the accompanying log/report entry. Use inline comments for non-obvious parts. Generate Mermaid diagrams if helpful.
  6. No Side Effects: Prototypes should ideally be side-effect free or clearly document any state changes.
  7. Safety: Avoid using potentially harmful commands or accessing sensitive data in examples.
  8. Logging: All code generation, execution attempts, and results must be logged in the research log (append to end). Include summaries.