flowchart LR
A["Human goal + command contract"] --> B["Source plan"]
B --> C["Semantic IR DAG"]
C --> D["Compiler passes: normalize, type, lint, schedule"]
D --> E["Target IR or job graph"]
E --> F["Artifact"]
F --> G{"Validator pass?"}
G -- "yes" --> H["Artifact graph + claim ledger"]
G -- "no" --> I["Localized repair on failed IR nodes"]
I --> D
H --> J["Support boundary recorded"]
J --> K["Reusable compiler feedback"]
34 Cognitive Compilation and Semantic IR
34.1 Chapter status
| Field | Value |
|---|---|
| Chapter ID | cognitive-compilation-and-semantic-ir |
| Part | Part II - Planning, Memory, Reasoning, and Execution |
| Status | conceptual |
| Manuscript maturity | v0.3 semantically reviewed proof-contract draft |
| Last updated | 2026-08-02 |
| Primary source records | 20 assigned records with 17 exact claim mappings, including the Relational Dimension Compiler’s dimension-safe relational lowering proposal |
| Claim label | Design rationale |
| Evidence level | argument |
| Source queue | primary: cognitive_compilation; supporting: planforge_compiler_arch, genesiscode, treellm, viea, cca_project, moecot_manifest_project, corbens_best_model_possible_project, qcsa_whitepaper; external comparators: ext_pddl_1998, ext_shop2_2003, ext_tree_of_thoughts_2023, ext_dreamcoder_2020, ext_llvm_langref_docs, ext_mlir_2020, ext_translation_validation_1998 |
| Source loading state | source notes: cognitive_compilation, deterministic_capability_compilation, platonic_world_model, planforge_compiler_arch, genesiscode, treellm, viea, cca_project, moecot_manifest_project, corbens_best_model_possible_project, qcsa_whitepaper, ext_pddl_1998, ext_shop2_2003, ext_tree_of_thoughts_2023, ext_dreamcoder_2020, ext_llvm_langref_docs, ext_mlir_2020, ext_translation_validation_1998, kernel_english_residual_compiler, relational_dimension_compiler; raw cache: cognitive_compilation, planforge_compiler_arch, genesiscode, treellm, viea |
| Test state | Exact current boundary: two valid/four rejecting hand-authored compilation traces; one independent eight-event obligation/repair/fresh-validation refinement with 86 rejected mutations; one blocked semantic-preservation record/nine rejecting mutations; 45 live Lean declarations across two modules under three targets; 2,340 QCSA predictions over 60 synthetic cases, 13 systems, and three seeds; one 13-stage zero-model reversible trace with ten rejecting adversarial controls; no natural cognitive artifact, matched advantage, or chapter-core support movement. |
34.2 Drafting guardrail
The compiler boundary is a translation contract, not a claim that structured generation understands meaning. Current records and finite routes make obligations and failures addressable; they do not prove that a source obligation was correctly interpreted, lowered, or useful.
It follows PlanForge because a scheduled DAG still needs an artifact language. Semantic IR gives each node an addressable obligation before it becomes code, prose, a schema, a proof target, or a tool job.
The compiler is the first layer where a plan stops being merely plausible and becomes inspectable. Its output should let another layer ask: which requirement is this artifact preserving, which authority applies, which validator can reject it, and which repair surface is allowed to change it?
34.3 Human Reading Path
Concrete lens. The syntax-only compiler accepts valid HTML. The semantic compiler checks the target against both required output and preserved non-goals.
A scheduled plan is still too loose unless each unit of work has an artifact language. Cognitive compilation gives the stack that language: semantic atoms, obligations, validators, repairs, and target outputs that can be inspected before they become code, prose, schemas, proofs, or tool jobs.
AI work starts to look less like improvisation and more like compilation here. The system is not just generating an answer. It is lowering intent through typed intermediate forms so later layers can repair, verify, replay, or reject specific obligations. That makes failures local: a broken obligation can be fixed without regenerating the entire work surface.
Compilation gives the stack a handle on partial correctness instead of forcing every review to judge a finished blob. Intermediate structure makes errors cheaper because a reviewer can inspect the obligation, dependency, validator, or lowering receipt that failed before the output hardens.
The intermediate form is where vague intent becomes specific enough to preserve, reject, split, or revise. That addressability is what keeps generation from becoming all-or-nothing and lets the IR earn its place as a routine engineering surface.
34.4 Problem
After Planning admits an obligation for lowering, the stack still has to translate it across a source contract, semantic representation, target representation, and concrete artifact. Each representation can silently lose an objective, non-goal, authority bound, affected party, source limitation, validator, stop, recovery duty, or residual while the final output remains fluent and plausible.
Direct generation collapses interpretation, representation choice, target construction, validation, and repair into one opaque act. A later model or reviewer may see only the target and be unable to tell whether a requirement was preserved, intentionally revised, or forgotten. A prompt transcript gives few stable identities for the failed obligation or for the descendants that a repair must invalidate.
The compiler boundary begins after intent acceptance and planning. When Planning used a world model, the input includes the exact qualified branch packet and reality-residual obligations from Governed World Models and Reality Grounding. Compilation must preserve observation, belief, prediction, checkpoint, horizon, uncertainty, disagreement, and authority labels; it may not compile an imagined consequence into truth, evidence, or permission.
It owns the representation transformation, not the decision that the work should exist. Its output must let downstream owners inspect what was lowered, what changed, which assumptions and losses were introduced, which validator can falsify the translation, which target artifact was actually checked, and which repair or residual follows a failure.
34.5 Why existing approaches are insufficient
Prompt templates, schemas, planning languages, workflow engines, search traces, program synthesis, and conventional compiler infrastructure each solve part of the problem. None alone establishes consumer-relative semantic preservation for open-ended cognitive artifacts.
The cognitive_compilation source identifies the recurring failure pattern: requirement and implementation entangle, independent work is serialized, expensive models are overused, and repairs become global regeneration. PlanForge contributes the scheduling side of the answer; GenesisCode contributes the evidence/provenance side; TreeLLM contributes the representation-side intuition that the model should navigate explicit structure rather than memorize everything internally.
External baselines sharpen the compiler analogy. PDDL (ext_pddl_1998) and SHOP2 (ext_shop2_2003) show why action models and decomposition methods deserve explicit intermediate forms, Tree of Thoughts (ext_tree_of_thoughts_2023) treats reasoning paths as inspectable candidates, and DreamCoder (ext_dreamcoder_2020) shows library learning as compression through reusable abstractions. LLVM IR (ext_llvm_langref_docs) grounds the mature compiler practice of typed intermediate forms, equivalent representations, verifier boundaries, and transformation/analysis surfaces. MLIR (ext_mlir_2020) adds multi-level IR, dialects, modular passes, verifiers, and progressive lowering across targets. Translation validation (ext_translation_validation_1998) supplies the exact missing safety pressure: each lowering should be checkable against its source obligation after translation, not accepted because a generator ran. Semantic IR borrows these pressures toward explicit intermediate artifacts and source-target preservation, not any reproduced program-synthesis, planner, compiler, or translation-validation result.
A prompt can still be the input surface. It should not be the internal build artifact.
Typed shape is not meaning. A digest is not equivalence. A compiler-authored validator can share the compiler’s mistake. Declared repair scope is not observed locality. A valid target can still be useless, unauthorized, under-specified, or more expensive than direct generation. Even translation validation fails if its source semantics omit what the consumer cared about.
34.5.1 Strongest objection
A semantic intermediate representation can move ambiguity rather than remove it. Typed fields and preservation checks may create compiler theater if the source obligation was misunderstood or the target checker validates only syntax. The design therefore treats IR lineage as an inspectable repair and verification surface, not as proof that meaning was captured correctly.
34.6 Core Claim
[cognitive-compilation-and-semantic-ir.core, label: Design rationale, support: argument] Cognitive Compilation should own a versioned, consumer- and target-relative translation contract that lowers an already accepted plan obligation through source, semantic, and target representations into a concrete artifact candidate while preserving addressable obligation, non-goal, authority, rights, assumption, source/context, evidence, resource, verifier, repair, and residual lineage.
Every pass binds typed source and target semantics; declared normalization, loss, and ambiguity; preconditions and postconditions; dependencies; deterministic and nondeterministic inputs; compiler and validator identities; costs; receipts; and failure consequences. Acceptance requires post-translation validation against the actual target artifact by an independent-enough evaluator. Repair uses stable semantic identities, observed mutation sets, dependency closure, downstream rebuild, and revalidation.
The compiler may block, narrow, request clarification, or residualize a lowering. It does not reinterpret intent, choose the plan, grant authority, execute effects, self-certify semantic adequacy, or move support or release state. The claim remains at argument: the current evidence establishes exact synthetic records, mixed bounded QCSA findings, and finite route consequences, not a natural cognitive compiler.
Reader claim. Compilation succeeds only when every obligation and non-goal survives lowering into the actual target artifact; syntactic validity is not semantic preservation.
Operational rule. Give each obligation a stable semantic identity, bind every compiler pass and declared loss, validate the produced target independently, and compute dependency closure after repair. Missing atoms, authority escape, cyclic dependencies, failed validators, or lost obligations block lowering.
34.6.1 Worked lowering: “publish the summary, expose no private paths”
An accepted plan requires a public summary and carries a non-goal: no local filesystem path may appear. The semantic IR assigns separate stable IDs to the required summary, source citations, privacy boundary, output format, and verifier. A target compiler produces HTML that renders correctly but includes an absolute path inside a citation tooltip. Syntactic validation passes; the semantic validator traces the output field to the privacy non-goal and rejects the artifact.
Repair changes the tooltip generator, records the observed mutation set, rebuilds dependent outputs, and reruns both format and privacy checks. The compiler cannot simply delete the failed obligation or claim the user intended publication at any cost. The finite route model checks source-plan, atom, dependency, authority, validator, receipt, obligation-loss, repair-ledger, and residual boundaries. It does not prove arbitrary semantic equivalence, compiler correctness, natural-language understanding, or independent evaluator competence.
34.6.2 Claim-source mapping status
Appendix C records seventeen exact mappings across twenty assigned sources: the passage-reviewed local raw caches, three public-safe pinned-project notes, QCSA, and seven external comparators. They support IR and translation vocabulary, provenance, authority and ambiguity retention, pass/failure traceability, localized-repair receipts, multi-level lowering, translation validation, and negative cases. They do not establish compiler correctness, arbitrary semantic equivalence, natural repair locality, useful advantage, or production transfer.
| Source | What it supports | Limit |
|---|---|---|
cognitive_compilation |
Passage-reviewed: prompt-to-artifact brittleness, Plan Formation, Semantic Compilation, Target Compilation, typed semantic atoms, S-IR/T-IR, compiler passes, DAG scheduling, capability routing, traceable validators, localized repair, implementation-blueprint fields, metrics, and ablations. | No local compiler, benchmark result, trace suite, target-lowering harness, localized-repair result, or empirical ablation validates compiler quality. |
planforge_compiler_arch |
Passage-reviewed: orchestration-gap framing, planner-as-compiler analogy, task graph or intermediate representation, typed primitives, quality gates, model/tool tier routing, parallelism, critical-path scheduling, execution handoff, watchdog validation, and source-reported estimates. | Cost, time, routing quality, and artifact quality numbers have not been reproduced here. |
genesiscode |
Full three-tab audit: canonical CoreForm IR, deterministic lowering and formatting, qualified operations, explicit payloads, structural validation, semantic anchors and patches, provenance, effect/obligation metadata, types, e-graph candidates, translation-validation boundaries, implementation modules, conformance, and AI-authoring constraints. | Canonical syntax is not canonical semantics; positional AST paths are brittle; observed effects are incomplete coverage; finite equivalence tests are not general translation validation. No compiler, patcher, checker, proof, benchmark, or security audit exists. |
treellm |
Passage-reviewed: explicit semantic substrates through an external Knowledge Lattice, fixed-width semantic tokens, identity stability, path traceability, append-only updates, externalized knowledge, and path-based navigation. | No TreeLLM implementation, token validation, compression ratio, hallucination result, reasoning benchmark, or graph-coverage result exists here. |
viea |
Passage-reviewed: intent-to-execution architecture, structured command contracts, artifact graphs, specialist routing, verification, workflow-to-tool compilation, repeated-work closure, claim and verification ledgers, residuals, runtime adapters, benchmark ratchets, and feedback loops. | No completed deployment, working cognitive compiler, execution log, or reproduced benchmark is proven here. |
cca_project |
Pinned-project note: Semantic Base Language with typed primitives, explicit ambiguity, deterministic encoding, invocation effects, runtime bindings, and receipts; a five-stage compiler with typed atoms, pass hashes, verification, bounded repair, target IR, and trace bundles. | Project artifacts were inspected but not replayed from this book; source hashes and theorem counts do not establish semantic preservation or runtime correctness. |
moecot_manifest_project |
Pinned-project note: authority chain from goals through semantic and target IR; field/provenance/ambiguity retention; pass schemas, strict failure, reproducer bundles, applied localized-repair receipts, semantic portability, and execution-versus-mutation authority. | Broad implementation context only; its compilers, holdouts, and deployments were not rerun, and actual repair locality still requires observed-mutation proof. |
corbens_best_model_possible_project |
Pinned-project negative record: rich Task spell and compiler-pass surfaces coexist with keyword-driven parsing, mostly linear plans, digest equality mislabeled as semantic parity, positional repair identities, and ordinary-path defaults. | The project does not establish semantic compilation correctness; interface and artifact presence cannot substitute for causal runtime effect. |
The external comparators are now first-class Appendix C mappings with explicit limits. PDDL, SHOP2, and Tree of Thoughts ground representation, decomposition, and search boundaries; DreamCoder grounds synthesis and reusable abstraction; LLVM and MLIR ground typed and multi-level IR practice; translation validation grounds per-translation source-target checking. None proves a semantic parser, cognitive backend, LLVM/MLIR integration, local translation validator, repair benchmark, or support movement.
34.7 Mechanism
Cognitive Compilation begins with a frozen translation context: consumer, purpose, accepted contract and plan-node versions, source and target languages, compiler and pass set, environment, evaluator policy and dependencies, authority and rights ceilings, budgets, horizon, support ceiling, and material-change triggers. A changed source, compiler, evaluator, target, policy, dependency, or environment creates a new build identity rather than inheriting a green receipt.
The source-plan dialect preserves objectives, non-goals, units, quantifiers, precedence, provenance, ambiguity, affected parties, authority, rights, criteria, stops, recovery, and residual duties. Stable semantic identities name obligations, objects, fields, relations, assumptions, validators, artifacts, and residuals independently of text position, names, hashes, embeddings, addresses, graph positions, or storage. An ambiguity ledger records what is resolved, deferred, conflicting, unknown, or abstained and who had authority to change that state.
Lowering is progressive. Each pass names its input and output dialects, preconditions, postconditions, legality rules, allowed loss, obligation and authority effects, deterministic and nondeterministic inputs, dependency changes, costs, failure outputs, and reproducer bundle. Concrete backends emit code, prose, schemas, proofs, experiments, diagrams, or job packets while retaining the exact target language, dependencies, build inputs, environment, and artifact identity.
PlanForge makes the planner/compiler boundary concrete. Its raw task tree and optimized DAG are source and scheduling IRs, not “machine code” merely because they are serialized. A semantic atom such as KNOW, CAUSE, or VERIFY names a relation family; an executable primitive additionally needs typed operands, environment and tool bindings, preconditions, effects, authority, evidence, failure, and recovery semantics. Argument canonicalization can reduce fuzzy lowering, while semantic hashes can propose common subexpressions, but neither proves two obligations interchangeable. Exact merge eligibility is checked after consumer, state, rights, authority, effect, and verification binding.
Translation validation is separate from generation. Requirement-specific validators compare the accepted source obligation with the actual target artifact and keep source validity, IR validity, lowering preservation, target validity, artifact usefulness, external effects, and support movement as different decisions. Evaluator method, model, prompt, code, data, infrastructure, organization, incentive, and exposure dependencies remain visible; self-checks cannot silently become independent acceptance.
Repair operates on stable identities and observed mutations. It records the declared scope, actual node and file changes, invalidated caches and artifacts, dependency-closed rebuild set, post-repair validation, costs, retained failures, and residuals. The complete denominator includes every parse, IR candidate, pass, backend emission, validation, retry, repair, cache hit, timeout, human intervention, failure, and discarded artifact.
Reading the semantic compiler: The compiler path moves from goal and contract to semantic IR, then to target artifacts, with validators deciding whether the output can enter the artifact graph. Failure does not restart the whole process by default; it routes back to the failed IR boundary for localized repair.
The compiler boundary represents requirements, semantics, dependencies, artifacts, validators, authority requirements, and target constraints explicitly. Incremental repair then operates over IR nodes rather than re-prompting from scratch. Lowering can produce jobs, code, schemas, documents, or proof targets, but every target artifact should preserve the obligations that made the node necessary.
The key object is the semantic atom. A useful atom names its state, purpose, inputs, outputs, constraints, dependencies, obligation status, authority requirements, IR validity state, validator state, lowering state, target artifact, repair policy, repair ledger refs, source refs, and support-state effect. A collection of atoms becomes a DAG. The DAG is what planning schedules, VCM loads context for, execution turns into jobs, and the artifact graph audits.
A second object is the lowering receipt. A receipt records which semantic atoms produced a target artifact, which obligations were preserved, which assumptions were introduced, which validators passed or failed, and which residuals remain. Without that receipt, a generated file or chapter can look complete while hiding the path by which it lost its obligations.
34.7.2 Reverse compilation, lifted IR, and semantic merge
The Cognitive Compilation source family also proposes a reverse path for existing artifacts:
artifact -> target IR -> lifted semantic IR -> governed merge/refactor -> locked semantic IR -> new target artifacts.
Reverse compilation is an evidence-producing analysis, not recovery of the author’s one true intent. A repository lifter can deterministically index files, ASTs, public interfaces, imports, routes, configuration, tests, and documented claims; a document or narrative lifter can segment structure and extract entities, events, continuity claims, and explicit constraints. Every lifted node records origin kind and digest, exact file/span/scene references, method, confidence, parser/model versions, licenses and rights metadata, and whether it is a deterministic fact, evidence-backed claim, or unverified guess. LLM-only inference defaults to defeasible guess; it cannot become a hard constraint because it was fluently expressed.
A semantic knowledge graph may retain lifted entities, interfaces, invariants, components, and workflows across runs, but retrieval does not grant truth or reuse permission. A Merge Bundle names all source fingerprints, comparison scope, policy, candidate aliases, conflicts, chosen and rejected alternatives, human or validator decisions, resulting IR, and trace links back to every origin. Policies such as higher confidence, source priority, stronger validator, lower complexity, or keep-both-as-variants are declared decision rules rather than universal truth criteria.
Conflict detection begins with exact interfaces, schemas, invariants, dependency order, names, and types, then exposes semantic disagreements that require a qualified evaluator. Alias candidates never merge solely by name or embedding. Every accepted merged node retains which sources contributed, which policy or authority chose it, what incompatible alternatives remain, and how to split or supersede it. Semantic refactoring creates a new IR version; promoting guess -> claim -> fact requires new evidence and never rewrites the origin record.
Recompilation validates the new artifact against the locked merged obligations and checks for leakage from rejected origins. Provenance does not settle copyright, license compatibility, consent, trade-secret, or attribution duties. Importers record available license and origin metadata, surface conflicts, and route decisions to rights owners; the compiler does not declare legal compliance. Secrets and personal data are tainted at lift time, propagated through merge and target IR, redacted from exports where policy requires, and retained or deleted under their actual source obligations.
This mechanism creates useful paper/project mining infrastructure for the ASI Stack itself: multiple historical artifacts can be lifted, compared at stable semantic identities, reconciled with explicit conflicts, and recompiled into one chapter without treating repeated wording as corroboration. It also creates a severe laundering risk. Structure-level synthesis can still copy protected expression, erase provenance, invent semantics, or combine incompatible licenses. The mature test therefore measures interface and dependency recall, claim calibration, conflict detection, rejected-origin leakage, provenance completeness, rights behavior, reconstruction/utility, and downstream target validity against parser-only, retrieval, summary, manual integration, and full-source baselines.
34.7.3 Bidirectional capability and concept compilation
Deterministic Capability Compilation extends the source language beyond prose requirements. An executable scaffold is a high-level capability program whose branches, state transitions, invariants, failures, traces, and recovery paths can be lowered into a semantic capability graph. The compiler’s unit is the smallest semantically closed replaceable field, not a syntactic function or layer. Its obligation ledger enforces semantic mass balance across scaffold, corpus, learned expert, NCO package, linked composite, and runtime lease.
Lowering is deliberately bidirectional. A learned candidate may expose a student defect, a defect in the source specification, a useful novelty, a valid optimization, a reward exploit, or an unresolved disagreement. The candidate does not silently redefine the source. A tribunal classifies the disagreement; accepted discoveries are reified into new explicit contracts, tests, counterexamples, fields, or compiler rules. Compilation therefore closes a loop—explicit to learned to environmental discovery and back to explicit—while preserving fallback and lineage.
The Platonic World Model adds a complementary semantic front end. Stable Form families and immutable Form versions prevent labels, embeddings, recognizers, and implementations from becoming accidental identities. Search–Verify–Compile turns a candidate concept into an Essence Contract, relation and context schemas, recognizers, inference and transition interfaces, proof obligations, competency questions, and packet templates. The target packet pins the semantic basis, world branch, ambiguity, defeaters, authority, grounding versions, and expiry conditions before physical routing.
Together the papers require two conservation ledgers: the capability compiler must account for source obligations, while the semantic compiler must account for identity, context, grounding, and meaning. Passing either ledger alone is insufficient. Both sources remain design rationale at argument; no compiler, NCO linker, semantic kernel, or preservation benchmark is established here.
34.7.4 Question-compiled semantic lowering
Question-Compiled Semantic Addressing (QCSA) sharpens what an addressable semantic atom should reference. A durable object or obligation receives a stable Semantic Object ID (SOID); its task-relative interpretation travels as one or more versioned semantic virtual addresses; and the compiler lowers that certificate into a temporary physical route. Identity, semantic organization, and execution placement are therefore separate IR concerns. Re-clustering an atlas or moving an expert must not silently rename the source obligation.
The question compiler is an evidence-acquisition pass, not hidden chain of thought. When a semantic posterior is inadequate for the target consumer, it may select an internal discriminator, retrieval, sensor observation, tool probe, specialist request, or human clarification under explicit cost, risk, privacy, and interaction budgets. The resulting question trace joins the ambiguity ledger and lowering receipt. If no admissible question can close the required distinction, strict lowering returns a typed adequacy fault instead of inventing one clean meaning.
Question choice is decision-relative rather than entropy-minimizing by default. If two interpretations lead to the same safe action, resolving them may have no present value; if a small ambiguity changes legal authority, physical risk, or an irreversible effect, clarification may be mandatory. The compiler ranks questions by expected regret reduction, threshold-crossing probability, verification value, route-cost reduction, privacy/risk cost, and human burden. Several cheap independent checks may run in parallel when latency dominates.
Answers remain defeasible. Sensor error, misunderstood clarification, conflicting retrieval, and learned-discriminator mistakes update a posterior rather than deleting all alternatives. Beam search, backtracking, repeated or cross-facet checks, and explicit unknown, conflicting, and abstain states make early routing errors recoverable. The trace records which evidence moved the posterior and why the chosen commitment was adequate for this consumer. An efficient internal discriminator may be operationally and extensionally characterized without a faithful intensional label; the system must not invent a human-readable semantic explanation merely because examples can be named.
This yields three additional compiler obligations:
| Boundary | Required preservation |
|---|---|
| Identity | Stable SOIDs survive names, paraphrases, atlas revisions, model replacement, and physical relocation. |
| Address | A Semantic Address Certificate records context, consumer, atlas epoch, candidate paths, confidence, provenance, permitted use, residuals, and revalidation triggers. |
| Route | Target lowering independently binds resources, authority, validators, fallback, and receipts; semantic similarity cannot grant execution capability. |
The bounded QCSA reference package now implements SOID/SAC records, plural atlas views, a value-minus-cost question trace, physical-route lowering, and a separately observed vertical trace. On 60 synthetic held-out cases repeated over three seeds, full QCSA resolved every labelled object and preserved every evaluator-labelled structure. That is useful implementation evidence, but the workload is template-generated and the observer is internal. It does not show that a compiler preserves open-domain meaning or generates correct target artifacts.
The question-policy observation is a bounded null. Removing active questions left object and task-decision accuracy at 1.000 on the frozen corpus, while full QCSA asked questions on 0.033 of records. The vertical trace demonstrates one explicit environment clarification, not learned question value. The compiler owner should therefore keep question selection as a governed interface while treating the ablation as N2 proxy/regime evidence. The saturated, template-generated workload and internal evaluator cannot establish an exact or broad refutation. The core claim remains at argument.
The post-v2.3 transition review makes the asymmetry explicit. The exact plural-facet ablation is accepted as a synthetic-test-backed non-core mechanism claim, while semantic round-trip preservation remains a narrowed argument claim and the historical active-question transition retains its raw refuted label while its usable interpretation is N2. Those three dispositions share one result bundle but license different prose. None licenses the core claim, arbitrary semantic equivalence, or question-policy value outside the frozen fixtures.
34.7.5 A semantic token is an ABI object, not the referent
TreeLLM’s correction history repeatedly changes the shape of the “semantic token”: paths through a question DAG, fixed roots, learned anchors, an HLSH coordinate, type flags, and a residual fingerprint. A compiler cannot let any one encoding become the identity of the object it represents. It carries four separately versioned things: the stable object and interpretation identity; the semantic address or graph route; the model-facing representation; and the physical storage or retrieval route. Re-clustering anchors, changing an HLSH scheme, compacting a graph, or moving a node between stores then becomes a migration rather than a silent rename.
The semantic-token ABI binds object and sense, representation schema, graph and ontology epoch, codec and feature semantics, provenance/rights references, ambiguity and collision state, residual or exact-source reference, intended consumer, permitted transformations, expiry, revalidation trigger, and fallback. Exact lookup, graph traversal, ANN fallback, learned navigation, exploratory bridging, ingestion, and external tool acquisition lower to different route variants. An ANN neighbor or Scout proposal cannot enter the same IR variant as an admitted relation merely because both produce 128 bits.
This distinction also keeps cache optimization below semantics. A context-local short id may name a full structured token only inside a pinned session/model/codec/graph epoch and must be invalidated on migration. A path trace records an execution route, not an interpretation proof. Compilation succeeds only when the consumer’s distinctions survive or a typed residual, source expansion, alternate representation, abstention, or quarantine is returned. TreeLLM supplies the interface pressure; it supplies no local token validator, lowering proof, benchmark, or implementation.
34.7.6 Relational IR requires dimension-safe lowering
The Relational Dimension Compiler adds an important distinction to this chapter: a compiler may preserve the fields of an obligation while still destroying the meaning of the axes over which the artifact operates. A tensor index, a role position, a possible-world branch, a time interval, and an abstraction level are not interchangeable dimensions. Each needs a type that states its carrier, semantics, legal symmetries, units or metric where relevant, transformation law, and permitted contractions.
The relational IR therefore carries four linked views:
| View | What must survive lowering |
|---|---|
| Semantic | entity and relation identity, role schema, field domain, time, branch, lifecycle, and permitted use |
| Evidence | provenance, uncertainty, alternatives, qualification, defeaters, evaluator dependencies, and residuals |
| Computational | selected operator, primitive arity, factorization, precision, device placement, caches, and measured cost |
| Abstraction | contraction map, macro-object boundary, query envelope, approximation error, and expansion triggers |
The axis type is more than a name attached to a tensor dimension. For every active axis, the compiler needs enough information to reject transformations that are numerically well formed but semantically illegal:
| Axis-type field | Compiler question |
|---|---|
| Carrier | What values may occur on this axis: entities, coordinates, roles, times, branches, evidence states, or scales? |
| Semantics | What does one index or element denote for the declared consumer? |
| Symmetry | Which permutations, rotations, translations, reflections, or renamings preserve meaning? |
| Metric and unit | Which comparisons, distances, additions, or contractions are meaningful? |
| Transformation law | How does the value change when coordinates, orientation, schema, or representation changes? |
| Legal operations | May the axis be pooled, marginalized, joined, contracted, broadcast, reordered, or approximated? |
| Loss policy | Which information may be discarded, for which consumer, within what error envelope, and with what reopening trigger? |
This type makes several common mistakes visible. A batch of alternative worlds cannot be reduced as if the alternatives were simultaneous observations. A directed role axis cannot be pooled as an exchangeable set. An epistemic score cannot be cast into action authority. A spatial vector cannot be moved between frames without the required transformation. A macro-object cannot cross into a consumer whose query was excluded from its contraction certificate. Ordinary shape checking would accept many of these operations; dimension-safe lowering does not.
This does not turn Cognitive Compilation into the owner of world structure. Governed World Models still decide how proposed entities, fields, and relations relate to observation and reality. The compiler’s narrower duty is to prevent a legal computational rewrite from silently changing semantic arity, ordered roles, branch identity, evidence status, or the query envelope of an abstraction.
The separation among semantic arity, primitive computational arity, and storage arity is especially useful. A six-role transfer event may be stored as one relation object plus six typed binary incidences, discovered with a selective triadic operator, and later queried through pairwise message passing. Those representations are equivalent only if relation-instance identity, roles, multiplicity, time, branch, uncertainty, and provenance survive. A compiler receipt must name what was preserved and what became approximate.
34.7.7 Protected, sense-aware lowering into a Kernel packet
Kernel English makes ordinary language a particularly demanding source dialect. The compiler cannot begin by “cleaning” the text, because the apparent noise may contain the only correct name, quotation, code token, identifier, unit, significant figure, dialect form, or term under discussion. It first freezes the source bytes or a content-addressed handle and extracts typed protected objects. Semantic importance, surface-form importance, and identity anchoring remain separate attributes: an approximate rate may allow different wording while a semantically minor quotation may require exact bytes.
Unprotected text enters an uncertainty-aware correction lattice rather than an overwrite pass. Candidate spelling or grammar repairs retain probabilities, source alignment, and an abstention route. The next pass canonicalizes contextual senses—not strings—while making roles, negation, tense, aspect, modality, quantification, scope, coreference, discourse relation, attribution, and ambiguity explicit. “The panel did not approve the plan” may share a Kernel proposition with a passive paraphrase; “has not approved it yet” cannot lose perfect aspect or the still-open possibility of approval. An unresolved pronoun becomes a weighted or branched reference, not a convenient guess.
Open-world entities and concepts cross the boundary through handles. A concept capsule binds stable identity, type, Kernel definition, argument schema, surface labels, provenance, and registry version; an unresolved label may stay opaque or fall back to bytes. Stable concept identity, human-readable debug root, compact runtime code, grammar macro, and tokenizer token are deliberately different objects. A codebook or BPE revision may change the latter four without silently changing the concept. Grammar-aware macro fusion is legal only when every fused token has a typed deterministic expansion and does not erase entity, scope, negation, quantifier, quotation, value, provenance, or authority boundaries.
Compilation emits a versioned Kernel packet carrying Kernel tokens, entity and concept tables, protected-object handles, residual refs, source alignment, uncertainty, provenance, and compatibility hashes. A reasoner may use the compact representation while requesting exact source expansion when wording matters. It ends in a structured answer packet whose claims, modality, qualifiers, entities, required terms, style, citations, and uncertainty are separate from prose realization. A renderer then produces surface text, and a recompiler checks entity identity, values and units, negation and scope, modality, time, causal direction, attribution, quotations, and required caveats.
Round-trip agreement is translation validation at one boundary, not proof of truth. Compiler and recompiler can share an error, and readable Kernel can be a post-hoc rationale rather than a faithful view of hidden neural computation. High-impact use therefore keeps source access, alternative parses, independent-enough semantic probes, task outcomes, factual grounding, policy, and authority checks outside the cycle. This paper supplies the IR and validation design; it supplies no trained compiler, reasoner, renderer, or meaning-preservation result.
34.8 Interfaces
The public interface is a typed translation graph and receipt set, not a prose plan or permission token.
- Intent-to-Execution Contracts and Planning supply an accepted, version-bound obligation. The compiler may lower or reject it but cannot reinterpret, add, reorder, or widen the plan.
- Context and the Virtual Context ABI supply exact source identities, versions, provenance, adequacy, taint, omissions, permitted uses, and authority ceilings. Retrieved material remains data.
- Planning consumes compile feasibility, failure, cost, and residual records for later scheduling; target lowering does not own dispatch priority.
- Labor OS and Runtime Adapters consume accepted target IR or artifacts as job or effect requests. A successful compile is not a job, permission, effect, or completion receipt.
- Artifact Graphs preserve source, IR, pass, target, validator, repair, rebuild, cost, failure, and residual lineage without claiming correctness.
- Verification and Scalable Oversight supply independent-enough source-target, artifact, outcome, and delayed-effect evaluation.
- Security, Authority, Rights, Privacy, Licensing, and Publication owners decide use, execution, disclosure, and release.
- Resource Economics supplies observed compute, storage, latency, tool, model, verifier, human, rebuild, recovery, and opportunity cost.
- Evidence States and Readiness Gates own support, promotion, quarantine, and release; green compilation cannot move them.
- Procedural Memory may retain qualified passes, backends, validators, and repair procedures under exact lineage, regression, authority, and expiry.
- Supply-chain and weight-custody owners bind toolchains, models, dependencies, environments, signatures, caches, and revocation.
Minimum semantic-atom fields:
atom_idatom_statesource_plan_refintentobligation_refsobligation_statusinputsoutputsconstraintsdependenciesassumptionsauthority_requiredir_validity_statevalidatorvalidator_statustargetlowering_statetarget_artifact_reflowering_receiptrepair_scoperepair_ledger_refssource_refssupport_state_effectresidualsnon_claims
Planning owns obligation selection and order. The compiler owns representation transformation. Execution owns effects. Verification owns independent acceptance. Evidence and release owners retain their decisions. Keeping those roles separate prevents an impressive target from overwriting its own source.
The boundary should also distinguish four validity questions: whether the source plan is accepted, whether the semantic IR is well formed, whether the lowering is obligation-preserving, and whether the target artifact satisfies its validators. A failure in any one of those states should not be reported as a successful compile.
The public semantic-atom schema now records atom state, source-plan refs, obligation refs, obligation status, assumptions, IR validity state, validator status, lowering state, target artifact refs, lowering receipts, repair-ledger refs, source refs, support-state effect, residuals, and non-claims. That is still only a record shape. It gives later compiler traces a stable place to show which obligations survived lowering, which assumptions were introduced, which validator state blocks acceptance, and which repair ledger must change before promotion.
34.9 Invariants
- Every translation binds one accepted obligation, consumer, purpose, source and target language, compiler/pass set, evaluator policy, environment, authority and rights ceiling, budget, horizon, and support ceiling.
- Every source obligation and non-goal is preserved, explicitly refined, split, merged, deferred, rejected, or residualized with reason and authority.
- Stable semantic identity remains distinct from text position, label, hash, embedding, address, graph location, target identity, and storage route.
- Every field and obligation has source-to-IR-to-target-to-artifact lineage with provenance, consumer, validator, allowed loss, observed disposition, and falsifier.
- Unresolved, deferred, conflicting, or unknown ambiguity blocks strict lowering when meaning, authority, rights, effects, verification, or release can change.
- A pass may preserve, narrow, block, or request separately authorized change; it cannot widen authority, rights, purpose, means, effects, support, or release.
- Well-formed source, IR, target, and artifact records remain distinct from semantic preservation, validator adequacy, usefulness, safety, execution, and support.
- Digest equality answers only its declared identity question. Semantic equivalence needs an explicit source-target relation and validation against actual target content or behavior.
- Introduced assumptions, normalization, approximation, undefined behavior, information loss, target constraints, and omitted distinctions stay explicit.
- Passes, backends, and validators retain exact identities, versions, dependencies, inputs, nondeterminism, receipts, failures, and reproduction limits.
- Compiler, generator, and target cannot be the sole semantic evaluator for their own output; dependencies and disagreement remain visible.
- Declared repair scope is not locality. Observed mutations, invalidation, rebuilt descendants, cache state, revalidation, and retained failures decide the repair claim.
- Material source, compiler, dependency, evaluator, target, policy, or environment change expires affected receipts and triggers rebuild or an explicit residual.
- Identity, semantic address, evidence, physical route, authority, execution, and support remain separate lifecycle states.
- Every candidate, attempt, failure, retry, repair, cache hit, human intervention, cost, discard, and residual remains in the denominator.
- Faster builds, shorter IR, cleaner artifacts, lower repair cost, or zero release are not semantic, useful, safe, or cost superiority by themselves.
- Finite records, routes, synthetic evaluations, and reversible local traces establish only their exact scopes and cannot universalize preservation or transfer.
Compiler success is not the preserved boundary; addressable failure is. If a validator fails, the failed atom, dependency edge, target artifact, and repair scope should be visible. If a repair changes a prior obligation, the claim ledger must record that the build graph changed rather than pretending the final artifact still satisfies the original plan.
Obligation non-erasure prevents compilation from erasing commitments. A compilation pass may refine, split, defer, or reject an obligation, but it cannot silently drop it. If an obligation is no longer applicable, the ledger needs a revision reason rather than an absent edge.
34.10 Failure modes
- Source-meaning capture or compiler hallucination turns a mistaken interpretation into precise IR.
- Obligation, non-goal, authority, rights, affected-party, evidence, stop, recovery, or residual state disappears during lowering.
- IR drift changes identity, type, unit, quantifier, precedence, dependency, or semantics across passes.
- Schema or type theater treats well-formed records as correct meaning.
- Digest, embedding, address, graph-position, or token similarity is laundered into semantic equivalence.
- Ambiguity is defaulted or erased without the required authority.
- Scarce or proxy validators accept fluent, compiling, or schema-valid targets while missing source obligations.
- Validator capture, shared-model correlation, self-verification, exposure, or gaming makes translation validation self-confirming.
- A successful pass is laundered into execution, mutation, disclosure, publication, or support authority.
- Target assumptions, undefined behavior, lossy normalization, platform constraints, or dependencies remain hidden.
- Positional or unstable identities orphan obligations and repair history.
- Repair-radius laundering hides mutations, invalidations, caches, descendants, or effects outside declared scope.
- Stale-build laundering reuses receipts after material change.
- Failure-bundle erasure and best-artifact survivorship remove rejected parses, failed targets, repairs, timeouts, or discarded candidates.
- Fragmentation, verifier burden, or coordination cost dominates direct generation without useful gain.
- Semantic identity, atlas compatibility, or certificate integrity is laundered into truth, capability, or execution permission.
- Round-trip theater uses a correlated evaluator to reconstruct the same mistaken structure and call it preservation.
- Portability theater infers cross-model, language, target, organization, safety, or production validity from one synthetic toolchain.
The hardest failure is semantic under-specification: a graph can be perfectly typed and still omit the thing the human cared about. The second failure is validator scarcity: prose, diagrams, and policy documents often lack executable checks. The third is overhead: for small tasks, the compiler can cost more than direct generation. Compilation therefore runs only for tasks whose risk, complexity, reuse, or repair burden justifies the extra layer.
Compilation laundering happens when a generated artifact is accepted because it passed a syntactic schema, even though the semantic obligations that justified the artifact were never lowered, checked, or carried into the receipt.
34.11 Minimum Viable Implementation
The current minimum is a record-and-bounded-reference scaffold:
- a semantic-atom schema and related source, target, receipt, repair, and preservation record surfaces;
- two valid and four rejecting hand-authored compilation traces for source-plan coverage, lowering receipts, target audits, validator state, and repair scope;
- one blocked three-project semantic-preservation record and nine rejecting mutations for paraphrase, omission, positional identity, authority loss, whole-graph repair, digest laundering, failure erasure, ambiguity, and target requirement loss;
- twenty-four live Lean theorem declarations across the retained route module and reachable refinement, grouped under three public targets; and
- the QCSA reference package: 60 deterministic synthetic cases, 13 systems, three seeds, 2,340 predictions, and one 13-stage zero-model temporary-file trace with ten rejecting adversarial paths and one byte-exact rollback.
The QCSA result is mixed rather than promotional. Full QCSA and the selected best baseline both reached 1.000 task-decision accuracy in every seed, while QCSA used 1.913386 times the operations; matched-advantage and resource gates failed. Removing active questions left object and task accuracy at 1.000; under the current competence standard this is N2 proxy/regime evidence, not an exact or broad active-question refutation. Plural facets, stable identity/address indirection, certificate/authority fields, migration compatibility, and task calibration earned bounded non-core dispositions. Round-trip preservation and the governance/resource tradeoff were narrowed. The core claim received an accepted no_change decision.
These artifacts do not compile a natural accepted obligation through a real cognitive backend into a concrete artifact and independently validate semantic preservation. The trace fixtures are hand-authored, the Lean model trusts its fields, the QCSA workload is template-generated, the observer is internal, the vertical path uses no model calls, and the only effect is a reversible temporary file.
The next honest minimum is a preregistered campaign over natural held-out source obligations and one concrete artifact class. It must compare direct generation, schema-only prompting, a strong workflow, human-authored artifacts, and the governed compiler with matched models, tools, sources, authority, budgets, and repair opportunities. Independently implemented evaluators must label source obligations, inspect actual targets, inject adversarial loss, measure observed repair blast radius and rebuild closure, retain every attempt and cost, rerun from locked artifacts, and transfer to a second target class.
34.12 Mature Research Target
A mature cognitive compiler is an obligation-preserving multi-level build system for cognitive work, not a larger prompt template. Accepted plan obligations and source context lower through inspectable source, semantic, and target dialects; typed passes emit concrete code, prose, schema, proof, experiment, diagram, or job artifacts; post-translation validators inspect actual target content and behavior; and changes rebuild and revalidate dependency-closed descendants.
The empirical question is whether that toolchain improves useful semantic preservation over simpler practice. Natural tasks compare direct generation, schema-only prompting, strong workflows, planning and search pipelines, human-authored artifacts, conventional compiler and build tools, program synthesis, and current agents under matched models, sources, tools, authority, budgets, repair opportunities, and outcome horizons.
Independent implementations jointly measure obligation precision and recall, semantic preservation, ambiguity calibration, authority and rights retention, artifact validity and usefulness, repair locality, rebuild correctness, unauthorized outputs, abstention and missed help, delayed effects, latency, compute, storage, verifier and human work, recovery, and total governance cost. The compiler must earn its overhead rather than moving verification and repair outside the ledger.
Adversaries delete and paraphrase obligations, exploit target assumptions and undefined behavior, poison caches, capture validators, widen authority, forge receipts, break stable identities, and escape repair scope. Causal ablations remove field lineage, ambiguity handling, multi-level passes, translation validation, evaluator separation, failure retention, dependency-closed rebuild, and observed repair accounting one at a time. Independent replication and transfer span models, languages, modalities, artifact classes, compilers, evaluators, organizations, jurisdictions, threats, horizons, and time.
Promotion requires nonzero useful opportunity, strong matched baselines, independent evaluation, effect-bearing controls where relevant, predicted causal signatures, complete denominators, reproducible traces, cross-target transfer, and accepted claim-specific evidence transitions. Otherwise the exact claim remains argument, narrows, stays null, becomes negative or refuted, or is blocked after a full attempt.
No current result meets this obligation-preserving compilation endpoint; support remains argument until natural source-to-target translations, effect-bearing controls, independent evaluation, reproduction, and transfer pass.
34.13 Codex test plan
| Test | Purpose | Status |
|---|---|---|
| Semantic atom fixture validation | Check that the semantic-atom fixture matches the public schema and declares atom state, intent, obligation status, inputs, outputs, constraints, dependencies, authority, IR validity state, validator state, lowering state, target, repair scope, repair-ledger refs, source refs, support-state effect, and non-claims. | implemented by protocol validation; validated locally |
| Requirement preservation test | Check that lowering from source plan to semantic atoms keeps each declared requirement addressable. | implemented in python3 scripts/validate_plan_execution_contracts.py; synthetic atoms only |
| Semantic lowering route proof | Check that a finite semantic-lowering review routes missing source plans, missing atoms, missing obligation links, cyclic dependencies, authority escapes, missing validators, validator failures, missing receipts, obligation loss, invalidating repairs without ledger updates, known residuals, and complete lowering reviews to explicit outcomes. | implemented by Lean build; finite semantic-lowering route coverage only |
| Incremental repair regression test | Break one atom-level requirement and check that the repair can stay within the declared repair scope. | implemented in python3 scripts/validate_cognitive_compilation_traces.py; synthetic trace records only |
| Target compilation audit | Check that a target artifact records which atoms, assumptions, validators, and residuals produced it. | implemented in python3 scripts/validate_cognitive_compilation_traces.py; synthetic trace records only |
| Executed obligation-preserving compilation refinement | Preserve exact source obligations and target identity through lowering, validation, localized repair, coordinated plan/ledger version updates, fresh repaired-plan validation, and acceptance, while independently classifying every existing trace fixture. | implemented in AsiStackProofs.CognitiveCompilationRefinement and python3 scripts/validate_cognitive_compilation_refinement.py: exact 33-theorem compilation, two accepted/four rejected fixtures, one eight-event repaired witness, and 86/86 rejected mutations; support-state effect none |
| Historical-project contract-preservation fixture | Check authority-bearing IR, ambiguity ledger, complete field lineage, retained pass/failure bundle, source-requirement obligations, observed repair blast radius, and the insufficiency of digest parity against nine mutations. | implemented in python3 scripts/validate_semantic_contract_preservation.py; one hand-authored blocked fixture only, no parser, backend, execution authority, measured repair locality, or support promotion |
| QCSA held-out reference evaluation | Compare full QCSA, seven baselines, and five ablations on 60 deterministic synthetic cases across three seeds, preserving all 2,340 predictions and exact resource and failure denominators. | implemented and dispositioned; full and best baseline both reached 1.000 task accuracy, operation ratio was 1.913386, matched-advantage/resource gates failed on the proxy, the active-question ablation is N2 proxy/regime evidence rather than an exact or broad refutation, bounded non-core mechanisms were promoted or narrowed, and the chapter core stayed argument |
| QCSA governed vertical reference | Exercise intent, semantic IR, stable identity/address, evidence graph, question trace, context, physical route, separate authority, one temporary-file effect, independent byte observation, artifact receipts, migration, and rollback. | implemented as one 13-stage zero-model local trace with ten rejected adversarial paths and one byte-exact rollback; no natural compiler, learned model, irreversible effect, external evaluator, production transfer, or support movement |
The fixture-shape check, finite Lean predicates, synthetic trace and contract-preservation harnesses, and bounded QCSA program cover narrow record lineage, identity/address separation, represented receipts, target-audit shape, declared versus observed repair scope, adversarial controls, and mixed fixture-level mechanism outcomes. The remaining minimum requires a natural source-plan parser, concrete generated cognitive artifact, independent source-target and artifact validators, observed incremental repair, matched usefulness and cost, clean reproduction, and cross-target transfer.
The reachable compilation refinement runs with python3 scripts/validate_cognitive_compilation_refinement.py and records experiments/cognitive_compilation_refinement/results/2026-07-15-local.json. It preserves one plan, three represented obligations, one source constraint, one target, approved authority, zero support/external-effect authority, and lowering/validation/repair custody through an eight-event localized-repair trace. Repair increments both plan and ledger versions, returns the artifact to the lowered stage, closes the represented residual, and requires validation bound to the repaired plan version before acceptance. Arbitrary successful runs preserve source identity and non-authority, produce valid traces, compose across event batches, retain complete receipts, and never decrease plan version. Its independently written consumer accepts exactly the two intended trace fixtures, rejects all four known-invalid fixtures, recompiles all 33 refinement theorems, and rejects 86 mutations. Numeric identities and record labels remain trusted; this is not natural-language semantic equivalence or a backend result.
34.13.1 Formalization hooks
| Tag | Module | Target | Status |
|---|---|---|---|
lean:cognitive_compilation.ir.operational_invariant |
AsiStackProofs.CognitiveCompilationRefinement |
Arbitrary successful runs preserve exact source identity, zero support/external-effect authority, valid traces, batch composition, receipt custody, and nondecreasing plan versions; acceptance requires validation bound to the current plan version. | implemented |
lean:cognitive_compilation.ir.failure_blocks_promotion |
AsiStackProofs.CognitiveCompilationRefinement |
A material repair returns to lowering only with localized scope, exact obligation preservation, coordinated one-step plan/ledger increments, a ledger receipt, and closed represented residuals; fresh repaired-plan validation is required before acceptance. | implemented |
lean:cognitive_compilation.ir.semantic_lowering_route_envelope |
AsiStackProofs.CognitiveCompilationRefinement |
The original finite routes are consumed alongside an eight-event reachable refinement and independent exact-build six-fixture/86-mutation consumer covering source, obligation, authority, target, version, validation, receipt, repair, ledger, residual, support, and effect failures. | implemented |
The three public targets now group 45 live declarations: twelve retained finite route consequences and 33 reachable-refinement consequences, including an eight-event fresh-validation witness and eight closed Lean countermodels. The two former assumption projections are physically retired with frozen lineage. The refinement proves exact abstract identity and transition consequences; it still does not inspect source or target meaning, establish arbitrary obligation completeness, run a backend, validate actual artifact content, measure repair locality, or prove runtime refinement.
These targets do not prove semantic preservation, compiler correctness, incremental-repair locality, artifact usefulness, or production transfer.
34.14 Placement Before Compilation
Cognitive compilation answers how an accepted lesson becomes a reusable representation. It should not silently answer whether the lesson deserves to persist or which representation should carry it. The Adaptive Commit Boundary places a prior adjudication step before semantic or executable compilation: compare context, memory, procedure, tool, route, policy, parametric, evaluator, environmental, and institutional candidates, then compile only the admitted portfolio.
The compiler must also retain UNKNOWN and deoptimization routes. Novelty, contradiction, expired qualification, or missing authority should be able to re-expand a compiled shortcut into a slower auditable path. Successful compilation remains distinct from qualification and use authority.
34.15 Source crosswalk
| Source ID | Title | Layer | Planned use | Readiness |
|---|---|---|---|---|
cognitive_compilation |
Cognitive Compilation | planning_semantic_ir | Compiler framing for LLM-centered planning, semantic IR, target compilation, incremental repair. | source note available; local raw cache available |
planforge_compiler_arch |
PlanForge: A Compiler Architecture for AI Task Orchestration | planning_control | Later/alternate PlanForge framing. Prefer highest-quality/latest content after comparison. | source note available; local raw cache available |
genesiscode |
GenesisCode | executable_specification | Tiny pure calculus + obligations + provenance for auditable AI-symbiotic programming. | source note available; local raw cache available |
treellm |
TreeLLM correction lineage | semantic_representation | Structured-token ABI pressure, external semantic memory, stable-object versus coordinate/path separation, route variants, residuals, cache epochs, and migration after rejecting fixed-root and canonical-truth drafts. | source note available; local raw cache available |
viea |
Verified Intent-to-Execution Architecture | whole_stack_execution_spine | Keystone source. Human intent -> command contracts -> artifacts -> routing -> runtime targets -> verification -> deployment -> feedback. | source note available; local raw cache available |
cca_project |
Compiled Cognitive Architecture project | historical_project_lineage | Typed semantic atoms, explicit ambiguity, pass hashes, verification, bounded repair, target IR, and trace bundles. | source note available |
moecot_manifest_project |
MoECOT Manifest compiler-era project | historical_project_lineage | Authority-bearing semantic IR, ambiguity debt, field and provenance retention, pass/failure records, applied localized-repair receipts, and semantic portability. | source note available |
corbens_best_model_possible_project |
Corben’s Best Model Possible recurrent-model and mechanism laboratory | historical_project_negative_case | Task contracts and compiler surfaces plus negative cases for digest-parity laundering, positional repair identity, and interface-without-effect. | source note available |
ext_pddl_1998 |
PDDL: The Planning Domain Definition Language | planning_modeling | External comparator for domain/problem separation, action schemas, and planner-interface notation. | source note available |
ext_shop2_2003 |
SHOP2: An HTN Planning System | planning_htn | External comparator for ordered task decomposition and method-governed planning. | source note available |
ext_tree_of_thoughts_2023 |
Tree of Thoughts | planning_search | External comparator for explicit reasoning-path search and backtracking. | source note available |
ext_dreamcoder_2020 |
DreamCoder | program_synthesis_representation | External comparator for program synthesis, reusable abstractions, and library learning. | source note available |
ext_llvm_langref_docs |
LLVM Language Reference Manual | compiler_ir | External comparator for typed intermediate representation, equivalent representations, verifier boundaries, and transformation/analysis surfaces. | source note available |
ext_mlir_2020 |
MLIR: A Compiler Infrastructure for the End of Moore’s Law | multi_level_compiler_ir | External comparator for multi-level IR, dialects, modular passes, verifiers, and progressive lowering. | source note available |
ext_translation_validation_1998 |
Translation Validation | translation_validation | External comparator for per-translation source-target validation through semantic frameworks, refinement, and simulation-based proof. | source note available |
Seventeen exact mappings cover the chapter’s twenty assigned sources at their available evidence boundaries. The author and project lineage supports semantic IR, provenance, ambiguity, authority, repair, QCSA identity/address/route separation, and negative implementation cases. The external comparators ground planning interfaces, search, synthesis, typed and multi-level IR, and per-translation validation. None supplies a reproduced natural cognitive compiler. The core stays at argument because parser behavior, source-target semantics, real artifact preservation, evaluator adequacy, repair locality, useful advantage, reproduction, and transfer remain open.
34.15.1 Manifest source assignment reconciliation
These rows keep Cognitive Compilation and Semantic IR’s manifest assignments visible at their recorded review boundary. Passage review does not establish local reproduction, performance, safety, deployment, or support-state movement.
| Source | Intake role | Boundary |
|---|---|---|
deterministic_capability_compilation |
Passage-reviewed Corben architecture source: Deterministic Capability Compilation: A Capability-Preserving Ladder from Executable Scaffolds to Governed Adaptive Agents. Corben-authored July 2026 architecture and research program for compiling executable scaffolds into contract-bound experts and linked Neural Capability Objects while retaining semantic obligation mass balance, candidate-specific translation validation, fallback, residual escrow, authority ceilings, reification, and effect-complete recovery. Existing chapters are upgraded first; no foundry implementation, learned-capability result, preservation result, safety result, SOTA result, AGI, ASI, or support-state promotion is inferred. | No local implementation, reproduction, performance, safety, deployment, support-state, or ASI result is established by this reconciliation row. |
platonic_world_model |
Metadata-first comparator: The Platonic World Model: A Semantic Constitution for Grounded, Proof-Carrying, Self-Editing Artificial Intelligence. Corben-authored July 2026 conceptual architecture and falsifiable research program for semantic continuity through stable Form lineages, immutable semantic versions, typed Essence Contracts, six mutually constraining planes, explicit proposition-attestation-commitment-proof separation, branch-protected world dynamics, qualified grounding, semantic transactions, runtime packet compilation, and federated mappings. Existing chapters are upgraded first; no implemented substrate, benchmark result, philosophical solution to grounding, safety result, SOTA result, AGI, ASI, or support-state promotion is inferred. | No passage-level source claim, local implementation, reproduction, safety, performance, deployment, support-state, or ASI result is established by this reconciliation row. |
qcsa_whitepaper |
Passage-reviewed comparator: Question-Compiled Semantic Addressing. Frames SOIDs and SACs as typed semantic-IR references, question traces as evidence-acquisition programs, and semantic-to-physical route plans as policy-constrained target lowering; the later repository adds a bounded local 12-lane implementation, 60-case held-out evaluation over 13 systems and three seeds, and one 13-stage governed vertical trace. | The exact matched-advantage and resource gates failed, and the active-question ablation is N2 proxy/regime evidence rather than an exact or broad refutation. No natural-task, learned-model, universal-semantic, production, safety, privacy, external-independence, chapter-core promotion, AGI, or ASI result is established. No local implementation, reproduction, performance, safety, deployment, support-state, or ASI result is established by this reconciliation row. |
kernel_english_residual_compiler |
Metadata-first comparator: Kernel English with Hierarchical, Interaction-Amortized Residuals: A Dual-Vocabulary Cognitive Compiler for Efficient Language-Model Reasoning. Corben-authored July 2026 architecture proposal for KERC: protected-object capture, uncertainty-aware normalization, sense-aware Kernel IR, dual surface/core vocabularies, a four-level interaction-amortized residual ledger, exact object storage, grammar-aware macro fusion, structured answer packets, rendering, round-trip verification, versioned migration, and complete rate-compute-fidelity evaluation. Existing chapters are upgraded first; no implementation, benchmark, novelty, efficiency, fidelity, safety, transfer, SOTA, AGI, ASI, or support-state result is inferred. | No passage-level source claim, local implementation, reproduction, safety, performance, deployment, support-state, or ASI result is established by this reconciliation row. |
relational_dimension_compiler |
Passage-reviewed comparator: The Relational Dimension Compiler: Adaptive Polyadic Cognition with Bounded Computational Arity and Unbounded Semantic Structure. Adds a dimensional type system and a four-layer relational IR whose semantic, evidence, computational, and abstraction records can lower relation objects into neural, graph, database, symbolic, simulator, planning, or verification backends without identifying a tensor index with semantic identity. | The existing chapter owns accepted-obligation translation, not the complete RDC world-structure lifecycle; no lowering preserves open-world relational meaning by source authority alone. No local implementation, reproduction, performance, safety, deployment, support-state, or ASI result is established by this reconciliation row. |
adjudicated_persistence |
Passage-reviewed comparator: Placement adjudication before semantic lowering. Separates deciding where a lesson should persist from compiling the accepted lesson into a particular semantic or executable representation, with UNKNOWN and deoptimization paths. | Used only to order adjudication before lowering and preserve UNKNOWN and deoptimization; no compiler-correctness or representation-sufficiency result follows. No local implementation, reproduction, performance, safety, deployment, support-state, or ASI result is established by this reconciliation row. |
34.16 Summary
Cognitive Compilation owns representation transformation after planning and before jobs or effects. Its contract binds an accepted obligation through source, semantic, target, and artifact forms while keeping assumptions, ambiguity, authority, rights, validators, failures, repair, costs, and residuals addressable.
The present evidence is deliberately narrower: hand-authored trace records, one blocked preservation fixture with mutations, fourteen finite theorem declarations, and a mixed bounded QCSA program. QCSA demonstrated exact fixture-level identity, certificate, migration, calibration, and reversible trace mechanisms, but tied the best baseline on task accuracy, exceeded the resource ceiling, and did not benefit from active questions on its exact corpus. No natural cognitive artifact or chapter-core support movement follows.
A compiled artifact earns the name only when the system can point from actual target content back to accepted obligations, pass semantics, validators, assumptions, losses, failures, and residuals—and when independent evaluation shows that the extra machinery improves useful preservation over matched simpler routes. The Virtual Context ABI supplies the versioned source and representation boundary those translations need next.
34.17 Evidence reconciliation (2026-07-16)
The invariant protocol, field meanings, and inference limits are stated once in Living Book Methodology. This packet contains only the chapter-specific projection; its authoritative per-atom rows are the cognitive-compilation-and-semantic-ir slice of experiments/claim_family_terminal_coverage/results/result.json.
The core remains blocked after full attempt at argument support. The strongest family attempt was Intent-to-execution vertical refinement. Its exact boundary is: Structured local scenarios only; no natural-language semantic sufficiency, production backend, transfer, or deployment claim. Across 72 atoms, the terminal ledger records 72 blocked_after_full_attempt.
| Chapter-specific field | Value |
|---|---|
| Family / atom denominator | CF-03 / 72 atoms |
| Terminal dispositions | 72 blocked_after_full_attempt |
| Core | cognitive-compilation-and-semantic-ir.core: blocked_after_full_attempt at argument |
| Core attempted / missing lanes | source-synthesis / causal, empirical, executable, formal, normative, transfer |
| Attempted local lanes | source-synthesis |
| Missing or unproved lanes | causal, empirical, executable, formal, normative, transfer |
| Strongest family bundle | Intent-to-execution vertical refinement (end_to_end): Nine versioned scenarios and 89 events from governed intake through six observed local effects and terminal outcomes. |
| Negative controls | pre-effect refusal; failed rollback quarantine; 30 rejecting mutations. |
| Accepted transitions | none |
| Maximum inference | Structured local scenarios only; no natural-language semantic sufficiency, production backend, transfer, or deployment claim. |
| Reproduction / next burden | Replay scripts/validate_intent_execution_vertical_refinement.py and scripts/validate_claim_family_terminal_program.py; fill the named atom-specific lanes under a new prospective protocol. |
34.18 Handoff
Semantic IR can only preserve obligations when the context feeding those obligations is addressable, authorized, and reviewable. The Virtual Context ABI: Typed Pages, Cells, and Certificates defines that memory boundary. It gives compiled work stable context handles, versions, mounts, snapshots, representation contracts, adequacy signals, and fault behavior so semantic atoms do not inherit invisible memory or stale evidence.