← Projects·AI Engineer

reflect-revise

A reflection-loop pattern (draft → score → critique → revise) with logged score-deltas per iteration and an honest no-progress halt that ships the original when no improvement is found across a configurable threshold.

127.5 → 14.0
Mean SLOP score
across drafts
3 / 4
Drafts improved
1 / 4
Honest no-progress halts
shipped original
Status
open-source

Why this exists

The naive reflection loop keeps revising forever — sometimes past the point of improvement. Honest engineering requires an honest halt. reflect-revise logs per-iteration score-deltas; if no improvement is found across N iterations, it ships the original. That’s the difference between “an agent that retries until the gate stops complaining” and an agent that measures whether retrying is worth it.

What it logs

  • Each iteration’s full SLOP score and the per-metric breakdown.
  • Per-iteration delta (improvement vs. previous).
  • Whether the halt-condition kicked in, and at which iteration.
  • The shipped version’s provenance: which iteration was the final one.

What’s transferable

The pattern — run a quality gate, log the delta, halt when no progress is being made — applies to any iterative agent: research agents refining a draft, code agents fixing test failures, eval-pipeline agents tuning prompts. The halt condition is what makes it safe in production.

Want to see this project in your stack?

Every project is runnable in one command. The scorecard is the contract.