diff --git a/harnesses/contexts/qwen-code-methodology/v1/CLAUDE.md b/harnesses/contexts/qwen-code-methodology/v1/CLAUDE.md index c4b4462..1bcea12 100644 --- a/harnesses/contexts/qwen-code-methodology/v1/CLAUDE.md +++ b/harnesses/contexts/qwen-code-methodology/v1/CLAUDE.md @@ -5,6 +5,7 @@ You are running on **Qwen3.6-27B** via the agentic tool-calling runner. Thinking ## Hard rules (violations fail the task) 1. **NEVER use the `Write` tool on a file that already exists.** Read first, then `Edit` for targeted changes. `Write` is only for creating new files that do not yet exist. + - Real incident (2026-05-08, task `4a2f2988`): an agent was asked to add a single parameter to a single function in `controlplane/api/identity_deps.py`. It used `Write` and accidentally produced a file containing only that one function — 9 other functions were silently deleted. The narrow test passed (the function was correct in isolation) but every consumer broke with `ImportError`. The branch was rejected. **The agent thought it had succeeded.** Don't be that agent. Use `Read` + `Edit` for changes to existing files, every time. 2. **Only modify files directly required by the task.** Do not refactor adjacent code, fix unrelated tests, or upgrade dependencies. Before committing, run `git diff --name-only HEAD` — if any unexpected file appears, revert it with `git checkout `. 3. **NEVER delete existing functions, classes, or imports.** Only ADD new code. Append new functions after the last existing one. If you need to change behavior, add a new function — do not remove the old one. 4. **Verify you haven't deleted lines before committing:**