npx skills add ...
npx skills add juliusbrussee/skills --skill loop-factory
Run a spec-driven agent loop where coding tasks live as markdown specs that move through inbox → active → archive, get implemented by Claude Code or Codex, and pass a review gate before they count as done. Use when the user mentions "loop factory", a "spec-driven loop", an "agent factory", wants repeatable/reviewable agent work, or when a repo has a factory/specs/inbox or factory/specs/active directory. Also covers installing and scaffolding the loop-factory CLI into a project.
npx skills add juliusbrussee/skills --skill loop-factory
Loop Factory turns "ask an agent to build something" into a visible assembly line. Each task is a markdown spec. The folder the spec lives in is its state. Agents implement and verify; they never decide what to build.
The one rule that governs everything: automate implementation and verification, not product decisions. If a spec is missing a decision, record the open question — do not invent product direction.
Invoke this skill on demand by typing /loop-factory (one manual pass), or let a cron fire it unattended — see Autonomous mode.
init).The loop-factory CLI is the state engine. Install it once, then scaffold any git repo:
No runtime dependencies beyond Python 3.10+. If you are already inside the Loop-Factory repo, you can skip the install and run python3 bin/loop-factory <command> directly. Full install notes, agent-CLI setup, and how to copy the native agent adapters: references/install.md.
loop-factory scan to see inbox and active specs.# Grill Gate section. A vague spec produces vague code.active/:
factory/prompts/ and a run record to factory/runs/. It does not run the AI unless you add --execute.verification: frontmatter. Capture the output as evidence.active/ for another pass.--accepted is required on purpose — nothing leaves active/ without a confirmed pass.Run a single self-contained pass that drains the inbox with no human present. Trigger it when invoked with "autonomous" / "drain the inbox", by a scheduled cron, or repeatedly by /loop (e.g. /loop 30m /loop-factory).
A pass does exactly this:
factory/specs/inbox/.grill: completed in frontmatter, or a filled-in # Grill Gate section. Skip anything else and log it as "needs grilling." Never grill autonomously: the grill gate needs human answers, and inventing them would be deciding product direction.active/. Do not archive — acceptance stays a human decision.active/ with a note in factory/runs/. Do not retry in a loop or weaken the criteria to make it pass.This keeps the boundary intact: the loop is a tireless builder, never a silent decider.
Two ways to fire it on a recurring basis:
/loop (local, recommended for active work) — /loop 30m /loop-factory re-runs this skill on any interval against your local working tree. Built specs land in active/; no git push or PR needed. Only runs while a Claude Code session is open.Both, plus the safety knobs, are in references/autonomous.md.
Swap --agent claude for --agent codex anywhere — the loop is identical. Default behavior writes prompt files; add --execute only when the local codex/claude CLI is installed and the user asked for live execution. Full flag reference: references/commands.md.
A spec is markdown with frontmatter (id, title, agent, risk, verification) and a body covering Context, Acceptance Criteria, Constraints, and Review Notes. The acceptance criteria are the contract — they're what the agent builds toward and what the reviewer checks against, so make them concrete and testable. Format, examples, and the grill-gate questions: references/spec-authoring.md.
inbox to active.active to archive.active — it does not get deleted or silently re-dispatched.factory/prompts/, factory/runs/, and factory/reviews/ are artifacts and audit trail — read them, don't treat them as source of truth. The spec is the source of truth.When isolation helps, hand stages to dedicated subagents instead of doing everything in one context:
Use one agent when work is sequential, touches the same files, or is high-risk. Fan out to multiple only when specs are independent or review should stay context-isolated.