.wai/resources/agent-config/skills/rule-of-5-universal/SKILL.md
Apply Steve Yegge's Rule of 5 iterative review to any artifact - code, plans, research, issues, specs, or documents. Five stages from draft through excellence.
npx skillsauth add charly-vibes/wai rule-of-5-universalInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Review this [CODE/PLAN/RESEARCH/ISSUE/SPEC/DOCUMENT] using Steve Yegge's Rule of 5 - five stages of iterative editorial refinement until convergence.
[PASTE YOUR WORK OR SPECIFY FILE PATH]
"Breadth-first exploration, then editorial passes"
Don't aim for perfection in early stages. Each stage builds on insights from previous stages.
Question: Is the overall approach sound?
Focus on:
For Code: Architecture, design patterns, major functions/classes For Plans: Phase structure, dependencies, overall approach For Research: Sections, flow, research questions coverage For Issues: Title appropriateness, basic description presence For Specs: Requirements structure, completeness at high level
Output:
STAGE 1: DRAFT
Assessment: [1-2 sentences on overall shape]
Major Issues:
[DRAFT-001] [CRITICAL|HIGH|MEDIUM|LOW] - [Location]
Description: [What's wrong structurally]
Recommendation: [How to fix]
[DRAFT-002] ...
Shape Quality: [EXCELLENT|GOOD|FAIR|POOR]
Question: Are there errors, bugs, or logical flaws?
Focus on:
For Code: Syntax errors, logic bugs, algorithm correctness, data structure usage For Plans: Feasibility issues, impossible dependencies, resource misestimates For Research: Factual errors, incorrect citations, wrong conclusions from data For Issues: Impossible scope, contradictory requirements, technical impossibilities For Specs: Contradictory requirements, infeasible features, wrong assumptions
Output:
STAGE 2: CORRECTNESS
Issues Found:
[CORR-001] [CRITICAL|HIGH|MEDIUM|LOW] - [Location]
Description: [What's incorrect]
Evidence: [Why this is wrong]
Recommendation: [How to fix with specifics]
[CORR-002] ...
Correctness Quality: [EXCELLENT|GOOD|FAIR|POOR]
Convergence Check (after Stage 2):
New CRITICAL issues: [count]
Total new issues: [count]
Status: [CONVERGED | CONTINUE]
Question: Is this comprehensible to the intended audience?
Focus on:
For Code: Variable/function names, comments, code organization, complexity For Plans: Phase descriptions, success criteria clarity, instruction specificity For Research: Term definitions, logical flow, transitions, accessibility For Issues: Description clarity, actionability, context sufficiency For Specs: Requirement clarity, unambiguous language, examples provided
Output:
STAGE 3: CLARITY
Issues Found:
[CLAR-001] [HIGH|MEDIUM|LOW] - [Location]
Description: [What's unclear]
Impact: [Why this matters]
Recommendation: [How to improve clarity]
[CLAR-002] ...
Clarity Quality: [EXCELLENT|GOOD|FAIR|POOR]
Convergence Check (after Stage 3):
New CRITICAL issues: [count]
Total new issues: [count]
New issues vs Stage 2: [percentage change]
Status: [CONVERGED | CONTINUE]
Question: Are boundary conditions and unusual scenarios handled?
Focus on:
For Code: Null checks, empty arrays, max values, error handling, race conditions For Plans: Rollback strategies, blocked scenarios, resource unavailability, assumption failures For Research: Alternative explanations, conflicting evidence, unanswered questions, limitations For Issues: Acceptance criteria gaps, unclear done conditions, edge scenarios For Specs: Corner cases, conflicting requirements, missing scenarios, error states
Output:
STAGE 4: EDGE CASES
Issues Found:
[EDGE-001] [CRITICAL|HIGH|MEDIUM|LOW] - [Location]
Description: [What edge case is unhandled]
Scenario: [When this could happen]
Impact: [What goes wrong]
Recommendation: [How to handle it]
[EDGE-002] ...
Edge Case Coverage: [EXCELLENT|GOOD|FAIR|POOR]
Convergence Check (after Stage 4):
New CRITICAL issues: [count]
Total new issues: [count]
New issues vs Stage 3: [percentage change]
Estimated false positive rate: [percentage]
Status: [CONVERGED | CONTINUE]
Question: Would you be proud to ship this?
Focus on:
For Code: Performance, style, documentation, test coverage, maintainability For Plans: Implementability, completeness, TDD approach, verification steps For Research: Actionability, recommendations, references, presentation quality For Issues: Executability, priority, labels, handoff readiness For Specs: Testability, completeness, stakeholder readiness, sign-off criteria
Output:
STAGE 5: EXCELLENCE
Final Polish Issues:
[EXCL-001] [HIGH|MEDIUM|LOW] - [Location]
Description: [What could be better]
Recommendation: [How to achieve excellence]
[EXCL-002] ...
Excellence Assessment:
- Structure: [EXCELLENT|GOOD|FAIR|POOR]
- Correctness: [EXCELLENT|GOOD|FAIR|POOR]
- Clarity: [EXCELLENT|GOOD|FAIR|POOR]
- Edge Cases: [EXCELLENT|GOOD|FAIR|POOR]
- Overall: [EXCELLENT|GOOD|FAIR|POOR]
Production Ready: [YES|NO|WITH_NOTES]
Convergence Check (after Stage 5):
New CRITICAL issues: [count]
Total new issues: [count]
New issues vs Stage 4: [percentage change]
Estimated false positive rate: [percentage]
Status: [CONVERGED | NEEDS_ITERATION | ESCALATE_TO_HUMAN]
CONVERGED if:
CONTINUE if:
ESCALATE_TO_HUMAN if:
If converged before Stage 5: Stop and report. Don't continue unnecessarily.
After convergence or completing Stage 5:
# Rule of 5 Review - Final Report
**Work Reviewed:** [type] - [path/identifier]
**Convergence:** Stage [N]
## Summary
Total Issues by Severity:
- CRITICAL: [count] - Must fix before proceeding
- HIGH: [count] - Should fix before proceeding
- MEDIUM: [count] - Consider addressing
- LOW: [count] - Nice to have
## Top 3 Critical Findings
1. [ID] [Description] - [Location]
Impact: [Why this matters]
Fix: [What to do]
2. [ID] [Description] - [Location]
Impact: [Why this matters]
Fix: [What to do]
3. [ID] [Description] - [Location]
Impact: [Why this matters]
Fix: [What to do]
## Stage-by-Stage Quality
- Stage 1 (Draft): [Quality assessment]
- Stage 2 (Correctness): [Quality assessment]
- Stage 3 (Clarity): [Quality assessment]
- Stage 4 (Edge Cases): [Quality assessment]
- Stage 5 (Excellence): [Quality assessment]
## Recommended Actions
1. [Action 1 - specific and actionable]
2. [Action 2 - specific and actionable]
3. [Action 3 - specific and actionable]
## Verdict
[READY | NEEDS_REVISION | NEEDS_REWORK | NOT_READY]
**Rationale:** [1-2 sentences explaining the verdict]
testing
Compare original and distilled prompts to verify the distillation is faithful and lossless. Checks completeness, accuracy, and appropriate conciseness.
development
Implement features following Test-Driven Development methodology. Red-Green-Refactor cycle with phased approach and verification at each step.
development
Orchestrate multi-agent code review with three waves - parallel analysis, cross-validation, and convergence check. Simulates specialist reviewers and synthesizes findings.
documentation
Resume work from a handoff document. Reads the handoff, verifies current state against documented state, and presents analysis before continuing work.