The Harness
6 components. 15 gates. Zero shortcuts. Agent = Model + Harness.
Level 1: Process Rules
Agent remembers rules from AGENTS.md. Load-bearing for simple tasks, but fails when attention drifts.
Level 2: Visible Manifest (Guardian Pattern)
Before any mutation (commit, push, merge, rebase), the agent must present a DECISION POINT block, explain rationale, and wait for explicit approval. Invalid responses like "ok" and "continue" are rejected.
Level 3: TDD Enforcement
The commit-msg hook (v6) runs a single TDD gate — code files need matching test files. No override mechanism exists. The pre-commit hook checks .git/DECISION_APPROVED and warns if missing. The user runs git commit directly.
Pre-Commit Gates (v11)
The pre-commit hook runs 15 checks before every commit:
- Gate 0: DECISION_APPROVED — token exists and is fresh (<10 min)
- Branch check — not on detached HEAD
- Staged changes — something is staged
- Remote sync — no unpulled remote changes
- HTML integrity — staged HTML files have required structural markers
- Override escalation — 3 overrides on a branch triggers review
- Skill gate — skills were consulted before implementation
- Build verification — shell scripts have valid syntax
- Anti-slop — no generic AI-generated patterns detected
- Debug tracking — fix/debug commits tracked, escalates at 3
- SPEC enforcement — warn on new scripts without spec update
- Progress status validation — skill table must match file system
- Skill lint — validate skill structure on SKILL.md changes
- Eval gate — run evals, dashboard, and regression on changed skills
- Test Runner — runs tests/run-all.sh, blocks if any suite fails
Commit-Msg Gate (v6)
The commit-msg hook runs 1 gate (TDD enforcement) after the commit message is written:
- TDD gate — code files must have test files staged. Name-pairing check (test name matches code) + new-test enforcement (at least one staged test is new).
The Harness Architecture
A harness is the mechanical infrastructure that enforces agent behavior. This project implements 6 harness components that turn "please follow the rules" into "you literally cannot break them":
- 1. Instructions & Rules — AGENTS.md, SOUL.md, STEERING-GUIDE.md.
- 2. Tools — 57 skills loaded on demand via skill gate.
- 3. Sandboxes & Execution — Terminal, git workspace, CI.
- 4. Orchestration — skill-gate.sh, init-agents.sh, multi-agent patterns.
- 5. Guardrails & Hooks — Pre-commit v11 (15 gates including Gate 0, Test Runner), commit-msg v6 (TDD gate — no override).
- 6. Observability — project-metrics, HEALTH-CHECK.md, PROGRESS_STATUS.md.
Incident History
Four Rule 12 violations documented, each producing mechanical enforcement:
- INCIDENT_001: Agent committed without approval → Added visible manifest requirement
- INCIDENT_002: Agent bypassed manifest → Added time-window approval (replaced SHA256 tokens)
- INCIDENT_003: Agent generated tokens without real approval → Added mandatory manifest gate
- INCIDENT_004: Agent committed directly to main with SKIP_TEST_RUNNER bypass → Added main branch protection + logged test bypass + commit-approval branch check
Honest Limitations
These gates create friction, not guarantees. The hooks enforce git operations, but cannot prevent the agent from generating tokens without presenting the manifest, interpreting ambiguous responses as approval, or pushing without asking. The human must stay alert.
Scripts Reference
Key scripts that enforce the workflow:
| Script | Purpose |
|---|---|
commit-approval.sh | Write commit approval (requires manifest, time-window checked) |
edit-guard.sh | Verify file structural integrity |
pre-flight.sh | Check git state before editing |
skill-gate.sh | Verify skills were consulted |