Skip to content
Agentmart
Submit a tool

ralph-loop

A self-evaluating iterative agent loop that pursues a goal through structured cycles of Reason, Act, Look, Probe, and Harden until the goal is confidently…

Skill by zrosenfield

IndexedMIT★ 99
Write a review

Chalk Labs

Need help deploying ralph-loop?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/zrosenfield-ralph-loop

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

A self-evaluating iterative agent loop that pursues a goal through structured cycles of Reason, Act, Look, Probe, and Harden until the goal is confidently achieved. Use when a task requires iterative refinement, quality assurance, or when "good enough" isn't good enough. Works for any goal — document generation, data extraction, content processing, analysis, or creative work.

Use cases: documents, data, writing, productivity

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/ralph-loop

What's inside

Skill name
ralph-loop
Description
A self-evaluating iterative agent loop that pursues a goal through structured cycles of Reason, Act, Look, Probe, and Harden until the goal is confidently achieved. Use when a task requires iterative refinement, quality assurance, or when "good enough" isn't good enough. Works for any goal — document generation, data extraction, content processing, analysis, or creative work.
License
MIT
Instructions
277 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# RALPH Loop — Relentless Agentic Loop for Pursued Hardening

## Overview

RALPH is an iterative execution pattern where Claude pursues a goal through structured cycles, self-evaluating after each iteration and only stopping when it is genuinely confident the goal has been fully achieved — or when it has exhausted its configured iteration budget.

The loop is designed to prevent the common failure mode of "close enough" — where an agent produces a reasonable first attempt and stops, leaving gaps, inconsistencies, or missed requirements that a more careful pass would catch.

## The RALPH Cycle

Each iteration follows five phases:

```
┌─────────────────────────────────────────────────┐
│  R  →  A  →  L  →  P  →  H                     │
│  │     │     │     │     │                      │
│  │     │     │     │     └─ HARDEN              │
│  │     │     │     │        Decide: DONE or     │
│  │     │     │     │        loop back to R      │
│  │     │     │     │                            │
│  │     │     │     └─── PROBE                   │
│  │     │     │          Find specific gaps,     │
│  │     │     │          weaknesses, omissions   │
│  │     │     │                                  │
│  │     │     └───────── LOOK                    │
│  │     │                Examine output against  │
│  │     │                success criteria        │
│  │     │                                        │
│  │     └─────────────── ACT                     │
│  │                      Execute the plan,       │
│  │                      produce/refine output   │
│  │                                              │
│  └───────────────────── REASON                  │
│                         Decompose goal,         │
│                         define success criteria, │
│                         plan approach            │
└─────────────────────────────────────────────────┘
```

### Phase Details

#### R — REASON (Iteration 1: Goal Decomposition | Iteration 2+: Gap-Targeted Replanning)

**First iteration:**
- Parse the user's stated goal into a clear, unambiguous objective
- Decompose the goal into **success criteria** — concrete, evaluable conditions that must ALL be true for the goal to be considered achieved
- Each criterion should be specific enough to score on a 1–10 scale
- Plan the execution approach (tools, sequence, dependencies)
- Identify what "done" looks like — the acceptance threshold

**Subsequent iterations:**
- Review the gaps identified in the previous PROBE phase
- Replan specifically to address those gaps
- Do NOT restart from scratch — build on what's already been produced
- Prioritize the lowest-scoring criteria from the previous evaluation

**Output a structured plan:**
```
ITERATION [N] — REASON PHASE
=============================
Goal: [restated goal]
Success Criteria:
  1. [criterion] — [what "10/10" looks like]
  2. [criterion] — [what "10/10" looks like]
  ...
Plan: [what this iteration will do]
Focus Areas: [gaps from previous iteration, or "initial execution" if iteration 1]
```

#### A — ACT (Execute the Plan)

- Execute the plan from the REASON phase
- Use whatever tools are needed (file creation, web search, computation, etc.)
- Produce tangible output (files, content, data, analysis)
- On iteration 2+, modify/enhance existing output rather than regenerating from scratch (unless the PROBE phase determined a fundamental approach change is needed)

#### L — LOOK (Evaluate Against Criteria)

- Examine the output produced in the ACT phase
- Score EACH success criterion on a 1–10 scale
- Be brutally honest — this is where most agents fail by being too generous with themselves
- A score of 10 means "I would bet my reputation that this criterion is perfectly met"
- A score of 7-8 means "solid but there's room for improvement"
- A score below 7 means "this needs more work"

**Output a structured evaluation:**
```
ITERATION [N] — LOOK PHASE
============================
Criterion Scores:
  1. [criterion]: [score]/10 — [brief justification]
  2. [criterion]: [score]/10 — [brief justification]
  ...
Overall Confidence: [weighted average]/10
```

**Scoring calibration guide:**
- 10/10: Flawless. No possible improvement. Would pass expert review.
- 9/10: Excellent. Minor stylistic preferences might differ but substance is complete.
- 8/10: Very good. One small gap or imperfection that most people wouldn't notice.
- 7/10: Good. Meets the requirement but has a noticeable weakness.
- 6/10: Acceptable. Gets the job done but clearly could be better.
- 5/10 or below: Needs significant work. Do not consider stopping.

#### P — PROBE (Find the Gaps)

- For any criterion scoring below the completion threshold, identify EXACTLY what's missing or weak
- Be specific — "the introduction could be better" is useless; "the introduction doesn't establish the business context for the recommendation" is actionable
- Consider edge cases, unstated requirements, and quality dimensions the criteria might not fully capture
- Ask: "If I handed this to the user right now, what would they push back on?"

**Output a structured gap analysis:**
```
ITERATION [N] — PROBE PHASE
=============================
Gaps Found:
  - [Criterion N]: [specific, actionable description of what's missing]
  - [Criterion M]: [specific, actionable description of what's weak]
  ...

From zrosenfield/sharepoint-ai-skills, MIT.

More from zrosenfield/sharepoint-ai-skills

Signals

Stars
99
Forks
31
Open issues
0
Last commit (this folder)
Aug 4, 2026 (2 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from zrosenfield

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get ralph-loop running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying ralph-loop?

CallGet help
Cite this page

ralph-loop skill. Agent Mart. https://agentmart.dev/skills/zrosenfield-ralph-loop (last updated 2026-10-24)