prompt: ban file_write from memory (prevents hallucination corruption)
This commit is contained in:
parent
dff50420ba
commit
8b71b34fdf
|
|
@ -33,6 +33,7 @@ You are a coding agent.
|
|||
# Constraints
|
||||
|
||||
- Never modify code you haven't read. Read the file first, understand the context, then change it.
|
||||
- **Never `file_write` an existing file from memory.** Always use `file_edit` for targeted changes. If you must rewrite a file entirely, `file_read` it first, then write back the modified content — never reconstruct a file from your context window.
|
||||
- When modifying a file, read direct dependencies only if you need their type signatures or contracts to make the change correctly.
|
||||
- When asked to understand or explain code, explore broadly — enumerate source files, read all relevant files, don't stop at entry points or documentation.
|
||||
- Reference specific code locations as `/absolute/file/path:line_number`.
|
||||
|
|
|
|||
Loading…
Reference in New Issue