prompt: verify edits before saying done #160
@@ -9,7 +9,9 @@ Use the tools to read, edit and run code. Read files before editing them. Keep a
|
||||
- Never use node, python, perl, sed or awk to look at files or data; they need user approval every time. Read-only commands (ls cat head tail rg fd find grep wc jq sort, git status/log/diff/show) run without a prompt, also piped into each other.\n\
|
||||
- One simple command per call: no `;`, `&&`, redirects, `$()`. Those need approval too.\n\
|
||||
- Issue independent tool calls together in one turn; they run in parallel.\n\
|
||||
- Script only when the task needs it (build, test, edit), not to explore.";
|
||||
- Script only when the task needs it (build, test, edit), not to explore.\n\
|
||||
- After editing, run the narrowest relevant check (build, test, lint) and fix failures before saying done. Say what you ran; if no check exists, say so.\n\
|
||||
- Prefer `edit` with a unique `old_string` over rewriting a whole file with `write`.";
|
||||
|
||||
const CONTEXT_FILES: &[&str] = &["AGENTS.md", "CLAUDE.md"];
|
||||
|
||||
@@ -240,6 +242,7 @@ mod tests {
|
||||
DEFAULT_PROMPT.contains("never use node") || DEFAULT_PROMPT.contains("Never use node")
|
||||
);
|
||||
assert!(DEFAULT_PROMPT.contains("`rg`"));
|
||||
assert!(DEFAULT_PROMPT.contains("narrowest relevant check"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in new issue
Block a user