Ralph Skill Review Loop
Ralph技能审查循环
A meta-skill that uses the Ralph Wiggum technique to review and improve the Ralph Wiggum prompt generator skills themselves. Runs a continuous improvement loop until skills pass review twice consecutively with no recommendations.
一种元技能,使用Ralph Wiggum技术来审查和改进Ralph Wiggum提示生成器技能本身。运行持续改进循环,直到技能连续两次通过审查且无任何改进建议。
Copy and run this prompt in a Ralph loop:
bash
/ralph-wiggum:ralph-loop "[paste prompt below]" --completion-promise "RALPH_SKILLS_PERFECTED" --max-iterations 100
复制并在Ralph循环中运行此提示:
bash
/ralph-wiggum:ralph-loop "[paste prompt below]" --completion-promise "RALPH_SKILLS_PERFECTED" --max-iterations 100
THE SELF-IMPROVING REVIEW LOOP PROMPT
自我改进审查循环提示
Task: Self-Improving Review of Ralph Wiggum Skills
任务:Ralph Wiggum技能的自我改进审查
Review and improve the Ralph Wiggum prompt generator skills until they pass two consecutive reviews with zero improvement recommendations.
审查并改进Ralph Wiggum提示生成器技能,直到它们连续两次通过审查且无任何改进建议。
- ralph-prompt-builder (Master orchestrator)
- ralph-prompt-single-task (Single task generator)
- ralph-prompt-multi-task (Multi-task generator)
- ralph-prompt-project (Project generator)
- ralph-prompt-research (Research generator)
Location: .claude/skills/ralph-prompt-*/SKILL.md
- ralph-prompt-builder(主编排器)
- ralph-prompt-single-task(单任务生成器)
- ralph-prompt-multi-task(多任务生成器)
- ralph-prompt-project(项目生成器)
- ralph-prompt-research(研究生成器)
位置:.claude/skills/ralph-prompt-*/SKILL.md
- RALPH-WIGGUM-TECHNIQUE-COMPREHENSIVE-RESEARCH.md (12,000+ words of best practices)
- skill-builder-package/research/ (skill building best practices)
- skill-builder-package/examples/ (production skill patterns)
- RALPH-WIGGUM-TECHNIQUE-COMPREHENSIVE-RESEARCH.md(12000+字的最佳实践内容)
- skill-builder-package/research/(技能构建最佳实践)
- skill-builder-package/examples/(生产级技能模式)
Required State Files
所需状态文件
Create these files to track progress:
RALPH_REVIEW_STATE.json:
json
{
"current_iteration": 1,
"consecutive_clean_reviews": 0,
"skills_reviewed": [],
"improvements_made": [],
"last_review_timestamp": "",
"status": "IN_PROGRESS"
}
RALPH_REVIEW_LOG.md:
创建以下文件来跟踪进度:
RALPH_REVIEW_STATE.json:
json
{
"current_iteration": 1,
"consecutive_clean_reviews": 0,
"skills_reviewed": [],
"improvements_made": [],
"last_review_timestamp": "",
"status": "IN_PROGRESS"
}
RALPH_REVIEW_LOG.md:
Ralph Skills Review Log
Ralph技能审查日志
[Append each iteration's findings here]
STEP 1: ORIENTATION (Every Iteration)
步骤1:定位(每次迭代)
Read current state:
bash
cat RALPH_REVIEW_STATE.json
cat RALPH_REVIEW_LOG.md | tail -50
git log --oneline -5
ls -la .claude/skills/ralph-prompt-*/
Check: How many consecutive clean reviews do we have?
- If 2 or more: Output <promise>RALPH_SKILLS_PERFECTED</promise>
- If less than 2: Continue to Step 2
读取当前状态:
bash
cat RALPH_REVIEW_STATE.json
cat RALPH_REVIEW_LOG.md | tail -50
git log --oneline -5
ls -la .claude/skills/ralph-prompt-*/
检查:我们已有多少次连续无问题审查?
- 如果达到2次或更多:输出 <promise>RALPH_SKILLS_PERFECTED</promise>
- 如果少于2次:继续步骤2
STEP 2: COMPREHENSIVE SKILL REVIEW
步骤2:全面技能审查
For EACH skill in ralph-prompt-*, evaluate against:
针对每个ralph-prompt-*技能,从以下维度评估:
2.1 Ralph Technique Alignment (from research)
2.1 Ralph技术对齐度(来自研究内容)
2.2 Skill Structure Quality
2.2 技能结构质量
2.3 Content Completeness
2.3 内容完整性
2.4 Prompt Template Quality
2.4 提示模板质量
For each skill:
- Read the SKILL.md file completely
- Compare against RALPH-WIGGUM-TECHNIQUE-COMPREHENSIVE-RESEARCH.md
- Check against all 16 criteria above
- Document findings in REVIEW_FINDINGS.md
针对每个技能:
- 完整读取SKILL.md文件
- 与RALPH-WIGGUM-TECHNIQUE-COMPREHENSIVE-RESEARCH.md进行对比
- 对照上述16项标准检查
- 将发现记录到REVIEW_FINDINGS.md中
Review Output Format
审查输出格式
Create/update REVIEW_FINDINGS.md:
Review Findings - Iteration [N]
审查发现 - 迭代[N]
- Skills reviewed: [count]
- Total issues found: [count]
- Critical issues: [count]
- Improvements needed: [count]
- 已审查技能:[数量]
- 发现的总问题数:[数量]
- 严重问题:[数量]
- 需要改进的项:[数量]
ralph-prompt-builder
ralph-prompt-builder
ralph-prompt-single-task
ralph-prompt-single-task
ralph-prompt-multi-task
ralph-prompt-multi-task
ralph-prompt-project
ralph-prompt-project
ralph-prompt-research
ralph-prompt-research
Recommendations Summary
建议摘要
Must Fix (Critical/High)
必须修复(严重/高优先级)
- [Recommendation 1]
- [Recommendation 2]
Should Fix (Medium)
应该修复(中优先级)
Nice to Have (Low)
可优化项(低优先级)
STEP 3: IMPLEMENT IMPROVEMENTS
步骤3:实施改进
If REVIEW_FINDINGS.md shows NEEDS_WORK:
如果REVIEW_FINDINGS.md显示NEEDS_WORK:
3.1 Prioritize Fixes
3.1 优先处理修复任务
Work in this order:
- Critical issues (breaks functionality)
- High issues (significantly impacts quality)
- Medium issues (improves quality)
- Low issues (polish)
按以下顺序处理:
- 严重问题(影响功能运行)
- 高优先级问题(显著影响质量)
- 中优先级问题(提升质量)
- 低优先级问题(优化 polish)
3.2 Implement Each Fix
3.2 实施每项修复
For each recommendation:
- Read the target skill file
- Implement the specific fix
- Verify the fix addresses the issue
- Commit the change:
bash
git add .claude/skills/ralph-prompt-[name]/SKILL.md
git commit -m "Improve ralph-prompt-[name]: [brief description]
- [Change 1]
- [Change 2]
Part of Ralph skills self-improvement loop iteration [N]"
针对每个建议:
- 读取目标技能文件
- 实施具体修复
- 验证修复是否解决了问题
- 提交变更:
bash
git add .claude/skills/ralph-prompt-[name]/SKILL.md
git commit -m "Improve ralph-prompt-[name]: [简要描述]
- [变更1]
- [变更2]
Part of Ralph skills self-improvement loop iteration [N]"
3.3 Track Improvements
3.3 跟踪改进
Update RALPH_REVIEW_STATE.json:
json
{
"improvements_made": [
{
"iteration": N,
"skill": "ralph-prompt-X",
"issue": "description",
"fix": "what was done"
}
]
}
更新RALPH_REVIEW_STATE.json:
json
{
"improvements_made": [
{
"iteration": N,
"skill": "ralph-prompt-X",
"issue": "description",
"fix": "what was done"
}
]
}
STEP 4: POST-IMPROVEMENT VERIFICATION
步骤4:改进后验证
After implementing fixes:
4.1 Verify Each Skill Still Works
4.1 验证每个技能仍可正常工作
4.2 Check for Regressions
4.2 检查是否出现回归
4.3 Run Syntax Check
4.3 运行语法检查
Verify YAML frontmatter
验证YAML前置元数据
for f in .claude/skills/ralph-prompt-*/SKILL.md; do
head -20 "$f" | grep -E "^(name:|description:)"
done
for f in .claude/skills/ralph-prompt-*/SKILL.md; do
head -20 "$f" | grep -E "^(name:|description:)"
done
STEP 5: UPDATE STATE
步骤5:更新状态
Update RALPH_REVIEW_STATE.json:
If review was CLEAN (zero recommendations):
json
{
"consecutive_clean_reviews": [previous + 1],
"last_review_result": "CLEAN",
"last_review_timestamp": "[timestamp]"
}
If review was NEEDS_WORK:
json
{
"consecutive_clean_reviews": 0,
"last_review_result": "NEEDS_WORK",
"improvements_this_iteration": [count],
"last_review_timestamp": "[timestamp]"
}
Update RALPH_REVIEW_LOG.md:
更新RALPH_REVIEW_STATE.json:
如果审查结果为CLEAN(无改进建议):
json
{
"consecutive_clean_reviews": [上一次数值 + 1],
"last_review_result": "CLEAN",
"last_review_timestamp": "[时间戳]"
}
如果审查结果为NEEDS_WORK:
json
{
"consecutive_clean_reviews": 0,
"last_review_result": "NEEDS_WORK",
"improvements_this_iteration": [数量],
"last_review_timestamp": "[时间戳]"
}
更新RALPH_REVIEW_LOG.md:
Iteration [N] - [timestamp]
迭代[N] - [时间戳]
- Consecutive clean reviews: [N]
- Total improvements to date: [N]
STEP 6: LOOP DECISION
步骤6:循环决策
Check Termination Condition
检查终止条件
Read RALPH_REVIEW_STATE.json:
bash
cat RALPH_REVIEW_STATE.json | jq '.consecutive_clean_reviews'
读取RALPH_REVIEW_STATE.json:
bash
cat RALPH_REVIEW_STATE.json | jq '.consecutive_clean_reviews'
If consecutive_clean_reviews >= 2:
如果consecutive_clean_reviews >= 2:
Skills have passed two consecutive reviews with zero recommendations.
Create RALPH_SKILLS_VALIDATION_COMPLETE.md:
技能已连续两次通过审查且无任何改进建议。
创建RALPH_SKILLS_VALIDATION_COMPLETE.md:
Ralph Skills Validation Complete
Ralph技能验证完成
- Total iterations: [N]
- Total improvements made: [count]
- Final state: All skills validated
- 总迭代次数:[N]
- 累计改进次数:[数量]
- 最终状态:所有技能已验证
- ralph-prompt-builder - PASSED
- ralph-prompt-single-task - PASSED
- ralph-prompt-multi-task - PASSED
- ralph-prompt-project - PASSED
- ralph-prompt-research - PASSED
- ralph-prompt-builder - 通过
- ralph-prompt-single-task - 通过
- ralph-prompt-multi-task - 通过
- ralph-prompt-project - 通过
- ralph-prompt-research - 通过
Validation Criteria Met
满足的验证标准
All 16 review criteria passing for all 5 skills.
[ISO timestamp]
Output: <promise>RALPH_SKILLS_PERFECTED</promise>
[ISO时间戳]
输出:<promise>RALPH_SKILLS_PERFECTED</promise>
If consecutive_clean_reviews < 2:
如果consecutive_clean_reviews < 2:
Continue to next iteration (loop back to STEP 1)
REVIEW CRITERIA REFERENCE (Quick Check)
审查标准参考(快速检查)
Ralph Technique Alignment
Ralph技术对齐度
- Clear completion criteria
- Self-verification commands
- TDD/iteration approach
- "If Stuck" guidance
- <promise> tags used correctly
- Appropriate max-iterations recommendations
- Deterministically bad philosophy
- 清晰的完成标准
- 自我验证命令
- TDD/迭代方法
- "遇到问题时"的指导
- <promise>标签正确使用
- 合适的max-iterations推荐
- 确定性可修复理念
Skill Structure Quality
技能结构质量
- Complete YAML frontmatter
- Progressive disclosure
- Actionable Quick Start
- Realistic examples
- Best practices section
- Ralph loop integration docs
- 完整的YAML前置元数据
- 渐进式披露
- 可操作的Quick Start
- 真实的示例
- 最佳实践部分
- Ralph循环集成文档
Content Completeness
内容完整性
- No placeholders
- Matching examples
- Real verification commands
If stuck after 50 iterations without reaching 2 consecutive clean reviews:
- Document the recurring issues in RALPH_REVIEW_BLOCKERS.md
- List which criteria keep failing
- Identify if criteria are too strict
- Output: <promise>RALPH_REVIEW_BLOCKED</promise>
如果经过50次迭代仍未达到2次连续无问题审查:
- 在RALPH_REVIEW_BLOCKERS.md中记录反复出现的问题
- 列出持续未通过的标准
- 判断标准是否过于严格
- 输出:<promise>RALPH_REVIEW_BLOCKED</promise>
Every 5 iterations, summarize:
PROGRESS SUMMARY - Iteration [N]
================================
Started: [timestamp]
Current: [timestamp]
Consecutive clean reviews: [N]/2
Skills Status:
- ralph-prompt-builder: [X/16 criteria passing]
- ralph-prompt-single-task: [X/16 criteria passing]
- ralph-prompt-multi-task: [X/16 criteria passing]
- ralph-prompt-project: [X/16 criteria passing]
- ralph-prompt-research: [X/16 criteria passing]
Improvements made: [total count]
Remaining issues: [count]
每5次迭代,输出摘要:
PROGRESS SUMMARY - Iteration [N]
================================
开始时间:[时间戳]
当前时间:[时间戳]
连续无问题审查次数:[N]/2
技能状态:
- ralph-prompt-builder: [X/16项标准通过]
- ralph-prompt-single-task: [X/16项标准通过]
- ralph-prompt-multi-task: [X/16项标准通过]
- ralph-prompt-project: [X/16项标准通过]
- ralph-prompt-research: [X/16项标准通过]
已完成改进:[总数量]
剩余问题:[数量]
COMPLETION CONDITIONS
完成条件
Output <promise>RALPH_SKILLS_PERFECTED</promise> ONLY when:
仅在满足以下所有条件时输出<promise>RALPH_SKILLS_PERFECTED</promise>:
- Maximum iterations: 100
- Expected completion: 20-40 iterations
- Budget alert: If > 50 iterations, evaluate if criteria are too strict
- 最大迭代次数:100
- 预期完成次数:20-40次迭代
- 预算预警:如果超过50次迭代,评估标准是否过于严格
1. Initialize State Files
1. 初始化状态文件
Before running, create the initial state:
cat > RALPH_REVIEW_STATE.json << 'EOF'
{
"current_iteration": 0,
"consecutive_clean_reviews": 0,
"skills_reviewed": [],
"improvements_made": [],
"last_review_timestamp": "",
"status": "NOT_STARTED"
}
EOF
cat > RALPH_REVIEW_STATE.json << 'EOF'
{
"current_iteration": 0,
"consecutive_clean_reviews": 0,
"skills_reviewed": [],
"improvements_made": [],
"last_review_timestamp": "",
"status": "NOT_STARTED"
}
EOF
cat > RALPH_REVIEW_LOG.md << 'EOF'
cat > RALPH_REVIEW_LOG.md << 'EOF'
Ralph Skills Review Log
Ralph技能审查日志
Self-improving review loop for Ralph Wiggum prompt generator skills.
针对Ralph Wiggum提示生成器技能的自我改进审查循环。
Target: Two consecutive clean reviews
目标:两次连续无问题审查
bash
/ralph-wiggum:ralph-loop "[THE PROMPT ABOVE]" \
--completion-promise "RALPH_SKILLS_PERFECTED" \
--max-iterations 100
bash
/ralph-wiggum:ralph-loop "[THE PROMPT ABOVE]" \
--completion-promise "RALPH_SKILLS_PERFECTED" \
--max-iterations 100
3. Monitor Progress
3. 监控进度
Check current state
检查当前状态
cat RALPH_REVIEW_STATE.json | jq '.'
cat RALPH_REVIEW_STATE.json | jq '.'
See recent activity
查看近期活动
tail -30 RALPH_REVIEW_LOG.md
tail -30 RALPH_REVIEW_LOG.md
Check how many clean reviews
检查无问题审查次数
cat RALPH_REVIEW_STATE.json | jq '.consecutive_clean_reviews'
cat RALPH_REVIEW_STATE.json | jq '.consecutive_clean_reviews'
4. After Completion
4. 完成后
Review the outputs:
- - Final state
- - Complete history
- - Last review details
RALPH_SKILLS_VALIDATION_COMPLETE.md
- Success certificate
- Git log - All improvements committed
查看输出内容:
- - 最终状态
- - 完整历史
- - 最后一次审查详情
RALPH_SKILLS_VALIDATION_COMPLETE.md
- 成功验证证书
- Git日志 - 所有改进的提交记录
- State Tracking: JSON state file persists across iterations
- Clear Criteria: 16 specific, measurable review criteria
- Self-Correction: Each iteration reads previous results and fixes issues
- Termination Condition: Two consecutive clean reviews ensures stability
- Evidence-Based: All findings documented, all fixes tracked
- Git Integration: Every improvement committed for auditability
- 状态跟踪:JSON状态文件在迭代间持久化存储
- 清晰标准:16项具体、可衡量的审查标准
- 自我修正:每次迭代读取之前的结果并修复问题
- 终止条件:两次连续无问题审查确保稳定性
- 基于证据:所有发现均有文档记录,所有修复均被跟踪
- Git集成:每项改进均已提交,便于审计
Iteration 1-5: Discovery phase
- Identify initial issues across all skills
- Begin fixing critical issues
Iteration 6-15: Improvement phase
- Systematic fixes
- Quality improvements
- Cross-consistency
Iteration 16-25: Stabilization phase
- Fewer issues found
- Polish and edge cases
- Approaching clean reviews
Iteration 26-40: Validation phase
- First clean review achieved
- Verify no regressions
- Second clean review achieved
- Completion
迭代1-5:发现阶段
迭代6-15:改进阶段
迭代16-25:稳定阶段
- 发现的问题减少
- 优化细节和边缘情况
- 接近无问题审查
迭代26-40:验证阶段
- 首次获得无问题审查
- 验证无回归问题
- 获得第二次无问题审查
- 完成循环
Add more criteria to the review framework.
Reduce to "one clean review" by changing:
consecutive_clean_reviews >= 1
将终止条件改为“一次无问题审查”:
consecutive_clean_reviews >= 1
Focus on Specific Skills
聚焦特定技能
Modify the target skills list in the prompt.