К основному содержанию
скилл CX Codex

loop-factory — скилл для Claude Code: что делает и как установить

Превращает разработку с агентом в конвейер задач по markdown-спецификациям. Перемещает файлы из inbox в active и archive, сверяясь со списком приёмочных критериев.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add JuliusBrussee/skills --skill loop-factory -a claude-code
Открыть на GitHub

Что делает loop-factory

Скилл организует работу Claude Code или Codex вокруг каталога factory/specs. Задачи формулируются как файлы Markdown с блоками контекста и критериями приёмки. Папка, в которой лежит файл (inbox, active или archive), определяет текущий статус задачи. Агенты реализуют функциональность и запускают верификацию, но не принимают продуктовых решений.

Управляет циклом утилита командной строки loop-factory, для которой требуется Python 3.10+. Команда scan показывает очередь, dispatch собирает промпт в factory/prompts/, а review сверяет diff с критериями приёмки. Флаг --execute запускает выполнение через локальный CLI агента; без него утилита только готовит файлы промптов.

Перед отправкой в работу черновик проходит этап гриллинга, отсекающий пробелы в требованиях. Завершённый код нельзя перенести в архив без явного флага --accepted. Даже в автономном режиме при запуске через cron или /loop агент останавливается перед ревью, оставляя приёмку человеку.

Какие задачи решает

  • перевести задачи агенту в формат markdown-спецификаций
  • изолировать процесс реализации от продуктовых решений
  • проверять изменения по списку верификационных команд перед сдачей
  • синхронизировать системную документацию с кодом через backprop

Примеры запросов агенту

  • /loop-factory
  • Проверь спецификации в factory/specs/inbox и подготовь задачу к реализации
  • Запусти автономный цикл обработки готовых спецификаций через /loop 30m /loop-factory

Как установить loop-factory

1Через Skills CLI (Vercel)

npx skills add JuliusBrussee/skills --skill loop-factory -a claude-code

2Вручную: положить файлы

~/.claude/skills/loop-factory/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/loop-factory/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о loop-factory

Как установить loop-factory в Claude Code?

Установите скилл командой npx skills add JuliusBrussee/skills --skill loop-factory -a claude-code. Для работы конвейера также понадобится CLI из репозитория, который ставят через python3 -m pip install -e ./Loop-Factory.

Что делает loop-factory?

Скилл ведёт задачу через стадии: от разбора требований в inbox и генерации кода в active до тестов и переноса проверенного результата в archive.

Что требуется для запуска конвейера?

Понадобится Python 3.10+, установленный Git и настроенный CLI выбранного агента — claude или codex.

Исходный текст

SKILL.md · MIT
---
name: loop-factory
description: 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.
---

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

```
   📥 inbox/          🔧 active/           📦 archive/
   tasks not      ──► task an agent    ──► finished work,
   started yet        is building now      reviewed + accepted
```

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](#autonomous-mode-cron).

## When to use this skill

- Setting up Loop Factory in a repo (installing the CLI, running `init`).
- Picking a spec out of the inbox and dispatching it to Claude Code or Codex.
- Implementing a spec against its acceptance criteria.
- Reviewing finished work and archiving accepted specs.
- Backpropagating implementation learnings into the living specs/docs.

## Setup (first time in a repo)

The `loop-factory` CLI is the state engine. Install it once, then scaffold any git repo:

```bash
# get the CLI (clone the source repo, install editable)
git clone https://github.com/JuliusBrussee/Loop-Factory.git
python3 -m pip install -e ./Loop-Factory

# scaffold the factory/ folders in your target project
cd your-project
loop-factory init
loop-factory doctor      # confirm git + agent CLIs are wired up
```

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](references/install.md)**.

## The loop

