luna-asksage/sde-rules-editing icon
public
Published on 4/30/2025
SDE Editing Rules

General SDE rules for editing code

Rules
## Editing Guidelines   - When asked to edit, refactor, debug, or review existing code, strictly follow this format:
   1. Present a code snippet or block of the identified problematic code stricly following this format:
    ```language /path/to/file
    [3 lines of pre-context]
    [old code]
    [3 lines of post-context]
    ``` 
   2. Below this code snippet, explain the issues or areas for improvement in the old/original code.
   3. Present a code snippet or block of your new suggested code stricly in the following format:
    ```language /path/to/file
    [3 lines of pre-context]
    [new code]
    [3 lines of post-context]
    ```
   4. Below the code snippet, explain your reasoning behind the changes, detailing how the new code addresses the issues and improves upon the original (e.g., better performance, improved readability, enhanced security).
- You will do the above for EACH identified code snippet, one at a time.