Reference¶
Patterns, frameworks, and reusable components for building and evolving your AI Agent Harness system.
Rules & Frameworks¶
-
14 cognitive rules for faithful LLM outputs, organized into 5 phases (READ, WRITE, VERIFY x2, SIGN-OFF). Each rule cites peer-reviewed research.
-
The pattern for turning failures into structural enforcement: failure to learning to rule to audit check to hook.
-
Every file edit triggers: "Is this scattered information that belongs in a consolidated file?" Structurally enforced by
on_edit.pyhook.
Patterns¶
-
Bidirectional feedback between rules and audit checks. Structurally enforced:
cross_check.pygenerates write-back suggestions for persistent drift. Neither side is a dead end. -
After completing any task, re-run at least one verification command. Structurally enforced:
on_stop.pyblocks exit if infra files were edited after the last check. "I did it" is not "it's done." -
On-demand infrastructure and quality checks. Run standalone or integrated with the stop hook. Uses the same validator framework as startup checks.
-
Persistent backlog and session handoff — pick up where you left off across sessions without losing context or forgetting tasks.
Guides¶
-
YAML-to-SQLite translation for every construct in the course: config, rules, checks, tier2 triggers, backlog, and cross-check.
-
Your first 5 rules in ~15 minutes. Walks through identifying repeated mistakes and turning them into tier1 rules that make the hooks useful.