Files
automaton/plugins/README.md
T

41 lines
1.2 KiB
Markdown
Raw Normal View History

# 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 <path> --json`
before every edit.
## Installation
The framework install/update scripts auto-register this plugin in
`~/.config/opencode/opencode.jsonc`:
```json
{
"plugins": ["~/.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 <path>` 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 |