Superseded

IntegrateWise Continuity Bridge

Canonical Architecture Specification v1.0.0-FINAL

Status: SUPERSEDED — historical architecture lineage
Date: 2026-07-02
Version: 1.0.0-FINAL
Current replacement: ARCHITECTURE_LOCK.md,
IMPLEMENTATION_CONTRACT_v1.1.md and
CONSOLIDATED_PRODUCT_PLATFORM_CONTRACT_v1.2.md.

This document no longer supersedes later architecture. Its product naming,
storage and UI-layer claims are retained for genealogy only.


1. The Doctrine

Context you own. AI you rent. Approval in between.

The IntegrateWise Continuity Bridge is an OODA Engine for Business Continuity. It preserves organizational context, memory, governance, and execution across all tools, humans, and AI agents through one stable continuity contract.

Product Name: IW Continuity Bridge
Category: The Operational Continuity Platform
Anti-categories: Not an OS, not a tool, not a platform-first product. "Knowledge workspace" is a descriptor, not the name.

1.1 The Core Promise

One JWT. One SSE connection. One Bridge. The Bridge connects to everything else.

A consumer (human, AI assistant, app, tool) needs exactly one credential to reach Salesforce, GitHub, Slack, Notion, AWS, and twenty other tools. The Bridge holds all provider credentials. The consumer holds none. The consumer never imports internal topology, never bypasses the governance gate, and never writes to a provider without approval.

1.2 The Tagline Hierarchy

LevelLine
CategoryThe Operational Continuity Platform
ProductIW Continuity Bridge
PromiseNothing important is forgotten
ActionThe last auth for endless continuity / One click to total continuity
ProofOne workbench. Full continuity. Zero context loss.
PhilosophyHuman workbench. Assistive AI. Governed context.

2. The OODA Engine (The Universal Loop)

Every entity, tool, user, and AI agent in the system operates on the same four-phase decision cycle. This is the core mental model of the platform.

┌─────────────────────────────────────────────────────────────────┐
│  OODA — Observe, Orient, Decide, Act                            │
│                                                                 │
│  OBSERVE ──► Read signals from tools, users, webhooks, files  │
│  ORIENT  ──► Assemble Entity360 + Memory + Knowledge            │
│  DECIDE  ──► Propose action, score confidence, govern            │
│  ACT     ──► Execute approved action, writeback, compound       │
│                                                                 │
│  └──────► Each cycle makes the next faster (compounding) ────┘ │
└─────────────────────────────────────────────────────────────────┘

2.1 Observe

Ingest raw signals from the perimeter: webhooks from Salesforce, Slack messages, file changes from the folder watcher, user clicks in the workbench, AI assistant queries via MCP.

  • Services: webhook-ingress, connector-sync, folder-watcher, mcp-connector (inbound)
  • Output: Raw payload → PIPELINE_QUEUE → normalizer
  • Speed: Milliseconds (event-driven) to minutes (scheduled polling)

2.2 Orient

Transform raw signals into unified context. The 8-stage normalizer (NA0–NA5) runs inside a single pipeline stage. Entity360 assembles data from all connected tools into one canonical view. Memory retrieval surfaces relevant historical context from active, staging, and archived tiers.

  • Services: normalizer, intelligence (Context Assembly), knowledge (RAG), continuity (memory retrieval)
  • Data: spine_entities (D1), entity:{id}:360 (KV cache), Vectorize (semantic embeddings)
  • Speed: < 2s for normalizer p99, < 10ms for Entity360 cache hit

2.3 Decide

The Twin (per-user AI reasoning engine) evaluates context and proposes an action. The governance gate scores confidence. The decision is immutable and auditable.

ConfidenceActionDestinationHuman Touch
≥ 0.85Auto-approveACT_QUEUENone
0.70 – 0.85Queue for reviewMy DeskApprove / Modify / Dismiss
< 0.70Discardspine_audit_log (discard reason)None
  • Services: twin-orchestrator (OODA engine), govern (confidence gate), think (LLM reasoning orchestration)
  • Model: Default gpt-5-mini via OpenRouter (aggregator). Swappable to Claude, Grok, Gemini, Ollama by config change.
  • Speed: 1–2s for simple proposals, 5–10s for complex analysis

