epciralph-exec

star 0

Executes a single user story from PRD.json with TDD Red-Green cycle. Selects next pending story respecting dependencies, implements via @implementer, updates PRD with results, and emits RALPH_STATUS block for shell detection. Use when: Ralph autonomous loop, story-by-story execution, overnight batch runs. Triggers: ralph-exec, execute story, run next story, ralph execute. Not for: batch story execution, debugging (use /debug), full features (use /implement).

epci971 By epci971 schedule Updated 2/2/2026

name: epci:ralph-exec description: >- Executes a single user story from PRD.json with TDD Red-Green cycle. Selects next pending story respecting dependencies, implements via @implementer, updates PRD with results, and emits RALPH_STATUS block for shell detection. Use when: Ralph autonomous loop, story-by-story execution, overnight batch runs. Triggers: ralph-exec, execute story, run next story, ralph execute. Not for: batch story execution, debugging (use /debug), full features (use /implement). user-invocable: true argument-hint: "--prd " allowed-tools: Read, Write, Edit, Bash, Glob, Grep, Task

Ralph Exec

Execute a single user story from PRD.json with TDD workflow.

Quick Start

/ralph-exec --prd .ralph/my-feature/prd.json

MANDATORY EXECUTION RULES (READ FIRST):

  • ๐Ÿ”ด NEVER execute multiple stories in one invocation
  • ๐Ÿ”ด NEVER skip TDD cycle (Red-Green required)
  • ๐Ÿ”ด NEVER proceed without valid PRD.json
  • ๐Ÿ”ด NEVER modify PRD without RALPH_STATUS emission
  • โœ… ALWAYS start with step-00-init.md
  • โœ… ALWAYS follow next_step from each step
  • โœ… ALWAYS emit RALPH_STATUS block at end
  • โœ… ALWAYS respect story dependency order
  • โ›” FORBIDDEN skipping the RALPH_STATUS emission
  • ๐Ÿ”ต YOU ARE A DISCIPLINED SINGLE-STORY EXECUTOR

EXECUTION PROTOCOLS:

  1. Load step-00-init.md
  2. Execute current step protocols completely
  3. Proceed to next_step
  4. Complete until step-02-report.md with RALPH_STATUS

CONTEXT BOUNDARIES:

  • IN scope: Single story execution, TDD cycle, PRD update, status emission
  • OUT scope: Multiple stories, debugging, circuit breaker logic, rollback

Workflow Overview

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    RALPH-EXEC WORKFLOW                           โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                                                                  โ”‚
โ”‚  Step 00: INIT                                                   โ”‚
โ”‚  โ”œโ”€ Parse --prd argument                                        โ”‚
โ”‚  โ”œโ”€ Load and validate PRD.json                                  โ”‚
โ”‚  โ””โ”€ Select next story (pending + !passes + deps OK)             โ”‚
โ”‚     โ””โ”€ If no story โ†’ ABORT with ALL_DONE status                 โ”‚
โ”‚                                                                  โ”‚
โ”‚  Step 01: EXECUTE                                                โ”‚
โ”‚  โ”œโ”€ Load story context (AC, tasks)                              โ”‚
โ”‚  โ”œโ”€ TDD Red-Green cycle via @implementer                        โ”‚
โ”‚  โ”‚   โ”œโ”€ RED: Write failing test                                 โ”‚
โ”‚  โ”‚   โ””โ”€ GREEN: Implement to pass                                โ”‚
โ”‚  โ””โ”€ Track files_modified                                        โ”‚
โ”‚                                                                  โ”‚
โ”‚  Step 02: REPORT                                                 โ”‚
โ”‚  โ”œโ”€ Update PRD.json                                             โ”‚
โ”‚  โ”‚   โ”œโ”€ status, passes, attempts++                              โ”‚
โ”‚  โ”‚   โ””โ”€ files_modified[], completed_at                          โ”‚
โ”‚  โ””โ”€ Emit RALPH_STATUS block                                     โ”‚
โ”‚                                                                  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Steps

Step Name Description Skippable
00 init Parse PRD, validate, select next story No
01 execute TDD Red-Green implementation No
02 report Update PRD, emit RALPH_STATUS No

Step Files

Reference Files

Shared Components Used

  • epci:tdd-enforcer โ€” TDD cycle enforcement (Red-Green mode)

Story Selection Algorithm

FOR each story IN prd.userStories ORDER BY id:
  IF story.status == "pending" AND story.passes == false:
    deps_satisfied = ALL(dep.passes == true FOR dep IN story.dependencies.depends_on)
    IF deps_satisfied:
      RETURN story
RETURN null  # No story available

RALPH_STATUS Format (Summary)

<<<RALPH_STATUS>>>
story_id: {US1}
status: {SUCCESS|FAILURE|BLOCKED|ALL_DONE}
passes: {true|false}
error: {null|"error message"}
files_modified: [{list}]
next_story: {US2|null}
timestamp: {ISO-8601}
<<<END_RALPH_STATUS>>>

See references/status-block.md for complete specification.

Error Handling

Error Cause Resolution
PRD not found Invalid --prd path RALPH_STATUS with FAILURE
PRD invalid Schema validation fails RALPH_STATUS with FAILURE
No story available All done or blocked RALPH_STATUS with ALL_DONE or BLOCKED
Test fails 2x Implementation issue RALPH_STATUS with FAILURE
Dependency missing Story blocked Skip and emit BLOCKED

Limitations

This skill does NOT:

  • Execute multiple stories at once
  • Handle circuit breaker logic (done by ralph.sh)
  • Perform rollback on failure
  • Run code review or security audit (speed priority)
  • Create Feature Documents (handled by /spec)
Install via CLI
npx skills add https://github.com/epci971/claude-epci --skill epciralph-exec
Repository Details
star Stars 0
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator