Canon

08 — Promotion Path

The governed promotion path from staged candidate to approved organizational memory.

The Canonical Writer

The only canonical writer of organizational memory is services/pipeline/src/memory-promoter.ts.

No other service, workflow, or agent may write to org_memory directly.

Promotion Flow

Approved triage candidate
        |
        v
Memory Consolidator (scheduled)
        |
        v
scoreForPromotion() — 7 Promotion Signals
        |
        v
Governance gate: staging vs approved
        |
   ┌────┴────┐
   |         |
staging   approved
   |         |
   v         v
Human     Direct write
review    to org_memory
   |         |
   v         v
approve   Index to
   |      AI Search
   v
Pipeline
promotion

7 Promotion Signals

SignalWeightMeaning
strategic2Entity is inherently strategic (account, deal, contract, etc.)
decision2Explicit decision provenance
exception2Risk, anomaly, breach, blocked, churn
important1Material value, financial significance
repeated1Multiple occurrences or contributors
behavioral1Activity, engagement, interaction
preference1Explicit user/customer preference

Strong signals (weight >= 2) can promote alone. Weak signals need company.

Threshold: Score >= 2 to promote.

Governance Gate

const needsApproval =
  !schema.governanceDefaults.autoPromote ||
  schema.governanceDefaults.requiresApproval.includes(category);

const governanceState = needsApproval ? "staging" : "approved";

Sensitive categories (risk, decision, policy) always land in staging — the Twin must not use them until approved.

Deduplication

Promotion deduplicates by lineage_ref (the source Spine entity):

  • Existing memory found → update confidence (+0.1), update content
  • No existing memory → insert new row
  • Audit trail always written

Indexing

After promotion, approved memory is indexed into AI Search:

  • Markdown content with full metadata
  • Idempotent re-upload (same ID overwrites)
  • Batch processing (10 per batch, 100ms delay between batches)

What Promotion Produces

OutputStorePurpose
org_memory rowD1Canonical organizational memory
memory_promotion_audit rowD1Immutable audit trail
AI Search documentVectorize/AI SearchSearchable memory
Outbox eventQueueDownstream notifications