—
Deterministic Governance Harness — 4-Layer Dual-Harness Lifecycle
Press Play to walk through the flow.
space play/pause   ←→ step   0 overview
sharepointoscar / agent-workflow-skills · harness 4-LAYER DUAL-HARNESS Deterministic Governance Harness External lifecycle hooks, context budgets & circuit breakers for Claude Code + Antigravity AI CODING AGENTS Claude Code hooks/hooks.json (9 events) snake_case stdin Bash · Write · Edit · Agent Antigravity (agy) synced hooks.json + 4 MCPs camelCase protojson run_command · invoke LAYER 4 · LOOP RUNNER Fresh-Pass Execution scripts/loop.mjs 6 Hard Circuit Breakers • maxPasses · maxWallMs • maxTurns · maxToolCalls • maxTokens · no_progress HELD → waiting_for_person ADAPTER Dual-Harness Translator lib/antigravity.mjs Inbound Normalizes tool names, MCP prefixes & errors Outbound Claude: null / ask / deny agy: allow / force_ask / deny HARNESS ENGINE · plugins/harness LAYER 1 · PRETOOLUSE GUARDRAILS rules-tool blocks git add ., main commit, --squash gates.mjs denies push main · holds gh pr merge retry.mjs stops 4th identical failing retry graph/check file freezes, proof-of-done & rounds Runs synchronously before every shell/write tool call LAYER 2 · PROMPT HYGIENE & EVALS brief.mjs gates Agent / invoke_subagent briefs Required: Mission · Files · Tests · Escalation prompt-eval captures failing transcripts for A/B Plain-English assertions → deterministic KEEP or REVERT LAYER 3 · CONTEXT WINDOW BUDGET context.mjs PostToolUse · PreCompact · Stop measure per-call peak ratio & top tool bloat trim & pack head+tail trim & relevance budget receipt.mjs auto change receipt on Stop Warns at 70% window · snapshots before compaction DETERMINISTIC VERDICTS ALLOW tool executes normally HOLD ask / force_ask human DENY blocked + rule quoted AUDIT & TASK STATE ~/.claude/harness/ • receipts/ (per branch / issue) • state/ · check/ · graph/ (MCP) • context/ (window ledgers) Optional root lock: immutable via sudo AUTOMATED CI & PARITY scripts/test-harness.mjs • --tier fast (~16s) · parity (~5s) • Claude vs Antigravity contracts • GitHub Actions: 4-shard matrix 123+ sandboxed suites · zero mocks 1 stdin 2 PreTool 3 brief 4 verdict 5 ledger 6 fresh pass
sharepointoscar/agent-workflow-skills · Same governance rules enforced identically in Claude Code and Google Antigravity (agy)