@accidentally-awesome-labs/opencode-bestest
v0.8.0
Published
OpenCode head for the bestest plugin: guard/lock/syntax enforcement shelling into the shared bash hooks, passive state injection, and an installer for skills/agents/commands.
Readme
opencode-bestest
The OpenCode head of the bestest plugin — one compact lifecycle (P0 interrogate → P5 ship) with physically enforced gates: spec freeze, design-contract freeze (frozen DESIGN.md for anything with a visible interface), TDD test locks, destructive-command guard, and drift detection.
Install (per project)
cd your-project
bunx @accidentally-awesome-labs/opencode-bestest init # or npxinit is idempotent (re-run it to update) and supports --dry-run and --global (skills/agents/commands into ~/.config/opencode/). It:
- copies the lifecycle skills into
.opencode/skills/(prefixedbestest-*) - installs the plan-checker / researcher / reviewer / builder agents (pointer stubs — their canonical bodies ride the payload, so
--globalinstalls need a projectinitbefore the roles resolve) and/bestest-go+/bestest-statuscommands - copies the runtime payload (guard scripts,
trace.sh+gate.sh, templates, canonical agent bodies) to.opencode/bestest/ - wires
opencode.json: the@accidentally-awesome-labs/opencode-bestestplugin (enforcement) and aninstructionsentry that passively injects.bestest/.context.md— the plugin-maintained digest of STATE + LOCKS + active card + DRIFT notice
Then open opencode and run /bestest-go.
Update
bunx @accidentally-awesome-labs/opencode-bestest@latest initThe explicit @latest matters: bunx caches per-package manifests in $TMPDIR, and a stale one can make a freshly published version unresolvable ("No version matching … but package exists"); bun pm cache rm does not clear it — delete the $TMPDIR/bunx-* directory for this scope if you hit it. init is idempotent: it refreshes the skills, agents, commands, and runtime payload in place. Run it in every project using the plugin — the payload is vendored per project. After a version jump, check the repo's MIGRATION-v*.md for that release before resuming in-flight work.
What the plugin enforces
| Tool call | Script | Outcome |
|---|---|---|
| bash | guard.sh | destructive commands (rm -rf /, git reset --hard, force-push to main, …) → blocked |
| write / edit / apply_patch | lock-guard.sh | writes to the frozen SPEC/DESIGN.md or locked test files → blocked with the amendment path |
| session.idle | session-start.sh stop | drift snapshot; next session's digest carries a DRIFT notice if the tree changed out-of-band |
The bash scripts are byte-identical to the ones the Claude Code and Codex heads run — one guard implementation, three harnesses. Guards fail closed: no bash (install Git Bash on Windows) means guarded tools are refused, not waved through.
Dev/source install (no npm): clone the repo, then in your project's .opencode/plugins/bestest-dev.ts:
export { BestestPlugin } from "/path/to/the-bestest-agent/adapters/opencode/src/index"