16. OpenCode as Primary AI-Assisted Development Environment¶
Date: 2026-02-19
Status¶
Draft (Revised)
Context¶
SMUNZ and OpsDev.NZ development work involves: - Python CLI tool development (yalh-opsdevnz, specmaint-opsdevnz, etc.) - Infrastructure automation and configuration - Documentation and specification writing - Limited human capacity (single developer with AI assistance)
We need an AI-assisted development environment that: - Supports multiple AI model providers - Allows cost-effective model selection - Integrates well with our Linux-based development workflow - Can be extended for our specific needs
Decision¶
We will use OpenCode IDE as our primary AI-assisted development environment.
What is OpenCode?¶
OpenCode is an open-source IDE that provides: - AI assistant integration via the Zen service - Access to multiple model providers (free and paid) - Terminal integration for development commands - Extensibility for custom workflows
Why OpenCode?¶
| Factor | OpenCode Advantage |
|---|---|
| Cost flexibility | Free tier models available; pay only when needed |
| Model variety | Multiple providers through Zen service |
| Open source | Can audit, extend, and contribute |
| Linux support | Works well on our Fedora/AlmaLinux workstations |
| Simplicity | Single environment for AI-assisted coding |
Model Selection¶
We use models based on task requirements, not fixed assignments:
- Routine development: Free models through Zen (current example: GLM variants)
- Sensitive work: Privacy-focused paid models (Anthropic, etc.)
- Sponsor collaboration: Sponsor-preferred platforms
Organisational AI usage policies govern model selection criteria for sensitive work.
Alternatives Considered¶
| Alternative | Why Not Chosen |
|---|---|
| Continue with ChatGPT Pro | Personal account; organizational work should use organizational tools |
| Cursor IDE | Proprietary; less flexibility in model selection |
| GitHub Copilot | Subscription cost; limited model options |
| VS Code + extensions | More configuration overhead; multiple extension ecosystems |
| Command-line only | Less integrated experience; higher friction for routine work |
Consequences¶
Positive¶
- Single development environment for AI-assisted work
- Cost flexibility: free models for routine work, paid when needed
- Open source: can contribute improvements back
- Good Linux support for our workstation environment
- Simplified toolchain (one IDE for AI-assisted development)
Negative¶
- Newer tool with smaller ecosystem than VS Code
- Free model availability may change over time
- Learning curve for team members unfamiliar with the tool
Mitigations¶
- Document workflows and best practices
- Maintain fallback options (VS Code, command-line tools)
- Monitor free tier availability and adjust as needed
Implementation¶
- OpenCode installed on development workstations
- Zen service configured with available free models
- API keys managed via 1Password +
op_opsdevnztool - Team documentation updated with OpenCode workflows
- Annual review of platform effectiveness
Related Documents¶
- ADR #15: Evaluate AI Coding Platform for Development Productivity
- Organisational AI usage policies govern tool selection and model choice