Expert agent system for OpenCode — 42 primary expert agents + 36 cluster specialists (security, code-review, performance, onboarding, game dev), 51 skills, a 4-mode SDLC workflow, full git lifecycle management, and 79 automated validators that enforce quality gates at every phase. Works with cloud frontier models and small local models (32k LM Studio/Ollama) via tier detection, compact agent variants, and capability-probed delegation.
Not sure which command to run? Just describe your goal: /guide is the front door — it routes any plain-English goal ("securely check all my source and help fix the issues", "this codebase is unfamiliar", "harden before launch") to the right expert and drives the workflow, always offering the next step.
Sibling project: attest-claude — same experts for Claude Code, generated from this repo.
Starting from a fresh machine? You need git to clone this, so that one step
is on you — everything after it the installer offers to install for you (Node,
jq, compilers, MCP servers).
# fresh WSL / Ubuntu / Debian
sudo apt-get update && sudo apt-get install -y git curl ca-certificates
# Fedora / RHEL: sudo dnf install -y git curl ca-certificates
# Arch: sudo pacman -S --noconfirm git curl ca-certificates
# Alpine: sudo apk add git curl ca-certificates
# macOS: git ships with the Xcode command line tools (xcode-select --install)Then:
git clone https://github.com/bpmforge/attest.git
cd attest
./install.shThat gives you main — the newest state, which can contain work landed since the last release.
To install a specific release instead (pick the version from Releases):
git clone --branch v3.12.0 --depth 1 https://github.com/bpmforge/attest.git
cd attest
./install.shOr, in a clone you already have:
git fetch --tags
git checkout v3.12.0 # prints a "detached HEAD" notice — that is expected
./install.shmain vs a tag: main moves with every push; a tag (v3.12.0) always points at the same commit. Use a tag when you want a fixed, CI-verified state; use main for the newest work. The "detached HEAD" notice on checkout is normal and installing works fine — you only need a branch if you intend to edit: git checkout -b my-fix v3.12.0. Go back to the latest with git checkout main && git pull.
install.sh records what it installed to experts-version in the install directory, so you can always tell which one is active.
OpenCode v1 and v2. attest supports both majors, which load different plugin, tool and agent shapes, so install.sh detects the major from opencode --version (override with OPENCODE_MAJOR=1|2; with no opencode on PATH it warns and installs the v1 set; any other major is refused) and installs exactly one set. v1 gets plugins/*.ts and tools/*.ts. v2 gets the plugins-v2/<name>/ plugin directories (the tools are registered by the expert-hooks plugin through ctx.tool.transform) and agents built by node scripts/build-agents.mjs --build --target opencode-v2 (disable→disabled, prompt→system, permission→permissions, maxSteps→steps). Both sets share the pure logic in plugins/lib/. experts-version has two lines: the attest version, then opencode-major=N; doctor.sh prints OpenCode vN detected · plugins: <set>. v2 contracts verified against @opencode/plugin 2.2.5 and a real opencode 2.2.5 binary (shells type-check strictly in npm test; load, tools, guards, truncation, telemetry, anchor and compaction request smoke-run against a fake provider): opencode run has no --dir (the project is the cwd) and takes --auto for unattended runs; v2 built-ins are shell (not bash) with a path argument; opencode.json uses mcp.servers, disabled and a permissions array, which install.sh now writes. Still to verify on a Mac: a real-model smoke and the LM Studio prefix-cache probe. See docs/reviews/MANIFEST_V1b-opencode-v2-contracts.md.
Common flags: --project (install into .opencode/ instead of global), --compact (overlay compact agent variants for 32k local models), --tools (install the optional code-analysis tools — semgrep, knip, vulture, mmdc, …), --link (symlink for dev), --opengrep (alias --semgrep), --memory, --no-game, --no-code-search, --no-playwright-search, --uninstall, --version; ./install.sh --help lists them all. Requires macOS, Linux, or WSL2. Use opencode ≥ v1.2.11 — older builds stop after every tool call on OpenAI-compatible/local endpoints (the finish_reason:"stop" bug, fixed in PR #14973); doctor.sh warns on older versions.
Verify the install:
~/.config/opencode/scripts/doctor.sh # structure, deps, config, model backend, agent discovery
~/.config/opencode/scripts/check-tools.sh # which optional analysis tools are present (add: --install)Status: HEALTHY means everything works. Re-run any time something feels broken.
One command, from your existing checkout:
./install.sh --updateIt fetches releases, moves this checkout to the newest one, reinstalls, and tells you what it moved from and to. Works whether you're on main or pinned to an older tag, and it's safe to run when you're already current. Follow with doctor.sh.
It stops without changing anything if you have uncommitted edits to tracked files, and shows you which — so it can't quietly discard your work. (Untracked files are left alone.)
Prefer to track main by hand? git pull && ./install.sh still works — but note git pull is a silent no-op if you're on a tag, which is exactly the trap --update avoids.
Two ways to start:
/guide # describe any goal in plain English
/sdlc init my-project "short description" # or go straight to a workflow
Plain English routes automatically — /guide (or the SDLC lead) detects intent:
| You say | Runs |
|---|---|
| "I don't know where to start / what can this do?" | /guide |
| "build a new app" | /sdlc init |
| "build a game" | /sdlc init --game |
| "understand this codebase" | /sdlc onboard |
| "add X feature" | /sdlc feature |
| "review / audit / find gaps / make it better" | /sdlc improve |
| "securely check my source and help fix it" | /security --fix |
| "is there code nothing uses?" | /review-code (dead-code dimension) |
| "make the UI actually match the design / show me it's right visually" | /design-iterate |
| "make this as good as — keep going until it beats it" | /gauntlet |
| "a wave of tickets just landed — review what they add up to" | /wave |
| "keep going until metric X passes / budget Y runs out" | /goal |
| "look at what's left, pick the path, and auto-run the product to completion" | /autopilot Field-proven 2026-09-01: a two-ticket product driven end-to-end (OpenAI terra codes, luna reviews, runtime verified, merged, board drained) — the PRIMARY agent kicks off, tracks, and reconciles it per the skill's OPERATE section; handoffs only where the ladder names one. |
/guideconcierge — front door that routes any goal to the right expert.- Security find-and-fix —
/securityaudits all source;/security --fixdrives a verified remediation loop (fix → re-scan to confirm closed, never the model's say-so). - 9-dimension code health including a dead-code/stub/unused-export detector.
- Deterministic scaffolding —
run-plan.mjs(DAG runner for decomposed tasks),fix-verify.mjs(re-verify gate),mermaid-fix.mjs+ render-validated diagrams. Scripts own control flow and verification; models do the judgment work — which keeps heavy jobs reliable on small local models. - Unattended Phase 4 — the conductor (
scripts/conductor/) works aplan.jsonboard on its own: claim → code in an isolated worktree → review on a different model → runtime verification → merge → next. Reviewers are triggered by what the diff touches (auth pulls in security, queries pull in perf), every landed ticket carries its own review documents, a failed one goes back toreadywith its evidence preserved, and a chain of startup gates (model roles, board lint, remote sync, baseline verify, resume drift) refuses a bad board before a single model call. See docs/UNATTENDED_EXECUTION.md. Planning stays interactive — the Discovery Interview is NEVER-AUTO. - Any LLM — tier detection, compact agent variants (
dist/compact-agents/, install with--compact), capability-probed delegation (agents/shared/EXECUTOR_SELECTION.md— HANDOFF, never a naive spawn), a plan-strong/execute-cheap tier split (MODEL_ADAPTER.mdRule 5), checkpoint/revert recovery (CHECKPOINT_REVERT.md), and a local-model picks + runtime-gotchas playbook (references/local-agentic-models.md). - Eval suite —
npm run evalsruns the pipeline against fixture repos with planted defects (evals/).EVAL_MODEL=<provider/model>pins a model per run andnpm run evals:compareproduces a tiered frontier-vs-local lift / gap / cost report (outcome-based scoring, sandboxed agent runs);npm run evals:statusshows live sub-agent fan-out. Protocol changes and model choices are measured, not vibed. - Token budget by design (v3.14) — two review tiers: per ticket, deterministic scans (
scripts/scan/collect.sh, incremental since the last full run by default,--fullto force a whole-tree scan) + one lean diff review + a script-run runtime gate (a model is spent only on a FAIL); once per branch, the full security / code-health / perf audit runs concurrently andvalidate-release-readiness.shrefuses a release without a fresh APPROVED summary. Sessions carry a turn budget with same-worktree continuation, tool results are bounded by the plugin, and HANDOFF pointers are printed byhandoff-emit.sh(lint + verbatim tool output) instead of typed. Measured baseline and the plan:docs/work/TOKEN_OPTIMIZATION_PLAN.md. - Telemetry — every completed assistant message logs real token/cost actuals to
docs/work/telemetry.jsonl(plugin hook; counts only, never content;EXPERTS_TELEMETRY=0to disable).npm run telemetry:reportturns the data into tuned tier budgets, timeouts, and escalation thresholds.
Full index: docs/README.md.
- docs/SETUP.md — start here: prerequisites, embedding models, env vars, troubleshooting
- docs/USERGUIDE.md — how to invoke each expert
- docs/FEATURES.md — full agent, skill, validator, and protocol catalog
- docs/SDLC_GUIDE.md — SDLC workflow, phases, git model, and traceability chain
- docs/flows/ — process-flow diagrams: request routing, new project, onboarding, feature/improve, security, code-health/perf, the unattended conductor, and the HANDOFF/gate protocols
- docs/UNATTENDED_EXECUTION.md — running Phase 4 coding tickets unattended: the conductor, its startup gates, diff-triggered reviewers, Jira mirroring, and what to check before pointing it at a large board
- docs/LOCAL_LLM_GUIDE.md — running on local models (tiers, compact variants)
- docs/CONTRIBUTING.md — adding agents or skills (and the single-source build for attest-claude)
- Security hardening — stop project/downloaded plugins from autoloading in OpenCode v2.2.3+ (
./install.sh --harden), what it does and does not protect - Releases — release notes for each version; CHANGELOG.md has full entries for 1.x–2.12.0 and 3.4.0 onward, and a per-tag summary table for 2.13.0–3.3.1
Apache License 2.0 — Copyright 2026 Bradford Matthews.