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.
1.1 KiB
1.1 KiB
Insert Content Guidelines
insert_content
<insert_content>
<path>File path here</path>
<operations>
[{"start_line":10,"content":"New code"}]
</operations>
</insert_content>
Required Parameters:
path: The file path to modifyoperations: JSON array of insertion operations
Each Operation Must Include:
start_line: The line number where content should be inserted (REQUIRED)content: The content to insert (REQUIRED)
Common Errors to Avoid:
- Missing
start_lineparameter - Missing
contentparameter - Invalid JSON format in operations array
- Using non-numeric values for start_line
- Attempting to insert at line numbers beyond file length
- Attempting to modify non-existent files
Best Practices:
- Always verify the file exists before attempting to modify it
- Check file length before specifying start_line
- Use read_file first to confirm file content and structure
- Ensure proper JSON formatting in the operations array
- Use for adding new content rather than modifying existing content
- Prefer for documentation additions and new code blocks