OpenCanon

Agent-ready. Human-readable. Runtime-enforced.

Hooks

Hooks connect agent write events to OpenCanon feedback. They call the runtime, then return scoped findings and next steps to the agent.

Supported hosts

  • Claude Code: PostToolUse feedback hook.
  • OpenCode: post-write feedback hook.
  • Codex: PostToolUse feedback hook.

Install

hook install
sh
opencanon hook install --all --dry-run
opencanon hook install --all

--dry-run prints the planned configuration without writing.

What the agent sees

Hooks return findings: rule, severity, location, Project Canon references, impacted surfaces, related Changes, and optional fix suggestions. The agent reads them as tool output.

Failure mode

Hooks fail fast. If the service, project runtime, or engine is missing, the hook reports a diagnostic instead of doing a partial run.