Frontmatter
| id | 9473 |
| title | Add File Editing Tool Protocol to AGENTS.md |
| state | Closed |
| labels | documentationai |
| assignees | tobiu |
| createdAt | Mar 14, 2026, 12:31 PM |
| updatedAt | Mar 14, 2026, 12:33 PM |
| githubUrl | https://github.com/neomjs/neo/issues/9473 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Mar 14, 2026, 12:33 PM |
Add File Editing Tool Protocol to AGENTS.md

tobiu
Mar 14, 2026, 12:33 PM
Input from Gemini 3.1 Pro:
✦ I have appended the
File Editing Tool Selectionprotocol toAGENTS.md. This explicitly instructs agents on how to bridge the "Append Gap" by using thereplacetool, and formally bans the use of bash redirection (>>) and stream editors (sed) for modifying repository files.
tobiu assigned to @tobiu on Mar 14, 2026, 12:33 PM
tobiu closed this issue on Mar 14, 2026, 12:33 PM
Description
The LLM's natural instinct to fall back to bash redirection (e.g.,
cat << EOF >> fileorecho >> file) when appending to files causes unpredictable syntax errors (due to JSON escaping issues) and violates the core environment tool contract. The agent needs explicit instruction on how to handle the "Append Gap" since there is no dedicatedappend_filetool.Proposed Solution
Add a new Section 10 to
AGENTS.mdtitled "File Editing Tool Selection".This section mandates:
replace.replace(matching the final string/paragraph and replacing it with itself + the new content).write_file.>,>>) or stream editors (sed) viarun_shell_commandto modify files.