{"slug":"triage/08-PROMOTION_PATH","title":"08 — Promotion Path","section":"triage","sectionLabel":"Triage","status":"canon","type":"document","path":"triage/08-PROMOTION_PATH.mdx","bytes":2584,"description":"The governed promotion path from staged candidate to approved organizational memory.","updated":"2026-08-24","source":"integratewise/Integratewise-docs-wiki","content":"\n\n## The Canonical Writer\n\nThe **only** canonical writer of organizational memory is `services/pipeline/src/memory-promoter.ts`.\n\nNo other service, workflow, or agent may write to `org_memory` directly.\n\n## Promotion Flow\n\n```\nApproved triage candidate\n        |\n        v\nMemory Consolidator (scheduled)\n        |\n        v\nscoreForPromotion() — 7 Promotion Signals\n        |\n        v\nGovernance gate: staging vs approved\n        |\n   ┌────┴────┐\n   |         |\nstaging   approved\n   |         |\n   v         v\nHuman     Direct write\nreview    to org_memory\n   |         |\n   v         v\napprove   Index to\n   |      AI Search\n   v\nPipeline\npromotion\n```\n\n## 7 Promotion Signals\n\n| Signal | Weight | Meaning |\n|---|---|---|\n| strategic | 2 | Entity is inherently strategic (account, deal, contract, etc.) |\n| decision | 2 | Explicit decision provenance |\n| exception | 2 | Risk, anomaly, breach, blocked, churn |\n| important | 1 | Material value, financial significance |\n| repeated | 1 | Multiple occurrences or contributors |\n| behavioral | 1 | Activity, engagement, interaction |\n| preference | 1 | Explicit user/customer preference |\n\n**Strong signals** (weight >= 2) can promote alone. Weak signals need company.\n\n**Threshold:** Score >= 2 to promote.\n\n## Governance Gate\n\n```typescript\nconst needsApproval =\n  !schema.governanceDefaults.autoPromote ||\n  schema.governanceDefaults.requiresApproval.includes(category);\n\nconst governanceState = needsApproval ? \"staging\" : \"approved\";\n```\n\nSensitive categories (risk, decision, policy) always land in `staging` — the Twin must not use them until approved.\n\n## Deduplication\n\nPromotion deduplicates by `lineage_ref` (the source Spine entity):\n\n- Existing memory found → update confidence (+0.1), update content\n- No existing memory → insert new row\n- Audit trail always written\n\n## Indexing\n\nAfter promotion, approved memory is indexed into AI Search:\n\n- Markdown content with full metadata\n- Idempotent re-upload (same ID overwrites)\n- Batch processing (10 per batch, 100ms delay between batches)\n\n## What Promotion Produces\n\n| Output | Store | Purpose |\n|---|---|---|\n| `org_memory` row | D1 | Canonical organizational memory |\n| `memory_promotion_audit` row | D1 | Immutable audit trail |\n| AI Search document | Vectorize/AI Search | Searchable memory |\n| Outbox event | Queue | Downstream notifications |\n"}