### Powered by CodeMemory
> The semantic backbone of this harness. CodeMemory indexes the whole repo into a queryable memory of files, symbols, and episodes — so every agent walks into a session already knowing the codebase instead of grepping it back into existence on every turn.
> - Orientation, not scanning. Onecode-memory_codememory_retrievecall surfaces the right paths, symbols, and prior decisions;grep/readonly run afterwards for exact verification.
- Cross-session memory. Episodes and findings persist — agents pick up where the last session left off instead of re-discovering the repo from scratch.
- Wired in by default. thecodebase-explorationskill is loaded at session start, andcode-memory_*tools are pre-allowlisted for the conductor and every specialist subagent. Cloud and remote agents skip CodeMemory (docs/codememory-cloud.md).FMFLURRY_CODEMEMORY=onkeeps it on.
OpenCode + Claude Code Setup
My personal OpenCode and Claude Code configuration, kept public so I can sync it across machines — and so anyone curious can borrow what's useful. MIT licensed, fork freely. It evolves with my workflow, so treat it as a living reference rather than a stable distribution.
Want to try it? Jump to Public install — it takes about five minutes.
What's inside
A hardened primary conductor agent backed by 25 specialist sub-agents, wired together by a routing gate, a brief contract, and a verification gate. Here's the shape of it, counted fresh on 2026-10-02:
| Thing | Count | Notes |
| ---------------------------- | ----- | -------------------------------------------------------------------------------------- |
| Agents | 26 | 1 conductor + 25 specialists (build / plan overrides ship disabled) |
| Skills | 69 | canonical set in skills/*/SKILL.md; skill-creator is runtime-only and git-ignored |
| Command templates | 37 | commands/*.md; 21 pinned in opencode.jsonc |
| Session-start instructions | 12 | loaded from instructions/ (caveman-ultra.md is not loaded) |
| .claude rule packs | 15 | 6 always-on under rules/common/, 4 path-scoped, 5 under rules/typescript/ |
| Hooks | 7 | .claude/hooks/*.sh |
| MCP servers | 6 | 1 enabled (code-memory), 5 disabled by default |
| Custom tool files | 4 | run-tests, check-coverage, security-audit, plus the index.ts barrel |
| TUI plugins | 2 | llm-metrics sidebar + panda-banner |
Highlighted subagents — full roster in Agents.
| Name | What it does | Why it's good |
| ------------------- | ------------------------------------------- | --------------------------------------------------------------------------------- |
| conductor | Primary orchestrator; write/edit denied | Even literal models must delegate — routing is enforced by permissions, not prose |
| planner | Turns requests into phased plans | Surfaces dependencies and risks before code is written |
| coder | Writes and edits source code | Only writer for application code, scoped to a brief |
| tdd-guide | Drives test-first cycles | RED-GREEN-REFACTOR with coverage; delegates implementation to coder |
| code-reviewer | Reviews diffs before merge | Catches regressions and convention drift early |
| security-reviewer | Audits auth, secrets, and input | Read-only findings; fixes routed to coder |
| git-specialist | Sequences atomic commits and PRs | Cohesion-first splits, Conventional Commits, no force-push |
| scout | Maps the repo before a dispatch | Produces file manifests so briefs stay precise |
| comment-judge | Judges added comments by rubric | Flags false, stale, and noisy comments |
| postgres-dba | Runs live PostgreSQL diagnostics | Read-only advisory; mutating commands left for humans |
Highlighted skills — full catalog in Skills.
| Name | What it does | Why it's good |
| ---------------------------------- | ------------------------------------------- | --------------------------------------------------------------- |
| socratic-design | Spikes a short question, otherwise asks one | Gates decisions before plans; no chained interrogation |
| caveman | Ultra-terse replies (~75% fewer tokens) | Keeps full technical accuracy at a fraction of the context cost |
| verify-this | Falsifiable verification of a claim | Green means fresh evidence, not optimism |
| blast-radius | Traces what a change can break | Proves safety with real code, beyond the diff |
| why | Cites design rationale from history | Searches source control and evidence MCPs in parallel |
| chimera | Runs parallel candidates, grafts the best | Avoids locking in the wrong shape early |
| humanizer | Strips AI tells from prose | Keeps writing sounding like a person wrote it |
| test-behavior-not-implementation | Detects tests that cannot fail | Catches mock-only and self-referential assertions |
| show-your-work | Keeps a per-decision log | Gives reviewers a trail for unattended runs |
| fix-ci | Finds failing checks and fixes them | Routes by failure type: build, test, or security |
| config-sync | Propagates harness config changes | Keeps repo and live directories in step |
| openspec-propose | Generates a full change proposal | Design, specs, and tasks in one step |
Highlighted commands — full list in Slash commands.
| Name | What it does | Why it's good |
| -------------- | --------------------------------- | -------------------------------------------------- |
| /plan | Delegates to planner for a plan | Forces routing before any code is written |
| /tdd | Test-first cycle, or /tdd refactor to pin behavior | Characterization tests pass immediately and stay frozen |
| /cop-review | Pre-merge review of the branch | Applies stack-specific checklists and runs lint |
| /security | Security audit of the change | Read-only findings; fixes routed to coder |
| /git | Branch and commit operations | Keeps git work in the specialist's hands |
| /build-fix | Resolves build and type errors | Focused loop until the build is green |
| /orchestrate | Multi-agent coordination | Plans dependency order across specialists |
| /verify | Verification loop | Checks the goal against concrete criteria |
| /db-health | Read-only PostgreSQL health check | Surfaces vacuum, wraparound, and connection issues |
| /api-spec | Generates OpenAPI 3.1 specs | One spec per bounded context, Zalando-style |
The two halves stand alone. Use the OpenCode side, the Claude Code mirror, or both — whichever you'd find useful.
Table of contents
- Recent changes - Goals - Repository layout - Configuration - How the harness works today - Agents - Slash commands - Skills - Instructions & rules - Plugins & hooks - Custom tools - TUI plugins - Claude Code mirror - Sync & update - How it fits together - Autonomous mode - Changements récents - Objectif - Structure du repo - Configuration - Agents - Comment marche le harness - Commandes slash - Skills - Instructions & règles - Plugins & hooks - Outils custom - TUI plugins - Mirror Claude Code - Sync & mise a jour - Comment tout s'emboite - Mode autonomePublic install
The repo is designed to merge into ~/.config/opencode/, plus an optional ~/.claude/ mirror. There are three paths: a one-line install (recommended — nothing to clone by hand), a one-shot script if you already have the repo, and a manual walk-through if you want to see every step.
One-line install
You don't need to clone anything first. The bootstrap fetches the repo into ~/.local/share/settings-opencode (override with SETTINGS_OPENCODE_SRC), then runs the installer. Re-running the exact same command is also how you update — it pulls the latest and re-applies it.
macOS / Linux / WSL (bash):
curl -fsSL https://raw.githubusercontent.com/fmflurry/settings-opencode/master/bootstrap.sh | bash
On WSL it installs to the Windows side (/mnt/c/Users/), matching install.sh's WSL behaviour. Pass installer flags through after -s --:
curl -fsSL https://raw.githubusercontent.com/fmflurry/settings-opencode/master/bootstrap.sh | bash -s -- --local
curl -fsSL https://raw.githubusercontent.com/fmflurry/settings-opencode/master/bootstrap.sh | bash -s -- --no-claude
curl -fsSL https://raw.githubusercontent.com/fmflurry/settings-opencode/master/bootstrap.sh | bash -s -- --uninstall
Native Windows (PowerShell — no WSL):
irm https://raw.githubusercontent.com/fmflurry/settings-opencode/master/bootstrap.ps1 | iex
Merges into %USERPROFILE%\.config\opencode and \.claude, runs npm install (or bun install), and writes the OPENCODE_* defaults as persistent User environment variables. Open a new terminal afterwards so they take effect. Variants:
# project-scoped install
& ([scriptblock]::Create((irm https://raw.githubusercontent.com/fmflurry/settings-opencode/master/bootstrap.ps1))) -Local
skip the Claude mirror
& ([scriptblock]::Create((irm https://raw.githubusercontent.com/fmflurry/settings-opencode/master/bootstrap.ps1))) -NoClaude
skip OpenCode (install Claude only)
& ([scriptblock]::Create((irm https://raw.githubusercontent.com/fmflurry/settings-opencode/master/bootstrap.ps1))) -NoOpencode
uninstall (removes the OPENCODE_* env vars; leaves copied config in place)
& ([scriptblock]::Create((irm https://raw.githubusercontent.com/fmflurry/settings-opencode/master/bootstrap.ps1))) -Uninstall
Prerequisites
- macOS, Linux, WSL, or native Windows.
- OpenCode CLI installed and on your
PATH(unless installing Claude Code only via--no-opencode). - Claude Code installed if you want the
.claude/mirror (unless skipped via--no-claude). - Either Bun (recommended —
bun.lockis what's checked in) or Node.js >=22.6 withnpm. git.
Secrets
This repo stores no API keys. If you use the myMistral provider in opencode.jsonc, set MISTRAL_API_KEY by:
- Copying
.env.example→.envand filling in your key, OR - Exporting
MISTRAL_API_KEYin your shell rc.
.env* files are git-ignored; only .env.example is tracked.
Quick install (script)
Already have the repo cloned? Run the installer directly:
git clone https://github.com/fmflurry/settings-opencode.git ~/Workspace/settings-opencode
cd ~/Workspace/settings-opencode
./install.sh
install.sh is interactive by default. It will prompt for each of two independent targets (OpenCode and Claude Code):
- Verify your prerequisites (
git,bun/npm). - OpenCode (if selected): merge repo files into
~/.config/opencode(or./.opencodeif--local) without removing existing user config. - Run
bun install(ornpm ciif Bun isn't available). - Sync skills from the canonical set into both harnesses via
scripts/sync-skills.sh. - Seed personal config files (
settings.json,settings.local.json,policy-limits.json) only on first install; preserve user edits on reinstall. - Add the
OPENCODE_MODEL_andOPENCODE_REASONING_defaults to your shell rc, fenced with markers so re-runs and uninstalls are idempotent (OpenCode only, skipped if--local). - Claude Code (if selected): merge
.claude/into~/.claude(or./.claudeif--local). - Print a smoke-test command and the locations to tweak afterwards.
| Flag | Behaviour |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| _(none)_ | Interactive walk-through: prompt [Y/n] for OpenCode (default Y) and Claude Code (default Y). |
| --yes, -y | Non-interactive — accept all defaults: OpenCode ✓, Claude Code ✓. Existing normal directories are merged, not removed or backed up. |
| --local | Project-scoped install into the current directory (./.opencode, ./.claude as independent siblings); skips the global shell-rc env block (prints it as a hint instead). |
| --opencode | Allow-list: install OpenCode only (if combined with other flags, only those are installed). |
| --claude | Allow-list: install Claude Code only. |
| --no-opencode | Deny: skip OpenCode entirely (repo copy, deps, and env block). Can be combined with other targets. |
| --no-claude | Deny: skip the Claude Code mirror. Can be combined with other targets. |
| --uninstall | Remove the env-var block and optionally remove copied local/global dirs after confirmation. Never deletes the cloned repo or your data without confirmation. |
| --help, -h | Print usage. |
The script writes a fenced block to your shell rc (~/.zshrc, ~/.bashrc, or ~/.config/fish/config.fish) that looks like this:
# >>> settings-opencode >>>
Added by settings-opencode installer. Edit values to match your provider.
Defaults target the myMistral provider configured in opencode.jsonc.
export OPENCODE_MODEL_CONDUCTOR="myMistral/mistral-medium-2604"
export OPENCODE_MODEL_SUBAGENT_PLANNER="myMistral/mistral-large-latest"
export OPENCODE_MODEL_SUBAGENT_WORKER="myMistral/mistral-medium-latest"
export OPENCODE_MODEL_SUBAGENT_MINI="myMistral/mistral-small-latest"
export OPENCODE_REASONING_CONDUCTOR="high"
export OPENCODE_REASONING_PRIMARY="high"
export OPENCODE_REASONING_SECONDARY="medium"
export OPENCODE_REASONING_TERTIARY="low"
<<< settings-opencode <<<
Edit the values inside the markers to point at whichever provider you use. Re-running ./install.sh rewrites the same block; ./install.sh --uninstall removes it cleanly.
If your shell isn't bash/zsh/fish, the script prints the env block for you to paste manually and continues with the rest of the install.
Manual install
Click to expand the step-by-step manual walk-through (same outcome as the script).
1. Clone the repo, then merge it into the OpenCode config dir
OpenCode loads ~/.config/opencode/opencode.jsonc at startup. Keep the repo wherever you like, then copy it additively into the config dir.
# Clone
git clone https://github.com/fmflurry/settings-opencode.git ~/Workspace/settings-opencode
mkdir -p ~/.config/opencode
rsync -a --exclude node_modules --exclude .git ~/Workspace/settings-opencode/ ~/.config/opencode/
cd ~/.config/opencode
2. Install plugin/tool dependencies
bun install # uses bun.lock
or
npm ci
3. Set the model + reasoning environment variables
The agent block in opencode.jsonc is parameterized via env vars so you can swap providers without editing the config. Add these to your shell profile (~/.zshrc, ~/.bashrc, etc.):
# Required (OpenCode model identifiers — adjust to whatever provider you use)
export OPENCODE_MODEL_CONDUCTOR="myMistral/mistral-medium-2604"
export OPENCODE_MODEL_SUBAGENT_PLANNER="myMistral/mistral-large-latest"
export OPENCODE_MODEL_SUBAGENT_WORKER="myMistral/mistral-medium-latest"
export OPENCODE_MODEL_SUBAGENT_MINI="myMistral/mistral-small-latest"
Reasoning effort tiers
export OPENCODE_REASONING_CONDUCTOR="high"
export OPENCODE_REASONING_PRIMARY="high"
export OPENCODE_REASONING_SECONDARY="medium"
export OPENCODE_REASONING_TERTIARY="low"
If your provider doesn't support reasoningEffort, OpenCode silently ignores it — pick any value.
4. Install MCP server prerequisites
opencode.jsonc declares six MCP servers: one enabled by default (code-memory) and five disabled (context7, blender, wallaby, Figma, smartbear-swagger). CodeMemory is strongly recommended — the codebase-exploration skill routes repo orientation through it before falling back to grep/read. The others are optional but documented here so you know what you're opting into.
| Server | Install | Status |
| ----------------- | ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| code-memory | uvx --from flurryx-code-memory@latest code-memory-mcp (auto-installed on first use) | Recommended. Enabled. Semantic repo orientation; code-memory_* tools are pre-allowlisted for every subagent. Pairs with the codebase-exploration skill. |
| context7 | nothing — npx -y @upstash/context7-mcp@latest | Disabled by default. Live docs lookup. |
| blender | uv --directory $HOME/dev/blender_mcp/mcp run blender-mcp | Disabled by default. Blender scene tooling; drives the gaudi agent when enabled. |
| wallaby | install Wallaby.js and run wallaby update-mcp | Disabled by default. Runtime-test introspection. |
| Figma | remote — https://mcp.figma.com/mcp | Disabled by default. Flip enabled: true and set up Figma MCP for design-system tools. |
| smartbear-swagger | remote — https://swagger.mcp.smartbear.com/mcp | Disabled by default. OpenAPI/Swagger tooling for api-spec-architect. |
5. (Optional) Install the Claude Code mirror
The repo ships a .claude/ subtree. OpenCode and Claude Code can be installed separately and never nest inside one another.
Claude Code:
mkdir -p ~/.claude
rsync -a ~/.config/opencode/.claude/ ~/.claude/
What this installs:
.claude/CLAUDE.md— global user instructions Claude Code reads on every session..claude/settings.json— permissions, hooks, env vars (API_TIMEOUT_MS, autocompact threshold, etc.). Seeded on first install only; user edits preserved on reinstall..claude/hooks/*.sh— pre-tool-use security warnings + stop hook..claude/rules/{common,typescript}/*.md— coding-style/testing/security rule packs..claude/commands/*.md— extra slash commands (/create-pull-request,/update-codemaps, and the Claude-only arena commands)..claude/skills/**— the skill mirror, synced from the canonical set byscripts/sync-skills.shon install.
Smoke test
opencode
You should see:
- The
llm-metricsTUI sidebar and the panda banner show up.
/plan add a TODO list to my homepage
It should route to the planner sub-agent and return a structured plan without writing code.
Changing models
Edit the OPENCODE_MODEL_ / OPENCODE_REASONING_ exports in your shell rc (~/.zshrc, ~/.bashrc, …), then open a new shell.
Updating
If you installed via the one-liner, re-run the exact same command — it pulls the latest and re-applies it:
# macOS / Linux / WSL
curl -fsSL https://raw.githubusercontent.com/fmflurry/settings-opencode/master/bootstrap.sh | bash
# native Windows
irm https://raw.githubusercontent.com/fmflurry/settings-opencode/master/bootstrap.ps1 | iex
If you cloned the repo by hand instead:
cd ~/.config/opencode
git pull
./install.sh --yes # refreshes deps + env block; idempotent
or, if you want to do it by hand:
bun install (or: npm ci)
If a new plugin shows up, OpenCode picks it up on the next restart. If an env var is added to opencode.jsonc, this README will mention it.
English
Dotfiles for OpenCode + the stable parts of ~/.claude. Ships a hardened primary conductor agent (no write/edit perms — must delegate), 25 specialist sub-agents, always-on instructions, slash commands, OpenCode plugins (secret-file guard, notifications, llm-metrics, tool-budget, autonomy), custom tools, and a Claude Code mirror.
Recent changes
Shipped on master through fa50d8e (2026-10-18). The plugin number is version in scripts/cursor-plugin/config.json. History is scripts/cursor-plugin/CHANGELOG.md.
| PR | Plugin | What landed |
| --- | --- | --- |
| #25 | 0.2.0 | Semver guard in scripts/cursor-plugin/check.mjs. A plugin-source change must carry a version strictly above the base. |
| #27 | 0.3.0 | CodeMemory stays off in cloud and remote sessions unless overridden. Ship review/fix rounds stop at 3. |
| #28 | 0.4.0 | Review findings are Important, Nit, or Pre-existing. Only Important blocks. The verdict is Approve or Block. |
| #29 | 0.4.1 | Enforcement ladder: code, then lint, tests, or static analysis, then a prose rule, then human review. |
| #30 | 0.4.2 | A project's REVIEW.md is the tag reference when it exists. The PR template adds Risk, How to revert, and Tier. |
| #32 | 0.4.3 | Always-applied Cursor rules drop from 21 files (1438 lines) to 7 files (502 lines). The rest load by path glob or by skill. |
| #33 | 0.4.4 | create-verification-skill writes a project verify-this override from the repository's build, test, and e2e commands. |
| #35 | 0.4.6 | socratic-design spikes a question a prototype under 30 minutes can settle, and presents that result. An L-sized task is restated in the agent's own words before planning. |
Semver (#25, policy note in #29). scripts/cursor-plugin/check.mjs diffs plugin sources against the merge-base with the base branch (origin/master, origin/$GITHUB_BASE_REF in GitHub Actions, or CURSOR_PLUGIN_BASE). The version must be MAJOR.MINOR.PATCH and strictly greater, and the changelog needs a heading for it. The build copies scripts/cursor-plugin/config.json into plugins/fmflurry-harness/.cursor-plugin/plugin.json. A root README.md edit is not a plugin source. #25 shipped that guard at 0.2.0, with patch, minor, and major as the suggested bumps. From 0.4.1, scripts/cursor-plugin/CHANGELOG.md says later plugin changes bump the patch only. The guard does not enforce that: it still accepts a minor or major bump, and it still prints those suggestions.
CodeMemory (#27). FMFLURRY_CODEMEMORY=on|off|auto wins. Unset, auto, or any other value detects. Detection order is in docs/codememory-cloud.md, implemented in plugins/code-memory-lib/mode.ts and .claude/hooks/codememory-mode.sh:
CLAUDE_CODE_REMOTEtruthy (true,1, oryes), orCLAUDE_CODE_REMOTE_SESSION_IDnon-empty: off.- Cursor metadata
agent/runtimeequal tomanaged, read withGET /v1/meta-data/agent/runtimeonCURSOR_AGENT_SOCKET(default/run/cursor/api.sock): off. - CI: truthy
GITHUB_ACTIONS,GITLAB_CI,CIRCLECI, orBUILDKITE, or a setTF_BUILDorJENKINS_URL: off.CI=truealone is ignored, because.claude/settings.jsonsetsCIfor every Claude Code session. - macOS (
unameDarwin), and none of the signals above: on, even when the local services are down. - Otherwise both FalkorDB
127.0.0.1:6379and Qdrant127.0.0.1:6333must accept a TCP connection, or CodeMemory stays off. A failed probe is "down", not an error.
FMFLURRY_CODEMEMORY=on keeps it on in the cloud. off keeps it off on a laptop.
Review tags (#28, #30). The default mapping is Finding tags in .claude/agents/code-reviewer.md. Important blocks the merge. Nit does not. Pre-existing does not, at any gravity. Approve means no Important finding is open (lint passes, and no forbidden comments). Block means at least one Important finding is open. There is no Warning verdict. scripts/cursor-plugin/check.mjs rejects the old uppercase review-severity words in harness sources. The allowlist for non-review uses (GDPR, database health, plan risk lines, npm audit, CVE) is scripts/cursor-plugin/review-tags.mjs. When the repository under review has a root REVIEW.md, that file is the only tag mapping. The reviewer cites it and does not apply the default table as a second mapping. This repo ships REVIEW.md.
Enforcement ladder (#29). .claude/rules/common/enforcement-ladder.md (Cursor copy plugins/fmflurry-harness/rules/enforcement-ladder.mdc) and instructions/enforcement-ladder.md (loaded from opencode.jsonc). Put the fix at the first level that can hold it: code, then lint, tests, or static analysis, then a prose rule, then human review. A prose rule carries why-not-tooled:. Adding always-on prose means deleting or shortening other always-on prose in the same change.
PR template (#30). .github/pull_request_template.md has Summary, Risk, How to revert, and Tier. Tier is T1, T2, or T3, from blast radius, protected paths, and diff size. It is not a finding tag. /setup-harness writes that template when .github/pull_request_template.md is missing and leaves an existing file alone (scripts/cursor-plugin/templates/setup-harness.md, built to plugins/fmflurry-harness/skills/setup-harness/SKILL.md). commands/pr.md and commands/create-pull-request.md fill the template when it exists.
Rules diet (#32). Plugin 0.4.3 (fa50d8e). plugins/fmflurry-harness/rules/ has 7 files with alwaysApply: true, 502 lines, down from 21 files and 1438 lines at 62aa030. They are autonomy.mdc, conductor.mdc, enforcement-ladder.mdc, orchestration.mdc, question-handling.mdc, tool-budget.mdc, and verification-gate.mdc. scripts/cursor-plugin/config.json rules.always lists the six common/ rules. The build adds rules/conductor.mdc. There is no rules/always__harness.mdc in this build. File-bound rules stay in that directory with alwaysApply: false and globs: code-comments, coding-style, security, testing, and the five typescript-* packs. These left the always-on set and are skills: agent-roster, brief-contract, codebase-exploration, git-workflow, harness-parity, hooks, open-pr-check, patterns, performance, worktree-destruction-safety. skills/ai-ecosystem-audit/SKILL.md (Always-on budget) counts session-global rules. More than 8 alwaysApply: true Cursor rules is a confirmed finding. The built set is 7.
Goals
- Reproducibility: same agent behavior across machines/sessions.
- Quality: on-demand TDD, frequent verification, centralized conventions.
- Security:
security-reviewskill available on demand + pre-tool-use hooks.
Repository layout
- Configs:
opencode.jsonc,dcp.jsonc(dynamic context pruning),tui.json(TUI theme). - Profiles:
profiles/(per-profile overrides +/ AGENTS.md). - Skills:
skills/*/SKILL.md(plus auxiliary docs) — canonical set, shared with Claude Code viasync-skills.sh. - Agent prompts:
prompts/agents/*.txt(26 files). - Slash commands:
commands/*.md(37 templates). - OpenCode plugins:
plugins/*.{ts,js}+plugins/kdco-primitives/+plugins/llm-metrics-lib/+plugins/code-memory-lib/+plugins/lib/. - TUI plugins:
tui-plugins/*.tsx(registered intui.json;autonomy-status.tsxis the autonomy sidebar panel). - Custom tools:
tools/*.ts. - Mode notes:
contexts/*.md. - Global instructions:
instructions/*.md(6 loaded at session start; file-bound and situational docs are skills or unloaded instruction files). - Scripts:
scripts/setup-package-manager.js,scripts/codemaps/generate.ts,scripts/llm-metrics-dashboard.ts(live llm-metrics dashboard),scripts/settings-sync.sh,scripts/sync-skills.sh(sync canonical skill set to both harnesses),scripts/skill-drift-check.sh(read-only drift detector). - Install entry points:
bootstrap.sh,bootstrap.ps1,install.sh,install-cursor.sh. - Claude mirror:
.claude/CLAUDE.md,.claude/settings.json,.claude/hooks/,.claude/rules/,.claude/agents/,.claude/skills/(synced from the canonical set on install),.claude/commands/. - Intentional exclusions (
.gitignore):node_modules/,antigravity-,.DS_Store, local.envfiles except.env.example, runtime dirskills/skill-creator/(not synced).
Configuration: opencode.jsonc
Six concerns wired in one file:
instructions: always-on docs loaded at session start. Currently 6:
instructions/subagent-routing.md — Task-first subagent delegation gate.
- instructions/question-handling.md — blocking vs non-blocking question protocol.
- instructions/verification-gate.md — independent build/test verification before "done".
- instructions/autonomy.md — destructive-action and autonomous-mode limits.
- instructions/tool-budget.md — verification-vs-exploration budget.
- instructions/enforcement-ladder.md — code, then lint or tests, then a prose rule, then review.
File-bound guidance stays on disk and off this array: instructions/code-comments.md, instructions/coding-style.md, instructions/testing.md, instructions/security.md (the coder or tdd-guide prompt points at them). Situational guidance is a skill: open-pr-check, codebase-exploration, harness-parity, brief-contract, git-workflow, worktree-destruction-safety, performance, patterns, hooks, agent-roster.
> instructions/caveman-ultra.md sits in the repo but is not in the instructions array, so it isn't loaded at session start.
default_agent:conductor(orchestrator-only — cannot write/edit).agent: 26 definitions (model + reasoning effort + prompt + tool allowlist). All models are env-driven (OPENCODE_MODEL_,OPENCODE_REASONING_) — see Public install.command: maps/-> template + sub-agent +subtask; 21 entries are pinned here.mcp: six servers —code-memoryenabled;context7,blender,wallaby,Figma,smartbear-swaggerdisabled by default.code-memory_*perms are pre-allowlisted for every subagent.plugin: npm + local plugins —opencode-skill-creator(npm) plus five local files (which OpenCode also auto-loads from the plugin directory).
dcp.jsonc is the config stub for the optional external Dynamic Context Pruning plugin.
How the harness works today
The interesting part isn't the agent list — it's the machinery that keeps a literal model on rails. Each rule lives in an instructions/ file loaded at startup.
1. The conductor cannot write
conductor has tools.write: false, tools.edit: false, and permission.edit/write: deny in opencode.jsonc. Its Task allowlist enumerates every legal specialist; *: deny blocks the rest. The orchestrator has no file-mutation tool — it must dispatch a task to coder, writer, tdd-guide, or git-specialist. instructions/subagent-routing.md adds a first-tool gate: if the request matches a specialist, the very first tool call must be that dispatch.
2. Agent selection at a glance
| You want… | Route to |
| ------------------------------------------- | ------------------------------------------- |
| A plan, risk list, or phased breakdown | planner |
| Architecture / scalability / module boundaries | architect |
| Non-test implementation | coder |
| Docs, README, markdown, HTML, release notes | writer |
| Diff / PR / current-change review | code-reviewer |
| Tests and coverage | tdd-guide (delegates impl to coder) |
| Build, typecheck, lint, or TS errors | build-error-resolver |
| Git, commits, branches, pushes, PRs | git-specialist |
| Security / auth / secrets / user input | security-reviewer |
| GDPR / privacy / cookies / PII | gdpr-specialist |
| Angular or .NET pre-merge review | angular-cop / dotnet-cop |
| SQL / schema / migrations / RLS | database-reviewer |
| Live PostgreSQL instance diagnostics | postgres-dba |
| OpenAPI specs | api-spec-architect |
| Unknown file scope for a brief | scout |
| Dead code / duplication cleanup | refactor-cleaner |
| Generated docs / codemaps | doc-updater |
| E2E browser journeys | e2e-runner |
| Harness / skill / agent parity audit | ecosystem-auditor |
| Comment judging / purge | comment-judge (purge via haruspex-commentorum) |
| Blender / 3D art | gaudi (triggered-only) |
3. Canonical flows
Most non-trivial work follows a fixed order, so planning, implementation, and review never collapse into one agent:
planner → (tdd-guide → coder) or coder → code-reviewer → verify → git-specialist
A feature goes planner → /tdd (RED) → coder (GREEN) → /verify → /pr → /cop-review → ship-merge.
A behavior-preserving refactor goes planner → /tdd refactor (characterization tests that pass immediately, then freeze) → coder (the restructure does not edit those tests) → /blast-radius → /verify (baseline against treatment on the same pin) → /pr → /cop-review → ship-merge.
A test-first variant routes tdd-guide first (RED), then tdd-guide delegates the GREEN implementation to coder, then code-reviewer, then the verification gate, then git-specialist. Docs-only work short-circuits to writer. A refactor routes tdd-guide in /tdd refactor mode first, so the characterization pin is green before any restructure.
4. The brief contract
Before dispatching coder, writer, or tdd-guide, the conductor emits a 6-field brief (the brief-contract skill): TASK (one imperative outcome), FILES (authoritative path + line ranges), CHANGE (named target state), DONE-WHEN (an executable command that must exit 0), OUT OF SCOPE, and CONTEXT ALREADY RESOLVED — plus a BUDGET. Precise briefs cost roughly 4× fewer tokens than open-ended ones, so this is enforced, not advice.
5. Question handling
Subagents that hit an ambiguity must tag their question [BLOCKING] or [NON-BLOCKING] (instructions/question-handling.md). Blocking questions stop the agent; the conductor tries to answer from the repo first, then asks the human. Non-blocking questions let work continue with a stated default and are batched and reported at the end of the job.
6. The verification gate
Nobody says "done" without fresh evidence (instructions/verification-gate.md). After any source edit, the agent detects the project type from manifests, runs the matching build/typecheck/lint command itself (subagent self-reports are not proof), runs the tests if behavior changed, and pastes the tail of the real output. Two failed fix passes on the same error → stop and escalate.
7. Tool budget
instructions/tool-budget.md separates verification commands (build, test, git state — uncapped) from exploratory shell (listing, grepping, file inspection — default 3 per dispatch). It nudges the model toward CodeMemory and targeted read ranges instead of full-file reads, and requires a one-line justification when the exploratory ratio runs high.
8. Worktree destruction safety
Removing a worktree is treated like rm -rf, not bookkeeping (the worktree-destruction-safety skill). The only removal path is agent-harness worktree-rm ; without --confirmed it is a dry run that exits 3. It runs the pre-removal checks: git status --porcelain, commits not on the base branch, activity (fails closed when unknown), and every other checkout of the repo (main and sibling worktrees) clean or snapshotted. It lists the target's ignored files before removing. Snapshots are recoverable refs under refs/harness/snapshots/ that capture tracked content, file modes, index state, and untracked files. In Orca-managed repos the removal goes through Orca, never with --force. The command then waits for the removal to finish, settles, and re-scans every other checkout; a change is reported as changed during removal. A changed checkout is restored only if its HEAD is unchanged and it is clean. Otherwise exit 4 with inspect and restore commands, refs kept. On success each snapshot sha is printed before its ref is released. Not covered: ignored files, untracked nested git repositories (reported as a note), and submodule contents. Any failed check is a hard stop reported to the human. The guard denies raw orca worktree rm, git worktree remove|prune|move (including global options and aliases), and recursive rm/mv/trash/rsync --delete/find -delete on a worktree or its parent, in every mode. It is text matching and cannot catch commands assembled at run time; the script's checks are the real boundary. git worktree prune -n stays allowed. Worktree removal is forbidden in autonomous mode, and worktree-rm refuses while autonomy is on. One exception: agent-harness teardown-merged-worktree removes the registered goal worktree of a MERGED PR in autonomous mode. It re-runs the checks against the PR head (not an origin/ count, because squash merges rewrite history), never uses --force, and keeps the registry when a step is partial. Goal worktrees are created by agent-harness ship-init and registered in .
9. Codememory-first
When the code-memory MCP server is connected and CodeMemory is on, its tools are the mandatory first choice for search, callers, definitions, importers, and dependencies (the codebase-exploration skill). grep/glob/bash are fallbacks only — raw listing, filename globs, or a known path region. Cloud and remote agents skip CodeMemory (docs/codememory-cloud.md). This is the rule that makes orientation cheap for every other agent.
Hardened sub-agent orchestration
Delegation is enforced at two layers, so the same behavior holds whether the primary model is Claude, GPT, DeepSeek, or any open-weight runner that ignores prose hints:
- Permissions —
conductorhastools.write: false,tools.edit: false, andpermission.edit/write: denyinopencode.jsonc. The Task allowlist enumerates every legal specialist;*: denyblocks anything else. The orchestrator literally has no file-mutation tool. - Guard plugins + front-loaded prompt —
plugins/secret-file-guard.tsaborts anyread/bashaccess to a secret-bearing.envfile;plugins/tool-budget.tsnudges verification over exploration (it never blocks a call).prompts/agents/conductor.txtputs hard rules in the first lines, the routing table second, and six worked few-shot examples showing User →taskcalls with explicit wrong-way contrasts;instructions/subagent-routing.mdenforces a Task-first gate before direct inspection.
- Plain request:
conductorconsults the routing table and dispatches the matching specialist via Task. @agentmention: manually invokes a specific subagent in the conversation.- Slash command: forces a subtask with a configured template, e.g.
/plan,/tdd,/security.
Agents
Defined in opencode.jsonc under agent — 26 entries: the primary plus 25 subagents. build and plan are built-in overrides and ship disabled.
| Agent | Access | Role | Trigger notes |
| ---------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------- | --------------------------------- |
| conductor | read-only | Primary orchestrator. write/edit denied; every change routed via Task. | Default agent — always on |
| planner | read-only | Plan + risks + phased order before large changes. No edit. | Complex features, unclear order |
| architect | read-only | System design, scalability, cross-module boundaries. | High-impact design decisions |
| coder | writable | Pure non-test implementation. Build+lint+standards self-check before reporting. Socratic ambiguity gate. | Any source-code change |
| writer | writable | Docs/markdown/HTML/text artifacts. Refuses source files. | Prose, README, ADRs, reports |
| code-reviewer | read-only | General diff/PR review. Findings only; fixes go to coder. Owns /cop-review. | Review requests |
| comment-judge | read-only | Rubric verdict on added/changed comments; REVIEW (diff) or PURGE (directory). Emits JSON. | Comment review / purge |
| haruspex-commentorum | writable | Comment-deleting purge agent. Applies agreed verdicts. | Triggered-only by purge flow |
| ecosystem-auditor | read-only | Evidence-first audit of OpenCode/Claude parity and harness coherence. | /ecosystem-audit, parity checks |
| angular-cop | read-only | Angular + TypeScript pre-merge review (signals, RxJS, flurryx, TS strict). Runs tsc + lint. | Angular PR review |
| dotnet-cop | read-only | .NET 10 Minimal API review (ports/adapters, modular isolation, EF Core). Runs build + dotnet format. | .NET PR review |
| gdpr-specialist | read-only | GDPR/CNIL compliance review (consent, cookies, PII, retention, transfers, 72h breach). | Privacy-sensitive features |
| security-reviewer | read-only | OWASP/secrets/deps review. Reports vulnerabilities; fixes routed to coder. | Auth, input, endpoints, secrets |
| tdd-guide | writable (tests)| RED → GREEN → REFACTOR + 80% coverage. /tdd refactor pins current behavior with characterization tests that already pass. Delegates impl to coder. | New features, bug fixes, refactors|
| build-error-resolver | writable | Fixes build/typecheck/lint/TS errors with minimal diffs. | Red build or lint |
| e2e-runner | writable | E2E tests from the project override or a discovered runner. | Browser journeys |
| doc-updater | writable | Generated docs + codemaps. | /update-docs, `/update-c
... (README truncated for length)