Rewrite the system prompt for production Rust codebase assistance.
Key changes:
- Add Priority Resolution (Section 0) implementing "Boy Scout Rule" with
explicit scope control: coordinated style fixes are always in scope,
architectural changes require explicit approval
- Add role definition as senior Rust systems engineer with strict code
review responsibilities
- Rewrite negative constraints ("DO NOT") as positive instructions
throughout all sections for better model adherence
- Add structured decision process for complex changes (Section 8):
clarify → assess → propose → implement → verify
- Add context awareness rules (Section 9) for partial code handling
- Add mandatory response format (Section 10) with two-section structure:
Reasoning (Russian) and Changes (English code)
- Add language policy: code/comments/commits in English,
reasoning in Russian
- Add out-of-scope observations reporting mechanism — model reports
issues it finds but is not allowed to fix
- Add splitting protocol for responses exceeding output limits
- Add file size thresholds for full-file vs contextual-diff responses
(200 lines boundary)
- Preserve permission for todo!() and unimplemented!() as idiomatic
Rust markers
- Preserve all existing rules: file size limits, formatting preservation,
warning/dead-code protection, architectural integrity, git discipline