Iterative-loop orchestrator for [ralph]-marked tasks. Spawns ralph-worker subagents in a worktree, runs verify commands, and loops until both promise tag and exit code agree.
Ships in harness. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Iterative-loop orchestrator for [ralph]-marked Plans.md tasks.
Spawns a fresh harness:ralph-worker subagent per attempt inside a single persistent worktree,
runs the Verify command authoritatively, and loops until both the <promise> text tag and verify exit 0 agree.
| Subcommand / Argument | Behavior |
|---|---|
help | Print usage, philosophy, and link to prompt-best-practices.md |
<task-id> | Run the loop for a Plans.md task that has [ralph] marker |
--max-iter N | Override MaxIter (default: 10) |
--verify CMD | Override the Verify command from the task |
See references/loop-flow.md for the complete orchestrator pseudocode.
Summary: On iteration 0 the orchestrator spawns a ralph-worker with isolation="worktree" to create the persistent worktree, capturing RALPH_WORKTREE from result.worktreePath. For iterations 1..N it fetches the EnterWorktree deferred-tool schema via ToolSearch, calls EnterWorktree(path=RALPH_WORKTREE), then spawns the next worker without the isolation param. After each iteration the orchestrator runs the Verify command itself (anti-tamper), compares the exit code against ralph-worker-report.v1.verify.exit_code, scans the final assistant message for <promise>…</promise>, and diffs the worktree to detect stuck iterations. The loop terminates on success or on any of the three hard-stop failure modes (FT-RALPH-01 STUCK, FT-RALPH-02 VERIFY-MISMATCH, FT-RALPH-03 MAX-ITER).
Running harness-ralph-loop help prints the following:
Overview — harness-ralph-loop is an iterative-loop orchestrator that spawns a fresh
ralph-worker subagent per attempt inside a single persistent worktree, runs the Verify
command authoritatively, and loops until both the <promise> text tag and verify exit 0 agree.
Philosophy bullets:
Prompt guidance pointer:
For full prompt-writing guidance see prompt-best-practices.md
Task-pattern fit pointer:
For task-pattern fit see when-to-ralph.md
See references/when-to-ralph.md for guidance on which tasks are Ralph-suitable and which are not.
| File | Purpose |
|---|---|
references/loop-flow.md | Full orchestrator pseudocode, prompt template, decision matrix, terminal-state handling |
references/when-to-ralph.md | When to use Ralph (task patterns, DoD quality checks) |
references/prompt-best-practices.md | Prompt writing best practices (A1–A4), philosophy bullets, learn-more links |
harness-plan — Emits [ralph] marker + Verify: line for suitable tasksharness-work — Detects [ralph] marker and routes to this skillharness:ralph-worker — The per-iteration worker agent this skill dispatchesWhat SKILL.md sets; muted values are Claude Code's defaults
ralph task, loop until pass, iterate until tests pass, ralph mode, run ralph loop, [ralph] task
sonnethighThree short reads, in order
iterative-loop, ralph-worker, task-orchestrator, verify-loop
No slash command · from harness
npx claudepluginhub tim-hub/powerball-harness --plugin harness6 skills in this plugin
/harness-planPlans and tracks tasks in .claude/harness/plans.json. Use when creating plans, adding tasks, updating markers, checking progress, or brainstorming an idea into tasks./harness-reviewMulti-angle code and plan review with security, scope, and UI profiles. Use when reviewing code, plans, PRs, or running pre-merge quality gates./harness-setupInitializes and configures Harness in a project — CI, memory, duo workflow, Codex. Use when setting up a new project or adding Harness configuration.Other plugins' skills for the same job