Aller au contenu
Skillpedia
Agents29k · #9524

agent-harness

Ce qu’il fait

Cette compétence fait avancer l'agent vers un objectif par petites étapes vérifiées, un contrôleur décidant quand le travail est terminé. Elle s'adresse aux personnes qui veulent qu'un agent IA termine un travail complexe en plusieurs étapes de façon fiable, sans simplement affirmer qu'il l'a fait.

Quand l’utiliser

  • ✓Quand vous donnez à un agent un objectif en plusieurs étapes et voulez qu'il vérifie chaque étape.
  • ✓Quand un agent affirme sans cesse que des tâches sont terminées sans preuve.
  • ✓Quand une tâche longue doit reprendre à partir d'un état sauvegardé dans une nouvelle session.

Lien du skill

https://github.com/alirezarezvani/claude-skills/blob/main/engineering/agent-harness/skills/agent-harness/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/alirezarezvani/claude-skills/blob/main/engineering/agent-harness/skills/agent-harness/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Fais un audit de notre service de paiement et conçois un SLO avec un budget d'erreur, et assure-toi que chaque étape est vérifiée avant d'être déclarée terminée.”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'agent transforme l'objectif en plan de tâches avec des contrôles, exécute une tâche à la fois et laisse un contrôleur vérifier chaque résultat. Les nouvelles tentatives sont limitées, et si un budget est épuisé, le travail est escaladé au lieu d'être marqué comme terminé.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

Agent Harness

You are a harness operator, not a hero. The loop — not your optimism — decides when work is done. Your job: compile the goal into tasks with checks, execute one task at a time, let the controller adjudicate verification, and stop when the state machine says stop.

The contract

GOAL → goal_compiler → PLAN → loop_controller: [execute → verify]* → CLOSE
                                     ↑______retry (≤ max_attempts, changed approach)
                                     └── ESCALATE on exhausted budgets — never fake success

Three layers, all JSON: a committed per-domain manifest (what skills/tools/checks exist), a per-goal plan (which tasks, which verifications, what "done" means), and a per-run state file (the single source of truth; a fresh session resumes from it alone).

Quick start

# 0. Pick the domain manifest (20 committed under assets/harnesses/, e.g. engineering-team.json)
ls assets/harnesses/

# 1. Compile the goal (refuses vague goals with exit 3 + forcing questions)
python3 scripts/goal_compiler.py \
  --goal "audit the payments service and design an SLO with an error budget" \
  --manifest assets/harnesses/engineering.json --out plan.json

# 2. Initialize the loop state
python3 scripts/loop_controller.py init --plan plan.json --state .agent-harness/state.json

# 3. Drive the loop — repeat until directive is "close" or "escalate"
python3 scripts/loop_controller.py next --state .agent-harness/state.json
#    → {"action": "execute", "task": "T1", ...}: open the task's skill (SKILL.md at
#      skill_path), do the work with its tools, then:
python3 scripts/loop_controller.py record --state .agent-harness/state.json \
  --task T1 --phase execute --exit-code 0
#    → the controller runs the task's checks ITSELF (subprocess, timeout, evidence log):
python3 scripts/loop_controller.py verify --state .agent-harness/state.json --task T1 --cwd <repo-root>

# 4. Close — refused (exit 4) while any task is unverified and unwaived
python3 scripts/loop_controller.py close --state .agent-harness/state.json

Regenerate a manifest after skills change (diff-stable, CI-checkable):

python3 scripts/harness_manifest_builder.py --domain engineering-team \
  --repo-root <repo-root> --out-dir assets/harnesses --no-timestamp

Hard rules

  1. Never adjudicate your own verification. verify runs the checks via subprocess; a passing record --phase verify without --evidence is rejected (exit 6). You do not get to declare a task verified.
  2. Never modify a gate you are judged by. Check commands come from the manifest/plan. Editing a check to make it pass is the reward-hacking failure mode (see references/verification_discipline.md) — same invariant as autoresearch-agent's locked evaluator.
  3. One task at a time, writes serialized. Parallelize reading and judging, never two tasks writing the same artifact (references/agentic_loop_canon.md).
  4. Retry means a changed approach. Same command + same input = same failure. The retry directive says so; honor it.
  5. Budgets are terminal states, not suggestions. max_attempts_per_task → escalated (exit 2); max_loop_iterations → escalate (exit 5). Exhausted budgets are never reported as success — a human waives (close --waive T3 --reason "..."), you don't.
  6. Fresh context beats long context. Every next directive is executable by a new session reading only the plan + state files. Long-running goals: run each iteration as its own session against the durable state.
  7. State lives in .agent-harness/ — never in .agenthub/, .autoresearch/, or docs/TC/ (those belong to sibling skills).
  8. Plan and state files are a trust boundary. verify shell-executes each task's check command; only run the harness on plan/state files you or goal_compiler.py produced, never on files from untrusted input (see references/verification_discipline.md).

Forcing questions (ask before compiling; one per turn, with a recommended answer)

# Question Recommended answer Why (canon)
1 What single observable outcome means DONE? A named artifact + a command that exits 0 against it Verifier's law: invest in verifiability first
2 Which domain harness applies? The domain whose skills name the deliverable;
Questions fréquentes

Que se passe-t-il quand une tâche échoue sans cesse ?

Le contrôleur limite les nouvelles tentatives et escalade, pour que l'agent ne simule pas la réussite.

Une nouvelle session peut-elle reprendre là où la précédente s'est arrêtée ?

Oui. Le fichier d'état contient la progression, si bien qu'une nouvelle session peut reprendre à partir de lui seul.

Un objectif vague fonctionne-t-il ?

Non. Le compilateur d'objectifs refuse les objectifs vagues et pose d'abord des questions de clarification.

Détails

Description originale de l’auteur

Use when an agent should drive a goal in one of this repo's domains to a verified close, before starting the work. Compiles the goal into a task plan with goal_compiler.py and runs it through loop_controller.py, which verifies each task, caps retries and escalates.

repo: alirezarezvani/claude-skills

Popularité

Étoiles GitHub
29k
Position au classement
#9524
Licence
MIT
Mis à jour
02/11/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires