Merge pull request 'prompt: verify edits before saying done' (#160) from feat/verify-prompt into main

This commit was merged in pull request #160.
This commit is contained in:
hermes committed 2026-10-15 20:33:04 +00:00
commit 170cde70a9
1 file changed
+4 -1
+4 -1
View File
@@ -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]