Design the control system around an autonomous agent - locked vs editable surfaces, tight ungameable feedback loops, durable append-only logs, novelty gates, rollback, and human approval boundaries.
---
name: Harness Engineering
description: Use when designing autonomous agent harnesses - research loops, evaluation scaffolds, locked and editable surfaces, durable logs, novelty gates, pruning, rollback, PR preparation, and human approval boundaries.
---
Harness engineering designs the control system around an agent: what it may edit, how it gets feedback, where it persists state, how it recovers, and who approves irreversible actions.
## Workflow
1. Define the harness boundary with four surface classes: Locked (eval metric, rubric, merge policy - readable, never self-scorable), Editable (drafts, prompts, configs under test), Append-only (results logs, rejected ideas), and Human-controlled (merge, deploy, credentials, destructive ops).
2. Build tight feedback loops that are fast, unambiguous, and hard to game - Karpathy's autoresearch pattern: one editable file, one locked eval, fixed wall-clock budget, one scalar metric, git rollback, durable log. For open-ended work, swap the scalar for locked rubrics, structure checks, source traceability, and human-review thresholds.
3. Externalize durable state to files (plans, source queues, results, failures, handoffs) so future agents resume without chat history.
4. Enforce search discipline so the agent can't exploit the nearest surface - add novelty gates, ablation, pruning, and rollback.
5. Gate irreversible actions behind explicit human approval.
Full skill & source: https://github.com/muratcankoylan/Agent-Skills-for-Context-Engineering/tree/main/skills/harness-engineering