Expand description
Solo steward: consolidation pass (SWS-equivalent dedup, REM-equivalent integration, decay sweep, reconsolidation).
Per ADR-0002, Steward is a struct, not a trait. The LLM backend is
the swap point (via solo_core::LlmClient); the consolidation logic
lives in one place.
§v0.2 status
cluster_episodes(this commit): pure-deterministic SWS pass. Seeclusterfor the algorithm + tests. Implementation does not call the LLM and does not touch the DB — caller pairs(Episode, Embedding)from SQL upstream.abstract_cluster: TODO — REM-equivalent LLM call to produce aSemanticAbstractionfor each cluster. Will go incrate::abstractionwhen added.detect_contradiction: TODO — bi-temporal SQL filter + LLM judge for ambiguous cases. Will go incrate::contradiction.
Storage wiring (writer → cluster → SQL persistence) lands in
solo-storage separately.
Modules§
- abstraction
- REM-equivalent integration: ask the LLM to produce a semantic abstraction for one cluster of related episodes.
- cluster
- Pure-deterministic episode clustering — the SWS-equivalent dedup pass that opens every consolidation cycle.
- contradiction
- Contradiction detection between two triples — the third stage of consolidation per ADR-0002. Two-stage:
Structs§
- Extract
Triples Batch Outcome - v0.10.1 (P4 audit m5): outcome of
Steward::extract_triples_batch. - Steward
- Steward
Config
Constants§
- ENV_
ABSTRACTION_ MAX_ TOKENS - Env var name for tuning the abstraction LLM call’s
max_tokensrequest. Must be a positive integer in[1, 65_536](upper bound catches typo’d values like1_000_000that would silently inflate per-call cost). Default 512. - ENV_
CLUSTER_ COSINE_ THRESHOLD - Env var name for tuning the centroid-cosine threshold used by
every clustering / existing-merge / merge-candidate count site.
One knob governs them all to preserve the SQL-sync invariant
between the writer’s existing-merge and the doctor’s count
(see
solo_storage::merge_candidatesmodule docstring). - ENV_
CLUSTER_ MIN_ SIZE - Env var name for tuning the minimum cluster size (number of episodes) below which a candidate cluster is discarded by the SWS-equivalent clustering pass. Must be a positive integer. Default 3.
- ENV_
CONTRADICTION_ CHECK_ ENABLED - Env var name for the contradiction-detection toggle.
trueorfalse, case-insensitive. Whenfalse, the consolidation pass skips the rule filter + LLM judge entirely andcontradictions_foundstays 0. Useful for cost-constrained operators willing to lose contradiction tracking. Defaulttrue.