Version v0.1.2 extends the decoupled Model Context Protocol (MCP) server architecture from v0.1.1 with two new modules that work in tandem with the evolutionary pipeline to analyze and optimize mathematical and quantum computations on classical hardware.
-
Decoupled Mutable Tool Payload (
dynamic_mcp_server.py):- Acts as the dynamic mutable registry target for self-evolution.
- Defines entry points:
get_tool_manifest()andexecute_tool(name, arguments). -
v0.1.2 Update: Exposes
mutate_math_in_codeandmutate_qubo_in_codetools as part of the MCP inventory, allowing other agents and modules to directly query AST mathematical and QUBO optimizations.
-
Static Host Controller (
orchestrator.py/StaticMCPHost):- Houses the protected, immutable engine layer.
- Features a dynamic hot-reload system via
importlib.reloadto safely pull in mutated tool versions without interrupting the main host process. - Implements strict framework protection protocols by blocking tool calls to elements defined in
EXCLUDED_SKILLS. -
v0.1.2 Update: Integrates the mathematical mutation engine (
math_mutator.py) and the QUBO/quantum mutation engine (qubo_mutator.py) in tandem with the synthesizer variant generation step. Specialized mathematical and quantum/classical optimization variants are proposed, run inside the sandbox, and evaluated alongside Synthesizer models to determine the optimal Pareto-efficient candidate.
-
Sandbox Isolation Engine (
sandbox.py):- Executes code mutations inside isolated, resource-constrained environments.
- Prepend typing import headers (e.g.
from typing import List, Dict, ...) to Python scripts to prevent common NameError exceptions on type annotations during sandboxed tests.
-
Mathematical Mutation Engine (
math_mutator.py):- Works in tandem with the orchestrator to optimize mathematical functions.
- Combines rule-based AST transformation (constant folding, algebraic simplification like
x**2->x*x,x**0.5->math.sqrt(x), multiplicative/additive identity elimination, bit shifts for power-of-two multiplication/division, and closed-form range sum conversion) and LLM-driven numerical optimization.
-
QUBO & Quantum Classical Mutation Engine (
qubo_mutator.py):- Works in tandem with the orchestrator to optimize Quadratic Unconstrained Binary Optimization (QUBO) and quantum equations emulated on classical hardware.
- Combines AST-based pattern matching (detecting double-loop quadratic summation structures) and LLM-driven quantum transformations (e.g. converting
$O(N^2)$ global energy updates to$O(N)$ local incremental spin-flip delta updates, representing spins bitwise, and applying symmetric matrix reductions).
-
Telemetry & Failure Correlation:
- Queries and appends historical mutation attempts (last 5 variants) and sandbox execution crash logs (last 3 stderr tracebacks) directly to the Synthesizer and QA Agent prompts.
- Replaces version-based scheduling in the daemon with data-driven bottleneck ranking, prioritizing untested skills (0.0 ms average latency) first, then sorting skills by average sandbox latency descending to target the slowest components.
- Run the structural MCP verification test:
python3 orchestrator.py --mode shadow_test
- Run standard unit testing to verify orchestrator database registry, discovery, and self-patching integrity:
python3 test_hermit.py
- Run the math mutator unit tests:
python3 test_math_mutator.py
- Run the math integration tests checking the tandem pipeline behavior:
python3 test_math_integration.py
- Run the QUBO mutator unit tests:
python3 test_qubo_mutator.py
- Run the QUBO integration tests:
python3 test_qubo_integration.py
- Start the background daemon:
export GEMINI_API_KEY=<your_key> python3 hermit_daemon.py
- Run concurrent integration tests:
python3 test_integration.py
- Monitor evolution:
python3 monitor_evolution.py