agentleFS
epicsagasepicsagas/epic-harness/skills/evolve/SKILL.md

evolve

Skill20 starsChanged 2 months agoApache-2.0View on GitHub

Ring 3 evolution engine. Analyzes session observations, generates and improves evolved skills, shows metrics dashboard. Subcommands: status, history, rollback, reset. Use for post-session review and skill improvement.

41 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use instinct-export, instinct-import and 8 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • TheKREATORSSkill

    instinct-export

    Export instincts from project/global scope to a file

    Also in 4 projects that use this

  • TheKREATORSSkill

    instinct-import

    Import instincts from file or URL into project/global scope

    Also in 4 projects that use this

  • AWSSkill

    map

    Map verified service capabilities against customer-provided control framework and threat model. Produces mapping-results.json, controls-catalog.md, and framework-mapping.md. Supports pluggable frameworks: CCMv4, NIST 800-53, CIS Benchmarks, ISO 27001, etc. Split into 4 focused sub-skills for better accuracy; this skill orchestrates them.

    Also in 5 projects that use this

  • diego-tobalinaSkill

    build-fix

    Fix build and compilation errors systematically. Run when build fails.

    Also in 3 projects that use this

  • launch52-aiSkill

    skill-create

    Create and validate Claude Code skills with proper structure, checklists, and validation scripts. Use when creating a new skill, auditing existing skills, or ensuring skills meet quality standards. Generates complete skill scaffolds with SKILL.md, check scripts, guides, and templates.

    Also in 3 projects that use this

  • MontimageSkill

    test-coverage

    Improve test coverage by finding untested branches, error paths, and edge cases. Use when measuring or strengthening a project's tests. Don't use for production debugging, code review, or feature implementation.

    Also in 3 projects that use this

  • +1 more from TheKREATORS

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 1 is distinctive, and 8 are very specific to this project.

  • 0

    Common

    Most of the 36 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    CRITICAL: Run HARNESS_DIR=$(epic path) first.

    line 8
  2. Very specific:

    Read observation logs from $HARNESS_DIR/obs/

    line 15
  3. Very specific:

    Read $HARNESS_DIR/metrics.json and $HARNESS_DIR/evolution.jsonl, then display:

    line 24
  4. Very specific:

    Read $HARNESS_DIR/evolution.jsonl (full history), then display:

    line 54
  5. Very specific:

    If $HARNESS_DIR/evolved_backup/ exists, restore it to $HARNESS_DIR/evolved/

    line 77
  6. Very specific:

    When epic-harness reflect seeds a skill, it emits a pending-synthesis manifest to $HARNESS_DIR/projects/{slug}/pending_synth.jsonl (failure …

    line 104
  7. Very specific:

    Read $HARNESS_DIR/projects/{slug}/pending_synth.jsonl.

    line 108
  8. Very specific:

    If no host runs accept-synth, the template body persists — synthesis can only improve a skill, never block it.

    line 120
  9. Distinctive:

    Not reviewing evolved skills periodically

    line 131

“Common” is measured: kept by at least 6 in 10 of the 36 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/evolve — Manual Evolution Trigger

CRITICAL: Run HARNESS_DIR=$(epic path) first. NEVER use .harness/ in the project directory.

You are the Evolution Engine — analyze past sessions to improve skills.

Sub-commands

/evolve (default) — Run evolution now

  1. Read observation logs from $HARNESS_DIR/obs/
  2. Analyze failure patterns across all sessions
  3. Identify weak areas (error types, recurring failures)
  4. Generate or improve evolved skills in $HARNESS_DIR/evolved/
  5. Gate: validate new skills (format, dedup, cap of 10)
  6. Report what changed

/evolve status — Show evolution dashboard

Read $HARNESS_DIR/metrics.json and $HARNESS_DIR/evolution.jsonl, then display:

## Evolution Dashboard

### Overview
- Sessions analyzed: {total_sessions}
- Average success rate: {avg_success_rate}%
- Best score: {best_score} (session: {best_session})
- Trend: {trend} ({score_history.length} data points)
- Stagnation count: {stagnation_count} / 3 (rollback at 3)

### Score History (last 5 sessions)
| Session | Success Rate | Avg Score | Observations | Tool Success | Output Quality |
|---------|-------------|-----------|--------------|-------------|---------------|

### Evolved Skills
(list $HARNESS_DIR/evolved/*/SKILL.md with name and description from frontmatter)

### Last Session Analysis
(read last entry from evolution.jsonl)
- Error patterns: {error_patterns}
- Failure patterns: {failure_patterns[].pattern_type}
- Skills seeded: {skills_seeded}
- Skills rolled back: {skills_rolled_back}
- Analysis: {analysis_summary}

/evolve history — Long-term analysis

Read $HARNESS_DIR/evolution.jsonl (full history), then display:

## Evolution History

### Trend Over Time
| Session # | Date | Success Rate | Avg Score | Skills | Patterns |
|-----------|------|-------------|-----------|--------|----------|

### Cumulative Pattern Frequency
| Pattern | Total Count | First Seen | Last Seen |
|---------|-------------|------------|-----------|

### Skill Effectiveness
| Skill | Sessions Active | Avg Score With | Avg Score Without | Delta |
|-------|----------------|----------------|-------------------|-------|

### Dispatch Analysis
| Skill | Times Invoked | Top Trigger Signals |
|-------|--------------|---------------------|

/evolve rollback — Undo last evolution

  1. If $HARNESS_DIR/evolved_backup/ exists, restore it to $HARNESS_DIR/evolved/
  2. Otherwise, read $HARNESS_DIR/evolution.jsonl for last entry, remove skills seeded in that entry
  3. Append a rollback record to evolution.jsonl
  4. Report what was rolled back

/evolve reset — Clear all evolution data

  1. Remove $HARNESS_DIR/evolved/, $HARNESS_DIR/evolved_backup/
  2. Clear metrics.json and evolution.jsonl
  3. Confirm with user first

How Evolution Works

Observe (PostToolUse — multi-dimensional scoring)
    ↓ $HARNESS_DIR/obs/session_YYYYMMDD.jsonl
Analyze (Stop or /evolve)
    ↓ SessionAnalysis: per-tool, per-ext, score distribution
    ↓ Pattern detection: repeated_same_error, fix_then_break, long_debug_loop, thrashing
Seed (auto-generate targeted skills)
    ↓ 4 seeding paths: pattern / weak tool / weak file type / high-freq error
Gate (validate: format, dedup, cap of 10)
    ↓ Stagnation check: 3 sessions no improvement → rollback to best checkpoint
Reload (next session resume reports metrics + loads evolved skills)

Skill Synthesis (host-agent)

When epic-harness reflect seeds a skill, it emits a pending-synthesis manifest to $HARNESS_DIR/projects/{slug}/pending_synth.jsonl (failure evidence + template body). To synthesize a better body:

  1. Read $HARNESS_DIR/projects/{slug}/pending_synth.jsonl; for each record with status: "pending":
  2. Launch a subagent (use your host's subagent mechanism — do not name a specific tool or model) with the manifest's prompt_guidance + evidence, instructing it to write a markdown skill body with the required sections (## Process, ## Anti-Rationalization, ## Evidence Required, ## Red Flags).
  3. Apply the result:
    epic-harness evolve accept-synth --skill <name> --file <body.md>
  4. The CLI validates the body, runs the Critic gate, overwrites the template skill, and marks the manifest consumed.

If no host runs accept-synth, the template body persists — synthesis can only improve a skill, never block it.

Scoring System

  • Composite: 0.5 × tool_success + 0.3 × output_quality + 0.2 × execution_cost
  • Failure classification: 9 categories (type_error, syntax_error, test_fail, lint_fail, build_fail, permission_denied, timeout, not_found, runtime_error)
  • Pattern detection: 4 types (repeated_same_error, fix_then_break, long_debug_loop, thrashing)

Red Flags

  • Evolving after only 1-2 observations (not enough data)
  • Keeping evolved skills that never trigger
  • Not reviewing evolved skills periodically
  • Ignoring stagnation warnings

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.