harness-evolver CLAUDE.md

harness-evolver CLAUDE.md is an instructions file for coding agents from raphaelchristi/harness-evolver. It costs 3,303 tokens per session, scanned A, original, MIT.

Project instructions for harness-evolver, a Claude Code plugin that improves autonomous agents using LangSmith datasets, experiments, and evaluators. LangSmith is a service for storing and evaluating agent runs.

In plain words
What is it for?
Use them when installing dependencies, setting up an agent evaluation project, running tools locally, or executing evaluations in isolated worktrees.
Why use it?
They explain the required dependencies, setup process, local tools, and preflight behavior needed to run the project correctly.

Instructions file

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 instructions/raphaelchristi/harness-evolver/claude-md
Clone the repo
git clone --depth 1 https://github.com/raphaelchristi/harness-evolver

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 harness-evolver CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/raphaelchristi/harness-evolver/claude-md.svg)](https://agentmods.dev/instructions/raphaelchristi/harness-evolver/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/raphaelchristi/harness-evolver/claude-md"><img src="https://agentmods.dev/badge/instructions/raphaelchristi/harness-evolver/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 3,303 This file is loaded in full into every session.
When invoked 3,303 The same file — it is already loaded in full.
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.03303 $0.03303
Opus 5 $0.01651 $0.01651
Sonnet 5 $0.00661 $0.00661
Haiku 4.5 $0.00330 $0.00330

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

Security

Grade A, and why

harness-evolver CLAUDE.md 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 4d 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.md · 196 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

What this is

Claude Code plugin for LangSmith-native autonomous agent optimization. Uses LangSmith Datasets, Experiments, and Evaluators as the backend. Proposers modify the user's real code in isolated git worktrees. Distributed via npm (npx harness-evolver@latest) and the Claude Code plugin marketplace.

Dependencies

pip install langsmith                    # Python SDK — used by all tools
uv tool install langsmith-cli            # CLI — used by evaluator agent for reading runs and writing feedback

The SessionStart hook (hooks/session-start.sh) auto-creates a venv and installs both on each session.

Running tools locally

All Python tools live in tools/ and require the langsmith SDK. They auto-load the API key from the langsmith-cli credentials file if LANGSMITH_API_KEY is not in the environment.

# Setup — creates dataset, evaluators, baseline, writes .evolver.json
python tools/setup.py --project-name my-agent --entry-point "python main.py" --framework langgraph --goals accuracy

# Run evaluation for a candidate in a worktree (canary preflight runs 1 example first)
python tools/run_eval.py --config .evolver.json --worktree-path /tmp/wt --experiment-prefix v001a
# Default concurrency is 3. Use --concurrency 1 for agents that can't run in parallel (shared files, fixed ports, etc)
# Use --sample 10 to evaluate a random subset (used by light mode)
# Use --sample 10 --sample-split train to sample from train only + always eval all held_out
# Use --no-canary to skip preflight check

# Compare experiment results
python tools/read_results.py --experiments v001a,v001b --config .evolver.json --output comparison.json

# Trace analysis from an existing experiment
python tools/trace_insights.py --from-experiment "v003-2026-04-01" --output trace_insights.json

# Import production traces as test data
python tools/seed_from_traces.py --project my-prod-project --output-md production_seed.md --output-json production_seed.json

# AST-based architecture analysis (stdlib-only, no langsmith needed)
python tools/analyze_architecture.py --harness path/to/agent -o output.json

# Evolution progress chart (stdlib-only, no langsmith needed)
python tools/evolution_chart.py --config .evolver.json

# Integrated preflight check (API key + schema + state + health + canary)
python tools/preflight.py --config .evolver.json

# Archive evolution candidate (stdlib-only, no langsmith needed)
python tools/archive.py --config .evolver.json --version v001 --experiment v001-abc --worktree-path /tmp/wt --score 0.85 --won
python tools/archive.py --config .evolver.json --list

# Promote proven evolution learnings to CLAUDE.md (compound learning)
python tools/promote_learnings.py --memory evolution_memory.md --target CLAUDE.md --threshold 5 --dry-run
python tools/promote_learnings.py --memory evolution_memory.md --target CLAUDE.md --threshold 5

# Log evolution iteration to LangSmith (creates traceable run per iteration)
python tools/log_iteration.py --config .evolver.json --action start --version v001
python tools/log_iteration.py --config .evolver.json --action end --run-id <id> --score 0.85 --merged true

# Update config after merge (handles backup/restore/update atomically)
python tools/update_config.py --config .evolver.json --action backup
python tools/update_config.py --config .evolver.json --action restore
python tools/update_config.py --config .evolver.json --action update --winner-experiment v001-abc --winner-score 0.85

# Clean up orphan worktrees after eval
python tools/cleanup_worktrees.py --dry-run
python tools/cleanup_worktrees.py

# Constraint validation for proposals (stdlib-only, no langsmith needed)
python tools/constraint_check.py --config .evolver.json --worktree-path /tmp/wt --baseline-path .

# Secret detection in text (stdlib-only, pipe text to stdin)
echo "text with API keys" | python tools/secret_filter.py

# Mine Claude Code sessions for eval data (stdlib-only)
python tools/mine_sessions.py --agent-description "my agent" --output mined.json

# Dataset health diagnostic (size, difficulty, coverage, splits)
python tools/dataset_health.py --config .evolver.json --output health_report.json

# Validate state before evolution
python tools/validate_state.py --config .evolver.json --output validation.json

# Check iteration gates
python tools/iteration_gate.py --config .evolver.json --output gate_result.json

# Track regressions between iterations
python tools/regression_tracker.py --config .evolver.json --previous-experiment v001a --current-experiment v002c --output regression_report.json

# Consolidate cross-iteration memory
python tools/consolidate.py --config .evolver.json --output evolution_memory.md

# Synthesize evolution strategy document
python tools/synthesize_strategy.py --config .evolver.json --output strategy.md

# Add evaluator to config
python tools/add_evaluator.py --config .evolver.json --evaluator factual_accuracy --type llm

# Inject adversarial examples
python tools/adversarial_inject.py --config .evolver.json --experiment v003a --inject

# Extract a consolidated capability contract (AGP Contract Generation)
# AST-walk the agent source tree and emit contracts.md (signatures + docstrings
# + @tool decorators). Reduces prompt bloat and keeps prompts synced with code.
python tools/extract_contracts.py --root . --output contracts.md
python tools/extract_contracts.py --config .evolver.json --output contracts.md  # use entry_point

# Build the RSPL-lite resource registry (AGP Layer 1)
# Classifies project files into prompt/tool/agent/environment/memory, hashes and
# versions them. Proposers can target a single type via the evolvable flag.
python tools/resource_registry.py --root .
python tools/resource_registry.py --root . --list --type tool
python tools/resource_registry.py --root . --freeze prompts/system.md  # mark non-evolvable

# TF-IDF retrieval over the evolution archive (AGP retrieve operator)
# Returns top-k historically similar candidates for a lens/failure description.
python tools/archive_search.py --config .evolver.json --query "retry rate limit"
python tools/archive_search.py --config .evolver.json --query-file lenses.json --winners-only --top 3
python tools/archive_search.py --config .evolver.json --query "..." --losers-only --format json

Read the full file on GitHub · 196 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. 4d ago First seen · 196 lines · 3,303 tokens per session scan A 404cb4e56df8

Subscribe to this mod's changes

harness-evolver CLAUDE.md is an instructions file published in the GitHub repository raphaelchristi/harness-evolver (49 stars, last pushed 4mo ago), licensed MIT. It adds 3,303 tokens to every session, about $0.0165 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.