2.4 Act

Execute approved actions through the Integration Router (South Plane). Write outcomes back to the Spine. Update memory so the next OODA cycle starts with more context than the last.

  • Services: act (execution), workflow (durable orchestration), hermes (message queue)
  • Output: External API call (Salesforce, Slack, etc.) + Spine writeback + memory promotion
  • Speed: 500ms–2s depending on external API latency

3. The Four Layers (Conceptual Law)

These layers describe trust boundaries, not deployment units. The physical implementation is the 0–16 stack in §8.

Consumers  ↔  Continuity Bridge  ↔  Continuity Kernel  ↔  Provider Fabric
LayerWhat It IsWhat Consumers See
ConsumersHumans, AI assistants (ChatGPT, Claude, Perplexity, Cursor), apps, toolsOne MCP connection, one JWT, one web workbench, or one SDK call
Continuity BridgeThe public interface and moat: identity, auth, discovery, projections, capabilities, governance entry, eventsIdentity, Discovery, Projections, Capabilities, Events
Continuity KernelThe internal context substrate: Adaptive Spine, Memory, Knowledge, Context, Capability Engine, Governance, Workflow, Continuity EngineNothing. Consumers never import internal topology.
Provider FabricReplaceable external execution: SaaS providers, databases, APIs, queues, agents, runtimesNothing. Entirely behind the Kernel.

Invariant: Consumers never import internal service topology. They see only Identity, Discovery, Projections, Capabilities, and Events.


4. The Two Planes (North / South)

Consumers → [API Gateway] → Spine (context) → [Integration Router] → Provider tools
             (North / Ingress)                (South / Egress)
PlaneDirectionRolePhysical Service
NorthConsumers → PlatformAuthN/Z, tenant routing, rate-limit, capability routing, Discovery, inbound MCPgateway (single Worker)
SouthPlatform → ProvidersAdapter routing (Nango / MCP / Native), credential wall, health, Entity360 context injectionIntegration Router (inside act + connector services)

Rule: Neither plane talks to the other except through the Spine. The Gateway and Integration Router are the only two doors — one in, one out.


5. MCP Pool Architecture (Bidirectional, First-Class)

MCP is a multiplexed, bidirectional, tenant-scoped pool. It is not a single connection. It is not "server/client." It is a pool.

5.1 Inbound MCP Pool (North Plane)

Endpoint: mcp.integratewise.ai/v1/mcp (SSE/stdio)
Role: AI assistants (ChatGPT, Claude, Perplexity, Cursor) connect to us to read scoped Spine/Memory context.
Primary ingress: This is the primary front door. Traditional SaaS webhooks are secondary.

Security gates (P0 — must close before production):

  1. JWT required on /tools, /invoke, /mcp, /sessions — 403 on bypass
  2. tenant_id extracted from JWT claim, never from client payload
  3. Cross-tenant session reuse → 403 (fail-loud, not 404)
  4. Read-only default. Write requires scope: write + governance approval.
  5. Tool catalog filtered by Discovery — tenant cannot discover another tenant's tools
  6. Every invocation logged to spine_audit_log with via: mcp

Consumer config (the ONLY client-side entry):

{
  "mcpServers": {
    "integratewise": {
      "type": "sse",
      "url": "https://mcp.integratewise.ai/v1/mcp",
      "headers": { "Authorization": "Bearer ${input:integratewise_jwt}" }
    }
  }
}

Key rule: One entry. Not 21. Not 5. One.

5.2 Outbound MCP Pool (South Plane)

Inside the Integration Router. We connect to provider MCP servers (Salesforce MCP, Slack MCP, GitHub MCP) using MCP as the transport. Entity360 context is injected before every outbound call.


6. The 26 Services (Physical Topology)

