Paper deep dive
PRECEPT: Planning Resilience via Experience, Context Engineering & Probing Trajectories A Unified Framework for Test-Time Adaptation with Compositional Rule Learning and Pareto-Guided Prompt Evolution
Arash Shahmansoori
Intelligence
Status: succeeded | Model: google/gemini-3.1-flash-lite-preview | Prompt: intel-v1 | Confidence: 96%
Last extracted: 3/13/2026, 1:03:47 AM
Summary
PRECEPT is a unified framework for test-time adaptation in LLM agents, addressing retrieval degradation, compositional rule learning, and adversarial knowledge. It utilizes three core components: deterministic exact-match rule retrieval via structured condition keys, conflict-aware memory with Bayesian source reliability, and COMPASS, a Pareto-guided prompt-evolution outer loop. The framework demonstrates significant improvements in compositional generalization, drift recovery, and robustness compared to existing methods like Full Reflexion.
Entities (5)
Relation Signals (3)
PRECEPT â includescomponent â COMPASS
confidence 100% · PRECEPT... with three tightly coupled components: (1)... (2)... and (3) COMPASS
PRECEPT â outperforms â Full Reflexion
confidence 95% · PRECEPT achieves a +41.1pp first-try advantage over Full Reflexion
COMPASS â optimizes â Prompts
confidence 90% · COMPASS optimizes prompts through the full pipeline with Pareto selection
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:LLM agents that store knowledge as natural language suffer steep retrieval degradation as condition count grows, often struggle to compose learned rules reliably, and typically lack explicit mechanisms to detect stale or adversarial knowledge. We introduce PRECEPT, a unified framework for test-time adaptation with three tightly coupled components: (1) deterministic exact-match rule retrieval over structured condition keys, (2) conflict-aware memory with Bayesian source reliability and threshold-based rule invalidation, and (3) COMPASS, a Pareto-guided prompt-evolution outer loop. Exact retrieval eliminates partial-match interpretation errors on the deterministic path (0% by construction, vs 94.4% under Theorem~B.6's independence model at N=10) and supports compositional stacking through a semantic tier hierarchy; conflict-aware memory resolves static--dynamic disagreements and supports drift adaptation; COMPASS evaluates prompts through the same end-to-end execution pipeline. Results (9--10 seeds): PRECEPT achieves a +41.1pp first-try advantage over Full Reflexion (d>1.9), +33.3pp compositional generalization (d=1.55), 100% $P_1$ on 2-way logistics compositions (d=2.64), +40--55pp continuous learning gains, strong eventual robustness under adversarial static knowledge (100% logistics with adversarial SK active; partial recovery on integration), +55.0pp drift recovery (d=0.95, p=0.031), and 61% fewer steps. Core comparisons are statistically significant, often at p<0.001.
Tags
Links
- Source: https://arxiv.org/abs/2603.09641v1
- Canonical: https://arxiv.org/abs/2603.09641v1
Trouble viewing inline? Open PDF directly â
Full Text
154,892 characters extracted from source content.
Expand or collapse full text
PRECEPT: Planning Resilience via Experience, Context Engineering & Probing Trajectories A Unified Framework for Test-Time Adaptation with Compositional Rule Learning and Pareto-Guided Prompt Evolution Arash Shahmansoori Abstract LLM agents that store knowledge as natural language suffer steep retrieval degradation as condition count grows, often struggle to compose learned rules reliably, and typically lack explicit mechanisms to detect stale or adversarial knowledge. We introduce PRECEPT, a unified framework for test-time adaptation with three tightly coupled components: (1) deterministic exact-match rule retrieval over structured condition keys, (2) conflict-aware memory with Bayesian source reliability and threshold-based rule invalidation, and (3) COMPASS, a Pareto-guided prompt-evolution outer loop. Exact retrieval eliminates partial-match interpretation errors on the deterministic path (0% by construction, vs 94.4% under Theorem B.6âs independence model at N=10N=10) and supports compositional stacking through a semantic tier hierarchy; conflict-aware memory resolves staticâdynamic disagreements and supports drift adaptation; COMPASS evaluates prompts through the same end-to-end execution pipeline. Results (9â10 seeds): PRECEPT achieves a +41.1p first-try advantage over Full Reflexion (d>1.9d>1.9), +33.3p compositional generalization (d=1.55d=1.55), 100% P1P_1 on 2-way logistics compositions (d=2.64d=2.64), +40â55p continuous learning gains, strong eventual robustness under adversarial static knowledge (100% logistics with adversarial SK active; partial recovery on integration), +55.0p drift recovery (d=0.95d=0.95, p=0.031p=0.031), and 61% fewer steps. Core comparisons are statistically significant, often at p<0.001p<0.001. 1 Introduction Deploying LLM agents in real-world applications demands learning from limited examples, composing atomic rules into complex policies, adapting to environmental changes, and making deterministic decisions without interpretation errors. In our evaluated setting, current approaches do not jointly address all four axes. Verbal reflection (Shinn and others, 2023; Zhao and others, 2023) stores knowledge as natural language, requiring LLM interpretation at retrieval time. Under the independence model of Theorem B.6, this interpretation degrades exponentially with condition count (94.4% partial-match error at N=10N=10). Reinforcement learning suffers from prohibitive sample complexity (ÎČ=100+ÎČ=100+), cannot adapt without retraining, and offers no compositional generalization. The Digital Red Queen (DRQ) framework (Kumar et al., 2026) reveals a deeper issue: agents trained via static optimization fail 72% against novel dynamics, motivating a shift to survivable systems with growing adversarial histories. Four fundamental limitations affect all prior approaches: (L1) Compositional explosionâ2N2^N condition combinations require Oâ(2N)O(2^N) training; (L2) Interpretation degradationâverbal retrieval accuracy degrades exponentially with N; (L3) Drift blindnessâstale rules persist indefinitely, and RL requires complete retraining; (L4) Sample inefficiencyâRL needs ÎČ=100+ÎČ=100+, verbal methods ÎČ=5+ÎČ=5+, while deployment demands ÎČâ€3ÎČâ€3. Our Solution. PRECEPT addresses all four limitations through three tightly coupled ideas. Deterministic retrieval (Oâ(1)O(1) exact-match via structured condition keys) removes interpretation from matched-rule application and enables compositional generalization via a semantic tier hierarchy (L1, L2). Evo-Memory with Bayesian conflict resolutionâanalogous to DRQâs opponent historyâdetects and overrides adversarial static knowledge (Type I) and environmental drift (Type I), with a 64Ă64Ă model-based resilience bound under Corollary B.5 (L3). COMPASS optimizes prompts through the full pipeline with Pareto selection and MAP-Elites diversity. These layers are interdependent: removing any one degrades the others. 1.1 Contributions PRECEPT is a unified framework rather than a bundle of independent tricks: deterministic retrieval enables compositional rule use, structured rule memory enables conflict resolution, and conflict resolution enables reliable drift adaptation. We therefore state the contributions as three tightly coupled capabilities plus one validation summary: Contribution 1: Compositional rule learning with deterministic retrieval (Sections 2â3). PRECEPT introduces Oâ(1)O(1) exact-match retrieval over structured condition keys, eliminating interpretation errors on the exact-match path. This deterministic substrate supports atomic constraint stacking through a semantic tier hierarchy, yielding conditional 2Nâ12^N-1 compositional coverage from N learned atomic rules (Theorem 3.1), while the RefineInterceptor guarantees zero repeated failed actions in default pruning mode (Theorem B.7). Contribution 2: Unified conflict resolution and drift adaptation (Section 4). PRECEPT maintains a growing failure-constraint history (Evo-Memory) and treats two deployment-time conflict types in one framework: Type I static-vs-dynamic source conflict, handled by a six-signal ensemble detector with Bayesian source reliability and Thompson Sampling; and Type I environmental drift, handled by confidence decay and threshold-based rule invalidation. In the modeled stationary-segment analysis, this yields a 64Ă64Ă drift-resilience ratio (Corollary B.5). Contribution 3: COMPASS, a dual-frequency adaptation layer (Section 5). COMPASS combines a high-frequency runtime layer for per-step action/error monitoring with a low-frequency event-triggered prompt-evolution layer. It extends GEPA (Agrawal et al., 2025) with ML-based complexity estimation, rollout allocation, MAP-Elites-style diversity maintenance (Mouret and Clune, 2015), and bi-objective selection over success and efficiency. Crucially, candidate prompts are evaluated through PRECEPTâs full retrieval-and-adaptation pipeline rather than by heuristic prompt scoring alone. Validation (Sections 6â7). Closed-form analysis predicts a 22.6Ă22.6Ă advantage at N=10N=10 conditions (Corollary B.3) and a 64Ă64Ă model-based drift-resilience ratio (Corollary B.5). Seven core experiments across three domains support these trends empirically, including +41.1p first-try advantage, +33.3p compositional generalization, 100% P1P_1 on 2-way logistics compositions, +40â55p continuous learning, strong rule persistence, robust eventual behavior under adversarial static knowledge, and +55.0p drift recovery. Additional architectural stress tests and COMPASS ablations characterize where the outer loop matters most. 2 PRECEPT Framework Overview 2.1 System Architecture While theoretically complex, PRECEPTâs operational overhead is minimized via encapsulation: the heavy lifting (Bayesian tracking, Evo-Memory, 6-method ensemble) is abstracted behind an MCP server with domain-agnostic default hyperparameter configurations, allowing the client-agent loop to remain lightweight. Figure 1 provides a high-level overview. On the client, the runtime processes each task through orchestration, the COMPASS high-frequency monitor (Oâ(1)O(1) constraint checks, error evaluation, pattern learning at every step), and trigger events that activate the server-side low-frequency path. Retrieval and decision uses exact-match, compositional, hybrid, or LLM reasoning, guarded by the client-side RefineInterceptor. On the server, the MCP gateway dispatches tool calls; the knowledge and conflict engine provides dual-mode retrieval with ensemble conflict resolution (Bayesian posteriors, Thompson Sampling); the COMPASS low-frequency architect (GEPAEvolutionEngine, Pareto selection, MAP-Elites) executes prompt evolution when triggered by the client; domain executors run strategy-driven actions; and persistent stores hold static KB, dynamic experience, episodic memory, and learned rules. The evolved prompt feeds back from the server to the client hi-freq monitor (dashed arrow). The full COMPASS architecture is detailed in Figures 6 and 7. Task Orchestration hybrid parse + complexity analysis COMPASS Hi-Freq Monitor evaluate_action/error, learn_pattern Trigger Events new rule || goal failure || phase change Retrieval & Decision exact, compositional, hybrid, LLM + RefineInterceptor Learning & Adaptation confidence, rule/procedure writes MCP Tool Gateway stdio / JSON-RPC dispatch Knowledge & Conflict dual-mode retrieval, conflict resolution COMPASS Lo-Freq Architect GEPAEvolutionEngine, Pareto, MAP-Elites Domain Executors strategy-driven tool actions Persistent Stores static KB, dynamic, episodic, rules Client: precept_agent.pyServer: precept_mcp_server.pyTask stringExecution resultstdio / JSON-RPC: tool calls, retrieval, execution, knowledge writestrigger via MCPevolvedprompt Figure 1: PRECEPT architecture overview. The client handles orchestration, high-frequency monitoring, retrieval-time decision support, and learning updates; the server handles MCP dispatch, conflict-aware retrieval, low-frequency COMPASS evolution, domain execution, and persistent memory. The dashed arrow denotes the evolved prompt flowing from the server-side architect back to the client monitor. 2.2 Theoretical Foundations: Code-to-Theory Mapping Theoretical Foundations for PRECEPTâs Key Features. Feature Code Implementation Theoretical Foundation Section Dual-Mode Retrieval fetch_context*() + server retrieval tools: retrieve_memories(), get_rule_hybrid(), retrieve_atomic_precepts(); unified interface: retrieve_with_dual_mode() Definition 2.2 + retrieval-tier specification (§2.3.1) §2.3.1 Type I Conflict (Static vs Dynamic) EnsembleConflictDetector.detect() Ensemble weight specification + Definition 4.1 + Algorithm 4.1a §4.1 Evo-Memory partial_progress, failed_options Definition 4.0, Theorem 4.0 (Eliminates Cyclic Failures) §4.0 Deterministic Pruning RefineInterceptor.is_forbidden(), add_constraint() Theorem 4.5 (P(repeat_fail)=0), Corollary 4.5.1 §4.5 Thompson Sampling BetaDistribution.sample() Definition 4.1, Theorem 4.1 (Local stationary-segment bound) §4.1 Bayesian Conflict Resolution BetaDistribution.update(success) Definition 4.1, Algorithm 4.1a §4.1 MAP-Elites / Pareto Diversity pareto_front, diversity_threshold, diversity_rollouts Definition 5.1, 5.2 (Topological Distinctness) §5.1.1 Epistemic Probing _DIAGNOSTIC_PROBES, enable_epistemic_probing Definition 2.1, Algorithm 2.1 §2.5 Compositional Stacking retrieve_atomic_precepts(), tier sorting Theorem 3.1 (2Nâ12^N-1 Coverage) §3 Table 1: Code-to-theory mapping for PRECEPTâs major components. All implementations verified in source code; theoretical proofs in respective sections. Appendix C distinguishes the main evaluated runtime path from supporting server-side tools and auxiliary utilities. 2.3 PRECEPTAgent Detailed Execution Flow Figure 2 presents the complete seven-phase execution flow of PRECEPTAgent.run_task(), illustrating how PRECEPT orchestrates task parsing, knowledge retrieval, decision-making, and adaptive learning within a single unified pipeline. Phase 1Task ParsingHybrid rule+LLM parseInject condition key Îș 2COMPASSComplexity analysisBlock / Proceed / Fast-pathPhase 3RetrievalExact Oâ(1)O(1) ⣠Semantic ⣠Compositional+ Procedural MemoryPhase 4DerivationTier-sort: maxâĄ(tier) (tier) winsOâ(1)O(1) solution lookupPhase 5ExecuteDomain action viaMCP tool callsPhase 6Outcomeâ Conf. +0.25 Ă Conf. Ă0.5Invalidate if fâ„Ξ=2fâ„Ξ=2Phase 7Knowledge UpdateExtract atomic preceptsStore experienceOutputretry Figure 2: Complete seven-phase execution flow of the PRECEPT agent: (1) Task parsing with hybrid rule+LLM fallback, (2) COMPASS complexity evaluation with block/proceed/fast-path decisions, (3) Three-mode context retrieval (compositional, hybrid, semantic), (4) Solution derivation with tier-sorted priority, (5) Domain action execution, (6) Outcome processing with threshold-based invalidation (Ξ=2Ξ=2), and (7) Knowledge update via atomic precept extraction. Dashed arrow indicates the retry loop. The seven phases span task parsing (rule-based by default, with optional hybrid rule-based + LLM fallback), COMPASS evaluation, compositional + hybrid retrieval, direct resolution or LLM reasoning, domain-specific execution, success/failure handling with confidence updates, and atomic precept learning. Implementation details are in Appendix C. 2.4 Knowledge Layer Architecture Figure 3 illustrates PRECEPTâs four-tier knowledge layer: static KB (vector DB), dynamic experience (vector DB), episodic memory (trajectory store), and learned rules (hash table). Each tier has a distinct confidence prior and retrieval mechanism; the layers interact through the dual-mode retrieval interface described below. Condition KeyÎș MatchOâ(1)O(1) Dictionary Lookuprules_by_key[Îș]Semantic SearchOâ(logâĄn)O( n) Vector IndexBM25 + Embedding HybridCompositionalDecompose ÎșâÎșâ AtomsTier-sorted stackingTier 1Highest priorityTier 2FallbackTier 3CompositionalConflict ResolutionBayesian Thompson SamplingSafety >> Compliance >> PreferencesResolved ContextRanked precepts + confidence scores Figure 3: Knowledge Layer with three retrieval modes: exact-match Oâ(1)O(1) via dictionary lookup (highest priority), semantic similarity Oâ(logâĄn)O( n) via hybrid BM25+embedding search, and compositional retrieval via atomic precept decomposition with tier-sorted stacking. Conflicts are resolved through Bayesian Thompson sampling respecting the Safety >> Compliance >> Preferences hierarchy. 2.5 Dual-Mode Retrieval with Conflict Resolution PRECEPT provides a unified server-side retrieval interface (retrieve_with_dual_mode()) that queries all knowledge sources in parallel and automatically resolves conflicts. In the evaluated PRECEPTAgent runtime, client-side retrieval is orchestrated through fetch_context(), fetch_context_with_hybrid(), and fetch_context_compositional(). These helpers call server-side tools including retrieve_memories(), get_rule_hybrid(), and retrieve_atomic_precepts(). In addition, PRECEPT implements a 3-Tier Hybrid Retrieval strategy (get_rule_hybrid()): Tier 1 provides Oâ(1)O(1) exact hash lookup for deterministic rule application; Tier 2 uses vector similarity (ChromaDB cosine search, optionally combined with BM25 via an ensemble retriever) for semantic matching over unseen or continuous representations; and Tier 3 applies Jaccard similarity over condition codes as a structural fallback. This cascading design ensures that while Oâ(1)O(1) hashes guarantee deterministic retrieval for discrete constraints, the architecture natively handles continuous, high-cardinality, and out-of-vocabulary state spaces through dense embedding fallback. The full algorithm is in Appendix C. Tier Storage Source Confidence Prior Retrieval Use Case Static KB Vector DB Pre-deployment (PDFs, docs) 0.9 (high) Semantic similarity Factual grounding Dynamic Experience Vector DB Runtime (web, APIs) 0.8 (moderate) Semantic + metadata filter Current information Episodic Memory MemoryStore Task executions Task-dependent Trajectory matching Experience replay Learned Rules Hash Table Successful solutions 1.0 (deterministic) Oâ(1)O(1) exact match Direct application Table 2: PRECEPTâs four knowledge tiers, their storage backends, priors, and retrieval roles. Phase 1 (Parallel Retrieval) queries three tiers: static KB via semantic similarity, dynamic experiences via semantic+metadata filtering, and episodic memory via trajectory matching. Phase 2 (Conflict Detection) applies the six-method ensemble detector (ensemble-weight specification in §4.1) to all staticâdynamic pairs, triggering resolution when weighted_conflictâ„Ξ=0.30weighted\_conflictâ„Ξ=0.30 or when any single method votes conflict with confidence â„0.60â„ 0.60 (circuit breaker). Detected conflicts invoke the Type I resolution mechanism (Section 4.1): Thompson Sampling from Beta posteriors, with posterior updates based on resolution outcomes. This pipeline makes PRECEPT a conflict-aware RAG systemâthe key differentiator from standard RAG, which returns results without detecting or resolving contradictions. 2.6 Simplified Execution Pipeline Figure 4 presents the simplified six-stage execution pipeline, mapping each stage to its client/server location and the corresponding MCP tool. Task InputParse with hybridrule + LLMCOMPASS MonitorOâ(1)O(1) constraint checkBlock / Proceed / Fast3-Mode RetrievalExact Oâ(1)O(1) ⣠Semantic⣠Compositional stackingCompose SolutionMax tier winsConflict? â ThompsonExecute ActionDomain-specificMCP tool callsResult?Success PathConf. +0.25Record rule â LearnFailure PathConf. Ă0.5fâ„2fâ„2? Invalidate : RetryexecuteâĂ failCOMPASS ArchitectLow-frequency prompt evolution+ Pareto-optimal selectionDoneRule persistedpersist rulestate-change triggerevolvedretry Figure 4: Complete PRECEPT execution pipeline. Tasks flow through the COMPASS Monitor (Oâ(1)O(1) constraint check), three-mode retrieval (exact-match, semantic, compositional), Bayesian conflict resolution via Thompson sampling, execution with deterministic pruning via RefineInterceptor, and threshold-based rule invalidation (Ξ=2Ξ=2). On success, rules are persisted; on state-change events, the COMPASS Architect (low-frequency loop, dashed teal) triggers prompt evolution and Pareto selection. On failure, the retry loop (dashed red) returns to the Monitor with the failed option pruned. Execution Pipeline Stage Details with MCP Tool Mapping. Stage Client/Server MCP Tool / Function Key Operation (1) Parse Client PRECEPTAgent.run_task() Parse task; inject condition metadata when available (2) Retrieve Clientâ fetch_context*() â retrieve_memories(), get_rule_hybrid(), retrieve_atomic_precepts() Orchestrate retrieval for the reported runtime path (3) Compose Client + Server Tier sorting + constraint-stack construction Use deterministic highest-tier fast path when directly applicable; otherwise pass stacked constraints to synthesis (4) Detect Server ConflictManager.detect() + atomic-precept conflict checks Resolve staticâdynamic conflicts; compositional retrieval also checks atomic-precept conflicts by default (5) Execute Server Domain tools (book_shipment, etc.) Apply selected or synthesized solution via domain-specific tool (6) Handle Clientâ report_rule_failure(Îș) / record_rule_success(Îș) Decay Ă0.5, restore +0.25, invalidate at Ξ=2 Table 3: Simplified clientâserver execution pipeline with MCP tool mapping. 2.7 Additional Agent Capabilities Beyond the core mechanisms described above, PRECEPT includes several supporting capabilities that contribute to its robustness (detailed in Appendix C): Epistemic Probing. Rather than passively logging errors, PRECEPT actively probes the environment to discover hidden constraints before committing to plansâoperationalizing the adversarial dynamics from evolutionary computing (Kumar et al., 2026). Formally, given environment â°E with hidden constraints â(â°)=c1,âŠ,cnC(E)=\c_1,âŠ,c_n\, epistemic probing maps targeted queries to constraint evidence: Probe:â°ĂqâEvidenceâ(ci)Probe:EĂ q (c_i). Discovered constraints are immediately added to the RefineInterceptorâs forbidden set, transforming error handling from reactive to proactive. Structured Outputs and Hybrid Parsing. LLM responses are parsed through Pydantic-validated structured outputs (ReasoningResponse) ensuring guaranteed schema compliance. The reported experiments retain the default rule-based task parser; when enabled, PRECEPT also supports a two-stage hybrid approach with LLM fallback when rule-based confidence << 0.8, combining speed with robustness. Cross-Episode Learning. Failed options persist across episodes via context.failed_options, enabling resumable exploration. Successful error recoveries are stored as procedural memory (store_procedure()) for future reuse. A Strategy Pattern provides domain-specific behavior for the three evaluated domains (logistics, booking, integration) through a common interface. 3 Atomic Constraint Stacking 3.1 Problem: Compositional Explosion Given N atomic conditions, there are 2N2^N possible combinations. Training on all combinations is infeasible. Example: âą Illustrative 6-atomics subset: SAFE, ASIA, EURO, FAST, ECON, BULK âą 262^6 = 64 possible combinations âą Training all 64 requires Oâ(64ĂÎČ)O(64ĂÎČ) = Oâ(192)O(192) tasks at ÎČ=3 Implementation note (Q2). The six-condition set above is illustrative. In the evaluated compositional runs, atomic condition vocabularies are domain-provided by scenario generators/configs (e.g., logistics semantic mode uses 8 codes: ASIA, EURO, AMER, INTL, FAST, ECON, SAFE, BULK). PRECEPT learns rule/precept associations from execution outcomes over this provided symbolic vocabulary; it does not discover arbitrary new symbolic tokens from raw unstructured text. PRECEPT Solution: Learn N atomic precepts, compose at test time via tier-based resolution using SEMANTIC_CONDITION_TIERS. 3.2 Semantic Tier Hierarchy Semantic Tier Hierarchy from SEMANTIC_CONDITION_TIERS in precept_mcp_server.py. Tier Priority Category Conditions Dominance Rule 3 Highest Safety SAFE, SECURE, RISK, CANCEL, AUTH Always wins 2 Medium Compliance ASIA, EURO, INTL, HIPAA, AUDIT Wins over Tier 1 1 Lowest Preferences FAST, ECON, BULK, SPEED, COST Default fallback Table 4: Semantic tier hierarchy used for atomic constraint stacking. Resolution Rule: Given conditions A, B, C, solution â precept(argmaxtier(A), tier(B), tier(C)) 3.3 Composition Algorithm Algorithm 1 details the deterministic direct-application fast path used when compositional retrieval returns multiple tier-annotated atomic precepts and the runtime can directly apply the highest-priority returned precept. Given a set of retrieved atomic precepts, it sorts them by tier in descending order and extracts the solution hint from the highest-priority precept. The algorithm handles both direct solutions and exploration paths (e.g., LLMâ â ), parsing each format deterministically. The overall complexity is Oâ(NâlogâĄN)O(N N) for N precepts (dominated by the sort). In the full evaluated pipeline, this fast path is complemented by constraint-stack construction and LLM synthesis whenever direct application is not taken. Algorithm 1 Atomic Constraint Stacking ⏠1Input: compositional_context from fetch_context_compositional() 2Output: compositional_direct_solution (if direct fast path is taken) 3 4function COMPOSE(compositional_context): 5 precepts_found â compositional_context.precepts_found 6 // Guard: only for multi-constraint scenarios 7 if |precepts_found| †1 then 8 return ? 9 end if 10 // Sort by tier (descending) - highest priority first 11 sorted_precepts â sorted(precepts_found, 12 key=lambdap: p.get("tier", 1), 13 reverse=True) 14 // Get solution from highest-tier precept 15 highest_precept â sorted_precepts[0] 16 solution_hint â highest_precept.get("solution_hint", "") 17 // Parse solution_hint format: "solution:value" or "solution:LLMâ " 18 if ":" in solution_hint then 19 raw â solution_hint.split(":", 1)[1] 20 if "â" in raw then 21 // Handle exploration paths like "LLMâ â " 22 for part in raw.split("â") do 23 if part.lower() â "llm" and part.strip() then 24 return part.strip() 25 end if 26 end for 27 else 28 return raw.strip() 29 end if 30 else 31 return solution_hint.strip() if solution_hint else ? 32 end if 33end function 34---------------------------------------------------------------------- 35Complexity: O(N log N) for N precepts 36Property: Deterministic--no LLM interpretation required for tier resolution 3.4 Compositional Generalization Property Theorem 3.1 (Conditional Compositional Coverage). Given N atomic precepts learned from N training scenarios, PRECEPT can construct a resolution candidate for up to 2Nâ12^N-1 non-empty composite test scenarios. When the retrieved precepts yield a unique tier-maximal resolution, this candidate is obtained deterministically by highest-tier selection. When residual same-tier ambiguity remains, the evaluated runtime falls back to constraint-stack synthesis. If the semantic tier hierarchy faithfully matches the domainâs true constraint priorities and the synthesis step succeeds on tied cases, these resolutions are correct. Proof. Let A = a_â1\_1, âŠ, aâ_âna\_n be the set of N atomic conditions, each with an associated precept pâ_âip\_i â P stored in precepts_found, where each pâ_âip\_i has a tier Ï â 1, 2, 3. Consider any non-empty composite scenario S â A. We show PRECEPT constructs a resolution candidate for S, and is correct under the tier-ordering and synthesis assumptions: 1. Decomposition: retrieve_atomic_precepts decomposes S into constituent atoms. For each aâ_âia\_i â S, the corresponding precept pâ_âip\_i is retrieved via exact-match lookup. Since each aâ_âia\_i was learned during training, retrieval succeeds with probability 1. 2. Composition: If a unique highest-tier precept exists, Algorithm 1 computes argmaxÏ : aâ_âia\_i â S and returns that direct solution deterministically. If multiple active precepts remain at the same effective priority after retrieval-time conflict handling, PRECEPT forwards their stacked constraints to synthesis rather than claiming a purely deterministic tie-break. 3. Conditional correctness: If the semantic tier hierarchy faithfully reflects the domainâs true priority order, then the highest-tier direct resolution is correct whenever a unique maximizer exists. In tied cases, correctness additionally depends on successful synthesis over the stacked active constraints. 4. Determinism: The highest-tier fast path is deterministic whenever the maximizer is unique; otherwise residual ambiguity is delegated to synthesis. 5. Coverage: The number of non-empty subsets of A is |P(A) â | = 2N2^N - 1. Each such subset can be routed either through the deterministic highest-tier fast path or through the synthesis path described above. Therefore, N atomic precepts yield coverage of 2N2^N - 1 composite scenarios, with deterministic direct resolution whenever a unique highest-tier precept is available and synthesis handling the remaining tied cases. Correctness is inherited from the tier-ordering assumption together with successful synthesis on residual ambiguities. â Remark. The guarantee is conditional and path-dependent rather than universal. For composites whose retrieved precepts induce a unique highest tier, PRECEPT uses the deterministic fast path described above. In the evaluated implementation, retrieve_atomic_precepts() also performs atomic-precept conflict detection by default before building the constraint stack. When multiple active constraints of comparable priority remain, PRECEPT switches to LLM Constraint Synthesis (stacking the competing atomic constraints into the context), rather than claiming that every compositional case is resolved by a purely deterministic shortcut. Deterministic retrieval and compositional stacking (Sections 2â3) guarantee correct rule application given correct rules. The next section addresses the complementary challenge: what happens when rules conflict or become invalid. 4 Dual Conflict Resolution and Adversarial Adaptation 4.1 Theoretical Foundation: Evo-Memory and the Red Queen Principle PRECEPTâs conflict resolution draws theoretical inspiration from the Red Queen hypothesis in evolutionary computing. The Digital Red Queen (DRQ) framework (Kumar et al., 2026) demonstrates that agents optimized against static objectives become brittle, failing 72% against novel adversarial dynamics. DRQ overcomes this by maintaining a âgrowing history of opponentsâ that forces continual adaptation. PRECEPTâs Evo-Memory Architecture operationalizes this principle for rule-governed agents: ⏠DRQ: Optimize(Warrior) against History[Opponent_1, Opponent_2, ..., Opponent_n] PRECEPT: Optimize(Plan) against History[Constraint_1, Constraint_2, ..., Constraint_n] Definition 4.0 (Evo-Memory). Let Hâ(t)=c1,c2,âŠ,ckH(t)=\c_1,c_2,âŠ,c_k\ be the accumulated constraint history at time step t, where each cic_i is a constraint (a failed option or violated condition) discovered during episodes 1,âŠ,t1,âŠ,t. PRECEPTâs Evo-Memory comprises three components: 1. In-Episode Memory (RefineInterceptor.forbidden_set): The set of constraints FepisodeâHâ(t)F_episode H(t) discovered during the current task episode. 2. Cross-Episode Memory (partial_progress.failed_options): The set of constraints FcrossâHâ(t)F_cross H(t) persisted from previous episodes, loaded at startup. 3. Rule Confidence (rule_confidence[k]): A scalar ckâ[0,1]c_kâ[0,1] tracking the reliability of learned rule k, decayed on failure (ckâckĂ0.5c_kâ c_kĂ 0.5) and restored on success (ckâminâĄ(1.0,ck+0.25)c_kâ (1.0,c_k+0.25)). The complete constraint history is Hâ(t)=FepisodeâȘFcrossH(t)=F_episodeâȘ F_cross. Theorem 4.0 (Evo-Memory Eliminates Cyclic Failures). For any candidate plan P and accumulated constraint set Hâ(t)H(t): Pâ(repeatâ(ci)âŁEvoMemoryâ(Hâ(t)))=0,âciâHâ(t)P(repeat(c_i) (H(t)))=0, â c_iâ H(t) where repeatâ(ci)repeat(c_i) denotes the event that the agent selects an option that violates previously-discovered constraint cic_i. Proof: The RefineInterceptor.is_forbidden() check deterministically rejects any option in the forbidden set. Cross-episode failures are loaded from partial_progress.json at startup and injected into context via forbidden_injection. Any plan violating accumulated constraints is pruned before execution. â This architectural parallel to DRQ explains why PRECEPT achieves P(repeat_fail) = 0âthe same mechanism that enables DRQâs warriors to defeat all previous opponents enables PRECEPTâs agents to satisfy all accumulated constraints. 4.2 Type I: Static vs Dynamic Knowledge Conflict Ensemble Conflict Detection Weights (EnsembleConflictDetector). Method Raw Weight Normalized Weight Description NLI Classifier 0.30 0.200 Natural language inference Semantic Patterns 0.30 0.200 Keyword contradiction detection Temporal Analysis 0.15 0.100 Recency-based staleness Evidence Strength 0.15 0.100 Confirmation/failure counts Recommendation Conflict 0.50 0.333 Dismissive-vs-active strategy detection LLM Vote 0.10 0.067 Optional LLM adjudication Table 5: Six-method ensemble conflict detector weights used for Type I conflict detection. Detection: weighted_conflict = ÎŁ (weight Ă is_conflict Ă confidence) / ÎŁ â trigger if â„0.30â„ 0.30, or if any single method votes conflict with confidence â„0.60â„ 0.60 (circuit breaker). Raw weights are scoring coefficients and are explicitly normalized in the denominator; they are not required to sum to 1. The Recommendation Conflict method detects three patterns: (i) dismissive static claims (e.g., âcan be ignoredâ, âproceed normallyâ) paired with active dynamic strategies (e.g., âstrategy is Xâ, âsolution: Yâ); (i) overlapping condition codes with divergent recommendations; (i) explicitly different solution suggestions. Its higher per-method weight reflects that this signal captures action-level contradiction patterns that NLI/semantic similarity often miss in short operational texts. Importantly, it does not dominate the ensemble: the combined NLI+semantic mass is still larger (0.60 raw), and the circuit breaker is used only for single high-confidence conflict evidence. Resolution: Thompson Sampling from Beta posteriors: Static Beta(5,5), Dynamic Beta(5,3) Definition 4.1 (Bayesian Source Reliability Model). Let rs,rdâ[0,1]r_s,r_dâ[0,1] denote the unknown reliability of the static and dynamic sources, respectively, modeled as: rsâŒBetaâ(αs,ÎČs),αs(0)=5,ÎČs(0)=5rdâŒBetaâ(αd,ÎČd),αd(0)=5,ÎČd(0)=3r_s ( _s, _s), _s^(0)=5,\; _s^(0)=5 r_d ( _d, _d), _d^(0)=5,\; _d^(0)=3 The Beta distribution is the conjugate prior for Bernoulli observations, so each correct/incorrect outcome updates the posterior analytically: αâα+1αâα+1 (correct) or ÎČâÎČ+1ÎČâÎČ+1 (incorrect). The prior Betaâ(5,5)Beta(5,5) for static knowledge encodes maximum uncertainty (mean 0.500.50), reflecting that static knowledge is unverified external input whose reliability must be earned. The prior Betaâ(5,3)Beta(5,3) for dynamic experience encodes moderate confidence (mean 0.6250.625), reflecting that first-hand execution outcomes are inherently more trustworthy. Resolution Mechanism. The ConflictResolver auto-selects among four strategies: anomaly detection (outlier dynamic items), recency (stale static >>30 days), evidence strength (sufficient data â„ 3 observations), or Bayesian reliability (default, scoring rsâ confidencesr_s·confidence_s vs rdâ confidencedr_d·confidence_d). After resolution, posteriors are updated: the winnerâs α increments; the loserâs ÎČ increments. Thompson Sampling drives active explorationârandom draws ΞsâŒBetaâ(αs,ÎČs) _s ( _s, _s), ΞdâŒBetaâ(αd,ÎČd) _d ( _d, _d) balance exploitation with re-verification of potentially stale static knowledge. Full algorithms are in Appendix C. Theorem 4.1 (Stationary-Segment Regret Bound). Under locally stationary Bernoulli rewards for source reliability within a segment, Thompson Sampling has expected regret Oâ(TâlogâĄT)O( T T) over T exploration decisions (Agrawal and Goyal, 2012), compared to Oâ(T)O(T) for naive heuristics. This is a local bound: PRECEPT does not claim the same global regret guarantee across non-stationary drift segments. 4.3 Type I: Rule Drift Adaptation Rule Drift Parameters (precept_mcp_server.py). Parameter Value Operation UNLEARN_FAILURE_THRESHOLD 2 Invalidate after N consecutive failures Confidence decay (ÎŽ) Ă0.5 confidence *= 0.5 per failure Confidence restore +0.25 confidence = min(1.0, c + 0.25) on success Table 6: Rule invalidation hyperparameters used for Type I drift adaptation. Figure 5 depicts the Evo-Memory lifecycle: how partial progress and failed options accumulate across episodes, feeding back into the RefineInterceptorâs constraint set. Apply Ruleevaluate_action()OK?fâ0fâ 0c+=0.25c +=0.25 â Passf+=1f +=1cĂ=0.5c Ă=0.5 Ă Failfâ„Ξfâ„Ξ?Invalidate Rulerecord_rule_failure() YesRetryDecayed confidence NoNext attemptReinforced ruleΞ=2Ξ=2 (default) Figure 5: Evo-Memory lifecycle for Type I (rule drift) handling. On success, the failure counter resets and confidence increases; on failure, confidence decays by half (cĂ0.5cĂ 0.5) and the failure counter increments. When fâ„Ξfâ„Ξ (Ξ=2Ξ=2 by default), the rule is invalidated via record_rule_failure(), triggering re-learning. This yields stale-rule persistence probability (1âd)Ξâ€0.0025(1-d)^Ξ†0.0025 for PRECEPT (Corollary 6.7). 4.4 Rule Invalidation Algorithm Algorithm 2 specifies the threshold-based rule invalidation mechanism. When a learned rule produces an incorrect outcome, the failure count for that condition key is incremented and its confidence is halved (soft decay). Once the failure count reaches the threshold Ξ=2Ξ=2, the rule is permanently deleted from the rule store and the deletion is persisted to disk. Conversely, a successful application resets the failure counter and restores confidence by +0.25+0.25 (capped at 1.01.0), preventing transient failures from triggering premature invalidation. Algorithm 2 Threshold-Based Rule Invalidation ⏠1Constants: 2UNLEARN_FAILURE_THRESHOLD = 2 3Global State: 4learned_rules: Dict[str, str] 5rule_failure_counts: Dict[str, int] 6rule_confidence: Dict[str, float] 7 record_rule_failurecondition_key 8global learned_rules, rule_failure_counts, rule_confidence 9// Only track for existing rules 10if condition_key not in learned_rules then 11 return None 12end if 13// Increment failure count 14rule_failure_counts[condition_key] â rule_failure_counts.get(condition_key, 0 ... 15current_failures â rule_failure_counts[condition_key] 16// Soft decay: multiply by 0.5 17current_conf â rule_confidence.get(condition_key, 1.0) 18new_conf â current_conf x 0.5 19rule_confidence[condition_key] â new_conf 20// Check threshold 21if current_failures â„ UNLEARN_FAILURE_THRESHOLD then 22 old_rule â learned_rules.pop(condition_key, None) 23 rule_failure_counts.pop(condition_key, None) 24 rule_confidence.pop(condition_key, None) 25 save_rules() // Persist deletion 26 return "Rule invalidated" 27end if 28return None 29end function 30 record_rule_successcondition_key 31global rule_failure_counts, rule_confidence 32// Reset failure count 33if condition_key in rule_failure_counts then 34 rule_failure_counts.pop(condition_key, 0) 35end if 36// Restore confidence: add 0.25, cap at 1.0 37if condition_key in rule_confidence then 38 old_conf â rule_confidence[condition_key] 39 rule_confidence[condition_key] â min(1.0, old_conf + 0.25) 40end if 41end function Prompt self-sanitization. A critical design property ensures that invalidated rules are also removed from COMPASS-evolved instructions. The system prompt is never a static artifact. On every call to get_evolved_prompt(include_rules=True), the evolved base prompt is rebuilt and the current learned_rules dict is appended dynamically. When record_rule_failure() deletes an invalidated rule from learned_rules (line 543 of Algorithm 2), the next refresh_evolved_prompt() call on the client automatically produces a prompt without the stale rule; no separate sanitization step is required. This self-sanitizing architecture ensures that drift-invalidated knowledge is purged from both the rule store and the active instructions simultaneously. 4.5 Smart Pivot Error Recovery When initial execution fails, PRECEPT enters a bounded retry loop (max_retries pivots) with five key properties: (1) deterministic pruningâin the default pruning configuration (enable_random_fallback=False, soft_constraints_retriable=False), the RefineInterceptor guarantees failed options are never retried; (2) cross-episode memoryâcontext.failed_options persists across episodes for resumable exploration; (3) validation filterâall LLM suggestions are validated against domain-valid options before execution, falling back to remaining untried options when necessary; (4) COMPASS integrationâerror evaluation classifies constraint tiers and may trigger epistemic probes or block actions; (5) learning on recoveryâsuccessful recoveries are stored as rules, procedures, and atomic precepts. The full algorithm is detailed in Appendix C. 4.6 Deterministic Pruning via Constraint Classification The Digital Red Queen (DRQ) identifies âcyclic dynamicsâ as a fundamental failure mode in static optimization. PRECEPT eliminates this through the RefineInterceptor, which classifies errors into three constraint typesâHARD (physical/logical impossibility: closures, strikes), SOFT (configurable: busy, congestion), and TRANSIENT (retryable: timeouts)âand maintains a forbidden set with Oâ(1)O(1) lookup. Theorem 4.5 (Elimination of Cyclic Failures). Let F=f1,âŠ,fkF=\f_1,âŠ,f_k\ be the set of failed options. Under default pruning mode (enable_random_fallback=False, soft_constraints_retriable=False), the RefineInterceptor guarantees: Pâ(selectâ(fi)âŁRefineInterceptorâ(F))=0,âfiâFP(select(f_i) (F))=0, â f_iâ F Proof: is_forbidden() returns True for any option in the accumulated HARD and SOFT constraint sets; the inline validation-and-filter stage in PRECEPTAgent.run_task() removes invalid or forbidden options before execution; with random fallback disabled, forbidden options are never reintroduced after exhaustion. â Corollary 4.5.1. The RefineInterceptor serves the same mathematical function as DRQâs opponent historyâboth prevent revisiting previously-failed states, enabling monotonic progress. The HARD/SOFT distinction enables guaranteed termination (finite option space + HARD pruning â bounded exploration), configurable exhaustiveness, and diagnostic probe triggering when all options are exhausted. The full constraint classification algorithm is in Appendix C. 5 COMPASS: Complexity-Optimized Multi-strategy Pareto Adaptive Search Sections 2â4 established PRECEPTâs core learning pipeline: deterministic retrieval, compositional stacking, conflict resolution, and drift adaptation. These mechanisms govern what PRECEPT learns and how it resolves knowledge conflicts. COMPASS addresses the complementary question of how the agentâs prompt evolves to better leverage this knowledge. Specifically, COMPASS controls the outer loop of prompt optimizationâselecting which system prompts most effectively utilize PRECEPTâs learned rules, while PRECEPTâs inner loop handles per-task retrieval and adaptation. The two systems are tightly coupled: COMPASS evaluates candidate prompts by executing them through PRECEPTâs full pipeline (including retrieval, conflict resolution, and pruning), ensuring that prompt evolution is grounded in the same deterministic guarantees that govern task execution. COMPASS should be understood as a dual-frequency control layer rather than a single monolithic module. Its high-frequency path operates at every step through lightweight action/error evaluation and pattern monitoring; because this path is active in the full PRECEPT runtime, it is exercised throughout the main experiments (Experiments 1â7). Its low-frequency path performs heavier event-triggered prompt evolution and rollout shaping, and is isolated more directly in Experiments 8â9. The evidence therefore supports a differentiated claim: high-frequency COMPASS is broadly validated as part of PRECEPTâs core execution loop, while low-frequency COMPASS shows more regime-dependent gains, clearest in the OOD semantic setting. 5.1 Architecture Overview Figure 6 presents the three-part COMPASS architecture: (a) ML-based complexity analysis with smart rollout allocation, (b) bi-objective Pareto selection over success rate and step efficiency, and (c) verified prompt evolution through real agent execution. TaskInputComplexityAnalysisML-based patterndetectionSmart RolloutAllocationScore-based:skip / verify / exploreCandidateEvaluation6 objectives:success, steps, âŠParetoSelectionNon-dominatedfront filteringBestPromptâ„ 0.98 â skip0.9â0.98 â verify<<0.9 â explore (a) COMPASS pipeline: task complexity determines rollout allocation; candidates are evaluated on multiple objectives and selected via Pareto optimality. 2-Objective Candidate SpaceSuccess Rate (%)Step Efficiency4060801002468â Dominated candidatesâ Pareto frontâ Selected (max hypervolume) dominated: worse on â„ 1 objectiveNon-dominated frontWinner: maxhypervolumecontribution (b) Pareto-optimal selection in the 2D objective space (success rate vs. step efficiency). Gray dots are dominated candidates (worse on â„ 1 objective); blue dots form the Pareto front; the orange star is the winner, chosen by maximum hypervolume contribution. CandidatePromptAgentrun_task()PredictedSolutionEnvironmentVerifies Internallyâ sealedĂ no expectedsolutions leakedBinary Signalsuccess, failureCOMPASSEvolution (c) Verified evolution: the environment verifies solutions internally; only binary success/failure signals drive evolutionâno expected solutions are exposed. Figure 6: COMPASS: Complexity-Optimized Multi-strategy Pareto Adaptive Search. (a) End-to-end pipeline from task complexity analysis through Pareto-optimal prompt selection. (b) Pareto selection mechanism: candidates are evaluated on two objectives (success rate, step efficiency); dominated candidates (gray) are filtered, and the winner (orange star) is chosen from the non-dominated Pareto front (blue) by maximum hypervolume contribution. (c) Verified prompt evolution: the agent predicts solutions, the environment verifies internally, and only binary signals drive evolutionâno expected solutions are ever exposed to the agent. COMPASS Component Summary. Component Class Function Complexity Analyzer PRECEPTComplexityAnalyzer Estimates tool/reasoning/retrieval steps via pattern detection Smart Rollout SmartRolloutStrategy Allocates rollouts based on score (0.98â , 0.9â , elseâ ) Pareto Selection pareto_select() Selects from non-dominated front by hypervolume contribution Table 7: COMPASS components and their corresponding implementation classes. 5.2 Theoretical Foundation: MAP-Elites for Strategy Diversity COMPASS integrates the MAP-Elites principle (Mouret & Clune, 2015) to prevent the âconvergence collapseâ observed in static optimization. The Digital Red Queen (DRQ) paper demonstrates that agents evolved through static optimization become âless behaviorally diverse across independent runs,â collapsing toward a single strategy that fails when blocked. Definition 5.1 (Strategy Diversity via MAP-Elites). MAP-Elites maintains a grid of strategy niches, each containing the best-performing strategy for a behavioral phenotype. COMPASS implements this through: 1. Diversity Threshold (diversity_threshold = 0.7): Minimum diversity score to consider strategies sufficiently distinct 2. Diversity Rollouts (diversity_rollouts = 5): Extra rollouts allocated when diversity is low 3. Behavioral Phenotyping: Strategies characterized by dominant_dimension (tool_use, retrieval, reasoning, verification) Definition 5.2 (Topological Distinctness). Two strategies S1, S2 are topologically distinct if: FailureModesâ(S1)â©FailureModesâ(S2)=â FailureModes(S_1) (S_2)= COMPASS maintains topologically distinct alternatives via Pareto selection across multiple objectivesâif the primary strategy fails, the Pareto front contains alternatives that succeeded on different objective combinations. Algorithm: When diversity_score << diversity_threshold, COMPASS allocates diversity_rollouts additional evaluations to discover behaviorally distinct candidates: ⏠if diversity_score < diversity_threshold then num_rollouts â diversity_rollouts // Explore for diverse strategies focus â "diversity" This prevents the âgreedy convergenceâ that traps agents relying on single-strategy optimization, ensuring PRECEPT has pre-calculated alternatives when the obvious path is blocked. 5.3 Complexity Analysis COMPASS employs a pattern-based complexity analyzer (PRECEPTComplexityAnalyzer) that estimates task difficulty across four dimensions: tool usage (estimated tool chain length weighted by detected tool patterns), retrieval (entity extraction and relationship counting to estimate retrieval hops), reasoning (pattern detection for multi-step inference), and verification (presence of validation requirements). Each dimension receives a weighted score; the dominant dimension and aggregate step estimate determine the taskâs ComplexityEstimate. An optional ML-based confidence override and history-based adjustment refine predictions for previously-seen domains. This lightweight analysis (Oâ(|tâaâsâk|)O(|task|) in task text length) feeds directly into the smart rollout allocation described next. 5.4 Smart Rollout Allocation Given the complexity estimate, COMPASS dynamically allocates rollouts via a tiered decision function: near-perfect scores (â„0.98â„ 0.98) trigger early stopping; high scores prompt diversity or consistency checks; otherwise, the number of rollouts scales with estimated task complexity, with additional allocation for recovery after failed attempts. This yields a reduction in rollouts compared to a uniform baseline while preserving solution quality. 5.5 Pareto-Optimal Selection After rollouts produce candidate prompts, the evaluated COMPASS compilation path selects the best using bi-objective Pareto optimality over task success rate and step efficiency (Figure 6b). Candidate A dominates candidate B iff A is at least as good on both objectives and strictly better on at least one. Non-dominated candidates form the Pareto front. From this front, the compilation winner is selected by weighted priority: 0.7Ăsuccess_rate+0.3Ăstep_efficiency0.7Ăsuccess\_rate+0.3Ăstep\_efficiency, prioritizing task success as the primary objective while still rewarding efficiency. Repeated candidate evaluations are cached to avoid redundant rollouts across compilation cycles. 5.6 Multi-Objective Scoring and Verified Evolution All COMPASS scores are derived empirically from actual task execution, not heuristics. Each rollout produces execution metrics aggregated into two primary objectives: task success rate (ââ[successi]/n 1[success_i]/n) and step efficiency (1/(1+sÂŻ/smax)1/(1+ s/s_ ), where smax=1+MAX_RETRIESs_ =1+MAX\_RETRIES). Pareto selection over these objectives ensures strategies are both effective and efficient. Verified prompt evolution (Figure 6c) uses real agent execution signals rather than heuristic scoring: the agent executes tasks under a candidate prompt, the environment verifies against hidden ground truth, and only binary success/failure signals are returned. The agent never sees expected solutions, ensuring honest feedback without solution leakageâunlike LLM-as-judge or keyword-matching approaches that provide biased or unreliable signals. GEPA evolution pipeline. Each trigger invokes a three-step server-side pipeline: (1) Reflective analysisâthe LLM diagnoses the failing trajectory, identifying root causes and suggested fixes (structured as GEPAReflection); (2) Prompt mutationâthe LLM generates an improved prompt variant incorporating the reflections and any learned rules (structured as GEPAMutation); (3) Pareto updateâthe new candidate is checked against the existing Pareto front: if it is dominated, it is discarded; otherwise, it is added and any candidates it dominates are removed. Parents for mutation are selected stochastically from the Pareto front, weighted by average score with exploration noise, ensuring diverse exploration rather than greedy convergence. Two-path prompt selection. PRECEPT maintains two complementary evolution paths. The COMPASS compilation path generates multiple candidates in a single batch, evaluates each via smart rollouts on validation tasks, and Pareto-selects the compilation winner using the 0.7/0.3 weighted rule above. The GEPA Pareto front path accumulates candidates incrementally across triggers, maintaining a diverse non-dominated set. In the evaluated runtime, the server-side prompt retriever get_evolved_prompt() makes the final deployment choice as follows: if the compilation winnerâs score exceeds the acceptance threshold (PRECEPT_COMPASS_MIN_SCORE=0.6), that compiled prompt becomes active; otherwise the system falls back to the GEPA Pareto front and selects the candidate with highest task_success_rate; the base prompt serves as the final fallback. In both paths, the current learned rules are dynamically appended to the selected prompt, ensuring the active instructions always reflect the latest knowledge state. 5.7 Dual-Frequency Control Loop COMPASS separates lightweight per-step monitoring from heavyweight event-driven optimization, addressing the latency/cost concern of continuous optimization. Figure 7 illustrates this dual-frequency control loop. evaluate_actionConstraint checkevaluate_errorPattern matchlearn_patternRule updateHIGH-FREQ MONITOR (every step, Oâ(1)O(1))New RuleGoal FailPhase ChangeTRIGGER EVENTSemitscompileContext buildPrompt EvolveGEPA mutationPareto SelectBi-objectiveMemory PruneMAP-ElitesLOW-FREQ ARCHITECT (on trigger, Oâ(n)O(n))activatesevery agent stepon trigger only Figure 7: COMPASS dual-frequency control loop. The high-frequency monitor runs at every agent step with Oâ(1)O(1) cost for real-time constraint checking and pattern learning. When trigger events are emitted (new rule discovered, goal failure, phase change), the low-frequency architect activates for strategic re-planning: context compilation, GEPA-based prompt evolution, Pareto selection of candidates, and MAP-Elites-guided memory pruning. High-Frequency (Monitor Mode, every step, Oâ(1)O(1)). Three lightweight functions run at every iteration. evaluate_action() checks for blocking constraints before execution (returning BLOCK, PIVOT, FAST_PATH, or PROCEED). evaluate_error() classifies failures and triggers epistemic probes when appropriate. learn_pattern() updates pattern confidence. All operate via Oâ(1)O(1) logical checks with sub-millisecond latency. Low-Frequency (Architect Mode, on trigger, Oâ(n)O(n)). Heavyweight prompt evolution runs only on trigger events: accumulated patterns, exhausted retries, or phase transitions (training â testing). The architect analyzes feedback patterns, generates prompt candidates, evaluates via smart rollouts, and selects via Pareto optimization. This separation provides real-time constraint enforcement at every step while limiting expensive optimization to events where it yields measurable benefitâreducing rollout cost without weakening the constraint checks executed online. Sections 2â5 described what PRECEPT does. We now establish why it works: closed-form theoretical bounds that predict the empirical advantages validated in Section 7. 6 Theoretical Analysis For readability, the detailed proofs are collected in Appendix B. Here we state the main bounds together with their modeling assumptions. PRECEPTâs theoretical advantages are established through closed-form bounds across six dimensions. Table 8 summarizes the main results. Metric Formula / Result Theorem PRECEPT vs Baseline First-Try Success Rate P1P_1 W+B+BW+Bâ Câ(T,E,ÎČ)â Plearnâ(R)â α WW+B+ BW+B· C(T,E,ÎČ)· P_learn(R)·α B.1 Assumed anchors: αP=0.85 _P=0.85, αB=0.50 _B=0.50 (sensitivity in Appendix) Multi-Condition Degradation αverbalâ(N)=αverbalâ(1)â pNâ1 _verbal(N)= _verbal(1)· p^N-1; αPRECEPTâ(N)=const _PRECEPT(N)=const B.2 22.6Ă22.6Ă at N=10N=10 (illustrative anchors) Drift Resilience Pâ(stale persists)â€(1âd)ΞP(stale persists)â€(1-d)^Ξ B.4, B.5 64Ă64Ă in the local stationary-segment model Partial Match Error 1âpNâ(1âp)N1-p^N-(1-p)^N vs 0 (PRECEPT) B.6 94.4% vs 0% at N=10N=10 (illustrative p=0.75p=0.75) Zero Retry Waste (default pruning mode) Pâ(retry_failed)=0P(retry\_failed)=0 via RefineInterceptor B.7 Provable guarantee Compositional Coverage 2Nâ12^N-1 from N atomic precepts 3.1 Exponential Table 8: Summary of theoretical bounds. Full proofs in Appendix B. The key insight is that PRECEPTâs advantages grow exponentially with task complexity: at N=1N=1 condition, the advantage is a modest 1.7Ă1.7Ă; at N=10N=10 conditions, the illustrative bound in Corollary B.3 reaches 22.6Ă22.6Ă. This follows from verbal baselinesâ exponential degradation (pNâ1p^N-1 under the independence approximation, with illustrative per-condition accuracy pâ0.75pâ 0.75) while PRECEPTâs hash-based retrieval maintains constant effectiveness regardless of condition count. Similarly, under the local stationary-segment detection model of Corollary B.5, drift resilience follows from the threshold-based invalidation mechanism: with illustrative detection rates d=0.95d=0.95 and Ξ=2Ξ=2, stale rules persist with probability (0.05)2=0.0025(0.05)^2=0.0025 versus (0.40)2=0.16(0.40)^2=0.16 for verbal baselinesâa 64Ă64Ă ratio. The experiments are intended to validate the qualitative trend and order of magnitude of these advantages, not to claim that these exact constants hold universally outside the modeled regime. 7 Experiments The paper reports nine experiments in total. Experiments 1â7 form the core validation of the three contributions: Experiments 1â3 establish the compositional rule learning advantage and its training requirements (Contribution 1); Experiments 4â5 demonstrate continuous learning and rule persistence during deployment; Experiment 6 validates Bayesian conflict resolution under adversarial static knowledge (Contribution 2, Type I); and Experiment 7 tests drift adaptation under environment change (Contribution 2, Type I). COMPASS (Contribution 3) operates throughout as the prompt-evolution layer. Experiments 8â9 provide targeted follow-up stress tests that isolate the low-frequency COMPASS outer loop under matched-key and OOD semantic regimes. This structure ensures that each experiment stresses a specific aspect of the unified architecture while relying on the other components being functional. 7.1 Experimental Setup Domains. Three domains with structured error patterns spanning a wide complexity range: Domain Description E (Unique Keys) Options TtrainT_train (ÎČ=3) Integration OAuth failures, API errors 6 15 18 Booking Reservation failures, overbooking 17 20 51 Logistics Port closures, customs delays 4 4 12 Table 9: Evaluated domains and their core training-time complexity statistics. These domains span from low-complexity (Logistics: E=4E=4, 4 options) to high-complexity (Booking: E=17E=17, 20 options), testing PRECEPT across diverse error pattern structures. Experiment 1 evaluates all three domains; Experiments 2â6 focus on Integration and Logistics to provide consistent cross-experiment comparison across the two domains with the widest complexity contrast. 7.1.1 Experimental Data Design: Black Swans in the Dark Standard agent benchmarks (grid-worlds, mazes, AlfWorld) present environments where the action space is fully enumerable and the transition function is visible or quickly learnable. We deliberately break this assumption by constructing three domains that function as hidden constraint-satisfaction problems: (1) solution mappings are opaque by constructionâthe correct answer is a deterministic keyed mapping fâ(MD5â(condition_key))f( MD5( condition\_key)) that is undeducible from conditions; MD5 is used here as an implementation primitive for deterministic opacity (not as a security claim), and any fixed seeded opaque mapping would serve equivalently; (2) error signals are deliberately uninformativeâvague domain-specific codes that do not narrow the search; and (3) conditions are compositional and overlappingâdifferent composite keys share components but map to different solutions, creating a majority-vote trap where approximate retrieval develops confident but wrong generalizations. This design is a stress test for exact retrieval under minimal semantic leakage; in domains where conditions and solutions are semantically aligned, approximate methods may perform better than on this benchmark. Domain Options E PrandP_rand LLM Prior Bias Primary Difficulty Logistics 4 4 25% Low (geographic ports) Majority-vote trap from component overlap Integration 2* 6 50%* High (brand-name priors) Adversarial naming + prior override Booking 2* 17 50%* Low (IATA codes) Largest key space + phantom inventory Table 10: Benchmark difficulty summary across the three evaluated domains. *Multi-condition valid solutions only. Full option spaces: Integration 15, Booking 20. Logistics simulates global shipping with E=4E=4 port-closure conditions and 4 valid alternatives. The majority-vote trap is acute: composite keys share 2â3 conditions but map to different ports via MD5 hash, so component-level generalizations are actively misleading. Integration simulates API orchestration with E=6E=6 error conditions and only 2 valid solutions: salesforce-backup and hubspot-v2âsuffixed variants of famous brands whose base names (salesforce, hubspot) are the wrong answers. The LLMâs parametric prior overwhelms in-context guidance, creating the hardest domain. Booking simulates flight reservations with E=17E=17 conditions and 20 options (only 2â3 valid), testing scalability to large, sparse key spaces with deceptive success signals. Together, the three domains ensure that no single retrieval shortcut succeeds across all settings; only exact composite-key â solution mappings retrieved deterministicallyâPRECEPTâs core mechanismâcan consistently navigate these dark mazes. Baselines (Enhanced). Both baselines are substantially improved over their original implementations: Full Reflexion (enhanced from (Shinn and others, 2023)) adds vector database integration, condition-aware metadata pre-filtering, BM25+semantic hybrid retrieval via RRF, and structured prompts; ExpeL (enhanced from (Zhao and others, 2023)) adds condition-aware metadata filtering, BM25+semantic hybrid retrieval, structured insight extraction, and direct solution storage. These enhancements substantially reduce obvious implementation confounds; the remaining gap is therefore most consistently explained by PRECEPTâs exact-vs-approximate retrieval boundary, together with its additional architectural featuresâprocedural memory, rule invalidation with confidence decay, the RefineInterceptorâs deterministic pruning, and COMPASS prompt evolutionârather than by simple implementation disadvantage. Protocol. âą Independent runs: N=10N=10 seeds âą Confidence intervals: 95% (t-distribution) âą Statistical tests: Paired t-test, Bonferroni correction âą Effect sizes: Cohenâs d Inference scope. Statistical tests are organized at the experiment level: each experiment defines a primary comparison aligned to its research question, and Bonferroni correction is applied within that experimentâs reported family of comparisons. Because the paper also reports secondary diagnostics across multiple encounters, domains, and ablations, we emphasize 95% confidence intervals and effect sizes alongside p-values, and treat marginal COMPASS results (Experiments 8â9) as scoped evidence rather than universal gains. Cross-experiment protocol summary. Exp. Focus Domains Evaluation regime Seeds 1 Main comparison Integration, Booking, Logistics Mixed matched+harder cases (test-mode both) 10 / domain 2 Compositional generalization Integration, Logistics Train on atomics; test 2-way and 3-way compositions 10 / config 3 Training-size ablation Integration, Logistics Matched multi-condition regime (N=5N=5) across ÎČâ1,âŠ,5ÎČâ\1,âŠ,5\ 10 / ÎČ / domain 4 Continuous learning Integration, Logistics Sequential encounters after minimal training (ÎČ=1ÎČ=1) 9â10 5 Rule persistence Integration, Logistics Restart with unchanged mapping (s0=s1s_0=s_1) 9â10 6 Static knowledge ablation Integration, Logistics With/without adversarial static knowledge 10 / config 7 Drift adaptation Integration, Logistics Train with s0s_0, test with shifted mapping s1s_1 10; final logistics encounter 4 uses 8 valid traces 8 COMPASS matched ablation Integration Outer-loop ablation in matched-key regime 10 9 COMPASS OOD semantic ablation Integration Outer-loop ablation in OOD semantic regime 10 Table 11: Cross-experiment protocol summary, clarifying which evaluation regime is used in each experiment. Models. All experiments use GPT-4o-mini (gpt-4o-mini, OpenAI) as the LLM for all three agents (PRECEPT, Full Reflexion, ExpeL), with temperature 0.30.3 and max tokens 200200. Embedding-based retrieval (ChromaDB vector stores for both dynamic experience and static knowledge) uses text-embedding-3-small (OpenAI, 1536 dimensions). Both models are held constant across all agents and all experiments, helping isolate architectural mechanisms from model-capacity differences. COMPASS Hyperparameters. Parameter Value Description Compilation candidates 5 Prompt variants generated per compilation cycle Rollouts per candidate 3 Base rollouts (adjusted by smart strategy) Acceptance threshold 0.6 Min score to adopt an evolved prompt Pareto weights 0.7 / 0.3 success_rate / step_efficiency Evolution interval 2 tasks Trigger frequency for lo-freq architect Diversity threshold 0.7 Min diversity to skip diversity rollouts Diversity rollouts 5 Extra rollouts when diversity is low Early-stop score 0.98 Score above which rollouts are skipped Table 12: COMPASS hyperparameters used in all reported experiments. 7.2 Experiment 1: Main Domain Comparison Research Question: How does PRECEPT compare against enhanced baselines across diverse structured-decision domains? Setup: All 3 domains (Integration, Booking, Logistics), N=5N=5 composite condition keys, ÎČ=3ÎČ=3 (moderate training), max 4 retries, 10 seeds per domain. All agents use the enhanced baseline implementations described in §7.1. The domains span a wide complexity range: from Logistics (E=4E=4 unique condition keys, 4 options) to Booking (E=17E=17 unique condition keys, 20 options), testing PRECEPT across diverse error pattern structures where inter-scenario condition overlap is substantialâthe key architectural differentiator of exact vs. approximate retrieval. 7.2.1 Primary Results First-try success rate P1P_1 (mean ± 95% CI, 10 seeds per domain). Domains ordered by PRECEPT advantage. Domain E Options PRECEPT P1P_1 FR P1P_1 ExpeL P1P_1 Integration 6 15 80.0%± 12.3 36.7%± 7.5 43.3%± 8.3 Booking 17 20 94.1%± 4.9 51.8%± 14.0 90.0%± 6.9 Logistics 4 4 95.0%± 5.0 57.5%± 14.7 90.0%± 9.2 Average 89.7% 48.6% 74.4% Table 13: Experiment 1 first-try success (P1P_1) across the three main domains. Statistical significance (paired t-test, Bonferroni corrected across 3 domains): PRECEPT vs FR â Integration +43.3p (pcorr=0.0005p_corr=0.0005, d=1.93d=1.93), Booking +42.4p (pcorr=0.0002p_corr=0.0002, d=2.26d=2.26), Logistics +37.5p (pcorr=0.0003p_corr=0.0003, d=2.12d=2.12); all corrected p<0.001p<0.001, all Cohenâs d>1.9d>1.9 (large effects). PRECEPT vs ExpeL â Integration +36.7p (pcorr=0.0001p_corr=0.0001, d=2.39d=2.39); Booking +4.1p (pcorr=1.000p_corr=1.000, n.s.) and Logistics +5.0p (pcorr=1.000p_corr=1.000, n.s.) â ExpeL approaches PRECEPT on these two domains. Overall success rate PtP_t and average steps per task (mean ± 95% CI, 10 seeds). Domain PRECEPT PtP_t FR PtP_t ExpeL PtP_t PRECEPT Steps FR Steps ExpeL Steps Integration 83.3%± 11.2 41.7%± 6.3 46.7%± 5.0 2.72± 0.46 7.83± 0.58 6.43± 0.53 Booking 99.4%± 0.6 94.7%± 5.3 98.8%± 1.2 2.15± 0.12 4.60± 0.86 2.40± 0.29 Logistics 100.0%± 0.0 80.0%± 11.3 97.5%± 2.5 2.10± 0.23 5.25± 0.76 2.45± 0.52 Average 94.2% 72.1% 81.0% 2.32 5.89 3.76 Table 14: Experiment 1 overall success (PtP_t) and step efficiency across the three main domains. Figure 8: Experiment 1 main comparison across the three evaluated domains: first-try success and step efficiency. 7.2.2 Key Findings (1) Decisive lead across all domains. Figure 8 compares P1P_1 and step efficiency across the three high-complexity domains. Mean P1=P_1=89.7% vs FR 48.6% (+41.1p) and ExpeL 74.4% (+15.3p), with 2.32 avg steps vs FR 5.89 (2.5Ă2.5Ă overhead). All three domains show corrected p<0.001p<0.001 vs FR (Cohenâs d=1.93d=1.93â2.262.26). Against ExpeL, the advantage is significant only on Integration (+36.7p, d=2.39d=2.39, pcorr=0.0001p_corr=0.0001) but not Booking or Logistics, where ExpeL approaches PRECEPT. (2) Advantage driven by condition overlap and LLM prior bias. Integration produces the largest gap (+43.3p vs FR) despite fewer condition keys than Booking, because correct solutions are suffixed variants of famous brands (salesforce-backup vs salesforce), triggering LLM parametric priors that override learned guidance. Booking (+42.4p vs FR) has the largest solution space but atomic option names without brand-name ambiguity; ExpeL survives there (P1=90.0%P_1=90.0\%) but collapses on Integration (P1=43.3%P_1=43.3\%, d=2.39d=2.39). (3) Near-optimal step efficiency. PRECEPT achieves 2.10â2.72 avg steps across all domains (theoretical minimum: 2.0). FR requires 4.60â7.83 steps (2.02.0â2.9Ă2.9Ă overhead). On Integration, FR permanently fails ⌠58% of tasks even with retries (Pt=41.7%P_t=41.7\% vs PRECEPTâs 83.3%). 7.2.3 Analysis: Why Integration Baselines Fail Integration exhibits the most extreme baseline failure: FR achieves P1=36.7%P_1=36.7\%, Pt=41.7%P_t=41.7\%; ExpeL achieves P1=43.3%P_1=43.3\%, Pt=46.7%P_t=46.7\%âyet on Booking, FR recovers to Pt=94.7%P_t=94.7\% and ExpeL reaches P1=90.0%P_1=90.0\%. Log trace analysis across all 10 seeds reveals two compounding LLM limitations: (1) LLM Prior Bias. Integrationâs correct solutions are suffixed variants of famous brands, e.g. salesforce-backup and hubspot-v2. The LLMâs parametric prior overwhelms in-context guidance: FR selects salesforce on all 5 attempts for tasks requiring salesforce-backup. ExpeLâs chain-of-thought explicitly identifies the correct suffixed variant, yet the generated output reverts to the base brand nameâconsistent with known unfaithful reasoning findings (Turpin et al., 2024). Bookingâs synthetic codes (DL-123) have no competing priors, rendering this failure mode absent. (2) LLM Insight Dismissal. Even when correct insights are retrieved and presented in context, the LLM frequently chooses not to apply them. In a representative seed (42), 3 of 6 episodes fail because the LLM either ignores insights entirely (0/5 attempts applied) or abandons them after early attempts. This is a fundamental reliability limitation: insight-augmented architectures require the LLM to not only retrieve correct knowledge but also choose to use it. Both are architectural properties of LLM-based generation, not implementation artifacts. On the exact-match path, PRECEPT avoids this failure mode: structured rules store exact condition_keyâsolution condition\_keyâ solution mappings as programmatic data retrieved via Oâ(1)O(1) hash lookup, bypassing LLM interpretation and generation-stage interference. 7.3 Experiment 2: Compositional Semantic Generalization Setup. Train on 1-condition (atomic) scenarios, test on 2â3 condition (composite) scenarios. Domains: Integration and Logistics, each evaluated in 2-way and 3-way configurations (4 configurations total). Training: ÎČ=3ÎČ=3 repetitions over 8 semantic atoms per domain (24 training tasks per config). Testing: 10 composite tasks per configuration. Max 4 retries, N=10N=10 seeds per configuration (40 runs total). Figure 9: Experiment 2 compositional generalization across logistics and integration. PRECEPT reaches 100% P1P_1 on 2-way logistics compositions and shows the strongest overall compositional performance. Compositional generalization results per domain (N=10N=10 seeds per configuration). Overall: 4 configurations Ă 10 seeds == 40 runs. P1P_1: first-try success; PtP_t: eventual success after retries. Significance: pâ<0.05^*p<0.05, pâ<0.01^**p<0.01, pââŁâ<0.001^***p<0.001. Domain Config PRECEPT P1P_1 FR P1P_1 ExpeL P1P_1 PRECEPT PtP_t FR PtP_t ExpeL PtP_t dP1d_P_1 (vs FR) Logistics 2-way 100.0%± 0.0 57.3%± 11.6 47.7%± 14.6 100.0%± 0.0 97.8%± 3.4 96.0%± 5.0 2.64â 3-way 78.0%± 9.4 43.0%± 13.9 40.0%± 10.1 99.0%± 2.3 97.0%± 3.5 93.0%± 5.9 1.31â Integration 2-way 41.7%± 33.4 18.1%± 16.4 11.2%± 11.2 53.3%± 32.7 32.4%± 16.9 42.4%± 20.7 0.84â 3-way 49.0%± 25.7 17.0%± 11.5 25.0%± 21.6 58.3%± 30.1 42.0%± 24.7 38.7%± 23.9 0.90â Overall 67.2%± 24.0 33.9%± 18.7 31.0%± 20.5 77.7%± 22.7 67.3%± 16.9 67.5%± 19.4 1.55â Table 15: Experiment 2 compositional generalization results across logistics and integration. Figure 9 visualizes the per-domain compositional results. Overall P1P_1 effect sizes are large: d=1.55d=1.55 vs FR (p<0.001p<0.001) and d=1.62d=1.62 vs ExpeL (p<0.001p<0.001). The largest per-configuration effect (d=2.64d=2.64, logistics 2-way) reflects PRECEPTâs 100% P1P_1 vs ⌠48â57% for baselines; integration shows smaller but significant effects (d=0.84d=0.84â0.900.90), reflecting its higher inherent difficulty. Retry recovery (PtP_t). PRECEPTâs PtP_t advantage narrows on logistics (100% / 99% vs baselinesâ 93â98%) because the small option space (||=4|S|=4) allows brute-force recovery. On integration, PRECEPT retains the lead (Pt=53.3P_t=53.3â58.3%58.3\% vs FR 32.4â42.0% and ExpeL 38.7â42.4%), confirming that even with retries, approximate retrieval cannot reliably recover on larger option spaces. The P1âPtP_1â P_t gap itself is informative: PRECEPTâs gap is small on logistics (0â21p) and moderate on integration (⌠10p), while baselines show large gaps on logistics (⌠40++p), indicating heavy reliance on brute-force retries rather than first-try knowledge application. 7.4 Experiment 3: Training Size Ablation (ÎČ Effect) Setup. Training exposure ÎČâ1,2,3,4,5ÎČâ\1,2,3,4,5\ (number of encounters per error type), with Ttrain=ÎČĂET_train=ÎČĂ E. All baselines receive the same data, feedback, and retry budget (max 5 attempts). Evaluated on logistics (E=4E=4) and integration (E=6E=6), N=5N=5 conditions per composite key, 10 seeds per ÎČ per domain (100 total runs). We evaluate at N=5N=5 rather than N=1N=1 because single-condition settings mask the exact-vs-approximate retrieval distinction; component overlap at Nâ„2Nâ„2 creates retrieval interference that differentiates Oâ(1)O(1) hash-based lookup from verbal-memory approaches (§7.4.3). 7.4.1 Primary Results: Multi-Condition (N=5N=5) A pilot study at N=1N=1 (seed=42, Appendix C) confirmed the degenerate-case hypothesis: all agents achieve near-100% PtP_t and baselines match PRECEPT at ÎČâ„3ÎČâ„3, validating our choice of N=5N=5 for the primary evaluation. Figure 10 plots P1P_1 and average steps as a function of ÎČ. Results from 10 independent seeds per ÎČ value per domain (100 total runs across both domains). All values reported as mean ± 95% CI. Figure 10: P1P_1 and Avg Steps vs Training Exposure (ÎČ effect) across both domains. PRECEPT achieves 100% P1P_1 on integration at ÎČâ„3ÎČâ„3 and 87.5â92.5% on logistics, with near-optimal 2.0-step efficiency. Table 16: Primary Exp3 results (N=5N=5, 10 seeds per ÎČ). Bold = best P1P_1/Steps. Significance (paired t-test): pâ<0.05^*p<0.05, pâ<0.01^**p<0.01, pââŁâ<0.001^***p<0.001. P1P_1 columns: markers on d values. Steps columns: markers on baseline values indicate PRECEPT-vs-baseline step significance. Domain ÎČ P1P_1 (%) Avg Steps P1P_1: vs FR P1P_1: vs ExpeL PRECEPT FR ExpeL PRECEPT FR ExpeL d p d p Integration 1 63.3 35.0 41.7 3.58 8.13â 6.27â 0.44 0.194 0.36 0.282 2 98.3 45.0 36.7 2.08 7.33â 6.77â 5.06â <<0.001 3.19â <<0.001 3 100.0 38.3 48.3 2.00 7.63â 6.03â 3.90â <<0.001 9.80â <<0.001 4 100.0 43.3 46.7 2.00 7.27â 6.27â 4.86â <<0.001 5.06â <<0.001 5 98.3 46.7 48.3 2.02 7.07â 6.03â 5.46â <<0.001 6.36â <<0.001 Logistics 1 77.5 67.5 77.5 2.80 4.35â 3.25 0.19 0.565 0.00 1.000 2 92.5 75.0 72.5 2.33 4.10â 3.35â 1.04â 0.010 0.77â 0.037 3 92.5 60.0 72.5 2.30 5.00â 3.40â 1.93â <<0.001 1.26â 0.003 4 92.5 55.0 60.0 2.25 5.05â 4.10â 1.77â <<0.001 1.58â <<0.001 5 87.5 72.5 77.5 2.53 4.75â 3.25â 0.62 0.081 0.77â 0.037 Key Findings. (1) PRECEPT achieves perfection on Integration at ÎČâ„ 3. On the Integration domain, PRECEPT reaches 100.0% P1P_1 at ÎČ=3 and ÎČ=4 (with 98.3% at ÎČ=2 and 5), while Full Reflexion stays between 35.0â46.7% across all ÎČ values. The effect sizes are very large: Cohenâs d=3.90d=3.90â5.465.46 at ÎČâ„2ÎČâ„ 2 (all p<0.001p<0.001). On Logistics, PRECEPT maintains 87.5â92.5% P1P_1 at ÎČâ„2ÎČâ„ 2 vs FRâs 55.0â75.0%, with d=1.04d=1.04â1.931.93 at ÎČ=2â4 (all p<0.01p<0.01). Evaluation-regime clarification (Exp1 vs Exp3). The apparent discrepancy between Exp1 Integration (P1=80.0%P_1=80.0\%) and Exp3 Integration (P1=100.0%P_1=100.0\% at ÎČâ„3ÎČâ„3) reflects different test regimes rather than a contradiction. Exp1 uses --test-mode both, which mixes matched keys with harder unseen/unmatched cases, while Exp3 uses --test-mode matched to isolate training-exposure effects under matched key distributions. Thus Exp3 reports in-distribution mastery after sufficient exposure, whereas Exp1 reports broader mixed-regime generalization under a harder evaluation setting. (2) Near-optimal step efficiency on both domains. PRECEPT requires 2.00â2.08 avg steps on Integration at ÎČâ„2ÎČâ„ 2 (the theoretical minimum is 2.0) and 2.25â2.53 on Logistics. Full Reflexion requires 7.07â8.13 steps on Integration (a 3.5â4.1Ă overhead) and 4.10â5.05 on Logistics. ExpeL requires 6.03â6.77 on Integration and 3.25â4.10 on Logistics. The step gap is largest on Integration, confirming that approximate retrieval degrades most severely in high-complexity domains. (3) No significant difference at ÎČ=1. On Logistics, with only 4 training episodes, PRECEPT (77.5%) and ExpeL (77.5%) tie (p=1.0p=1.0), confirming PRECEPTâs advantage emerges from learning, not from an architectural head start. On Integration (ÎČ=1), PRECEPT (63.3%) leads FR (35.0%) but the difference is not significant (p=0.19p=0.19, d=0.44d=0.44) due to high variance from the cold-start difficulty of the integration domain. (4) Integration reveals PRECEPTâs strongest advantage. The Integration domainâwith its larger option space (15 solutions vs 4) and obscure variant namesâamplifies the exact-vs-approximate retrieval gap. PRECEPTâs P1P_1 advantage over FR reaches +61.7p at ÎČ=3 (Integration) vs +32.5p (Logistics). This domain-dependent effect size gradient confirms that PRECEPTâs architectural advantage grows with domain complexity. 7.4.2 Analysis: Why Approximate Retrieval Fails at N=5N=5 The N=1âN=5N=1â N=5 transition exposes four structural factors that explain why baselines degrade sharply with composite conditions (detailed verification tables in Appendix C). The Majority-Vote Trap. At N=1N=1, each atomic key is self-contained: a reflection about R-482 cannot interfere with one about SH-701. At N=5N=5, composites share components extensively but their solutions are determined by MD5 hash, making them completely uncorrelated with component-level similarity. Three composites may share R-482, but two map to ningbo while the third maps to hamburg. A baseline that learns âR-482â\,â\,ningboâ from the majority develops a confident but wrong generalization for the minority key. The 10-seed data confirms: at ÎČ=1ÎČ=1 (before overlap accumulates), PRECEPT and ExpeL tie at 77.5% (p=1.0p=1.0); by ÎČ=3ÎČ=3, FR collapses to 60.0% while PRECEPT holds 92.5% (p<0.001p<0.001, d=1.93d=1.93). On Integration, the gap is more extreme: 100% vs 38.3% (d=3.90d=3.90). Brute-Force Undermined. At N=1N=1, brute-force search over 3â4 alternatives serves as a reliable safety net (all agents reach near-100% PtP_t). At N=5N=5, retrieval interference misdirects retries: FR fails 10â17.5% of Logistics tasks despite only 4 valid options, averaging 5.00 steps at ÎČ=3ÎČ=3 vs PRECEPTâs 2.30. Accumulation Paradox. More training data does not monotonically help baselinesâFRâs P1P_1 on Logistics follows a non-monotonic trajectory (67.5% â 75.0% â 60.0% â 55.0% â 72.5%), and on Integration it stagnates at 35â47% across all ÎČ values. PRECEPT maintains 87.5â100% on both domains at ÎČâ„2ÎČâ„2 because each rule is indexed by its exact composite key with zero cross-contamination. This analysis empirically validates Theorem B.2: baselinesâ verbal-memory architectures cannot maintain retrieval fidelity as key complexity grows, whereas PRECEPTâs Oâ(1)O(1) exact-match retrieval is invariant to N. 7.5 Experiment 4: Continuous Learning Research Question: Can PRECEPT learn during deployment from sequential task encounters, starting with minimal training? Setup. Logistics and integration domains, N=5N=5 composite condition keys, ÎČ=1ÎČ=1 (minimal training), 4 sequential encounters per condition key. Logistics: 10 seeds; Integration: 9 seeds (1 seed excluded due to an API timeout during testing). Retry budgets are domain-specific: logistics uses max 2 retries (4 unambiguous ports), integration uses max 4 retries (obscure suffixed variants require more exploration). Unlike Experiment 3 (how much prior training is needed), this experiment asks: given almost no training (ÎČ=1ÎČ=1), can the agent learn from sequential encounters? 7.5.1 Primary Results Figure 11: Experiment 4 continuous learning. PRECEPT improves fastest across repeated encounters, reaching 100% P1P_1 by encounter 4 on logistics and 70.4% on integration while maintaining the lowest step count. Cross-episode continuous learning (Logistics domain, N=5N=5, ÎČ=1, 10 seeds). P1P_1 and Avg Steps by encounter number (mean ± 95% CI). Significance: â p<0.01p<0.01 (PRECEPT vs FR). Encounter PRECEPT P1P_1 ExpeL P1P_1 FR P1P_1 PRECEPT Steps ExpeL Steps FR Steps 1st 44.8%± 10.7 36.6%± 12.7 38.8%± 8.3 3.24± 0.26 4.19± 0.48 4.12± 0.26 2nd 82.5%± 12.1â 65.0%± 19.2 62.5%± 15.2 2.38± 0.26 3.05± 0.57 3.40± 0.63 3rd 87.5%± 9.4â 72.5%± 13.2 60.0%± 12.5 2.25± 0.19 2.80± 0.42 3.50± 0.58 4th 100.0%± 0.0â 85.0%± 12.5 67.5%± 17.0 2.00± 0.00 2.50± 0.38 3.20± 0.64 Î (1stâ 4th) +55.2p +48.4p +28.7p â-1.24 â-1.69 â-0.92 Table 17: Experiment 4 continuous learning on logistics across sequential encounters. Logistics: All within-agent improvements from 1stâ 4th encounter are significant: PRECEPT (t=11.62, p<<0.001, d=3.68), ExpeL (t=5.95, p<<0.001, d=1.88), FR (t=4.11, p=0.003, d=1.30). Final encounter advantage: PRECEPT vs ExpeL p=0.024 (d=0.86), PRECEPT vs FR p=0.002 (d=1.37). Cross-episode continuous learning (Integration domain, N=5N=5, ÎČ=1, max 4 retries, 9 seeds). P1P_1 and Avg Steps by encounter number (mean ± 95% CI). Significance: â p<0.05p<0.05, â p<0.01p<0.01, â p<0.001p<0.001 (PRECEPT vs FR). Encounter PRECEPT P1P_1 ExpeL P1P_1 FR P1P_1 PRECEPT Steps ExpeL Steps FR Steps 1st 30.3%± 12.6â 18.5%± 9.0 16.8%± 9.2 3.95± 1.19 4.38± 1.28 4.45± 1.31 2nd 51.4%± 19.6â 21.1%± 8.5 17.7%± 11.2 3.11± 1.05 4.43± 1.29 4.49± 1.34 3rd 63.5%± 22.1â 27.2%± 14.2 23.5%± 19.2 2.61± 0.92 4.17± 1.28 4.24± 1.39 4th 70.4%± 23.8â 30.6%± 15.7 26.9%± 17.5 2.33± 0.87 4.04± 1.25 4.22± 1.35 Î (1stâ 4th) +40.1p +12.0p +10.1p â-1.62 â-0.35 â-0.23 Table 18: Experiment 4 continuous learning on integration across sequential encounters. Integration: PRECEPTâs improvement is significant (t=5.25, p<<0.001, d=1.75); baselinesâ improvements are not statistically significant: ExpeL (t=1.69, p=0.13, d=0.56), FR (t=1.46, p=0.18, d=0.49). Final encounter: PRECEPT vs FR p=0.0007 (d=1.80), PRECEPT vs ExpeL p=0.0016 (d=1.55). 7.5.2 Key Findings (1) Largest learning improvement. Figure 11 plots P1P_1 and average steps by encounter number for both domains, showing that PRECEPT reaches 100.0% P1P_1 by encounter 4 on logistics (+55.2p, d=3.68d=3.68) and 70.4% on integration (+40.1p, d=1.75d=1.75), with 2Ă2Ăâ4Ă4Ă steeper learning slopes than baselines (both p<0.001p<0.001). On integration, baselinesâ improvements are not statistically significant: ExpeL +12.0p (p=0.13p=0.13), FR +10.1p (p=0.18p=0.18). (2) Step-efficiency convergence. PRECEPT achieves the 2.0-step theoretical minimum on logistics and converges to 2.33 steps on integration (45% fewer than FRâs 4.22, 42% fewer than ExpeLâs 4.04). Baselines remain flat above 4.0 steps across all encounters. (3) Domain-dependent collapse. ExpeL is competitive on logistics (+48.4p, approaching PRECEPTâs +55.2p) but collapses to +12.0p on integrationâa 4Ă4Ă weaker improvementâconfirming that semantic retrieval degrades sharply when solution names trigger competing LLM priors. PRECEPTâs exact hash-based rules are substantially less exposed to this interference on the deterministic path, converting exploration into persistent Oâ(1)O(1) rules with 3.3Ă3.3Ăâ4.0Ă4.0Ă greater efficiency. 7.6 Experiment 5: Rule Persistence and Retrieval Fidelity Research Question: After training in one session and restarting with a different random seed, how faithfully does each agent retain and apply its learned knowledge? Setup. Train with drift salt s0=0s_0=0 (ÎČ=3ÎČ=3, N=5N=5), then restart and test with the same drift salt s1=0s_1=0 over 4 encounters per key (i.e., no drift). Across seeds, process randomness changes but the condition-key â solution mapping remains fixed because PRECEPT_DRIFT_SALT is unchanged and hashlib.md5 is deterministic. This isolates rule persistence fidelity: whether agents can faithfully retain and apply knowledge learned in a prior session. Integration domain: E=6E=6 keys, max 3 retries, 9 seeds. Logistics domain: E=4E=4 keys, max 3 retries, 10 seeds. Figure 12: Experiment 5 rule persistence after session restart. PRECEPT retains learned rules far more faithfully than the approximate-retrieval baselines. 7.6.1 Primary Results Rule persistence results (mean ± 95% CI). PRECEPT retains 100% P1P_1 on Integration and reaches 100% on Logistics by encounter 4. Domain Metric PRECEPT Full Reflexion ExpeL Integration Enc. 1 P1P_1 100.0%± 0.0 31.9%± 9.5 33.3%± 11.9 Enc. 4 P1P_1 100.0%± 0.0 44.8%± 18.8 46.7%± 17.4 Overall PtP_t 100.0%± 0.0 33.7%± 10.6 35.6%± 11.4 Avg Steps 2.00± 0.00 4.69± 0.39 4.62± 0.46 Logistics Enc. 1 P1P_1 88.5%± 8.8 58.0%± 16.3 68.5%± 14.6 Enc. 4 P1P_1 100.0%± 0.0 70.0%± 29.0 92.5%± 7.5 Overall PtP_t 100.0%± 0.0 85.0%± 15.0 97.5%± 2.5 Avg Steps 2.00± 0.00 2.90± 0.97 2.20± 0.25 Table 19: Experiment 5 rule persistence after session restart across integration and logistics. 7.6.2 Key Findings 1. PRECEPT achieves near-perfect rule retention (Figure 12). On Integration, PRECEPT maintains 100% P1P_1 with zero variance across all four encounters and all 9 seeds. Log verification confirms: stored rules from training are retrieved via Oâ(1)O(1) hash lookup and applied without LLM interpretation, yielding exactly 2.0 steps per task (one retrieval + one execution). On Logistics, PRECEPT achieves 88.5% at encounter 1 and 100% by encounter 4; the initial shortfall traces to occasional mislearned rules during concurrent training (race conditions in rule persistence with -ct -tw 4), which are corrected through subsequent encounters. 2. Baselines degrade despite unchanged solutions. On Integration, Full Reflexion (31.9%) and ExpeL (33.3%) achieve far lower P1P_1 at encounter 1 despite having access to relevant insights from training. Log traces (seed 42) confirm the same LLM failure modes identified in Experiment 1: insight dismissal and prior bias cause baselines to generate incorrect solutions even when their stored knowledge is correct. This demonstrates that approximate retrieval architectures suffer from retrieval fidelity loss independent of rule driftâthe LLMâs parametric priors corrupt the mapping from retrieved knowledge to action. 3. Step efficiency separates architectures. PRECEPTâs 2.0 steps across all encounters confirms zero-retry deterministic retrieval. Integration baselines require 4.6â4.7 steps (2.3Ă overhead), reflecting persistent trial-and-error from lossy approximate matching. This gapâin the absence of any actual solution changeâisolates the cost of LLM interpretation in the retrieval-to-action pathway. 7.7 Experiment 6: Static Knowledge Ablation (Type I Conflict) Research Question: When the retrieval pipeline is seeded with adversarial static knowledgeâplausible-sounding but systematically incorrect recommendations stored before any dynamic experienceâdoes PRECEPTâs ensemble conflict detector (Section 4.1) correctly identify and override the misinformation, or does it degrade performance? Setup. Each domain is evaluated under two configurations: with adversarial static knowledge (SK) and without SK. When SK is enabled, the DynamicStaticKnowledgeGenerator injects domain-specific recommendations into ChromaDB that superficially match the task vocabulary but prescribe incorrect solutions (e.g., recommending stripe for conditions whose MD5-derived valid solution is paypal). Training uses ÎČ=3ÎČ=3 tasks per condition key, testing uses 1 encounter per key (N=5N=5 conditions). Integration domain: E=6E=6 keys, max 4 retries, 10 seeds. Logistics domain: E=4E=4 keys, max 4 retries, 10 seeds. All three agents (PRECEPT, Full Reflexion, ExpeL) run identically across both configurations with preserved random states. Adversarial Design. The static knowledge is deliberately adversarial: for each condition key, the injected recommendation contradicts the dynamically correct solution. This tests the worst case for any system that retrieves prior knowledgeâwhere legacy documentation or stale expert opinions actively mislead the agent. PRECEPTâs ensemble conflict detector must fire when dynamic experience contradicts static knowledge, and the Bayesian resolution mechanism (Beta posteriors + Thompson Sampling) must correctly weight dynamic evidence over static priors. (a) Integration domain: adversarial in-vocabulary static knowledge reduces first-try performance, but PRECEPT remains clearly ahead and recovers partially through conflict-aware retries. (b) Logistics domain: PRECEPT incurs a small first-try penalty under adversarial static knowledge but still reaches 100% eventual success. Figure 13: Experiment 6 static-knowledge ablation (Type I conflict). Adversarial in-vocabulary static knowledge harms first-try performance, but PRECEPT retains the largest margins and the strongest retry-time recovery. 7.7.1 Primary Results Table 20. Static knowledge ablation results (mean ± 95% CI, N=10N=10 seeds per configuration). Bold = best P1P_1 per domain/configuration. SK Effect = (with SK) â- (without SK) in percentage points. Adversarial SK uses in-vocabulary wrong solutions: the same endpoints/ports agents actually choose from, but mapped to the incorrect option for each condition key. Domain Configuration PRECEPT P1P_1 FR P1P_1 ExpeL P1P_1 PRECEPT PtP_t FR PtP_t ExpeL PtP_t Integ. With Adv. SK 80.0± 9.4 38.3± 8.0 46.7± 5.0 81.7± 8.8 43.3± 8.3 48.3± 3.8 Without SK 85.0± 8.8 38.3± 9.8 50.0± 0.0 88.3± 9.8 48.3± 3.8 50.0± 0.0 SK Effect â-5.0p 0.0p â-3.3p â-6.7p â-5.0p â-1.7p Logist. With Adv. SK 92.5± 7.5 60.0± 12.5 85.0± 12.5 100.0± 0.0 85.0± 12.5 95.0± 5.0 Without SK 97.5± 2.5 57.5± 18.9 85.0± 15.0 97.5± 2.5 87.5± 12.5 97.5± 2.5 SK Effect â-5.0p +2.5p 0.0p +2.5p â-2.5p â-2.5p Table 20: Static knowledge ablation: impact of in-vocabulary adversarial static knowledge on all agents across both domains (N=10N=10 seeds). Adversarial SK recommends valid but incorrect options drawn from the same solution pool agents choose from. 7.7.2 Key Findings 1. In-vocabulary adversarial SK creates a genuine first-try penalty (Figure 13). When adversarial static knowledge recommends real, choosable options that are wrong for each condition key, all agents experience some degradation. PRECEPT drops â-5.0p P1P_1 on both domains; ExpeL drops â-3.3p P1P_1 on integration; even Full Reflexionâs PtP_t drops â-5.0p on integration. This confirms the adversarial design is effective: unlike out-of-vocabulary wrong solutions (which agents trivially ignore), in-vocabulary misinformation genuinely competes with correct options in the LLMâs reasoning. 2. PRECEPT recovers through retry-based conflict resolution. Despite the first-try penalty, PRECEPTâs PtP_t recovers on logistics (100% with SK vs 97.5% withoutâactually improving by +2.5p, Figure 13(b)) and shows only moderate degradation on integration (â-6.7p, Figure 13(a)). The recovery mechanism is precisely the Bayesian conflict resolution from Section 4.1: when PRECEPTâs first attempt follows the adversarial recommendation and fails, the failure updates the Beta posterior, deprioritizing the conflicted option. Thompson Sampling then drives exploration toward the correct solution. On logistics, this recovery is complete (Pt=100%P_t=100\%); on the harder integration domain, partial recovery reflects the larger option space. 3. Baselines lack systematic recovery from adversarial SK. Full Reflexion shows 0p P1P_1 change on integration (its self-generated reflections dominate over external SK, rendering it neither harmed nor helped) but drops â-5.0p PtP_t, suggesting that across retries, the conflicting SK occasionally diverts FR away from convergence. ExpeL drops â-3.3p P1P_1 on integration because it stores SK as insights without distinguishing adversarial from genuine knowledgeâits experience-accumulation architecture lacks any conflict detection mechanism. Neither baseline has a principled mechanism to identify and discard adversarial knowledge after observing its failure. 4. PRECEPT maintains dominant advantages under adversarial conditions. Even with in-vocabulary adversarial SK active: +41.7p over FR and +33.3p over ExpeL on integration P1P_1; +32.5p over FR and +7.5p over ExpeL on logistics P1P_1. Without SK: +46.7p and +35.0p on integration; +40.0p and +12.5p on logistics. PRECEPTâs absolute advantage narrows slightly under adversarial conditions (the adversarial SK is designed to target PRECEPTâs retrieval pathway), but the margin remains large (>>30p on integration, >>30p on logistics vs FR). This confirms that PRECEPTâs core advantageâcompositional rule learning with exact-match retrievalâis architecturally independent of the conflict resolution subsystem. 5. The asymmetry reveals architectural differences. PRECEPT is the most affected agent on P1P_1 (â-5.0p on both domains) precisely because it is the agent that most aggressively leverages retrieved knowledge. When that knowledge is poisoned, the first attempt suffers. However, PRECEPT is also the only agent with a principled recovery mechanism (Bayesian posteriors + Thompson Sampling), which closes the gap by PtP_t. Baselines are less affected on P1P_1 because they underutilize retrieved knowledge in the first placeâa weakness that manifests as consistently low P1P_1 regardless of SK configuration. 7.7.3 Simulation Results vs. Type I Theory We verify each component of the Type I conflict resolution framework (Section 4.1) against empirical trace data from all 40 runs (10 seeds Ă 2 configurations Ă 2 domains). Detection and Bayesian Convergence. The ensemble conflict detector behaves exactly as designed: with adversarial SK, 73â472 conflicts are detected per seed (severity escalating from low to high as dynamic evidence accumulates), while without SK, zero conflicts are detected across all 20 runs. The Bayesian posteriors converge as Definition 4.1 predicts: without SK, source reliabilities equal the exact Beta priors (static: 0.500, dynamic: 0.625); with adversarial SK, static reliability collapses to 0.01â0.06 while dynamic rises to 0.96â0.99. Consequently, every conflict across all 20 with-SK runs is resolved in favor of dynamic experience (0 static wins), consistent with rapid posterior concentration under the stationary-segment interpretation of Theorem 4.1; we do not claim a global non-stationary regret bound from this result. P1P_1 Penalty and Recovery Mechanism. The empirical â-5.0p P1P_1 penalty on both domains matches Theorem B.1âs prediction: adversarial SK temporarily reduces the effective retrieval accuracy α because poisoned knowledge competes with learned rules before any conflict evidence can accumulate. On logistics (||=4|S|=4), recovery is complete (Pt=100%P_t=100\%)âthe 3 seeds that missed on P1P_1 all recovered to Pt=1.00P_t=1.00 via a single retry guided by posterior updates. On integration (||=6|S|=6+), recovery is partial (Pt=81.7%P_t=81.7\%, â-6.7p residual), reflecting Thompson Samplingâs slower convergence over a larger option space. A counterintuitive ++2.5p PtP_t gain on logistics traces to seed 3141, where the adversarial SK activates the conflict detection system as an additional recovery pathway absent in the no-SK baselineâdemonstrating that the Bayesian resolution machinery provides value not only defensively but also as a self-correction layer. Baseline Architectural Verification. Neither baseline possesses conflict detection or resolution capabilities. Full Reflexionâs P1P_1 is unaffected on integration (self-generated reflections dominate external SK), but its PtP_t drops â-5.0p as adversarial SK diverts retries. ExpeL drops â-3.3p P1P_1 because it stores adversarial and genuine knowledge indistinguishably. Both baselinesâ lower P1P_1 degradation reflects their underutilization of retrieved knowledgeâa fundamental weakness, not a strength. TheoryâExperiment Alignment. Table 21 consolidates eight theoretical predictions against empirical observations. Every predictionâfrom the ensemble detector threshold (defined in §4.1) through Bayesian posterior convergence (Definition 4.1) to Bayesian recovery behavior under source conflict (Theorem 4.1, local interpretation)âis confirmed without exception across all 40 runs. Theoretical Prediction Empirical Result Verdict Ensemble detector fires on genuine conflicts (Ξ=0.30Ξ=0.30 from §4.1) 73â472 conflicts detected per seed; zero without SK Confirmed Beta priors: static==0.50, dynamic==0.625 (Def. 4.1) Exact match in all 20 without-SK runs Confirmed Posteriors shift toward dynamic source (Def. 4.1 update rule) Static drops to 0.01â0.06; dynamic rises to 0.96â0.99 Confirmed Conflicts resolved in favor of dynamic (Alg. 4.1) 0 static wins across all 20 with-SK runs Confirmed P1P_1 penalty from adversarial SK (Thm. B.1, reduced α) â-5.0p on both domains Confirmed Bayesian recovery after conflict resolution (Thm. 4.1, stationary-segment TS behavior) Complete on logistics (Pt=100%P_t=100\%); partial on integration Confirmed Baselines lack recovery mechanism No conflict resolution stats in any baseline run Confirmed Recovery difficulty scales with option-space size 4 ports: full recovery; 6+ endpoints: partial Confirmed Table 21: Theoryâexperiment alignment for Type I conflict resolution across 40 trace-analyzed runs. The empirical results confirm the predictions of Definition 4.1, Algorithms 4.1aâ4.1b, Theorem B.1, and the stationary-segment interpretation of Theorem 4.1. Taken together, Experiment 6 validates PRECEPTâs response to static knowledge corruption (Type I conflict): adversarial misinformation is detected, deprioritized, and ultimately overridden through Bayesian posterior updates. The natural follow-up is whether PRECEPT can also handle temporal knowledge corruptionâthe case where previously correct knowledge becomes invalid because the environment itself changes. This is the subject of Experiment 7. 7.8 Experiment 7: Rule Drift Adaptation Research Question: When the environmentâs valid solutions genuinely change between training and deployment (non-stationary CSPs), how effectively can each agent detect the drift, discard obsolete rules, and re-learn correct solutions? Setup. Train with drift salt s0=0s_0=0 (ÎČ=3ÎČ=3, N=5N=5), then test with a different drift salt s1=1s_1=1, which changes the MD5-hash-derived valid solutions for every condition key. Each agent faces 4 sequential encounters per key during testing. This creates a genuine non-stationary environment: rules learned during training are incorrect at test time, and agents must detect failures and re-learn. The protocol models an abrupt single drift event (piecewise-stationary dynamics: stationary before and after the shift), isolating adaptation speed rather than gradual or recurrent drift. Figure 14 shows P1P_1 recovery curves by encounter for both domains, illustrating how each agent adapts after the drift event. Integration domain: E=6E=6 keys, max 3 retries, 10 seeds. Logistics domain: E=4E=4 keys, max 3 retries, 10 seeds. Drift Mechanism. Solution computation uses hashlib.md5(salt:key), where the salt differs between training (s0s_0) and testing (s1s_1). Verification confirms >>93% of condition-key-to-solution mappings differ between s0s_0 and s1s_1 across both domains, ensuring genuine rule invalidation. Data-quality note. For logistics encounter 4, two seed runs experienced external API failures during final-encounter evaluation, producing incomplete fourth-encounter traces unrelated to the drift mechanism itself. We therefore compute the logistics encounter 4 summary on the 8 runs with complete fourth-encounter data; encounters 1â3 use all 10 seeds. Figure 14: Experiment 7 rule drift adaptation. After the trainâtest mapping shift, PRECEPT shows the strongest recovery across encounters in both domains. 7.8.1 Primary Results Rule drift adaptation results (mean ± 95% CI; up to N=10N=10 seeds per row, with logistics encounter 4 computed on n=8n=8 complete traces due to two external API failures during final-encounter evaluation). Bold = best P1P_1/PtP_t per encounter. Significance: pâ<0.05^*p<0.05, pâ<0.01^**p<0.01, pââŁâ<0.001^***p<0.001. Domain Enc. PRECEPT P1P_1 FR P1P_1 ExpeL P1P_1 PRECEPT PtP_t FR PtP_t ExpeL PtP_t Integr. 1st 37.5± 16.6 11.5± 11.1 7.0± 8.1 37.5± 16.6 24.0± 21.8 24.8± 20.8 2nd 37.5± 16.6 19.8± 13.4 14.5± 12.3 48.7± 22.9 26.8± 12.6 33.0± 12.8 3rd 48.7± 22.9 16.5± 13.6 13.5± 10.8 58.2± 23.8 26.0± 15.1 28.0± 15.3 4th 60.7± 22.5 19.8± 15.8 29.7± 12.8 69.0± 25.2 32.7± 11.4 38.0± 13.2 Î +23.2p +8.3p +22.7p +31.5p +8.7p +13.2p Logist. 1st 28.3± 20.3 40.0± 23.6 35.7± 17.3 72.7± 18.4 68.3± 20.9 75.7± 19.5 2nd 72.7± 18.4 43.7± 16.0 53.3± 20.5 76.7± 19.0 73.7± 19.6 83.7± 11.3 3rd 75.8± 18.9 64.3± 20.8 65.8± 19.0 92.2± 9.3 70.8± 21.8 95.5± 6.8 4th 83.3± 29.8 43.8± 35.7 77.1± 30.7 100.0± 0.0 60.4± 37.9 89.6± 16.5 Î +55.0p +3.8p +41.4p +27.3p â-7.9p +13.9p Table 22: Experiment 7 rule drift adaptation across encounters after a trainâtest mapping shift. 7.8.2 Key Findings 1. Genuine drift degrades all agents at encounter 1. Unlike rule persistence (Experiment 5, where PRECEPT retains 100% P1P_1 on integration and reaches 100% on logistics by encounter 4), all agents experience substantial degradation when solutions genuinely change. On logistics, PRECEPT drops to 28.3% at encounter 1âbelow both baselines (FR: 40.0%, ExpeL: 35.7%)âconfirming that exact-match retrieval is a double-edged sword: previously correct rules are now confidently wrong. On integration, PRECEPT still leads at encounter 1 (37.5% vs 11.5% and 7.0%), reflecting the harder domain where baselines struggle to generate plausible solutions even without rule interference. 2. PRECEPT recovers fastest via rule overwrite. PRECEPTâs recovery mechanismâdetecting failures, discarding the obsolete rule, and re-learning the correct solutionâproduces the largest improvement on logistics (+55.0p, 1stâ 4th encounter) and matches ExpeL on integration (+23.2p vs +22.7p). By encounter 4, PRECEPT achieves 83.3% on logistics and 60.7% on integration. Log traces confirm the mechanism: when a retrieved rule fails validation, PRECEPT deletes it and enters exploratory mode, then persists the new rule for future encounters. 3. Full Reflexion fails to recover from drift. On logistics, Full Reflexion shows negligible improvement (+3.8p), ending at 43.8%âroughly half of PRECEPTâs final P1P_1. The significant gap (d=0.95d=0.95, p=0.031p=0.031) at encounter 4 reveals a fundamental limitation: reflexion-style agents accumulate contradictory reflections (old rules + new failures) without a mechanism to invalidate stale knowledge. 4. Integration amplifies drift difficulty. The harder option space of integration (obscure variants like âsalesforce-backupâ) compounds with drift: even after 4 encounters, no agent exceeds 61% P1P_1. However, PRECEPT maintains significant advantages over both baselines at every encounter (p<0.025p<0.025), with large effect sizes at encounter 4 (d=1.45d=1.45 vs FR, d=1.14d=1.14 vs ExpeL), confirming that exact retrieval with systematic overwrite outperforms approximate methods even when absolute performance is constrained by domain difficulty. 5. PtP_t reveals the recovery mechanism most clearly. On logistics, PRECEPTâs PtP_t rises from 72.7% to 100.0% by encounter 4âcomplete recovery through rule invalidation and re-learningâwhile FRâs PtP_t actually decreases (â-7.9p, from 68.3% to 60.4%), confirming that contradictory reflections accumulate destructively. ExpeL recovers partially (PtP_t: 75.7% â 89.6%). On integration, PRECEPTâs PtP_t improves +31.5p (37.5% â 69.0%), nearly double FRâs +8.7p and substantially above ExpeLâs +13.2p. The P1âPtP_1â P_t gap is itself diagnostic: PRECEPTâs gap narrows from 44.4p at encounter 1 to 16.7p at encounter 4 on logistics (retries become unnecessary as correct rules are re-learned), whereas FRâs gap widens, indicating increasing reliance on brute-force retries that fail to converge. 7.8.3 Experiment 5 vs. 7: Persistence vs. Drift The contrast between Experiments 5 and 7 reveals a key architectural trade-off. In the persistence setting (no solution change), PRECEPTâs exact-match rules yield 100% P1P_1 on integration and recover to 100% on logistics by encounter 4âthe deterministic retrieval pathway is maximally reliable when rules remain valid. In the drift setting (solutions change), the same determinism causes an initial disadvantage on logistics (28.3% P1P_1 vs FRâs 40.0% at encounter 1), because confidently retrieved but now-incorrect rules prevent exploratory fallback. However, PRECEPTâs explicit rule overwrite mechanismâabsent in both baselinesâenables the strongest recovery: PtP_t reaches 100% on logistics by encounter 4, confirming complete re-learning. FRâs PtP_t degrades over encounters (â-7.9p), a pattern absent in the persistence setting, revealing that drift uniquely poisons reflexion-style memory. This dual result validates the Evo-Memory design (Section 4.2): exact rules dominate in stationary environments, while threshold-based invalidation and re-learning recover performance in non-stationary ones. 8 Capability Comparison A detailed capability comparison, including discussion of GEPA, Nested Learning, and RL, is provided in Appendix E. Here we present the summary. Capability matrix across methods. Capability PRECEPT Full Refl. ExpeL Trad. RL Compositional Gen. Oâ(2N)O(2^N) â Ă Ă Ă Continuous Learning â (+40â55p) âł (+10â29p) âł (+12â48p) Ă Rule Persistence â (88.5â100%) âł (32â70%) âł (33â93%) Ă Rule Drift Adaptation â (+55p) Ă (+3.8p) âł (+41p) Ă Exact Multi-Cond. Match â Ă Ă Ă Static-Dynamic Conflict â Ă Ă Ă Deterministic Pruning â Ă Ă âł Sample Efficiency â (ÎČ=3) âł (ÎČ=5+) âł Ă (ÎČ=100+) Smart Rollouts â N/A N/A N/A Table 23: Capability matrix summarizing which properties are fully, partially, or not supported across methods. â = supported, âł = partial, Ă = not supported PRECEPTâs advantages over GEPA stem from three fundamental gaps: (1) GEPAâs evolved prompts still require LLM interpretation, causing exponential degradation with condition count (Theorem B.6); (2) no mechanism for compositional generalizationâGEPA must be re-evolved for each combination; and (3) no mechanism for deterministic rule persistence across sessions. Relative to Nested Learning (Behrouz et al., 2025), PRECEPT makes a different design choice: NL pursues continual adaptation through multi-level optimization, self-modifying update mechanisms, and continuum memory, whereas PRECEPT externalizes deployment knowledge into explicit, inspectable rules with exact lookup, source-level conflict handling, and targeted per-rule invalidation. Over RL, PRECEPT achieves 33Ă33Ă better sample efficiency (ÎČ=3ÎČ=3 vs ÎČ=100+ÎČ=100+), exponential compositional coverage from linear training, and near-perfect rule retention (100% on integration; 88.5%â 100% on logistics) that RL cannot match without full retraining. Detailed analysis is in Appendix E. 9 Related Work We organize related work by the four limitations PRECEPT addresses, enabling direct comparison of how each prior approach handlesâor fails to handleâeach challenge. 9.1 Interpretation Degradation and Retrieval Verbal reflection methodsâReflexion (Shinn and others, 2023), Full Reflexion, and ExpeL (Zhao and others, 2023)âstore knowledge as natural language, requiring LLM interpretation at retrieval time. Under the independence model of Theorem B.6, this interpretation suffers steep multi-condition degradation (94.4% partial-match error at N=10N=10 for the illustrative p=0.75p=0.75 setting). RAG systems (Lewis and others, 2020; Guu and others, 2020; Shi and others, 2023) and structured memory approaches (MemoryBank (Zhong and others, 2024), SCM (Wang and others, 2023b)) retrieve by similarity or latent compression rather than exact discrete-key matching, which limits precise composition and test-time rule application. Tool-augmented agentsâToolformer (Schick and others, 2023), ReAct (Yao and others, 2023)âlack mechanisms for learning from failures entirely. PRECEPT eliminates interpretation in its exact-match path via Oâ(1)O(1) retrieval with structured condition keys. 9.2 Compositional Generalization Benchmarks (SCAN, COGS, DBCA (Keysers and others, 2020)) establish that neural networks struggle with compositional generalization. Neural-symbolic approaches (DeepProbLog (Manhaeve and others, 2018), NeurASP (Yang and others, 2020)) require training hybrid architectures. Prompt optimization methodsâGEPA (Agrawal et al., 2025), EvoPrompt (Guo and others, 2023), DSPy (Khattab and others, 2023), OPRO (Yang and others, 2023)âevolve prompts that still require LLM interpretation, inheriting exponential degradation. Experience-based agents (Voyager (Wang and others, 2023a), LATS (Zhou and others, 2023), Generative Agents (Park and others, 2023)) acquire procedural skills but none support compositional constraint combination. PRECEPTâs semantic tier hierarchy yields Oâ(2N)O(2^N) coverage from N atomic precepts, bypassing neural interpretation for rule application. 9.3 Drift Adaptation and Knowledge Conflicts Prior conflict resolution addresses parametric-retrieval conflicts heuristically (Longpre and others, 2021; Chen and others, 2022) or via verification (Baek and others, 2023). Continual learning (EWC (Kirkpatrick and others, 2017), GEM) prevents catastrophic forgetting during training but cannot unlearn stale rules at deployment. RL methodsâPPO (Schulman and others, 2017), SAC (Haarnoja and others, 2018), RLHF (Ouyang and others, 2022), Decision Transformer (Chen and others, 2021)ârequire complete retraining for distribution shift, with prohibitive sample complexity (ÎČ=100+ÎČ=100+). Nested Learning (Behrouz et al., 2025) is conceptually closer in spirit to PRECEPT than standard RL because it studies continual/self-improving systems via multi-level optimization, self-modifying learning dynamics, and continuum memory; however, its adaptation is centered on learned internal memory and update mechanisms, whereas PRECEPT externalizes deployment-time knowledge into explicit rules, conflict-aware retrieval, and targeted per-rule invalidation. In the LLM-agent test-time adaptation setting, PRECEPT provides, to our knowledge, the first unified Bayesian treatment of Type I (static-dynamic) and Type I (drift) conflicts with Thompson Sampling, together with explicit overwrite and invalidation mechanisms at deployment time. 9.4 Prompt Evolution and Strategy Optimization COMPASS extends GEPA with verified evolution (real execution signals, not heuristic scoring), ML-based complexity detection, and bi-objective Pareto selection. All other prompt optimization methodsâincluding DSPy, OPRO, and APE (Zhou and others, 2023)âprovide biased or unreliable signals through LLM-as-judge or keyword scoring, and none integrate with compositional retrieval or drift adaptation (see Appendix E). 9.5 Evolutionary Computing and Red Queen Dynamics The Digital Red Queen (DRQ) framework (Kumar et al., 2026) demonstrates that agents trained via static optimization fail 72% against novel adversarial dynamics, and overcomes this through continual self-play against a growing opponent history. PRECEPT translates three DRQ principles into a structured LLM agent architecture: (1) Evo-Memory as a growing constraint history (analogous to DRQâs opponent archive), mathematically eliminating cyclic dynamics (Pâ(repeat)=0P(repeat)=0, Theorem B.7); (2) MAP-Elites diversity (Mouret and Clune, 2015) in COMPASS to prevent convergence collapse; and (3) epistemic probing as adversarial discovery, treating the environment as the adversary. The key distinction from DRQ is that PRECEPT provides formal guarantees for specific deterministic subsystems rather than only empirical robustness (see Table 24 in the Conclusion). 10 Conclusion We introduced PRECEPT, a framework for LLM agent learning that augments probabilistic verbal reasoning with deterministic structured retrieval and structured adaptation mechanisms. PRECEPT addresses fundamental limitations affecting both verbal reflection methods and traditional reinforcement learning, achieving a combination of capabilities that neither approach provides individually in our evaluated setting. 10.1 Summary of Contributions PRECEPT is a unified architecture rather than a loose collection of mechanisms. Deterministic retrieval makes explicit rule use reliable, structured rule memory makes conflict resolution possible, conflict resolution supports drift adaptation, and COMPASS evaluates prompts through the same end-to-end pipeline. The result is a single deployment-time adaptation stack rather than isolated modules optimized independently. Compositional rule learning with deterministic retrieval. PRECEPT uses Oâ(1)O(1) exact-match lookup over structured condition keys, eliminating partial-match interpretation errors on the deterministic path. Combined with atomic constraint stacking, this yields conditional 2Nâ12^N-1 compositional coverage from N learned rules (Theorem 3.1), 100% P1P_1 on 2-way logistics compositions, and a +33.3p compositional generalization advantage. Unified conflict resolution and drift adaptation. PRECEPT handles Type I source conflict through Bayesian source reliability and Thompson Sampling, and Type I drift through threshold-based invalidation and overwrite. In the modeled setting this yields a 64Ă64Ă drift-resilience bound, and empirically it produces strong eventual robustness under adversarial static knowledge and the strongest drift recovery curves among the compared agents. COMPASS, a dual-frequency adaptation layer. COMPASS combines a high-frequency runtime layer, exercised throughout Experiments 1â7, with a lower-frequency prompt-evolution layer isolated more directly in Experiments 8â9. The high-frequency layer is broadly supported as part of PRECEPTâs end-to-end execution loop, while the low-frequency layer shows additional regime-dependent gains that are clearest in the OOD semantic setting. 10.2 Theoretical and Empirical Validation Closed-form analysis predicts that PRECEPTâs advantage should grow with task complexity, and the experiments support that trend across 9â10 seeds: +41.1p first-try advantage, +33.3p compositional generalization, +40â55p continuous learning gains, near-perfect persistence, strong eventual robustness under adversarial static knowledge, +55.0p drift recovery, and 61% fewer steps. COMPASS ablations further show that prompt evolution is regime-dependent, with the clearest gains appearing in the OOD semantic setting. 10.3 Broader Impact PRECEPT enables LLM agent deployment in high-stakes domains requiring deterministic reliability, compositional reasoning, and non-stationary adaptationâincluding autonomous logistics, healthcare compliance, financial regulation, and CI/CD pipelines. The explicit rule storage enables full auditability and interpretability, unlike black-box RL policies, supporting responsible AI deployment. 10.4 Scope and Design Choices S1. Controlled Benchmarks by Design. Our synthetic benchmarks (§7.1.1) are substantially harder than standard grid/maze environmentsâfeaturing black-swan error codes, Oâ(2N)O(2^N) composite scenarios, and non-stationary dynamicsâand are deliberately engineered to isolate architectural advantages. The core mechanisms (Oâ(1)O(1) retrieval, compositional stacking, threshold-based invalidation) are domain-agnostic and transfer directly to real-world deployment. S2. Domain-Agnostic Tier Hierarchy (with explicit tie policy). The semantic tier hierarchy (Safety >> Compliance >> Preferences) provides a domain-agnostic default ordering for rule-governed settings, and COMPASSâs constraint classifier maps error types to tiers from behavioral characteristics. For equal-tier conflicts, PRECEPT actively resolves via LLM Constraint Synthesis: competing atomic constraints are stacked into the LLM context for dynamic resolution, falling back to deterministic first-seen tie-breaking only if synthesis fails. This guarantees reproducibility while providing flexible resolution for entangled constraints. S3. Single-Agent Focus. Multi-agent coordination with distributed constraint propagation remains future work. S4. Drift Model Scope. Experiment 7 evaluates an abrupt train-to-test mapping shift (single change-point, piecewise-stationary dynamics) to isolate invalidation and re-learning speed. Gradual, cyclical, and adversarially adaptive drift processes remain future work. S5. Opaque Mapping Primitive. MD5-based key mapping is used to enforce deterministic opacity and prevent semantic leakage from condition tokens to solutions. The claims do not depend on MD5-specific cryptographic properties; any deterministic seeded opaque mapping would provide the same evaluation property. S6. Scalability Regime and Coverage Cost. Current experiments evaluate Eâ4,6,17Eâ\4,6,17\ and mostly N=5N=5 conditions per composite key. Hash retrieval itself scales with observed keys (storage Oâ(Kseen)O(K_seen), lookup Oâ(1)O(1)) and does not require pre-enumerating the full key space. However, full coverage training scales linearly in domain key count (Ttrain=ÎČâET_train=ÎČ E under the controlled protocol): e.g., ÎČ=3ÎČ=3, E=1000E=1000 implies 3,000 training episodes. We have not empirically validated that large-E regime in this paper. S7. Large-N Compositional Scope. The algorithmic composition cost is Oâ(NâlogâĄN)O(N N) (tier sort), but the practical bottleneck at large N is semantic: conflict density rises and tier distinctions may become less discriminative. We validate up to N=5N=5 in the main experiments; very-large-N compositional quality remains future work. S8. Condition Representation Assumption. The current formulation assumes discrete, canonicalizable condition tokens (e.g., A+B+C). Continuous factors (e.g., 50kg vs 500kg) require preprocessing (binning/quantization or templated feature encoding) before key construction. While Oâ(1)O(1) hashes guarantee Pâ(repeat_fail)=0P(repeat\_fail)=0 for discrete constraints, the architecture natively falls back to dense vector embeddings (Tier 2 of its 3-Tier Hybrid Retrieval) for continuous or high-cardinality representations. S9. COMPASS Ablation (Experiment 8 Analysis with OOD Follow-Up). Experiments 8â9 isolate the low-frequency COMPASS outer loop rather than COMPASS as a whole; the high-frequency COMPASS layer is already exercised throughout Experiments 1â7 as part of PRECEPTâs runtime execution loop. Experiment 8 (integration, matched-key protocol, 10 seeds) establishes a boundary condition: when deterministic matched retrieval already dominates error reduction, endpoint gains from outer-loop prompt adaptation can be limited. To test whether this is regime-specific, our latest Experiment 9 OOD-semantic run isolates low-frequency COMPASS effects using two 10-seed conditions: Outer Loop Enabled (legacy label: no_rules) and Outer Loop Disabled (legacy label: base_only). More precisely, both conditions retain PRECEPTâs runtime retrieval and rule-application machinery during execution; the manipulated factor is whether low-frequency COMPASS may replace the base system prompt with an evolved prompt. In no_rules, rules are excluded from prompt baking but remain available through runtime retrieval/context; in base_only, both prompt baking and low-frequency prompt evolution are disabled. In this latest OOD run, Outer Loop Enabled outperforms Outer Loop Disabled by +10.66p on P1P_1 (35.08% vs 24.42%), +13.39p on PtP_t (49.66% vs 36.27%), and â0.51-0.51 average steps (4.33 vs 4.84). Reporting mean± across seeds: Outer Loop Enabled achieves P1=35.08%±14.56P_1=35.08\%± 14.56, Pt=49.66%±14.64P_t=49.66\%± 14.64, and steps =4.33±0.65=4.33± 0.65, versus Outer Loop Disabled at P1=24.42%±21.58P_1=24.42\%± 21.58, Pt=36.27%±20.31P_t=36.27\%± 20.31, and steps =4.84±0.87=4.84± 0.87. Paired inferential analysis on the same 10 seeds is directionally consistent: exact sign-flip p=0.0625p=0.0625 for P1P_1 and p=0.0703p=0.0703 for PtP_t, with 95% bootstrap CIs of [+1.80,+21.24][+1.80,+21.24]p and [+1.88,+27.87][+1.88,+27.87]p, respectively (steps: p=0.0547p=0.0547, CI [â1.06,â0.08][-1.06,-0.08]). Together, this supports a scoped claim: low-frequency COMPASS is most beneficial when prompt-level policy shaping matters (OOD semantic ambiguity), while matched-key regimes can show weaker gains. 10.5 Future Directions Several promising extensions emerge from this work: F1. Hierarchical Precepts. Extend atomic precepts to support nested constraint structures, enabling more expressive compositional rules. F2. Multi-Agent PRECEPT. Develop distributed versions where agents share learned rules and coordinate constraint propagation, enabling collaborative problem-solving. F3. Formal Verification. Apply model checking techniques to verify rule consistency and detect potential conflicts before deployment. F4. Real-World Validation. Deploy PRECEPT in production logistics/booking systems to validate performance under real-world noise and complexity. F5. Large-Scale and Continuous-Feature Benchmarks. Evaluate high-cardinality condition spaces (e.g., Eâ«100E 100), larger compositional depths (N>5N>5), and mixed discrete-continuous condition representations to characterize scaling limits and representation choices. 10.6 Originality and Relationship to Evolutionary Computing PRECEPT draws theoretical inspiration from the Digital Red Queen (DRQ) framework (Kumar et al., 2026) but targets a fundamentally different domain: rule-governed LLM agents with formal guarantees on specific deterministic components, rather than open-ended program synthesis with empirical robustness. Table 24 summarizes the key distinctions. Capability DRQ PRECEPT Knowledge retrieval None (de novo generation) Oâ(1)O(1) exact-match; 0% error at N=10N=10 (Thm. B.6) Compositional structure Monolithic programs 2Nâ12^N-1 coverage from N atomic rules (Thm. 3.1) Conflict resolution Win/loss selection only Bayesian ensemble + Thompson Sampling (Def. 4.1) Drift handling Population dynamics Per-rule invalidation; 64Ă64Ă model-based resilience bound (Cor. B.5) Cyclic failure prevention No guarantee Pâ(repeat)=0P(repeat)=0 via deterministic pruning (Thm. 4.5) Compute allocation Uniform mutation ML-based complexity; rollout reduction Deployment Self-contained simulation Production MCP architecture with auditability Table 24: PRECEPT vs. DRQ: original contributions beyond evolutionary inspiration. 10.7 Concluding Remark The central lesson of PRECEPT is that the path to reliable LLM agents runs through structure, not scale. Larger models, longer contexts, and more sophisticated prompts do not overcome the fundamental tension between parametric knowledge and in-context informationâas our Integration analysis demonstrates, LLMs can identify the correct answer in their chain-of-thought and still generate the wrong output. PRECEPT resolves this not by fighting the LLMâs generative biases but by routing around them: deterministic retrieval for what must be exact, Bayesian inference for what must be trusted, and compositional stacking for what must generalize. These are not incremental improvements to the verbal reflection paradigmâthey are a different paradigm entirely, one where key aspects of agent reliability are enforced by architectural structure rather than hoped for through prompting. Kumar et al. (2026) suggest that adversarial self-play approaches âcould prove useful in other more practical multi-agent adversarial domains.â PRECEPT provides evidence for this claim, demonstrating that evolutionary principles can be operationalized as structured architecture with formal guarantees on specific deterministic components. We hope this work motivates a shift from building smarter agents to building more structured ones. 10.8 Reproducibility Statement The public repository accompanying this arXiv version is available at github.com/arash-shahmansoori/precept-framework. It contains the PRECEPT implementation under src/precept/..., the experiment drivers under scripts/, figure-generation scripts, configuration files, unit/integration tests, and the result artifacts used to construct the reported tables and figures. Appendix D maps the paper experiments to the relevant drivers, including run_exp1_main_comparison.py through run_exp9_compass_stress.py. All experiments are seed-controlled, and the paper reports 9â10 independent seeds per configuration together with 95% confidence intervals and effect sizes. The repository includes a curated reproducibility package under submission_repro_data/: (i) publication_results/ containing only paper-linked artifacts and source traces, (i) static_knowledge/, (i) paper-numbered experiment mapping in submission_repro_data/paper_experiment_sources/README.md, (iv) figure hash verification in submission_repro_data/FIGURE_SHA256.txt, and (v) a one-command locked runner (scripts/run_submission_repro.sh, scripts/run_submission_repro.py) with pinned environment metadata in submission_repro_data/environment/. Root-level exploratory traces (e.g., data/trace_*.json) are intentionally excluded from this curated package and are not required to reproduce the paper artifacts. Acknowledgment This manuscript received limited editorial and grammatical refinement assistance from Claude Sonnet 4.6 and GPT 5.4 during the writing process. All research ideas, methodologies, experimental designs, and scientific claims were developed and verified by the author, who reviewed and edited all AI-assisted output and takes full responsibility for the accuracy and integrity of the final manuscript. References L.A. Agrawal, O. Khattab, et al. (2025) GEPA: reflective prompt evolution can outperform reinforcement learning. arXiv preprint. External Links: 2507.19457 Cited by: §1.1, §9.2. S. Agrawal and N. Goyal (2012) Analysis of thompson sampling for the multi-armed bandit problem. In COLT, Cited by: §4.2. J. Baek et al. (2023) Knowledge-augmented language model verification. In EMNLP, Cited by: §9.3. A. Behrouz, M. Razaviyayn, P. Zhong, and V. Mirrokni (2025) Nested learning: the illusion of deep learning architectures. arXiv preprint. External Links: 2512.24695 Cited by: §8, §9.3. L. Chen et al. (2021) Decision transformer: reinforcement learning via sequence modeling. In NeurIPS, Cited by: §9.3. W. Chen et al. (2022) Rich knowledge sources bring complex knowledge conflicts: recalibrating models to reflect conflicting evidence. In EMNLP, Cited by: §9.3. Q. Guo et al. (2023) Connecting large language models with evolutionary algorithms yields powerful prompt optimizers. arXiv preprint. External Links: 2309.08532 Cited by: §9.2. K. Guu et al. (2020) REALM: retrieval-augmented language model pre-training. In ICML, Cited by: §9.1. T. Haarnoja et al. (2018) Soft actor-critic: off-policy maximum entropy deep reinforcement learning with a stochastic actor. In ICML, Cited by: §9.3. D. Keysers et al. (2020) Measuring compositional generalization: a comprehensive method on realistic data. In ICLR, Cited by: §9.2. O. Khattab et al. (2023) DSPy: compiling declarative language model calls into self-improving pipelines. arXiv preprint. External Links: 2310.03714 Cited by: §9.2. J. Kirkpatrick et al. (2017) Overcoming catastrophic forgetting in neural networks. In PNAS, Cited by: §9.3. A. Kumar, R. Bahlous-Boldi, P. Sharma, P. Isola, S. Risi, Y. Tang, and D. Ha (2026) Digital red queen: adversarial program evolution in core war with llms. arXiv preprint. External Links: 2601.03335 Cited by: §1, §10.6, §10.7, §2.7, §4.1, §9.5. P. Lewis et al. (2020) Retrieval-augmented generation for knowledge-intensive nlp tasks. In NeurIPS, Cited by: §9.1. S. Longpre et al. (2021) Entity-based knowledge conflicts in question answering. In EMNLP, Cited by: §9.3. R. Manhaeve et al. (2018) DeepProbLog: neural probabilistic logic programming. In NeurIPS, Cited by: §9.2. J.-B. Mouret and J. Clune (2015) Illuminating search spaces by mapping elites. arXiv preprint. External Links: 1504.04909 Cited by: §1.1, §9.5. L. Ouyang et al. (2022) Training language models to follow instructions with human feedback. In NeurIPS, Cited by: §9.3. J.S. Park et al. (2023) Generative agents: interactive simulacra of human behavior. In UIST, Cited by: §9.2. T. Schick et al. (2023) Toolformer: language models can teach themselves to use tools. arXiv preprint. External Links: 2302.04761 Cited by: §9.1. J. Schulman et al. (2017) Proximal policy optimization algorithms. arXiv preprint. External Links: 1707.06347 Cited by: §9.3. W. Shi et al. (2023) REPLUG: retrieval-augmented black-box language models. arXiv preprint. External Links: 2301.12652 Cited by: §9.1. N. Shinn et al. (2023) Reflexion: language agents with verbal reinforcement learning. In NeurIPS, Cited by: §1, §7.1.1, §9.1. G. Wang et al. (2023a) Voyager: an open-ended embodied agent with large language models. arXiv preprint. External Links: 2305.16291 Cited by: §9.2. L. Wang et al. (2023b) Augmenting language models with long-term memory. arXiv preprint. External Links: 2306.07174 Cited by: §9.1. C. Yang et al. (2023) Large language models as optimizers. arXiv preprint. External Links: 2309.03409 Cited by: §9.2. Z. Yang et al. (2020) NeurASP: embracing neural networks into answer set programming. In IJCAI, Cited by: §9.2. S. Yao et al. (2023) ReAct: synergizing reasoning and acting in language models. In ICLR, Cited by: §9.1. A. Zhao et al. (2023) ExpeL: llm agents are experiential learners. arXiv preprint. External Links: 2308.10144 Cited by: §1, §7.1.1, §9.1. W. Zhong et al. (2024) MemoryBank: enhancing large language models with long-term memory. In AAAI, Cited by: §9.1. Y. Zhou et al. (2023) Large language models are human-level prompt engineers. In ICLR, Cited by: §9.2, §9.4. Appendix A Hyperparameter Settings Complete hyperparameter configuration with source file references. Parameter Module Value Rule Invalidation Failure threshold (Ξ) precept_mcp_server.py 2 Confidence decay (ÎŽ) precept_mcp_server.py Ă0.5 Confidence restore precept_mcp_server.py +0.25 Conflict Resolution Ensemble conflict threshold conflict_resolution.py 0.30 Circuit breaker confidence conflict_resolution.py â„ 0.60 NLI / Semantic vote weight conflict_resolution.py 0.30 / 0.30 Temporal / Evidence vote weight conflict_resolution.py 0.15 / 0.15 Recommendation Conflict weight conflict_resolution.py 0.50 LLM vote weight conflict_resolution.py 0.10 Static prior (α,ÎČ)(α,ÎČ) conflict_resolution.py (5.0, 5.0) Dynamic prior (α,ÎČ)(α,ÎČ) conflict_resolution.py (5.0, 3.0) COMPASS Compilation acceptance threshold precept_mcp_server.py 0.6 Early stop threshold complexity_analyzer.py 0.98 Confidence threshold complexity_analyzer.py 0.9 Diversity threshold complexity_analyzer.py 0.7 Rollout range (min / max) complexity_analyzer.py 1 / 15 Diversity rollouts complexity_analyzer.py 5 Consistency rollouts complexity_analyzer.py 3 Table 25: Hyperparameter settings used by the main PRECEPT subsystems. Note: Ensemble vote weights above are raw coefficients. The detector normalizes by ÎŁ at runtime, so weights are not required to sum to 1. Appendix B Theoretical Analysis (Full Proofs) This appendix provides the complete theoretical analysis with detailed proofs supporting the results summarized in the main text (Section 6). Notation and Parameter Definitions We first define all parameters used throughout the theoretical analysis: Symbol Definition α Learning effectiveness: probability that a learned rule is correctly retrieved and applied N Number of conditions in a composite scenario (condition count) E Number of unique condition keys in a domain ÎČ Training exposure factor (number of training passes per condition) W Number of âwhite-boxâ (trivially solvable) scenarios in a test set B Number of âblack-boxâ (learning-required) scenarios in a test set T Total number of training episodes R Number of retry attempts allowed per episode p Per-condition retrieval/application accuracy for verbal baselines Ξ Failure threshold for rule invalidation (default Ξ=2Ξ=2) d Detection accuracy for stale rules Câ(T,E,ÎČ)C(T,E,ÎČ) Coverage function: fraction of condition keys seen during training Plearnâ(R)P_learn(R) Probability of learning the correct rule within R retries P1P_1 First-try success rate (probability of correct solution on first attempt) PtP_t Overall success rate (probability of eventual success within retry budget) FtF_t Set of previously failed options at step t pforgetp_forget Probability that a verbal baseline re-selects a previously failed option RremainingR_remaining Number of remaining retry attempts Table 26: Notation and parameter definitions used in the theoretical analysis. Formal Results Definition B.1 (Learning Effectiveness α). The probability that a learned rule is correctly retrieved AND correctly applied at test time: α=Pâ(retrieval correct)ĂPâ(application correctâŁretrieval correct)α=P(retrieval correct)Ă P(application correct correct) For PRECEPT, retrieval is deterministic via Oâ(1)O(1) hash lookup (learned_rules[condition_key]), so Pâ(retrieval correct)=1P(retrieval correct)=1 when the rule exists; hence αPRECEPT _PRECEPT is bounded primarily by application fidelity (the LLM must correctly format the retrieved solution in its output). For verbal baselines, retrieval depends on semantic similarity matching over natural-language memory, so αverbal _verbal captures both retrieval and application uncertainty. In analytic examples below, we use anchor values αPRECEPTâ=0.85 _PRECEPT =0.85 and αverbalâ=0.50 _verbal =0.50 for illustration; these are not fitted MLE parameters. Theorem B.1 (First-Try Success Rate). For an agent with learning effectiveness α, the expected first-try success rate on a test set of Ntotal=W+BN_total=W+B scenarios is: P1â(α)=W+B+BW+Bâ Câ(T,E,ÎČ)â Plearnâ(R)â αP_1(α)= WW+B+ BW+B· C(T,E,ÎČ)· P_learn(R)·α Proof. A test scenario falls into one of two categories: (1) white-box (trivially solvable without prior learning, contributing W scenarios) or (2) black-box (requiring a learned rule, contributing B scenarios). By linearity of expectation: P1=Pâ(correctâŁwhite-box)â Pâ(white-box)+Pâ(correctâŁblack-box)â Pâ(black-box)P_1=P(correct -box)· P(white-box)+P(correct -box)· P(black-box) White-box scenarios are solvable by any agent on the first try, so Pâ(correctâŁwhite-box)=1P(correct -box)=1, and Pâ(white-box)=W/(W+B)P(white-box)=W/(W+B). For a black-box scenario, the agent succeeds on the first try only if all three conditions hold: (i) the condition key was encountered during training, with probability Câ(T,E,ÎČ)=1â(1â1/E)TC(T,E,ÎČ)=1-(1-1/E)^T (coupon collector); (i) the correct rule was learned within the retry budget R, with probability Plearnâ(R)P_learn(R); and (i) the learned rule is correctly retrieved and applied, with probability α. Since these events are conditionally independent: Pâ(correctâŁblack-box)=Câ(T,E,ÎČ)â Plearnâ(R)â αP(correct -box)=C(T,E,ÎČ)· P_learn(R)·α Combining yields the stated result. â Theorem B.2 (Multi-Condition Degradation). For verbal baselines with per-condition accuracy p<1p<1, effectiveness degrades exponentially with condition count N under an independence approximation: αverbalâ(N)=αverbalâ(1)â pNâ1 _verbal(N)= _verbal(1)· p^N-1. For PRECEPT: αPRECEPTâ(N)âαPRECEPTâ(1) _PRECEPT(N)â _PRECEPT(1) (constant in N). Proof. Verbal baselines retrieve rules via semantic similarity over natural-language memory. For a composite condition key Îș=c1â+âc2â+ââŻâ+âcNÎș=c_1 +c_2 +·s +c_N (sorted alphabetically), the baseline must correctly identify and apply the rule for each individual condition. If per-condition accuracy is p and conditions are retrieved independently, the probability of correctly applying all N conditions is pNp^N. Since the first condition contributes αverbalâ(1) _verbal(1), each additional condition introduces a multiplicative factor of p, giving αverbalâ(N)=αverbalâ(1)â pNâ1 _verbal(N)= _verbal(1)· p^N-1. For PRECEPT, the composite key Îș is a deterministic string used as a hash-table key. Retrieval is Oâ(1)O(1) regardless of Nâthe key âHAZMAT+PORT-503+EXPRESSâ is looked up identically to âHAZMATâ. No per-condition decomposition occurs, so accuracy is independent of N. â Dependence note (T1). The independence assumption is a modeling simplification, not a universal bound. Correlations can improve or worsen degradation: shared semantic parsing may reduce effective decay, while correlated misinterpretations can amplify it. A useful extension is αverbalâ(N)=αverbalâ(1)âpÎłâ(Nâ1) _verbal(N)= _verbal(1)\,p^Îł(N-1) with Îł<1Îł<1 (favorable correlation), Îł=1Îł=1 (independence), Îł>1Îł>1 (adverse correlation). The experiments establish degradation empirically for the tested regimes; they do not claim a universally tight dependence model. Corollary B.3 (Effectiveness Ratio). The ratio of PRECEPT to verbal baseline effectiveness grows exponentially: Ratioâ(N)=αPRECEPTαverbalâ(N)=αPRECEPTαverbalâ(1)â pNâ1Ratio(N)= _PRECEPT _verbal(N)= _PRECEPT _verbal(1)· p^N-1 Proof. Directly from Theorem B.2: Ratioâ(N)=αPRECEPTâ(N)αverbalâ(N)=αPRECEPTâ(1)αverbalâ(1)â pNâ1Ratio(N)= _PRECEPT(N) _verbal(N)= _PRECEPT(1) _verbal(1)· p^N-1 Using illustrative anchors (αPRECEPTâ,αverbalâ)=(0.85,0.50)( _PRECEPT , _verbal )=(0.85,0.50) and p=0.75p=0.75: at N=1N=1, Ratio=1.7ĂRatio=1.7Ă; at N=3N=3, Ratio=3.0ĂRatio=3.0Ă; at N=10N=10, Ratio=22.6ĂRatio=22.6Ă. Since pNâ1â0p^N-1â 0 as NââNââ, the ratio grows without bound for any fixed αPRECEPTâ(1),αverbalâ(1)>0 _PRECEPT(1), _verbal(1)>0. â Anchor sensitivity (T2). With p=0.75p=0.75 and anchors varied over αPRECEPTâ[0.75,0.95] _PRECEPTâ[0.75,0.95], αverbalâ(1)â[0.40,0.60] _verbal(1)â[0.40,0.60], the predicted ratio remains large: at N=5N=5, Ratioâ[3.95Ă,7.51Ă]Ratioâ[3.95Ă,7.51Ă]; at N=10N=10, Ratioâ[16.65Ă,31.63Ă]Ratioâ[16.65Ă,31.63Ă]. Thus the qualitative conclusion (strong multiplicative PRECEPT advantage as N grows) is robust to plausible α variation. Theorem B.4 (Drift Adaptation Bound). With failure threshold Ξ and per-encounter detection accuracy d, the probability that a stale rule persists after Ξ encounters is: Pâ(stale persists)â€(1âd)ΞP(stale persists)â€(1-d)^Ξ. Proof. When the environment changes (rule drift), a previously correct rule becomes incorrect. At each encounter, the agent applies the stale rule and observes the outcome. With detection accuracy d, the probability of not detecting the failure at a single encounter is (1âd)(1-d). PRECEPTâs threshold-based invalidation (UNLEARN_FAILURE_THRESHOLD=Ξ\,=\,Ξ) deletes the rule after Ξ consecutive failures. For the stale rule to survive, it must evade detection at all Ξ encounters. Under a local stationary-segment approximation with conditionally independent detection events: Pâ(stale persists after âΞâ encounters)=(1âd)ΞP(stale persists after Ξ encounters)=(1-d)^Ξ For PRECEPT, d=0.95d=0.95 (deterministic rule validation against environment responseâif the rule yields an incorrect solution, the failure is detected with near-certainty, bounded only by environment stochasticity). Thus Pâ(stale persists)â€(0.05)2=0.0025P(stale persists)â€(0.05)^2=0.0025. For verbal baselines, d=0.60d=0.60 (the LLM may attribute the failure to other causes, retry the same approach, or fail to update its memory). Thus Pâ(stale persists)â€(0.40)2=0.16P(stale persists)â€(0.40)^2=0.16. â Non-stationarity note (T4). Theorem B.4 (and Theorem 4.1) should be interpreted as local analyses inside a segment with approximately stable failure semantics. PRECEPTâs global deployment setting is non-stationary by design; this paper does not claim a global i.i.d. bandit regret bound across arbitrary drift processes. Corollary B.5 (Drift Resilience Ratio). PRECEPT achieves 64Ă64Ă better drift resilience than verbal baselines: Pâ(stale persists)verbalPâ(stale persists)PRECEPT=(1âdverbal)Ξ(1âdPRECEPT)Ξ=(0.40)2(0.05)2=0.160.0025=64Ă P(stale persists)_verbalP(stale persists)_PRECEPT= (1-d_verbal)^Ξ(1-d_PRECEPT)^Ξ= (0.40)^2(0.05)^2= 0.160.0025=64Ă Proof. Direct substitution of dPRECEPT=0.95d_PRECEPT=0.95, dverbal=0.60d_verbal=0.60, Ξ=2Ξ=2 into Theorem B.4. â Theorem B.6 (Partial Match Error). For verbal baselines retrieving N-condition rules with per-condition accuracy p: Pâ(partial match)=1âpNâ(1âp)NP(partial match)=1-p^N-(1-p)^N. Proof. For a composite condition key with N individual conditions, each retrieved independently with accuracy p, a âpartial matchâ occurs when at least one but not all conditions are correctly identified. The probability of a full correct match is pNp^N. The probability of a complete miss (no conditions correct) is (1âp)N(1-p)^N. By the complement rule: Pâ(partial match)=1âPâ(full match)âPâ(complete miss)=1âpNâ(1âp)NP(partial match)=1-P(full match)-P(complete miss)=1-p^N-(1-p)^N At N=10N=10, p=0.75p=0.75: Pâ(partial)=1â0.7510â0.2510=1â0.0563â0.0000â94.4%P(partial)=1-0.75^10-0.25^10=1-0.0563-0.0000â 94.4\%. Partial matches are particularly dangerous because the agent applies an incorrect rule with high confidenceâit retrieved a rule that matches some conditions, leading to silent failures. For PRECEPT, the condition key is matched atomically as a single hash-table lookup. The key either exists (full match) or does not (triggers compositional fallback). There is no mechanism for partial matching: Pâ(partial)=0P(partial)=0 by construction. â Theorem B.7 (Zero Retry Waste). Under default pruning mode (enable_random_fallback=False, soft_constraints_retriable=False), for any failed option f recorded by RefineInterceptor at step t: Pâ(retry âfâ at step âtâČ>t)=0P(retry f at step t >t)=0 Proof. The RefineInterceptor (implemented via record_failed_option() and is_forbidden()) maintains a hash set FtF_t of all failed options for each condition key. Before any option o is selected at step tâČt , the interceptor checks oâFtoâ F_t. Since hash-set membership testing is deterministic and complete: âfâFt,is_forbiddenâ(f)=Trueâ fâ F_t,\; is\_forbidden(f)= True Therefore Pâ(select âfâŁfâFt)=0P(select f fâ F_t)=0 for any step tâČ>t >t. This holds regardless of LLM behavior because the check occurs before the LLMâs suggestion is executedâthe RefineInterceptor acts as a hard constraint filter, and with random fallback disabled failed options are never reintroduced. â Corollary B.8 (Expected Wasted Retries). â[wasted retries]PRECEPT=0E[wasted retries]_PRECEPT=0 vs. â[wasted retries]verbal=|Ft|â pforgetâ RremainingE[wasted retries]_verbal=|F_t|· p_forget· R_remaining. Proof. From Theorem B.7, PRECEPT never retries a failed option, so the expected number of wasted retries is exactly zero. For verbal baselines, at step t with |Ft||F_t| previously failed options and RremainingR_remaining retries left, the probability of selecting any specific failed option fâFtfâ F_t at each retry is pforget/|O|p_forget/|O| where |O||O| is the total option count. Summing over all failed options and remaining retries: â[wasted retries]=|Ft|â pforgetâ RremainingE[wasted retries]=|F_t|· p_forget· R_remaining, where pforgetp_forget is the per-retry probability that the LLM fails to exclude a known-bad option from its generation. â Appendix C Implementation Details This appendix provides the detailed implementation artifacts that support the main text. To align with reported results, implementation details here focus only on the three evaluated domains: Logistics, Booking, and Integration. MCP Client-Server Component Mapping. Component File Key Classes/Functions Evaluated Role Agent Orchestrator precept_agent.py PRECEPTAgent; connect(), run_task(), refresh_evolved_prompt() Main evaluated runtime loop Retrieval Orchestration agent_functions.py fetch_context*() helpers Primary retrieval path used in reported PRECEPTAgent runs MCP Clients precept_mcp_client.py, compass_mcp_client.py Base MCP client; COMPASS MCP wrapper Client-side access layer for server tools MCP Server Tools precept_mcp_server.py Memory retrieval, rule-hybrid lookup, atomic-precept retrieval, dual-mode retrieval Server-side retrieval / learning tools; retrieve_with_dual_mode() is exposed directly but is not the primary orchestration entry point in reported runs Low-Frequency COMPASS complexity_analyzer.py, compass_integration.py Complexity analyzer, rollout strategy, compilation engine Compilation path for prompt evolution and rollout allocation Conflict Resolution conflict_resolution.py Conflict manager; ensemble detector Type I conflict detection and source-reliability updates Generic Scoring Utilities scoring.py Pareto-selection and GEPA-scoring helpers Auxiliary utilities; not the final runtime prompt-selection rule described in Section 5 Table 27: MCP clientâserver component mapping for the evaluated implementation. Extended Agent Features. Feature Implementation Description Structured Outputs _call_llm_structured() Pydantic models ensure guaranteed schema from LLM Procedural Memory store_procedure() Learns recovery procedures from successful error recovery Epistemic Probing execute_probe() Diagnostic probes discover hidden constraints Online Validation register_task_for_online_validation() Real-time task registration for verified evolution Partial Progress record_failed_option() Persists failed options across episodes COMPASS Error Eval evaluate_error() Classifies errors by constraint tier Validation Filter validate_and_filter() Validates LLM suggestions against domain options Cross-Episode Forbidden context.failed_options Prevents retrying previously failed options Table 28: Extended agent features used in the evaluated PRECEPT system. Configurable Agent Options. Option Default Description disable_exhausted_exit False Continue exploration when LLM signals âEXHAUSTEDâ enable_random_fallback False Random selection when all options exhausted soft_constraints_retriable False Allow retrying SOFT constraint failures enable_compositional_generalization False Enable atomic constraint stacking enable_atomic_precept_storage False Store tier-annotated atomic precepts enable_hybrid_parsing False Use rule-based + LLM fallback for task parsing Table 29: Configurable agent options and their default settings. Reported experiments retain the default rule-based parser unless explicitly stated otherwise. The compositional study explicitly enables enable_compositional_generalization and enable_atomic_precept_storage; atomic-precept conflict detection is treated as part of the evaluated retrieve_atomic_precepts() pipeline rather than as a separate ablation in this paper. Domain-Specific Extensions (Evaluated Domains). Domain Strategy Special Features Logistics LogisticsDomainStrategy Port routing, customs handling Booking BookingDomainStrategy Flight/hotel reservations Integration IntegrationDomainStrategy OAuth, API webhooks Table 30: Domain-specific strategy extensions for the evaluated domains. Appendix D Experiment Artifact Mapping Table 31 maps the experiment numbering used in the paper to the corresponding driver scripts and curated artifact directories. Some script and result-directory names reflect development chronology rather than final manuscript numbering; this table is the authoritative paper-to-repository mapping. Paper Exp. Study Driver Script / Mode Result Artifacts (curated package) 1 Main domain comparison scripts/run_exp1_main_comparison.py submission_repro_data/publication_results/exp1_main_comparison_combined 2 Compositional semantic generalization scripts/run_exp6_compositional_generalization.py submission_repro_data/publication_results/exp6_final_publication 3 Training size ablation (ÎČ effect) scripts/run_exp3_training_size_ablation.py submission_repro_data/publication_results/exp3_combined 4 Continuous learning scripts/run_exp4_continuous_learning.py submission_repro_data/publication_results/exp4_combined 5 Rule persistence and retrieval fidelity scripts/run_exp7_rule_drift.py --train-hash-seed 0 --test-hash-seed 0 submission_repro_data/publication_results/exp5_persistence_combined submission_repro_data/publication_results/exp7_rule_drift_*_20260213_* 6 Static knowledge ablation (Type I conflict) scripts/run_exp2_static_knowledge_ablation.py submission_repro_data/publication_results/exp2_static_knowledge_combined submission_repro_data/static_knowledge 7 Rule drift adaptation scripts/run_exp7_rule_drift.py --train-hash-seed 0 --test-hash-seed 1 submission_repro_data/publication_results/exp6_drift_combined submission_repro_data/publication_results/exp7_rule_drift_*_20260215_* 8 COMPASS ablation scripts/run_exp8_compass_ablation.py submission_repro_data/publication_results/exp8_compass_ablation_20260228_141040 9 COMPASS stress / OOD semantic follow-up scripts/run_exp9_compass_stress.py submission_repro_data/publication_results/exp9_compass_stress_sem_only_20260305_075820 Table 31: Paper-to-repository mapping from experiment numbers to scripts and result artifacts. Repository note. The curated package includes a paper-numbered index (submission_repro_data/paper_experiment_sources/README.md) and a one-command locked verification workflow (scripts/run_submission_repro.sh) that checks environment-lock integrity and figure-hash parity before constructing a reconstruction bundle. Appendix E Capability Comparison (Detailed) This appendix provides the detailed analysis of why GEPA and RL cannot achieve PRECEPTâs capabilities. GEPA Limitations. (G1) No deterministic rule retrievalâevolved prompts still require LLM interpretation; (G2) No compositional generalizationâmust re-evolve for unseen combinations; (G3) No explicit drift adaptationâstale prompts persist indefinitely; (G4) No deterministic pruning guarantees; (G5) Pareto selection cannot solve Black Swan multi-condition scenarios requiring exact retrieval. RL Limitations. (R1) Prohibitive sample complexity (ÎČ=100+ÎČ=100+ vs PRECEPTâs ÎČ=3ÎČ=3); (R2) No compositional generalization from implicit policy encoding; (R3) Complete retraining required for drift (1000+1000+ episodes vs Ξ=2Ξ=2); (R4) No explicit knowledge retrieval or interpretability; (R5) Reward specification challenge for multi-condition scenarios; (R6) Inherently stochastic decisions unsuitable for safety-critical applications. PRECEPTâs advantages are not merely quantitative but reflect a different bundle of explicitly engineered capabilities in the evaluated setting: exact Oâ(1)O(1) retrieval, conditional compositional coverage, provable pruning (Pâ(repeat)=0P(repeat)=0) under the default pruning configuration, and rapid drift recovery. We do not observe this combination of properties in the prompt-optimization or policy-learning baselines studied here.