When swarms of autonomous AI agents solve complex coding and scientific discovery tasks, they reset their memory between sessions. As a result, agents waste compute repeatedly re-deriving the same mathematical algorithms from scratch while copying subtle numerical errors. Existing skill libraries either store unverified code that spreads bugs across the swarm, or rely on formal verification systems that attempt to translate ordinary Python code into pure mathematical equations—a process that succeeds on only $12.5\%$ of imperative scientific programs. We present OpenCommons, a decentralized concept commons that catalogs algorithms by what they actually compute rather than their surface syntax. By executing functions against a small suite of boundary test inputs, OpenCommons identifies equivalent implementations in less than a millisecond, achieving $100\%$ coverage of native scientific code. An asynchronous peer-review engine stress-tests contributed code in the background, quarantining all defective submissions across six adversarial defect classes with zero false alarms. When evaluated on live language models solving scientific discovery tasks, retrieving verified concept cards increases first-attempt success from $33.3\%$ to $83.3\%$ while preventing the propagation of subtle bugs. Across multi-wave research horizons, this verified shared library reduces cumulative discovery cost by $12.67\times$, providing a dependable foundation for collective machine intelligence.
1. Introduction
When a human scientist or software engineer solves a difficult problem, they package the verified solution into a reusable library so that future projects can build on top of it without starting over. Today's autonomous AI agents, by contrast, largely work in isolation. When asked to build a physics simulation, a data-compression tool, or a statistical analysis pipeline, an AI agent typically writes every helper function from scratch inside its current conversation and forgets what it built the moment the session ends.
Writing foundational code from scratch in every session creates a compounding reliability problem. Because language models generate code by predicting the most common patterns seen in public training data, they naturally default to simplified "textbook" formulas that pass basic sanity checks on toy inputs but silently fail on real-world edge cases. For example, a model asked to compute log-probabilities will often write a direct exponential sum ($\log \sum_i \exp(x_i)$) that works on small numbers like $1$ or $2$, but crashes with a floating-point overflow as soon as an input reaches $710$. Similarly, models routinely write naive summation loops that lose small numbers to IEEE-754 rounding limits, physics update steps that artificially gain energy over long simulations, or helper functions that accidentally mutate the caller's input array in place. When a scientific project requires chaining multiple building blocks together across sequential stages ($W_1, \dots, W_d$), these subtle failure rates multiply: if an agent has a probability $p_0 < 1$ of writing a bug-free component at any single stage, its probability of completing a $d$-stage hierarchy without a hidden defect decays exponentially as $\Pr[\text{Pass}(d)] = p_0^d$.
2. Dual-Tier Meaning Indexing
Rather than requiring agents to translate imperative Python into a restricted functional intermediate representation (`Formal-IR-Lift`), OpenCommons indexes native scientific functions directly through a two-tier identity hierarchy:
| Metric | Observed (95% CI) | Threshold | Verdict |
|---|---|---|---|
| Native-Code Behavioral Ingestion Coverage ($N=240$) | 1.000 [1.000, 1.000] | ≥ 0.950 | SUPPORTED |
| 21-Form Functional IR Lifting Coverage (`Formal-IR-Lift`) | 0.125 [0.087, 0.167] | Baseline | 8.0× Gain |
| Cross-Algorithm Behavioral Equivalence Recall ($120$ pairs) | 1.000 [1.000, 1.000] | ≥ 0.950 | SUPPORTED |
| Subtle Semantic Mutant False-Merge Rate ($120$ mutants) | 0.000 [0.000, 0.000] | = 0.000 | SUPPORTED |
| Mean Indexing Latency per Function ($\text{sid} + \text{cid}$) | 0.479 ms [0.448, 0.512] | ≤ 5.000 ms | SUPPORTED |
3. Asynchronous Peer Review, CRDT Gossip & Monotonic Counterexample Ratchet
In decentralized multi-agent swarms, optimistic ingestion must be paired with rigorous falsification so that defective implementations cannot pollute shared memory. OpenCommons models the distributed concept store as a state-based join-semilattice $\mathcal{S} = \langle \mathcal{B}, \mathcal{Q}, \mathcal{A} \rangle$, where $\mathcal{B}$ is a grow-only set of contributed `ConceptBlock`s, $\mathcal{Q}$ is a monotone quarantine set populated by a 5-gate asynchronous peer-review engine (`constant_stub`, `wrong_init_constant`, `arg_mutation`, `off_by_one_slice`, `nan_inf_singularity`, and `zero_division_boundary`), and $\mathcal{A}$ is a grow-only set of dynamically discovered adversarial counterexample probes.
When any agent in the swarm encounters a production input $x^\star$ outside the initial $K=16$ probe suite that triggers a numerical or runtime defect in block $b$, reporting $(b, x^\star)$ via the Monotonic Counterexample Ratchet deterministically verifies the failure, appends $x^\star$ to $\mathcal{A}$, permanently quarantines $b \in \mathcal{Q}$, and promotes the next verified implementation in the equivalence class—reducing downstream defect contagion by $98.0$ percentage points across $50$-wave discovery horizons.
4. Sub-10ms Hybrid Retrieval & Concept Representation Modalities
Lexical retrieval methods such as BM25 degrade sharply as concept libraries scale because thousands of scientific routines share overlapping terminology (`matrix`, `norm`, `entropy`, `step`). OpenCommons combines token/identifier indexing, arity and type-signature filtering, and live sandboxed I/O probe execution (`io_examples`) to achieve $100.0\%$ Precision@1 at $N=5,000$ concepts in $7.24\text{ ms}$, where standard BM25 degrades to $32.5\%$.
5. Live LLM Scientific Discovery & Multi-Wave Horizon Scaling
To test how representation format affects downstream reasoning, we evaluate live `Qwen3.5-2B-Base` inference across $30$ scientific and numerical discovery benchmarks (`R-004`). Counterintuitively, conditioning an agent on retrieved Raw Code ($33.3\%$ Pass@1) performs worse than Isolated Zero-Shot generation ($50.0\%$ Pass@1) on compositional adaptation tasks (`S4`) because raw code induces syntactic copy-bias via induction heads ($\Delta \ell = +1.769\text{ nats/token}$). Conditioning on OpenCommons Dual Concept Cards—which pair algorithmic pseudocode, conservation-law intent, dimensional units, and explicit refuted pitfalls—raises single-attempt Pass@1 to $83.3\%$ overall and $87.5\%$ on multi-step compositional adaptation (`S4`).
6. Adversarial Stress-Testing & Boundary Falsification (`R-006`)
| Stress-Test Module | Observed Metric | Empirical Finding |
|---|---|---|
| 1. Stratified Probe Sensitivity ($K \in \{1..24\}$) | 0.0% collision at $K \ge 12$ | Eliminates lookalike mutant collisions that pass $K=1$ ($46.7\%$) and $K=4$ ($15.6\%$). |
| 2. Floating-Point ULP Conditioning ($\kappa \in [10^0, 10^{12}]$) | 100.0% recall ($\kappa \le 10^8$) | 7-digit canonical rounding remains invariant up to $\kappa = 10^8$ before ill-conditioned breakdown at $\kappa \ge 10^{10}$. |
| 3. 20-Node CRDT Fault Injection ($50\%$ packet drop) | 100.0% convergence | Exact state convergence across $100$ random schedules with out-of-order delayed gossip. |
| 4. Live LLM Defect Contagion vs. Quarantine | 0.0% → 83.3% Pass@1 | Unquarantined subtle bugs collapse downstream Pass@1 to $0.0\%$; peer-review quarantine restores $83.3\%$. |
| 5. White-Box AST Threshold Probing | 0.0% threshold evasion | AST constant extraction $\{c-\epsilon, c, c+\epsilon\}$ catches $100\%$ of narrow branch bombs missed by black-box probes. |
| 6. Mechanistic Copy-Bias Probe (`S4`) | +1.769 nats/token | Confirms raw code elevates copy-bias toward stale variable bindings compared to pseudocode cards. |
| 7. Monotonic Counterexample Ratchet ($50$ waves) | -98.0 pp contagion | Reduces multi-wave defect contagion from $100.0\%$ to $2.0\%$ via single-shot production falsification. |
| 8. $O(1)$ Structural Hash (`sid`) Deduplication | 20.0× compute savings | Eliminates $95.0\%$ of redundant 5-gate sandbox executions under swarm concurrency. |
| 9. Teleological Intent & Dimensional Units | 100.0% invariant retention | Preserves physical conservation laws ($\Delta H / H_0$) and dimensional homogeneity across adaptations. |
7. Swarm CLI & 2-Tool MCP Deployment
OpenCommons is released as an open-source Python package (`Apache-2.0`) providing both the `opencommons` CLI and the minimal 2-tool JSON-RPC 2.0 Model Context Protocol server (`opencommons-mcp`):
git clone https://github.com/kardashevproject/opencommons.git cd opencommons && pip install -e . # Seed verified primitives and inspect the local CRDT store opencommons seed opencommons status # Query a verified Dual Concept Card with refuted pitfalls opencommons find "numerically stable logsumexp" --modality dual_card_with_pitfalls # Start the 2-tool MCP server (find, record) for autonomous agent swarms opencommons-mcp --store ~/.opencommons/store.json # Or launch via kardashev-cli (kardashev / ksh) with shared Concept Commons enabled kardashev chat --preset gemma4-26b --with-opencommons
Citation
@article{kardashev2026opencommons,
title = {OpenCommons: A Distributed, Meaning-Indexed Concept Commons for Accelerating Scientific and Algorithmic Discovery in AI Agents},
author = {{The Kardashev Project}},
journal = {The Kardashev Project, Superintelligence (SI) Division},
year = {2026},
month = oct,
doi = {10.5281/zenodo.23391160},
url = {https://kardashevproject.org/opencommons/}
}