Promotion Engine

loom-sprint-scaffoldsourcetypescript
Path: loom-sprint-scaffold/loom/src/memory/core/promotion-engine.tsRelative: loom/src/memory/core/promotion-engine.tsSubproject: loom-sprint-scaffoldCategory: other
Lines: 198Bytes: 6,260Imports: 4Exports: 2

Content Preview

  1. /**
  2. * H4.2 — Promotion Engine.
  3. *
  4. * episodic → semantic: when a pattern recurs across ≥ m_promote distinct traces.
  5. * Writes a new semantic MemoryRecord with provenance listing the exact
  6. * trace_event ids that justified it, status='auto'.
  7. *
  8. * semantic → procedural: NEVER auto. Creates a skills row with status='proposed'
  9. * ONLY. The skills table (from src/db/schema.ts) is the procedural knowledge
  10. * store; human approval is required before promotion status='approved'.
  11. *
  12. * All tuna