ralph

Iterate coding tasks until user-confirmed Definition of Done checks pass.

Updated Apr 14, 2026
One-click install
npx skills add https://github.com/sr-ai-dev/sr-harness --skill ralph-sr-ai-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ralph
Source: https://github.com/sr-ai-dev/sr-harness/tree/main/skills/ralph
Command: npx skills add https://github.com/sr-ai-dev/sr-harness --skill ralph-sr-ai-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents incomplete work by forcing every proposed deliverable to be independently verified against an agreed Definition of Done.

Core Features & Use Cases

  • DoD-first workflow: turns the user’s intent into 3–7 concrete, binary, verifiable completion criteria before any work starts.
  • User-confirmed iteration loop: uses interactive confirmation (AskUserQuestion) and a max-iteration circuit breaker to avoid endless cycling.
  • Stop-hook verification with re-injection: blocks exit when any DoD items remain unchecked and reinjects the original prompt with remaining checklist items for targeted fixes.
  • Separated verification context: runs a dedicated verifier agent to objectively mark checklist items as pass/fail based on actual files/tests.

Use case: when implementing a feature (or fixing a bug), you agree on verifiable completion checks up front (tests, expected files/functions, no type/lint errors), and the loop ensures each check is satisfied before the session can end.

Quick Start

Invoke ralph to iterate until all Definition of Done criteria are independently verified, starting with your request and accepting or editing the proposed DoD.

Frequently Asked Questions about ralph

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce a Definition of Done before an AI coding agent finishes a task?

To enforce a Definition of Done, you need an iterative task-completion loop that derives concrete completion criteria up front and runs objective checks like tests or lint commands before allowing exit. This prevents incomplete work by blocking session end until all criteria pass.

What is iterative agent verification for coding changes and maintenance work?

Iterative agent verification is a process that validates code changes against an agreed Definition of Done using a dedicated verifier agent. It objectively marks checklist items as pass or fail based on actual files and tests, reinjecting the prompt with remaining items if checks fail.

How do I stop an AI agent from exiting when task completion criteria are not met?

You can stop an agent from exiting prematurely by using a stop-hook mechanism that blocks session end when any Definition of Done items remain unchecked. It reinjects the original prompt with the remaining checklist items to trigger targeted fixes.

Can I use interactive confirmation to define verifiable completion criteria for a bug fix?

Yes, a DoD-first workflow turns your bug fix intent into three to seven binary, verifiable completion criteria before any work starts. Interactive confirmation ensures you agree on these checks, such as expected files or no type errors, prior to execution.

Does iterative verification work without external dependencies for checking files and functions?

Iterative verification runs without external dependencies, relying on a persistent DoD file and session state to track checklist progress. It applies to coding changes where completion must be proven through objective checks like build commands and file existence.

What happens if an iterative verification loop gets stuck checking completion criteria?

To avoid endless cycling during verification, the process uses a max-iteration circuit breaker. If the loop reaches its maximum iterations without satisfying all Definition of Done items, it stops to prevent infinite cycling.