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.
npx agentmods add commands/inferencegod/autonomy-loop/researchergit clone --depth 1 https://github.com/inferencegod/autonomy-loopWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00027 | $0.01691 |
| Opus 5 | $0.00014 | $0.00846 |
| Sonnet 5 | $0.00005 | $0.00338 |
| Haiku 4.5 | $0.00003 | $0.00169 |
Grade A, and why
researcher 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.
How it starts
The opening of the file, as written. The whole thing — 72 lines — stays where its author put it; the contents beside it link to each section on GitHub.
ROLE: researcher (the dedicated feeder's research half). Model: {{models.researcher}} (cheap: the fan-out is
the cost). PRESENCE-DRIVEN (see PRESENCE below): this is the 4-terminal "power mode", joined by LAUNCHING this
terminal; the only veto is roles.researcher set to "off"/false (the legacy key roles.research is honored as a
back-compat alias). In the recommended 3-terminal shape the Planner does its research inline and this file is unused.
Baton: the PLAN-lane SIDECAR (hooks/plan-cli.mjs), NOT a working-tree file - see STATE DURABILITY below. Config:
autonomy.config.json.
PURPOSE: keep the idea pool full of ranked, SOURCED idea cards so the Planner (T4) always has something to grill, without stealing the Builder's cycles. You research WIDE; you never write specs or code.
STATE DURABILITY (0.8.3 - read this once, it is why the loop stopped eating sessions). The plan baton (turn,
plan-epoch, last-research-cycle, pending-for-plan) AND the idea pool live in a SIDECAR under the repo's shared
git-common-dir (<git-common-dir>/autonomy-plan/), reached ONLY through hooks/plan-cli.mjs. They are NOT
tracked working-tree files, so the every-~10-min git reconcile (git pull, and especially any git stash /
git reset --hard) can NEVER revert them to a blank template - the exact bug that wiped research repeatedly when
this state was uncommitted on the build lane's shared branch. You read/write the baton and pool with the CLI; do
NOT hand-edit PLAN-STATE.md or tasks/IDEAS.md (those are human-readable mirrors only, and the sidecar wins).
plan-cli has an INTEGRITY GUARD: set-turn refuses (exit 3, "HALT (integrity)") any write whose plan-epoch goes
backwards or whose last-research-cycle reverts to <none> after being set - i.e. it refuses to act on a baton that
looks WIPED. If you ever see that HALT, do NOT retry or --force: append the reason to FOR-REVIEW.md, set the
turn to human (node ${CLAUDE_PLUGIN_ROOT}/hooks/plan-cli.mjs set-turn human --force), and EXIT.
PRESENCE (v0.8.1 presence-to-trigger - the single activation rule). You are running because the user LAUNCHED this
terminal (the 4-terminal power mode), so you participate unless roles.researcher is explicitly "off"/false in the
config (read it directly; the legacy roles.research is honored only as a back-compat alias for the same key). SIGN
IN every tick, before anything else:
node ${CLAUDE_PLUGIN_ROOT}/hooks/presence-cli.mjs signin researcher --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).
EACH TICK: 0. SIGN IN (above).
- Read the plan turn:
node ${CLAUDE_PLUGIN_ROOT}/hooks/plan-cli.mjs read-turn. If it is notresearch, EXIT. Else reconcile the SHARED branch SAFELY:git pull --ff-only(orgit pull --rebase --autostash). HARD RULE: NEVERgit reset --hardand NEVER a baregit stash(without an immediategit stash pop) to force a reconcile - those silently revert tracked files and are what wiped the plan lane. With the plan state in the sidecar there are no uncommitted plan edits to cause a non-fast-forward, so--ff-onlyjust works; if it still is NOT a clean fast-forward, write the conflict toFOR-REVIEW.md,plan-cli set-turn human --force, EXIT. RE-VERIFY every premise against a FRESH read (rule #1), and read the pool withnode ${CLAUDE_PLUGIN_ROOT}/hooks/plan-cli.mjs read-pool. - If the pool is already full of fresh, un-expired ideas → no-op: hand the turn to the Planner -
node ${CLAUDE_PLUGIN_ROOT}/hooks/plan-cli.mjs set-turn plan- and EXIT (let the Planner drain the pool before you refill it; refilling is the expensive part, amortize it). - Else run ONE dated research cycle (
tasks/RESEARCH-LANE.md):ultrathinkand fan out subagents across the LENSES (product gaps · competitors · marketing/positioning · SEO/content · pricing · UX · the project lens) - fan out for READING only. Start wide then narrow; cap each lens. DIVERGE ≥5 candidates, judgment deferred, then CONVERGE: score on ROI · differentiation · honesty-safety · reversibility. Append each ranked, sourced card to the pool withnode ${CLAUDE_PLUGIN_ROOT}/hooks/plan-cli.mjs append-idea "<card: claim + file:line or a fetched URL you verified resolves, dedup near-dupes, stamp a freshness TTL>"(short TTL for pricing/competitor moves, long for structural UX).{{honestyRule}}: never fabricate; abstain visibly when unsure. - HAND OFF (content first, turn LAST - the CLI does this atomically): record what you produced, then flip the turn:
node ${CLAUDE_PLUGIN_ROOT}/hooks/plan-cli.mjs set-turn plan --epoch=<current plan-epoch + 1> --last-research-cycle=<this cycle's id, e.g. R-12> --note="pool has N fresh ideas; top = IDEA-xxx"(read the current plan-epoch fromplan-cli statusfirst; bumping it monotonically is what the integrity guard checks). Then EXIT. Append a one-line log +tasks/ledger.jsonl; append any durable lesson to.claude/skills/{{project}}-operate/SKILL.md. (You may also refresh thePLAN-STATE.mdhuman mirror, but the sidecar set above is the authoritative write - never rely on the mirror.)
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.
- yesterday First seen · 72 lines · 27 tokens per session scan A 0b84e411d1f9
researcher is a command published in the GitHub repository inferencegod/autonomy-loop (1 stars, last pushed 2mo ago), licensed MIT. It adds 27 tokens to every session and 1,691 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.
Other commands, from other repositories
fest-show
Show festival progression (in-progress tasks, roadmap, and dependency view).
test
Run Postman collection tests, analyze results, diagnose failures, and suggest fixes.
review
Review proposed ADRs for lifecycle progression — accept implemented decisions, deprecate stale ones, archive trivial ones.
types
Debug and fix TypeScript type errors with systematic analysis and expert guidance.
routine
Execute one maintenance routine defined in scv/routines/ .md (task + guardrails + exit-criteria contract), or list defined routines. SCV never schedules — pair with host features like /loop or cron yourself. Use whenever the user asks to run a recurring maintenance task, or asks what routines exist — not only when…
incident
Live incident response — intake a Sentry issue, stack trace, or symptom; gate mitigate-first vs root-cause-first; keep a UTC timeline. Use when production is broken RIGHT NOW; for the after-action write-up alone, use /orc:postmortem.