All services run on every deployment and serve all tenants. Customer-Zero is a tenant class, not a separate service. All 26 are wired into the Gateway as Cloudflare service bindings.

Tier 0 — Ingress & Routing

ServiceWorker NamePurposeBinding
gatewayintegratewise-gatewaySingle entry point; JWT validation; tenant routing; rate-limitN/A
webhook-ingressiw-webhook-ingressReceives external webhooks (Salesforce, HubSpot, Stripe, GitHub)WEBHOOK_INGRESS

Tier 1 — Tenant & Sync

ServiceWorker NamePurposeBinding
tenantsiw-tenantsMulti-tenant context resolution, tenant CRUD, RBAC, plan limitsTENANTS
connector-synciw-connector-syncOrchestrates connector sync (fetch → Normalizer → Triage)CONNECTOR_SYNC
normalizeriw-normalizer8-stage pipeline: parse → trait-detect → resolve-type → resolve-entity → link-rels → enrich-map → validate → emit-canonicalNORMALIZER
loaderiw-loaderCold-start pre-loader; Nango webhook handler; triggers immediate "creamy" syncLOADER
connectoriw-connectorOAuth callback handler (Nango)CONNECTOR

Tier 2 — Projection & Rendering

ServiceWorker NamePurposeBinding
pipelineiw-pipelineOnly writer to the Spine; commits to D1; writes audit logPIPELINE
twin-orchestratoriw-twin-orchestratorPersistent per-user OODA engine (Durable Object)TWIN_ORCHESTRATOR
l2iw-l2Department × industry overlay projectionsL2
intelligenceiw-intelligenceAnalytics & insights renderer; signal generationINTELLIGENCE
knowledgeiw-knowledgeKnowledge base, docs, semantic search (RAG)KNOWLEDGE
governiw-governGovernance rules engine; approval gates; HITL thresholdsGOVERN
storeiw-storePersistence for projections (accounts, deals, tasks)STORE
actiw-actAction execution; write-back to providersACT
spine-v2iw-spine-v2Spine normalization & graph servicesSPINE_V2

Tier 3 — Capability Runtime & Orchestration

ServiceWorker NamePurposeBinding
hermesiw-hermesMessage queue + execution engine (Durable Object)HERMES
triageiw-triageConfidence routing + active-memory decay (runs inside Hermes)TRIAGE
workflowiw-workflowDurable orchestration; pause; retry; sagaWORKFLOW
iw-agent-runtimeiw-agent-runtimeMCP-compliant AI agent executionIW_AGENT_RUNTIME
mcp-connectoriw-mcp-connectorMCP bridge: external agents → scoped Spine/Memory accessMCP_CONNECTOR

Tier 4 — Supporting

ServiceWorker NamePurposeBinding
agent-registryiw-agent-registryCatalog of available agents/integrationsAGENT_REGISTRY
billingiw-billingUsage tracking + plan enforcementBILLING
adminiw-adminPlatform admin; tenant management; overridesADMIN
folder-watcheriw-folder-watcherDurable Object filesystem watcher (macOS chokidar → DO)FOLDER_WATCHER
continuityiw-continuityMemory consolidation + decay (the continuity substrate)CONTINUITY
telemetryiw-telemetryTraces, metrics, observabilityTELEMETRY
thinkiw-thinkLLM reasoning orchestration (separate from iw-agent-runtime)THINK

7. The 0–16 Stack (Physical Implementation Topology)

The 4-layer law is conceptual (trust boundaries). The 0–16 stack is physical (implementation). Both hold simultaneously.

