ralph-graceful-exit
This skill uses Claude hooks which can execute code automatically in response to events. Review carefully before installing.
Ralph Graceful Exit
Purpose
Detect when a Ralph Loop iteration has truly completed its task, beyond just the <promise>DONE</promise> tag. This skill implements 4-signal detection to verify genuine completion.
Integrations
| Type | References |
|---|---|
| hooks | ralph-circuit-breaker, ralph-rate-limiter, ralph-activity-log |
| plugins | ralph-loop@claude-plugins-official |
4-Signal Detection
| Signal | Threshold | Detection Method |
|---|---|---|
| test_loops | ≥3 consecutive | Only running tests, no code changes |
| done_signals | ≥2 occurrences | "done", "complete", "finished" in output |
| completion_indicators | ≥2 patterns | Strong completion language patterns |
| fix_plan_check | all items ✓ | All @fix_plan.md items checked |
Detection Logic
When evaluating completion:
-
Check activity log for test-only iterations
grep -c "test\|pytest\|jest\|npm test" ~/.ralph-state/activity.log -
Scan recent output for done_signals patterns
- "done", "complete", "finished", "all tests pass"
- "implementation complete", "task finished"
-
Look for completion_indicators in conversation
- Strong completion language
- Summary of what was accomplished
- No pending TODO items mentioned
-
Verify fix_plan if exists
- Check if @fix_plan.md exists
- Verify all checkbox items are checked
[x]
Exit Recommendation
If ≥2 signals detected, recommend outputting:
<promise>DONE</promise>
Signal Weights
| Signal | Weight | Confidence |
|---|---|---|
| fix_plan_check (all ✓) | 1.0 | High |
| test_loops ≥3 | 0.8 | High |
| done_signals ≥2 | 0.6 | Medium |
| completion_indicators ≥2 | 0.5 | Medium |
Total weight ≥1.5 → Strong recommendation to exit Total weight ≥1.0 → Suggest checking completion status
More from zpankz/mcp-skillset
network-meta-analysis-appraisal
Systematically appraise network meta-analysis papers using integrated 200-point checklist (PRISMA-NMA, NICE DSU TSD 7, ISPOR-AMCP-NPC, CINeMA) with triple-validation methodology, automated PDF extraction, semantic evidence matching, and concordance analysis. Use when evaluating NMA quality for peer review, guideline development, HTA, or reimbursement decisions.
16software-architecture
Guide for quality focused software architecture. This skill should be used when users want to write code, design architecture, analyze code, in any case that relates to software development.
13cursor-skills
Cursor is an AI-powered code editor and development environment that combines intelligent coding assistance with enterprise-grade features and workflow automation. It extends beyond basic AI code comp...
13textbook-grounding
Orthogonally-integrated Hegelian syntopical analysis for SAQ/VIVA/concept grounding with systematic textbook citations. Implements thesis extraction → antithesis identification → abductive synthesis across multiple authoritative sources. Tensor-integrated with /m command: activates S×T×L synergies (textbook-grounding × pdf-search × qmd = 0.95). Triggers on requests for model SAQ responses, VIVA preparation, concept explanations requiring textbook evidence, or any PEX exam content needing systematic cross-reference validation.
12obsidian-process
This skill should be used when batch processing Obsidian markdown vaults. Handles wikilink extraction, tag normalization, frontmatter CRUD operations, and vault analysis. Use for vault-wide transformations, link auditing, tag standardization, metadata management, and migration workflows. Integrates with obsidian-markdown for syntax validation and obsidian-data-importer for structured imports.
12terminal-ui-design
Create distinctive, production-grade terminal user interfaces with high design quality. Use this skill when the user asks to build CLI tools, TUI applications, or terminal-based interfaces. Generates creative, polished code that avoids generic terminal aesthetics.
10