wf-ralph

Run a Ralph-style, one-story-per-iteration loop using the Ralph CLI (dev, research, e2e, review), Codex-by-default, and dossier-local PRD JSON discovery.

5 stars

Best use case

wf-ralph is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Run a Ralph-style, one-story-per-iteration loop using the Ralph CLI (dev, research, e2e, review), Codex-by-default, and dossier-local PRD JSON discovery.

Teams using wf-ralph should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/wf-ralph/SKILL.md --create-dirs "https://raw.githubusercontent.com/marchatton/agent-skills/main/.agents/skills/04-develop/wf-ralph/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/wf-ralph/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How wf-ralph Compares

Feature / Agentwf-ralphStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Run a Ralph-style, one-story-per-iteration loop using the Ralph CLI (dev, research, e2e, review), Codex-by-default, and dossier-local PRD JSON discovery.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# wf-ralph

## Purpose

Run a "Ralph loop" using the `ralph` CLI.

- Keep the mental model: **one story per iteration**, frequent verification, small changes.
- Default agent: **Codex** (YOLO) unless you override `--agent`.
- Default task source: dossier-local **Ralph PRD JSON** (`prd.json` or `prd-<slug>.json`).
- Browser testing: **YES for UI stories** (default skill: `$dev-browser`).

## When to use

Use this skill when any of the following is true:

- You want copy-paste-ready `ralph` commands for `dev | research | e2e | review | prd-gen`.
- You have (or want) a dossier-local Ralph PRD JSON and need to run one iteration at a time.
- You have an `@slug` and need to locate the PRD JSON under `docs/04-projects/**`.

## Minimum questions

If any of these are missing, ask only these questions first (reply format at the end).

1) **Mode**?
- a) **dev** (default)
- b) research
- c) e2e
- d) review
- e) prd-gen

2) **PRD location**?
- a) **Use `./prd.json` if present** (default)
- b) pick from `./prd-*.json`
- c) `@slug` (search under `docs/04-projects/**`)
- d) explicit path to PRD JSON

3) **Commit behavior**?
- a) **Commit** (default)
- b) `--no-commit`

Reply shorthand:

- `defaults` (accept all defaults)
- or `1c 2c @bulk-invite-members 3b` etc

## Discovery

### Determine repo root (required)

Run `ralph` from the repo root so `.ralph/` state/logs land in the right place:

```bash
cd "$(git rev-parse --show-toplevel)"
```

### Locate dossier PRD JSON (avoid brittle paths)

Ralph auto-discovery only scans `.agents/tasks/*.json`. For dossier-local PRDs, pass `--prd` explicitly.

Resolution order:

1) If the current working directory contains `prd.json`, use it.
2) Else if it contains `prd-*.json`:
- if exactly one match, use it
- if multiple matches, ask which to use
3) Else accept either:
- an `@slug` (dossier folder name contains the slug), or
- a relative path to a dossier folder, or
- an explicit path to a PRD JSON file

```bash
# Find PRDs and filter by slug
find docs/04-projects -type f \( -name 'prd.json' -o -name 'prd-*.json' \) | rg '<slug>'

# Example
find docs/04-projects -type f \( -name 'prd.json' -o -name 'prd-*.json' \) | rg 'bulk-invite-members'
```

If you don't have `rg`, run the `find ...` and inspect the results.

## Ralph commands

### Defaults that match the Ralph vibe

- Run **one story per invocation**: `ralph build 1`.
- Repeat the command N times manually (or via a wrapper script) to avoid context rot.
- Prefer explicit `--prd <file>` for dossier-local PRDs.

### Dev mode

```bash
ralph build 1 --agent=codex --prd "<PRD_JSON>"
```

Behavioural requirements:

- Keep changes small and focused (one concern per iteration).
- Respect repo conventions (pnpm workspaces, TypeScript preference).
- For code changes: always use the `verify` skill and report commands + results.
- For UI/user-flow changes: browser verification is required (default: `$dev-browser`).

### No-commit (dry run style)

```bash
ralph build 1 --agent=codex --prd "<PRD_JSON>" --no-commit
```

### Research mode

Behavioural requirements:

- Treat “done” as a concrete artefact (memo, plan, decision record) written into the dossier.
- Prefer writing under the dossier folder (for example: `docs/04-projects/.../<dossier>/research/…`).
- Avoid modifying product code unless a task explicitly asks.

Recommendation:
- default to `--no-commit` if you're exploring
- enable commits once the story is clearly correct

### E2E mode

Behavioural requirements:

