{"slug":"architecture/02_SPINE_FABRIC","title":"02 · Spine Fabric","section":"architecture","sectionLabel":"Architecture","status":"unclassified","type":"document","path":"architecture/02_SPINE_FABRIC.mdx","bytes":7487,"description":"The central fabric that maintains canonical truth, organizational memory, context, and continuity across the entire operating loop","updated":null,"source":"integratewise/Integratewise-docs-wiki","content":"\n\n**The central fabric. Not merely a database.**\n\nSpine Fabric is the single source of truth that all other layers read from and write to. It maintains canonical business memory and operational continuity. It is what makes the loop continuous rather than episodic.\n\n```text\n                    SPINE FABRIC\n\n\n ┌────────────────────────────────────────────────────┐\n │                                                    │\n │                 BUSINESS CONTEXT                   │\n │                                                    │\n │ Goals          Needs           Objectives          │\n │ Entities       Relationships   Organizations       │\n │ People         Accounts        Products            │\n │                                                    │\n ├────────────────────────────────────────────────────┤\n │                                                    │\n │                    WORK GRAPH                      │\n │                                                    │\n │ Work → Tasks → Decisions → Actions → Dependencies │\n │                                                    │\n ├────────────────────────────────────────────────────┤\n │                                                    │\n │                  OPERATIONAL STATE                 │\n │                                                    │\n │ Current State │ Status │ Events │ Evidence        │\n │                                                    │\n ├────────────────────────────────────────────────────┤\n │                                                    │\n │                  ORGANIZATIONAL MEMORY             │\n │                                                    │\n │ Decisions │ Knowledge │ Patterns │ History        │\n │                                                    │\n ├────────────────────────────────────────────────────┤\n │                                                    │\n │                     LOOP STATE                     │\n │                                                    │\n │ Identified → Contextualized → Defined              │\n │ → Allocated → Deciding → Executing                │\n │ → Observing → Re-ingesting → Reconciling          │\n │ → Learning → Next Work                             │\n │                                                    │\n └────────────────────────────────────────────────────┘\n```\n\n---\n\n## What Spine Fabric Contains\n\n### Business Context\n\n- Goals, needs, objectives\n- Entities, relationships, organizations\n- People, accounts, products\n- Constraints, policies\n\n### Work Graph\n\n- Work items, tasks, decisions, actions\n- Dependencies, priorities, assignments\n- Status, progress, blockers\n\n### Operational State\n\n- Current state of all entities\n- Real-time events and signals\n- Evidence and audit trail\n- Attribution and provenance\n\n### Organizational Memory\n\n- Decisions and their rationales\n- Knowledge and patterns\n- History and learnings\n- Outcomes and their context\n\n### Loop State\n\n- Where every work item is in the cycle\n- What has been attempted\n- What has been verified\n- What needs to happen next\n\n---\n\n## The Five Spine Stores\n\n| Store | Technology | Contents | Governance |\n|-------|-----------|----------|------------|\n| **Canonical Spine** | Neon / Postgres | Authoritative truth, long-term memory, governed writes | Strict — organization-controlled |\n| **Operational Spine** | D1 / Durable Objects | Working context, real-time state, short-term working sets | Moderate — tenant-scoped |\n| **Edge / Session State** | Workers / Cache | Ephemeral state, per-session / per-device, fast access | Light — session-scoped |\n| **Audit Store** | Append-only | Immutable audit trail, compliance evidence | Immutable — no modifications |\n| **Memory Store** | Knowledge DB | Organizational memory, patterns, learnings | Governed — promotion-controlled |\n\n---\n\n## The Universal Record Envelope\n\nEvery Spine entity conforms to a single envelope:\n\n```typescript\ninterface SpineRecord {\n  id: string;\n  tenantId: string;\n  entityType: EntityType;\n  state: EntityState;\n  version: number;\n  createdAt: string;\n  updatedAt: string;\n  metadata: Record<string, unknown>;\n  payload: unknown;\n}\n```\n\n### Canonical Entity Types\n\n| Entity | Prefix | Description |\n|--------|--------|-------------|\n| Connection | `conn_` | Authenticated link to an external system |\n| Connector | `cplr_` | Integration adapter definition |\n| SyncJob | `sync_` | Data synchronization task |\n| Webhook | `wh_` | Inbound event listener |\n| Schema | `sch_` | Data transformation definition |\n| Capability | `cap_` | Registered platform capability |\n| TimelineEvent | `evt_` | Audit/continuity event |\n\n---\n\n## Spine Fabric Is Bidirectional\n\nSpine Fabric both provides and receives:\n\n### Reads From (Spine → Everything)\n\n| Consumer | What It Reads |\n|----------|--------------|\n| Human Workbench | Business context, work items, KPIs |\n| Twin Workbench | Context, reasoning material, work graph |\n| Projections | Raw data for role-specific shaping |\n| Governance | Policies, constraints, risk data |\n| Agents | Context, capabilities, work assignments |\n\n### Writes To (Everything → Spine)\n\n| Writer | What It Writes |\n|--------|---------------|\n| Ingestion | New events, entity updates |\n| Execution | Action outcomes, state changes |\n| Reconciliation | Verified state, discrepancy records |\n| Memory | Promoted knowledge, learned patterns |\n| Human | Decisions, approvals, context |\n| Twin | Reasoning, recommendations, plans |\n\n---\n\n## Storage Boundaries (Frozen Doctrine §29)\n\n- **Neon** controls tenant registry and cross-tenant queries\n- **Per-tenant D1** holds V0 operational Spine\n- **Fortress-adjacent** stores audit/evidence data\n- Stores never leak across tenant boundaries\n- Every query is scoped to `tenantId` at the storage layer\n\n---\n\n## Spine Fabric Connects to\n\n| Layer | Relationship |\n|-------|-------------|\n| [Business Context](/architecture/01_BUSINESS_CONTEXT) | Organizes and maintains Business Context |\n| [Organizational Memory](/architecture/03_ORGANIZATIONAL_MEMORY) | Stores accumulated knowledge |\n| [Work Graph](/architecture/04_WORK_GRAPH) | Derives work from context |\n| [Projections](/architecture/05_PROJECTIONS) | Provides data for role-specific shaping |\n| [Communication Bridge](/architecture/11_COMMUNICATION_BRIDGE) | Exchanges context with agents and systems |\n| [Reconciliation](/architecture/15_RECONCILIATION) | Receives verified outcomes |\n| [Loop State](/architecture/16_LOOP_STATE) | Tracks work item lifecycle |\n"}