Copy-ready harness templates.
The whole harness is a handful of small files in an .agentum-harness/ directory. Copy these into a real repo to start, then shape them to your project. They are the exact files the Agentum Harness Engine reads.
Start with these three. Add init.sh and verify.sh as soon as you have something to set up and check.
.agentum-harness/AGENTS.md
The agent protocol. Short and routing-focused: work one feature, stop and wait for the gate, make the smallest change.
# Harness agent instructions
You are an autonomous coding agent running inside the Agentum Harness Engine.
## How this works
- You are given one feature at a time from feature_list.json. Work only the
feature the harness hands you. Ignore the rest of the backlog.
- When you believe the feature is complete, stop and wait. Do not start the
next feature. The harness controls the queue.
- After you stop, the harness runs the gate (verify.sh).
- Green (exit 0): the feature is locked in and you advance.
- Red (non-zero): you are handed the failing output and must fix it, until
it passes or max_retries is exhausted.
## Ground rules
- Make the smallest change that makes the gate pass.
- Do not edit anything under .agentum-harness/. That is the harness state.
- Keep your work scoped to the repository you were launched in..agentum-harness/feature_list.json
The backlog. Each feature carries a state the engine advances: pending, coding, verifying, ready_to_test, done, or blocked.
{
"agent_tool": "claude",
"agent_yolo": true,
"max_retries": 3,
"features": [
{
"id": "example-feature",
"name": "One sentence describing the feature",
"description": "What the agent must build, specific enough that verify.sh can check it.",
"state": "pending"
}
]
}.agentum-harness/init.sh
The environment smoke test. Runs once before any feature; a non-zero exit aborts the whole run before a single agent is spawned.
#!/usr/bin/env bash
# Environment smoke test, run once before any feature.
# A non-zero exit aborts the whole run. Keep it fast and cheap.
set -euo pipefail
command -v git >/dev/null 2>&1 || { echo "FAIL: git not found"; exit 1; }
# install deps, start services, then prove the world is healthy:
# make setup && make check
echo "OK, environment is ready"
exit 0.agentum-harness/verify.sh
The gate. Run after each feature with the feature id in $HARNESS_FEATURE_ID. Exit 0 advances; non-zero blocks and retries.
#!/usr/bin/env bash
# The gate. Run after each feature, with the feature id in $HARNESS_FEATURE_ID.
# exit 0 -> green: feature passes, the harness advances and writes handoff.md
# exit !0 -> red: advancement is blocked; the agent gets this output, retries
set -uo pipefail
feature="${HARNESS_FEATURE_ID:-unknown}"
echo "gate running for feature: ${feature}"
case "${feature}" in
example-feature)
test -f GREETING.md || { echo "FAIL: GREETING.md missing"; exit 1; }
;;
*)
echo "no checks for ${feature}, passing"
;;
esac
exit 0.agentum-harness/handoff.md
The continuity note. The engine overwrites it after each green feature, so the next session always starts from the latest state.
# Handoff No feature has passed the gate yet. The Agentum Harness Engine overwrites this file after each feature is verified green, so the next session always has the latest state.