Model or dataset
tzachbon/smart-ralph avatar
tzachbon/smart-ralph

Smart Ralph writes the spec into your repository, then executes one task at a time with fresh context

Spec-driven development with smart compaction. Claude Code plugin combining Ralph Wiggum loop with structured specification workflow.

565 stars49 forksShellMIT

At a glance

What is it?
A plugin for Claude Code and Codex that turns a feature request into research, requirements, design, and task files before writing any code, handing each phase to a different focused agent. Two details make it more than a prompt template: the spec files live in your checkout so you can edit them between phases, and prototype source is confined to a sibling worktree unless you approve a transfer.
Who is it for?
Use it when you want the design conversation to happen in files you can read and change, rather than in a conversation that evaporates when context runs out. Two habits pay for the setup.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 27 days ago.
What is it written in?
Mainly Shell, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 23, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • tzachbon/smart-ralph565 ★ · +29
Star history
Repository2026-09-112026-11-23
tzachbon/smart-ralph536565

29 Stars in the last 73 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Five files land in your repository before any code does

The workflow starts at the start command, which takes a name and a goal, and it decides scope before it does anything. For a goal that fits one spec, the path is research, which analyses the codebase and searches the web, then requirements with user stories and acceptance criteria, then design covering architecture, patterns, and decisions, then tasks broken down prototype-first, then execution. Every one of those artifacts is a file in your project, not a message in a transcript, which is the central design decision here. You can review or edit each phase before the next one runs. Progress between tasks is recorded in a .progress.md file and completed work is marked in tasks.md, so a stopped session resumes from a file rather than from a guess.

Triage splits a goal into an epic when one spec will not hold it

There is a branch before research. If the goal is too big for a single spec, the start command routes to triage instead, which runs its own sequence: exploration research to map the territory, a brainstorm step, a triage analyst that splits features and maps dependencies between them, a validation pass, and a finalize step that produces an epic. So the difference between the two modes is not intensity but shape, and triage is the one to reach for when a request spans several features or systems. In Codex, the equivalent entry point is named separately so you can begin there deliberately. The commands are also split per phase, meaning research, requirements, design, and tasks can each be run or repeated on their own rather than only as part of a fresh start.

On Codex, automatic execution depends on trusting a Stop hook

The two clients differ in one way that matters more than the command syntax. On Codex, after installing you start a new task and run the hooks command, review the bundled Stop hook, and trust it if you want task execution to run automatically. Until you do, nothing runs by itself and you invoke the implement command once per task yourself. That is a deliberate consent gate: the hook is what closes the loop, and refusing to trust it leaves you driving. On Claude Code the equivalent loop lives inside the plugin, and installation is two commands followed by a restart of the client:

bash
/plugin marketplace add tzachbon/smart-ralph
/plugin install ralph-specum@smart-ralph

Both clients share the same command set, with Claude Code using a slash-prefixed name and Codex a dollar-prefixed one, and Codex folds the separate new command into start.

Seven named agents, one per phase, and no agent does two jobs

Each phase is handed to a differently named agent with one responsibility. Triage goes to a triage analyst that splits features and maps dependencies. Research goes to a research analyst that inspects the codebase and checks feasibility. Requirements go to a product manager that writes user stories and acceptance criteria. Prototype goes to a prototype builder that tests one design question with disposable evidence. Design goes to an architect reviewer that defines architecture and trade-offs. Tasks go to a task planner that produces a prototype-first sequence. Execution goes to a spec executor that implements tasks and runs the quality gates. The naming is the specification of the boundary, and it is why the loop can start each implementation task with fresh context rather than carrying a growing transcript.

Tasks run prototype first, then refactor, then tests, then gates

