§ agent-harness Standing Order
install-once · governed fleet · v1
§00
§00 · the gate

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.

The four-condition autonomous-merge gate Four latch-bolts — Opus reviewer approve, all local gates green, mergeable with no conflicts, and no veto label — feed a single output channel. The channel stays bolted closed until all four read green, then a queued token passes through to main. PR #142 queued 1 ▸ opus reviewer: approve 2 ▸ all local gates green 3 ▸ mergeable — no conflicts 4 ▸ no hold:owner / fleet:blocked main

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.

arm the gate
gate open — all four conditions hold · PR #142 squash-merges to main
§01
§01 · what it is

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 contractCLAUDE.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

§02
§02 · R1–R5

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.

R1

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: AI
R2

Conventional 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 · revert
R3

PR template, always.

Every PR body uses the template; the quality-gate and backlog-sync checkboxes are filled truthfully.

.github/PULL_REQUEST_TEMPLATE.md
R4

Issue templates, always.

Epics and children use their templates, kept in lockstep with feature_list.json — designed so a routine can pick them up unattended.

epic.md · sub-issue.md
R5

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 --squash
§03
§03 · the loop

The 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.

01

Scout

Locate the files in scope, confirm the issue is actually unblocked, report a crisp task spec.

Haiku / Explore
02

Implementer

Builds the change in an isolated per-issue worktree, on feat/<issue#>-<slug> forked from the epic branch.

Sonnet
03

Reviewer

Adversarial, multi-lens review — correctness, security, scope. Findings fixed or cleared by a different agent. Verdict posted as PR comments.

Opus
04

Backlog-sync

Keeps the GitHub issue and feature_list.json in lockstep with reality — status, links, labels — in the same change.

Sonnet / Haiku

↻ per tick · selects open epic-labeled issues · walks sub-issues in dependency order · cap ≤2 to bound blast radius

§04
§04 · model-tier policy

Model-tier policy

Use the cheapest tier that fits.

Quality is gated without burning the expensive tier on typing.

TierUse it for
OpusPlanning, architecture, code review, design / drift gates.
SonnetMost implementation work, backlog sync, doc writing.
Haiku / ExploreTrivial or mechanical tasks, recon, scouting, search, file location.
§05
§05 · safety mechanics

Safety mechanics

Mechanical, not aspirational.

Every create action is at-most-once and keyed on one thing, so reruns resume instead of clobbering.

idempotency key
= issue number

Branches, worktrees, PRs, and labels are all guarded against duplication before creation. Reruns resume from existing PR/issue state.

per-issue worktrees
isolated git trees

Each implementer builds in its own worktree under the worktrees root, on its own branch — concurrent work never collides.

lock labels
lock:run-<id>

Per-run locks plus status labels (fleet:queued / in-progress / review / blocked) coordinate overlapping ticks.

blast-radius cap
≤ 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.

§06
§06 · provision

Provision the harness

Configure once. Install. Schedule the routine.

A real sequence — each step depends on the one before it.

01

Clone the harness.

It stays its own repo; you install from it into your targets.

# the harness lives in its own repo
git clone https://github.com/carlomigueldy/agent-harness.git
cd agent-harness
02

Configure the values.

Copy the example and fill in your project's {{TOKEN}} values. Hover a token below to see it baked.

cp harness.config.example harness.config
$EDITOR harness.config  # fill in PROJECT_NAME, GH_OWNER, gate cmds, …

{{PROJECT_NAME}} · {{GH_OWNER}} · {{DEFAULT_BRANCH}} · {{PKG_MANAGER}} · {{ROUTINE_CRON}}

03

Install into a target repo.

Idempotent and non-destructive — re-runs refresh harness files but never overwrite your feature_list.json.

./install.sh /path/to/your/target-repo
# substitutes every {{TOKEN}}, recreates the AGENTS.md → CLAUDE.md symlink
04

Schedule the routine.

Register a scheduled task in your agent runtime to start the autonomous loop — a title and a cron expression.

title  bukas-ai hourly-feature-dev
cron   0 * * * *  # hourly — picks up open epics, ≤2 issues per tick

Placeholder reference

install.sh replaces these in every copied text file.

TokenMeaningExample
{{PROJECT_NAME}}Human display nameBukas AI
{{GH_OWNER}}GitHub owner logincarlomigueldy
{{DEFAULT_BRANCH}}Default branchmain
{{PKG_MANAGER}}Package managerpnpm
{{GATE_CMDS}}Ordered quality-gate blockformat · lint · typecheck · test · build
{{ROUTINE_CRON}}Cron for the routine0 * * * *
{{NOTIFY_SEND_CMD}}Optional owner-notify prefixhermes send --to telegram
§07
§07 · colophon

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

§ agent-harness orchestrator · loop · gate · routine type — Fraunces / Inter / JetBrains Mono