iterate

A post-implementation bug-fixing command for the fable-flow pipeline. It reproduces a reported bug, finds its cause, fixes it on the current branch, adds a regression test, and runs a correctness review.

In plain words
What is it for?
Use it when a bug has been found after implementation. It also checks the repository's pipeline context and can skip the review pass for trivial fixes.
Why use it?
It turns a manually found defect into a verified fix while preserving a test that helps prevent the same problem from returning.

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/jjilli/fable-flow/iterate
Clone the repo
git clone --depth 1 https://github.com/jjilli/fable-flow
Per session 45 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 876 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.00045 $0.00876
Opus 5 $0.00023 $0.00438
Sonnet 5 $0.00009 $0.00175
Haiku 4.5 $0.00005 $0.00088

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

Security

Grade A, and why

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

commands/iterate.md · 43 lines

How it starts

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

Context

  • Branch: !git branch --show-current
  • HEAD: !git rev-parse --short HEAD
  • Working tree: !git status --porcelain | head -20

Your job

Run the fable-flow iteration loop for bugs the user found manually:

Bug report: $ARGUMENTS

Flag: --no-review skips the reviewer pass (for trivial fixes).

This works on the current branch — typically a fable-flow/<slug> integration branch, but any branch is fine. Precondition: clean working tree (otherwise stop and tell the user what's uncommitted — never stash or discard their work yourself).

Load context first: .fable-flow/plan.md (its Contracts section still governs), .fable-flow/task.md, previous .fable-flow/iterations/*.md, and .fable-flow/memory/lessons/ — past lessons often point straight at the cause.

For each reported bug, in order:

  1. Reproduce before touching anything. Find or write the command/test that demonstrates the bug and run it; quote the failing output. If you cannot reproduce it, stop on that bug and report exactly what you tried and what detail would let you (that's input only the user can provide) — never shotgun-fix an unreproduced bug.
  2. Root-cause it. The reproduction plus the plan tells you where to look. Distinguish "the code violates the plan" from "the plan or a contract was itself wrong" — say which, because a contract-level fix must be recorded in the plan, not patched around.
  3. Fix it. Small fixes directly; larger ones via a fable-flow:implementer given a narrowed fix manifest and the current branch's HEAD as its base, then merge its branch. If a contract had to change, update the Contracts section of .fable-flow/plan.md to match reality.
  4. Prove it. Three things, with real output quoted: the step-1 reproduction now passes; a new or extended regression test fails on the pre-fix code and passes now; the plan's Integration verification still passes.

Bugs whose fixes are clearly independent and touch disjoint files may be fixed in parallel via implementers (same ownership rule as the main pipeline). When in doubt, sequential — an interleaved half-fix costs more than a slow one.

Read the full file on GitHub · 43 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 · 43 lines · 45 tokens per session scan A 0ba258172245

Subscribe to this mod's changes

iterate is a command published in the GitHub repository jjilli/fable-flow (2 stars, last pushed 1mo ago), licensed MIT. It adds 45 tokens to every session and 876 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.