Every task moves through the same four phases. First, make it work, by validating the approach with a proof of concept. Second, refactoring, cleaning up the implementation that now works. Third, testing, adding unit, integration, and end-to-end coverage. Fourth, quality gates, running lint, type, and CI checks. The ordering is the argument: proof before polish, and gates last so they judge the finished task rather than the experiment. Granularity is a flag rather than a guess, with a tasks-size switch between fine and coarse, plus a marker for low-conflict parallel tasks so independent work can run at once, and verification markers including VERIFY tasks and VE tasks for checks you want to be explicit rather than assumed.

Prototype source stays in a sibling worktree unless you move it

The optional prototype is where this plugin is most careful. In normal mode it may suggest a prototype after research or requirements, and you can also run the prototype command yourself at a safe phase boundary. Prototype source then stays in a sibling worktree or an eligible scratch directory, so an experiment cannot quietly become production code. Transfers are asymmetric and deliberate: quick mode transfers no source into the current checkout at all, while normal mode transfers only the paths you approve. Two related guarantees sit alongside it. Reviewed terminal records are immutable, and local evidence does not authorise a push, a remote branch, a pull request update, an issue write, or record deletion. The plugin stops at the edge of your repository.

The index exists so research stops rediscovering code you already have

One command scans an existing project and writes searchable component specs under a dot-prefixed index directory inside specs. The stated purpose is narrow and practical: research agents use that index to find code the project already has, which stops the research phase from proposing a component that exists three directories away. The command has the usual safety switches, a path option to scan one directory, a type option to limit component types, an exclude option to skip matching paths, a dry run to preview without writing, and a quick variant. It is also the only command in the set that writes into a directory you did not name when you started, which is worth knowing before running it against a large tree.

Five client directories in the tree, two clients in the documentation

The repository root carries configuration directories for five agent clients, alongside a plugin manifest directory, plus both a plugins directory and a skills directory, a specs directory, tests, docs, an agents file, a client file, a contributing guide, and a troubleshooting file. The README documents installation for Claude Code and Codex only. The Codex guide also covers updates, local development against a local marketplace, and migration away from an older skills layout under a directory that no longer exists, which tells you the plugin format moved once already and that Codex users on the old layout have a path forward. Two release facts frame the current state: the newest tag is v4.0.0 from February 2026, and the last commit is from September, so the tree is ahead of the last release by several months.

Editorial conclusion

Use it when you want the design conversation to happen in files you can read and change, rather than in a conversation that evaporates when context runs out. Two habits pay for the setup. Run it in normal mode first, since quick mode skips every approval checkpoint and takes the prototype decisions itself, and keep the Stop hook untrusted on Codex until you have seen what it does. And read the residual risk plainly: reviewed records are immutable and local evidence never authorises a push, so the plugin stops short of touching your remotes on its own.

Frequently asked questions

What is Ralph for AI?

Smart Ralph is a spec-driven development plugin for Claude Code and Codex. It turns a feature request into a structured spec made of research, requirements, design, and task files, then executes that spec one task at a time with fresh context, and the execution loop has no external plugin dependencies.

What does Ralph do?

It creates the spec files before implementation and keeps them in your project so each phase can be reviewed or edited before the next runs. Progress is recorded between tasks in .progress.md and completed work is marked in tasks.md, which is also what lets it resume after a stopped session.

How to do a Ralph loop?

Install the plugin from its marketplace, restart Claude Code or start a new Codex task, then run the start command with a spec name and a goal. On Codex, trusting the bundled Stop hook is what makes task execution automatic; until you do, you run the implement command once per task yourself.

What is Ralph Wiggum?

The loop this project is named after, introduced in the v2.0.0 release titled Ralph Wiggum Integration. Here it is combined with a structured specification workflow, and each implementation task is started with fresh context rather than a continuing transcript. The README does not explain where the name itself comes from.

Official sources

  1. Issues
  2. License: MIT
  3. README
  4. Releases
  5. tzachbon/smart-ralph on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/tzachbon-smart-ralph.svg)](https://hysenlabs.com/projects/tzachbon-smart-ralph)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/tzachbon-smart-ralph.svg)](https://hysenlabs.com/projects/tzachbon-smart-ralph)

Was this useful?