{"slug":"architecture/05_PROJECTIONS","title":"05 · Projections","section":"architecture","sectionLabel":"Architecture","status":"unclassified","type":"document","path":"architecture/05_PROJECTIONS.mdx","bytes":4277,"description":"The sole composition layer — shaping canonical Spine data into role-appropriate views without duplicating or leaking canonical truth","updated":null,"source":"integratewise/Integratewise-docs-wiki","content":"\n\n**The sole composition layer.**\n\nProjections shape canonical Spine data into role-appropriate views. They are the only mechanism through which the Spine is exposed to users and AI. Nothing reads from the Spine directly — everything goes through Projections.\n\n---\n\n## Why Projections Exist\n\nThe Spine contains canonical truth. But different roles need different views of that truth:\n\n- A Sales Manager needs pipeline data, not engineering metrics\n- A Finance Analyst needs revenue data, not support tickets\n- A Twin needs context for its user's role, not every fact in the Spine\n- A Domain Agent needs domain-specific data, not cross-domain noise\n\nProjections solve this by shaping the same canonical truth into role-appropriate views.\n\n---\n\n## The Projection Model\n\n```text\nCanonical Spine\n      ↓\nProjection Engine\n      ↓\nRole / Domain / Authorization Filter\n      ↓\nContext Assembly\n      ↓\nOperational / Sandbox Context\n      ↓\nTwin / Agents / Workbench\n```\n\n### Key Invariant\n\n> AI receives authorized projections, not unrestricted canonical organizational truth.\n\nThis is one of the strongest architectural invariants:\n\n```text\n                    SPINE\n                     │\n          ┌──────────┴──────────┐\n          │                     │\n    CANONICAL LAYER       OPERATIONAL LAYER\n          │                     │\n     Organization             Sandbox\n     Truth                    Context\n     Memory                   Working State\n     Governance               Agent Data\n          │                     │\n       HUMAN                 AI / AGENTS\n```\n\n---\n\n## Projection Types\n\n| Type | Description |\n|------|-------------|\n| **Role Projection** | Shaped by the user's role (Sales, Finance, etc.) |\n| **Domain Projection** | Shaped by the business domain |\n| **Work Projection** | Shaped by the current work item |\n| **Time Projection** | Shaped by temporal relevance |\n| **Authorization Projection** | Filtered by permissions |\n\n---\n\n## Projection Contract\n\n```typescript\ninterface Projection {\n  id: string;\n  tenantId: string;\n  source: 'spine';                    // always from the Spine\n  target: ProjectionTarget;           // who/what receives this\n  scope: ProjectionScope;             // what data is included\n  filters: FilterDef[];               // data filters\n  transforms: TransformDef[];         // data transformations\n  cacheability: CachePolicy;          // how long this is valid\n  governanceToken?: string;           // governance approval\n}\n```\n\n---\n\n## Projection Rules\n\n| Rule | Description |\n|------|-------------|\n| **Canonical read-only** | Projections read from the Spine, never write |\n| **No duplication** | Projections do not copy canonical data |\n| **Role-scoped** | Each projection is scoped to a role |\n| **Authorization-gated** | Projections respect RBAC |\n| **Audit-logged** | Every projection is logged |\n| **Cacheable** | Projections can be cached for performance |\n\n---\n\n## Projections and AI Security\n\nThe Projection layer is the security boundary between canonical truth and AI:\n\n```text\nCanonical Spine (organization truth, memory, governance)\n      ↓\nProjection (role + authorization filter)\n      ↓\nContext Assembly (relevance scoring, token budgeting)\n      ↓\nOperational / Sandbox Context (AI-safe data)\n      ↓\nTwin / Agents (operate on safe data only)\n```\n\nThis ensures:\n- Twins never see unauthorized data\n- Agents operate within their scope\n- Context is always role-appropriate\n- Canonical truth is never leaked\n\n---\n\n## Projections Connect to\n\n| Layer | Relationship |\n|-------|-------------|\n| [Spine Fabric](/architecture/02_SPINE_FABRIC) | Reads canonical data from the Spine |\n| [Human Workbench](/architecture/06_HUMAN_WORKBENCH) | Provides role-specific views |\n| [Twin Workbench](/architecture/07_TWIN_WORKBENCH) | Provides sandbox context for AI |\n| [Coworker](/architecture/08_COWORKER) | Provides context for ambient awareness |\n| [Domain Projections](/architecture/17_DOMAIN_PROJECTIONS) | Domain-specific shaping |\n"}