Loop
Spec-driven AI development lifecycle for Claude Code — spec-kit + AI-DLC fused, with hook-enforced human-approval gates. Installable plugin + marketplace.
npx -y skills add pooyagolchian/specforge --skill loopAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 13 days oldThe repository was created 13 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Autonomously work through an approved feature's task list one task at a time until done or blocked — SpecForge's governed "Ralph loop". Use when the user wants to auto-run the implementation, loop through remaining tasks, run SpecForge autonomously, or asks for a Ralph loop. Gate-safe: only runs after the spec and plan are approved, and stops (never guesses) on a blocker.
SKILL.md
3.5 KB, as published. Nobody here has run it
/specforge:loop — governed autonomous execution (the Ralph loop, gated)
Drive the active feature's tasks.md to completion by executing tasks one at a time in a
loop, checking each off as you go. This is SpecForge's take on the Ralph loop (run the
agent repeatedly until the work is done) — but made safe: it can only ever execute a
plan a human already approved, and it stops instead of guessing when it hits a blocker.
When to use
- The user explicitly wants to auto-run the remaining implementation of an approved feature.
- Trigger:
/specforge:loop(optionally "run one iteration" for a single step).
Preconditions (check first, refuse otherwise)
- There is an active feature in
specforge/state.mdwith atasks.md. - Its
specifyandplanare approved (gate OPEN), orfasttrackis on. If not, stop and tell the user to/specforge:approve(or/specforge:quick). The PreToolUse gate would block edits anyway — surface this clearly rather than fail mid-loop.
The loop (each iteration)
- Read
specforge/state.mdand the active feature'stasks.md; find the first unchecked task (respect[P]ordering; prefer a tests-first task before its implementation task). - If there are none left → mark
implementdone instate.md, run the feature'squickstart.md/ tests to verify, summarize, and exit the loop. - Implement only that one task, staying within its scope and the plan/contracts.
- Verify it (relevant test or a quick check).
- On success → tick its checkbox
[ ]→[x]intasks.md, append an audit row. - On a blocker (ambiguity, a decision that's the human's to make, a failing check you cannot
resolve within scope) → do not guess. Write the blocker to
specforge/specs/<feature>/loop-blocked.md(what's blocked + the question) and stop the loop. - Repeat.
Stop conditions (never spin)
- All tasks checked → done.
- A blocker was recorded → stop for human input.
- No task got checked off in an iteration (no progress) → stop and report.
- A sensible iteration cap (≈ the number of open tasks + a small margin) is reached.
Headless / true Ralph loop (outside the session)
For a fully unattended run, use the bundled runner, which re-invokes the CLI per task and enforces the same gate:
"${CLAUDE_PLUGIN_ROOT}/scripts/ralph-loop.sh" [max_iterations] # default 25
It refuses to start unless the gate is open, bounds itself, and bails on a blocker or when
progress stalls. Requires the claude CLI with this plugin available.
Guardrails
- Governed autonomy: the loop executes an approved, audited plan — it does not create scope.
New scope means a new
/specforge:specifycycle, not more looping. - Never edit generated code to paper over a design flaw; if the design is wrong, stop and fix the plan (record it), then resume.
- Every ticked task and every stop is written to
state.md/audit.md, so a run is fully reconstructable and/specforge:resumecan pick up after any interruption.