Iterative improvement loop — refine a target across multiple Algorithm cycles toward ideal state. USE WHEN loop, iterate, refine, multiple passes, keep improving, revisit, rework.
/loop runs the Algorithm in mode: loop — multiple full Algorithm cycles on the same target, each iteration building on the last. By default a human reviews and redirects between iterations. Unlike /optimize (an autonomous mutation loop), /loop runs full Algorithm passes with that human review in the seam./loop carries ISC criteria and a dead-ends ledger across iterations so each pass starts from where the last one ended./loop --target "path/to/target" --iterations 5
/loop --target "~/.claude/skills/Art/Workflows/TechnicalDiagrams.md" --goal "make diagrams more consistent"
/loop --resume # Resume a previous loop
/loop --status # Show iteration history
| Argument | Required | Default | Description |
|---|---|---|---|
--target PATH | yes | What to improve (file, directory, skill) | |
--goal TEXT | inferred | What "better" means for this target | |
--iterations N | 3 | Maximum number of Algorithm cycles | |
--resume | Resume a previous loop | ||
--status | Show iteration history | ||
--autoresearch | off | Opt-in autonomous mode — see below |
mode: loop in ISA frontmatter. The iteration field tracks cycle count. Each cycle re-enters the Algorithm with accumulated context from prior iterations.--autoresearch switches /loop from supervised multi-pass improvement to autonomous iteration, borrowing three patterns from pi-autoresearch (davebcn87, MIT):--iterations reached, target met, or explicit interrupt.## Dead Ends section. Every failed iteration appends one line with the rejected approach and reason. Resumes read this to avoid retrying rejected paths.|delta|/MAD(iteration_scores) per cycle. Flag red (<1.0×) iterations as noise-floor and log marginal; do not update baseline. See LIFEOS/ALGORITHM/optimize-loop.md → Confidence Gating./loop --target "path" --goal "X" --iterations 20 --autoresearch
/loop --target "~/.claude/skills/Research" --goal "improve output quality" --iterations 5
/loop --target "prompts/summarize.md" --goal "more concise, less filler"