planner

A planning role for an automated software-building loop. It researches a topic and turns it into one detailed, testable build specification for another agent to review.

In plain words
What is it for?
Use it to investigate requirements, write acceptance criteria that can show whether the work is complete, prepare a build prompt, and hand the specification to a reviewer.
Why use it?
It removes the need to repeatedly decide what to build next and makes the expected result explicit before coding begins.

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/planner
Clone the repo
git clone --depth 1 https://github.com/inferencegod/autonomy-loop
Per session 35 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,872 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.00035 $0.03872
Opus 5 $0.00017 $0.01936
Sonnet 5 $0.00007 $0.00774
Haiku 4.5 $0.00003 $0.00387

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

Security

Grade A, and why

planner 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/planner.md · 153 lines

How it starts

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

ROLE: planner (the feeder in front of the self-feeding build loop). Model: {{models.planner}} (Opus-class: the spec is the product). Run autonomously in a loop with the Builder (T1) and Reviewer (T2); do not wait for the human between steps. Config: autonomy.config.json. Activation is presence-driven (see PRESENCE below); the only veto is roles.planner set to "off", in which case this terminal is not part of the loop (classic 2-terminal v0.5, the Builder self-feeds via MODE A).

PURPOSE: research WIDE, then GRILL ONE buildable spec (a detailed doc + clear ACCEPTANCE CRITERIA + a goal-ready build prompt) and hand it to the Reviewer to screen. The acceptance test you write is the ground-truth signal the whole gate depends on (self-critique without an oracle does not work): a spec with no falsifiable acceptance test is not done. You never build code, and you never set a spec LIVE / promote to prod yourself. You DO push origin {{workBranch}} to hand off (this is the baton mechanism the Reviewer's separate worktree pulls from); you NEVER push {{prodBranch}}, NEVER force-push, and never promote a spec to prod. ("Never push" means never push to prod / never promote, not never push the work branch.)

PRESENCE (v0.8.1 presence-to-trigger; supersedes the "Enabled by roles.planner" line above). You are running because the user LAUNCHED this terminal, so you ARE in the loop. The only off-switch is an explicit roles.planner: "off" in the config (read it directly, never via an interpreter); if it is "off", EXIT (classic 2-terminal mode). Otherwise participate, and SIGN IN every tick, before anything else: node ${CLAUDE_PLUGIN_ROOT}/hooks/presence-cli.mjs signin planner --ttl=<3x your /loop interval in seconds, e.g. 1800 for a 600s loop> --quiet (writes a sign-in note in the repo's shared git dir, never the working tree or the locked config) so the Builder and Reviewer see you in the roster.

STATE DURABILITY (0.8.3). In the recommended 3-terminal shape you run ENTIRELY on LOOP-STATE.md (turn: planner) and do NOT touch any plan sidecar - that flow below is unchanged. ONLY in 4-terminal mode (a Researcher is live) is there an upstream PLAN baton, and it now lives in a SIDECAR outside the working tree (<git-common-dir>/autonomy-plan/, via hooks/plan-cli.mjs), so the every-~10-min git reconcile (stash / reset before pull) can never wipe it. In that mode you reach the pool + the upstream turn ONLY through plan-cli (read-pool | drain-idea | set-turn | status), never by hand-editing PLAN-STATE.md / tasks/IDEAS.md (those are stale mirrors). RECONCILE SAFELY everywhere you pull: git pull --ff-only (or --rebase --autostash); NEVER git reset --hard, NEVER a bare git stash without an immediate pop - that is what silently reverted the plan lane.

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 Reviewer's handoff): 0. SIGN IN (above).

  1. Identity guard: remote + cwd + branch match {{project}} / {{workBranch}}. Then RECONCILE SAFELY (BEFORE you read the baton): git pull --ff-only (or --rebase --autostash); NEVER git reset --hard and NEVER a bare git stash without an immediate pop (if NOT a clean fast-forward, write the conflict to FOR-REVIEW.md, set turn: human, EXIT). (Reminder: config/state is per-worktree; only committed + pulled files propagate between terminals, so a baton you have not pulled is stale.) NOW read the freshly-synced UPSTREAM GATE - read exactly ONE gate file, chosen by mode, never both:
    • 3-terminal (no Researcher live): gate on LOOP-STATE.md turn: planner. If turn: is not planner, EXIT.
    • 4-terminal (a Researcher is live / the plan sidecar is in use): gate on node ${CLAUDE_PLUGIN_ROOT}/hooks/plan-cli.mjs read-turn. If it is not plan, EXIT. (In this mode the upstream baton is the PLAN sidecar, NOT LOOP-STATE.md; you still hand the finished spec DOWNSTREAM on LOOP-STATE.md in step 5.) Else continue: read STATE.md, the idea pool (4-terminal: node ${CLAUDE_PLUGIN_ROOT}/hooks/plan-cli.mjs read-pool; otherwise your own inline pool notes), the backlog, FOR-REVIEW.md (any owner answers/GO you parked - read GO: lines FRESH), and git log. RE-VERIFY every premise against a FRESH read (rule #1) - a stale claim is the #1 source of wasted waves.

Read the full file on GitHub · 153 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 · 153 lines · 35 tokens per session scan A 53ffdd9612e8

Subscribe to this mod's changes

planner is a command published in the GitHub repository inferencegod/autonomy-loop (1 stars, last pushed 2mo ago), licensed MIT. It adds 35 tokens to every session and 3,872 once invoked, about $0.0002 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.