Skip to content

Instantly share code, notes, and snippets.

@chrisbodhi
Created January 23, 2026 14:47
Show Gist options
  • Select an option

  • Save chrisbodhi/11665218ddcce6d707af5107056ecc1a to your computer and use it in GitHub Desktop.

Select an option

Save chrisbodhi/11665218ddcce6d707af5107056ecc1a to your computer and use it in GitHub Desktop.
name description
rule-of-five
Iterative refinement methodology for high-quality outputs. Based on Jeffrey Emanuel's discovery that LLM agents produce best work through 4-5 refinement passes. Use when creating substantial content that needs to be polished, professional, or production-ready—documents, code, designs, analyses, presentations. Triggers include requests for "high quality", "polished", "production-ready", or when the user explicitly asks for iterative refinement.

Rule of Five

LLM agents produce their best work through iterative refinement rather than attempting perfection in a single pass. This skill implements a structured 5-pass approach: draft first (breadth), then four editorial passes focused on distinct quality dimensions.

When to Apply

Apply this methodology for:

  • Documents, reports, or presentations that will be shared externally
  • Code that needs to be production-ready
  • Creative work where quality matters
  • Any output where the user signals they want polished results

Skip for: quick answers, exploratory discussions, or when the user explicitly wants speed over polish.

The Five Passes

Pass 1: Draft

Focus: SHAPE

Get the structure right. Breadth over depth. Don't aim for perfection—aim for coverage.

  • Establish the overall architecture
  • Hit all the major points
  • Leave placeholders for details you'll fill later
  • Bias toward inclusion (easier to cut than add)

Pass 2: Correctness

Focus: TRUTH

Fix errors, bugs, and mistakes. Is the logic sound?

  • Verify facts and claims
  • Check calculations and code logic
  • Ensure internal consistency
  • Fix technical errors

Pass 3: Clarity

Focus: UNDERSTANDING

Can someone else understand this? Simplify. Remove jargon.

  • Restructure confusing sections
  • Replace jargon with plain language (or define terms)
  • Add transitions between ideas
  • Ensure the reader can follow without your context

Pass 4: Edge Cases

Focus: ROBUSTNESS

What could go wrong? What's missing? Handle the unusual.

  • Consider failure modes
  • Add error handling (for code)
  • Address counterarguments (for writing)
  • Fill gaps in coverage

Pass 5: Excellence

Focus: POLISH

This is the last pass. Make it shine.

  • Tighten prose, remove redundancy
  • Improve naming and formatting
  • Add finishing touches
  • Ask: "Would I be proud to ship this?"

Execution Notes

  • Each pass should be a distinct mental mode—don't try to do everything at once
  • The passes are sequential; each builds on the previous
  • For shorter tasks, passes can be lighter; for substantial work, each deserves full attention
  • Signal progress to the user between passes when working on longer content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment