distill
When there's a failure, bug, unexpected behavior, or important finding, distills it into a verified general rule saved under .loop/memory/. Invoke right after…
Traverses the backlog unattended, applying the loop-task cycle (rubric · verifier · gate · Loop-Verified commit) to each item. Invoke only when the user explicitly starts an autonomous batch run — for individual work, use loop-task directly.
$ npx -y skills add hiphapis/loopcraft --skill loop-run --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/loop-runContext preview
The summary Claude sees to decide when to auto-load this skill.
Traverses the backlog unattended, applying the loop-task cycle (rubric · verifier · gate · Loop-Verified commit) to each item. Invoke only when the user explicitly starts an autonomous batch run — for individual work, use loop-task directly.
name: loop-run description: Traverses the backlog unattended, applying the loop-task cycle (rubric · verifier · gate · Loop-Verified commit) to each item. Invoke only when the user explicitly starts an autonomous batch run — for individual work, use loop-task directly. argument-hint: "[max items (default 3), or a target selector e.g. #123]"
If `.loop/config.json` does not exist, stop and point to `/loopcraft:loop-init`.
`git checkout -b loop-run/$(date +%F)`. If it's a worktree/feature branch, proceed as is.
(default 2) items are escalated in a row, stop the whole runner** (likely an environment problem — keep running and you just pile up the same failure).
1. Read STATE.md·INDEX.md (including the session-injected part) and consult relevant notes. 2. Create the run journal: `.loop/journal/run-$(date +%F-%H%M).md`
# Loop-Run <ISO datetime> | branch: <branch> | start HEAD: <sha> | # | item | class | result | commit | |---|------|-------|--------|--------|
If the argument is **not an integer** (e.g. `#123`, an issue key), it's a **target selector** — process just that one item instead of the queue:
An **integer** argument (or none) uses count mode — read and triage the queue:
Read the items in the `config.backlog.section` section of `config.backlog.file` and sort into three:
within the repo.
(listening, visual inspection), a pending decision, or long-running resources (bulk generation, Docker builds) — can't run unattended. Just record it as `skip(reason)` in the run journal.
If there are several actionable items, take **the smallest and most easily reversible first**. If there are none, record that fact in the run journal·STATE and terminate (an empty-handed exit is a normal exit too).
Apply the `/loopcraft:loop-task` protocol to each item (pick rubric → consult → marker → maker → verifier → gate → `Loop-Verified` commit → verdict journal → delete marker) verbatim. Three unattended special rules:
1. **You can't ask the user when escalating** → record the last Verdict summary in the run journal, preserve uncommitted changes with `git stash push -m "loop-run escalated: <item>"`, then add the item to STATE 'Open questions', delete the marker, and move to the next item. 2. **Work that needs test files** → don't let the maker write tests for its own code (they'd fit the implementation, not verify behavior). Author them independently via `config.tests.author` (default `subagent`):
Whichever author, hand it **only the behavior spec + test-harness conventions — never the maker's reasoning**. If the chosen author is unavailable (CLI not installed / plugin not in session) or fails, fall back to `subagent` and note it in the run journal. Record the test spec (what to verify) either way. 3. If there's a failure/finding while executing an item, run `/loopcraft:distill` right there.
Update the item's row in the run journal whenev
Loop engineering plugin for Claude Code — instead of steering the model with ever-longer prompts, design loops where it self-corrects from environment feedback and accumulates memory across sessions.
When there's a failure, bug, unexpected behavior, or important finding, distills it into a verified general rule saved under .loop/memory/. Invoke right after…
Onboards loopcraft into a project — scans the repo to detect gate commands, confirms the backlog and rubrics through an interview, then scaffolds the .loop/…