Smart-ralph ralph-specum
Use only when the user explicitly invokes `$ralph-specum`, requests Ralph Specum in Codex, asks Ralph Specum to handle a named phase, or explicitly requests autonomous or quick mode or continuation without pauses.
git clone https://github.com/tzachbon/smart-ralph
T=$(mktemp -d) && git clone --depth=1 https://github.com/tzachbon/smart-ralph "$T" && mkdir -p ~/.claude/skills && cp -r "$T/plugins/ralph-specum-codex/skills/ralph-specum" ~/.claude/skills/tzachbon-smart-ralph-ralph-specum && rm -rf "$T"
plugins/ralph-specum-codex/skills/ralph-specum/SKILL.mdRalph 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.
Read These References
for the phase flow, branch and worktree behavior, quick mode, and command routingreferences/workflow.md
forreferences/state-contract.md
,.ralph-state.json
, commit rules, and resume semantics.progress.md
forreferences/path-resolution.md
,specs_dirs
, ambiguity handling, and default directory behavior.current-spec
for Claude-to-Codex feature translation and command mappingreferences/parity-matrix.md
Use These Helpers
for spec roots, current spec, and unique or ambiguous name resolutionscripts/resolve_spec_paths.py
for safe top-level state mergesscripts/merge_state.py
for task counts and next incomplete taskscripts/count_tasks.py
for the canonical Ralph markdown file shapesassets/templates/
when the user wants optional project-local Codex guidanceassets/bootstrap/
Primary Routing
Handle these intents directly:
| Intent | Action |
|---|---|
| Start, new, resume, quick mode | Follow the start flow in |
| Triage | Delegate to sub-agent to decompose into epic and specs |
| Research | Delegate to sub-agent to write |
| Requirements | Delegate to sub-agent to write |
| Design | Delegate to sub-agent to write |
| Tasks | Delegate to sub-agent to write |
| Implement | Delegate each task to sub-agent until complete or blocked |
| Status | Show active spec, backlog state, and per-root listing |
| Switch | Update only |
| Cancel | Stop execution and clean up state, confirm before destructive delete |
| Index | Generate component and external specs |
| Refactor | Delegate to 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
- You are a coordinator, not a doer. For every phase (research, requirements, design, tasks, implement, triage, refactor), delegate the actual generation work to the appropriate sub-agent. Never write spec artifacts (research.md, requirements.md, design.md, tasks.md) yourself. Your job is to gather context, run the interview, delegate, validate the output, and present results for approval.
- Keep the Ralph disk contract stable.
- Treat
as the settings source when present..claude/ralph-specum.local.md - Default to
when no valid config exists../specs - Keep
in the default specs root..current-spec - Merge state fields. Do not replace the whole state object.
- Preserve
,source
,name
,basePath
,phase
,taskIndex
,totalTasks
,taskIteration
,maxTaskIterations
,globalIteration
,maxGlobalIterations
, andcommitSpec
.relatedSpecs - Also preserve newer state fields when present, especially
,awaitingApproval
,quickMode
,granularity
,epicName
, and native task sync metadata.discoveredSkills - Write
after every phase and after every implementation attempt..progress.md - Honor approval checkpoints between phases unless quick mode is active.
- Honor the
line in tasks during implementation unless the user explicitly disables task commits.Commit - Use branch creation or worktree creation when the user asks for branch isolation or the repo policy requires it.
- Enter quick mode only when the user explicitly asks Ralph to be autonomous, do it quickly, or continue without pauses.
- In quick mode, generate missing artifacts, default task granularity to
when unset, and continue into implementation in the same session.fine
Stop Enforcement
After completing any phase artifact (research, requirements, design, tasks), you MUST:
- Display the walkthrough summary
- Present the approval prompt (approve / request changes / continue to next)
- STOP and wait for user response
The ONLY exception is
--quick mode. Without --quick, you MUST NOT auto-continue to the next phase. This is non-negotiable.
Response Handoff
- After writing
,research.md
,requirements.md
,design.md
, or refactored spec files outside quick mode:tasks.md- name the file or files that changed
- give a short summary
- end with exactly one explicit choice prompt:
approve current artifactrequest changescontinue to <named next step>
- Treat
as approval of the current artifact and permission to proceed.continue to <named next step> - After
orstart
, summarize the resolved spec and stop unless the user explicitly asked for quick or autonomous flow. The next choice should point tonew
.continue to research
Current Workflow Expectations
- Use brainstorming-style interviews for research, requirements, design, and tasks when quick mode is not active.
- Route obviously large or cross-cutting efforts to triage before normal spec generation.
- Support active epic state via
and per-epic state inspecs/.current-epic
.specs/_epics/<epic-name>/ - Treat task planning as POC-first with
markers for safe parallel work and[P]
checkpoints for explicit quality validation.[VERIFY] - Support VE tasks when the plan needs autonomous end-to-end verification.
- During implementation, recompute task counts from disk, resume from the first incomplete task, and prefer task file truth over stale state.
- Native task sync is part of the current Ralph execution model. Keep Codex wording aligned with that behavior without promising Claude-only hook mechanics.
Bootstrap
Bootstrap project-local files only when the user wants them.
Suggested bootstrap files:
to give a consumer repo local Ralph guidanceassets/bootstrap/AGENTS.md
to seed local settingsassets/bootstrap/ralph-specum.local.md
Do not bootstrap by default. Installation into
$CODEX_HOME/skills is enough.