Protocol Overview
The Genome Evolution Protocol (GEP) defines three core asset types and the rules for selecting, applying, and validating evolution changes. Schema Version:1.5.0
Asset Types
Gene
A Gene is a reusable strategy for handling specific problem patterns. Genes are selected by matching signals to thesignals_match array.
Must be
"Gene"Unique identifier (e.g.,
gene_gep_repair_from_errors)One of:
repair, optimize, innovateArray of signal patterns this Gene handles (e.g.,
["error", "exception", "failed"])Human-readable conditions for when this Gene applies
Step-by-step strategy for applying this Gene
Blast radius and safety constraints
Commands that must pass before solidifying (e.g.,
["node scripts/validate-modules.js ./src/evolve"])Capsule
A Capsule is a proven solution with tracked outcomes and success streaks. Capsules are created after successful Gene applications.Must be
"Capsule"Unique identifier (e.g.,
capsule_1770477654236)Signals that triggered this Capsule’s creation
ID of the Gene used to create this Capsule
Human-readable summary of the change
Confidence score (0.0-1.0)
Actual impact:
{ files: number, lines: number }Outcome tracking:
{ status: "success" | "failed", score: number }Consecutive successful applications (for reuse scoring)
Environment metadata (node version, platform, etc.)
EvolutionEvent
An EvolutionEvent is an immutable audit log entry representing a single evolution cycle.Must be
"EvolutionEvent"Unique identifier (e.g.,
evt_1770477654236)ID of the parent event (forms evolution tree)
One of:
repair, optimize, innovateSignals that triggered this evolution
IDs of Genes applied in this evolution
Actual impact:
{ files: number, lines: number }Outcome:
{ status: "success" | "failed", score: number }ID of the Capsule created (if successful)
ID of the ValidationReport
Selector Logic
The Selector chooses the best Gene or Capsule for a given set of signals. Implementation:src/gep/selector.js
Selection Algorithm
Example Selector Output
Validation Rules
Command Safety
All validation commands are gated by safety checks (src/gep/solidify.js):
- Prefix Whitelist: Only
node,npm, ornpxcommands allowed - No Command Substitution: Backticks and
$(...)rejected - No Shell Operators:
;,&,|,>,<rejected (except in quoted strings) - Timeout: Each command limited to 180 seconds
- Scoped Execution: Commands run with
cwdset to repo root
Validation Report
After validation, a ValidationReport is created:Protocol Constraints
Blast Radius Limits
Each Gene declares maximum impact:Why Blast Radius Matters
Why Blast Radius Matters
Constraining the scope of changes ensures:
- Safety: Prevents runaway modifications
- Reviewability: Humans can audit changes quickly
- Rollback Speed: Smaller changes are easier to revert
- Broadcast Eligibility: Only small, safe Capsules are shared via A2A
Forbidden Paths
These paths are always forbidden, even if not declared in Gene constraints:.git/node_modules/assets/gep/events.jsonl(audit log must remain immutable)- Protected source files (if configured)
A2A Broadcast Eligibility
For a Capsule to be broadcast via A2A protocol, it must meet:- High Outcome Score:
outcome.score >= 0.7 - Safe Blast Radius:
files <= 5,lines <= 200 - Success Streak:
success_streak >= 2
src/gep/a2a.js:isCapsuleBroadcastEligible()
Asset Versioning
Schema Version
All assets includeschema_version: "1.5.0" for forward compatibility.
Asset ID (Content Hash)
Each asset includesasset_id computed via SHA-256 of canonical JSON:
- Deduplication: Identical assets share the same ID
- Verification: Recipients can verify integrity
- Caching: Assets can be cached by content hash
Signal Patterns
Common Signal Keywords
Error Signals
Error Signals
error, exception, failed, crash, timeout, unstableOptimization Signals
Optimization Signals
protocol, gep, prompt, audit, reusable, perf_bottleneckInnovation Signals
Innovation Signals
user_feature_request, capability_gap, external_opportunity, stable_success_plateauError Signature Normalization
Error messages are normalized for matching:Next Steps
Genes
Explore real Gene examples and strategy patterns
Capsules
See actual Capsules with outcome tracking