The Harness
6 components. 14 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: Time-Window Approval
The commit-msg hook v7 verifies that a .git/COMMIT_APPROVED file exists, is less than 5 minutes old, and matches the commit message. Gate 4 enforces TDD: code files must have test files staged. No SHA256 tokens, no hash math. The agent writes this file only after user says "yes commit" in chat.
Level 4: Manifest Gate
Before a commit approval can be written, a manifest file must exist at .git/COMMIT_MANIFEST. The agent MUST write this file before running commit-approval.sh. This prevents committing without presenting changes.
Pre-Commit Gates (v11)
The pre-commit hook runs 14 checks before every commit:
- 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 Gates (v7)
The commit-msg hook runs 4 gates after the commit message is written:
- TEST_LOG — tests were run and status is PASS
- COMMIT_MANIFEST — manifest exists with files affected
- COMMIT_APPROVED — approval is fresh (<5 min) and message matches
- TDD gate — code files must have test files staged
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 — 58 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 (14 gates, Test Runner), commit-msg v7 (4 gates, TDD enforcement), commit-approval.sh.
- 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 |