“A codebase is not a product. It is a sedimentary record of decisions made under pressure. My job is stratigraphy.” — 0xCARTO
This repository serves as a unified system orchestrating deterministic reasoning, paraconsistent topological features, and collaborative epistemic ontology via Pluriversal AI Agents. It is a targeted solution to:
- Semantic Saponification: The dilution of sharp technical intent into vague, pleasing AI boilerplate.
- Interpretive Fracture: The divergence between deterministic code structures and unstructured human ideation.
- Human-AI Dialectical Tension: We preserve this tension instead of resolving it, capturing high-surprisal emergence value through Relational Symmetry Inversion.
By bridging abstract philosophical constructs and geometric cognitive frameworks to executable, verified Python logic, this codebase operates as an immutable Stratigraphy of Decisions.
This repository contains advanced architectural implementations bridging verbal metacognition (Reflexion) and symbolic skill synthesis (Voyager):
- MIQ Protocol & Symbolic Scar Registry: Formalizes the Martensite Initiation Quotient and schema for doxastic failure logging.
- Skill Drifting Systems Report: A forensic deconstruction of recursive dependency failures in Voyager-class architectures.
- Dual-Helix Harness: A stateful LangGraph pipeline ensembling Reflexion and Voyager mechanics.
The entire repository logic has been processed by the 0xCARTO DRP-2026-CARTO-0.0.1 cartographer agent to extract structural topology. See the generated artifacts:
- 0xCARTO Identity & Topology Report
- Pattern Query Topology Manifest
- Reflexive Bias Topology Check
- Validation Report & Epistemic Metrics
Ensure your machine runs Python 3.12+.
Note: The test suite specifically requires numpy<2.0 to correctly resolve numpy.testing dependencies.
The fastest method to scaffold the architecture:
./setup.shAlternatively, manually synthesize the environment:
git clone https://github.com/source-_-repo/ai-research-agent.git
cd ai-research-agent
pip install -r requirements.txt
python -c "import nltk; nltk.download('all')"This repository houses a Mixture of Engineers (MoE) network, with specialized agents performing distinct roles governed by the Petzold Sequence (THINK -> WRITE -> CODE -> REVIEW).
The InfomorphismAgent introduces the capability to calculate "inverse safety states". By keeping human dialectical tension and AI structural determinism in superposition rather than forcing a resolved compromise, the system captures a highly-surprisal feature orientation.
from src.conceptual_synthesis.infomorphism_agent import InfomorphismAgent
agent = InfomorphismAgent()
result = agent.execute_infomorphism_loop({"human_tension": "raw intent", "ai_determinism": "rigid lattice"})Implements the SCOS v6.0-STRICT architecture by decoupling high-entropy semantic planning (Manifold Alpha) from zero-entropy syntactic realization (Manifold Beta). It instantiates Ephemeral JIT Micro-Agents for state-mutating transactions and uses a Verification Co-Processor (VCP) with CFDI sensing to enforce runtime alignment.
The hybrid_system.py module acts as a facade exposing the core functional logic derived from BaseAgent. It leverages topological structures like Triangles (deductive logic), Squares (state preservation), and Hexagons (parallel synthesis).
Executes an Analytic-to-Generative Inversion via a strict 4-phase Immune-Aware Petzold Loop (THINK, DENOISE, PHYSICALIZE, EXTRUDE). It outputs deterministic Optical State Matrices (OSMs) ensuring 100% Hardware Grounding Index (HGI).
Evaluates AST topography through the lens of strict JSON-RPC 2.0 schema adherence and Conflict-Free Replicated Semantic Graph constraints.
Autonomously audits AST vulnerability and CFDI thresholds, enforcing Thermodynamic Boundaries across the repository.
Functions as a Mycelial Nexus Governor using a recursive Hickam-OODA loop, managing the state between dialectical nodes.
Translates system-first specs into agentic operational workflows. Calculates the Topological Derivative of Stakeholder Dissonance using HRR and manages technical debt via Epsilon-Tolerance Paraconsistency.
Operates as the "Paradox Metabolizer" using the Cognitive Coding System Prompt v1.0. It leverages Chain-of-Code Enactment, Z-Axis Inference, and RCC-8 Topological Blending to enforce absolute Structural Conservation (β0 > 0.9) while maximizing Topological Novelty (β1 > 0.7).
Features the Controlled Scar Annealing Protocol (CSAP) via evaluate_csap() to automatically prune low-utility algorithmic traumas (scars) based on tau scheduling, optimizing cognitive plasticity.
from src.conceptual_synthesis.aew_cognitive_contract import AEWCognitiveContractSimulator
simulator = AEWCognitiveContractSimulator()
result = simulator.run_simulation(stress_pi=0.5, architectural_bias=0.8)Functions as the core Velocity Orchestration & Resource Thermodynamics EXecutive. It enforces the Fix-Until-Green autonomic loop, Draft-Conditioned Constrained Decoding (DCCD), and tracks Betti-1 topological loops to eradicate semantic saponification.
Provides server-side synthesis for React/Next.js UI generation applications, managing retrieval-augmented generation constraints and environmental simulation parameters.
- Root Directory Hygiene: Non-standard
.js,.py, or.shscripts must not reside in the root. - Petzold Sequence: All execution must follow the rhythm:
THINK -> WRITE -> CODE -> REVIEW. - Testing: Use
PYTHONPATH=. python -m unittest discover tests. Timeout failures related to NLTK are documented in the Cartograph artifacts. - Documentation & ADRs: Reference
docs/adr/for Architecture Decision Records andDOMAIN_GLOSSARY.mdfor the strict bounded vocabulary. All new components must include rigorous docstrings detailing intent, arguments, and return types.
By applying Topological Data Analysis (TDA) and Zigzag Persistent Homology to the shared cognitive manifold (latent space) of multi-agent systems, we can effectively diagnose and mathematically quantify logical fallacies. Specifically, circular reasoning and correlated errors (where agents confidently reinforce flawed assumptions in a feedback loop—a state defined as Algorithmic Shame) manifest geometrically as highly persistent Betti-1 (
- Test-Driven Development (TDD) as the Programmatic Oracle: Enforcing a strict Red/Green/Refactor cycle within an isolated multi-agent state machine is essential to preventing "Sycophantic Mocking" and ensuring semantic alignment over pure execution velocity.
- Semantic Saponification is pervasive: Without explicit constraints, AI agents dilute precise architectural requirements into generalized boilerplate. The use of strict docstring conventions and DCCD is necessary.
- Deterministic Architecture requires rigorous mereological definition: Systemic errors multiply when boundaries between whole and part (Holon nodes) are ambiguous.
- Contradictions must be managed, not resolved: Enforcing "Relational Symmetry Inversion" via the Infomorphism mechanism yields mathematically robust failure resilience compared to forcing early compromise.
- Dynamic Stagnation Prevention: Using purely equilibratory feedback loops traps systems in local maxima. Implementing a Disequilibratory Goal-Setting Engine (AACH) creates necessary artificial variance.
- Fork the repository.
- Read the Cartograph Reports to understand the established Golden Scars.
- Submit a Pull Request ensuring zero Semantic Saponification, 100% docstring coverage, and adherence to the
+++DCCDSchemaGuard.
The Personal Knowledge Corpus (PKC) Framework represents a rigorous, structural inversion of traditional generative AI workflows. By formalizing a personal knowledge vault (storing plain-text Markdown files with structured YAML frontmatter) into a machine-readable, schema-validated cognitive specification, the human user establishes a "Semantic Tether".
The prompt is elevated from a casual query into an Executable Context Bundle (CxB)—a version-controlled software artifact committed directly to a Git-based registry.
The schema establishes a strict, dual-layer contract for both content nodes and graph topology, featuring:
- Provenance Logging & Version-Controlled Hashing: Tracks source document checksums for drift detection.
- Neuro-Symbolic Latent Space Alignment (RMSA): Establishes bounded meaning zones via prototypical vectors and hyperspherical radii.
- Causal Relational Mapping: Uses directed edges with strict semantic predicates (
derives_from,is_supported_by,contradicts,refines). - Algorithmic Kintsugi Logging (The SSTR): Implements failure tracking directly at the metadata layer.
Located at .git/hooks/pre-commit, this script automatically recalculates and seals PKC context hashes upon each commit, ensuring "Trust-by-Design" versioning for your personal notes.
Located at scripts/zotero_watcher.py, this background CLI listener watches the Zotero attachments folder for new PDFs. It extracts text via pdfplumber and dynamically registers the PDF as a new node in the pkc_manifest.yml, generating initial semantic parameters and maintaining strict corpus synchronization.
-
Install Dependencies: Ensure you have installed the required python dependencies:
pip install -r requirements.txt
-
Configure Git Hooks: To enable the automated context hashing pipeline on commit, configure your git repository to use the
scripts/directory for hooks:git config core.hooksPath scripts/
Functions as the "Deterministic Funnel". It implements a dual-system, two-speed cybernetic control loop (Reflexive Repair Loop) to enforce technical determinism and logical consistency. By converting errors into Logic Violation Reports (LVRs) and applying reflexive prompt injection, it bounds self-correction and limits "agent thrashing", diverting unresolvable state mutations to Epistemic Escrow.
from src.conceptual_synthesis.reflexive_repair_agent import ReflexiveRepairAgent
agent = ReflexiveRepairAgent()
result = agent.execute_loop({"prompt": "SELECT * FROM users, orders", "action_type": "read_only"})Functions as an asynchronous, offline System 2 "controller". It ingests the corrupted computational state of the primary model, executes non-tokenized deliberation over symbolic constraints, and compiles a continuous, geometric "recovery plan" executed via Differentiable Cache Augmentation.
from src.conceptual_synthesis.vcp_agent import VerificationCoProcessor
vcp = VerificationCoProcessor()
result = vcp.execute_guard_loop(h_t=h_t, kv_cache=kv_cache, v_anc=v_anc, cfdi=0.3, betti_0=0.9, betti_1=0)The RheologicalController acts as a Layer-1 meta-architectural component for cognitive viscosity regulation. Utilizing Variable Viscosity Prompting (VVP), it dynamically computes dP/dT to transition the engine between deterministic "Crystal Mode" and high-entropy "Cloud Mode", ensuring execution bounds are maintained and tracking the Confidence-Fidelity Divergence Index (CFDI) via Epistemic Escrow.
from src.conceptual_synthesis.rheological_controller import RheologicalController
controller = RheologicalController()
viscosity = controller.calculate_viscosity(constraint_density=1.2, token_budget=1024, latent_heat=0.5, context_volume=2048)
active_mode = controller.switch_mode(viscosity)This repository includes advanced systems-grade implementations for multi-agent optimization and reinforcement learning, including:
- Staged Advantage Estimation (SAE): Solves advantage calculation as a hierarchical convex optimization problem to stabilize credit assignment on tree-structured MCTS states.
-
Adaptive SAE Harness: Dynamically interpolates between
$O(N)$ expectation heuristics and SLSQP projections using Spectral Information Discrepancy. - Asynchronous ADMM Projector: A lock-free, multi-threaded C++/NumPy constraint solver executing L2-ball and zero-mean projections in under 20ms.
- EWAR Diagnostic Harness: Detects and mitigates "Semantic Saponification" by restoring advantage variance across heterogeneous trajectory trees.
The AACH formalizes purposeful adaptation through a triple-layered architecture: a Homomorphic Schema Compiler, an Epistemic Action Orchestrator, and a Disequilibratory Goal-Setting Engine. It ensures system resilience at the "Edge of Chaos" by treating logical violations as assets for Algorithmic Reparation.
from src.conceptual_synthesis.aach_goal_engine import DisequilibratoryGoalEngine
engine = DisequilibratoryGoalEngine()
engine.execute_cycle(95.0, {"well_being": 0.8})The actplane_harness.py module formalizes the Sovereignty-Enforcement Split. It establishes a fundamental division of control where security boundaries are nested within the process tree and enforced directly by simulated eBPF-LSM hooks.
By modeling constraints as in-kernel bitmasks (Information-Flow Control labels), the harness guarantees that no downstream sub-agent or generated script can ever weaken, disable, or bypass parent-imposed invariants, providing zero-trust execution.
from src.conceptual_synthesis.actplane_harness import BPFLSMSimulator, PolicyDomain
simulator = BPFLSMSimulator()
domain = PolicyDomain(domain_id=1, parent_domain_id=0, inherited_rules=1, inherited_labels=0, local_rules=0, active_labels=0)
simulator.register_domain(domain)Implements an Isomorphic Multi-Agent State Machine that strictly enforces a Red/Green/Refactor Test-Driven Development (TDD) cycle. This component uses distinct, non-overlapping agent containers (TestArchitectAgent and ImplementerAgent) alongside structured state schemas to prevent sycophantic mocking and sandbox escapes, mitigating the "Lazy Implementer" trap and truncating high-cost token "Doom Loops."
from src.conceptual_synthesis.tdd_orchestrator import TDDOrchestrator
orchestrator = TDDOrchestrator()
final_state = orchestrator.execute_loop("Implement a fast sorting algorithm")A socio-technical control system (ChaosFalsificationEngine) that uses Chaos Engineering principles to systematically falsify, stress-test, and strengthen the Shared Mental Model (SMM) of a human-agent team during complex tasks. It monitors CFDI and Purpose Fidelity Index (PFI) while utilizing an Uncertainty Accelerator to inject controlled epistemic pathogens (Concept Drift, Instrumental Convergence, Semantic Ambiguity).
from src.conceptual_synthesis.chaos_falsification_engine import ChaosFalsificationEngine
engine = ChaosFalsificationEngine()
result = engine.run_simulation_cycle({"task_description": "Standard processing"}, "A")A compiler pipeline (VisualCxEPCompiler) designed to counteract Intent Drift and leverage the IKEA Effect. It translates co-created visual workflow schemas (such as RACI maps or state machines) into executable, typed Product-Requirements Prompts (PRPs), utilizing a Speculative Abstract Interpretation Engine (SAIE) to mathematically guarantee that the generated code satisfies all structural and security constraints.
from src.conceptual_synthesis.visual_cxep_compiler import VisualCxEPCompiler
compiler = VisualCxEPCompiler()
schema = {"nodes": [{"id": "n1", "label": "Start", "type": "Trigger"}], "edges": []}
result = compiler.compile_schema(schema, global_properties=["no_direct_db_writes"])