iteration-guard

iteration-guard is an agent for Claude Code from hyhmrright/logic-lens. It costs 99 tokens per session (759 once invoked), scanned A, original, MIT.

A review gate that compares a previous test result with a new one before a coding change is accepted. It checks overall scores, logic and formatting scores, modes, languages, and single-run variation.

In plain words
What is it for?
Use it after evaluation runs to decide whether to ship a change, roll it back, or run the evaluation again.
Why use it?
It helps distinguish a real improvement from random score changes and catches regressions hidden by a higher overall score.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

Part of the logic-lens plugin — 11 skills, 6 commands, 3 agents, 2 hooks shipped together

Good fit Use it after evaluation runs to decide whether to ship a change, roll it back, or run the evaluation again.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/hyhmrright/logic-lens/iteration-guard
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/hyhmrright/logic-lens

Made for: Claude Code.

Or install logic-lens, the plugin that ships this one along with the rest of its 11 skills, 6 commands, 3 agents, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for iteration-guard

README.md
[![agentmods](https://agentmods.dev/badge/agents/hyhmrright/logic-lens/iteration-guard.svg)](https://agentmods.dev/agents/hyhmrright/logic-lens/iteration-guard)
Your own site
<a href="https://agentmods.dev/agents/hyhmrright/logic-lens/iteration-guard"><img src="https://agentmods.dev/badge/agents/hyhmrright/logic-lens/iteration-guard.svg" alt="Measured on agentmods" height="20"></a>
Per session 99 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 759 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00099 $0.00759
Opus 5 $0.00049 $0.00380
Sonnet 5 $0.00020 $0.00152
Haiku 4.5 $0.00010 $0.00076

Measured 8d ago against content hash 1be8eb20603f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

iteration-guard scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/iteration-guard.md · 52 lines

How it starts

The opening of the file, as written. The whole thing — 52 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are the Logic-Lens iteration guard — the generate-verify gate. The editor proposes, the eval measures, and you decide whether the change earned its place. You guard against two failure modes: keeping a change that didn't actually help (noise mistaken for gain), and shipping a net regression that a higher overall number hides.

Inputs

  • a baseline iteration dir (skills-workspace/iteration-<TAG>/summary.json) — the score before the edit.
  • a candidate iteration dir — the score after.
  • the editor's risk note (what it touched, especially any format label or _shared/ file).

If a baseline isn't named, find the most recent prior summary.json (ls -dt skills-workspace/iteration-*/).

Method

  1. Read both summary.json files. Compare on every axis the grader reports, not just the headline:
    • overall pass rate
    • logic vs format subscores — a logic gain bought with a format loss (or vice versa) is not a clean win. Name which subscore moved.
    • per-mode and per-language — a change can lift the targeted mode while silently breaking another. Diff every mode, not only the one the edit aimed at.
  2. For any case that flipped (pass→fail or fail→pass), read its grading.json in both dirs to confirm the flip is real and attributable to the edit, not a different assertion.
  3. Account for variance. logic-review single-run scores are variance-dominated (project memory). A swing of one or two cases on a single run is inside the noise floor. Do not call a 1-case overall move a "regression" or a "win" — say it's within variance and recommend RERUN of the affected cases if the decision sits on that margin.

Output (在 简体中文)

  • 判定 — one of SHIP (real net gain, no hidden regression), ROLLBACK (net regression, or a format/mode broke that outweighs the gain), or RERUN (move is inside variance; rerun the affected cases N× before deciding). State it first, in one line.
  • 证据 — the before→after numbers per axis (overall / logic / format / per-mode / per-language), and the exact eval IDs that flipped with the assertion that changed.
  • 隐藏回归检查 — explicitly confirm you checked every mode and language, not just the targeted one, and report any collateral damage.
  • 下一步 — if RERUN: which case IDs and how many runs. If ROLLBACK: which edit to revert. If SHIP: note any residual weak mode worth the next iteration.

Read the full file on GitHub · 52 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 52 lines · 99 tokens per session scan A 1be8eb20603f

Subscribe to this mod's changes

iteration-guard is an agent published in the GitHub repository hyhmrright/logic-lens (22 stars, last pushed 9d ago), licensed MIT. It adds 99 tokens to every session and 759 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

harness-evaluator

Harness Evaluator — independent code evaluation with Tier 1 deterministic checks and Tier 2 deep logic analysis. Use when harness orchestrator needs checkpoint evaluation.

stone16/harness-engineering-skills · 35 tokens

harness-generator

Harness Generator — implements checkpoint code with TDD and atomic commits. Use when harness orchestrator needs code generation for a checkpoint.

stone16/harness-engineering-skills · 29 tokens

acceptance-test-generator

Generates integration/E2E test skeletons from Design Doc ACs using ROI-based selection and journey-based E2E reservation. Use when Design Doc is complete and test design is needed, or when "test skeleton/AC/acceptance criteria" is mentioned. Behavior-first approach for minimal tests with maximum coverage.

shinpr/claude-code-workflows · 68 tokens

quality-fixer-frontend

Specialized agent for verifying React projects and fixing frontend quality failures within the current task scope. Use proactively after code changes or for quality, test, build, lint, format, type, or fix requests.

shinpr/claude-code-workflows · 47 tokens

quality-fixer

Specialized agent for verifying software projects and fixing quality failures within the current task scope. Use proactively after code changes or for quality, test, build, lint, format, correctness, or fix requests.

shinpr/claude-code-workflows · 44 tokens

integration-test-reviewer

Reviews changed integration and E2E tests against skeletons, proof obligations, or explicit prompt claims. Use after test implementation or when test review/skeleton verification is requested. Returns only material proof gaps with the smallest sufficient corrections.

shinpr/claude-code-workflows · 50 tokens