@oussamadouhou/agent-enforcement
v0.1.9
Published
Evidence enforcement hooks for OpenCode and Claude Code
Maintainers
Readme
@oussamadouhou/agent-enforcement
Evidence enforcement hooks for OpenCode and Claude Code. This package blocks or warns when todowrite tasks are marked complete without the required evidence block, checklist, and trust markers.
Installation
bun add @oussamadouhou/agent-enforcementOpenCode usage
import type { Plugin } from "@opencode-ai/plugin"
import { createEvidenceEnforcementHook } from "@oussamadouhou/agent-enforcement"
const AgentEnforcementPlugin: Plugin = async ctx => {
return createEvidenceEnforcementHook(ctx)
}
export default AgentEnforcementPluginClaude Code usage
Copy the plugin to your Claude Code plugins directory and enable hooks/enforcement.py:
cp -r . ~/.claude/plugins/agent-enforcementThen ensure hooks/hooks.json is configured in your Claude settings.
Configuration
OPENCODE_ENFORCEMENT_LEVELorENFORCEMENT_LEVEL:0(creative),1(standard),2(strict)ENFORCEMENT_LOG_MODE:file|console|silentENFORCEMENT_LOG_PATH: file path for logsENFORCEMENT_LOG_LEVEL:debug|info|warn|error
Evidence format
**Evidence for task-1**:
**Execution**:
- Tool: read
**Verification**:
- Checked output
**Checklist**:
- [x] Tool executed successfully
- [x] Output captured
- [x] Result matches expected
- [x] No workarounds used
- [x] Independently verifiable
**Trust**: 🟢 HIGH | ✅ Ground TruthDevelopment
bun test
bun run build