agentleFS
guerrilla2799guerrilla2799/ops-and-scale-os/skills/eval-loop/SKILL.md

eval-loop

Skill1 starsChanged 3 months agoMITView on GitHub

Use to run a quality check on any generated artifact, or when the user says "evaluate this", "score this draft", "is this good enough", "run the eval", "review this output", "check it against the rubric". Runs generate, judge, revise, re-judge, approve with the judge in a separate context so nothing grades its own work. Logs every cycle including failures. Writes to workspace/evals/log/. Scores your AI system output against a rubric you wrote. Not for writing that rubric (`eval-spec-authoring`), and not the pre-handoff gate on a deliverable this repo produced, which is `artifact-eval`.

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before anything reaches an external surface

    line 13
  2. Distinctive:

    If a genuinely independent judge was unavailable, say so and label it honestly:

    line 83
  3. Distinctive:

    Revise surgically: No full rewrites

    line 100
  4. Distinctive:

    Label an inline check as inline: Never overclaim

    line 104

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Eval Loop

Generate, judge independently, revise, re-judge, approve. The separation between generator and judge is structural, and it is the highest-leverage architectural choice in this repo.

When to use

  • Any artifact with an eval spec is produced
  • Before anything reaches an external surface
  • Spot-checking a batch of agent output
  • A quality complaint needs diagnosing

Inputs

  • Reads: workspace/evals/specs/<type>.md, the draft
  • Needs from user: the artifact type, and a title for the log entry

Workflow

1. Understand why separation is not optional

A context that produced a draft knows what it meant. Asked to grade it, it reads its own intent rather than the text, and passes almost everything.

Moving the same rubric into a genuinely separate context that receives only the artifact and the spec drops pass rates substantially, and what it starts catching is what a reader would have caught.

A different prompt in the same context is not independence. Independence is a separate context window that never saw the reasoning.

2. Run the loop

GENERATE   the draft, in its own context
     ↓
JUDGE      separate context. Receives ONLY the artifact + the spec.
           Runs gates, then dimensions, then verdict.
           Never revises. Returns verdict + guidance + a log line.
     ↓
     ├── PASS   → approve, return with the receipt
     ├── REVISE → REVISE (separate context again)
     │            Receives draft + verdict. Fixes the named weaknesses
     │            surgically. Never rewrites what already works.
     │            Never approves itself. → back to JUDGE
     └── FAIL   → gate trip is not a revision problem. Back to GENERATE
                  with the gate named, or escalate

Cap at three cycles. A loop that has not passed in three is not converging, and the usual cause is that the generator is not reading the spec or the spec is wrong.

3. Keep the roles strictly separated

RoleDoesNever does
GeneratorWrites the draftScores itself
JudgeScores, names weaknesses, gives guidanceEdits the artifact
ReviserFixes the named weaknessesScores or approves its own output

The reviser rule matters more than it looks. A reviser allowed to declare itself finished will, and the loop collapses back into self-grading.

4. Revise surgically

The reviser fixes what the verdict named and leaves the rest alone. A full rewrite discards whatever was already working and usually introduces new problems in dimensions that were fine, which shows up as a score that moves sideways across cycles.

5. Log every cycle, especially the failures

{"ts":"<iso>", "type":"<artifact>", "title":"<title>", "cycle":n,
 "gates":"pass|<gate tripped>", "score":n, "dims":{...},
 "verdict":"PASS|REVISE|FAIL", "spec_version":"<v>"}

Append-only. One line per cycle, including the ones that failed.

The failed cycles are the trend data. A log containing only passes is a marketing document. What tells you where the system is weak is which gates trip and which dimensions repeatedly score low.

6. Return the receipt

eval-clean: <type> v<version>, score <n>, cycle <n>

If a genuinely independent judge was unavailable, say so and label it honestly:

eval-clean (inline, no independent judge)

Never claim a fuller eval than the one you ran. A missing receipt means the gate did not run, and it should never be read as a silent pass.

Output

  • Writes: appends to workspace/evals/log/eval-log.jsonl, plus the approved artifact
  • Uses: templates/eval-log-schema.csv
  • Prints: the verdict per cycle, the final score, the receipt

Rules & quality bar

  • The judge runs in a separate context and receives only the artifact plus the spec
  • The judge never edits. The reviser never approves. Both directions
  • Gates before scores, and a gate trip returns to the generator rather than to the reviser
  • Revise surgically. No full rewrites
  • Cap at three cycles, then escalate with the score trajectory
  • Log every cycle including failures. 100% log completeness or the trend is fiction
  • The receipt names the spec version
  • Label an inline check as inline. Never overclaim

Related skills

  • Requires: eval-spec-authoring
  • Pairs with: eval-calibration to keep the spec honest
  • Feeds: agent-observability
  • See also: docs/field-notes.md story 9

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.