#LayerPhysical ServicesData / Storage
0Tenant Lifecycletenants, loader, adminD1 tenants, tenant_spine_config
1Customer Ecosystemconnector, connector-sync, agent-registryNango vault, connectors table
2Surface Layerapps/web, apps/mcp-serverCloudflare Pages, R2 assets
3Gateway LayergatewayN/A — pure routing
4Identity & Organizationtenants (RBAC)D1 rbac_roles, rbac_permissions
5Continuity Bridgeconnector-sync, normalizer, mcp-connector, webhook-ingressD1 sync_jobs, normalizer_state, KV Discovery cache
6Adaptive SpinepipelineD1 entities, relationships, spine_audit_log
7Context Assemblyintelligence, knowledgeVectorize, AI Search, KV context cache
8Shared Memorycontinuity, triageD1 memory (active/staging/archived), KV decay
9Capability Engineiw-agent-runtime, thinkOpenRouter API, KV model config
10Governance LayergovernD1 governance_audit_log, action_proposals
11Capability Runtimehermes, workflow, act, mcp-connectorDurable Objects, Queues (ACT_QUEUE, PIPELINE_QUEUE)
12Projection Registryl2, storeD1 projections, projection_registry
13Registry Layeragent-registry, intelligenceD1 capability_registry, endpoint_registry, KV cache
14Continuity Enginecontinuity, twin-orchestratorD1 continuity_graph, KV session handoffs
15Data & Infrastructuretelemetry, folder-watcherD1 audit_logs, R2 telemetry, Workers Analytics
16Endpoint Registrygateway (serves), intelligence (updates)KV + D1 endpoint_registry (living API contract)

Cross-cutting: Security (WAF, DDoS, TLS, CF Secrets, Zero Trust), Observability (logs/metrics/traces/alerts/audit), Reliability (idempotency, retries, DLQ, backpressure), Compliance (audit & lineage, retention, encryption, tenant isolation).


8. The Discovery Contract (Consumer Surface)

Endpoint: GET /api/v1/discovery
Cache: Client-side 5 minutes
Purpose: How humans and AI agents learn "what exists / what can I do" without hardcoding topology.

Response includes:

  • identity — user, tenant, org, role
  • workspace — tenant config, connected connectors, plan limits
  • projections — available lenses: Sales, CS, Finance, Executive, Architecture, Operations, Personal, Developer
  • capabilities — named actions filtered by tier/role/level (e.g., analyze_account, draft_email, get_department_health)
  • features — gated by plan (free/pro/enterprise)
  • navigation — role-based menu structure
  • personalization — user preferences, recent context
  • limits — rate limits, storage quotas, model quotas

AI agents read the same Discovery response as humans. This is the contract that makes cross-component communication effective and drift-proof.


9. Governance & Approval Gate (The 0.70/0.85 Law)

Two triage gates run on the same confidence thresholds:

9.1 Governance Triage (Execution Gate)

ConfidenceActionDestinationAudit
≥ 0.85Auto-approveACT_QUEUEgovernance_audit_log (auto-approved)
0.70 – 0.85Queued for reviewMy Desk (owner review)governance_audit_log (pending)
< 0.70Discard—governance_audit_log (discarded)

Even Customer-Zero cannot bypass hard approval-expiry gates.
Customer-Zero posture: Hermes native auto-execute for internal operations only.
External tenant posture: Async Handoff contract only (/api/v1/handoff/outcome, validated x-approval-token).

9.2 Memory Triage (Knowledge Gate)

ConfidenceActionDestinationWhere
≥ 0.85Auto-promoteActive memorycontinuity (TriageBot inside hermes)
0.70 – 0.85StagingStaging memorycontinuity
< 0.70Discard—continuity

Active memory decays if not reinforced and archives after ~30 days of no access. Triage is continuous, not one-shot.

9.3 Memory Scopes (FINAL — 4 Scopes)

ScopeWhoAccess
Personal (human)Individual userUser sees their own data
Work (work)Task/project contextTeam sees shared task data
Organization (org)Org-wideAdmin manages org Spine via capabilities
AI (twin)Twin/agent reasoningAgent sees its own traces and compounding context

Audit is cross-cutting Compliance, not a memory scope.


10. Memory Lifecycle (Continuity Engine)

The Continuity Engine runs 7 stages:

