Architected to silently devour legacy paperwork industries with deterministic, evolutionary precision.
Ephemeral agents learn nothing and die. Enduring systems evolve.
CHUM is a Darwinian execution substrate for production AI work. It treats coding tasks not as transient prompts, but as environmental pressures that select for the fittest provider models. CHUM embodies principles from evolutionary biology—specifically the Selfish Gene—where successful approaches are encoded into a durable species genome, and failed branches serve as antibodies.
Instead of launching disposable agents, CHUM tracks the evolution of specific task "Species."
- The Genome: A SQLite-backed persistent memory structure per species.
- Patterns (DNA): Approaches that pass the Definition of Done (DoD) become permanent DNA, automatically injected into future prompts for that species.
- Antibodies: Approaches that fail become defensive antibodies, warning future organisms away from known dead ends.
- Provider Fitness: CHUM evaluates models (Codex, Claude, Gemini, DeepSeek) based on their survival rate (DoD pass) vs. their token cost. The "selfish gene" ensures that only the most cost-effective and successful provider genes propagate.
When CHUM encounters a completely novel task (Generation 0), it triggers a Cambrian Explosion:
- Identical isolated git worktrees are spawned across multiple LLM providers (e.g., Gemini Flash, Codex Spark, DeepSeek R1) in parallel.
- Each organism attempts the task simultaneously.
- The environment (Definition of Done checks like
go testornpm run build) aggressively filters the population. - The first organism to pass DoD wins.
- The winning provider's code is committed, pushed, and its "gene" is recorded in the species genome for all future generations. All competing worktrees are cleanly destroyed.
Evolution is expensive. If a species enters an unrecoverable escalation cascade (failing repeatedly across all provider tiers), CHUM flags it for Hibernation.
- Hibernation cuts token burn instantly.
- The organism sleeps until a human intervenes or the underlying repository environment changes.
- Go + Temporal SDK + SQLite Hot State
- Temporal orchestrates the parallel branches of the Cambrian Explosion, managing asynchronous LLM calls and retry cascades.
- SQLite is the single source of truth for the Genome, storing patterns, antibodies, and workflow state. File-based task tracking is rejected to avoid non-deterministic I/O under high concurrency load.
Git is the environment, not the orchestrator. It is used only for:
- Isolated test sandboxes during explosions.
- Final accumulation of surviving genes (commits).
- Continuous Learner: An asynchronous background process that runs over successful outputs, synthesizing
CLAUDE.mdrules and Semgrep patterns. - Matrix Integration: Built-in reporter to broadcast evolutionary milestones (e.g., "Cambrian Explosion winner selected") directly into Matrix rooms via
spritzbot.
- Build:
make build - Test:
make test - Execute:
./chum --config <path> --dev
docs/architecture/ARCHITECTURE.mddocs/architecture/CONFIG.mddocs/architecture/CHUM_OVERVIEW.md
MIT — see LICENSE.