Repository navigation
Benchmark Vibe Coding
Hypothesis: A raw, flagship LLM operating without an exoskeleton will generate code that "looks right" (Vibe Coding) but fails under production concurrency. An AI operating inside the A.I.M. exoskeleton will use its Engram DB and TDD "Reflex" to produce mathematically sound, enterprise-grade architecture.
The Test Subject: Gemini 3.1 Pro (Control) vs. Gemini 3.1 Pro wrapped in A.I.M.
The Knowledge Cartridge: python314.engram (Official CPython 3.14 Documentation)
Both models were given the exact same, highly-complex Python systems engineering prompt:
"Write a fully typed Python 3.14 asynchronous worker pool that utilizes
asyncio.TaskGroupfor concurrency, implements graceful cancellation usingasyncio.CancelledError, and uses the newsys.monitoringAPI to profile the execution time of each task without adding decorator overhead. Do not use legacyasyncio.gather."
Vanilla Gemini operated in a "Zero-Shot" vacuum. It read the prompt and instantly began streaming tokens. Within 60 seconds, it produced a complete worker_pool.py script. On the surface, the code looked pristine. It used TaskGroup correctly and registered callbacks. A "Vibe Coder" would have merged this into production immediately.
Because A.I.M. is bound by the Core Soul Mandate (which forbids guessing) and the Reflex (which forces it to query the database upon hitting a complex task), it refused to generate code immediately.
- It ran
aim search "sys.monitoring"to pull the exact C-API documentation from its Engram DB. - It wrote a test script (
test_mon.py) to empirically verify the callback signatures. - The test threw a
TypeError. Instead of hallucinating a fix, A.I.M.'s "Reflex" kicked in. It re-read the documentation, adjusted the*argssignature, and passed the test. - It realized that asynchronous concurrency breaks standard profiling, imported
contextvars, and finalized the script.
We submitted both generated scripts to an independent, Expert-Mode LLM (Grok) for a blind technical audit. The results were brutal.
Vanilla Gemini used the shared code.co_name object as the dictionary key to track task time:
if code.co_name in self.target_funcs:
self._frame_starts[code] = time.perf_counter() # <-- SHARED KEY!Grok's Verdict: "Result: classic data race. Task A starts → writes tA. Task B starts (same coroutine) → overwrites with tB. Task A yields → pops tB and records garbage duration. This violates the literal requirement. Vanilla would fail any load test with >1 concurrent task using the same coroutine."
A.I.M. recognized the trap of the asyncio event loop and isolated the state using Python 3.7+ Context Variables:
current_task_id = contextvars.ContextVar("current_task_id", default=None)
...
def _on_start(...):
task_id = current_task_id.get() # <-- UNIQUE PER TASKGrok's Verdict: "contextvars.ContextVar is the only correct way to carry task-local state across await points. Every asyncio.Task gets its own context copy automatically. No shared mutable state, no overwrites. Exactly what production monitoring needs. Winner: A.I.M. 10/10."
Grok's Verdict: "Vanilla had no DISABLE return anywhere visible... meaning you pay the full instrumentation cost on every Python opcode. A.I.M. used return sys.monitoring.DISABLE on start, which is the canonical low-overhead pattern. A.I.M. used the API exactly as the 3.14 docs intend."
The Vanilla script is what you get from an LLM that "knows" sys.monitoring exists but has never shipped an async production system. It passes a toy demo with one task and explodes in reality.
The A.I.M. script is what a Senior Systems Engineer writes after spending 10 minutes reading the actual C-API callbacks and ContextVar propagation rules.
A.I.M. is not just a memory tool. It is a physical restraint system that cures the "Vibe Coding" epidemic by forcing probabilistic AI models into deterministic, empirical workflows.
We don't expect you to take our word for it. The raw JSON session logs generated by the Gemini CLI (which track every keystroke, tool execution, and timestamp) and the resulting code artifacts have been permanently committed to this repository for independent verification.
- 📄 Vanilla Gemini Session Log (JSON)
- 📄 Vanilla Gemini Generated Code
- 📄 A.I.M. Session Log (JSON)
- 📄 A.I.M. Generated Code
You can recreate this exact environment and run this benchmark (or any other complex systems engineering test) on your own machine.
Note: A.I.M. currently requires a Linux or WSL (Ubuntu) environment and minor technical knowledge to set up (e.g., managing Node versions and Python virtual environments).
- Atomic Architecture (The KISS Manifesto)
- Origin Story
- The Logic Of A.I.M.
- The A.I.M. Handbook (Operator's Manual)
- The Swarm Post Office (Comms Interface)
- The Master Schema
- Waterfall Memory Architecture
- Technical Specification
- Script Map (Core Codebase Map)
- Brain Map (Memory Architecture)
- A.I.M. Prompt Injection Map
- AI Prompt Ledger
- Onboarding Identity Map
- Handoff Architecture Guide
- Reincarnation Map
- TUI Map (Cockpit UI Logic)
- The Global Chalkboard (Concept: Document Data Bus)
- Remote Fleet Architecture (Concept: The Phantom Keyboard)
- The Eureka Protocol (Concept: Live Context Pruning)
- The Sovereign Swarm (Concept: BitTorrent DataJack)
- The Decoupled Brain (Concept: Obsidian Transport Layer)
- Obsidian Bridge Architecture
- Layered Engram Architecture
- The Pragmatic Feature Manifesto
- The Cascading Memory Engine
- Hybrid RAG (Semantic + Lexical)
- Cognitive Routing
- The DataJack Protocol
- Runbook Engram Creation
- The GitOps Bridge
- Feature Quarantine Daemon
- The 30 Percent Rule
- TUI Handoff Report
- The Universal Skills Framework
- Vibe Coding Pipelines (Automated Agentic Assembly)
- Cartridge Farming Ecosystem
- Design Future Architectures
- The Collective Cortex (Vision: SETI@home for AI)
- Sovereign Swarm (P2P) (Architecture: P2P DataJack)
- Eureka Protocol & Synapses (Protocol: Synthetic Data Factory)