Memory Intake → Classification → Validation → Promotion → Memory Store → Continuity Graph → Memory Decay
  • Intake: Raw signals from Pipeline, Act, Twin, user actions
  • Classification: TriageBot scores confidence (0–1.0)
  • Validation: Deduplication against SSOC (stable UUIDs); lineage verification
  • Promotion: ≥0.85 → active; 0.70–0.85 → staging; <0.70 → discard
  • Memory Store: Active / staging / archived tiers in D1 + KV cache
  • Continuity Graph: Relationship traversal — who/what/when/where connected
  • Decay: Time-decay + access-decay; archive after ~30 days; reinforcement resets clock

Every agent turn starts with more context than the last. This is compounding memory.


11. AI / Twin / Reasoning Layer

11.1 Model Provider (The "AI You Rent")

  • Default: gpt-5-mini via OpenRouter (aggregator)
  • Swappable: OpenAI, Anthropic, Google, Grok — config change, not migration
  • Binding: Consumers call capabilities (twin/propose, insights, predictions), never model names
  • Per-tenant/per-capability model selection: Cheap model for triage, strong model for high-stakes proposals, provider failover

Resolution of DECISION 30 (Grok): Superseded. Twin default = gpt-5-mini via OpenRouter. Grok available as config option only.

11.2 Agent Services

ServiceRole
twin-orchestratorPersistent per-user OODA engine — reasoning engine (Durable Object)
iw-agent-runtimeMCP-compliant AI agent execution
thinkLLM reasoning orchestration (SDK abstraction layer)
mcp-connectorInbound MCP bridge — external agents → scoped Spine/Memory
agent-registryCatalog of available agents / integrations

11.3 Agent Tools (Capabilities)

  • analyze_metric
  • get_metric_data
  • get_recommendations
  • generate_forecast
  • compare_metrics
  • create_action_plan
  • get_department_health

11.4 A2A (Agent-to-Agent)

Status: Month-6 roadmap. Today: agents coordinate through shared Spine context via Twin — the Spine is the shared blackboard. No peer-to-peer calls. Every agent reads/writes the same Spine, gated by tenant_id and JWT scope.


12. Multi-Tenancy & Isolation (Hard Rules)

  1. Every query carries WHERE tenant_id = ?. Cross-tenant access = security violation → 403 (fail-loud, not 404).
  2. Nango credentials isolated per tenant: connectionId = tenant_id, encrypted in vault. No shared tokens.
  3. Org is the hard isolation boundary. Sharing happens within an org across departments/lenses.
  4. Gateway enforces x-tenant-id extraction from JWT. Never from client payload, never from URL parameter, never from header injection.
  5. Service bindings carry tenant_id implicitly. Every internal RPC includes the caller's tenant context.

13. Audit & Observability (Immutable, Fail-Loud)

TableWhat It LogsFailure Behavior
audit_logsGeneric eventsWrite failure → halt operation
governance_audit_logApproval decisions (approve/reject/discard)Write failure → halt operation
spine_audit_logEntity changes, MCP access, reads, writesWrite failure → halt sync
twin_audit_eventsReasoning trace, model calls, confidence scoresWrite failure → halt proposal
outbound_mcp_callsProvider calls, latency, errorsWrite failure → circuit break

Rule: Audit write failure stops the sync. No silent drops. Telemetry service (telemetry) collects traces/metrics from all workers.


14. Public Contract Surface (What Consumers Call)

