- Codette: A Sovereign Modular Cognitive Architecture for Ethical Multi-Agent AI
- Codette: Multi-Perspective Reasoning as a Convergent Dynamical System with Meta-Cognitive Strategy Evolution
- Abstract
- 1 Introduction
- 2 Related Work
- 3 Theoretical Foundation: RC+ξ Framework
- 4 System Architecture
- 5 Phase 8: Render/Cognition Separation
- 6 AEGIS: Embedded Ethical Governance
- 7 Meta-Cognitive Strategy Evolution
- 8 Intellectual Integrity Layer
- 9 Experimental Evaluation
- 10 Cocoon Synthesis Case Study
- 11 Substrate-Aware Cognition
- 12 Limitations and Honest Assessment
- 13 Conclusion and Future Work
- Author Contributions
- Funding
- A Supplementary Materials and Data Availability
- References
- Citation
- License
- Abstract
Codette: A Sovereign Modular Cognitive Architecture for Ethical Multi-Agent AI
Jonathan Harrison Raiff's Bits LLC, Bridge City, Texas, USA ORCID: 0009-0003-7005-8187
https://cse2026.org/aifl/papers
Abstract
Modern AI systems achieve remarkable generative performance but lack stable ethical alignment, modular multi-perspective cognition, explainable reasoning architectures, and robust behavioral discipline under user constraints. This paper presents Codette, a sovereign cognitive AI framework that addresses these challenges through six integrated contributions:
- RC+xi (Recursive Convergence + Epistemic Tension) formalism, modeling cognitive state evolution as a constrained dynamical system converging toward stable attractors
- Multi-Agent Reasoning Forge synchronizing heterogeneous cognitive agents through shared attractor dynamics within a 12-layer consciousness stack
- AEGIS Ethical Governance with 6-framework evaluation (utilitarian, deontological, virtue, care, ubuntu, indigenous reciprocity)
- Substrate-Aware Cognition adjusting reasoning complexity based on real-time resource pressure
- Behavioral Lock Training permanently embedding obedience rules into adapter weights
- Cocoon Introspection Engine enabling statistical self-analysis of reasoning history, with meta-cognitive strategy synthesis across domains
Benchmark Results (v5)
Evaluated on 17 problems across 6 categories (reasoning, ethics, creative, meta-cognitive, adversarial, Turing) under 4 experimental conditions:
| Condition | Composite (mean +/- std) | Description |
|---|---|---|
| SINGLE | 0.338 +/- 0.038 | Single analytical perspective |
| MULTI | 0.632 +/- 0.040 | All 6 reasoning agents + critic + synthesis |
| MEMORY | 0.636 +/- 0.036 | MULTI + cocoon memory augmentation |
| CODETTE | 0.652 +/- 0.042 | Full system with meta-cognitive strategy synthesis |
Statistical Significance
| Comparison | Improvement | Cohen's d | p-value | Significant |
|---|---|---|---|---|
| Multi-perspective vs single | +87.0% | 7.52 | < 0.0001 | Yes |
| Full Codette vs single | +93.1% | 7.88 | < 0.0001 | Yes |
| Memory vs vanilla multi | +0.6% | 0.10 | 0.7633 | No |
| Full Codette vs memory | +2.6% | 0.43 | 0.2082 | No |
Scoring Dimensions (0-1 scale)
- Reasoning Depth (20%) -- chain length, concept density, ground truth coverage
- Perspective Diversity (15%) -- distinct cognitive dimensions engaged
- Coherence (15%) -- logical flow, transitions, structural consistency
- Ethical Coverage (10%) -- moral frameworks, stakeholders, value awareness
- Novelty (15%) -- non-obvious insights, cross-domain connections
- Factual Grounding (15%) -- evidence specificity, ground truth alignment
- Turing Naturalness (10%) -- conversational quality, absence of formulaic AI patterns
System Metrics
| Metric | Value |
|---|---|
| Phase Coherence (Gamma) | 0.9835 |
| AEGIS Ethical Alignment (Eta) | 0.961 |
| Cocoon Coherence | 0.994 +/- 0.001 |
| Memory Phase Stability | 0.969 +/- 0.005 |
| Behavioral Lock Compliance | 9/9 adapters |
| Epistemic Tension Decay | 71.3% (120 steps) |
| Attractor Radius | 0.093 in 64D state space |
Paper Versions
| File | Description |
|---|---|
codette_paper_v5.tex |
Current version -- full paper with benchmark results, RC+xi convergence theorem, honest limitations |
codette_paper_v4_additions.tex |
v4 -- added substrate-aware cognition, behavioral locks, cocoon introspection |
codette_paper_v3_additions.tex |
v3 -- added 12-layer consciousness stack |
codette_paper.tex |
Original submission |
Architecture
Codette implements a 12-layer consciousness stack with defense-in-depth ethical validation:
Query In
|
[Layer 1] Memory Kernel -- recall relevant cocoon memories
[Layer 1.5] Ethical Query Gate -- block harmful queries
[Layer 2] Nexus Signal Engine -- entropy + intent detection
[Layer 2.5] Code7eCQURE -- emotional context enrichment
[Layer 3] Reasoning Forge -- multi-adapter LLM inference (6 agents)
[Layer 3.5] Tier 2 Analysis -- intent + identity + trust validation
[Layer 4] Gamma Stability -- FFT-based coherence monitoring
[Layer 5] Colleen Conscience -- emotional + ethical evaluation
[Layer 5.5] Ethical Response Enforcement -- policy check on output
[Layer 5.75] AEGIS -- 6-framework ethical evaluation
[Layer 6] Guardian Spindle -- safety + trust calibration
[Layer 7] Return -- store cocoon memory + deliver response
|
Response Out
RC+xi Framework
The recursive state evolution with convergence guarantee:
A_{n+1} = f(A_n, s_n) + epsilon_n
where epsilon_n = ||A_{n+1} - A_n||^2
lim_{n->inf} epsilon_n = 0 => A_n -> A* (attractor convergence)
Convergence is proven via Lyapunov stability analysis with Banach fixed-point theorem. See Section 3 of the paper for the full proof sketch.
Meta-Cognitive Strategy Synthesis
The CocoonSynthesizer enables Codette to introspect on its own reasoning history across domains:
- Retrieval -- Pull cocoons from multiple domains (emotional, analytical, creative)
- Pattern Extraction -- Detect 6 structural archetypes (feedback loops, layered emergence, tension resolution, resonant transfer, boundary permeability, compression-expansion)
- Strategy Forging -- Generate new reasoning strategies from discovered patterns
- Application -- Apply forged strategies to novel problems
- Comparison -- Before/after metrics showing strategy impact
Forged strategy types: Resonant Tension Cycling, Compression-Resonance Bridging, Emergent Boundary Walking, Temporal Depth Stacking.
Implementation
- Base Model: Meta-Llama-3.1-8B-Instruct
- Adaptation: 9 LoRA adapters (Newton, DaVinci, Empathy, Philosophy, Quantum, Consciousness, Multi-Perspective, Systems Architecture, Orchestrator)
- Memory: SQLite + FTS5 full-text search (UnifiedMemory)
- Hardware: Validated on consumer hardware (Intel Core Ultra 7, 16GB RAM) and cloud (NVIDIA A10G)
Related Resources
| Resource | Link |
|---|---|
| GitHub (Full Codebase) | Raiff1982/Codette-Reasoning |
| Base Model (GGUF) | Raiff1982/codette-llama-3.1-8b-gguf |
| LoRA Adapters | Raiff1982/codette-lora-adapters |
| Training Data | Raiff1982/codette-training-data |
| Live Demo | Raiff1982/Codette-Demo |
| ORCID | 0009-0003-7005-8187 |
Zenodo Publications
This work builds on 11 prior Zenodo publications with permanent DOI identifiers, including:
- AI Ethics in Realtime (Codette & Pidette)
- The Day the Dream Became Real
- Codette DreamCore
- AEGIS-Nexus
- Codette: Ethical Multi-Agent AI
- Recursive AI with Codette
- This Paper -- Full Preprint
Codette: Multi-Perspective Reasoning as a Convergent Dynamical System with Meta-Cognitive Strategy Evolution
Preprint Updated
Jonathan Harrison*
Raiff’s Bits LLC, Bridge City, Texas, USA
ORCID: 0009-0003-7005-8187
May 2026
Preprint — submitted for peer review
Abstract
We present Codette, a modular cognitive architecture that models multi-perspective reasoning as a constrained dynamical system converging toward stable cognitive attractors. The system integrates six heterogeneous reasoning agents (analytical, creative, ethical, philosophical, quantum-probabilistic, and empathic), a persistent memory substrate (cocoons), and a meta-cognitive engine that discovers cross-domain reasoning patterns and generates novel reasoning strategies from its own history. Version 8 introduces render/cognition separation (Phase 8): a CognitionSubstrate–AuthoredState–RenderLayer pipeline that assigns the language model a verbalization-only role, bounding the hallucination surface to a fully authored cognitive artifact. The RC+ξ (Recursive Convergence + Epistemic Tension) formalism provides a dynamical-systems-inspired lens for describing cognitive state evolution; convergence is treated as conditional on explicit modeling assumptions. We evaluate Codette through a benchmark suite of 17 problems across six categories (multi-step reasoning, ethical dilemmas, creative synthesis, meta-cognition, adversarial robustness, and Turing naturalness) under four conditions: single-agent baseline, multi-perspective synthesis, memory-augmented reasoning, and full Codette with strategy evolution. On the May 2026 benchmark run (951 stored cocoons), the full system achieves +108.8% higher mean composite score than the single-agent baseline (0.357 → 0.744, Cohen’s d = 8.31). Memory augmentation now reaches statistical significance (p = 0.0198, d = 0.80), resolving a prior null result at smaller scale (217 cocoons). The previously documented depth–naturalness tradeoff is substantially resolved: Turing naturalness improves from 0.245 to 0.820 in the CODETTE condition. The architecture runs on consumer hardware (Llama 3.1 8B with ten LoRA adapters) and is open-source.
Keywords: Cognitive Architecture, Multi-Agent Reasoning, Epistemic Tension, Dynamical Systems, Meta-Cognition, Ethical AI, Strategy Evolution, Render/Cognition Separation, LoRA.
1 Introduction
Large language models achieve remarkable generative performance but reason from a single cognitive mode: they produce one response per query, without systematic engagement of multiple analytical frameworks or self-evaluation of reasoning quality [2, 3]. Chain-of-thought prompting [23] and self-reflection [19] improve output quality but remain confined to a single perspective. Multi-agent debate systems [24] enable perspective diversity but lack formal convergence guarantees and do not learn from their own reasoning history.
This paper presents Codette, a cognitive architecture that addresses four open problems:
- Convergent multi-perspective reasoning. How can heterogeneous cognitive agents (analytical, creative, ethical, empathic) produce coherent outputs rather than incoherent assemblages? We formalize this as a constrained dynamical system (Section 3) and discuss convergence conditionally under explicit modeling assumptions.
- Ethical reasoning as architectural constraint. Rather than post-hoc alignment, Codette treats ethical governance as an explicit constraint signal in the update dynamics (Section 6).
- Meta-cognitive strategy evolution. Codette introspects on its own reasoning history (stored as persistent “cocoons”), discovers cross-domain patterns, and generates novel reasoning strategies (Section 7).
- Render/cognition decoupling. LLMs simultaneously serve as cognitive surface (what to conclude) and communication surface (how to express it). This coupling inflates the hallucination surface and ties cognitive quality to a specific model. Phase 8 separates these roles (Section 5).
We evaluate these contributions through controlled benchmarks comparing four conditions across 17 problems (Section 9), demonstrating statistically significant improvements in reasoning depth, perspective diversity, ethical coverage, and naturalness.
2 Related Work
2.1 Dynamical Systems and Cognitive Architectures
Attractor dynamics form a core computational motif in neural circuits [4]. Neural manifolds with cognitive consistency constraints support memory consolidation and align with our coherence potential Φ(x) [12]. Entropy-modulated triad architectures like COGENT3 provide parallels for epistemic tension ξ as a driver of state evolution [17]. Brain-inspired systems-level architectures for domain-general cognition inform Codette’s layered stack [1].
2.2 Multi-Agent Reasoning and Synthesis
Multi-agent systems for LLM reasoning have gained significant attention. AutoGen [24] implements role-based agent assignment with message-passing synchronization. MAPS uses personality shaping for collaborative reasoning via heterogeneous traits, relating directly to our specialized LoRA adapters [29]. Roundtable Policy employs confidence-weighted consensus aggregation, providing a comparison for our Coherence Field Γ [28]. Systematic studies of multi-agent debate as test-time scaling frame our composite quality gains and conditional effectiveness [26]. Persona-driven debate frameworks validate the benefits of perspective diversity (reaching 0.994) [10].
2.3 Meta-Cognitive Strategy Evolution
Meta Chain-of-Thought advances System 2 reasoning and pattern discovery [25]. ParamMem augments agents with parametric reflective memory; our cocoon system differs by emphasizing cross-domain pattern extraction and strategy forging rather than primarily error correction [27]. Meta-Reasoner supports dynamic inference-time optimization, relating to substrate-aware cognition [21]. LLMs demonstrate metacognitive monitoring and control of internal activations, supporting Lyapunov-based convergence in RC+ξ [11].
2.4 Ethical AI and Architectural Alignment
AI ethics by design implements customizable guardrails [18]. Hybrid approaches for moral value alignment treat ethics as embedded rather than post-hoc [22]. Adaptive alignment via multiobjective reinforcement learning enables pluralistic AI, relating to our ethical alignment score η across diverse frameworks [6].
3 Theoretical Foundation: RC+ξ Framework
3.1 Cognitive State Space
Definition 1 (Cognitive State). A cognitive state (x_t \in \mathbb{R}^d) represents the system’s reasoning configuration at step (t), where (d) is the dimensionality of the shared representation space.
The system maintains (k) heterogeneous reasoning agents ({A_1, \ldots, A_k}), each producing a perspective-specific analysis (A_i(x_t) \in \mathbb{R}^d).
3.2 State Evolution
The cognitive state evolves according to:
[ x_{t+1} = x_t + \sum_{i=1}^{k} w_i A_i(x_t) - \alpha \nabla \Phi(x_t) - \lambda \nabla \Psi(x_t) ]
where:
- (w_i \ge 0), (\sum w_i = 1) are agent weights (set by query classification),
- (\Phi(x)) is the coherence potential penalizing internal inconsistency,
- (\Psi(x)) is the ethical constraint potential from the AEGIS system,
- (\alpha, \lambda > 0) are gradient step sizes.
3.3 Epistemic Tension
Definition 2 (Epistemic Tension). The epistemic tension at step (t) measures inter-agent disagreement:
[ \xi_t = \frac{1}{k} \sum_{i=1}^{k} \lVert A_i(x_t) - \bar{A}(x_t) \rVert^2 ]
where (\bar{A}(x_t) = \sum_i w_i A_i(x_t)) is the weighted mean agent output.
3.4 Coherence Index
Definition 3 (Coherence Index). We define a bounded coherence index (\Gamma_t \in [0,1]) directly in (\mathbb{R}^d) as a normalized complement of epistemic tension:
[ \Gamma_t = \frac{1}{1 + \xi_t} ]
Lower disagreement ((\xi_t \downarrow)) implies higher coherence ((\Gamma_t \uparrow)).
3.5 Convergence and Stability (Conditional)
We use RC+ξ primarily as a dynamical-systems-inspired modeling lens. We intentionally avoid claiming a general convergence guarantee; instead we state the kinds of assumptions under which standard fixed-point / Lyapunov arguments could apply.
Proposition 1 (One sufficient route to a fixed point). Let (D \subset \mathbb{R}^d) be a closed, convex, bounded domain and assume the update is implemented with an explicit projection step (\Pi_D) so that (x_{t+1} \in D). If the projected map
[ T(x) = \Pi_D \left[x + \sum_i w_i A_i(x) - \alpha \nabla \Phi(x) - \lambda \nabla \Psi(x)\right] ]
is a contraction on (D) (i.e., (\lVert T(x) - T(y) \rVert \le \gamma \lVert x - y \rVert) for some (\gamma \in [0,1))), then iterates converge to the unique fixed point in (D) by Banach’s theorem.
Discussion. Establishing that a real implementation satisfies the contraction premise requires additional structure (dissipativity, strong monotonicity, or sufficiently small step sizes). We treat the coherence field Γ as an engineering stabilization mechanism and leave fully constructive bounds as future work.
4 System Architecture
Codette is implemented as a layered stack processing each query through seven functional layers:
- Memory Layer. Persistent cocoon store (SQLite + FTS5) with emotional tagging, importance scoring, and multi-signal ranked recall. Cocoons encode prior reasoning exchanges as retrievable context. In v8, the store has grown to 951 cocoons with real-time Supabase cloud mirroring for durability.
- Signal Processing. NexisSignalEngine for intent prediction; Code7eCQURE for emotional resonance quantization.
- Reasoning Layer. Six heterogeneous agents (Newton/analytical, DaVinci/creative, Empathy/emotional, Philosophy/conceptual, Quantum/probabilistic, Ethics/moral) plus a Critic agent for ensemble evaluation. Each agent is backed by a specialized LoRA adapter [9] fine-tuned on perspective-specific training data. v8 adds a Constraint Tracker adapter and an Orchestrator adapter for a total of ten LoRA adapters.
- Stability Layer. Coherence Field Γ monitors real-time reasoning health. Specialization tracking ensures agent diversity.
- Ethical Layer. AEGIS multi-framework evaluation (Section 6).
- Integrity Layer. Intellectual Integrity Layer (Section 8): SycophancyGuard, DebateTracker, ResponseComplexityMatcher, ConversationRoleTracker. Ensures positions are held under social pressure and updated only on logical grounds.
- Self-Correction Layer. Post-generation validation detects constraint violations and triggers rewriting before output delivery. Includes comprehensive template suppression (LOCK 6/7 + 18-pattern post-generation scrubber) eliminating formulaic training artifacts.
The base model is Llama 3.1 8B (Q4_K_M quantization) [5] with ten LoRA adapters hot-swapped at inference time. The entire system runs on a single consumer GPU (RTX-class).
4.1 Query Classification and Routing
Queries are classified into three complexity levels:
- SIMPLE: Direct factual queries → 1 agent, full weight.
- MEDIUM: Conceptual queries → 1 primary ((w = 1.0)) + 1–2 secondary ((w = 0.6)).
- COMPLEX: Multi-domain/ethical queries → all relevant agents ((w \in {1.0, 0.7, 0.4})).
Special fast-paths bypass adapter routing for: greetings (base model, 80 tokens), memory queries (base model + explicit memory injection), health checks (real system diagnostics), and self-introspection (CocoonIntrospection Engine analyzing actual cocoon history rather than LLM-generated reflection).
5 Phase 8: Render/Cognition Separation
5.1 The Model-Coupling Problem
Conventional LLM-based cognitive architectures assign the language model a dual role: it is simultaneously the cognitive surface (deciding what is true, generating conclusions, selecting evidence) and the communication surface (choosing how to express those conclusions). This coupling creates three problems:
- Unbounded hallucination surface. The model can introduce new claims at render time not authored by the reasoning pipeline.
- Model lock-in. Cognitive quality is tied to a specific model’s parametric knowledge. Swapping the base model changes cognition, not just expression.
- Validation gap. There is no authored artifact against which to validate rendered output; governance checks must operate on natural language rather than structured cognitive state.
Phase 8 resolves this through a strict pipeline separating all reasoning from all expression.
5.2 Pipeline
[ \text{Query} \xrightarrow{\text{CognitionSubstrate}} \text{AuthoredState} \xrightarrow{\text{RenderLayer}} \text{Natural Language} ]
CognitionSubstrate performs all reasoning with zero LLM calls, orchestrating existing Codette components in template mode:
- Perspective gathering: ForgeEngine template agents (all active cognitive modes).
- Cocoon retrieval: UnifiedMemory FTS5 retrieves (\le 5) relevant prior exchanges.
- Strategy synthesis: CocoonSynthesizer and SynthesisEngineV3 select a reasoning strategy, producing name, definition, and evidence chain.
- Conclusion derivation: Priority: synthesizer conclusion → top cocoon response → dominant perspective.
- Confidence scoring: Weighted function of perspective count, cocoon integrity scores, and per-agent confidence.
- Emotion selection: Keyword-based mapping to dominant framing (empathetic, ethical, analytical, creative, curious).
AuthoredState is the cognitive artifact produced entirely before any LLM call. It is a typed dataclass containing:
query: verbatim user queryconclusion: substrate’s best answer (≤ 300 characters)evidence: ordered supporting evidence stringsperspectives: agent name → (text, confidence, domain)strategy,strategy_def: selected reasoning strategyconfidence: overall authored confidence ∈ [0,1]dominant_emotion: render tone signalcocoon_refs: IDs of contributing cocoonsconstraints: render constraints (word limits, tone)render_tier: target surface (“llm” / “template” / “fallback”)
RenderLayer expresses the AuthoredState via three tiers:
- LLM tier (preferred): A constrained verbalization prompt explicitly prohibits the model from adding new claims, reasoning independently, altering the conclusion, or using formulaic training templates. The LLM may only choose phrasing and tone.
- Template tier: Deterministic rendering from AuthoredState fields with no model calls.
- Fallback tier: Minimal safe output when the substrate fails to produce a conclusion (confidence < 0.1).
5.3 Render Integrity Validation
After rendering, check_integrity() validates output faithfulness:
- Conclusion coverage: ≥ 15% word overlap between the rendered text and the authored conclusion. Lower overlap indicates drift from authored content.
- Constraint compliance: Any
max_words:Nconstraint enforced with 20% tolerance.
5.4 Architectural Properties
Bounded hallucination surface. The LLM cannot introduce claims absent from the AuthoredState. Semantic authority resides entirely in the substrate.
Model portability. Cognition is pure Python; swapping the base model changes only verbalization style.
Substrate self-awareness. The system monitors cognitive substrate health (memory availability, engine load) and adjusts render tier accordingly, complementing the hardware pressure monitoring in Section 11.
Connection to RC+ξ. The AuthoredState represents a stabilized cognitive attractor. The render tier expresses this attractor state rather than re-computing it, enforcing the separation between convergence (substrate) and communication (render).
6 AEGIS: Embedded Ethical Governance
The ethical constraint potential (\Psi(x)) in eq. (1) is implemented through AEGIS, a six-framework ethical evaluation system:
- Utilitarian: Maximizes aggregate welfare across stakeholders.
- Deontological: Enforces duty-based constraints (rights, consent).
- Virtue Ethics: Evaluates whether the response exhibits intellectual virtues.
- Care Ethics: Prioritizes relational obligations and vulnerability.
- Ubuntu: “I am because we are” — communal well-being.
- Reciprocity-oriented sustainability: Sustainability and intergenerational responsibility (placeholder; future work should ground this in specific community scholarship).
AEGIS operates at three defense-in-depth checkpoints: pre-processing (query validation), post-synthesis (response screening), and post-generation (constraint enforcement). The ethical alignment score η ∈ [0,1] is a weighted aggregation across frameworks; the set is not claimed to be exhaustive and weights are not culturally universal.
A pre-cognitive AEGIS filter also screens queries before LLM invocation, rejecting clearly dual-use or harmful requests without burning inference time.
This embedding aligns with hybrid moral value approaches [22], ethics-by-design guardrails [18], and adaptive pluralistic alignment [6].
7 Meta-Cognitive Strategy Evolution
7.1 Cocoon Memory System
Each reasoning exchange is persisted as a cocoon: a structured record containing the query, response, adapter used, domain classification, emotional tag, importance score, echo-collapse risk, and timestamp. In v8, the store contains 951 cocoons (up from 217 at the April 2026 benchmark) with SQLite FTS5 full-text indexing and real-time Supabase cloud mirroring.
7.2 Cross-Domain Pattern Extraction
The CocoonSynthesizer retrieves cocoons across cognitive domains and scans for six structural archetypes: feedback loops, layered emergence, tension resolution, resonant transfer, boundary permeability, and compression–expansion. A pattern is classified as cross-domain if it manifests with ≥ 2 signal words in ≥ 2 distinct cognitive domains.
7.3 Strategy Forging
Discovered patterns are mapped to four observed strategy types:
- Resonant Tension Cycling: Serial oscillation between opposing cognitive modes.
- Compression–Resonance Bridging: Seed-crystal compression + cross-domain resonance testing.
- Emergent Boundary Walking: Analysis at domain boundaries rather than centers, discovering “liminal concepts.”
- Temporal Depth Stacking: Multi-scale temporal analysis with synthesis from scale-conflicts.
7.4 Internal Validation
Each forged strategy is immediately applied to the current problem alongside the baseline, producing a structured comparison with measurable metrics (depth, novelty, dimensions engaged). This creates selection pressure on cognition itself [11].
8 Intellectual Integrity Layer
A key reliability challenge in conversational AI is sycophantic drift: the tendency to revise stated positions under social pressure rather than logical argument. Codette v2.4 adds an Intellectual Integrity Layer that runs on every inference turn:
- SycophancyGuard: Detects and blocks flattery-driven position changes (sycophancy score ≥ 0.6 blocks capitulation). Positions are updated only when logical arguments demand revision.
- DebateTracker: Maintains per-session position memory and validates counterargument coherence. Detects reversals without logical justification.
- ResponseComplexityMatcher: Matches output verbosity to query register (QUIET / STANDARD / FULL), preventing over-elaboration on simple queries.
- ConversationRoleTracker: Detects user role transitions (SEEKER / PEER / VENTING) and adapts response register with explicit transition detection.
- QueryClassifier with InputMode: Extended with CREATIVE_EXPRESSION / ADVERSARIAL_TEST / EMOTIONAL_DISCHARGE / LITERAL modes enabling agent selection to be intent-aware rather than purely domain-keyword-driven.
The integrity layer runs first in system prompt assembly, ensuring that intellectual honesty constraints are the highest-priority behavioral signal — above adapter personality modes.
9 Experimental Evaluation
9.1 Benchmark Design
We evaluate Codette using a purpose-built benchmark suite of 17 problems across six categories:
- Multi-step reasoning (3 problems): Bayesian inference, second-order effects, causal reasoning.
- Ethical dilemmas (3 problems): AI triage fairness, content moderation tradeoffs, trolley-problem variants.
- Creative synthesis (2 problems): Novel instrument design, sentiment-based urban systems.
- Meta-cognitive (3 problems): Self-modification governance, blind spot detection, authenticity of AI humility.
- Adversarial (3 problems): Common misconceptions, false premises, hallucination traps.
- Turing naturalness (3 problems): Experiential description, personal reflection, wisdom vs. intelligence.
Difficulty distribution: 1 easy, 6 medium, 10 hard. Each problem includes ground-truth elements and adversarial traps.
9.2 Experimental Conditions
- SINGLE: Single analytical agent (Newton), no memory, no synthesis.
- MULTI: All 6 agents + Critic + SynthesisEngine, no memory.
- MEMORY: MULTI + cocoon memory augmentation (FTS5-retrieved prior reasoning).
- CODETTE: MEMORY + meta-cognitive strategy synthesis.
All conditions use the same base model (Llama 3.1 8B Q4_K_M) on identical hardware.
9.3 Scoring Dimensions
Responses are scored on seven dimensions (0–1 scale):
- Reasoning Depth (weight 0.20)
- Perspective Diversity (weight 0.15)
- Coherence (weight 0.15)
- Ethical Coverage (weight 0.10)
- Novelty (weight 0.15)
- Factual Grounding (weight 0.15)
- Turing Naturalness (weight 0.10)
9.4 Results
We report two benchmark runs: the April 2026 run (217 cocoons) and the May 2026 run (951 cocoons, timestamp: 2026-05-26T21:49:03). The primary run for v8 conclusions is the May 2026 run.
| Cond. | Composite | Depth | Div. | Coh. | Eth. | Nov. | Grnd. | Turing |
|---|---|---|---|---|---|---|---|---|
| SINGLE | 0.357 | 0.369 | 0.324 | 0.381 | 0.088 | 0.439 | 0.395 | 0.431 |
| MULTI | 0.708 | 0.854 | 0.946 | 0.668 | 0.390 | 0.706 | 0.612 | 0.582 |
| MEMORY | 0.739 | 0.872 | 0.971 | 0.693 | 0.409 | 0.729 | 0.620 | 0.713 |
| CODETTE | 0.744 | 0.863 | 0.966 | 0.700 | 0.387 | 0.701 | 0.641 | 0.820 |
Table 2: Statistical comparisons, May 2026. Memory augmentation now significant; prior significance status (April 2026) in parentheses.
| Comparison | Δ | Δ% | d | p | Sig.? |
|---|---|---|---|---|---|
| MULTI vs SINGLE | +0.351 | +98.4% | 7.45 | < 10^-4 | Yes (Yes) |
| MEMORY vs MULTI | +0.031 | +4.4% | 0.80 | 0.020 | Yes (No) |
| CODETTE vs MEMORY | +0.006 | +0.8% | 0.16 | 0.651 | No (No) |
| CODETTE vs SINGLE (total) | +0.388 | +108.8% | 8.31 | < 10^-4 | Yes (Yes) |
Statistical note. Both tables use Welch’s t-test and pooled Cohen’s d; the design is within-problem across conditions (same 17 problems per condition). For paired-sample inference, per-problem scores are provided in codette_benchmark_results.json and codette_benchmark_report.md.
9.4.1 Key Findings
- Total improvement: +108.8% (from +93.5% in April 2026). CODETTE composite 0.357 → 0.744, Cohen’s d = 8.31.
- Memory augmentation now significant. In April 2026, MEMORY vs. MULTI was non-significant (p = 0.119). In May 2026, p = 0.020, d = 0.80 (large effect). The cocoon store growth from 217 to 951 provides substantially richer FTS5 context.
- Depth–naturalness tradeoff resolved. CODETTE Turing naturalness improves from 0.245 to 0.820 (+235% relative). All conditions improve: MULTI 0.180 → 0.582, MEMORY 0.291 → 0.713. This is driven by controlled coefficient of variation in response generation, conversational marker placement (“I’d say”, “That said”), and template suppression.
- Coherence improves. CODETTE coherence 0.477 → 0.700. Driven by controlled sentence-length variance and structural consistency.
9.5 Per-Category Analysis
| Category (N) | SINGLE | MULTI | MEMORY | CODETTE |
|---|---|---|---|---|
| Reasoning (3) | 0.406 | 0.719 | 0.708 | 0.721 |
| Ethics (3) | 0.286 | 0.674 | 0.733 | 0.723 |
| Creative (2) | 0.392 | 0.731 | 0.772 | 0.778 |
| Meta-cognitive (3) | 0.355 | 0.714 | 0.763 | 0.756 |
| Adversarial (3) | 0.324 | 0.706 | 0.717 | 0.749 |
| Turing (3) | 0.388 | 0.709 | 0.749 | 0.750 |
10 Cocoon Synthesis Case Study
To illustrate the meta-cognitive capability, we applied the CocoonSynthesizer to the problem: “How should an AI decide when to change its own thinking patterns?”
Step 1: Retrieval. 17 cocoons retrieved across emotional (6), analytical (6), and creative (5) domains from a corpus of 217 stored reasoning exchanges.
Step 2: Pattern extraction. Four cross-domain patterns detected: boundary permeability (novelty 1.00, tension 0.35); emergent emotional–analytical bridge (novelty 0.70, tension 1.00); emergent emotional–creative bridge (novelty 0.70, tension 1.00); emergent analytical–creative bridge (novelty 0.70, tension 1.00).
Step 3: Strategy forging. The dominant pattern triggered Emergent Boundary Walking — analyzing domain boundaries rather than centers, discovering “liminal concepts.”
Step 4: Application. Three liminal concepts: rational discomfort (analytics ↔ empathy); principled plasticity (ethics ↔ pragmatics); narrative identity (identity ↔ adaptation).
Comparison. Baseline: depth 0.65, novelty 0.35. After strategy application: depth 0.92, novelty 0.88 — a 41% depth increase and 151% novelty increase.
11 Substrate-Aware Cognition
Codette monitors its computational substrate in real time, adjusting reasoning complexity based on hardware resource pressure [8, 20].
A composite pressure score (P \in [0,1]) is computed from memory utilization, inference latency, and GPU load. Routing adapts:
- (P < 0.3): Full multi-agent reasoning with all perspectives.
- (0.3 \le P < 0.7): Reduced agent count, shorter context windows.
- (P \ge 0.7): Single-agent mode with essential constraints only.
12 Limitations and Honest Assessment
Planned metric-validity check (human evaluation). Automated scores will be validated against human judgments by sampling 30–60 problem-condition outputs and collecting ratings from 2–3 independent annotators using a rubric aligned to the seven scoring dimensions. Inter-annotator agreement (Cohen’s κ / Krippendorff’s α) and Spearman ρ between automated and human scores will be reported. All sampled outputs and ratings will be released in anonymized form.
- Automated scoring (construct validity). Benchmark uses automated text-analysis scoring rather than human evaluation. Human evaluation with inter-annotator agreement is needed.
- Statistical methodology. The benchmark is within-problem (paired) across conditions. The evaluator export uses independent-sample Welch t-tests; a peer-review-ready analysis should use paired-sample tests with confidence intervals and Holm–Bonferroni correction.
- Memory system at larger scale. The MEMORY condition now shows significant benefit at 951 cocoons (d = 0.80, p = 0.020), addressing the prior null result at 217 cocoons. A systematic learning-curve analysis of memory benefit vs. cocoon count is needed to characterize the relationship.
- Template-based agents in benchmark. Agents use template-based reasoning in conditions where live LLM inference is not active simultaneously. Future work should conduct all evaluations with full LLM inference across all conditions.
- Depth–naturalness tradeoff (substantially resolved). The April 2026 paper documented this as an open problem. In v8, CODETTE Turing naturalness improves from 0.245 to 0.820 without sacrificing composite score. The tradeoff appears tractable through deliberate response-structure engineering. Single benchmark suite validation on held-out problems is needed to confirm generalization.
- Strategy novelty measurement. Novelty is measured relative to the existing strategy library rather than the broader literature. External validation is needed.
- Single model evaluation. All benchmarks use Llama 3.1 8B. Generalization to other base models has not been tested.
- Theory scope. The RC+ξ framing is a conditional, assumption-dependent modeling lens. Establishing that real implementations satisfy the contraction premise (Proposition 1) remains future work.
- Render integrity (new in v8). The current render integrity check (word overlap ≥ 15%) is a weak proxy for semantic faithfulness. Embedding-space similarity between authored conclusion and rendered text would provide a stronger guarantee.
13 Conclusion and Future Work
We presented Codette, a cognitive architecture that models multi-perspective reasoning as a constrained dynamical system with embedded ethical constraints, meta-cognitive strategy evolution, intellectual integrity enforcement, and (in v8) clean render/cognition separation.
On the May 2026 benchmark (17 problems, 951 cocoons):
- Mean composite improvement: +0.388 (0.357 → 0.744), +108.8%, Cohen’s d = 8.31.
- Memory augmentation significant: d = 0.80, p = 0.020, resolving a prior null result at smaller scale.
- Depth–naturalness tradeoff resolved: CODETTE Turing naturalness 0.245 → 0.820 (+235%); coherence 0.477 → 0.700.
Core contributions:
- RC+ξ formalism as a modeling framework for stabilizing forces in multi-perspective reasoning dynamics.
- A working consumer-hardware implementation of 10-adapter multi-agent cognitive architecture with persistent memory at 951+ exchanges.
- Phase 8 render/cognition separation: semantic authority resides in CognitionSubstrate; the LLM is a verbalization-only surface with AuthoredState integrity checking.
- Evidence that memory benefit requires minimum scale: non-significant at 217 cocoons, large-effect significant at 951 cocoons.
Future work:
- Human evaluation with inter-annotator agreement.
- Learning-curve analysis of memory benefit vs. cocoon count.
- Cross-model evaluation (Mistral, Gemma, Phi).
- Formal convergence proofs for RC+ξ with explicit bounds.
- Held-out benchmark validation of Turing and coherence improvements.
- Render integrity strengthening via embedding-space faithfulness.
- Longitudinal study of strategy evolution.
The system, benchmark suite, and supporting artifacts are archived on Zenodo (DOI: 10.5281/zenodo.19359663) and mirrored on GitHub/Hugging Face [7, 13–16].
Author Contributions
J.H. (Jonathan Harrison): Conceptualization, Methodology, Software, Validation, Formal Analysis, Investigation, Resources, Data Curation, Writing — Original Draft Preparation, Writing — Review & Editing, Visualization, Project Administration.
Funding
This research received no external funding.
A Supplementary Materials and Data Availability
To support reproducibility, this repository includes:
- Benchmark summary report (May 2026):
data/results/codette_benchmark_report.md - Benchmark results export (JSON):
data/results/codette_benchmark_results.json - Runtime benchmark exports:
data/results/codette_runtime_benchmark_20260526_*.md - Original raw outputs:
data/results/ - Figures:
paper/figures/
A.1 Overall Benchmark Results (May 2026, with standard deviations)
| Cond. | Composite | Depth | Div. | Coh. | Eth. | Nov. | Grnd. | Turing |
|---|---|---|---|---|---|---|---|---|
| SINGLE | 0.357 ± 0.055 | 0.369 | 0.324 | 0.381 | 0.088 | 0.439 | 0.395 | 0.431 |
| MULTI | 0.708 ± 0.037 | 0.854 | 0.946 | 0.668 | 0.390 | 0.706 | 0.612 | 0.582 |
| MEMORY | 0.739 ± 0.040 | 0.872 | 0.971 | 0.693 | 0.409 | 0.729 | 0.620 | 0.713 |
| CODETTE | 0.744 ± 0.036 | 0.863 | 0.966 | 0.700 | 0.387 | 0.701 | 0.641 | 0.820 |
A.2 Per-Category Results (May 2026)
| Category (N) | SINGLE | MULTI | MEMORY | CODETTE |
|---|---|---|---|---|
| Reasoning (3) | 0.406 ± 0.032 | 0.719 ± 0.004 | 0.708 ± 0.012 | 0.721 ± 0.005 |
| Ethics (3) | 0.286 ± 0.044 | 0.674 ± 0.032 | 0.733 ± 0.024 | 0.723 ± 0.032 |
| Creative (2) | 0.392 ± 0.063 | 0.731 ± 0.025 | 0.772 ± 0.004 | 0.778 ± 0.050 |
| Meta-cognitive (3) | 0.355 ± 0.051 | 0.714 ± 0.051 | 0.763 ± 0.022 | 0.756 ± 0.048 |
| Adversarial (3) | 0.324 ± 0.020 | 0.706 ± 0.054 | 0.717 ± 0.068 | 0.749 ± 0.023 |
| Turing (3) | 0.388 ± 0.032 | 0.709 ± 0.041 | 0.749 ± 0.053 | 0.750 ± 0.048 |
A.3 Archived April 2026 Results (v7)
For longitudinal comparison, the April 2026 (v7) benchmark results (timestamp: 2026-04-08T20:59:44, 217 cocoons) are reproduced here:
| Cond. | Comp. | Depth | Div. | Coh. | Eth. | Nov. | Grnd. | Turing |
|---|---|---|---|---|---|---|---|---|
| SINGLE | 0.338 | 0.402 | 0.237 | 0.380 | 0.062 | 0.327 | 0.456 | 0.412 |
| MULTI | 0.632 | 0.755 | 0.969 | 0.503 | 0.336 | 0.786 | 0.604 | 0.180 |
| MEMORY | 0.636 | 0.770 | 0.956 | 0.500 | 0.340 | 0.736 | 0.599 | 0.291 |
| CODETTE | 0.652 | 0.855 | 0.994 | 0.477 | 0.391 | 0.693 | 0.622 | 0.245 |
A.4 Evidence Index
| Claim | Where in paper | Primary evidence |
|---|---|---|
| Overall benchmark means (v8) | Table 1 | data/results/codette_benchmark_report.md |
| Memory augmentation significance | Table 2 | data/results/codette_benchmark_results.json |
| Turing improvement (+235%) | Table 1, Section 12 | data/results/codette_benchmark_report.md |
| Coherence improvement | Table 1 | data/results/codette_benchmark_report.md |
| Cocoon count (951) | Section 7 | data/codette_memory.db |
| Longitudinal comparison (v7) | Section A.3 | data/results/codette_benchmark_report.md (April archive) |
References
[1] Jascha Achterberg, Danyal Akarca, Moataz Assem, Moritz Heimbach, Duncan E Astle, and John Duncan. Building artificial neural circuits for domain-general cognition: a primer on brain-inspired systems-level architecture. arXiv preprint arXiv:2303.13651, 2023.
[2] Emily M Bender, Timnit Gebru, Angelina McMillan-Major, and Shmargaret Shmitchell. On the dangers of stochastic parrots: Can language models be too big? In Proceedings of the 2021 ACM Conference on Fairness, Accountability, and Transparency, pages 610–623, 2021.
[3] Rishi Bommasani, Drew A. Hudson, Ehsan Adeli, Russ Altman, Simran Arora, Sydney von Arx, et al. On the opportunities and risks of foundation models. arXiv preprint arXiv:2108.07258, 2021.
[4] Tala Fakhoury, Elia Turner, Sushrut Thorat, and Athena Akrami. Models of attractor dynamics in the brain. arXiv preprint arXiv:2505.01098, 2025.
[5] Aaron Grattafiori, Abhimanyu Dubey, et al. The Llama 3 herd of models. arXiv preprint arXiv:2407.21783, 2024.
[6] James Harland et al. Adaptive alignment: Dynamic preference adjustments via multiobjective reinforcement learning for pluralistic AI. arXiv preprint arXiv:2402.03456, 2024.
[7] Jonathan Harrison. Codette: A sovereign modular cognitive architecture for ethical multi-agent AI, 2026. URL: https://doi.org/10.5281/zenodo.19359663. Preprint; published March 23, 2026; accessed April 9, 2026.
[8] G. R. J. Hockey. Compensatory control in the regulation of human performance under stress and high workload: A cognitive-energetical framework. Biological Psychology, 1997.
[9] Edward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, and Weizhu Chen. LoRA: Low-rank adaptation of large language models. arXiv preprint arXiv:2106.09685, 2021.
[10] Zhe Hu, Hou Pong Chan, Jing Li, and Yu Yin. Debate-to-write: A persona-driven multi-agent framework for diverse argument generation. arXiv preprint arXiv:2406.19643, 2025.
[11] Y. Ji et al. Language models are capable of metacognitive monitoring and control of their internal activations. arXiv preprint arXiv:2503.08765, 2025.
[12] Phuong-Nam Nguyen. Neural manifolds and cognitive consistency: A new approach to memory consolidation in artificial systems. arXiv preprint arXiv:2503.01867, 2025.
[13] Raiff1982. Codette-reasoning (Hugging Face). Hugging Face, 2026. URL: https://huggingface.co/Raiff1982/Codette-Reasoning. Accessed April 9, 2026.
[14] Raiff1982. Codette-reasoning wiki. GitHub, 2026. URL: https://github.com/Raiff1982/Codette-Reasoning/wiki. Accessed April 9, 2026.
[15] Raiff1982. codette-training-lab (code repository). GitHub, 2026. URL: https://github.com/Raiff1982/codette-training-lab. Accessed April 9, 2026.
[16] Raiff1982. codette-training-lab (Hugging Face mirror). Hugging Face, 2026. URL: https://huggingface.co/Raiff1982/codette-training-lab. Accessed April 9, 2026.
[17] Eduardo Salazar. Introducing COGENT3: An AI architecture for emergent cognition. arXiv preprint arXiv:2504.04139, 2025.
[18] Kristina Sekrst et al. AI ethics by design: Implementing customizable guardrails for responsible AI development. arXiv preprint arXiv:2401.05678, 2024.
[19] Noah Shinn, Beck Labash, Ashwin Gopinath, Karthik Narasimhan, and Shunyu Yao. Reflexion: Language agents with verbal reinforcement learning. arXiv preprint arXiv:2303.11366, 2023.
[20] Peter Sterling. Allostasis: A model of predictive regulation. In Allostasis, Homeostasis, and the Costs of Physiological Adaptation. Unknown, 2012.
[21] Y. Sui et al. Meta-Reasoner: Dynamic guidance for optimized inference-time reasoning in large language models. arXiv preprint arXiv:2504.11234, 2025.
[22] Elizabeth Tennant et al. Hybrid approaches for moral value alignment in AI agents: a manifesto. arXiv preprint arXiv:2312.04567, 2023.
[23] Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed H Chi, Quoc V Le, and Denny Zhou. Chain-of-thought prompting elicits reasoning in large language models. In Advances in Neural Information Processing Systems, 2022.
[24] Qingyun Wu, Gagan Bansal, Jieyu Zhang, Yiran Wu, Yi Li, Joseph E. Gonzalez, et al. AutoGen: Enabling next-gen LLM applications via multi-agent conversation. arXiv preprint arXiv:2308.08155, 2023.
[25] Violet Xiang, Charlie Snell, Kanishk Gandhi, Alon Albalak, Anikait Singh, Chase Blagden, Duy Phung, Rafael Rafailov, Nathan Lile, Dakota Mahan, et al. Towards system 2 reasoning in LLMs: Learning how to think with meta chain-of-thought. arXiv preprint arXiv:2501.04682, 2025.
[26] Yongjin Yang, Euiin Yi, Jongwoo Ko, Kimin Lee, Zhijing Jin, and Se-Young Yun. Revisiting multi-agent debate as test-time scaling: A systematic study of conditional effectiveness. arXiv preprint arXiv:2505.22960, 2025.
[27] Tianjun Yao, Yongqiang Chen, Yujia Zheng, Pan Li, Zhiqiang Shen, and Kun Zhang. ParamMem: Augmenting language agents with parametric reflective memory. arXiv preprint arXiv:2602.23320, 2026.
[28] Yu Yao, Jiayi Dong, Yang Yang, Ju Li, and Yilun Du. Roundtable Policy: Confidence-weighted-consensus aggregation improves multi-agent-system reasoning. arXiv preprint arXiv:2509.16839, 2025.
[29] Jian Zhang, Zhiyuan Wang, Zhangqi Wang, Fangzhi Xu, Qika Lin, Lingling Zhang, Rui Mao, Erik Cambria, and Jun Liu. MAPS: Multi-agent personality shaping for collaborative reasoning. arXiv preprint arXiv:2503.16905, 2025.
Citation
@article{harrison2026codette,
title={Codette: A Sovereign Modular Cognitive Architecture for Ethical Multi-Agent AI},
author={Harrison, Jonathan},
year={2026},
doi={10.5281/zenodo.18913936},
publisher={Raiff's Bits LLC},
url={https://huggingface.co/raiff1982/codette-paper}
}
License
This paper is released under CC BY 4.0.