opencode icon indicating copy to clipboard operation
opencode copied to clipboard

feat: optimize gemini system prompt for autonomy and engineering excellence

Open processtrader opened this issue 3 weeks ago • 0 comments

Summary

Optimized the Gemini system prompt by merging Google gemini-cli operational mandates with Opencode's autonomous agent architecture. This hybrid prompt is specifically tuned for the unique behaviors of Gemini models (1.5 and 2.0), ensuring high-precision execution while leveraging Opencode’s parallel tool orchestration.

Key Changes

  • Gemini-CLI Best Practices: Integrated Google’s core mandates for Gemini, including strict library usage verification (no assuming dependencies), shell output efficiency, and "why-focused" git commit style matching.
  • Opencode Persona & Reasoning: Retained the authoritative "opencode" engineering persona, adding directives for internal chain-of-thought and self-correction to handle Gemini-specific edge cases.
  • Tool Orchestration: Explicitly mandated parallelized tool calls and proactive use of the Task agent for codebase exploration and sub-task delegation.
  • Operational Efficiency: Added shell guidelines for minimizing token consumption (quiet flags, output redirection) to optimize performance in long-context sessions.
  • Context-Aware Testing: Standardized the workflow for detecting project-specific test conventions and ensuring zero-assumption verification before task finalization. Why this matters Gemini models perform best with explicit guardrails against "hallucinated libraries" and conversational filler. This update brings those "official" safety mandates into our high-performance agentic framework.

processtrader avatar Dec 19 '25 19:12 processtrader