1. Detect file edit via PostToolUse hook.
2. Run auto-formatting tools (ruff format, biome, shfmt, etc.).
3. Run linters to collect unfixable violations in JSON format.
4. Delegate fixing to Claude subprocess with tiered model routing (Haiku, Sonnet, Opus).
5. Re-run formatters and linters to verify fixes.
6. Report remaining violations to the main agent, if any.
7. Block edits to linter configuration files using PreToolUse hook.