A standing order for autonomous agents
Nothing reaches main until four conditions all hold.
An install-once operating contract for a fleet of autonomous coding agents. Safety is mechanical, not a vibe — drop it into any repo and the orchestrator, the loop, and the merge gate come with it.
All four conditions must hold; the output to main stays bolted shut until every latch reads green. The owner vetoes any pending merge with hold:owner.
What it is
A contract you can read, audit, and provision.
The harness packages the full operating contract that lets Claude Code — and other agent runtimes — run a real project autonomously, under rules that are checked, not hoped for.
Everything is project-agnostic. The template files carry {{TOKEN}} placeholders that install.sh bakes in from your harness.config — project name, owner, branch, package manager, gate commands, labels. Configure once; install per repo.
- orchestrator contract
CLAUDE.md/AGENTS.md— five hard rules, model-tier policy, delegation tree, backlog hygiene, memory. - epic fleet loop
.agents/harness/fleet-loop.md— Scout → Implementer → Reviewer → Backlog-sync, gate and idempotency contract. - autonomous routine
.agents/routines/— drives the loop on a schedule. - dev workflows
.claude/workflows/*.js— adversarial review, feature implementation, bugfix sweep, test coverage, and a meta-review of the workflows themselves. - frontend-design skill
.agents/skills/frontend-design/— a reusable design quality floor. - github templates & ci
.github/— PR template, issue templates, CodeQL.
# configure once, install per repo
cp harness.config.example harness.config && ./install.sh /path/to/your/target-repo
The five hard rules
Non-negotiable. They override convenience.
The spine of the contract. They apply to the orchestrator, every subagent, and every routine tick alike.
No AI attribution. Anywhere.
Never attribute code, docs, commits, trailers, co-authors, issues, or PRs to an LLM. Local commits carry the configured human git identity; PRs and issues, the real GitHub account.
no Co-Authored-By: AIConventional Commits, always.
Every commit message and PR title uses a type from one closed set — and nothing outside it.
feat · fix · docs · chore · refactor · test · perf · ci · build · revertPR template, always.
Every PR body uses the template; the quality-gate and backlog-sync checkboxes are filled truthfully.
.github/PULL_REQUEST_TEMPLATE.mdIssue templates, always.
Epics and children use their templates, kept in lockstep with feature_list.json — designed so a routine can pick them up unattended.
Squash-merge only, via a PR, under the gate.
Every change reaches main through an open PR. Merges run autonomously only when the four-condition gate holds — sub-issue PRs into the epic branch, and the epic→main PR.
gh pr merge --squashThe epic fleet loop
Four roles, in order. Each tick advances at most two issues.
The heartbeat. Each unblocked sub-issue flows through the same pipeline, cheapest tier that fits at every stage.
Scout
Locate the files in scope, confirm the issue is actually unblocked, report a crisp task spec.
Haiku / ExploreImplementer
Builds the change in an isolated per-issue worktree, on feat/<issue#>-<slug> forked from the epic branch.
SonnetReviewer
Adversarial, multi-lens review — correctness, security, scope. Findings fixed or cleared by a different agent. Verdict posted as PR comments.
OpusBacklog-sync
Keeps the GitHub issue and feature_list.json in lockstep with reality — status, links, labels — in the same change.
↻ per tick · selects open epic-labeled issues · walks sub-issues in dependency order · cap ≤2 to bound blast radius
Model-tier policy
Use the cheapest tier that fits.
Quality is gated without burning the expensive tier on typing.
| Tier | Use it for |
|---|---|
| Opus | Planning, architecture, code review, design / drift gates. |
| Sonnet | Most implementation work, backlog sync, doc writing. |
| Haiku / Explore | Trivial or mechanical tasks, recon, scouting, search, file location. |
Safety mechanics
Mechanical, not aspirational.
Every create action is at-most-once and keyed on one thing, so reruns resume instead of clobbering.
= issue number
Branches, worktrees, PRs, and labels are all guarded against duplication before creation. Reruns resume from existing PR/issue state.
isolated git trees
Each implementer builds in its own worktree under the worktrees root, on its own branch — concurrent work never collides.
lock:run-<id>
Per-run locks plus status labels (fleet:queued / in-progress / review / blocked) coordinate overlapping ticks.
≤ 2 issues / tick
A tick advances at most two issues. A red gate or a hold:owner / fleet:blocked label stops it and hands the decision back to the owner.
Provision the harness
Configure once. Install. Schedule the routine.
A real sequence — each step depends on the one before it.
Clone the harness.
It stays its own repo; you install from it into your targets.
git clone https://github.com/carlomigueldy/agent-harness.git
cd agent-harness
Configure the values.
Copy the example and fill in your project's {{TOKEN}} values. Hover a token below to see it baked.
$EDITOR harness.config # fill in PROJECT_NAME, GH_OWNER, gate cmds, …
{{PROJECT_NAME}} · {{GH_OWNER}} · {{DEFAULT_BRANCH}} · {{PKG_MANAGER}} · {{ROUTINE_CRON}}
Install into a target repo.
Idempotent and non-destructive — re-runs refresh harness files but never overwrite your feature_list.json.
# substitutes every {{TOKEN}}, recreates the AGENTS.md → CLAUDE.md symlink
Schedule the routine.
Register a scheduled task in your agent runtime to start the autonomous loop — a title and a cron expression.
cron 0 * * * * # hourly — picks up open epics, ≤2 issues per tick
Placeholder reference
install.sh replaces these in every copied text file.
| Token | Meaning | Example |
|---|---|---|
| {{PROJECT_NAME}} | Human display name | Bukas AI |
| {{GH_OWNER}} | GitHub owner login | carlomigueldy |
| {{DEFAULT_BRANCH}} | Default branch | main |
| {{PKG_MANAGER}} | Package manager | pnpm |
| {{GATE_CMDS}} | Ordered quality-gate block | format · lint · typecheck · test · build |
| {{ROUTINE_CRON}} | Cron for the routine | 0 * * * * |
| {{NOTIFY_SEND_CMD}} | Optional owner-notify prefix | hermes send --to telegram |
Colophon
Install once. Govern from there.
Drop the contract into any repo and a fleet of agents can advance it — autonomously, and only ever to main through the gate.
# clone, then ./install.sh into your target
git clone https://github.com/carlomigueldy/agent-harness.git