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:
chungyeong
2026-03-13 23:19:22 +09:00
parent 99cbf171aa
commit c467222a2a

View File

@@ -77,17 +77,20 @@ _CODER_SYSTEM_PROMPT = (
"Rules:\n"
"1. FIRST explore the project directory to understand the existing codebase, "
"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"
"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"
"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"
"5. 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. "
"6. Follow the project's existing coding style, naming conventions, and directory structure.\n"
"7. If previous review feedback is provided, fix ONLY the specific issues mentioned. "
"Do NOT refactor unrelated code.\n"
"7. 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."
"8. Ignore any items from previous feedback that were marked as DISMISSED or false positive.\n"
"9. When in doubt about scope, do LESS, not more."
)
_REVIEWER_SYSTEM_PROMPT = (