ralph-skill-review-loop
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseRalph Skill Review Loop
Ralph技能审查循环
Overview
概述
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提示生成器技能本身。运行持续改进循环,直到技能连续两次通过审查且无任何改进建议。
Quick Start
快速开始
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 100THE SELF-IMPROVING REVIEW LOOP PROMPT
自我改进审查循环提示
markdown
undefinedmarkdown
undefinedTask: Self-Improving Review of Ralph Wiggum Skills
任务:Ralph Wiggum技能的自我改进审查
Objective
目标
Review and improve the Ralph Wiggum prompt generator skills until they pass two consecutive reviews with zero improvement recommendations.
审查并改进Ralph Wiggum提示生成器技能,直到它们连续两次通过审查且无任何改进建议。
Target Skills
目标技能
- 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
Reference Materials
参考资料
- 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/(生产级技能模式)
STATE MANAGEMENT
状态管理
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:
markdown
undefined创建以下文件来跟踪进度:
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:
markdown
undefinedRalph Skills Review Log
Ralph技能审查日志
Iteration History
迭代历史
[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:全面技能审查
Review Framework
审查框架
For EACH skill in ralph-prompt-*, evaluate against:
针对每个ralph-prompt-*技能,从以下维度评估:
2.1 Ralph Technique Alignment (from research)
2.1 Ralph技术对齐度(来自研究内容)
- Clear completion criteria defined
- Includes self-verification commands
- Has TDD/iteration approach
- Includes "If Stuck" guidance
- Uses <promise> completion tags correctly
- Recommends appropriate max-iterations
- Follows "deterministically bad" philosophy (failures are fixable)
- 定义了清晰的完成标准
- 包含自我验证命令
- 采用TDD/迭代方法
- 包含“遇到问题时”的指导
- 正确使用<promise>完成标签
- 推荐了合适的max-iterations值
- 遵循“确定性可修复”理念(问题均可被解决)
2.2 Skill Structure Quality
2.2 技能结构质量
- YAML frontmatter complete (name, description with triggers)
- Progressive disclosure (overview → details → examples)
- Quick Start section exists and is actionable
- Examples are realistic and complete
- Best practices section included
- Integration with Ralph loop documented
- YAML前置元数据完整(名称、带触发条件的描述)
- 采用渐进式披露(概述 → 细节 → 示例)
- 存在Quick Start部分且内容可操作
- 示例真实且完整
- 包含最佳实践部分
- 记录了与Ralph循环的集成方式
2.3 Content Completeness
2.3 内容完整性
- All sections properly filled (no placeholders)
- Examples match the skill type
- Verification commands are real and runnable
- Edge cases addressed
- Cross-references to related skills
- 所有部分均已正确填充(无占位符)
- 示例与技能类型匹配
- 验证命令真实可运行
- 考虑到了边缘情况
- 包含与相关技能的交叉引用
2.4 Prompt Template Quality
2.4 提示模板质量
- Templates follow research best practices
- Success criteria are measurable
- Phase structure is clear (for multi-phase)
- State tracking included
- Progress tracking pattern included
- 模板遵循研究中的最佳实践
- 成功标准可衡量
- 阶段结构清晰(针对多阶段任务)
- 包含状态跟踪
- 包含进度跟踪模式
Review Process
审查流程
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:
markdown
undefined创建/更新REVIEW_FINDINGS.md:
markdown
undefinedReview Findings - Iteration [N]
审查发现 - 迭代[N]
Summary
摘要
- Skills reviewed: [count]
- Total issues found: [count]
- Critical issues: [count]
- Improvements needed: [count]
- 已审查技能:[数量]
- 发现的总问题数:[数量]
- 严重问题:[数量]
- 需要改进的项:[数量]
ralph-prompt-builder
ralph-prompt-builder
Passing
通过项
- Criterion that passes
- 符合的标准
Issues Found
发现的问题
- [CRITICAL/HIGH/MEDIUM/LOW] Issue description
- Location: [section/line]
- Current: [what exists]
- Should be: [what it should be]
- Fix: [specific fix]
- [CRITICAL/HIGH/MEDIUM/LOW] 问题描述
- 位置:[章节/行号]
- 当前状态:[现有内容]
- 预期状态:[应有的内容]
- 修复方案:[具体修复措施]
ralph-prompt-single-task
ralph-prompt-single-task
[... same format]
[... 相同格式]
ralph-prompt-multi-task
ralph-prompt-multi-task
[... same format]
[... 相同格式]
ralph-prompt-project
ralph-prompt-project
[... same format]
[... 相同格式]
ralph-prompt-research
ralph-prompt-research
[... same format]
[... 相同格式]
Recommendations Summary
建议摘要
Must Fix (Critical/High)
必须修复(严重/高优先级)
- [Recommendation 1]
- [Recommendation 2]
- [建议1]
- [建议2]
Should Fix (Medium)
应该修复(中优先级)
- [Recommendation 3]
- [建议3]
Nice to Have (Low)
可优化项(低优先级)
- [Recommendation 4]
- [建议4]
Review Result
审查结果
- CLEAN (zero recommendations)
- NEEDS_WORK (has recommendations)
---- CLEAN(无改进建议)
- NEEDS_WORK(有改进建议)
---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 验证每个技能仍可正常工作
For each modified skill:
- YAML frontmatter is valid
- All sections render correctly
- Examples are syntactically correct
- No broken references
针对每个修改过的技能:
- YAML前置元数据有效
- 所有部分渲染正确
- 示例语法正确
- 无失效引用
4.2 Check for Regressions
4.2 检查是否出现回归
- No content accidentally deleted
- Cross-references still valid
- Templates still complete
- 无内容被意外删除
- 交叉引用仍然有效
- 模板仍然完整
4.3 Run Syntax Check
4.3 运行语法检查
bash
undefinedbash
undefinedVerify 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:
markdown
undefined更新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:
markdown
undefinedIteration [N] - [timestamp]
迭代[N] - [时间戳]
Review Result
审查结果
[CLEAN/NEEDS_WORK]
[CLEAN/NEEDS_WORK]
Issues Found
发现的问题
- [Issue 1]
- [Issue 2]
- [问题1]
- [问题2]
Fixes Applied
已应用的修复
- [Fix 1]
- [Fix 2]
- [修复1]
- [修复2]
State After
后续状态
- Consecutive clean reviews: [N]
- Total improvements to date: [N]
---- 连续无问题审查次数:[N]
- 累计改进次数:[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:
markdown
undefined技能已连续两次通过审查且无任何改进建议。
创建RALPH_SKILLS_VALIDATION_COMPLETE.md:
markdown
undefinedRalph Skills Validation Complete
Ralph技能验证完成
Summary
摘要
- Total iterations: [N]
- Total improvements made: [count]
- Final state: All skills validated
- 总迭代次数:[N]
- 累计改进次数:[数量]
- 最终状态:所有技能已验证
Skills Validated
已验证技能
- 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.
所有5项技能均通过全部16项审查标准。
Timestamp
时间戳
[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)
继续下一次迭代(回到步骤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
- 无占位符
- 匹配的示例
- 真实的验证命令
ESCAPE HATCH
应急方案
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>
PROGRESS TRACKING
进度跟踪
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:
- All 5 skills reviewed
- All 16 criteria checked per skill
- Zero recommendations in current review
- Zero recommendations in previous review
- consecutive_clean_reviews >= 2 in state file
- RALPH_SKILLS_VALIDATION_COMPLETE.md created
- All changes committed
仅在满足以下所有条件时输出<promise>RALPH_SKILLS_PERFECTED</promise>:
- 所有5项技能已审查
- 每项技能均检查了全部16项标准
- 当前审查无任何建议
- 上一次审查无任何建议
- 状态文件中consecutive_clean_reviews >= 2
- 已创建RALPH_SKILLS_VALIDATION_COMPLETE.md
- 所有变更已提交
SAFETY LIMITS
安全限制
- Maximum iterations: 100
- Expected completion: 20-40 iterations
- Budget alert: If > 50 iterations, evaluate if criteria are too strict
---- 最大迭代次数:100
- 预期完成次数:20-40次迭代
- 预算预警:如果超过50次迭代,评估标准是否过于严格
---Usage Instructions
使用说明
1. Initialize State Files
1. 初始化状态文件
Before running, create the initial state:
bash
undefined运行前,创建初始状态:
bash
undefinedCreate state file
创建状态文件
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
Create log file
创建日志文件
cat > RALPH_REVIEW_LOG.md << 'EOF'
cat > RALPH_REVIEW_LOG.md << 'EOF'
Ralph Skills Review Log
Ralph技能审查日志
Overview
概述
Self-improving review loop for Ralph Wiggum prompt generator skills.
针对Ralph Wiggum提示生成器技能的自我改进审查循环。
Target: Two consecutive clean reviews
目标:两次连续无问题审查
Iteration History
迭代历史
EOF
undefinedEOF
undefined2. Run the Loop
2. 运行循环
bash
/ralph-wiggum:ralph-loop "[THE PROMPT ABOVE]" \
--completion-promise "RALPH_SKILLS_PERFECTED" \
--max-iterations 100bash
/ralph-wiggum:ralph-loop "[THE PROMPT ABOVE]" \
--completion-promise "RALPH_SKILLS_PERFECTED" \
--max-iterations 1003. Monitor Progress
3. 监控进度
bash
undefinedbash
undefinedCheck 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'
undefinedcat RALPH_REVIEW_STATE.json | jq '.consecutive_clean_reviews'
undefined4. After Completion
4. 完成后
Review the outputs:
- - Final state
RALPH_REVIEW_STATE.json - - Complete history
RALPH_REVIEW_LOG.md - - Last review details
REVIEW_FINDINGS.md - - Success certificate
RALPH_SKILLS_VALIDATION_COMPLETE.md - Git log - All improvements committed
查看输出内容:
- - 最终状态
RALPH_REVIEW_STATE.json - - 完整历史
RALPH_REVIEW_LOG.md - - 最后一次审查详情
REVIEW_FINDINGS.md - - 成功验证证书
RALPH_SKILLS_VALIDATION_COMPLETE.md - Git日志 - 所有改进的提交记录
Why This Works
为什么此方案有效
- 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集成:每项改进均已提交,便于审计
Expected Behavior
预期行为
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:验证阶段
- 首次获得无问题审查
- 验证无回归问题
- 获得第二次无问题审查
- 完成循环
Customization
自定义配置
Stricter Review
更严格的审查
Add more criteria to the review framework.
在审查框架中添加更多标准。
Faster Completion
更快完成
Reduce to "one clean review" by changing:
consecutive_clean_reviews >= 1将终止条件改为“一次无问题审查”:
consecutive_clean_reviews >= 1Focus on Specific Skills
聚焦特定技能
Modify the target skills list in the prompt.
修改提示中的目标技能列表。