EndpointPurposeAuth
GET /api/v1/discoveryCapability handshakeGateway JWT
POST /api/v1/handoff/outcomeAsync external execution resultsx-approval-token
POST /api/v1/connector/nango/sessionInitiate OAuth connectionGateway JWT + x-tenant-id
GET /api/v1/{workspace,connector,intelligence,knowledge,cognitive,pipeline,admin,mcp}/*Tiered capability routingGateway JWT
mcp.integratewise.ai/v1/mcpMCP SSE transportBearer JWT

SDK: packages/api-client (Gateway SDK, complete) + packages/sdk (consumer facade).


15. Frontend Surfaces (Projection Platform)

The live repo ships one full UI — not many apps:

  • User Workbench — role-based L1 domain workbenches (8 lenses)
  • Twin Workbench — AI reasoning interface, proposal review
  • Collaboration Overlay — ambient memory, governance, continuity signals
  • My Desk — approval interface (0.70–0.85 proposals)
  • Real-time metrics dashboard

Projections (FINAL lens taxonomy): Sales, CS, Finance, Executive, Architecture, Operations, Personal, Developer.

Frontend host: apps/web (Vite + React + shadcn/ui). Deployed to Cloudflare Pages. Not Next.js. Not Vercel. Not Replit. The UI is an agnostic dimension, but the template default is Vite on Cloudflare Pages.


16. Deployment Topology (100% Cloudflare)

Runtime: Workers (all 26 services), Durable Objects (stateful: Twin, Hermes, Workflow, Folder Watcher), D1 (relational + cache), KV (cache, registry), R2 (blobs, telemetry), Vectorize (embeddings), AI Search (semantic), Queues (PIPELINE_QUEUE, ACT_QUEUE, CONNECTOR_SYNC_QUEUE), Workflows (durable orchestration), Pages (frontend).

No Supabase as the canonical relational store. Supabase is the current adapter, wrapped behind packages/lib/db-gate.ts. D1 is the operational/cache layer. HyperDrive is the future path for PostgreSQL connection pooling. The relational store is swappable by design.

CI/CD gap: No GitHub Actions gate today. Required: unified pipeline, pre-deploy test/typecheck, semantic versioning, rollback. Target: wrangler deploy through a GitHub Actions gate with pnpm workspace caching.

Folder Monitor bridge: macOS chokidar watcher → Cloudflare Folder Watcher DO → spine_audit_log + AI Search. Powers the Agent Continuity Protocol (session handoffs → triage → org memory).


17. Registry Layer (§13 — The Discovery Backbone)

Everything the ecosystem can do is cataloged:

  • Connector Registry — Nango, MCP, Native adapters
  • MCP Registry — Inbound/outbound MCP servers, health status
  • Tool Registry — Provider tool schemas, versions, deprecation
  • Capability Registry — Named business actions (Analyze Account, Draft Email, …)
  • Skill Registry — Agent skills (analyze_metric, …)
  • Agent Registry — Available agents, runtime status
  • Provider Registry — External providers (Salesforce, Slack, …)
  • Endpoint Registry — Living API contract: path/method, service owner, auth type, status, surface access, change summary (cached in KV + D1)
  • Schema Registry — Entity schemas, versions, migration history
  • Policy Registry — Governance rules, approval thresholds, HITL policies

Discovery reads from these registries. Agents, frontends, docs, and tests all read the same Endpoint Registry to stay drift-proof.


18. Context Assembly (Intelligence Fabric — §7)

The RAG layer feeding the Twin:

  1. Entity resolution — SSOC lookup, stable UUID binding
  2. Memory retrieval — active memory query, recency + relevance scoring
  3. Relationship traversal — Continuity Graph walk (entity → relation → entity)
  4. Tool retrieval — Capability Registry lookup for available actions
  5. Capability discovery — What can this tenant do right now?
  6. Prompt assembly — Structured prompt with Entity360 + memory + tools
  7. Context-window optimization — Truncation/prioritization to fit model limits
  8. Evidence retrieval — Audit trail, lineage, confidence scoring for past decisions

19. Security Posture (P0 & P1)

P0 — Tenant Safety (Must Close Before Production)

#VulnerabilityFixOwner
1Cross-tenant data leakWHERE tenant_id = ? on every query; 403 fail-loudALL services
2Tenant-id spoofingExtract from JWT claim only; reject client-providedgateway
3Tenant middleware no-opEnforce service bindings carry tenant_id implicitlygateway
4HITL DO using idFromName("global")Use idFromName(tenant_id + user_id)govern
5Invitation cross-tenant scanAdd WHERE tenant_id = ? to invitation lookuptenants
6Hardcoded secretsMove to Cloudflare Secrets; rotateadmin
7.env committedRemove from git; add .gitignore; scan historyadmin
8SQL injection in shimsUse Drizzle ORM parameterized queriescontinuity, knowledge
9MCP-JWT bypassRequire Authorization: Bearer <jwt> on all MCP endpointsmcp-connector
10Auth root thrashingFreeze on API Keys + JWT; remove Clerk/Stack/Descope importsgateway

P1 — Hardening (Post-Production)

#VulnerabilityFixOwner
1Billing still on SupabaseMigrate to D1 + Workers billingbilling
2Gateway rate-limiter fails openAdd Cloudflare Rate Limiting; fail-closedgateway
3CORS reflects arbitrary originsWhitelist app.integratewise.ai + Pages domainsgateway
4MCP JWT bypassClose P0 #9 firstmcp-connector
5Unsigned-webhook auto-approveVerify Nango webhook signatures; reject unsignedloader
6Webhook replay/timing leaksAdd idempotency keys; deduplicatewebhook-ingress
7Weak password hashingArgon2id via Cloudflare Workerstenants
8Remove @supabase/supabase-jsDECISION 22 completionAll services

20. The Ownership Split (Context vs. Mechanism)

WhatWho Owns ItAccess
Context — data/entities in the SpineCustomer organization (data sovereignty)Admin views/manages org's Spine via capabilities
Mechanism — Spine schema, Schema AI, Normalizer, Continuity EngineIntegrateWise (proprietary IP)Not shared, not exposed to tenant

This split is possible because consumers reach context through capabilities, never through the schema. One boundary delivers sovereignty, IP protection, and swappability simultaneously.


21. Consumer Contract Summary (The "One Connection" Rule)

What a consumer needs to connect:

  1. One JWT — issued by the Gateway, bound to a tenant
  2. One SSE endpoint — mcp.integratewise.ai/v1/mcp (for AI assistants) or https://api.integratewise.ai (for apps)
  3. One Discovery call — GET /api/v1/discovery to learn what exists and what they can do

What they do NOT need:

  • Provider credentials (Salesforce, GitHub, AWS, …) — held by the Integration Router
  • Multiple MCP connections — the Bridge routes to 20+ providers internally
  • Knowledge of internal topology — 26 services, D1 schema, DO IDs are all hidden
  • Auth provider accounts — no Clerk, no Stack Auth, no Descope. API Keys + JWT only.

22. Resolution of All Conflicts (§14)

Conflictv1.0 FINAL DecisionStatus
§14.1 Storage/runtime (4 backends)100% Cloudflare — D1, DO, KV, R2, Vectorize, AI Search, Queues. No Supabase/Vercel/AWS/Neon as canonical. Supabase is current adapter, wrapped behind db-gate.Locked
§14.2 Auth model (Clerk vs JWT)API Keys (external) + JWT (internal), service bindings internal, same code path. Clerk/Stack/Descope removed.Locked
§14.3 Frontend hostapps/web (Vite + React + shadcn/ui) on Cloudflare Pages. Not Next.js. Not Replit.Locked
§14.4 Product framing ("not a platform")DECISION 23 superseded. Product = "IW Continuity Bridge"; Category = "The Operational Continuity Platform".Locked
§14.5 Layer model (4-layer vs 10-layer vs L0-L3)4-layer = conceptual law (§3); 0-16 = physical topology (§7); 10-layer and L0-L3 retired.Locked
§14.6 Capability-first APIsNamed endpoints: entity/:type/:id, memory/query, twin/propose, signals, insights, predictions, handoff, stream (WS), mcp, health.Locked
§14.7 Domainsintegratewise.ai (canonical). integrate-voice.ai (GTM landing) is a redirect to main.Locked
§14.8 Twin model providergpt-5-mini via OpenRouter (default). Grok available as config option. DECISION 30 superseded.Locked
§18.2 "Platform" branding vs DECISION 23Platform = category; Bridge = product name. Both coexist.Locked
§18.3 Integration Manager vs existing servicesFolded into §5 Continuity Bridge (Connector Pool + MCP Pool + Discovery Catalog + Normalization + Schema AI). Not a separate 4th service.Locked
§18.4 One-auth vs per-tool NangoBoth, at different layers: "Connect Once" at surface; Nango is the Credential Wall underneath.Locked
§18.5 Lens naming8 lenses (FINAL): Sales, CS, Finance, Executive, Architecture, Operations, Personal, Developer.Locked
§18.6 ADK vs Twin namingADK is canonical — lives in §11 Capability Runtime alongside Twin. No clash.Locked
§20.3 "Platform" in title vs DECISION 23DECISION 23 retired. Title = "Platform Architecture".Locked
§20.3 Numbered (0-16) vs un-numbered (names)Names for doctrine, numbers for implementation topology — both canonical, different purposes.Locked
§20.3 Lens taxonomy mismatch8 lenses above adopted.Locked
§20.3 Memory scopes (3 sets)FINAL 4: Personal, Work, Organization, AI. Audit = cross-cutting Compliance.Locked
§21.3 Twin reframed as Operational ParticipantAdopted: "always working, never idle, accountable like an employee."Locked
§22.4 L1-L4 definitionsPinned: L1 = projection/read, L2 = intelligence/insight, L3 = operation/execution, L4 = full continuity/autonomous participation.Locked

23. GTM & Positioning

23.1 Category & Positioning

  • Category claim: "The Operational Continuity Platform — the infrastructure layer that preserves context, memory, and governance across every tool, every person, and every AI."
  • Competitive frame: high structure × high intelligence × human-first workbench. "They connect apps; we connect context."
  • Anti-positioning: Not "AI-powered platform," not "no-code automation," not "replace your tools," not "chat with your data." Instead: human workbench + assistive AI + governed context.

23.2 Customer-Zero GTM (Acme Corp)

  • Two-app kill shot: Salesforce + Slack, read-only, approval-required, 90-day retention.
  • Win condition: One workspace auth → CS Workbench shows cross-system account context in < 60s → Twin proposes ≥1 insight/day → VP CS answers "what's our risk?" without opening Salesforce or Slack → adding a 3rd app is an "enable" toggle, not a project.
  • Distribution: Through AI assistant marketplaces (ChatGPT GPT Store, Claude connectors, Perplexity apps) — we list as an MCP app, users discover inside the assistant they already use.
  • Do NOT build for CZ: marketplace UI, partner portal, public connector directory, per-app OAuth flows, frontend→app direct calls.

24. Closing Checklist (Before Publish)

  • Close P0 #1–10 (§19)
  • Remove all @supabase/supabase-js imports (DECISION 22 completion)
  • Remove all Clerk/Stack Auth/Descope imports (§20.2)
  • Lock MCP-JWT on all inbound endpoints (/tools, /invoke, /mcp, /sessions)
  • Implement withTenant() helper on all D1 queries (packages/spine-schema)
  • Hard WHERE tenant_id = ? in every service query
  • Fix HITL DO to use idFromName(tenant_id + user_id)
  • Move all secrets to Cloudflare Secrets (no .env in repo)
  • Verify spine_audit_log write failure halts sync (fail-loud)
  • Confirm gpt-5-mini via OpenRouter as default Twin model
  • Verify 8-lens taxonomy in Discovery response
  • Confirm 4 memory scopes: Personal, Work, Organization, AI
  • Test one-connection MCP config (read-only default, write via governance)
  • Test outbound MCP pool with Entity360 injection
  • CI/CD: GitHub Actions → typecheck → test → wrangler deploy
  • Documentation: README.md + ARCHITECTURE.md + SECURITY.md + API.md
  • Template repository enabled in GitHub settings

25. The One Invariant

Identity gates the door. Discovery advertises the capabilities. Integration Manager is the only hand that touches outside tools. Spine is the only place context is written. Govern sits between reasoning and execution. Memory is scoped and compounds. Agents and tools coordinate through the Spine, never directly. Every hop carries tenant_id.


END OF DOCUMENT

IntegrateWise Continuity Bridge — Canonical Architecture Specification v1.0.0-FINAL. All prior documents, diagrams, and decisions are superseded by this version where they conflict.