Ralph

From pixelastic/oroshi · View interactive version

Ralph is an AI agent skill from the GitHub repository pixelastic/oroshi. Use when user says "ralph <dir>" or "ralph this". Implements the highest-priority issue from state.json in the given directory using TDD, updates docs, runs review in a subagent, fixes actionable feedback, then stops for user to commit. Argument is the directory containing state.json and GUIDANCE.md

How to use this skill

Skill file

Ralph

Overview

One issue, TDD, documented, reviewed, fixed, stopped. Do not commit. Do not

continue to the next issue.

Working directory: $ARGUMENTS If $ARGUMENTS is empty, "this", ".",

or "here" → use current working directory.


Step 1 — SETUP

Goal: Select the next issue and load context.

Exit criterion: Issue selected, guidance loaded, ready to implement.

Run ralph-start $ARGUMENTS and parse the JSON output:

for the recap.

Read the file at the guidance path — accumulated knowledge from prior

sessions.

Read the file at the issue path — the spec for this session.

Display a one-line recap of the selected issue.


Step 2 — RED

Goal: Write tests that fail — either because the feature doesn't exist yet,

or because they demonstrate a bug.

Exit criterion: Test runs and fails.

If a dedicated skill for your language exists, load it (zsh-writer,

js-writer, python-writer, etc) It defines how to run tests for that

language.

If you have any ## Behavioral Tests from the issue:

If you have any ## Scaffolding Tests from the issue:

Run tests. If they passes immediately: tests are wrong. Rewrite them.

Do not write any production code in this step.


Step 3 — IMPLEMENT

Goal: Make the tests pass with minimal code, then verify the full suite.

Exit criterion: Linter clean, all tests green.

  1. Apply the /{lang}-writer skill's style patterns.
  2. Edit files inside the current git root (git-directory-root)
  3. Write the simplest code that makes the tests pass. No more.
  4. Refactor: apply the /{lang}-writer skill's style patterns. Don't add

behavior.

  1. Lint all modified files with git-file-lint. Fix every violation,

including pre-existing ones.

  1. Run tests for all modified files using git-file-test. Fix every failing

test, including pre-existing ones.


Step 4 — REVIEW

Goal: Get external feedback and categorize it.

Exit criterion: Findings categorized and displayed.

  1. Run the /review skill using the Skill tool (not Bash tool)
  1. Categorize ALL findings (from both Code Review and Spec Review) into two

buckets:

  1. Display the two buckets as a summary.
  2. Immediately move to Step 5 (FIX) in the same response. Do not stop, do

not wait for user input, do not end your turn.


Step 5 — FIX

Goal: Apply fixable feedback, verify nothing broke.

Exit criterion: All fixable items addressed, linter clean, tests green.

  1. Consume the fixable bucket, fix every item.
  2. Refactor: apply the /{lang}-writer skill's style patterns. Don't add

behavior.

  1. Lint all modified files with git-file-lint. Fix every violation,

including pre-existing ones.

  1. Run tests for all modified files using git-file-test. Fix every failing

test, including pre-existing ones.


Step 6 — UPDATE PLAN ARTIFACTS

Goal: Persist session state for future sessions.

Exit criterion: state.json, GUIDANCE.md (optional), and review-log.md

(optional) updated.

All paths of the following files are from ralph-start output.

  1. Update state.json: find the entry in .issues[] by id, set

done: true, add recap — a short one-sentence summary of what was done.

  1. Append to GUIDANCE.md under ## Discoveries:

```markdown

### Issue XX — <title>

```

Skip if there are no non-trivial findings.

  1. If the skipped bucket is non-empty, create or append to review-log.md.

Load review-log.md for the review-log format.


Step 7 — WRITE COMMIT HINT

Goal: Leave a hint so the commit message author understands what was built.

Exit criterion: COMMIT_HINT.md written.

Write COMMIT_HINT.md (path from ralph-start output).

Load commit-hint.md for the format and rules.


Step 8 — HANDOFF

Goal: End the session with a recap, then hand off to the user or to the next

queued command.

Exit criterion: Session recap displayed, ralph-end called.

Print the recap first:

Issue {currentIssueCount}/{totalIssueCount}

**Problem solved:** {the problem this issue addressed}

**What changed:** {production code only: new files, new or changed signatures, new links between components}

**Worth checking:** {see below}

Do not mention test files, scaffold tests, or test and lint results. Tests and

lint always pass at this step.

Worth checking: the user does not read GUIDANCE.md or review-log.md.

Surface their notable content. Also surface items that need the user's

attention. Include only items that the diff does not show. When in doubt,

include. Write None. if there is nothing.

Then run ralph-end $ARGUMENTS.

Stop here. Do not commit. Do not start the next issue. Wait for the user.


Step 9 — USER REVIEW

Goal: Apply user feedback with the same quality bar as automated steps.

Exit criterion: User is satisfied (commits, moves on, or ends conversation).

This step is a loop — the user reviews the recap or the diff and requests

changes. For each requested change:

  1. Apply the requested modification.
  2. Refactor: apply the /{lang}-writer skill's style patterns. Don't add

behavior.

  1. Lint all modified files with git-file-lint. Fix every violation,

including pre-existing ones.

  1. Run tests for all modified files using git-file-test. Fix every failing

test, including pre-existing ones.

  1. Present what changed. Wait for user's next feedback.

Common Rationalizations

| Rationalization | Reality |

| ----------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |

| "I don't need a specific skill, I know that language" | You don't know my style. Follow the standards of the skill. |

| "I'll write the test after to go faster" | Tests-after prove nothing. Delete the code. Start with RED. |

| "I'll do one more issue while I'm at it" | One issue. Full stop. |

| "Review feedback is minor, not worth it" | Minor feedback ignored = minor bugs shipped. Fix it. |

| "I don't need to read the guidance and issue files, I can start implementing" | You can't. Read both — guidance has prior discoveries; the issue has the acceptance criteria. |

| "I should commit so the review has something to diff" | Do not commit. That's the user's job. |

| "I should run review via the Bash tool" | Use the /review skill instead, Bash will go to the background and we need to wait for the review. |

| "I mentioned an issue COMMIT_HINT.md to be specific" | Issue are ephemeral and internal. Describe what was built, not which issue was closed. |

| "I should present review findings and wait for user input" | Steps 4→5 are continuous. Categorize, display, fix. No pause between REVIEW and FIX. |

| "Fixes are small, no need to refactor" | Post-fix code is still code. Refactor every time you touch code. |

Checklist

HANDOFF:

checking**

content, or says None.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.