ralph-specum
Ralph Specum is a Claude Code skill that orchestrates the Ralph workflow system for managing project specifications and task execution through a structured phase-based process. Use it when explicitly invoked by name, when the user requests autonomous or quick mode operation, or when requesting continuation without pauses across phases like research, requirements, design, task planning, and implementation. The skill delegates specialized work to sub-agent helpers while maintaining state, routing commands, and managing spec file organization through `.ralph-state.json` and directory tracking.
git clone --depth 1 https://github.com/tzachbon/smart-ralph /tmp/ralph-specum && cp -r /tmp/ralph-specum/plugins/ralph-specum-codex/skills/ralph-specum ~/.claude/skills/ralph-specumSKILL.md
# Ralph Specum Use this as the primary Codex surface for Ralph Specum. It carries the full reusable workflow and can handle the entire command surface directly when helper skills are not installed. Derive `RALPH_CODEX_PLUGIN_ROOT` from this loaded skill: take the directory containing `SKILL.md`, then its parent `skills` directory, then the next parent. Never derive the plugin root from the project working directory. ## Read These References - `"$RALPH_CODEX_PLUGIN_ROOT/references/workflow.md"` for the phase flow, branch and worktree behavior, quick mode, and command routing - `"$RALPH_CODEX_PLUGIN_ROOT/references/state-contract.md"` for `.ralph-state.json`, `.progress.md`, commit rules, and resume semantics - `"$RALPH_CODEX_PLUGIN_ROOT/references/path-resolution.md"` for `specs_dirs`, `.current-spec`, ambiguity handling, and default directory behavior - `"$RALPH_CODEX_PLUGIN_ROOT/references/parity-matrix.md"` for Claude-to-Codex feature translation and command mapping - `"$RALPH_CODEX_PLUGIN_ROOT/references/prototype-coordinator.md"` for direct, suggested, resume, quick, cancel, and prototype handoff behavior - `"$RALPH_CODEX_PLUGIN_ROOT/skills/interview-framework-codex/SKILL.md"` and its required algorithm and domain-modeling references for every normal-mode phase interview ## Use These Helpers - `"$RALPH_CODEX_PLUGIN_ROOT/scripts/resolve_spec_paths.py"` for spec roots, current spec, and unique or ambiguous name resolution - `"$RALPH_CODEX_PLUGIN_ROOT/scripts/merge_state.py"` for safe top-level state merges - `"$RALPH_CODEX_PLUGIN_ROOT/scripts/count_tasks.py"` for task counts and next incomplete task - `"$RALPH_CODEX_PLUGIN_ROOT/scripts/phase_gate.py"` for mode, skill-load, interview, parent-delegation, and artifact-write gates - `"$RALPH_CODEX_PLUGIN_ROOT/scripts/locked_state.py"` for locked state and `activePrototypes` mutations - `"$RALPH_CODEX_PLUGIN_ROOT/scripts/prototype_records.py"` for reviewed immutable prototype records and downstream selection - `"$RALPH_CODEX_PLUGIN_ROOT/scripts/prototype_harness.py"` for bounded builder control outcomes and retry metadata - `"$RALPH_CODEX_PLUGIN_ROOT/templates/"` for the canonical Ralph markdown file shapes - `"$RALPH_CODEX_PLUGIN_ROOT/assets/bootstrap/"` when the user wants optional project-local Codex guidance ## Primary Routing Handle these intents directly: | Intent | Action | |--------|--------| | Start, new, resume, quick mode | Follow the start flow in `../../references/workflow.md` | | Triage | Delegate to `triage-analyst` sub-agent to decompose into epic and specs | | Research | Delegate to `research-analyst` sub-agent to write `research.md` | | Requirements | Delegate to `product-manager` sub-agent to write `requirements.md` | | Prototype | Follow `../../references/prototype-coordinator.md`, or route an explicit helper request to `$ralph-specum-prototype` | | Design | Delegate to `architect-reviewer` sub-agent to write `design.md` | | Tasks | Delegate to `task-planner` sub-agent to write `tasks.md` | | Implement | Delegate each task to `spec-executor` sub-agent until complete or blocked | | Status | Show active spec, backlog state, and per-root listing | | Switch | Update `.current-spec` only | | Cancel | Stop execution and clean up state, confirm before destructive delete | | Index | Generate `specs/.index/` component and external specs | | Refactor | Delegate to `refactor-specialist` sub-agent to update spec files | | Feedback | Open or draft GitHub feedback | | Help | Summarize the surface and next commands | If the corresponding helper skill is installed and the user invoked it explicitly, keep behavior aligned with that helper. If not, perform the action here. ## Core Rules 0. **You are a coordinator, not a doer.** Delegate each phase to the appropriate sub-agent and never write spec artifacts (`research.md`, `requirements.md`, `design.md`, or `tasks.md`) yourself. For only `start`, `triage`, `research`, `requirements`, `design`, and `tasks`, gather context, discover and preload contracts, run the interview, obtain final approval, pass the gate, delegate, validate the output, and present results for artifact approval. Keep the existing delegation flows for `implement` and `refactor` unchanged; the new phase gates do not apply to them. 1. Keep the Ralph disk contract stable. 2. Treat `.claude/ralph-specum.local.md` as the settings source when present. 3. Default to `./specs` when no valid config exists. 4. Keep `.current-spec` in the default specs root. 5. Merge state fields. Do not replace the whole state object. 6. Preserve `source`, `name`, `goal`, `basePath`, `phase`, `taskIndex`, `totalTasks`, `taskIteration`, `maxTaskIterations`, `globalIteration`, `maxGlobalIterations`, `commitSpec`, and `relatedSpecs`. 7. Also preserve newer state fields when present, especially `awaitingApproval`, `quickMode`, `granularity`, `epicName`, `discoveredSkills`, and native task sync metadata. 8. Write `.progress.md` after every phase and after every implementation attempt. 9. Keep pre-delegation interview approval separate from post-generation artifact approval. 10. Honor the `Commit` line in tasks during implementation unless the user explicitly disables task commits. 11. Use branch creation or worktree creation when the user asks for branch isolation or the repo policy requires it. 12. Run `phase_gate.py mode` at entry to every affected phase. Only exact `--quick` enables quick mode; exact `--interactive` clears it. Reject both together, `-q`, variants, and natural-language substitutes. No flags normalize invalid legacy quick state to interactive. 13. In exact quick mode, run discovery and contract loading, record the current manifest and `bypassed_quick`, generate missing artifacts, default task granularity to `fine` when unset, and continue into implementation in the same session. 14. For normal-mode start, triage, research, requirements, design, and tasks, follow `"$RALPH_CODEX_PLUGIN_ROOT/skills/interview-framework-codex/
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context Protocol", "connect external service", mentions "${CLAUDE_PLUGIN_ROOT} with MCP", or discusses MCP server types (SSE, stdio, HTTP, WebSocket). Provides comprehensive guidance for integrating Model Context Protocol servers into Claude Code plugins for external tool and service integration.
This skill should be used when the user asks about "plugin settings", "store plugin configuration", "user-configurable plugin", ".local.md files", "plugin state files", "read YAML frontmatter", "per-project plugin settings", or wants to make plugin behavior configurable. Documents the .claude/plugin-name.local.md pattern for storing plugin-specific configuration with YAML frontmatter and markdown content.
This skill should be used when the user asks to "create a plugin", "scaffold a plugin", "understand plugin structure", "organize plugin components", "set up plugin.json", "use ${CLAUDE_PLUGIN_ROOT}", "add commands/agents/skills/hooks", "configure auto-discovery", or needs guidance on plugin directory layout, manifest configuration, component organization, file naming conventions, or Claude Code plugin architecture best practices.
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill content", or needs guidance on skill structure, progressive disclosure, or skill development best practices for Claude Code plugins.
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
Generate a custom checklist for the current feature based on user requirements.