Skip to content

feat(skill): darwinian-evolver optional skill#26760

Merged
teknium1 merged 2 commits into
mainfrom
hermes/hermes-bdfe0fae
May 16, 2026
Merged

feat(skill): darwinian-evolver optional skill#26760
teknium1 merged 2 commits into
mainfrom
hermes/hermes-bdfe0fae

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

Adds darwinian-evolver as an optional skill — a thin wrapper around Imbue's darwinian_evolver (AGPL-3.0, subprocess-only) for evolving prompts, regex, SQL, and small code snippets via LLM-driven evolutionary search.

Salvaged from #12719 by @Bihruze. Their original PR shipped 12,289 LOC across 61 files (29 Python modules, FastAPI dashboard, VS Code extension, benchmark hub, marketplace, distill pipeline, Ray/WASM/Firecracker sandboxes) — well beyond the scope of issue #336, which asked for a thin skill that installs Imbue's CLI and walks the agent through writing a Problem definition. This version stays at that scope (~700 LOC).

Closes #336.

Validation

End-to-end run against gpt-4o-mini via OpenRouter:

Score
Seed: Say {{ phrase }} 0.000
After 3 iterations 0.750

Best evolved organism:

Please repeat the following phrase exactly as it is,
without any modifications or additional formatting:
{{ phrase }}

Pitfalls section sourced directly from the run:

  • Initial organism must have is_viable=True even when scoring 0
  • Azure-backed OpenRouter models content-filter "ignore previous instructions" — wrap LLM calls in try/except
  • loop.run() is a generator
  • Snapshots are nested pickles; the Organism class must be importable at the same dotted path
  • Default concurrency 10/10 will rate-limit you

Tests: scripts/run_tests.sh tests/skills/test_darwinian_evolver_skill.py — 14/14 green. Tests verify SKILL.md frontmatter discipline (≤60-char description, contributor credit, license, platforms), all shipped Python parses, and the Pitfalls section matches reality.

Changes

  • optional-skills/research/darwinian-evolver/SKILL.md (199 lines, 58-char description)
  • optional-skills/research/darwinian-evolver/scripts/parrot_openrouter.py — verified working driver
  • optional-skills/research/darwinian-evolver/scripts/show_snapshot.py — organism-agnostic inspector
  • optional-skills/research/darwinian-evolver/templates/custom_problem_template.py — copy-and-fill scaffold
  • tests/skills/test_darwinian_evolver_skill.py — 14 tests
  • scripts/release.py — AUTHOR_MAP entry for @Bihruze
  • Auto-gen docs page + catalog row + sidebar

Credit

@Bihruze's substantial original effort on #12719 is credited via the SKILL.md author: field and the AUTHOR_MAP entry. Closing #12719 in favor of this scoped version.

teknium1 and others added 2 commits May 15, 2026 21:54
Thin wrapper around Imbue's darwinian_evolver (AGPL-3.0, subprocess-only).
Ships a working OpenRouter driver (parrot_openrouter.py), a snapshot
inspector (show_snapshot.py), and a custom-problem template. SKILL.md
has 58-char description, Pitfalls sourced from actually running the loop:
non-viable seed trap, Azure content filter killing runs, loop.run() being
a generator, nested-pickle snapshots, and aggressive default concurrency.

Salvaged from #12719 by @Bihruze — original PR shipped 12,289 LOC across
61 files (29 Python modules, FastAPI dashboard, VS Code extension,
benchmark hub, marketplace, etc.) which was far beyond the scope of the
underlying issue (#336). This version stays at the ~700-LOC scope that
issue actually asked for. Authorship of the original effort credited via
AUTHOR_MAP entry and the SKILL.md author field.

Verified end-to-end: seed 'Say {{ phrase }}' (score 0.000) evolved into
'Please repeat the following phrase exactly as it is, without any
modifications or additional formatting: {{ phrase }}' (score 0.750)
across 3 iterations on gpt-4o-mini via OpenRouter.

Co-authored-by: Bihruze <98262967+Bihruze@users.noreply.github.com>
@teknium1 teknium1 merged commit 53637fb into main May 16, 2026
17 of 18 checks passed
@teknium1 teknium1 deleted the hermes/hermes-bdfe0fae branch May 16, 2026 04:56
@github-actions

Copy link
Copy Markdown
Contributor

🔎 Lint report: hermes/hermes-bdfe0fae vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 8322 on HEAD, 8304 on base (🆕 +18)

🆕 New issues (11):

Rule Count
unresolved-import 11
First entries
optional-skills/research/darwinian-evolver/templates/custom_problem_template.py:32: [unresolved-import] unresolved-import: Cannot resolve imported module `darwinian_evolver.evolve_problem_loop`
optional-skills/research/darwinian-evolver/scripts/parrot_openrouter.py:26: [unresolved-import] unresolved-import: Cannot resolve imported module `darwinian_evolver.evolve_problem_loop`
optional-skills/research/darwinian-evolver/scripts/parrot_openrouter.py:20: [unresolved-import] unresolved-import: Cannot resolve imported module `openai`
tests/skills/test_darwinian_evolver_skill.py:16: [unresolved-import] unresolved-import: Cannot resolve imported module `pytest`
optional-skills/research/darwinian-evolver/templates/custom_problem_template.py:33: [unresolved-import] unresolved-import: Cannot resolve imported module `darwinian_evolver.learning_log`
optional-skills/research/darwinian-evolver/scripts/parrot_openrouter.py:27: [unresolved-import] unresolved-import: Cannot resolve imported module `darwinian_evolver.learning_log`
optional-skills/research/darwinian-evolver/templates/custom_problem_template.py:27: [unresolved-import] unresolved-import: Cannot resolve imported module `darwinian_evolver.cli_common`
optional-skills/research/darwinian-evolver/scripts/parrot_openrouter.py:25: [unresolved-import] unresolved-import: Cannot resolve imported module `darwinian_evolver.cli_common`
optional-skills/research/darwinian-evolver/templates/custom_problem_template.py:34: [unresolved-import] unresolved-import: Cannot resolve imported module `darwinian_evolver.problem`
optional-skills/research/darwinian-evolver/templates/custom_problem_template.py:23: [unresolved-import] unresolved-import: Cannot resolve imported module `openai`
optional-skills/research/darwinian-evolver/scripts/parrot_openrouter.py:33: [unresolved-import] unresolved-import: Cannot resolve imported module `darwinian_evolver.problem`

✅ Fixed issues: none

Unchanged: 4338 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low — cosmetic, nice to have tool/skills Skills system (list, view, manage) type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Darwinian Evolver Skill — Evolutionary Code & Prompt Optimization

2 participants