feat(ralph): add Ralph Loop plugin - #569
Conversation
…provement Skill for improving a file (prompt, config, template) toward reference quality through repeated single-change A/B testing. Each iteration makes exactly one change, tests it against reference examples via parallel generation + judge evaluation, and adopts only what works. Key design decisions: - One change per iteration (bundled changes hide what helped/hurt) - Dynamic next-change based on judge feedback (not pre-planned list) - Same inputs every iteration for valid comparison - Adopt on TIE (change that doesn't hurt is worth keeping) - Stop after 2+ consecutive rejections (rethink approach)
Replace eval-specific iterative-eval with a general-purpose iterate skill. Works for any incremental improvement: prompts, code, configs, docs — anything where you can verify whether a change helped. Key design: - One change per iteration (clear signal) - Pluggable verification (test, build, judge, user, metric, composite) - Feedback-driven next change (not pre-planned) - Stop on 2+ consecutive rejections BREAKING CHANGE: removes iterative-eval skill
Fix MD013/MD032/MD031/MD040 violations in SKILL.md, ralph plugin plan, and ralph plugin design spec introduced in this branch.
e5a9889 to
b93844f
Compare
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughAdds a new standalone "ralph" Claude plugin that registers in the marketplace, provides a Bun-based Stop-hook executable to persist and control an iterative loop via Changes
Sequence DiagramsequenceDiagram
participant Claude as Claude IDE
participant HookEngine as Hook Engine
participant Script as ralph-persist.ts
participant FS as File System
Claude->>HookEngine: Trigger Stop event
HookEngine->>Script: Execute with JSON (session_id, cwd)
Script->>FS: Inspect .ralph/state/ (state file, sentinels)
alt activating sentinel present (no state)
Script->>FS: Read sentinel, init ralph-state.json, delete sentinel
Script-->>HookEngine: Write {"decision":"block", "reason": ...}
else state missing/inactive or session mismatch
Script-->>HookEngine: No output (allow stop)
else state active & session matches
Script->>FS: Check last_checked_at (stale >2h?)
alt stale
Script->>FS: Mark inactive, persist
Script-->>HookEngine: No output (allow stop)
else fresh
Script->>FS: Check cancel-signal-state.json
alt cancel signal exists
Script->>FS: Delete cancel-signal, mark inactive, persist
Script-->>HookEngine: No output (allow stop)
else
Script->>FS: Increment iteration, maybe extend max_iterations, persist
Script-->>HookEngine: Write {"decision":"block", "reason": ...}
end
end
end
HookEngine-->>Claude: Decision (block or allow)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
# [10.0.0](v9.0.1...v10.0.0) (2026-03-23) ### Features * **ralph:** add Ralph Loop plugin ([#569](#569)) ([c93af1b](c93af1b)) ### BREAKING CHANGES * **ralph:** removes iterative-eval skill * docs: add ralph plugin design spec * docs: add ralph plugin implementation plan * feat(ralph): scaffold plugin with plugin.json and marketplace registration * feat(ralph): add Stop hook registration and tests * feat(ralph): implement Stop hook pass-through logic * test(ralph): add block logic and max_iterations tests * test(ralph): add flow integration tests * feat(ralph): add ralph skill with PRD-driven loop protocol * chore(ralph): fix markdownlint violations in ralph docs and skill Fix MD013/MD032/MD031/MD040 violations in SKILL.md, ralph plugin plan, and ralph plugin design spec introduced in this branch. * chore(ralph): clarify session_id empty check behavior
Summary
Ralph Loop 플러그인을 추가합니다. PRD 기반 영속 루프 — Claude의 Stop 이벤트를 가로채서 모든 유저 스토리가 통과할 때까지 Claude가 계속 작업하도록 합니다.
Changes
plugins/ralph/.claude-plugin/plugin.json— 플러그인 메타데이터plugins/ralph/hooks/hooks.json— Stop 이벤트에 ralph-persist.ts 등록plugins/ralph/hooks/ralph-persist.ts— Stop 훅 엔진 (Bun TypeScript): state 읽기 → block 또는 allow 결정plugins/ralph/skills/ralph/SKILL.md— Claude 프로토콜: PRD 작성 → 스토리 실행 → 검증 → cancel signal.claude-plugin/marketplace.json— ralph 플러그인 등록tests/ralph_hooks_json.bats— hooks.json 검증 테스트 (3개)tests/ralph_persist.bats— ralph-persist.ts 유닛 + 플로우 테스트 (10개)docs/superpowers/specs/2026-03-23-ralph-plugin-design.md— 설계 스펙docs/superpowers/plans/2026-03-23-ralph-plugin.md— 구현 플랜Tests
bats tests/— 63/63 통과Breaking
없음.
Summary by CodeRabbit