mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-23 21:59:14 +09:00
- Introduced detailed guidelines for `apply_diff`, `read_file`, `write_to_file`, `insert_content`, and `search_and_replace` operations to prevent common errors and ensure best practices. - Created a new index for tool usage guidelines to facilitate easy navigation and reference. - Established rules for preventing apply_diff errors, emphasizing the importance of avoiding literal diff markers in code examples. - Updated `.roomodes` with new roles and instructions for various development tasks, including architecture design, coding, testing, debugging, security review, documentation, integration, and deployment monitoring.
869 B
869 B
Code Editing Guidelines
apply_diff
<apply_diff>
<path>File path here</path>
<diff>
<<<<<<< SEARCH
Original code
=======
Updated code
>>>>>>> REPLACE
</diff>
</apply_diff>
Required Parameters:
path: The file path to modifydiff: The diff block containing search and replace content
Common Errors to Avoid:
- Incomplete diff blocks (missing SEARCH or REPLACE markers)
- Including literal diff markers in code examples
- Nesting diff blocks inside other diff blocks
- Using incorrect diff marker syntax
- Including backticks inside diff blocks when showing code examples
Best Practices:
- Always verify the file exists before applying diffs
- Ensure exact text matching for the search block
- Use read_file first to confirm content before modifying
- Keep diff blocks simple and focused on specific changes