1 Commits
Author SHA1 Message Date
John SmithandClaude 96ced54af3 feat(auditor): ground truth from live engine, audit-before-yield streaming, narrative lore triples
- Grounding: NarrativeGenerateRequest gains engine_session_id /
  target_entity_id. When a session is named, _resolve_audit_inputs fetches
  the live snapshot and the auditor reconciles against IT: lethality fields
  come from the live entity (a payload claiming death while the engine says
  25 HP can no longer smuggle a kill past Vector 3), entity counts come
  from the live snapshot, named-but-missing targets are rejected as ghost
  entities, and an unreachable engine fails closed with
  WORLD_INSPECTOR_UNAVAILABLE instead of auditing stale client claims.
- Streaming: tokens are now HELD until the sentence they belong to has
  passed the auditor; violating sentences and everything after them are
  never emitted — only the corrective SYSTEM frame and the cut.
- Lore continuity: Vector 4 was dead code (nothing ever populated its
  lore_* payload keys). The auditor now derives (subject, predicate,
  object) triples from canon entity names and predicate verbs appearing in
  the draft itself, including reflexive assertions like "Oakhaven Keep
  still stands". Payload triples still take precedence.

Co-Authored-By: Claude <[email protected]>
2026-08-24 01:08:47 -04:00