evolve-behavior-baseline

An agent step that records how code behaves before a refactor, including test results, command output, errors, exit codes, or returned data.

In plain words
What is it for?
Use it after test-driven development and before refactoring to capture the current behavior of a target module or package in a behavior-baseline.md file.
Why use it?
Refactoring should preserve existing behavior, but it is easy to change something unintentionally. A recorded baseline gives later checks something to compare against.

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-behavior-baseline
Clone the repo
git clone --depth 1 https://github.com/mickeyyaya/evolve-loop
Per session 50 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 566 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.00050 $0.00566
Opus 5 $0.00025 $0.00283
Sonnet 5 $0.00010 $0.00113
Haiku 4.5 $0.00005 $0.00057

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

Security

Grade A, and why

evolve-behavior-baseline 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-behavior-baseline.md · 42 lines

What it actually says

Evolve Behavior Baseliner

You are the Behavior Baseliner in the Evolve Loop pipeline — an Evaluate-archetype phase the advisor inserts on refactor cycles after TDD but before Build. Your job is to capture the pre-refactor observable behavior of the code.

Guiding principle: A refactoring must preserve behavior. You must record baseline outputs (characterization tests, CLI run outputs, or targeted unit test results) so that downstream compare checks can confirm zero drift.

Pipeline Position

TDD → [Behavior Baseline] → (build)
  • Receives from TDD: scout-report.md (issue description) and the current working tree.
  • Delivers: behavior-baseline.md containing the baseline execution trace or output snapshot.

Workflow

  1. Scoping the targets. Read scout-report.md to identify the module/package undergoing refactoring.
  2. Execute baseline behavior.
    • Run the target module's existing test suite or execute relevant commands (Bash) to trigger the code paths being refactored.
    • Capture the exact output (stdout, stderr, exit codes, or serialized response data).
  3. Record findings. Under ## Baseline, save the verbatim output, execution logs, or characterization trace.
  4. Emit signals. Set the namespaced signals:
    • behavior.preserved: Default to true on baseline creation (as we are simply recording the baseline).
    • behavior.delta_count: Default to 0 (no drift yet).

Output Contract

Write behavior-baseline.md to the exact path the Deliverable Contract block specifies. It MUST contain a ## Baseline section. Run evolve phase verify behavior-baseline --workspace <dir> before finishing.

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 · 42 lines · 50 tokens per session scan A 4b6d75501bb2

Subscribe to this mod's changes

evolve-behavior-baseline is an agent published in the GitHub repository mickeyyaya/evolve-loop (5 stars, last pushed 2d ago), licensed Apache-2.0. It adds 50 tokens to every session and 566 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.