diff --git a/packages/coding-agent/src/prompts/tools/hashline.md b/packages/coding-agent/src/prompts/tools/hashline.md index d8380db46..8b32ac857 100644 --- a/packages/coding-agent/src/prompts/tools/hashline.md +++ b/packages/coding-agent/src/prompts/tools/hashline.md @@ -8,12 +8,21 @@ Purely textual format. The tool has NO awareness of language, indentation, brack @@ PATH header: subsequent ops apply to PATH +Each op line is ONE of: + ANCHOR insert lines AFTER the anchored line (or EOF); payload follows as `{{hsep}}TEXT` lines < ANCHOR insert lines BEFORE the anchored line (or BOF); payload follows as `{{hsep}}TEXT` lines - A..B delete the line range (inclusive). = A..B replace the range with payload `{{hsep}}TEXT` lines, or with one blank line if no payload follows. + +Op lines carry no content — payload goes on the next line. + +WRONG: + 5pg| some code +RIGHT: + 5pg + {{hsep}} some code + + - Every line of inserted/replacement content MUST be emitted as a payload line starting with `{{hsep}}`. - `{{hsep}}` is syntax, not content. The inserted text begins after the first `{{hsep}}`; use a bare `{{hsep}}` to insert a blank line.