Graph nodes gain a name; nodes are objective facts (no learner/session references)

Schema: GraphNode + ExtractedProposition carry 'name' — a short 2-6 word
header, the rendering handle. Node theory made explicit: a node is an
objective world-facing fact; the learner's relationship to it lives
entirely in the event ledger (state labels are derived, never stored).
Extractor + auditor instructions enforce it — misconceptions state the
wrong idea itself as a claim, never 'the learner believes Y'. Legacy
ledger lines without a name derive one from the statement on read.
graph-view: labels use the name; the detail panel shows name as header
and statement as body.
This commit is contained in:
Amos
2026-09-01 03:34:47 +03:00
parent 49a6a6d9a0
commit 2e4e43b8c4
9 changed files with 84 additions and 14 deletions
+14 -2
View File
@@ -66,7 +66,15 @@ export type EdgeType = "requires" | "supports";
export interface GraphNode {
/** Opaque stable id, store-assigned: "n_" + nanoid-like. */
id: string;
/** Canonical proposition statement. */
/** Short name / header for the fact (2-6 words) — the rendering handle.
* NODE THEORY: a node is an OBJECTIVE fact, never learner- or
* session-relative. No "the learner understands…", no "this session
* covered…" — just the fact, world-facing. The learner's relationship
* to the fact lives ENTIRELY in the event ledger: state labels are
* derived from quiz outcomes, never written into the node. */
name: string;
/** Canonical proposition statement — the full fact, one reasoning step,
* also objective (no learner / teacher / session references). */
statement: string;
/** Verbatim alternate statements from sessions (merge target audit trail). */
aliases: string[];
@@ -146,7 +154,11 @@ export interface LedgerEvent {
export interface ExtractedProposition {
/** Extractor-local id ("p1", …) referenced by edges + attribution. */
id: string;
/** Canonical one-reasoning-step statement. */
/** Short name / header for the fact (2-6 words) — the rendering handle. */
name: string;
/** Canonical one-reasoning-step statement — an objective, world-facing
* fact (no learner / teacher / session references; the learner's
* relationship to it is carried only by the event attribution). */
statement: string;
/** Verbatim alternate phrasings from the session (merge aliases). */
aliases: string[];
+1
View File
@@ -160,6 +160,7 @@ export function mergeFindings(chatId: string, findings: SessionFindings, deps: G
} else {
const graphNode: GraphNode = {
id: newGraphNodeId(),
name: p.name,
statement: p.statement,
aliases: [...p.aliases],
kind: p.kind,