core.curator
core.curator
Zone A — background graph compaction / contradiction flagging (cron). BUILD-SPEC §9.
The curator DETECTS and FLAGS; it never rewrites authored ground truth (§8). It reads the corpus and writes only INTERPRETED findings (near-duplicate / prune / contradiction candidates) to the derived store; applying any change to authored content is the gated self-modification loop's job (Phase 10). Runs only in troughs.
CONTRADICTION = 'contradiction'
module-attribute
NEAR_DUPLICATE = 'near_duplicate'
module-attribute
PRUNE_CANDIDATE = 'prune_candidate'
module-attribute
ContradictionDetector = Callable[[Cluster, str], 'list[str]']
module-attribute
CurationFinding
dataclass
subkind
instance-attribute
subjects
instance-attribute
detail
instance-attribute
data
instance-attribute
digests = ()
class-attribute
instance-attribute
CurationReport
dataclass
findings
instance-attribute
contradiction_detection_deferred
instance-attribute
of(subkind)
Curator
dataclass
store
instance-attribute
derived
instance-attribute
raw = None
class-attribute
instance-attribute
near_dup_threshold = 0.93
class-attribute
instance-attribute
cluster_threshold = 0.62
class-attribute
instance-attribute
min_cluster_size = 2
class-attribute
instance-attribute
max_clusters = 8
class-attribute
instance-attribute
contradiction_detector = None
class-attribute
instance-attribute
attestor = None
class-attribute
instance-attribute
near_duplicates()
Authored notes with near-identical embeddings — read-only over the mirror.
Reads through a MirrorView (Invariant 6, structural): a non-authored note can never
reach this scan, because a MirrorView holding one is unrepresentable.
prune_candidates()
Derived vector rows orphaned from the raw store (dead derived weight). Requires a raw store to compare against; without one this check is simply skipped.
contradictions()
Within-theme contradictions — a model judgment. Deferred (returns nothing) until a detector is injected; never faked (cf. the §4 judge seam).
curate()
Run a full curation pass and persist every finding as an INTERPRETED artifact. Reads the authored corpus; writes ONLY to the derived store (§8 firewall).
build_curator(config=None)
Wire a Curator against the real configured stores. Contradiction detection stays deferred unless a detector is supplied (e.g. one backed by the synthesis model).
curator
The curator (BUILD-SPEC §9) — Zone A, cron/trough tier.
Background compaction that DETECTS and FLAGS — it never rewrites the owner's authored
ground truth (§8: "the curator operates on the interpreted layer and must never silently
rewrite the explicit layer"). It only reads the authored corpus; everything it produces is
an INTERPRETED finding in the derived store (regenerable). Authored near-duplicates are
flagged as merge candidates, never auto-merged — applying a merge or prune to authored
content is a corpus mutation that belongs to the gated self-modification loop (Phase 10,
propose → approve → execute → validate → rollback), not an unattended cron.
Findings produced (all kind=FINDING, subkind is the finding type):
- near_duplicate : distinct authored notes whose embeddings are near-identical. Deterministic.
- prune_candidate: derived vector rows orphaned from the raw store — dead derived weight,
safe to regenerate away (not authored loss). Deterministic.
- contradiction : within-theme contradictions. This is a model JUDGMENT, so it is an
injectable seam, deferred (produces nothing) until a detector is
supplied — exactly like the §4 judge seam, never faked with heuristics.
Trough-only: a curate job routes to the synthesis tier (scheduler.router), gated off while
the owner is present by the supervisor's foreground check (HEAVY_TIERS, Phase 3) — §13.
NEAR_DUPLICATE = 'near_duplicate'
module-attribute
PRUNE_CANDIDATE = 'prune_candidate'
module-attribute
CONTRADICTION = 'contradiction'
module-attribute
ContradictionDetector = Callable[[Cluster, str], 'list[str]']
module-attribute
CurationFinding
dataclass
subkind
instance-attribute
subjects
instance-attribute
detail
instance-attribute
data
instance-attribute
digests = ()
class-attribute
instance-attribute
CurationReport
dataclass
findings
instance-attribute
contradiction_detection_deferred
instance-attribute
of(subkind)
Curator
dataclass
store
instance-attribute
derived
instance-attribute
raw = None
class-attribute
instance-attribute
near_dup_threshold = 0.93
class-attribute
instance-attribute
cluster_threshold = 0.62
class-attribute
instance-attribute
min_cluster_size = 2
class-attribute
instance-attribute
max_clusters = 8
class-attribute
instance-attribute
contradiction_detector = None
class-attribute
instance-attribute
attestor = None
class-attribute
instance-attribute
near_duplicates()
Authored notes with near-identical embeddings — read-only over the mirror.
Reads through a MirrorView (Invariant 6, structural): a non-authored note can never
reach this scan, because a MirrorView holding one is unrepresentable.
prune_candidates()
Derived vector rows orphaned from the raw store (dead derived weight). Requires a raw store to compare against; without one this check is simply skipped.
contradictions()
Within-theme contradictions — a model judgment. Deferred (returns nothing) until a detector is injected; never faked (cf. the §4 judge seam).
curate()
Run a full curation pass and persist every finding as an INTERPRETED artifact. Reads the authored corpus; writes ONLY to the derived store (§8 firewall).
build_curator(config=None)
Wire a Curator against the real configured stores. Contradiction detection stays deferred unless a detector is supplied (e.g. one backed by the synthesis model).