AgentSkillsCN

ralph-review

对Ralph生成的提交进行循环后的代码审查。

SKILL.md
--- frontmatter
name: ralph-review
description: Post-loop code review of ralph-generated commits
allowed-tools: Bash, Read, Grep, Glob, Task

Ralph Review — Post-Loop Code Review

Review all commits generated by the ralph loop and assess readiness for PR.

Steps

1. Identify Ralph Commits

bash
git log --oneline --all --grep="story-" --format="%H %s"

2. Read PRD.json

Load story details, acceptance criteria, and test expectations.

3. Review Each Story's Commit

For each commit with a story-{id}: prefix:

  • Diff review: git show {hash} --stat and git show {hash}
  • Acceptance criteria check: verify each criterion from PRD.json is met
  • Code quality: check for obvious issues, missing error handling, naming
  • Test coverage: verify tests were added/updated as specified

Use sub-agents (Task tool) in parallel — one per story — to avoid context bloat.

4. Run Full Test Suite

bash
# Detect test runner
if [ -f pytest.ini ] || [ -f pyproject.toml ]; then
  pytest -v --tb=short
elif [ -f package.json ]; then
  npm test
elif [ -f Cargo.toml ]; then
  cargo test
else
  echo "No test runner detected"
fi

5. Generate Report

Per-Story Verdict:

code
Story 1: "Add user model" — PASS
  - All acceptance criteria met
  - Tests added and passing

Story 3: "Add user routes" — NEEDS FIXES
  - Missing error handling for 404 case
  - Test covers happy path only

Overall Verdict:

  • Ready for PR — all stories pass, tests green
  • Needs fixes — list specific issues to address
  • Needs human review — flag anything uncertain

Suggested PR title and description based on PRD.json feature name and completed stories.