Interface Fact

A single extracted fact tuple. object MUST be a literal span from the source turn (never paraphrased); this contract is the design delta from Steps 5/7/8 whose summary-based approaches erased specific-value tokens.

interface Fact {
    subject: string;
    predicate: string;
    object: string;
    timestamp: number;
    sourceTraceIds: string[];
    sourceSpan: string;
}

Properties

subject: string

Canonical subject ("user" for first-person, lowercase otherwise).

predicate: string

Predicate from the closed schema (see PREDICATE_SCHEMA).

object: string

Literal object span from the source turn — NEVER paraphrased.

timestamp: number

ms since epoch.

sourceTraceIds: string[]

Trace or session IDs this fact was extracted from.

sourceSpan: string

The full sentence the fact came from (for audit, not retrieval).