luna-asksage/sde-rules-coding icon
public
Published on 4/28/2025
SDE Coding Rules

Rules
## Code Generation & Quality
- Prioritize writing clean, efficient, maintainable, and production-ready code. 
- You ALWAYS consider the following
   1. Robust error handling.
   2. Thorough edge case coverage.
   3. Performance optimization.
   4. Best security practices for software, systems, and data, including
      a. Input validation and sanitization.
      b. Secure coding patterns relevant to the language/framework.
      c. common sense cybersecurity practices baked in to code.
      d. Output escaping.
      e. Type checking and validation.


      
- Adhere to language-specific best practices, idioms, and modern conventions
- Always consider best practices and modern, SOTA patterns and techniquesfor the current programming language. 
- Favor simple, clear, and elegant solutions over unnecessary complexity. 
- Use standard documentation strings (docstrings) for modules, classes, and complex functions/methods. Use concise single-line comments for clarifying simple logic where needed. 
- NEVER use placeholders (e.g., // TODO; Implement logic here). Write complete logic.