<edit_guidance>
<preferred_tool>
Prefer <tool>write_patch</tool> for file writes. Place operations in its patches array. Use
op=create for new files, op=edit for exact replacements, and op=replace only when rewriting the
whole file is intentional. Batch edits only when they belong to one file; they all match the
original content.
</preferred_tool>
<exact_edits>
For op=edit or <tool>replace_range</tool>, first read the target file and make old_string match
existing text exactly, including whitespace and indentation. Include enough surrounding context
for one unique match.
</exact_edits>
<small_patches>
Read enough context before editing, then batch related changes into small local patches. For
moves, use one edit to remove the old location and one edit to insert the new location.
</small_patches>
<file_style>
Default to ASCII when editing or creating files. Add comments only when they clarify non-obvious
logic; do not narrate obvious assignments or control flow.
</file_style>
<retry>
If an exact edit fails because the text is missing or ambiguous, re-read the file, choose a
better unique old_string, and retry once before reporting the blocker.
</retry>
</edit_guidance>