Design Philosophy

HezGene is built on three radical principles that set it apart from every linter, formatter, and refactoring tool that exists today.

1. Code is alive

Traditional tools treat code as static text to be analyzed and formatted. HezGene treats code as a living organism with DNA — a genetic profile that tracks performance, complexity, memory usage, and bug history over time.

Every function has a fitness score. Functions that perform well thrive. Functions that are slow, bloated, or buggy are targeted for evolution.

2. Evolution, not rewriting

HezGene does not rewrite your code from scratch. It mutates it — making small, safe, verifiable changes using Abstract Syntax Tree transformations. Each mutation is tested in a fitness arena before it can replace the original.

This is fundamentally different from AI code generation. LLMs can hallucinate and break things. AST mutations are deterministic, structure-preserving, and mathematically verifiable.

  • Deterministic: The same input always produces the same mutation.
  • Verifiable: Every mutant is tested to produce identical outputs.
  • Incremental: Small changes, not wholesale rewrites.
  • Reversible: Automatic backups and rollback on every deployment.

3. Safety is non-negotiable

HezGene was designed for production codebases. The core safety contract is:

  • Sandbox by default: Your original files are never touched unless you explicitly use --apply.
  • Correctness first: A mutant that is 10x faster but produces different output is immediately killed.
  • Freeze protection: Critical functions like authentication, payment processing, and encryption can be permanently locked from evolution.
  • Minimum threshold: Even correct mutants must demonstrate meaningful improvement to be deployed.
Production-Ready
HezGene has been tested on its own codebase. It scans, audits, and evolves itself — the ultimate test of a self-improving system.

Privacy

  • AST mutations — Processed locally. Nothing leaves your machine.
  • LLM mutations — Only sent to your configured LLM provider when --llm is used.
  • No telemetry — No usage tracking. No analytics. No phone home.
Previous
Quick Start
Basic commands to get running
Evolution
How the evolutionary loop works
Next