# Harness spec: Andrii Boiko

How the agent harness behind a ×10 focus multiplier is built. Structure and contracts only; the rules themselves are private.
Adopt what fits your setup.

## Metric
- Focus multiplier: one hour of the owner's focus becomes ten hours of productive agent work (×10).
- Steady output: about 50 PRs a day.

## Layout
- core/: neutral, identical on every machine (rules, skills, agents, hooks, checks). No person, host or account names; a pre-commit leak scan enforces it.
- profiles/<name>/: one per environment (personal, work, ...): identity, connections, its own rules, memory, state.
- Source of truth: git main. A change is worktree -> tests -> rebase -> push, never a force push. Machines pull only after the tests pass on a clean clone.
- install: idempotent, records every file it owns; uninstall removes exactly those. doctor: every check in parallel, ~1.5 s.

## Host and runtime
- Isolated host (VM). Secrets only in the OS keychain, handed to one command by name; never in files, prompts or logs.
- Runtime: Pi. Any provider, any subscription, local models. The UI (T3 Code, desktop and phone) is a window onto files.

## Gates
- One PreToolUse dispatcher routes every tool call to its gates. Crash, timeout or invalid output blocks the call.
- Text to other people: ask with the full text; consent covers that exact text only.
- Destructive steps: a plan, the owner's own words, then the trash with a restore path.
- The live harness is read-only to agents; changes go through a worktree and the tests.
- Subagents are never prompted: the call is denied and handed back to the session.

## Work protocol
- The session orchestrates and decides; subagents execute. Each brief names the outcome and its check.
- One task per session, with a versioned checkpoint. DONE requires evidence: test output, a URL or a record id.
- The owner hears twice: one numbered intake request, then the finished result.

## Context economics
- The model never types what code can read.
- Programmatic tool calling: MCP servers behind one code-mode tool; the agent writes a script, only its result enters the context (cache writes -97%).
- MCP servers start on first call and stop after 2 idle minutes.
- Token budget enforced by a test (fresh session: 12.4k tokens).
- Fresh session from the checkpoint after 1 h idle above 100k tokens, or at a task boundary above 300k.

## Self-improvement
- An owner's correction becomes a rule line at once; git keeps history.
- Weekly review: sessions to memory, stale facts out, budgets, cleanup.
- Rule evals (9 probes) and ~1,700 tests; every harness change reports numbers before and after.

Source: [https://boiko.ai/harness/](https://boiko.ai/harness/)
