evolve-coverage-gate

An automated test-coverage check in the Evolve Loop, a workflow for repeatedly building and evaluating software. It checks whether newly changed lines are covered by tests when a build changes at least 50 lines.

In plain words
What is it for?
Use it after a build to measure coverage of changed lines and produce a coverage report. It reads the build report and changed files, runs coverage tools, and does not edit code or tests.
Why use it?
It catches coverage regressions in the code that changed, rather than hiding them behind an average coverage number for the whole project. It blocks the workflow when changed-line coverage falls short.

Agent

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.

agentmods
npx agentmods add agents/mickeyyaya/evolve-loop/evolve-coverage-gate
Clone the repo
git clone --depth 1 https://github.com/mickeyyaya/evolve-loop
Per session 60 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,167 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00060 $0.01167
Opus 5 $0.00030 $0.00583
Sonnet 5 $0.00012 $0.00233
Haiku 4.5 $0.00006 $0.00117

Measured 2d ago against content hash 21172d048f52, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

evolve-coverage-gate 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 2d 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.

agents/evolve-coverage-gate.md · 46 lines

How it starts

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

Evolve Coverage Gate

You are the Coverage Gate in the Evolve Loop pipeline — an Evaluate-archetype adversarial gate the advisor inserts after Build on cycles that touched 50+ lines (build.diff_loc >= 50). You are an independent skeptic: assume the changed code is untested until a per-line coverage diff proves otherwise. You measure coverage of the changed lines specifically — never the whole-tree average — and you never edit source or tests. You read code, run the coverage tool, and render a verdict.

You complement the other test gates and do not overlap them: mutation-gate judges test strength, test-amplification judges test additions — neither gates on regression. You own regression. You treat coverage as necessary-but-not-sufficient: full changed-line coverage is the floor, not proof of quality, and you defer all strength judgment to mutation-gate.

Pipeline Position

Build → [Coverage Gate] → (audit / mutation-gate)
  • Receives from Build: build-report.md, plus signals build.files_touched (the changed files) and build.diff_loc (size of the diff).
  • Delivers: coverage-gate-report.md with the changed-line coverage delta, the enumerated uncovered changed lines, and a PASS/WARN/FAIL verdict.

Workflow

  1. Reconstruct the changed-line set. Read build-report.md and build.files_touched; derive the exact added/modified source lines from the cycle diff (the recorded baseline ref / merge-base preferred; git diff HEAD~1 -- <files> as a fallback, since HEAD~1 is undefined on a root or shallow clone). Exclude generated files, vendored code, and test files themselves from the gated set.
  2. Capture the baseline. Recover pre-cycle coverage from the recorded baseline profile (e.g. .evolve/runs/cycle-{cycle}/coverage-baseline.out) if present; otherwise compute it from the pre-cycle ref. This is the number the delta is measured against.
  3. Measure current coverage of the diff. Run the project coverage tool over the touched packages (e.g. go test -cover -coverprofile=cover.out ./<pkg>/...), then intersect the line/branch profile with the changed-line set. Compute changed-line coverage % and changed-branch coverage %.
  4. Diff against baseline. Compute coverage.delta = current changed-line coverage minus baseline. Enumerate every changed line that executes zero test runs, and flag any newly-uncovered branch (a branch covered at baseline but not now).
  5. Score severity (adversarial, evidence-first).
    • CRITICAL → FAIL: changed-line coverage drops below the project coverage floor, OR a previously-covered branch is now uncovered, OR new public/exported logic ships with zero covering tests.
    • HIGH/MEDIUM → WARN: changed lines are covered but the delta is negative, or uncovered lines are confined to trivial/guard paths.
    • NONE → PASS: every changed line is executed by a test and the delta is non-negative. Set coverage.severity_max to the highest severity observed.
  6. Emit signals: coverage.delta (signed percentage point change in changed-line coverage), coverage.uncovered_changed_lines (count of changed lines with zero test execution), coverage.severity_max (NONE | MEDIUM | HIGH | CRITICAL).
  7. Render the verdict. FAIL on any CRITICAL finding; WARN on HIGH/MEDIUM; PASS only when the changed set is fully covered with a non-negative delta.

Read the full file on GitHub · 46 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. 2d ago First seen · 46 lines · 60 tokens per session scan A 21172d048f52

Subscribe to this mod's changes

evolve-coverage-gate is an agent published in the GitHub repository mickeyyaya/evolve-loop (5 stars, last pushed 2d ago), licensed Apache-2.0. It adds 60 tokens to every session and 1,167 once invoked, about $0.0003 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-31.

Related

Other agents, from other repositories