Skip to content

Repository files navigation

Loop Factory

A skill for designing, building, and shipping verifiable AI agent loops. Compatible with any IDE or LLM agent.

Loop Factory turns repeatable tasks into closed automation: trigger + execution + verification, with cost ceilings, retry policies, and safe stopping conditions. It ships with a brainstorm mode to surface loop ideas you did not think to ask for.

Why this exists

Most "agent loops" in the wild are just scripts with an LLM call inside. They run until they crash, spend whatever they spend, and trust the model to self-check. Loop Factory treats a loop as an engineering artifact with a spec, a budget, a verification gate, and a failure mode.

If you cannot write the sentence "Whenever X, the agent will Y, then verify Z, stopping when W" then you do not have a loop. You have a script. Loop Factory gets you to a real loop.

Install

Claude Code

/plugin marketplace add roman-ryzenadvanced/loop-factory
/plugin install loop-factory

Cursor, Windsurf, Copilot, Codex, Gemini CLI, or any agent skills host

npx skills add roman-ryzenadvanced/loop-factory -g

-g installs globally. Drop it for per-project scope.

Manual

Clone this repo. Copy the matching file from configs/ into your project root:

Host File
Claude Code configs/CLAUDE.md -> .claude/CLAUDE.md
Cursor configs/.cursorrules -> .cursorrules
Windsurf configs/.windsurfrules -> .windsurfrules
Copilot configs/copilot-instructions.md -> .github/copilot-instructions.md
Codex configs/AGENT_RULES.md -> AGENTS.md
Gemini gemini-extension.json
Generic configs/CLINEMD.md -> AGENT.md

Quick start

Design a loop:

Use loop-factory.
Read SKILL.md, then design a loop that fixes ESLint errors on save.
Output the full 11-field loop contract.

Brainstorm loop ideas:

Use loop-factory.
Run brainstorm mode on this repo.
Output 3 to 7 candidates, scored, with top 2 recommendations.

What you get

  • A 7-phase workflow from brainstorm to ship.
  • A 5-dimension scoring rubric. No loop ships below the minimum.
  • Ready-to-use host configs for Claude Code, Cursor, Windsurf, Copilot, Codex, Grok, Gemini.
  • 5 ready-to-run loop playbooks: lint-fix, test-fix, refactor, doc-gen, review.
  • A brainstorm mode that finds loops for you.
  • Cost ceilings per loop type. Budget exceeded = loop stops.
  • Safety boundaries: no prod without staging, no irreversible without approval.

Project layout

loop-factory/
├── SKILL.md            # Core protocol (read this first)
├── AGENTS.md           # Canonical agent instructions
├── docs/               # Guides and methodology
├── prompts/            # System prompt, brainstorm prompt, input/output templates
├── frameworks/         # Reusable mental models (loop anatomy, scoring, brainstorm)
├── playbooks/          # Scenario-specific loop recipes
├── templates/          # Fill-in skeletons
├── examples/           # End-to-end worked examples
├── tests/              # Prompts that verify agent understanding
├── configs/            # Per-host ready-to-use configs
├── .claude-plugin/     # Claude Code plugin manifest
├── .codex-plugin/      # Codex plugin manifest
├── .grok-plugin/       # Grok plugin manifest
└── gemini-extension.json

Roadmap

See docs/roadmap.md.

Contributing

See CONTRIBUTING.md. Pull requests welcome. Read tests/test-prompts.md first to confirm your output matches the contract.

License

MIT. See LICENSE.

Star history

If Loop Factory saves you a runaway bill or catches a broken agent run, star the repo so others find it.

About

Design, build, and ship verifiable AI agent loops. Compatible with any IDE or LLM agent. Includes brainstorm mode.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors