I'm sure you've seen Geoffrey Huntley's Ralph Wiggum Loop mentioned all over place.

I've been using plain old Claude Code with Spec-kit for awhile. I know the Claude has a plugin for Ralph loops but from what I heard and read, a lot of folks advocated against using it since it didn't start each task in a fresh context.

My laziness of not having something out of the box slowed me down for a couple of weeks.

However, I kept seeing it crop up everywhere. I heard about it from friends, on podcasts, and blogs. Eventually, my curiosity overcame my inertia and I decided to see what Ralph could do for me.

I found Dominic Böttger's Speckit integration and since I was already using Spec Kit and Claude code, it was a perfect match.

Dominic's blog was a huge help. There were some gaps in instructions and some things that I had to tweak but it was incredibly helpful for getting me started. Huge props to him for writing it.

Ralph-ing It

It was magical once I got my first Ralph loop running. The best part was that it wasn't even my specs that it ran on.

I've been pushing my company to give non-engineers Claude Code access. The hope was that non technical folks could use /speckit.specify and /speckit.clarify to create the initial specs that an engineer could review. The problem was all of the setup with git, node, access, and etc.

Claude Code in the browser reduced that barrier of entry into nothing. No git cloning, no local dev setup, just prompt and go. I already added Spec-kit to our git repository so all the user needed to do was prompt with /speckit.specify I want XYZ.

I recently did an internal company "tech demo" with a coworker and guided them through Claude Code in the browser with Spec-kit. At the end of the session, we had a branch with a decent spec artifact.

I cloned down that branch, reviewed it in deeper detail. Then I ran it through the rest of Spec-kit's commands until I got the tasks.md. I then threw it to Ralph and prayed I had enough usage tokens left.

It managed to 1 shot a working feature from the specs!

This feature touched the full web app stack.

  1. It created a new API endpoint
  2. Created a new Service used by the new API endpoint
  3. New Service talked to a 3rd party API to do some things
  4. Created new permissions to guard the API endpoint
  5. Add validations to API
  6. Wrote request specs
  7. Wrote unit tests
  8. Created a new modal with user inputs and buttons using existing component library.

There were some things I needed to tweak and code clean up that I need to retroactively put into the constitution.md and CLAUDE.md but at the end of it all was a working feature!

Bringing in More Simpsons

I started using Ralph for implementation, then realized the same fresh-context-per-iteration pattern could solve my clarify-analyze loop too. That's how Homer (clarification) and Lisa (analysis) were born. Together they're Simpsons Loops.

If you've been using Spec Kit for a while, you know the loop. You run /speckit.clarify, answer a bunch of questions, realize the spec still has gaps, run it again. Then /speckit.analyze — it finds 12 findings across three severity levels. You tell Claude to fix them. Rerun the analysis. Four new findings. Fix those. Rerun. Two more. You're basically sitting there babysitting a cycle that should be automatic.

Lisa: The Analytical One

This is the loop that started from my original frustration — sitting there running /speckit.analyze over and over. Spec-kit's analysis workflow is interactive by default. You answer questions, it updates the spec artifacts, you run it again. In my case, I end up just typing "Remediate all the issues". Works fine, just tedious.

The Lisa Loop automates that cycle. Each iteration runs the analysis, fixes everything at the highest severity level, validates the fixes didn't create new problems, commits, and exits. Same infrastructure as Ralph except it handled spec quality instead of code.

Homer: The One Who Asks Obvious Questions

I'm still debating the usefulness of this one. Clarify might have more value as a heavy human input step, but I'm trying out the loop with the AI recommended clarifications and seeing what it gets me.

The Full Pipeline

The three loops chain together:

  1. Generate specs/speckit.specify, /speckit.plan, /speckit.tasks
  2. Homer clarifies/speckit.homer.clarify → resolves ambiguities
  3. Lisa analyzes/speckit.lisa.analyze → fixes inconsistencies
  4. Ralph implements/speckit.ralph.implement → builds it task by task

Each loop runs claude -p with fresh context per iteration. Everything gets committed to git after every cycle. You can interrupt any of them and resume later.

Getting It Set Up

What you need: A Spec-kit project (.specify/ directory), Claude Code CLI, and the core Spec-kit commands (speckit.implement.md, speckit.analyze.md, speckit.clarify.md).

Quick install: From your project root:

bash <path-to-simpsons-loops>/setup.sh

That copies everything, sets permissions, updates .gitignore, and configures .claude/settings.local.json. Needs jq for the permissions step — you'll get manual instructions if it's missing.

What gets installed: Nine files — three bash orchestrators in .specify/scripts/bash/, three prompt templates in .specify/templates/, and three Claude Code slash commands in .claude/commands/.

Running the Loops

Ralph (after you have tasks.md):

In Claude Code

/speckit.ralph.implement

Prints a command like .specify/scripts/bash/ralph-loop.sh .specify/.ralph-prompt.md 25 specs/002-feat-auth/tasks.md.

Exit out of Claude Code because Claude Code won't let you spin up new Claude Code processes.

Copy, paste, run. The 25 is your incomplete tasks plus a buffer.

Homer and Lisa follow the exact same process.

Try it out yourself

The repo: github.com/jnhuynh/spec-kit-simpsons-loops (MIT licensed)

Ralph's prompt has a {QUALITY_GATES} placeholder.

Edit speckit.ralph.implement.md to match your project. Every iteration runs these before marking a task done.

You can also just ask Claude Code to do it for you.

Have fun and let me know if we can get more Simpsons in on this.

Simpson Loops: Spec-kit & Claude