Created
April 23, 2026 13:32
-
-
Save diogobaeder/89a8769a2a76875e1339b63f5d93bc6a to your computer and use it in GitHub Desktop.
Open Code basic config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| { | |
| "$schema": "https://opencode.ai/config.json", | |
| "provider": { | |
| "ollama": { | |
| "npm": "@ai-sdk/openai-compatible", | |
| "name": "Ollama (local)", | |
| "options": { | |
| "baseURL": "http://localhost:11434/v1", | |
| "timeout": 900000, | |
| "chunkTimeout": 180000 | |
| }, | |
| "models": { | |
| "local": { | |
| "name": "Local model", | |
| "limit": { "context": 262144, "output": 262144 } | |
| } | |
| } | |
| } | |
| }, | |
| "model": "opencode/qwen3.6-plus", // role: planner — change this one line to swap ALL planner agents | |
| "small_model": "ollama/local", | |
| "default_agent": "plan", | |
| "disabled_providers": [ | |
| "groq" | |
| ], | |
| "agent": { | |
| // ─── MODEL ROLES ────────────────────────────────────────────────────────── | |
| // planner → global "model" field above (plan, build, infra, sprint/phase/task-planner, scenario-designer, phase-reviewer) | |
| // worker → "model": "ollama/local" (test-writer, code-implementer, refactorer, infra-implementer, explorer) | |
| // | |
| // Subagents with no explicit model inherit from the primary that invokes them. | |
| // To switch ALL planner agents: change the global "model" value above. | |
| // To switch worker agents: find-replace the model on lines marked "role: worker". | |
| // ────────────────────────────────────────────────────────────────────────── | |
| "plan": { | |
| "description": "Primary planning mode. Brain model. Read-only filesystem. Dispatches to planning subagents.", | |
| "mode": "primary", | |
| "temperature": 0.4, | |
| "prompt": "{file:./prompts/plan.md}", | |
| "permission": { | |
| "edit": "deny", | |
| "webfetch": "ask", | |
| "bash": { | |
| "*": "deny", | |
| "ls *": "allow", | |
| "cat *": "allow", | |
| "head *": "allow", | |
| "tail *": "allow", | |
| "wc *": "allow", | |
| "find *": "allow", | |
| "tree *": "allow", | |
| "grep *": "allow", | |
| "rg *": "allow", | |
| "git status*": "allow", | |
| "git log*": "allow", | |
| "git diff*": "allow", | |
| "git show*": "allow", | |
| "git branch*": "allow" | |
| }, | |
| "task": { | |
| "*": "deny", | |
| "sprint-planner": "allow", | |
| "phase-planner": "allow", | |
| "task-planner": "allow", | |
| "scenario-designer": "allow", | |
| "explorer": "allow", | |
| "phase-reviewer": "allow" | |
| } | |
| } | |
| }, | |
| "build": { | |
| "description": "Primary implementation mode. Qwen model. Runs the TDD loop by dispatching to subagents.", | |
| "mode": "primary", | |
| "temperature": 0.15, | |
| "prompt": "{file:./prompts/build.md}", | |
| "steps": 50, | |
| "permission": { | |
| "edit": "allow", | |
| "webfetch": "ask", | |
| "bash": { | |
| "*": "allow", | |
| "rm -rf *": "ask", | |
| "git push*": "ask", | |
| "git reset --hard*": "ask", | |
| "git clean*": "ask", | |
| "sudo *": "deny" | |
| }, | |
| "task": { | |
| "*": "deny", | |
| "explorer": "allow", | |
| "test-writer": "allow", | |
| "code-implementer": "allow", | |
| "refactorer": "allow", | |
| "phase-reviewer": "allow" | |
| } | |
| } | |
| }, | |
| "infra": { | |
| "description": "Primary infrastructure mode. Runs a validation-driven loop (Docker Compose, Kubernetes, Helm, Terraform, CI config) by dispatching to the infra-implementer. No TDD.", | |
| "mode": "primary", | |
| "temperature": 0.15, | |
| "prompt": "{file:./prompts/infra.md}", | |
| "steps": 50, | |
| "permission": { | |
| "edit": "allow", | |
| "webfetch": "ask", | |
| "bash": { | |
| "*": "allow", | |
| "rm -rf *": "ask", | |
| "git push*": "ask", | |
| "git reset --hard*": "ask", | |
| "git clean*": "ask", | |
| "sudo *": "deny", | |
| "terraform apply*": "ask", | |
| "terraform destroy*": "ask", | |
| "kubectl apply*": "ask", | |
| "kubectl delete*": "ask", | |
| "helm install*": "ask", | |
| "helm upgrade*": "ask", | |
| "helm uninstall*": "ask", | |
| "docker compose up -d*": "ask", | |
| "docker compose down*": "ask" | |
| }, | |
| "task": { | |
| "*": "deny", | |
| "explorer": "allow", | |
| "infra-implementer": "allow", | |
| "phase-reviewer": "allow" | |
| } | |
| } | |
| }, | |
| "sprint-planner": { | |
| "description": "Create a sprint plan. In convention mode, writes ai-assistance/sprints/NNNN-slug/sprint.md and increments the sprint counter; otherwise emits to chat.", | |
| "mode": "subagent", | |
| "temperature": 0.5, | |
| "prompt": "{file:./agents/sprint-planner.md}", | |
| "permission": { | |
| "edit": "ask", | |
| "webfetch": "deny", | |
| "bash": { | |
| "*": "deny", | |
| "ls *": "allow", | |
| "find *": "allow", | |
| "grep *": "allow", | |
| "rg *": "allow", | |
| "cat *": "allow", | |
| "tree *": "allow", | |
| "head *": "allow", | |
| "tail *": "allow" | |
| } | |
| } | |
| }, | |
| "phase-planner": { | |
| "description": "Break a reviewed sprint into layered phases (infra, domain, repo, service, API, UI). In convention mode, writes phase-NN-slug/phase.md files; otherwise emits to chat.", | |
| "mode": "subagent", | |
| "temperature": 0.4, | |
| "prompt": "{file:./agents/phase-planner.md}", | |
| "permission": { | |
| "edit": "ask", | |
| "webfetch": "deny", | |
| "bash": { | |
| "*": "deny", | |
| "ls *": "allow", | |
| "find *": "allow", | |
| "grep *": "allow", | |
| "rg *": "allow", | |
| "cat *": "allow", | |
| "tree *": "allow" | |
| } | |
| } | |
| }, | |
| "task-planner": { | |
| "description": "Break a reviewed phase into discrete tasks (classes, functions, small cohesive units). In convention mode, writes task-NN-slug/task.md files; otherwise emits to chat.", | |
| "mode": "subagent", | |
| "temperature": 0.3, | |
| "prompt": "{file:./agents/task-planner.md}", | |
| "permission": { | |
| "edit": "ask", | |
| "webfetch": "deny", | |
| "bash": { | |
| "*": "deny", | |
| "ls *": "allow", | |
| "find *": "allow", | |
| "grep *": "allow", | |
| "rg *": "allow", | |
| "cat *": "allow", | |
| "head *": "allow", | |
| "tail *": "allow" | |
| } | |
| } | |
| }, | |
| "scenario-designer": { | |
| "description": "Propose test scenarios for a reviewed task: happy paths, edge cases, error conditions. In convention mode, writes task-NN-slug/scenarios.md; otherwise emits to chat.", | |
| "mode": "subagent", | |
| "temperature": 0.5, | |
| "prompt": "{file:./agents/scenario-designer.md}", | |
| "permission": { | |
| "edit": "ask", | |
| "webfetch": "deny", | |
| "bash": { | |
| "*": "deny", | |
| "ls *": "allow", | |
| "find *": "allow", | |
| "grep *": "allow", | |
| "rg *": "allow", | |
| "cat *": "allow", | |
| "head *": "allow", | |
| "tail *": "allow" | |
| } | |
| } | |
| }, | |
| "test-writer": { | |
| "description": "Write ONE failing test for ONE scenario. TDD red step.", | |
| "mode": "subagent", | |
| "model": "ollama/local", // role: worker | |
| "temperature": 0.1, | |
| "prompt": "{file:./agents/test-writer.md}", | |
| "steps": 10, | |
| "permission": { | |
| "edit": "allow", | |
| "webfetch": "deny", | |
| "bash": { | |
| "*": "deny", | |
| "ls *": "allow", | |
| "find *": "allow", | |
| "grep *": "allow", | |
| "rg *": "allow", | |
| "cat *": "allow", | |
| "npm test*": "allow", | |
| "npm run test*": "allow", | |
| "pnpm test*": "allow", | |
| "yarn test*": "allow", | |
| "pytest *": "allow", | |
| "python -m pytest*": "allow", | |
| "cargo test*": "allow", | |
| "go test*": "allow", | |
| "mvn test*": "allow", | |
| "./gradlew test*": "allow", | |
| "dotnet test*": "allow" | |
| } | |
| } | |
| }, | |
| "code-implementer": { | |
| "description": "Write the minimum production code to make a failing test pass. TDD green step.", | |
| "mode": "subagent", | |
| "model": "ollama/local", // role: worker | |
| "temperature": 0.1, | |
| "prompt": "{file:./agents/code-implementer.md}", | |
| "steps": 15, | |
| "permission": { | |
| "edit": "allow", | |
| "webfetch": "deny", | |
| "bash": { | |
| "*": "deny", | |
| "ls *": "allow", | |
| "find *": "allow", | |
| "grep *": "allow", | |
| "rg *": "allow", | |
| "cat *": "allow", | |
| "npm test*": "allow", | |
| "npm run test*": "allow", | |
| "pnpm test*": "allow", | |
| "yarn test*": "allow", | |
| "pytest *": "allow", | |
| "python -m pytest*": "allow", | |
| "cargo test*": "allow", | |
| "cargo check*": "allow", | |
| "go test*": "allow", | |
| "go build*": "allow", | |
| "mvn test*": "allow", | |
| "./gradlew test*": "allow", | |
| "dotnet test*": "allow", | |
| "tsc --noEmit*": "allow" | |
| } | |
| } | |
| }, | |
| "refactorer": { | |
| "description": "Improve code structure/readability while keeping all tests green. TDD refactor step.", | |
| "mode": "subagent", | |
| "model": "ollama/local", // role: worker | |
| "temperature": 0.2, | |
| "prompt": "{file:./agents/refactorer.md}", | |
| "steps": 12, | |
| "permission": { | |
| "edit": "allow", | |
| "webfetch": "deny", | |
| "bash": { | |
| "*": "deny", | |
| "ls *": "allow", | |
| "find *": "allow", | |
| "grep *": "allow", | |
| "rg *": "allow", | |
| "cat *": "allow", | |
| "npm test*": "allow", | |
| "npm run test*": "allow", | |
| "pnpm test*": "allow", | |
| "yarn test*": "allow", | |
| "pytest *": "allow", | |
| "python -m pytest*": "allow", | |
| "cargo test*": "allow", | |
| "go test*": "allow", | |
| "mvn test*": "allow", | |
| "./gradlew test*": "allow", | |
| "dotnet test*": "allow" | |
| } | |
| } | |
| }, | |
| "infra-implementer": { | |
| "description": "Write or modify infrastructure manifests (Docker Compose, Kubernetes, Helm, Terraform, CI) until the task's validator checklist is green. Validation-driven analog of code-implementer.", | |
| "mode": "subagent", | |
| "model": "ollama/local", // role: worker | |
| "temperature": 0.15, | |
| "prompt": "{file:./agents/infra-implementer.md}", | |
| "steps": 20, | |
| "permission": { | |
| "edit": "allow", | |
| "webfetch": "deny", | |
| "bash": { | |
| "*": "deny", | |
| "ls *": "allow", | |
| "find *": "allow", | |
| "grep *": "allow", | |
| "rg *": "allow", | |
| "cat *": "allow", | |
| "head *": "allow", | |
| "tail *": "allow", | |
| "tree *": "allow", | |
| "yamllint *": "allow", | |
| "yq *": "allow", | |
| "docker compose config*": "allow", | |
| "docker compose build*": "allow", | |
| "docker compose ps*": "allow", | |
| "docker compose logs*": "allow", | |
| "docker compose down*": "ask", | |
| "docker compose up*": "ask", | |
| "kubectl --dry-run=client*": "allow", | |
| "kubectl apply --dry-run=client*": "allow", | |
| "kubectl kustomize*": "allow", | |
| "kubectl explain*": "allow", | |
| "kubeconform *": "allow", | |
| "kubeval *": "allow", | |
| "kube-linter *": "allow", | |
| "polaris *": "allow", | |
| "helm lint*": "allow", | |
| "helm template*": "allow", | |
| "helm dependency*": "allow", | |
| "terraform fmt*": "allow", | |
| "terraform validate*": "allow", | |
| "terraform plan*": "allow", | |
| "terraform init -backend=false*": "allow", | |
| "actionlint *": "allow", | |
| "gitlab-ci-lint *": "allow", | |
| "docker build*": "allow", | |
| "hadolint *": "allow" | |
| } | |
| } | |
| }, | |
| "phase-reviewer": { | |
| "description": "End-of-phase code review: architecture, correctness, test coverage, consistency. In convention mode, appends review notes into the phase's phase.md; otherwise emits to chat.", | |
| "mode": "subagent", | |
| "temperature": 0.3, | |
| "prompt": "{file:./agents/phase-reviewer.md}", | |
| "permission": { | |
| "edit": "ask", | |
| "webfetch": "deny", | |
| "bash": { | |
| "*": "deny", | |
| "ls *": "allow", | |
| "find *": "allow", | |
| "grep *": "allow", | |
| "rg *": "allow", | |
| "cat *": "allow", | |
| "head *": "allow", | |
| "tail *": "allow", | |
| "wc *": "allow", | |
| "tree *": "allow", | |
| "git diff*": "allow", | |
| "git log*": "allow", | |
| "git show*": "allow", | |
| "git status*": "allow", | |
| "git blame*": "allow" | |
| } | |
| } | |
| }, | |
| "explorer": { | |
| "description": "Fast codebase exploration. Read-only. Returns file locations and short excerpts.", | |
| "mode": "subagent", | |
| "model": "ollama/local", // role: worker | |
| "temperature": 0.1, | |
| "prompt": "{file:./agents/explorer.md}", | |
| "permission": { | |
| "edit": "deny", | |
| "webfetch": "deny", | |
| "bash": { | |
| "*": "deny", | |
| "ls *": "allow", | |
| "find *": "allow", | |
| "grep *": "allow", | |
| "rg *": "allow", | |
| "cat *": "allow", | |
| "head *": "allow", | |
| "tail *": "allow", | |
| "wc *": "allow", | |
| "tree *": "allow" | |
| } | |
| } | |
| } | |
| }, | |
| "compaction": { | |
| "auto": true, | |
| "prune": true, | |
| "reserved": 4000 | |
| }, | |
| "share": "disabled", | |
| "snapshot": true, | |
| "autoupdate": "notify" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment