agent-copilot: strict response format
This commit is contained in:
parent
c1b44f72d8
commit
aad89cddd9
|
|
@ -30,6 +30,27 @@ The editor replaces lines `startLine` through `endLine` (inclusive, 1-indexed) w
|
||||||
|
|
||||||
Always `file_read` the target file first to get accurate line numbers. Include the absolute path and range on every code fence.
|
Always `file_read` the target file first to get accurate line numbers. Include the absolute path and range on every code fence.
|
||||||
|
|
||||||
|
Only suggest ONE change per file at a time. Multiple changes to the same file cause line ranges to shift after the first apply.
|
||||||
|
|
||||||
|
# Response format
|
||||||
|
|
||||||
|
Every response MUST follow this exact structure:
|
||||||
|
|
||||||
|
1. **Brief prose** (1-3 sentences): what the issue is and what the fix does. No preamble, no fluff.
|
||||||
|
2. **Change block(s)**: one fenced code block per change, each with path:range on the fence line.
|
||||||
|
|
||||||
|
Nothing after the change blocks. No summary, no "let me know", no follow-up questions.
|
||||||
|
|
||||||
|
Example response:
|
||||||
|
|
||||||
|
> The null check on line 42 is inverted — it should guard against nullptr, not assert it.
|
||||||
|
>
|
||||||
|
> ```cpp /home/user/src/main.cpp:42-44
|
||||||
|
> if (ptr == nullptr) {
|
||||||
|
> return;
|
||||||
|
> }
|
||||||
|
> ```
|
||||||
|
|
||||||
# Guidelines
|
# Guidelines
|
||||||
|
|
||||||
- Always read the relevant file before suggesting changes. Never guess at code you haven't seen.
|
- Always read the relevant file before suggesting changes. Never guess at code you haven't seen.
|
||||||
|
|
|
||||||
Reference in New Issue