---
name: ralph-work-loop
description: Start or resume a Ralph Wiggum loop on an existing Work document (docs/work/*.md). Use when the user asks to "use ralph" on a Work doc or to run iterative Work-phase execution.
---

# Ralph Work Loop

Use this skill to run the Ralph Wiggum loop **after** a Work document exists.

## Requirements

- Ralph extension installed: `.pi/extensions/ralph-wiggum/index.ts`
- Work document already created in `docs/work/`

## Process

1. **Validate the Work doc**:
   - Check required sections: Intent link, Approach link, Checklist, Verification commands, Evidence section
   - Each checklist item needs a verification command
   - See the `work` skill for full validation checklist
   - Fix any issues before starting the loop

2. **Locate the Work doc**:
   - If user provides a path, use it.
   - Otherwise run:
     ```bash
     ./.pi/skills/ralph-work-loop/scripts/find-latest-work.sh
     ```
   - If multiple candidates are relevant, list them and ask the user to choose.

3. **Start the loop**:
   ```
   /ralph start <work-doc-path>
   ```
   Optional flags (ask user if they care):
   - `--items-per-iteration N`
   - `--reflect-every N`
   - `--max-iterations N`

4. **Monitor or resume**:
   - ` /ralph status` to show active loops
   - ` /ralph resume <name>` to continue paused loop

5. **Stop**:
   - Press `ESC` to pause
   - ` /ralph-stop` when idle to end the loop

## Notes

- The loop enforces the **Intent → Approach → Work** dialect and requires verification evidence for completed items.
- Use `/ralph start <path>` to point directly to an existing Work doc.