- Require browser verification for UI stories.
- Default browser verification skill: `$dev-browser`.
- Optional/alternate quick smoke: `$test-browser`.
- Write evidence artefacts to a dossier-local artefacts folder (recommendation):
  - `<dossier>/artifacts/e2e/` (screenshots, notes, logs)

Test suite status:

- If an automated E2E runner does not exist yet, treat it as a placeholder task.
- Still produce proof via `test-browser` screenshots and a short run log.

### Review mode

Use `ralph review` (do not run `ralph build` unless explicitly asked).

```bash
ralph review
ralph review --scope staged
ralph review --scope range --range main..HEAD
```

### PRD generation mode (optional)

Generate a new PRD JSON into `.agents/tasks/`:

```bash
ralph prd --agent=codex
```

Override output path:

```bash
ralph prd --agent=codex --out .agents/tasks/prd-<short>.json "<feature description>"
```

## PRD JSON notes

Ralph PRD JSON uses top-level `qualityGates[]` and `stories[]`.

- Ralph updates story `status` automatically (`open` -> `in_progress` -> `done`). Avoid editing story statuses manually.
- Optional fields like `stories[].passes` and `stories[].notes` are supported for downstream workflows, but Ralph does not set them.

## Output format when running this skill

When this skill is invoked in a chat/thread:

1) Ask the minimum questions if anything is missing (mode, PRD path/slug, commit behavior).
2) Print copy-paste-ready command lines for the chosen mode.
3) List expected evidence artefacts and where they will be written.
4) End with a suggestion to run `pickup` at the start (new thread) and `handoff` at the end (before switching threads).

Related Skills

skill-creator

5
from marchatton/agent-skills

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, update or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

modular-skills-architect

5
from marchatton/agent-skills

Map and refactor an agent context ecosystem: skills, commands/workflows, hooks, agent files, AGENTS.md templates, and docs. Output system map, module/dependency design, Register updates, and a concrete split/consolidate/rename/delete plan. Use when routing or ownership is messy.

heal-skill

5
from marchatton/agent-skills

This skill should be used when fixing incorrect SKILL.md files with outdated instructions or APIs.

create-agent-skills

5
from marchatton/agent-skills

Expert guidance for creating, writing, and refining Claude Code Skills. Use when working with SKILL.md files, authoring new skills, improving existing skills, or understanding skill structure and best practices.

agent-native-audit

5
from marchatton/agent-skills

Comprehensive agent-native architecture audit with scored principles and multi-slice review. Use for system-wide health checks or periodic audits.

write-judge-prompt

5
from marchatton/agent-skills

Design LLM-as-Judge evaluators for subjective criteria that code-based checks cannot handle. Use when a failure mode requires interpretation (tone, faithfulness, relevance, completeness). Do NOT use when the failure mode can be checked with code (regex, schema validation, execution tests). Do NOT use when you need to validate or calibrate the judge — use validate-evaluator instead.

validate-evaluator

5
from marchatton/agent-skills

Calibrate an LLM judge against human labels using data splits, TPR/TNR, and bias correction. Use after writing a judge prompt (write-judge-prompt) when you need to verify alignment before trusting its outputs. Do NOT use for code-based evaluators (those are deterministic; test with standard unit tests).

generate-synthetic-data

5
from marchatton/agent-skills

Create diverse synthetic test inputs for LLM pipeline evaluation using dimension-based tuple generation. Use when bootstrapping an eval dataset, when real user data is sparse, or when stress-testing specific failure hypotheses. Do NOT use when you already have 100+ representative real traces (use stratified sampling instead), or when the task is collecting production logs.

evaluate-rag

5
from marchatton/agent-skills

Guides evaluation of RAG pipeline retrieval and generation quality. Use when evaluating a retrieval-augmented generation system, measuring retrieval quality, assessing generation faithfulness or relevance, generating synthetic QA pairs for retrieval testing, or optimizing chunking strategies.

eval-audit

5
from marchatton/agent-skills

Audit an LLM eval pipeline and surface problems: missing error analysis, unvalidated judges, vanity metrics, etc. Use when inheriting an eval system, when unsure whether evals are trustworthy, or as a starting point when no eval infrastructure exists. Do NOT use when the goal is to build a new evaluator from scratch (use error-analysis, write-judge-prompt, or validate-evaluator instead).

error-analysis

5
from marchatton/agent-skills

Help the user systematically identify and categorize failure modes in an LLM pipeline by reading traces. Use when starting a new eval project, after significant pipeline changes (new features, model switches, prompt rewrites), when production metrics drop, or after incidents.

build-review-interface

5
from marchatton/agent-skills

Build a custom browser-based annotation interface tailored to your data for reviewing LLM traces and collecting structured feedback. Use when you need to build an annotation tool, review traces, or collect human labels.