Template to bootstrap projects with Spec-Driven Development and AI agents on OpenCode.
A template to kickstart projects with Spec-Driven Development on OpenCode. It consists of:
| Piece | Description |
|---|---|
templates/ |
Generic skeleton with the full SDD system: agents, commands, constitution, and feature templates. Ready to copy into a new project. |
scaffold.sh |
Interactive script that copies the template to a directory, asks for name/description, and replaces placeholders. |
SDD (Spec-Driven Development) is a workflow where you design first, then agents execute. Before writing code, you create a specification that defines what to build, why, and how to verify it.
/sdd:spec-create "description" → creates the spec
↓
review and edit the spec manually
↓
/sdd:spec-implement NNN → agent implements
↓
code-writer implements → code-reviewer reviews → you see the report
↓
you decide: apply improvements? mark as implemented?
| Command | What it does |
|---|---|
/sdd:init |
Initializes the SDD system: fills in constitution, AGENTS.md, and opencode.json |
/sdd:spec-create "desc" |
Creates a new feature specification |
/sdd:spec-implement NNN |
Implements a feature (code-writer → code-reviewer → report) |
/sdd:status |
Shows project progress |
/sdd:constitution [section] |
Queries the project constitution |
/question "question" |
Contextual tutor to learn while building |
| Agent | Role |
|---|---|
sdd-agent |
Orchestrator: coordinates the SDD workflow |
code-writer |
Implements features according to the spec |
code-reviewer |
Reviews code against the spec and constitution |
tutor |
Explains concepts and project code |
You design, agents execute. The constitution sets immutable rules that agents must follow. You make the decisions; agents execute them and report back.
curl -fsSL https://raw.githubusercontent.com/maavcode/opencode-sdd-template/main/scaffold.sh | bashOn Windows, bash is not available natively. Use one of these:
Option A — Git Bash (recommended, included with Git for Windows):
curl -fsSL https://raw.githubusercontent.com/maavcode/opencode-sdd-template/main/scaffold.sh | bashOption B — Clone the repo, then run scaffold.sh from Git Bash:
git clone https://github.com/maavcode/opencode-sdd-template.git
cd opencode-sdd-template
./scaffold.shIt will ask you:
- Where to create the project
- Template language (English or Spanish)
- Project name and description
After that, just open OpenCode in that directory and run /sdd:init to finish configuring it.
The template is available in two languages:
- en-template — everything in English (AGENTS, agents, commands, constitution)
- es-template — agents and commands in English, documentation and placeholders in Spanish
Both are functionally identical. The script will let you choose when you run it.
opencode-sdd-template/
├── README.md
├── LICENSE
├── .gitignore
├── scaffold.sh
└── templates/
├── en-template/ # English template
│ ├── AGENTS.md
│ ├── opencode.json
│ └── .opencode/
│ ├── agents/ # 4 agents (code-writer, code-reviewer, sdd-agent, tutor)
│ ├── commands/ # 6 commands (question + 5 sdd/ commands)
│ └── sdd/ # Specification system
│ ├── README.md
│ ├── constitution/ # mission, tech-stack, roadmap
│ └── features/
│ └── 000-template-task/ # Feature template
└── es-template/ # Spanish template (same structure)
AGENTS.md — instructions for the main agent. Defines stack, commands, structure, and SDD workflow.
opencode.json — OpenCode configuration. Points instructions to AGENTS.md and the constitution.
.opencode/agents/ — 4 specialized agents:
sdd-agent— orchestrator of the SDD workflowcode-writer— implements features following the speccode-reviewer— reviews code against spec and constitutiontutor— explains concepts using real project code
.opencode/sdd/constitution/ — immutable project rules:
mission.md— what we build, who it's for, principles, constraintstech-stack.md— technologies, structure, commands, conventionsroadmap.md— Implemented, In Review, To Do, Next, Backlog
.opencode/sdd/features/000-template-task/ — template for new features:
spec.md— what, why, acceptance criteria, out of scopeplan.md— approach, implementation, decisions, riskstasks.md— atomic, ordered tasks
MIT © Mario Aguilar Avila (@maavcode)