Spec-driven development with smart compaction. Claude Code plugin combining Ralph Wiggum loop with structured specification workflow.
> /plugin marketplace add tzachbon/smart-ralph
FAQ
smart-ralph is a Claude Code plugin with 24 hand-picked skills for development work, indexed on Flowy. Install it with the command on its page. It includes communication-style, delegation-principle, smart-ralph. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
Repo: tzachbon/smart-ralph
Spec-driven development for Claude Code and Codex. Task-by-task execution with fresh context per task.
Self-contained execution loop. No external dependencies.
Quick Start | Commands | How It Works | Troubleshooting
Smart Ralph is a Claude Code plugin that turns your vague feature ideas into structured specs, then executes them task-by-task. Like having a tiny product team in your terminal.
You: "Add user authentication"
Ralph: *creates research.md, requirements.md, design.md, tasks.md*
Ralph: *executes each task with fresh context*
Ralph: "I'm helping!"
Named after the Ralph agentic loop pattern and everyone's favorite Springfield student. Ralph doesn't overthink. Ralph just does the next task. Be like Ralph.
# Install Smart Ralph
/plugin marketplace add tzachbon/smart-ralph
/plugin install ralph-specum@smart-ralph
# Restart Claude Code
Prerequisite: Install the Codex CLI first:
npm install -g @openai/codex
Run these commands from any directory. They clone the repo to a temp folder, copy the plugin to your Codex plugins directory, and clean up.
# 1. Clone the Smart Ralph repo
git clone https://github.com/tzachbon/smart-ralph.git /tmp/smart-ralph
# 2. Copy the Codex plugin into your personal plugins directory
mkdir -p ~/.codex/plugins
cp -R /tmp/smart-ralph/plugins/ralph-specum-codex ~/.codex/plugins/ralph-specum-codex
# 3. Create a marketplace entry so Codex can discover the plugin
mkdir -p ~/.agents/plugins
cat > ~/.agents/plugins/marketplace.json << 'EOF'
{
"name": "smart-ralph",
"plugins": [{
"name": "ralph-specum",
"source": {"source": "local", "path": "~/.codex/plugins/ralph-specum-codex"},
"policy": {"installation": "AVAILABLE"},
"category": "Productivity"
}]
}
EOF
# 4. Clean up
rm -rf /tmp/smart-ralph
Run these commands from your project root directory (the repo where you want to use Ralph).
# 1. Clone the Smart Ralph repo
git clone https://github.com/tzachbon/smart-ralph.git /tmp/smart-ralph
# 2. Copy the Codex plugin into your project
mkdir -p ./plugins
cp -R /tmp/smart-ralph/plugins/ralph-specum-codex ./plugins/ralph-specum-codex
# 3. Create a marketplace entry in your project
mkdir -p ./.agents/plugins
cat > ./.agents/plugins/marketplace.json << 'EOF'
{
"name": "smart-ralph",
"plugins": [{
"name": "ralph-specum",
"source": {"source": "local", "path": "./plugins/ralph-specum-codex"},
"policy": {"installation": "AVAILABLE"},
"category": "Productivity"
}]
}
EOF
# 4. Clean up
rm -rf /tmp/smart-ralph
After either method: restart Codex, open the plugin directory, and install ralph-specum.
Optional: Enable the Stop hook for automatic task execution:
# ~/.codex/config.toml
[features]
codex_hooks = true
See plugins/ralph-specum-codex/README.md for full details.
Updating (run from any directory):
rm -rf /tmp/smart-ralph
git clone https://github.com/tzachbon/smart-ralph.git /tmp/smart-ralph
cp -R /tmp/smart-ralph/plugins/ralph-specum-codex ~/.codex/plugins/ralph-specum-codex
rm -rf /tmp/smart-ralph
# Restart Codex
For per-project installs, replace ~/.codex/plugins/ralph-specum-codex with ./plugins/ralph-specum-codex (run from your project root).
rm -rf ~/.codex/skills/ralph-specum*See the migration guide for details.
Install from GitHub directly:
/plugin install https://github.com/tzachbon/smart-ralph
Local development:
git clone https://github.com/tzachbon/smart-ralph.git
claude --plugin-dir ./smart-ralph/plugins/ralph-specum
Use $ralph-specum as the default Codex surface. Helper skills mirror the explicit phase entrypoints:
$ralph-specum
$ralph-specum-start
$ralph-specum-triage
$ralph-specum-research
$ralph-specum-requirements
$ralph-specum-design
$ralph-specum-tasks
$ralph-specum-implement
$ralph-specum-status
The helper skill package also includes $ralph-specum-switch, $ralph-specum-cancel, $ralph-specum-index, $ralph-specum-refactor, $ralph-specum-feedback, and $ralph-specum-help.
Use $ralph-specum-triage first when the goal is large, cross-cutting, or likely to become multiple specs. Use $ralph-specum-start for a single spec or to resume an existing one.
Codex Ralph is approval-gated by default. After each spec artifact, Ralph stops and asks you to approve the current artifact, request changes, or continue to the next step. Quick or autonomous flow happens only when you explicitly ask for it.
# The smart way (auto-detects resume or new)
/ralph-specum:start user-auth Add JWT authentication
# Quick mode (skip spec phases, auto-generate everything)
/ralph-specum:start "Add user auth" --quick
# The step-by-step way
/ralph-specum:new user-auth Add JWT authentication
/ralph-specum:requirements
/ralph-specum:design
/ralph-specum:tasks
/ralph-specum:implement
For Codex, the equivalent surface is $ralph-specum plus 14 helper skills installed via the ralph-specum plugin.
| Command | What it does |
|---|---|
/ralph-specum:start [name] [goal] | Smart entry: resume existing or create new |
/ralph-specum:start [goal] --quick | Quick mode: auto-generate all specs and execute |
/ralph-specum:new <name> [goal] | Create new spec, start research |
/ralph-specum:research | Run/re-run research phase |
/ralph-specum:requirements | Generate requirements from research |
/ralph-specum:design | Generate technical design |
/ralph-specum:tasks | Break design into executable tasks |
/ralph-specum:implement | Execute tasks one-by-one |
/ralph-specum:index | Scan codebase and generate component specs |
/ralph-specum:status | Show all specs and progress |
/ralph-specum:switch <name> | Change active spec |
/ralph-specum:triage [name] [goal] | Decompose large features into multiple specs (epics) |
/ralph-specum:cancel | Cancel loop, cleanup state |
/ralph-specum:help | Show help |
flowchart TD
A["I want a feature!"] --> B{"/start detects scope"}
B -->|Single spec| C[Research]
B -->|"Too big for one spec"| T["/triage"]
C -->|Analyzes codebase, searches web| D[Requirements]
D -->|User stories, acceptance criteria| E[Design]
E -->|Architecture, patterns, decisions| F[Tasks]
F -->|POC-first task breakdown| G[Execution]
G -->|Task-by-task with fresh context| H["I did it!"]
T -->|Explore| T1[Exploration Research]
T1 -->|Brainstorm| T2[Triage Analyst]
T2 -->|Validate| T3[Validation Research]
T3 -->|Finalize| T4["Epic Plan"]
T4 -->|"Spec 1, Spec 2, ..."| C
Each phase uses a specialized sub-agent:
| Phase | Agent | Superpower |
|---|---|---|
| Triage | triage-analyst | Feature decomposition, dependency graphs, interface contracts |
| Research | research-analyst | Web search, codebase analysis, feasibility checks |
| Requirements | product-manager | User stories, acceptance criteria, business value |
| Design | architect-reviewer | Architecture patterns, technical trade-offs |
| Tasks | task-planner | POC-first breakdown, task sequencing |
| Execution | spec-executor | Autonomous implementation, quality gates |
Tasks follow a 4-phase structure:
Current Ralph planning also supports:
--tasks-size fine|coarse to control task granularity[P] markers for low-conflict parallel tasks[VERIFY] and VE tasks for explicit verification work/ralph-specum:triage or $ralph-specum-triageStarting with v2.12.0, Smart Ralph can scan existing codebases and auto-generate component specs, making legacy code discoverable during new feature research.
When starting a new feature on an existing codebase, the research phase benefits from knowing what's already built. Without indexing, the research agent has limited visibility into your codebase structure.
The /ralph-specum:index command:
/ralph-specum:start# Full interactive indexing (recommended for first-time)
/ralph-specum:index
# Quick mode - skip interviews, batch scan only
/ralph-specum:index --quick
# Dry run - preview what would be indexed
/ralph-specum:index --dry-run
# Index specific directory
/ralph-specum:index --path=src/api/
# Force regenerate all specs
/ralph-specum:index --force
flowchart TD
A["/ralph-specum:index"] --> B[Pre-Scan Interview]
B -->|External URLs? Focus areas?| C[Component Scanner]
C -->|Controllers, services, models...| D[External Resources]
D -->|URLs, MCP, skills| E[Post-Scan Review]
E -->|Validates findings with user| F["specs/.index/"]
F --- G["index.md - Summary dashboard"]
F --- H["components/ - Code component specs"]
F --- I["external/ - External resource specs"]
| Option | Description |
|---|---|
--path=<dir> | Limit indexing to specific directory |
--type=<types> | Filter by type: controllers, services, models, helpers, migrations |
--exclude=<patterns> | Patterns to exclude (e.g., test, mock) |
--dry-run | Preview without writing files |
--force | Regenerate all specs (overwrites existing) |
--changed | Regenerate only git-changed files |
--quick | Skip interviews, batch scan only |
For best results, run /ralph-specum:index before starting new features on an existing codebase.
The research phase searches indexed specs to discover relevant existing components. Without an index, you may miss important context about what's already built.
# First time on a codebase? Index it first
/ralph-specum:index
# Then start your feature
/ralph-specum:start my-feature Add user authentication
When you run /ralph-specum:start:
/ralph-specum:indexComponents (detected by path/name patterns):
**/controllers/**/*.{ts,js,py,go}**/services/**/*.{ts,js,py,go}**/models/**/*.{ts,js,py,go}**/helpers/**/*.{ts,js,py,go}**/migrations/**/*.{ts,js,sql}External Resources (discovered via interview):
Default Excludes:
node_modules, vendor, dist, build, .git, __pycache__, test files
smart-ralph/
โโโ .claude-plugin/
โ โโโ marketplace.json
โโโ plugins/
โ โโโ ralph-specum/ # Claude Code plugin (self-contained)
โ โ โโโ .claude-plugin/
โ โ โ โโโ plugin.json
โ โ โโโ agents/ # Sub-agent definitions
โ โ โโโ commands/ # Slash commands
โ โ โโโ hooks/ # Stop watcher (controls execution loop)
โ โ โโโ templates/ # Spec templates
โ โ โโโ schemas/ # Validation schemas
โ โโโ ralph-specum-codex/ # Codex plugin (full parity)
โ โ โโโ .codex-plugin/
โ โ โ โโโ plugin.json
โ โ โโโ skills/ # 15 skills ($ralph-specum-*)
โ โ โโโ hooks/ # Stop watcher (Codex format)
โ โ โโโ agent-configs/ # 9 TOML bootstrap templates
โ โ โโโ templates/ # Spec templates
โ โ โโโ references/ # Workflow, state, parity docs
โ โโโ ralph-speckit/ # Spec-kit methodology
โ โโโ .claude-plugin/
โ โ โโโ plugin.json
โ โโโ agents/ # spec-executor, qa-engineer
โ โโโ commands/ # /speckit:* commands
โ โโโ templates/ # Constitution, spec, plan templates
โโโ README.md
Specs live in ./specs/ in your project:
./specs/
โโโ .current-spec # Active spec name
โโโ my-feature/
โโโ .ralph-state.json # Loop state (deleted on completion)
โโโ .progress.md # Progress tracking
โโโ research.md
โโโ requirements.md
โโโ design.md
โโโ tasks.md
ralph-speckit is an alternative plugin implementing GitHub's spec-kit methodology with constitution-first governance.
| Feature | ralph-specum | ralph-speckit |
|---|---|---|
| Directory | ./specs/ | .specify/specs/ |
| Naming | my-feature/ | 001-feature-name/ |
| Constitution | None | .specify/memory/constitution.md |
| Spec structure | research, requirements, design, tasks | spec (WHAT/WHY), plan (HOW), tasks |
| Traceability | Basic | Full FR/AC annotations |
/plugin install ralph-speckit@smart-ralph
# Initialize constitution (first time only)
/speckit:constitution
# Create and develop a feature
/speckit:start user-auth "Add JWT authentication"
/speckit:specify
/speckit:plan
/speckit:tasks
/speckit:implement
| Command | What it does |
|---|---|
/speckit:constitution | Create/update project constitution |
/speckit:start <name> [goal] | Create new feature with auto ID |
/speckit:specify | Define feature spec (WHAT/WHY) |
/speckit:plan [tech] | Create technical plan with research |
/speckit:tasks | Generate task breakdown by user story |
/speckit:implement | Execute tasks task-by-task |
/speckit:status | Show current feature status |
/speckit:switch <name> | Switch active feature |
/speckit:cancel | Cancel execution loop |
/speckit:clarify | Optional: clarify ambiguous requirements |
/speckit:analyze | Optional: check spec consistency |
.specify/
โโโ memory/
โ โโโ constitution.md # Project-level principles
โโโ .current-feature # Active feature pointer
โโโ specs/
โโโ 001-user-auth/
โ โโโ .speckit-state.json
โ โโโ .progress.md
โ โโโ spec.md # Requirements (WHAT/WHY)
โ โโโ research.md
โ โโโ plan.md # Technical design (HOW)
โ โโโ tasks.md
โโโ 002-payment-flow/
โโโ ...
Task keeps failing?
After max iterations, the loop stops. Check .progress.md for errors. Fix manually, then /ralph-specum:implement to resume.
Want to start over?
/ralph-specum:cancel cleans up state files. Then start fresh.
Resume existing spec?
Just /ralph-specum:start - it auto-detects and continues where you left off.
More issues? See the full Troubleshooting Guide.
Self-contained execution loop (no more ralph-loop dependency)
Starting with v3.0.0, Smart Ralph is fully self-contained. The execution loop is handled by the built-in stop-hook.
Migration from v2.x:
What changed:
/implement runs the loop internally (no external invocation)/cancel only cleans up Smart Ralph state filesWhy:
Ralph Loop dependency required (superseded by v3.0.0)
v2.0.0 delegated task execution to the Ralph Loop plugin. This is no longer required as of v3.0.0.
PRs welcome! This project is friendly to first-time contributors.
git checkout -b feature/amazing)Made with confusion and determination
"The doctor said I wouldn't have so many nosebleeds if I kept my finger outta there."
MIT License
.agents/
plugins/
marketplace.json
skills/
Command Development/
examples/
plugin-commands.md
simple-commands.md
references/
advanced-workflows.md
documentation-patterns.md
frontmatter-reference.md
interactive-commands.md
marketplace-considerations.md
plugin-features-reference.md
testing-strategies.md
SKILL.md
Hook Development/
examples/
load-context.sh
validate-bash.sh
validate-write.sh
references/
advanced.md
migration.md
patterns.md
scripts/
hook-linter.sh
test-hook.sh
validate-hook-schema.sh
SKILL.md
MCP Integration/
examples/
http-server.json
sse-server.json
stdio-server.json
references/
authentication.md
server-types.md
tool-usage.md
SKILL.md
Plugin Settings/
examples/
create-settings-command.md
example-settings.md
read-settings-hook.sh
references/
parsing-techniques.md
real-world-examples.md
scripts/
parse-frontmatter.sh
validate-settings.sh
SKILL.md
Plugin Structure/
examples/
advanced-plugin.md
minimal-plugin.md
standard-plugin.md
references/
component-patterns.md
manifest-reference.md
SKILL.md
Skill Development/
references/
skill-creator-original.md
SKILL.md
.claude/
.claude-plugin/
marketplace.json
settings.json
skills/
Command Development
Hook Development
MCP Integration
Plugin Settings
Plugin Structure
Skill Development
.cursor/
skills/
Command Development
Hook Development
MCP Integration
Plugin Settings
Plugin Structure
Skill Development
.gemini/
skills/
Command Development
Hook Development
MCP Integration
Plugin Settings
Plugin Structure
Skill Development
.github/
ISSUE_TEMPLATE/
bug_report.yml
config.yml
feature_request.yml
question.yml
PULL_REQUEST_TEMPLATE.md
skills/
Command Development
Hook Development
MCP Integration
Plugin Settings
Plugin Structure
Skill Development
workflows/
bats-tests.yml
codex-version-check.yml
plugin-version-check.yml
spec-file-check.yml
.gitignore
AGENTS.md
CLAUDE.md
CONTRIBUTING.md
docs/
plans/
2026-02-20-brainstorming-style-interviews-design.md
2026-02-20-brainstorming-style-interviews-plan.md
2026-02-20-plugin-best-practices-design.md
2026-02-20-plugin-best-practices-plan.md
2026-02-21-ci-and-review-comments-plan.md
2026-02-21-review-fixes-plan.md
2026-03-03-epic-triage-design.md
2026-03-03-epic-triage-plan.md
LICENSE
plugins/
ralph-speckit/
.claude/
.claude-plugin/
plugin.json
commands/
speckit.analyze.md
speckit.checklist.md
speckit.clarify.md
speckit.constitution.md
speckit.implement.md
speckit.plan.md
speckit.specify.md
speckit.tasks.md
speckit.taskstoissues.md
.specify/
memory/
constitution.md
scripts/
bash/
check-prerequisites.sh
common.sh
create-new-feature.sh
setup-plan.sh
update-agent-context.sh
templates/
agent-file-template.md
checklist-template.md
plan-template.md
spec-template.md
tasks-template.md
agents/
constitution-architect.md
plan-architect.md
qa-engineer.md
spec-analyst.md
spec-executor.md
task-planner.md
CHANGELOG.md
commands/
cancel.md
implement.md
start.md
status.md
switch.md
CONTRIBUTING.md
examples/
constitution.md
spec.md
tasks.md
hooks/
hooks.json
scripts/
stop-watcher.sh
LICENSE
README.md
schemas/
speckit-state.schema.json
skills/
communication-style/
SKILL.md
delegation-principle/
SKILL.md
smart-ralph/
SKILL.md
speckit-workflow/
SKILL.md
templates/
progress.md
ralph-specum/
ralph-specum-codex/
.codex-plugin/
plugin.json
agent-configs/
architect-reviewer.toml.template
product-manager.toml.template
qa-engineer.toml.template
README.md
refactor-specialist.toml.template
research-analyst.toml.template
spec-executor.toml.template
spec-reviewer.toml.template
task-planner.toml.template
triage-analyst.toml.template
assets/
bootstrap/
AGENTS.md
ralph-specum.local.md
hooks/
stop-watcher.sh
README.md
references/
parity-matrix.md
path-resolution.md
state-contract.md
workflow.md
schemas/
spec.schema.json
scripts/
count_tasks.py
merge_state.py
resolve_spec_paths.py
skills/
ralph-specum/
ralph-specum-cancel/
agents/
openai.yaml
SKILL.md
ralph-specum-design/
agents/
openai.yaml
SKILL.md
ralph-specum-feedback/
agents/
openai.yaml
SKILL.md
ralph-specum-help/
agents/
openai.yaml
SKILL.md
ralph-specum-implement/
agents/
openai.yaml
SKILL.md
ralph-specum-index/
agents/
openai.yaml
SKILL.md
ralph-specum-refactor/
agents/
openai.yaml
SKILL.md
ralph-specum-requirements/
agents/
openai.yaml
SKILL.md
ralph-specum-research/
agents/
openai.yaml
SKILL.md
ralph-specum-start/
agents/
openai.yaml
SKILL.md
ralph-specum-status/
agents/
openai.yaml
SKILL.md
ralph-specum-switch/
agents/
openai.yaml
SKILL.md
ralph-specum-tasks/
agents/
openai.yaml
SKILL.md
ralph-specum-triage/
agents/
openai.yaml
SKILL.md
agents/
openai.yaml
SKILL.md
templates/
component-spec.md
design.md
epic.md
external-spec.md
index-summary.md
progress.md
requirements.md
research.md
settings-template.md
tasks.md
.claude-plugin/
plugin.json
agents/
architect-reviewer.md
product-manager.md
qa-engineer.md
refactor-specialist.md
research-analyst.md
spec-executor.md
spec-reviewer.md
task-planner.md
triage-analyst.md
commands/
cancel.md
design.md
feedback.md
help.md
implement.md
index.md
new.md
refactor.md
requirements.md
research.md
start.md
status.md
switch.md
tasks.md
triage.md
hooks/
hooks.json
scripts/
lint-requirements.sh
load-spec-context.sh
path-resolver.sh
quick-mode-guard.sh
stop-watcher.sh
test-lint-requirements.sh
test-multi-dir-integration.sh
test-path-resolver.sh
update-spec-index.sh
references/
branch-management.md
commit-discipline.md
coordinator-pattern.md
failure-recovery.md
goal-interview.md
intent-classification.md
parallel-research.md
phase-rules.md
quality-checkpoints.md
quality-commands.md
quick-mode.md
sizing-rules.md
spec-scanner.md
triage-flow.md
verification-layers.md
schemas/
spec.schema.json
skills/
communication-style/
references/
examples.md
SKILL.md
interview-framework/
references/
algorithm.md
examples.md
SKILL.md
reality-verification/
references/
goal-detection-patterns.md
mock-quality-checks.md
SKILL.md
smart-ralph/
references/
state-file-schema.md
SKILL.md
spec-workflow/
references/
phase-transitions.md
SKILL.md
templates/
component-spec.md
design.md
epic.md
external-spec.md
index-summary.md
progress.md
prompts/
executor-prompt.md
research-prompt.md
requirements.md
research.md
settings-template.md
tasks.md
README.md
skills/
Command Development
Hook Development
... 243 moreยฉ 2026 Flowy ยท Free and open source
Built for Claude Code ยท Not affiliated with Anthropic