A Claude Code plugin, with an adapter for OpenCode, that steers ordinary coding requests toward readable, maintainable code, keeps each project's state across sessions, and spends as little context as possible. Works with any model the agent can use.
It provides:
- global engineering rules, injected into every session;
- the project's saved state, injected within a 3000-character budget;
- user-invoked workflows:
start,resume,handoff,impact,learn,review(no context cost until invoked); - three skills the model loads when relevant:
debugging,engineering-risk,review-feedback; - a read-only reviewer subagent;
- a guard that makes the agent ask you before any commit, push or destructive git command.
Manuale utente in italiano: MANUALE.md.
claude plugin marketplace add Stcant/agents-platform
claude plugin install dev-brain@dev-brainRequires python3 and git. Update with claude plugin marketplace update dev-brain. For local development, add the cloned folder instead: claude plugin marketplace add /path/to/agents-platform (read in place).
OpenCode has no plugin marketplace, so one file, adapters/opencode/index.ts, connects it to the same core/: it runs the plugin's own dev-brain-context and dev-brain-guard scripts and builds the reviewer from core/agents/reviewer.md. No rule is copied. Checked with the real binary against a mock model (python3 evals/offline/check.py), not with a real model.
git clone https://github.com/Stcant/agents-platform /path/to/agents-platformThen add the adapter to plugins in ~/.config/opencode/opencode.json (or in a project's opencode.json), with an absolute path:
{ "plugins": ["/path/to/agents-platform/adapters/opencode"] }Requires python3 and git; without python3 the adapter asks before every shell command. Update with git -C /path/to/agents-platform pull, then start OpenCode again; if opencode service status shows a running background server, opencode service restart it too (each new opencode run re-read the edited files here, but a long-running server was NOT RUN). Remove by deleting the entry. Check the install with opencode debug agents: it must list reviewer.
| Claude Code | OpenCode | |
|---|---|---|
| Rules and saved state | every session | main session only, not subagents |
| Workflow call | /dev-brain:start |
@start in the prompt, or ask the agent to load the skill start (the skill tool loads it by id: tested here; the @ form worked in the TUI on the maintainer's machine, OpenCode version not recorded) |
| Workflows cost no context | yes | yes: not in the skill listing |
| Commit, push, branch change | asks you | asks you (seen in the TUI on the maintainer's machine, version not recorded); opencode run cannot ask and refuses; opencode run --auto approves it |
| Reviewer | read-only, reads the diff with git | read-only, reads the diff with git; redirections and --output are denied by name because OpenCode's shell matcher does not parse them |
Tested versions: OpenCode 2.3.2 here and in CI, and 2.4.0 in CI (the newest release when written), through the V2 plugin API; OpenCode 1.x is NOT RUN. The workflow names below are written for Claude Code (/dev-brain:<name>); in OpenCode use the bare name (@start).
Run it once in each repository, from its root. Everything else builds on the two files it creates: resume and handoff read and rewrite the state, every session gets it automatically, and Claude Code and OpenCode read the project facts natively.
- Inspects the real repository: stack, commands, conventions, traps. It does not open data directories (
input/,output/,.env). - Writes or merges the root
AGENTS.mdas a draft, under 40 lines and only what the code does not show: exact commands, project tooling, decisions that differ from defaults, gotchas. No purpose line, stack list or architecture tour: studies find that such overviews add cost without helping the agent. It also creates or reconciles.dev-brain/STATE.md(goal, done with evidence, blockers, next actions, under 3000 characters). - Uses files from the previous kit (
harness/,NOW.md,RULES.md) as input and lists them for you to delete. On hph, 21 KB ofharness/became a 3.1 KBAGENTS.mdand a 1.3 KB state. - Reports observed facts, unknowns, problems and the
AGENTS.mdlines it suggests deleting (it never deletes them). If it sees names like.envorinput/, it also prints the permissiondenyrules you can add yourself; if the repository has a fast check, it prints the Stop-hook line that makes a passing check mandatory before a turn can end. It edits no settings file. Changes no code, installs nothing, commits nothing.
Then read both files, delete the lines the code already shows, fix anything untrue, and commit them yourself if you want them versioned. Until a repository has a state file, the session only gets a one-line hint suggesting start; the global rules apply either way.
Ask the agent to implement or fix what you need. The rules already apply; the workflows support the work.
| Workflow | When |
|---|---|
/dev-brain:start |
First adoption of a repository (see above) |
/dev-brain:resume |
Start of a session: reconciles the saved state with git and the code |
/dev-brain:handoff |
End of meaningful work: rewrites the state with verified results and next actions |
/dev-brain:impact <change> |
Before editing shared code: callers, contracts, tests, unknowns |
/dev-brain:learn <area> |
Explain a real flow or an unfamiliar stack |
/dev-brain:review [scope] |
Review all uncommitted changes through the read-only reviewer, which reads the diff itself with git |
For planning use Claude Code's native plan mode (Shift+Tab): it is read-only by enforcement, which a prompt cannot match.
| Always active | Used when helpful | Requires your explicit decision |
|---|---|---|
| Code-design guidance and self-review of changed code | Impact analysis, independent review, session continuity | Commits, amendments, pushes and branch changes (enforced: Claude Code asks you); unrelated refactors, new dependencies or architecture changes must be proposed first |
- No commit without you: enforced. A
PreToolUsehook (on OpenCode, the adapter) answers "ask" forgit commit(including--amend),push,merge,rebase,cherry-pick,revert,checkout/switch, history-movingreset,clean -f,branch -d/-m/-f,stash drop/pop/clearand tag deletion, even inside chained commands and even when your settings allow git. Read-only git runs normally. - Reviewer read-only: enforced. Its tool list allows Read, Grep, Glob and
git diff/log/show/status; any command that creates, changes or removes files needs your approval. - State budget: enforced. Over 3000 characters only a notice is injected, telling the model to read the file and suggest
handoff. - Everything else is instructed: rules guide the model; they do not guarantee good code.
python3 evals/offline/check.py # CLAUDE / OPENCODE=<binary> if not on PATHInstalls the plugin into a throwaway home, replaces the model with a local mock that records every request, and checks in about 20 seconds, at zero token cost. Claude Code (required): rules and state reach the session, oversized state becomes a notice, workflows expand and stay out of the skill listing, the reviewer reads the diff but cannot write, and commit and push need you even when your settings allow git. OpenCode (run when found; an explicit OPENCODE variable makes it required): the same, through the adapter, plus rules and state staying out of the subagent. GitHub Actions runs it on every pull request (.github/workflows/offline-check.yml, Claude Code 2.1.325 and OpenCode 2.3.2, no secrets); pushes to main, a weekly run and manual runs also test the newest releases. It does not judge model behavior; evals/scenarios/ describes the real-model scenarios and evals/results.md records decisions and evidence.
.claude-plugin/marketplace.json marketplace listing the plugin
core/ the plugin: AGENTS.md rules, skills/, agents/, hooks/, bin/ (context and git guard)
adapters/opencode/ OpenCode adapter over core/
evals/ scenarios, fixtures, results, offline check
MANUALE.md Italian user manual