Zero-setup scaffold for AI-assisted development with OpenCode.
This repo is designed around a simple insight: every AI coding session can waste 30 minutes figuring out project setup, conventions, and tooling — or it can just work. This workspace is that second option.
One git clone and you get a battle-tested structure where:
- AI agents know how to work here —
AGENTS.md,opencode.json, and.opencode/instructions/pre-load agents with workspace conventions, git workflow, and tooling so they don't guess. - Projects are isolated — each subfolder is its own independent git repo with its own language, framework, CI, and
AGENTS.md. Root level is scaffolding, not code. - CI/CD ships free — auto-PR on
feature/*/fix/*/bugfix/*push,main-from-developmentenforcement, and publish workflow templates. - Container-friendly —
./start.shrestoresghauth, SSH config, and local inference server on ephemeral container rebuild. - Opinionated git workflow — topic branches, no rebase, SemVer tags. Documented once, used by every agent.
| What | Why it matters |
|---|---|
AGENTS.md |
Tells any AI agent the workspace layout, tooling, and conventions |
opencode.json |
OpenCode config with local + cloud model presets |
.opencode/instructions/git-workflow.md |
Branch/PR/release conventions loaded automatically |
.github/workflows/ |
Auto-PR, main protection, CI/test/publish templates |
.pre-commit-config.yaml |
Pre-commit hooks (trailing whitespace, YAML, large files) |
start.sh |
Single‑command container bootstrap |
dev-requirements.txt |
Dev tool deps (pre-commit) |
Click the button above to launch a fully configured cloud dev environment in seconds. Codespaces comes with all tooling pre-installed — no local setup required.
git clone <repo-url>
cd <repo>
pip install -r dev-requirements.txt && pre-commit installTo spin up a new project, create a subfolder and give it its own AGENTS.md, language config, and CI. The root ignores it by default — you own it completely.
This repo uses OpenCode's instructions array to load AGENTS.md automatically in every session. Agents start knowing:
- Root is scaffolding, subfolders are standalone repos
- Pre-commit is the only root-level dev tool
- The git workflow (topic branches, no rebase, PR flow)
- CI workflows exist and which are functional vs placeholder
- Container is ephemeral —
./start.shrestores everything
No prompt preamble needed. Just start working.
All pushed branches follow the same path:
feature/fix/bugfix branch → PR → development → PR → main → SemVer tag
The auto-PR workflow opens a PR to development automatically whenever a feature/*, fix/*, or bugfix/* branch is pushed. The main branch accepts PRs only from development.
See .opencode/instructions/git-workflow.md for details.
- open-pr-to-development.yml — auto‑opens PR when pushing
feature/*,fix/*,bugfix/* - main-pr-source.yml — enforces that PRs to
mainoriginate fromdevelopment - CI — placeholder (replace with your test/lint commands)
- publish.yml — commented template for GHCR Docker image publishing
The dev container is ephemeral. After rebuild:
./start.shThis installs the local code-inference server and starts it in full isolation mode.
Fork or clone this repo and:
- Replace the CI workflow placeholders with your project's test/lint commands
- Add language-specific tooling to
dev-requirements.txt - Create your first project subfolder with its own
AGENTS.md - Set branch protection on
mainanddevelopment(GH repo settings) - Enable "Read and write permissions" for Actions (required for auto-PR workflow)
The default model is a local GGUF inference server (http://api:8000/v1). Cloud model aliases are pre-configured in opencode.json:
big-pickledeepseek-v4-flash-freemimo-v2.5-freenemotron-3-ultra-free
Switch with /model <name> in OpenCode.