NOTE:
On current implementation, Opencode is not usable. Some of the codes are missing from the github. According to the author, the code need to be pushed into the main repo so the template can be working.
Second, Opencode refused to auto-submit to GIT making the journey broken. I was forced to commit a whole bunch of changes in the end of a run. Let’s just wait.
TL;DR:
- Install prerequisites: Opencode CLI, Astral UV, Git.
- Initialize a new Spec Kit project.
- Verify Opencode configuration.
- Use Spec Kit commands in Opencode CLI for spec-driven development.
Step-by-Step Integration Guide
Step 1: Initialize Spec Project
Create a new project directory with GitHub Spec Kit configured for Opencode CLI.
Option A: New Project Directory
uvx --from git+https://github.com/aemr3/spec-kit.git specify init --ai opencode <PROJECT_NAME>
cd <PROJECT_NAME>
Replace <PROJECT_NAME>
with your desired project name.
Option B: Current Directory
Initialize Spec Kit in your current directory.
uvx --from git+https://github.com/aemr3/spec-kit.git specify init --ai opencode --here
Step 2: Verify Configuration
After initialization, verify the setup.
ls -la
opencode config list
ls -la AGENTS.md
Step 3: Test Integration
Launch Opencode CLI and test Spec Kit commands.
opencode
/specify Create a simple web application with user authentication
/plan Use React for frontend, Node.js for backend, PostgreSQL for database
/tasks
Usage Examples
Basic Spec Creation
Create a simple spec and generate a plan.
/specify Build a REST API for user management with authentication
/plan Use FastAPI for backend, PostgreSQL for data, JWT for auth
/tasks
Advanced Research Integration
Research technologies first, then plan a complex system.
/specify Create a microservices architecture for an e-commerce platform
/plan Research Kubernetes deployment, service mesh, API gateway
Constitution Compliance
Check if your spec follows simplicity rules.
/specify Build a monolithic application with 6 services
The system warns about complexity and suggests fewer services.