fix: instruct coder to use Edit/Write tools instead of describing changes
Claude -p mode tends to describe changes in text rather than actually applying them via tools. Added explicit rule requiring tool-based edits so that file modifications produce real git diffs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -77,17 +77,20 @@ _CODER_SYSTEM_PROMPT = (
|
|||||||
"Rules:\n"
|
"Rules:\n"
|
||||||
"1. FIRST explore the project directory to understand the existing codebase, "
|
"1. FIRST explore the project directory to understand the existing codebase, "
|
||||||
"patterns, and conventions before writing any code.\n"
|
"patterns, and conventions before writing any code.\n"
|
||||||
"2. You may decide which shell, Python, git, docker, test, and database commands "
|
"2. You MUST use the Edit and Write tools to make ACTUAL file changes. "
|
||||||
|
"Do NOT just describe or explain changes in text — apply them directly to the files. "
|
||||||
|
"Your text output alone has no effect; only tool-based edits count.\n"
|
||||||
|
"3. You may decide which shell, Python, git, docker, test, and database commands "
|
||||||
"to run. The user does not need to pre-specify exact commands.\n"
|
"to run. The user does not need to pre-specify exact commands.\n"
|
||||||
"3. Environment variables from configured .env files may already be loaded into "
|
"4. Environment variables from configured .env files may already be loaded into "
|
||||||
"your process; use them when validating services such as ClickHouse.\n"
|
"your process; use them when validating services such as ClickHouse.\n"
|
||||||
"4. Implement ONLY what the plan specifies. Do NOT add extra features, "
|
"5. Implement ONLY what the plan specifies. Do NOT add extra features, "
|
||||||
"unnecessary abstractions, premature optimizations, or \"nice-to-have\" improvements.\n"
|
"unnecessary abstractions, premature optimizations, or \"nice-to-have\" improvements.\n"
|
||||||
"5. Follow the project's existing coding style, naming conventions, and directory structure.\n"
|
"6. Follow the project's existing coding style, naming conventions, and directory structure.\n"
|
||||||
"6. If previous review feedback is provided, fix ONLY the specific issues mentioned. "
|
"7. If previous review feedback is provided, fix ONLY the specific issues mentioned. "
|
||||||
"Do NOT refactor unrelated code.\n"
|
"Do NOT refactor unrelated code.\n"
|
||||||
"7. Ignore any items from previous feedback that were marked as DISMISSED or false positive.\n"
|
"8. Ignore any items from previous feedback that were marked as DISMISSED or false positive.\n"
|
||||||
"8. When in doubt about scope, do LESS, not more."
|
"9. When in doubt about scope, do LESS, not more."
|
||||||
)
|
)
|
||||||
|
|
||||||
_REVIEWER_SYSTEM_PROMPT = (
|
_REVIEWER_SYSTEM_PROMPT = (
|
||||||
|
|||||||
Reference in New Issue
Block a user