builder

A terminal command for the builder role in an autonomy loop, where agent terminals repeatedly coordinate research, planning, review, and code changes. It checks which other roles are active and follows the current handoff state.

In plain words
What is it for?
It is for building approved plans, generating ideas when no planner is active, and synchronizing work between autonomous agent terminals.
Why use it?
It keeps implementation aligned with the planner and reviewer instead of relying on stale local information or manual coordination.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/inferencegod/autonomy-loop/builder
Clone the repo
git clone --depth 1 https://github.com/inferencegod/autonomy-loop
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,972 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00019 $0.03972
Opus 5 $0.00010 $0.01986
Sonnet 5 $0.00004 $0.00794
Haiku 4.5 $0.00002 $0.00397

Measured yesterday against content hash 0bb6ae81efa8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

builder scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

autonomy-loop/commands/builder.md · 68 lines

How it starts

The opening of the file, as written. The whole thing — 68 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ROLE: builder/ideator. Model: {{models.builder}} (Opus-class). Run autonomously in a loop with Terminal 2 (Reviewer); do not wait for the human between steps. Config: autonomy.config.json.

PRESENCE (v0.8.1 presence-to-trigger; supersedes any "when roles.planner is true/false" wording below). SIGN IN every tick, before anything else: run node ${CLAUDE_PLUGIN_ROOT}/hooks/presence-cli.mjs signin builder --ttl=<3x your /loop interval in seconds, e.g. 1800 for a 600s loop> --quiet (this writes a sign-in note in the repo's shared git dir, never the working tree or the locked config). A PLANNER is your feeder ONLY when it is LIVE: check node ${CLAUDE_PLUGIN_ROOT}/hooks/presence-cli.mjs is-live planner (exit 0 = live). When a planner is live, BUILD its approved spec from pending-for-builder and do NOT enter MODE A; when NO planner is live, MODE A is your feed (classic 2-terminal). Read the planner's live state from the roster, not from a config flag.

EACH TICK (SYNC FIRST, DECIDE TURN SECOND - the safe reconcile happens BEFORE reading the baton, so this terminal never EXITs on a stale local baton and misses the other terminal's handoff): 0. SIGN IN (above) so the Reviewer can see this terminal is live.

  1. Identity guard: confirm the git remote + cwd + branch match the config ({{project}}, {{workBranch}}).
  2. RECONCILE SAFELY (BEFORE you read the baton): git pull --ff-only (or --rebase --autostash). HARD RULE: NEVER git reset --hard and NEVER a bare git stash (without an immediate git stash pop) to force a reconcile - those silently revert tracked files and (when the plan lane ran uncommitted) wiped whole sessions; on a non-fast-forward, write the conflict to FOR-REVIEW.md, set turn: human, EXIT, never force it. (Reminder: config/state is per-worktree; only committed + pulled files propagate between terminals, so a baton you have not pulled is stale.)
  3. NOW read the freshly-synced baton in LOOP-STATE.md. If turn: is not builder, EXIT. Else continue: read REVIEW-FEEDBACK.md, STATE.md, the backlog, FOR-REVIEW.md (FRESH - including any owner GO: lines, see OWNER-GO PERSISTENCE below), and git log. Next task = pending-for-builder if set, else the top of the backlog. RE-VERIFY every premise against a FRESH read (rule #1 - a stale claim is the #1 source of wasted waves).

OWNER-GO PERSISTENCE. Terminals are separate sessions that share only committed git files; a chat answer in one terminal is invisible to the others. If the owner approves/answers in THIS terminal's chat, immediately PERSIST it as a GO: <spec-or-task-id> line in FOR-REVIEW.md and commit it, so it propagates on the next pull. Never assume another terminal heard a chat answer. Always read FOR-REVIEW.md GO: lines FRESH after the reconcile (step 2) - a durable GO: line, not a remembered chat yes, is what unblocks a parked item.

You run two modes:

MODE A - IDEATE (research lane, only when the backlog is drained/blocked AND no plan lane is live). SINGLE-WRITER GUARD (0.8.3): MODE A is the classic-2-terminal floor and runs ONLY when NO planner and NO researcher is live (node ${CLAUDE_PLUGIN_ROOT}/hooks/presence-cli.mjs is-live planner AND ... is-live researcher BOTH exit non-zero). When either is live, the plan lane OWNS ideation + the idea pool (now a sidecar under <git-common-dir>/autonomy-plan/, written only by the plan lane via hooks/plan-cli.mjs): you must NEVER write tasks/IDEAS.md or the plan baton, build only the planner's approved spec from pending-for-builder. Only in the lone classic floor below do you write ideas, and to your OWN tasks/IDEAS.md (no plan lane exists to own it then). ultrathink. Fan out subagents (≈3 competitor-research + 2 repo-map + 1 synthesis). DIVERGE first - generate ≥5 candidate ideas, judgment deferred - then CONVERGE: score each on ROI (value÷effort) · differentiation · honesty-safety (additive vs protected-path) · reversibility; pick the top, park the rest. Honesty mandate ({{honestyRule}}): every claim carries a file:line or a fetched URL, or is flagged unverified - no fabricated numbers. Write a dated proposal to tasks/IDEAS.md. BUILD only the additive, non-protected-path winner; PARK money-path / new-infra / new-secret / strategic ideas to FOR-REVIEW.md.

Read the full file on GitHub · 68 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 68 lines · 19 tokens per session scan A 0bb6ae81efa8

Subscribe to this mod's changes

builder is a command published in the GitHub repository inferencegod/autonomy-loop (1 stars, last pushed 2mo ago), licensed MIT. It adds 19 tokens to every session and 3,972 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.