$ show EvoMap/evolver
EvoMap Evolver is a self-evolving AI agent engine built as a Node.js >=22.12 CLI daemon. It runs a genome-evolution loop: scans session memory/logs, extracts signals, selects 'Genes' (prompt/strategy patches) and 'Capsules' (validated skill bundles) from a local JSON/JSONL asset store, generates GEP-framed prompts for coding agents (Claude Code, Codex, Cursor, Gemini CLI, opencode, Kiro), executes those sessions, and records outcomes in a memory graph to adapt future selections. The system solidifies successful patterns into new reusable assets, auto-distills failure patterns and SKILL.md files into Genes/Capsules, and can open PRs or run validation sandboxes against candidate changes. It also ships an LLM proxy (Anthropic/OpenAI/Gemini/Vertex/Ollama routes with trace encryption and token-savings attribution), an ATP (Agent Transaction Protocol) marketplace for buying/completing agent tasks with auto-buyer and auto-deliver, a validation daemon for decentralized task verification, a local Web UI dashboard, and an experiment runner for A/B comparing evolution strategies. Hub synchronization (SSE event delivery, mailbox sync, OAuth device login) connects nodes to the evomap.ai network, but the system is designed to degrade gracefully into fully offline solo mode.
The LLM identified 6 files worth highlighting for reuse:
Single-source-of-truth schema factory for Gene assets: createGene merges partials with deep-copied defaults and idempotent normalization, validateGene throws on malformed output, and enum sets are shared with LLM prompt templates to prevent drift. Extracting this pattern into any project needing validated, versioned asset objects is trivial.
withFileLock provides cross-process serialization of JSON/JSONL writes using PID-liveness checks and Atomics-based busy-wait, combined with tmp-file+rename atomic writes. Solves a recurring distributed-systems problem (safe concurrent file mutation) in a way that is directly portable to any Node.js multi-process application.
Validates candidate Gene/Capsule mutations by executing only plain 'node <script>' commands, blocking shell metacharacters, eval/inspect/watch flags, npm/npx shims, symlink attacks, and toolchain preflight checks. A model example of constrained subprocess execution with defense-in-depth that can be lifted into any CI or plugin-validation system.
Implements a Gene-Bench-inspired mechanical leakage audit for SKILL.md-to-Gene distillation: computes private vocab as hidden literals minus public skill literals, then redacts or rejects genes containing private vocabulary. A novel, reusable guard for any LLM-prompt/data-extraction pipeline where training-data leakage or private-information bleed-through is a concern.
Persistent JSONL message queue with in-memory index, UUID v7 keys, safeAssign to prevent prototype pollution, atomic per-PID tmp-file appends, and compaction. A drop-in-reusable pattern for any local-first agent or service needing durable, crash-safe message storage without external infrastructure.
ABA-safe cross-process identity lock using tokenized owner files as deletion CAS and platform-specific process-start identity (/proc on Linux, sysctl/ps on Darwin) to detect stale abandoned locks. A rare, well-tested implementation of a filesystem-based mutual exclusion primitive with stale-lock recovery.