# Automaton Guard Plugin **Harness**: OpenCode (`@opencode-ai/plugin`) **Status**: Active **Enforcement**: Pre-edit (`tool.execute.before`) Blocks file modifications (`edit`, `write` tools) when no automaton task is in implement or doc_review phase. Calls `status.py --can-edit --file --json` before every edit. ## Installation The framework install/update scripts auto-register this plugin in `~/.config/opencode/opencode.json` (or `opencode.jsonc`): ```json { "plugin": ["~/.automaton/plugins/automaton-guard"] } ``` ## Other Harnesses | Harness | Plugin | Status | |---------|--------|--------| | OpenCode | `plugins/automaton-guard/plugin.ts` | ✅ Active | | Pi Dev | `plugins/automaton-guard-pi/guard.ts` | ✅ Active | | Other | N/A | N/A | To add support for a new harness, create a plugin in `plugins/` that calls `status.py --can-edit --file ` before tool execution, matching the `contracts/harness-integration.md` specification. ## Enforcement Layers | Layer | Mechanism | Harness scope | |-------|-----------|---------------| | Pre-edit | This plugin | OpenCode only | | Pre-commit | `scripts/git-hooks/pre-commit` | All git projects | | Pre-push | `scripts/git-hooks/pre-push` | All git projects |