1. **Inspect the queue.** Run `loop-factory scan` to see inbox and active specs.
2. **Grill new specs first.** Before dispatching a fresh spec, interrogate it one question at a time (who owns this decision, what's out of scope, riskiest assumption, smallest acceptable version). Record answers under a `# Grill Gate` section. A vague spec produces vague code.
3. **Dispatch.** Generate the implementation prompt and move the spec to `active/`:
   ```bash
   loop-factory dispatch --agent claude --limit 1 --stage
   ```
   This writes a prompt to `factory/prompts/` and a run record to `factory/runs/`. It does **not** run the AI unless you add `--execute`.
4. **Implement.** Build *only* the acceptance criteria. Match existing code style. Stay scoped.
5. **Verify.** Run every command listed in the spec's `verification:` frontmatter. Capture the output as evidence.
6. **Review.** Generate a review prompt and check the diff against the criteria:
   ```bash
   loop-factory review <spec-id> --agent claude
   ```
   Pass → archive. Fail → leave the spec in `active/` for another pass.
7. **Archive accepted work.**
   ```bash
   loop-factory archive <spec-id> --accepted
   ```
   `--accepted` is required on purpose — nothing leaves `active/` without a confirmed pass.
8. **Backpropagate.** If building the feature changed how the system actually works, sync that back into specs/docs without changing product intent:
   ```bash
   loop-factory backprop --agent claude
   ```

## Autonomous mode

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:

1. **Scan** `factory/specs/inbox/`.
2. **Filter to ready specs only.** A spec is ready when its grill gate is complete — `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.
3. For each ready spec: **stage → implement against acceptance criteria → run verification.**
4. **Stop at the review gate.** Leave built specs in `active/`. Do **not** archive — acceptance stays a human decision.
5. If verification fails, leave the spec in `active/` with a note in `factory/runs/`. Do not retry in a loop or weaken the criteria to make it pass.
6. **Report**: built, skipped (needs grilling), failed-verification — and stop.

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.
- **Cron (cloud, unattended)** — a scheduled routine that runs whether or not you're online (minimum 1-hour interval) and returns work as a pull request.

Both, plus the safety knobs, are in **[references/autonomous.md](references/autonomous.md)**.

## Core commands

```bash
loop-factory scan                              # list inbox + active specs
loop-factory dispatch --agent <claude|codex> --stage   # prompt + move to active
loop-factory review <spec-id> --agent <claude|codex>   # generate review prompt
loop-factory archive <spec-id> --accepted      # archive a passed spec
loop-factory backprop --agent <claude|codex>   # sync docs/specs with code
loop-factory doctor                            # health-check setup
```

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](references/commands.md)**.

## Writing specs

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](references/spec-authoring.md)**.

## Boundaries

- Only a human or an explicit CLI command moves a spec from `inbox` to `active`.
- Only an accepted review moves a spec from `active` to `archive`.
- A failed review leaves the spec `active` — it does not get deleted or silently re-dispatched.
- Backprop may update specs/docs but must never change product intent on its own.
- Generated files under `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.

## Working with subagents

When isolation helps, hand stages to dedicated subagents instead of doing everything in one context:

- a **spec-implementer** to write the code for one active spec,
- a **spec-reviewer** (context-isolated) to judge the diff,
- a **spec-backpropagator** to fold learnings back into specs/docs.

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.

© JuliusBrussee · MIT · JuliusBrussee/skills

Похожие скиллы

Все скиллы по теме «Настройка агента: память, контекст, субагенты» →
setup-matt-pocock-skills Matt Pocock Скилл настраивает репозиторий для инженерных скиллов Matt Pocock: задаёт трекер задач, метки триажа и расположение доменной документации. Запустите его перед первым использованием остальных скиллов. 1 052 851установок ask-matt Matt Pocock Помогает выбрать подходящий скилл или рабочий поток из набора Matt Pocock. Пригодится, когда непонятно, с чего начать задачу: от идеи до разбора бага. 766 587установок to-tickets Matt Pocock Разбивает план, спецификацию или переписку на небольшие сквозные задачи и отмечает, какие из них блокируют остальные. Пригодится, когда нужно согласовать порядок работы до публикации задач в трекере. 711 230установок writing-plans Jesse Vincent Скилл превращает требования к многошаговой задаче в подробный план реализации до начала работы с кодом. Пригодится, когда исполнителю нужно зафиксировать файлы, интерфейсы и проверки. CX Codex 282 859установок caveman-review JuliusBrussee Пишет замечания к коду одной строкой: место, проблема, исправление. Пригодится, когда ревью диффа или PR надо пройти быстро и без воды. CX Codex +1 411 800установок caveman-compress JuliusBrussee Сжимает CLAUDE.md, списки задач и другие текстовые файлы в краткий формат, сохраняя читаемую резервную копию. CX Codex +1 411 500установок

Из того же набора7

caveman Заставляет агента отвечать коротко, без воды, сохраняя техническую точность. Экономит токены примерно на 75%. CX Codex +1 3 700установок grill-me Стресс-тестирует планы, архитектурные решения и идеи через калиброванное интервью по одному вопросу за раз. CX Codex +1 2 700установок junior-to-senior Скилл для критического разбора планов и архитектуры от лица сеньор-инженера. Помогает убрать абстрактные фразы и проверить решения по актуальной кодовой базе. CX Codex +1 2 600установок interface-kit Скилл задаёт агенту план работы над интерфейсом: доступность, типографика, сетка, цвет, анимация. Пригодится, когда верстаете компонент или лендинг и не хотите получить шаблонный вид. CX Codex +1 2 200установок context-canary Ставит в каждый ответ метку-канарейку с именем, счётчиком ходов и самооценкой контекста. Заметно, когда агент перестаёт держать ранние инструкции. CX Codex +1 1 900установок last-20-percent Находит и дорабатывает последние 20% проекта: тексты ответов, пустые состояния и сценарии первого запуска, которые пропускают ИИ-агенты. CX Codex +1 998установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой