Skip to content

chenpg2/genius-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GENIUS — the bridge from a scientific problem to an openevolve run

GENIUS = Grounded Evolutionary Novelty for Ideation, Understanding & Science.

Evolutionary program search (openevolve / AlphaEvolve-style) is powerful — but you can't feed it a raw scientific problem. The optimizer needs three things a research question doesn't come with:

  1. a runnable starting program (initial_program.py),
  2. a frozen, un-gameable metric of "better" (evaluate(program) → {combined_score}), and
  3. a reason to believe the search space holds something genuinely novel, not a safe local tweak.

GENIUS builds that bridge. It takes an idea — from scratch, or a local sub-problem inside an existing project — and runs Claude · Codex · Kimi as three independent model families that mine the literature (paper-search MCP) and debate and attack each other across families (with a Moderator hunting blind spots) until they converge on grounded, novel, computable candidates. Then, through a human freeze-gate, it hands a ready evolve-dir (initial program + frozen evaluator) to the real openevolve engine — so the winner is measured, not agreed.

EVOLVE backend. The evolutionary engine is the upstream openevolve PyPI package (real MAP-Elites + islands + its own governor/checkpoints) — NOT a custom loop. The mutation LLM is a local ollama model (qwen2.5-coder) reached via openevolve's OpenAI-compatible client (localhost:11434/v1). This plugin only adds the bridge: SHARPEN/DEBATE to a computable candidate → draft → freeze an evaluator → scripts/run-openevolve.sh (hash-verify + gtimeout) → openevolve-run → merge the measured winner into the portfolio.

/genius "<your research idea>"
SHARPEN → EXPLORE → DEBATE → SYNTHESIZE → portfolio.md   (+ gated EVOLVE → openevolve for computable candidates)

The portfolio is the consensus-safe pick plus protected high-novelty outliers (forced single-consensus is dropped — it averages breakthroughs away), with real scores where EVOLVE ran. The debate is the bridge-building mechanism; openevolve is the destination. See DESIGN.md for the full design.

Tools

Command Scenario What it does
/genius "<idea>" Scratch idea SHARPEN → EXPLORE → DEBATE → SYNTHESIZE → QD portfolio (+ gated EVOLVE). The original flow.
/genius-understand Existing project Map the current project: goal, state, technical routes + status, core blocker, leverage points, open questions. Standalone or consumed by /genius-focus.
/genius-focus [sub-problem] Existing project Auto-understand → surface candidate sub-problems → user picks one → scoped axioms-grounded debate → QD portfolio (+ gated EVOLVE).
/genius-evolve <evolve-dir> Post-debate Run the OpenEvolve-on-ollama EVOLVE engine on an already-prepared evolve-dir (with frozen evaluator).

Install (global)

From the official Claude Code plugin flow, in an interactive claude terminal:

/plugin marketplace add chenpg2/genius-plugin
/plugin install genius@genius-plugin

Or wire it in ~/.claude/settings.json (then restart Claude Code):

{
  "extraKnownMarketplaces": {
    "genius-plugin": { "source": { "source": "github", "repo": "chenpg2/genius-plugin" } }
  },
  "enabledPlugins": { "genius@genius-plugin": true }
}

/genius is then available in any project. Run artifacts are written to a relative genius-runs/<date>_<slug>/ (or results/genius/<date>_<slug>/) in your current project.

Requirements

  • Codex CLI + Kimi CLI (/codex:setup, /kimi:setup) and the paper-search MCP connected — the debate's three independent families + literature retrieval.
  • EVOLVE (optional): local ollama with a coder model (ollama pull qwen2.5-coder:32b) and an openevolve venv — see docs/EVOLVE-SETUP.md. The debate works without it.

How it works

  • The /genius command triggers the genius skill (main session), which computes a run dir and launches a self-contained Workflow (workflows/debate-engine.js). The workflow owns the deterministic control flow (phase sequence, ≤cap debate loop, cross-family critique routing, the governor) and spawns subagents for all tool use; deterministic logic lives in unit-tested pure lib/ that build.js inlines into the workflow (the Workflow runtime forbids import/require).
  • EVOLVE is gated: the skill drafts an evaluator, the user reviews and freezes it (sha256 → frozen.lock), and scripts/run-openevolve.sh runs the real openevolve package against the local ollama OpenAI endpoint, merging the measured winner into the portfolio.

Develop

npm test          # node:test — lib (schemas/engine-core/prompts/evolve-core) + build + wrapper
npm run build     # regenerate the self-contained workflows from lib/ + *.src.js

Bundled files are referenced at runtime via $CLAUDE_PLUGIN_ROOT so they resolve after a global install. Do not edit workflows/*.js by hand — they are generated by build.js from workflows/*.src.js + lib/.

License

© 2026 Peigen Chan. Source-available; all rights reserved — no open-source license is granted yet. If you'd like to use or build on GENIUS, please open an issue. (A permissive license may follow.)

About

AI4S multi-agent idea→breakthrough Claude Code plugin: Claude+Codex+Kimi debate to a quality-diversity research portfolio, with a gated OpenEvolve-on-ollama EVOLVE engine.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors