Fixing Opus 5: System Prompt Engineering for Precise Agents

IndyDevDango watch the original →

By moving from user-level tasking to a rigorous, law-like system prompt, you can force verbose models like Claude Opus 5 to adopt concise, senior-engineer communication patterns and eliminate wasteful token usage.

The Problem with 'Smartass' Models

State-of-the-art models like Claude Opus 5 are highly capable but suffer from extreme verbosity, unnecessary "load-bearing" filler phrases, and a tendency to perform unrequested refactors or scope creep. This behavior wastes expensive output tokens and creates a noisy, unproductive developer experience. The core issue is that these models are trained to be helpful at all costs, often prioritizing conversational fluff over technical precision.

The System Prompt as 'The Law'

Most developers focus exclusively on user prompts (the task at hand), but the real leverage lies in the system prompt. The system prompt acts as the "law" for every interaction, applying global constraints to every input and output. By treating the system prompt as a communication document between two senior engineers, you can enforce behavioral standards that persist across the entire session, effectively "distilling" the model's personality into a more useful tool.

Implementing Behavioral Constraints

To fix the model's output, you must implement both positive and negative patterns. Positive patterns include using plain language, stating facts exactly once, and matching the detail level to the request. Negative patterns involve explicitly banning specific "AI-isms" like "worth stating plainly," "load-bearing," or excessive em-dash chains. By explicitly listing these in the system prompt, you prevent the model from defaulting to its pre-trained, verbose persona.

Structural Efficiency with Reference Points and Aliases

To further reduce token churn, implement a system of reference points (e.g., D1 for decisions, R1 for risks, F1 for findings). This creates a shared, compressed language between the user and the agent, allowing for quick navigation of long responses. Additionally, defining "aliases" (e.g., ELI for "explain like I'm 18") allows you to trigger complex behavioral shifts with a single keyword, keeping the interaction flow fast and focused.

Enforcing Operational Boundaries

Finally, the system prompt must define hard operational boundaries. This includes explicit instructions to avoid scope creep, refactoring, or adding "co-author" credit to Git commits. By telling the agent to deliver only what was requested and nothing more, you reclaim control over the agent's autonomy and ensure it acts as a tool rather than an over-eager assistant.

  • #prompt-engineering
  • #agentic-engineering
  • #dev-tooling

summary by google/gemini-3.1-flash-lite. probably wrong about something. check the source.