By lockstride
CLI-agnostic Ralph autonomous development loop with token tracking, context rotation, gutter detection, and Spec Kit support. Drives either the Claude Code or cursor-agent CLI from a terminal-run shell loop.
Clean up Ralph state files (.ralph/.loop and .ralph/effective-prompt.md)
Print the terminal command to launch Ralph's acceptance evaluation loop
Run exactly one Ralph loop in a terminal (smoke test your prompt)
Update the ralph-wiggum-plugin's internal Spec Kit integration files when a new Spec Kit version is released.
Print the terminal command to launch the Ralph autonomous loop
Closes gaps that the verifying-acceptance-criteria skill recorded in the acceptance report. Use when invoked by the running-acceptance-evaluation orchestrator's REWORK mode after the verifier has logged unmet requirements. Reads the report's Gaps section as a work list, makes the code/test changes needed to resolve each `[ ]` gap, runs targeted gates under the `final` label, and checks resolved gaps off in place. Does not invent new gaps (verifier's job), does not flip the top-level "all criteria met" checkbox (verifier's job), does not over-claim resolution without evidence. Marks unresolvable gaps as `(blocked: reason)` and moves on.
Updates the ralph-wiggum-plugin's own Spec Kit integration when a new Spec Kit version is released. Use when Spec Kit releases a new tagged version and the plugin's internal files need to be brought in sync — covers the adaptation guide, prompt-resolver, fallback prompt template, docs, and any skills or tests that reference Spec Kit conventions. Follows the ralph-wiggum-plugin-update workflow for versioning, testing, commit, push, and local install update.
Orchestrates the post-completion acceptance evaluation loop for a finished Ralph run. Use when invoked by the eval-loop framing prompt (ralph-evaluate.sh writes a tiny framing prompt that points here). Picks one of two modes per loop based on the current state of `.ralph/acceptance-report.md` — VERIFIER (independent re-check, invokes verifying-acceptance-criteria skill) or REWORK (close the verifier's logged gaps, invokes addressing-acceptance-gaps skill) — and delegates the actual work to a sub-agent via the Task tool. Stays lean across loops so context pollution is bounded; the sub-agent carries the heavy context for the active mode.
Independently verifies a completed Ralph run against its original ground-truth requirements (PROMPT.md / spec tasks.md / custom prompt). Use when invoked by the running-acceptance-evaluation orchestrator's VERIFIER mode, or when the operator explicitly requests an independent acceptance check. Re-derives every requirement from the ground truth, checks each against the current repo state (file reads, grep, gate runs under the `final` label, Playwright MCP for UI), and records every unmet requirement as a gap line in the acceptance report. Skeptical by default — does not trust progress.md, handoff.md, or the main loop's self-assessment. Records findings only; does not modify code.
Executes bash commands
Hook triggers when Bash tool is used
Modifies files
Hook triggers on file write and edit operations
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
A CLI-agnostic Ralph autonomous-development loop. Drives either the Claude Code (claude) or Cursor (cursor-agent) headless CLI from a terminal, with token accounting, context rotation, gate-run verification, guard hooks, retry/backoff, and Spec Kit integration.
"That's the beauty of Ralph — the technique is deterministically bad in an undeterministic world." — Geoffrey Huntley
The Ralph loop is a shell script you run in a terminal. It spawns the agent CLI as a subprocess, reads its stream-json output, tracks tokens, rotates context when the window fills, and keeps going until the task is done or the safety cap on agent respawns is reached. The loop is editor-agnostic: the editor you have open is irrelevant.
A healthy ralph loop runs as one continuous agent process — it commits as it goes and keeps moving until a real stop condition fires. It only respawns the agent (looping) on hard signals: context-window pressure, consecutive gate failures, or a rate-limit backoff. Looping is fine when needed but flow is much better — a single small spec usually completes in one loop.
The Claude Code plugin wrapping (slash commands, plugin manifest, and specialist skills) is a Claude Code-only enrichment. For Claude Code users, install as a plugin — it unlocks the acceptance-evaluation skills (running-acceptance-evaluation, verifying-acceptance-criteria, addressing-acceptance-gaps) and the guard hook that enforces gate discipline. Standalone-script users still get the full loop infrastructure but without those extras.
The plugin's intended behaviors, with where each is implemented. Use this as the inventory when reviewing the loop's reliability end-to-end.
WARN at 87.5% of the token threshold (stream-parser.sh:emit_warn_or_rotate) and touches .ralph/context-warning-active.context-warning-active and stop-requested after every commit and yield with a handoff write if either is present.GRACEFUL YIELD when handoff.md was written this iteration (_detect_graceful_yield in ralph-common.sh) — distinguishes a good yield from a force-killed ROTATE / TURN_END.ROTATE_THRESHOLD), the loop force-kills the agent. The next session reads the inlined handoff block from build_prompt..ralph/stop-requested to ask the loop to halt. Agent honors at the next post-commit breadcrumb check.run_ralph_loop) honors stop-requested if the agent didn't yield voluntarily — distinguishing graceful from forced via the same _detect_graceful_yield helper.stop-requested honored → loop writes .ralph/.loop-stopped-by-user → --evaluate chain is skipped (operator intent is "halt", not "ready for verification").PreToolUse hook (ralph-guard.sh) registered via hooks/hooks.json (record-keyed-by-event-name schema; the wrong-schema 0.12.4 bug is fixed in 0.12.5)..ralph/command-policy has five sections, evaluated in order: [gates] → [rewrite] → [deny] → [wrap] → [protect].
[gates] — required. Declares the three tier-gate commands (basic | <cmd>, full | <cmd>, final | <cmd>). Loop refuses to start if any are missing.[rewrite] — project-specific regex transforms (e.g. pnpm nx X → pnpm X). Transparent via updatedInput.[deny] — hard block with permissionDecision: deny (e.g. containerized E2E).[wrap] — auto-routes other commands through gate-run.sh <label> <cmd> transparently. Labels: basic | full | final | unit | integration | e2e | lint | format.[protect] — bare invocation OK; pipe/redirect denied._canonicalize in ralph-guard.sh): env-prefix stripped, pipes/redirects stripped, pnpm run X / pnpm exec X normalized to pnpm X. Compound chains (pnpm A && pnpm B) split — if any segment matches [wrap], the whole chain is rewrapped on just that segment.GUARD REWRITE on transparent rewrites, ⛔ GUARD DENY on hard blocks.ralph-guard.sh's gate-without-write check blocks re-running a gate when no Write/Edit happened since the last gate (LAST_WRITE_TS vs LAST_GATE_TS in $XDG_STATE_HOME/ralph/<workspace-hash>/).npx claudepluginhub lockstride/claude-marketplace --plugin ralph-wiggum-pluginAI-guided workflow for startup ideation and development - from concept brainstorming to product handoff
dMatrix decision-capture Skill for Chat-to-Matrix — structured decision matrices from natural conversation
Interactive OKLCH color palette exploration and selection for brand design systems. Guides from brand discovery through palette generation, iteration, and selection using a visual Palette Explorer tool.
Feature development with code-architect/explorer/reviewer agents, CLAUDE.md audit and session learnings, and Agent Skills creation with eval benchmarking from Anthropic.
Persistent file-based planning for AI coding agents. Crash-proof markdown plans (task_plan.md, findings.md, progress.md) that survive context loss and /clear, with an opt-in completion gate and multi-agent shared state. Manus-style. Works with Claude Code, Codex CLI, Cursor, Kiro, OpenCode and 60+ agents via the SKILL.md standard. Includes Arabic, German, Spanish, and Chinese (Simplified and Traditional).
Production-grade engineering skills for AI coding agents — covering the full software development lifecycle from spec to ship.
Comprehensive skill pack with 66 specialized skills for full-stack developers: 12 language experts (Python, TypeScript, Go, Rust, C++, Swift, Kotlin, C#, PHP, Java, SQL, JavaScript), 10 backend frameworks, 6 frontend/mobile, plus infrastructure, DevOps, security, and testing. Features progressive disclosure architecture for 50% faster loading.
Permanent coding companion for Claude Code — survives any update. MCP-based terminal pet with ASCII art, stats, reactions, and personality.
Access thousands of AI prompts and skills directly in your AI coding assistant. Search prompts, discover skills, save your own, and improve prompts with AI.