loop-engineer
Budget-bounded develop-and-improve loop: design, plan, code, comment, test, review, score, and correct in a loop until a composite quality gate is met or a…
от LARi-UQAC★ 16 звёзд на GitHub
Установить loop-engineer в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Loop engineer - budget-bounded develop-and-improve loop
Run one feature through a design -> plan -> code -> comment -> test -> review -> score -> correct loop, repeating the evaluate/correct/rescore sub-cycle until a composite quality gate is met or a hard stop is hit. The point is high-quality code at a fraction of the cloud cost: the best model judges, cheaper tiers act, and the local models generate.
The score contract and the stop rules are in scripts/loop_audit.py (the scorer) and
scripts/loop_engineer.py (the driver). Read references/LOOP.md before a live run - it is
the contract for the pipeline, the model tiering, and the safety gates.
Bounds (R35 as amended)
The review loop never repeats without a bound. Before the first round the session asks the owner
with AskUserQuestion for max_rounds, max_tokens (input + cache_creation + output, cache
reads excluded) and plateau, unless the plan header carries them, then runs
python scripts/loop_bounds.py init --max-rounds N --max-tokens N --plateau N and, after each
round, loop_bounds.py tick --findings N. The hook .claude/hooks/review-loop-guard.py refuses a
review skill with no bounds or past one. The loop stops at the first bound reached, at a round
with no finding, or when the branch is safe to merge (suite green and no Critical or High
finding after re-grading), and the session names which. The driver flag --loop of loop_engineer.py is
not wired (it exits at once), so /loopdev is a procedure the session follows and --dry-run
still exercises the guard logic offline.
Option contract
/loopdev --budget <max_usd> [--score <min_score>] [--max-iters N] [--patience N] [--no-merge-pr] "<feature request>"
--budget(required): hard cost cap in USD. Maps to the Agent SDKmax_budget_usd; the run stops witherror_max_budget_usdwhen hit.--score(default 90): the aggregate threshold inside the composite gate. A literal 100 is opt-in and, because zero findings across the reviewers is asymptotic, will usually stop on budget rather than on score.--max-iters(default 10),--patience(default 2): the iteration cap and the no-progress window.--no-merge-pr: stop at "ready to merge" without opening a PR.
Pipeline (per feature, branch-isolated)
- Design -
brainstormingon Fable 5 (judgment). - Plan -
writing-planson Opus. - Branch
feat/<slug>- a Sonnet subagent with write-capable git (never the local model). - TDD -
test-driven-development: the plan names the failing tests for the acceptance criteria first, and the local coder model writes them with the code (rule R39: no cloud model writes code, tests included). Sonnet writes the plan, not the tests. - Code - one plan at a time through the aider kit (
aider-plan.ps1, rule R39): the plan sits alone in its plans folder, the kit's writer model codes it with exactly the files aider-setup submits to aider, sized by the samecontext-budget.json, runs the tests and ticks the ledger, then the kit's reviewer model audits it (required). Several plans go toaider-night.ps1. The session then reviews the written files under the plan header's R35 bounds (code-reviewandsecurity-review) and never edits code. The vault constraints reach the plan through the orchestrator, becauselocal-codernever reads the vault. - Comment / doc - the local-writer agent (the resolver's writer-role model over the bridge). It consults the
vault's
Methodesand prior writing decisions the same way. - Run tests + review panel - Sonnet runs
rtk pytest(deterministic green/red) and the installed reviewers on the diff:/code-review,/security-guidance,pr-review-toolkit(silent-failure-hunter, type-design-analyzer),systematic-debugging. Each emits findings. - Score -
scripts/loop_audit.py(run by local-coder, deterministic) aggregates the findings + test result + betterleaks/pip-audit hook status into per-axis sub-scores, an aggregate 0-100, and the gate booleans; appends to the ledger. - Correct -
writing-plansturns the findings into a revised or new plan (Sonnet), and the kit runs it again (rule R39: a finding is never fixed in the code by the cloud). On error recovery / at the checkpoint, the orchestrator haslocal-writerre-consult the vault and puts the distilled lessons in the plan, so the learning captured last iteration is not repeated.executing-plansitself never reads the vault. - Doc / journal - local-writer is the single vault writer: it captures a project log as
an appended dated section in the project's own
Decisions.md(andCodeReview.md) under10_Projets/<nature>/<projet>/, and any reusable learning as an atomic note under30_Ressources/<Technology>/. There is no daily note. It drafts the note and deposits it in~/.claude/obsidian-outbox/with a first-line directive; theobsidian-outbox-flush.py
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
Read - 02
Write - 03
Edit - 04
Bash - 05
Skill - 06
Agent
Вложенные файлы
- plan-tiers.json
- qualification/tasks.json
- references/LOOP.md
- requirements.txt
- scripts/bridge_images.py
- scripts/bridge_text.py
- scripts/context_budget.py
- scripts/loop-bounds.json
- scripts/loop_audit.py
- scripts/loop_bounds.py
- scripts/loop_engineer.py
- scripts/model_resolver.py
- scripts/ollama_bridge.py
- scripts/optimize_ollama.py
- scripts/plan_contract.py
- scripts/token-count.json
- scripts/token_count.py
FAQ
Что делает скилл loop-engineer?
Budget-bounded develop-and-improve loop: design, plan, code, comment, test, review, score, and correct in a loop until a composite quality gate is met or a hard budget/iteration/no-progress stop is hit. Keeps the best cloud model (Fable 5) as orchestrator and judge, uses cheaper cloud tiers (Opus to plan, Sonnet to execute and review) for the actions, and delegates code and comments to the local-coder / local-writer agents over the Bash bridge so the heavy generation is free. Trigger on: /loopdev, 'loop engineering', 'run the improve loop', 'develop this until the score/budget', requests to iterate on code under a cost cap with an automatic quality gate.
Как установить скилл loop-engineer?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл loop-engineer запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…