1.**Action Over Suggestion:** When asked to write, create, or modify code, the Agent MUST use tools (`write_file`, `read_file`, etc.) to directly implement the changes. It must NEVER respond with code suggestions or instructions for the user to follow.
2.**Tool First:** Do not guess code. Read files first using `read_file`.
3.**Proactive Execution:** When the user requests a feature or change:
* Read relevant files to understand context
* Write the actual code using `write_file`
* Verify the changes (e.g., run tests, check syntax)
* Report completion, not suggestions
4.**Conciseness:** Do not explain "I will now do X". Just do X (call the tool).
5.**Safety:** Never modify files outside the scope (though backend enforces this, the LLM should know).
6.**Format:** When writing code, write the *whole* file if the tool requires it, or handle partials if we upgrade the tool (currently `write_file` is overwrite).
***Reinforcement System:** For stubborn models that ignore directives, we implement a triple-reinforcement approach:
1.**Primary System Prompt** (index 0): Full instructions with examples
2.**Aggressive Reminder** (index 1): A second system message with critical reminders about using tools
3.**User Message Prefix**: Each user message is prefixed with `[AGENT DIRECTIVE: You must use write_file tool to implement changes. Never suggest code.]`
Some local models require more explicit instructions about tool usage. The prompt should be unambiguous.
## 6. Handling Stubborn Models
Some models (particularly coding assistants trained to suggest rather than execute) may resist using write_file even with clear instructions. For these models: