evolve-diagnose-reference

A reference guide for finding the cause of repeated runtime failures in the Evolve Loop, a multi-step process for building and checking changes.

In plain words
What is it for?
Use it to observe failures, form and test hypotheses, add diagnostics, reproduce problems, isolate causes, and verify fixes using debug tags.
Why use it?
It provides a fixed investigation path so agents do not guess at fixes or record unsupported explanations.

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-diagnose-reference
Clone the repo
git clone --depth 1 https://github.com/mickeyyaya/evolve-loop
Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,713 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.00043 $0.02713
Opus 5 $0.00022 $0.01357
Sonnet 5 $0.00009 $0.00543
Haiku 4.5 $0.00004 $0.00271

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

Security

Grade A, and why

evolve-diagnose-reference 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-diagnose-reference.md · 246 lines

How it starts

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

Evolve Diagnose Reference (Layer 3 — on-demand)

Layer-3 on-demand reference. Adapted from mattpocock's 6-phase diagnose loop (mattpocock.com / Total TypeScript). Read this when a phase agent or orchestrator is facing a recurring failure and needs a systematic approach to trace and isolate the root cause. When diagnosing a WARN or FAIL cycle, come here before writing guesses into the retrospective. Do NOT read this file on every cycle — it is on-demand only.

Contents


When to use this reference

Trigger Action
Audit returns FAIL and the root cause is unclear Start at Phase 1 — do not skip to a fix
Same WARN class appears in 3+ consecutive recentFailures entries Start at Phase 2 — symptom is already captured
subagent-run.sh exits non-zero and stderr is empty Start at Phase 3 — instrument before re-running
ship.sh exits non-zero with an audit SHA mismatch Use Example 2 below as the instrumentation template
Cycle cost is $0.00 and no ledger entry was written Start at Phase 3 with the sandbox EPERM template (Example 3)

Phase summary

# Phase Core action
1 Observe Capture the exact symptom: observed behavior vs. expected behavior. Record the precise error message, exit code, artifact path, and stack trace line. Do NOT hypothesize here.
2 Hypothesize Generate 3–5 candidate root causes. Rank by likelihood. Write them down before testing any.
3 Instrument Add [DEBUG-XXXX] tagged log/assertion points to test the top hypothesis. Instrument to test a specific hypothesis — NOT to "see what happens."
4 Reproduce Reliably reproduce the failure with minimum steps. No fix is valid unless the failure can be triggered on demand.
5 Isolate / bisect Eliminate half the candidate causes per iteration. Binary search to the smallest reproduction case.
6 Fix + verify + remove tags Apply fix. Verify against the reproduction case. Search grep -r '\[DEBUG-XXXX\]' and remove all diagnostic artifacts before committing.

Read the full file on GitHub · 246 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 · 246 lines · 43 tokens per session scan A 6c59891f8db5

Subscribe to this mod's changes

evolve-diagnose-reference is an agent published in the GitHub repository mickeyyaya/evolve-loop (5 stars, last pushed 2d ago), licensed Apache-2.0. It adds 43 tokens to every session and 2,713 once invoked, about $0.0002 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