Unclassified

Historical v0 Definitive Specification — Superseded

Status: HISTORICAL IMPLEMENTATION HANDOFF
Current frontend authority: docs/frontend-v0/README.md
plus
FRONTEND_PLATFORM_API_AND_DISCOVERY_SPEC.md.

Do not implement the domain-first shell, permanent Twin sidebar, direct
service mapping or older environment claims below.

Original Snapshot: IntegrateWise v0 Definitive Specification

Status: Canonical v0 implementation handoff
Date: July 24, 2026
Scope: Complete infrastructure mapping, environment management, service adapters, end-to-end schema, persistent workspace behavior, MCP boundary, and explicit sidebar-to-schema mapping


1. Document Status

This document is the definitive v0 spec for the frontend, Twin, agents, memory, capabilities, continuity, and Spine network. It replaces fragmented drafts.

  • Frontend baseline: PR #99 branch v0/nirmal-it90-cff4a009
  • Backend authority: Hermes-aligned platform services and canonical architecture documentation
  • Purpose: Align v0 frontend with approved product architecture using existing resources only

2. Canonical Product Law

Twin is the user-facing cognitive orchestrator. Agents are delegated specialists. Capabilities are governed actions. The continuity runtime provides durable execution beneath Twin. Triage controls generated writes. The Spine owns canonical truth.

Ownership chain:

User → Twin → Context Builder → Knowledge + Memory + Search → Agent/Capability Resolver → Governance → Execution → Continuity Runtime → Triage → Approved Spine Mutation → Projection Refresh → Twin Reports Outcome

The user experiences one intelligent actor: Twin. Internal services remain implementation mechanisms beneath Twin.


3. Core Workbench Spine

The Workbench is the persistent user workspace. Everything else—Twin, agents, memory, capabilities, continuity, governance—operates through the Workbench or on behalf of the Workbench.

3.1 Workbench Ownership Law

Workspace
  ↓
Workbench Shell
  ↓
Workbench Definition
  ↓
Role / Department / Industry Projection
  ↓
Entity / Relationship / Activity / Task / Signal / Evidence / Document / Artifact / Memory / Approval / Continuity
  ↓
Twin contextual layer
  ↓
Agent / Capability / Governance / Execution

Rules:

  • The Workbench owns user context, role, department, industry, workspace, organization, and active session state.
  • The Workbench never exposes raw database tables.
  • The Workbench consumes projections from the Spine and backend services only.
  • The Workbench never bypasses Governance, Triage, or Pipeline for canonical writes.
  • The Workbench is the only durable surface the user returns to after leaving or refreshing.

3.2 Core Workbench Entities

These are the mandatory core entities for v0:

EntityOwnerDescription
UserTenancyAuthenticated person; owns preferences, roles, and personal context
OrganizationPlatformTop-level tenant boundary; owns billing, policy, and governance scope
WorkspacePlatformOperational environment for a user or team; owns domain, department, and active connections
RolePlatformPermission and capability scope; drives projection behavior
DepartmentPlatformOrganizational unit; drives routing and data visibility
IndustryPlatformMarket segment; influences schema, capability policy, and projections
EntitySpineCanonical operational object: account, contact, deal, ticket, project, knowledge item, decision, policy, capability, signal, memory, conversation
RelationshipSpineCanonical relationship between entities with confidence and validity period
ActivitySpineOperational primitive: task, message, meeting, call, notification, approval
TaskProductExecutable unit of work assigned to user, agent, or workflow
NoteSpineUser-authored memory or observation
Knowledge DocumentKnowledgeExplicit reusable document with chunking and embeddings
ArtifactStoreDocument, image, generated asset, or evidence file stored via Blob/R2
SignalSignalsOperational condition requiring attention: risk, renewal, anomaly, approval needed, insight
EvidenceSpineImmutable attachment or reference tied to an entity or event
EventSpineAppend-only record of every meaningful mutation with provenance
Governance RequestPlatformApproval, rejection, or policy decision tied to a capability or mutation
Continuity SessionContinuityDurable execution context for Twin, agent, workflow, or approval wait
Agent RunAgent RuntimeDelegated execution with bounded context, capability assignment, and outcome
Capability InvocationCapabilityGoverned business action with policy evaluation, execution target, and evidence
Embedding/Vector RecordKnowledgeServer-side embedding for semantic retrieval of entities, memories, documents, and chunks

3.3 Workbench Projection Contract

The Workbench receives projection responses only. Direct table access is forbidden.

interface WorkbenchProjection {
  tenantId: string;
  workspaceId: string;
  userId: string;
  role: string;
  department: string;
  industry?: string;
  activeDomain: string;
  activeSection: string;
  hydration: {
    stage: "instant" | "operational" | "deep" | "complete";
    progress: number;
  };
  overview: {
    activeEntities: number;
    openWorkItems: number;
    overdueWorkItems: number;
    pendingApprovals: number;
    activeSignals: number;
    activeDocuments: number;
    activeMemories: number;
    activeCapabilities: number;
    activeAgents: number;
    activeContinuityItems: number;
  };
  entities: EntityProjection[];
  relationships: RelationshipProjection[];
  activities: ActivityProjection[];
  tasks: TaskProjection[];
  signals: SignalProjection[];
  documents: DocumentProjection[];
  artifacts: ArtifactProjection[];
  memories: MemoryProjection[];
  approvals: ApprovalProjection[];
  continuity: ContinuityProjection[];
  evidence: EvidenceProjection[];
  events: EventProjection[];
}

3.4 Workbench State Model

Every workbench surface must support:

  • Uninitialized
  • Loading
  • Hydrating
  • Ready
  • Empty
  • Degraded
  • Blocked
  • Approval Required
  • Disconnected
  • Stale
  • Failed
  • Retrying
  • Completed

The UI must never collapse these into a generic spinner or generic error.

Example:

Hydrating
The initial Salesforce account structure is ready.
Historical activities are still loading.
Twin can already analyze active opportunities.

3.5 Workbench Routing Law

auth.role + auth.department + tenant.industry + activeDomain
  ↓
product.workbench_definitions
  ↓
view_config
  ↓
WorkbenchShell
  ↓
Domain / Entity / Task / Signal / Knowledge / Memory / Approval / Continuity surfaces

Routing rules:

  • Work view is strictly one chosen domain; no universal default for work.
  • Personal domain has default behavior.
  • Cross-functional views are explicit and governed by role and department.
  • L1/L2/L4/L7 must not appear as user-facing navigation.

3.6 Workbench Shell Layout

┌─────────────────────────────────────────────────────────┐
│ Top Bar: Workspace | Search | Twin | Alerts | User      │
├───────────────┬─────────────────────────┬───────────────┤
│ Domain Nav    │ Main Workbench          │ Twin Sidebar  │
│               │                         │               │
│ Home          │ Projection-driven       │ Ask           │
│ Accounts      │ operational content     │ Analyze       │
│ Tasks         │                         │ Recommend     │
│ Signals       │                         │ Delegate      │
│ Knowledge     │                         │ Continue      │
│ Memory        │                         │ Review        │
│ Agents        │                         │ Remember      │
│ Capabilities  │                         │               │
│ Continuity    │                         │               │
│ Approvals     │                         │               │
│ Connectors    │                         │               │
└───────────────┴─────────────────────────┴───────────────┘

3.7 Workbench Data Flow

User intent
  ↓
AppShell / WorkbenchShell
  ↓
Context Builder
  ↓
Gateway / Projection Engine
  ↓
Spine + Knowledge + Memory + Signals + Tasks + Approvals + Continuity
  ↓
Governed read model
  ↓
Workbench surface
  ↓
Twin contextual layer
  ↓
Agent / Capability / Governance / Execution
  ↓
Pipeline/Triage for candidate writes
  ↓
Approved Spine mutation
  ↓
Projection refresh
  ↓
Workbench updates

3.8 Workbench ↔ Twin Mapping

Workbench SectionTwin FunctionTwin ReadsTwin Writes
HomeOrient, recommendProjection overview, signals, tasks, approvalsNone
Accounts/EntitiesExplain, analyzeEntity 360, relationships, evidence, tasks, signalsCandidate memory, candidate proposal
TasksPlan, delegate, continueTask list, continuity state, agent runsDelegated work, continuity action
SignalsExplain, recommendActive signals, entity context, knowledgeNone
KnowledgeExplain, recommendDocuments, chunks, embeddings, entity linksNone
MemoryRemember, reviewPersonal, work, organization, candidate memoryMemory candidate
AgentsDelegate, reviewAgent registry, run state, context, evidenceAgent task
CapabilitiesAct, planCapability registry, policy, approval stateProposed action
ContinuityContinue, reviewWorkflow state, retry state, checkpointContinuity action
ApprovalsReview, actGovernance requests, evidence, capabilityApproval decision

3.9 Workbench ↔ Agent/Memory/Continuity Mapping

Workbench EventAgent ActionMemory ActionContinuity Action
Open entity detailOptional agent readRead permitted memoryNone
Twin recommends actionNoneNoneNone
User approves proposalNoneNoneSchedule execution
Twin delegates workExecute taskRead working memoryCheckpoint/resume
Agent returns resultReturn resultWrite episodic memoryUpdate execution state
Triage reviewNonePromote candidateNone
Continuity retryNoneNoneRetry/backoff
Cancel executionPause/stopArchive working memoryCancel workflow

4. IW Shared Environment Registry

All IntegrateWise applications share one centrally managed environment and secret stack. Applications do not receive raw provider credentials. They receive IntegrateWise API endpoints and client identifiers only.

4.1 Central Configuration Model

IW Shared Environment
├── Database
├── Object storage
├── Redis/cache
├── Queues
├── Vector storage
├── AI providers
├── Authentication
├── Connector credentials
└── Internal service endpoints

This registry is defined once and consumed by:

  • IW Spine Network
  • Connector Marketplace
  • Work-Bench
  • Connector Runtime
  • Memory Services
  • Twin
  • Intelligence Services
  • Development Applications

Implementation status: shared environment module scaffolded in packages/config; frontend public env surface stabilized as apps/web/src/lib/shared-env.ts. Full rotation/policy enforcement is pending while backend adapter layer is built.

4.2 Public Application Environment

Frontend and public applications receive only IntegrateWise variables from the shared module:

NEXT_PUBLIC_IW_API_URL=https://gateway.integratewise.ai
NEXT_PUBLIC_IW_AUTH_URL=
NEXT_PUBLIC_IW_CLIENT_ID=
NEXT_PUBLIC_IW_ENVIRONMENT=development

Fallback behavior:

  • If NEXT_PUBLIC_IW_API_URL is missing, the client defaults to https://gateway.integratewise.ai.
  • Seed fallback is disabled unless NEXT_PUBLIC_IW_SPINE_SEED_FALLBACK=1.

They must not receive:

  • DATABASE_URL
  • SUPABASE_URL
  • BLOB_READ_WRITE_TOKEN
  • UPSTASH_REDIS_REST_URL
  • CLOUDFLARE_ACCOUNT_ID
  • R2_ACCESS_KEY_ID
  • AI_GATEWAY_API_KEY
  • DESCOPE_MANAGEMENT_KEY
  • Any other raw provider credential

4.3 Server-Side Application Environment

Server-side applications receive IntegrateWise service credentials only:

IW_API_URL=https://api.integratewise.ai
IW_SERVICE_TOKEN=...
IW_ENVIRONMENT=production

They do not receive underlying provider credentials directly. Provider credentials are injected by the central secret manager into the shared runtime.

4.4 Central Secret Manager

Central Secret Manager
        ↓
Environment profile
        ↓
Service-specific permitted secrets

Profiles:

  • development
  • test
  • production

Each profile contains:

  • Shared infrastructure endpoints
  • Shared secret references
  • Service-specific permissions
  • Versioning and rotation policy
  • Health and capability status

4.5 Service Permissions

Each service receives only the secrets it requires:

production
├── spine
├── memory
├── connectors
├── intelligence
├── marketplace
└── workbench

The central registry owns:

  • Credential creation and rotation
  • Environment profile promotion
  • Service permission grants
  • Health and capability checks
  • Audit of secret access

4.6 Simple Rule

Configure infrastructure once
→ expose IntegrateWise APIs
→ reuse them across every application

The base rule is:

One centrally managed environment and secret stack for all IntegrateWise applications.

4.7 Adapter Contract

Server-side service adapters read from the central registry. They do not read from individual application environment variables.

interface ServiceAdapters {
  neon: NeonAdapter;
  blob: BlobAdapter;
  redis: RedisAdapter;
  r2: R2Adapter;
  aiGateway: AIGatewayAdapter;
}

All adapters are initialized from centrally managed configuration. Application code never touches raw provider credentials.


5. Infrastructure Tools Mapping

3.1 Cloudflare Data and Edge Infrastructure

Toolv0 RoleConstraintsAccess Pattern
D1Operational cache: active context, idempotency, projection snapshots, runtime state, edge operational indexesNot canonical business truth; rebuildable from Postgres/NeonServer-side via Gateway/Workers; browser never writes D1 directly
KVShort-lived hot projections, sessions, connector status, invalidation stateNot canonical; transient and cacheableServer-side; browser sees only projection freshness
R2Large artifacts, generated assets, vector/index files, documents, immutable evidenceS3-compatible API until Cloudflare Worker bindings are availableServer-mediated access only; signed retrieval; never expose raw R2 URLs with credentials
Vectorize / EmbedGoalEmbedding storage and retrieval for entities, memories, knowledge chunksDoes not own canonical truthServer-side embedding pipeline; browser sees only search results

3.2 External Infrastructure

Toolv0 RoleConstraints
Neon / PostgresCanonical durable Spine, relationships, evidence, events, activities, governance artifactsSole authoritative source for operational truth
Vercel BlobUser documents and images via private access and signed/server-mediated retrievalClient never holds write tokens
Upstash RedisCache, transient Twin context, rate limiting, sessions, live workbench stateNot primary database
Vercel AI GatewayServer-side AI model routing, current model catalog, tool execution, structured responsesAll AI calls server-side; keys never exposed to browser

3.3 Infrastructure Law

  • No browser component writes D1, KV, R2, Vectorize, Neon, Redis, or Blob directly.
  • All data access is server-side, tenant-scoped, auditable, and provider-neutral.
  • D1/KV are operational caches only. Neon/R2 are canonical.
  • Failed live projections must not silently become demo seed data.

4. Environment Variable Management

4.1 Required Environment Variables

Add these through v0’s environment-variable manager. Do not place credentials in source or chat.

VariablePurposeOwner
DATABASE_URLNeon/Postgres connectionBackend/DevOps
BLOB_READ_WRITE_TOKENVercel Blob accessBackend/DevOps
UPSTASH_REDIS_REST_URLRedis REST endpointBackend/DevOps
UPSTASH_REDIS_REST_TOKENRedis REST tokenBackend/DevOps
CLOUDFLARE_ACCOUNT_IDCloudflare account for R2Backend/DevOps
R2_ACCESS_KEY_IDR2 access keyBackend/DevOps
R2_SECRET_ACCESS_KEYR2 secret keyBackend/DevOps
R2_BUCKET_NAMER2 bucket nameBackend/DevOps
R2_ENDPOINTR2 S3-compatible endpointBackend/DevOps
AI_GATEWAY_API_KEYVercel AI Gateway keyBackend/DevOps

4.2 Validation and Status Endpoint

Add server-only validation and a capability/status endpoint:

GET /api/v1/capabilities/status

Returns:

{
  "neon": { "configured": true, "healthy": true },
  "blob": { "configured": true, "healthy": true },
  "redis": { "configured": true, "healthy": false, "reason": "timeout" },
  "r2": { "configured": true, "healthy": true },
  "aiGateway": { "configured": true, "healthy": true }
}

No secrets are exposed. Only presence and health.

4.3 Secrets Policy

  • Secrets never reach client bundles or logs.
  • Unavailable providers degrade to clear setup/error states.
  • Frontend receives only configuration presence and health status.

5. Server-Side Service Adapters

Each provider sits behind an internal interface so existing resources can be replaced without changing workspace features.

5.1 Neon Adapter

Responsibilities:

  • Durable Spine entities, relationships, evidence, events, activities
  • Department/role projections
  • Notes, knowledge records, workbench items
  • Audit/activity events

Interface:

interface NeonAdapter {
  query<T>(sql: string, params?: unknown[]): Promise<T[]>;
  transaction<T>(fn: (client: NeonAdapter) => Promise<T>): Promise<T>;
}

5.2 Blob Adapter

Responsibilities:

  • User documents and images
  • Private access
  • Signed/server-mediated retrieval

Interface:

interface BlobAdapter {
  upload(key: string, body: Buffer, contentType: string): Promise<string>;
  signedUrl(key: string, expiresInSeconds: number): Promise<string>;
}

5.3 Redis Adapter

Responsibilities:

  • Cache
  • Transient Twin context
  • Rate limiting
  • Sessions
  • Live workbench state

Interface:

interface RedisAdapter {
  get(key: string): Promise<string | null>;
  set(key: string, value: string, ttlSeconds?: number): Promise<void>;
  del(key: string): Promise<void>;
}

5.4 R2 Adapter

Responsibilities:

  • Large artifacts
  • Generated assets
  • Vector/index files
  • Content objects

Interface:

interface R2Adapter {
  put(key: string, body: Buffer, contentType: string): Promise<void>;
  get(key: string): Promise<Buffer | null>;
  signedGetUrl(key: string, expiresInSeconds: number): Promise<string>;
}

5.5 AI Gateway Adapter

Responsibilities:

  • Server-side model routing
  • Current model catalog
  • Tool execution
  • Structured responses

Interface:

interface AIGatewayAdapter {
  complete(prompt: string, options?: { model?: string; tools?: string[] }): Promise<string>;
  stream(prompt: string): Promise<AsyncIterable<string>>;
}

5.6 Adapter Registry

interface ServiceAdapters {
  neon: NeonAdapter;
  blob: BlobAdapter;
  redis: RedisAdapter;
  r2: R2Adapter;
  aiGateway: AIGatewayAdapter;
}

All adapters are initialized server-side from validated environment variables.


6. Complete End-to-End Schema

6.1 Schema Design Rules

  • One source of truth per domain.
  • No duplicate tables for the same concept.
  • Tenant isolation enforced on every table.
  • Immutable provenance on canonical entities.
  • Candidate state separated from approved state.
  • Embeddings stored server-side; browser never sees raw vector math.

6.2 Canonical Schemas

Use the existing sql-migrations/081_neon_workbench_spine_v1.sql as the primary Neon schema source. It already defines:

  • platform.tenants
  • platform.tenant_config
  • platform.connector_connections
  • platform.capabilities
  • platform.governance_requests
  • platform.outbox_events
  • spine.entities
  • spine.relationships
  • spine.evidence
  • spine.events
  • Plus knowledge, continuity, and product schemas

Supabase migration supabase/migrations/20260723000001_spine_core.sql is legacy public-schema parity and must not be treated as concurrent source of truth. Frontend migrations must align with the Neon canonical schema above.

6.3 Schema Inventory by Sidebar Section

Sidebar SectionPrimary TablesSecondary TablesSchema Owner
Homespine.entities, spine.events, spine.signalsplatform.tenant_configspine / product
My Workspine.entities, product.work_items, spine.relationshipsspine.eventsproduct
Inboxspine.entities, spine.signals, continuity.sessionsplatform.outbox_eventsspine / continuity
Tasksproduct.tasks, product.work_items, spine.entitiesspine.events, continuity.sessionsproduct
My Queueproduct.work_items, platform.outbox_eventscontinuity.sessionsproduct / platform
Approvalsplatform.governance_requests, spine.eventsplatform.outbox_eventsplatform
Notificationsspine.events, continuity.sessionsplatform.connector_connectionsspine / continuity
Recent Workspine.events, spine.entitiesproduct.work_itemsspine
Favoritesspine.entities, spine.relationshipsproduct.work_itemsspine
Communicationsspine.evidence, spine.entities, knowledge.documentsspine.eventsspine / knowledge
Activity Feedspine.events, spine.activitiesspine.signalsspine
Emailspine.evidencespine.relationshipsspine
Calendarspine.entities, spine.eventsspine.signalsspine
Meetingsspine.entities, spine.events, continuity.sessionsspine.evidencespine / continuity
Chatspine.evidence, continuity.sessionsspine.entitiesspine / continuity
Callsspine.evidence, spine.eventsspine.relationshipsspine
Documents Sharedspine.evidence, knowledge.documentsr2 artifactsspine / knowledge
Personalspine.entities, spine.memoriescontinuity.sessionsspine / continuity
Notesspine.memories, spine.evidencer2 artifactsspine
Knowledge Baseknowledge.documents, knowledge.chunks, knowledge.embeddingsspine.entitiesknowledge
Brainstorming Sessionscontinuity.sessions, spine.memories, spine.eventsknowledge.documentscontinuity / knowledge
Activityspine.events, spine.activitiesspine.signalsspine
Finance Managerspine.entities, spine.signals, spine.eventsplatform.capabilitiesspine
Work - Route Based on Role _ Department _ Industryproduct.workbench_views, product.view_registry, spine.entities, spine.relationshipsplatform.tenant_configproduct
Platformplatform.capabilities, platform.connector_connections, platform.tenant_configplatform.outbox_eventsplatform
Integration Managerplatform.connections, platform.integrationsspine.signalsplatform
Connector Marketplacespine_connector_registry, spine_marketplace_apps, spine_app_installsplatform.connector_connectionsplatform / spine
Activation Hubplatform.tenant_config, platform.connections, spine.entitiesspine.eventsplatform
Capability Managerplatform.capabilities, platform.governance_requestsplatform.outbox_eventsplatform
MCP Poolplatform.mcp_sessions, platform.mcp_tools, platform.mcp_invocationsplatform.capabilitiesplatform
AI Modelsplatform.ai_models, platform.ai_usageplatform.tenant_configplatform
Knowledgeknowledge.documents, knowledge.chunks, knowledge.embeddingsspine.entitiesknowledge
Memory & Continuityspine.memories, continuity.sessions, spine.eventsplatform.governance_requestsspine / continuity
Automationplatform.capabilities, platform.workflows, continuity.sessionsplatform.outbox_eventsplatform
Pipelinesplatform.pipelines, platform.pipeline_runs, spine.entitiesspine.eventsplatform
Governanceplatform.governance_requests, spine.events, platform.outbox_eventsplatform.capabilitiesplatform
Observabilityspine.events, platform.outbox_events, spine.signalsspine.activitiesspine / platform
Administrationplatform.tenants, platform.tenant_config, platform.users, platform.roles, platform.permissionsspine.eventsplatform
Organizationsplatform.organizations, platform.tenant_configspine.entitiesplatform
Usersplatform.users, platform.workspace_membersspine.entitiesplatform
Rolesplatform.roles, platform.role_scopesplatform.tenant_configplatform
Permissionsplatform.permissions, platform.role_scopesplatform.capabilitiesplatform
Auditspine.events, platform.audit_logspine.evidencespine / platform
Billingplatform.billing_accounts, platform.billing_eventsplatform.tenant_configplatform
Deploymentsplatform.deployments, platform.environment_configplatform.outbox_eventsplatform
API Keysplatform.api_keys, platform.tenantsplatform.outbox_eventsplatform
Securityplatform.security_policies, platform.audit_logspine.eventsplatform

6.4 Core Table Definitions

platform.tenants

id TEXT PRIMARY KEY,
canonical_id TEXT NOT NULL UNIQUE,
name TEXT NOT NULL,
slug TEXT NOT NULL UNIQUE,
status TEXT NOT NULL DEFAULT 'active',
settings JSONB NOT NULL DEFAULT '{}',
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT now()

platform.tenant_config

tenant_id TEXT PRIMARY KEY REFERENCES platform.tenants(id),
role TEXT NOT NULL,
department TEXT NOT NULL,
industry TEXT,
schema_version TEXT NOT NULL DEFAULT 'spine-v1',
active_domains TEXT[] NOT NULL DEFAULT '{}',
depth_matrix JSONB NOT NULL DEFAULT '{}',
capability_policy JSONB NOT NULL DEFAULT '{}',
onboarding_state TEXT NOT NULL DEFAULT 'active',
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT now()

spine.entities

id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
tenant_id TEXT NOT NULL REFERENCES platform.tenants(id),
canonical_id TEXT NOT NULL,
entity_type TEXT NOT NULL,
version INTEGER NOT NULL CHECK (version > 0),
status TEXT NOT NULL DEFAULT 'active',
name TEXT,
domain TEXT,
industry TEXT,
scope JSONB NOT NULL DEFAULT '{}',
data JSONB NOT NULL DEFAULT '{}',
metadata JSONB NOT NULL DEFAULT '{}',
provenance JSONB NOT NULL DEFAULT '{}',
valid_from TIMESTAMPTZ NOT NULL DEFAULT now(),
valid_until TIMESTAMPTZ,
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT now(),
created_by TEXT,
search_document TSVECTOR GENERATED ALWAYS AS (...),
UNIQUE (tenant_id, canonical_id, version)

spine.relationships

id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
tenant_id TEXT NOT NULL REFERENCES platform.tenants(id),
source_canonical_id TEXT NOT NULL,
source_type TEXT NOT NULL,
target_canonical_id TEXT NOT NULL,
target_type TEXT NOT NULL,
relationship_type TEXT NOT NULL,
confidence NUMERIC(4,3) NOT NULL DEFAULT 1.0,
metadata JSONB NOT NULL DEFAULT '{}',
valid_from TIMESTAMPTZ NOT NULL DEFAULT now(),
valid_until TIMESTAMPTZ,
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
created_by TEXT

spine.evidence

id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
tenant_id TEXT NOT NULL REFERENCES platform.tenants(id),
canonical_id TEXT,
evidence_type TEXT NOT NULL,
title TEXT NOT NULL,
excerpt TEXT,
source_provider TEXT,
source_reference TEXT,
storage_provider TEXT,
storage_key TEXT,
mime_type TEXT,
content_hash TEXT,
metadata JSONB NOT NULL DEFAULT '{}',
captured_at TIMESTAMPTZ NOT NULL DEFAULT now(),
created_at TIMESTAMPTZ NOT NULL DEFAULT now()

spine.events

id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
tenant_id TEXT NOT NULL REFERENCES platform.tenants(id),
subject_kind TEXT NOT NULL,
subject_id TEXT NOT NULL,
canonical_id TEXT,
event_type TEXT NOT NULL,
actor_type TEXT NOT NULL,
actor_id TEXT,
correlation_id TEXT,
evidence_ids UUID[] NOT NULL DEFAULT '{}',
payload JSONB NOT NULL DEFAULT '{}',
occurred_at TIMESTAMPTZ NOT NULL DEFAULT now()

platform.governance_requests

id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
tenant_id TEXT NOT NULL REFERENCES platform.tenants(id),
capability_key TEXT NOT NULL,
subject_kind TEXT NOT NULL,
subject_id TEXT NOT NULL,
requested_by TEXT NOT NULL,
request_payload JSONB NOT NULL DEFAULT '{}',
decision TEXT NOT NULL DEFAULT 'pending',
decided_by TEXT,
decision_reason TEXT,
approval_token TEXT UNIQUE,
expires_at TIMESTAMPTZ,
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
decided_at TIMESTAMPTZ

platform.outbox_events

id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
tenant_id TEXT NOT NULL REFERENCES platform.tenants(id),
event_type TEXT NOT NULL,
subject_kind TEXT NOT NULL,
subject_id TEXT NOT NULL,
destination_provider TEXT,
capability_key TEXT,
payload JSONB NOT NULL DEFAULT '{}',
governance_request_id UUID REFERENCES platform.governance_requests(id),
status TEXT NOT NULL DEFAULT 'awaiting_approval',
attempts INTEGER NOT NULL DEFAULT 0,
next_attempt_at TIMESTAMPTZ,
delivered_at TIMESTAMPTZ,
last_error TEXT,
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT now()

knowledge.documents

id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
tenant_id TEXT NOT NULL REFERENCES platform.tenants(id),
title TEXT NOT NULL,
body TEXT,
metadata JSONB NOT NULL DEFAULT '{}',
status TEXT NOT NULL DEFAULT 'draft',
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT now()

knowledge.chunks

id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
document_id UUID NOT NULL REFERENCES knowledge.documents(id),
tenant_id TEXT NOT NULL REFERENCES platform.tenants(id),
content TEXT NOT NULL,
embedding vector(1536),
metadata JSONB NOT NULL DEFAULT '{}',
created_at TIMESTAMPTZ NOT NULL DEFAULT now()

spine.memories

id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
tenant_id TEXT NOT NULL REFERENCES platform.tenants(id),
scope TEXT NOT NULL DEFAULT 'org',
user_id TEXT,
entity_id TEXT,
kind TEXT NOT NULL DEFAULT 'note',
title TEXT,
content TEXT NOT NULL,
fields JSONB NOT NULL DEFAULT '{}',
embedding vector(1536),
visibility TEXT NOT NULL DEFAULT 'private',
source TEXT NOT NULL DEFAULT 'manual',
provenance JSONB NOT NULL DEFAULT '{}',
created_by TEXT,
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT now()

continuity.sessions

id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
tenant_id TEXT NOT NULL REFERENCES platform.tenants(id),
session_type TEXT NOT NULL,
subject_id TEXT,
status TEXT NOT NULL DEFAULT 'active',
context JSONB NOT NULL DEFAULT '{}',
result JSONB NOT NULL DEFAULT '{}',
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT now()

product.workbench_views

id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
tenant_id TEXT NOT NULL REFERENCES platform.tenants(id),
role TEXT NOT NULL,
department TEXT NOT NULL,
industry TEXT,
view_key TEXT NOT NULL,
view_config JSONB NOT NULL DEFAULT '{}',
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT now(),
UNIQUE (tenant_id, role, department, industry, view_key)

7. Workspace Data and Action Layer

7.1 Data Layer

The workspace data layer is tenant-aware and server-side.

Responsibilities:

  • Define and evolve schemas for users, roles, departments, workbench views, entities, links, notes, knowledge documents, files, actions, Twin suggestions, and audit records
  • Provide route handlers and server actions for real CRUD and workflow operations
  • Enforce tenant, role, department, and cross-functional access boundaries on every server operation
  • Keep all migrations in migrations/ or sql-migrations/ with canonical source in 081_neon_workbench_spine_v1.sql

7.2 Action Layer

Server actions and route handlers must:

  • Require authenticated tenant context
  • Validate tenant and role membership before every operation
  • Emit spine.events for every meaningful mutation
  • Write canonical state only through governed contracts
  • Return projected responses, never raw internal tables

7.3 CRUD Contracts

ActionMethodPathContract
List entitiesGET/api/v1/entitiesProjection response
Get entityGET/api/v1/entities/:idEntity 360 projection
Create entityPOST/api/v1/entitiesGoverned creation
Update entityPATCH/api/v1/entities/:idGoverned mutation
List tasksGET/api/v1/tasksTask projection
Create taskPOST/api/v1/tasksGoverned creation
Update taskPATCH/api/v1/tasks/:idGoverned mutation
List memoriesGET/api/v1/memoriesMemory projection
Create memory candidatePOST/api/v1/memory/candidatesCandidate only
List knowledgeGET/api/v1/knowledgeKnowledge projection
Upload artifactPOST/api/v1/artifactsSigned server-mediated
List approvalsGET/api/v1/approvalsApproval projection
Decide approvalPOST/api/v1/approvals/:id/decisionGoverned decision
Twin interactPOST/api/v1/twin/interactTwin contract
Agent create taskPOST/api/v1/agents/:id/tasksGoverned delegation
Continuity statusGET/api/v1/continuityContinuity projection

8. Connect the UI to Real Workspace Behavior

8.1 Replacement Rules

Replace fixture-only and static-dashboard behavior with persistent flows:

  • Notes: CRUD via /api/v1/memories and /api/v1/memory/candidates
  • Knowledge Base: CRUD via /api/v1/knowledge with chunking and embedding pipeline
  • Files/Content: Upload/download via /api/v1/artifacts through Blob/R2 adapters
  • Workbench interactions: All routed through projection APIs
  • Pipeline/Account/Entity detail: Open working surface with related records, files, meetings, tasks, actions aggregated from connected tools
  • Twin: Contextual inside each work surface; proactive, source-linked suggestions; explicit user-controlled execution

8.2 Role-Department-Industry Routing

Work section routing:

logged-in role + department + industry
  ↓
product.workbench_views lookup
  ↓
view_config projection
  ↓
domain/entity task routing
  ↓
entity detail surface with related records

8.3 Twin Contextual Integration

Twin is not a separate chat sidebar. Twin is contextual inside each work surface:

  • Proactive suggestions based on current entity/task/document
  • Source-linked evidence
  • Explicit user-controlled execution
  • Continuity state visible in context

9. MCP Connector Boundary

9.1 Local Implementation

  • Implement and test the MCP connector contract locally in the project
  • Use the supplied IntegrateWise MCP URL and tenant context only through server-side configuration
  • Add provider health checks, capability discovery, tenant envelopes, auditable tool execution, and safe failure states

9.2 Public Contract

The public MCP remains the 19-tool Spine contract only:

  1. get_my_continuity
  2. get_active_context
  3. get_my_focus
  4. get_context
  5. get_changes
  6. get_related
  7. get_history
  8. get_commitments
  9. get_decisions
  10. get_permitted_memory
  11. get_relevant_knowledge
  12. ask_twin
  13. assign_twin
  14. get_prepared_work
  15. get_available_actions
  16. prepare_action
  17. get_action_plan
  18. approve_action
  19. store_in_spine

9.3 Marketplace Block

Marketplace publication/install remains a separate release step blocked until the Vercel team suspension is resolved or an active team owns the listing. No workaround or replacement account will be created.


10. Sidebar Structure to Schema Mapping

This is the definitive mapping of every sidebar item to backend tables, services, and API contracts.

10.1 Top-Level Navigation

Sidebar ItemTablesBackend ServicesAPI Contract
Homespine.entities, spine.events, spine.signals, platform.tenant_configgateway, spine, projection-engine, store, signalsSharedWorkbench, /api/v1/projections/workspace
My Workspine.entities, product.work_items, spine.relationshipsgateway, spine, projection-engine, task-management/api/v1/projections/workspace, /api/v1/tasks
Inboxspine.entities, spine.signals, continuity.sessions, platform.outbox_eventsgateway, spine, signals, continuity/api/v1/signals, /api/v1/continuity
Tasksproduct.tasks, product.work_items, spine.entities, spine.eventsgateway, spine, task-management, workflow/api/v1/tasks, /api/v1/projections/entity/:id
My Queueproduct.work_items, platform.outbox_events, continuity.sessionsgateway, workflow, task-management, continuity/api/v1/continuity, /api/v1/tasks
Approvalsplatform.governance_requests, spine.events, platform.outbox_eventsgateway, govern, workflow, task-management/api/v1/approvals, /api/v1/approvals/:id/decision
Notificationsspine.events, continuity.sessions, platform.connector_connectionsgateway, spine, continuity, signals/api/v1/signals, /api/v1/continuity
Recent Workspine.events, spine.entities, product.work_itemsgateway, spine, projection-engine/api/v1/projections/workspace
Favoritesspine.entities, spine.relationships, product.work_itemsgateway, spine, projection-engine/api/v1/projections/workspace

10.2 Communications

Sidebar ItemTablesBackend ServicesAPI Contract
Activity Feedspine.events, spine.activities, spine.signalsgateway, spine, signals, telemetry/api/v1/signals, /api/v1/events
Emailspine.evidence, spine.relationshipsgateway, spine, projection-engine/api/v1/projections/entity/:id
Calendarspine.entities, spine.events, spine.signalsgateway, spine, projection-engine, workflow/api/v1/projections/entity/:id
Meetingsspine.entities, spine.events, continuity.sessions, spine.evidencegateway, spine, continuity, projection-engine/api/v1/projections/entity/:id
Chatspine.evidence, continuity.sessions, spine.entitiesgateway, spine, continuity/api/v1/projections/entity/:id
Callsspine.evidence, spine.events, spine.relationshipsgateway, spine/api/v1/projections/entity/:id
Documents Sharedspine.evidence, knowledge.documents, r2 artifactsgateway, spine, knowledge, store/api/v1/artifacts, /api/v1/projections/entity/:id

10.3 Personal

Sidebar ItemTablesBackend ServicesAPI Contract
Notesspine.memories, spine.evidence, r2 artifactsgateway, spine, continuity, store/api/v1/memories, /api/v1/artifacts
Knowledge Baseknowledge.documents, knowledge.chunks, knowledge.embeddings, spine.entitiesgateway, spine, knowledge, mcp-connector/api/v1/knowledge, public MCP get_relevant_knowledge
Brainstorming Sessionscontinuity.sessions, spine.memories, spine.events, knowledge.documentsgateway, continuity, knowledge, intelligence/api/v1/twin/interact, /api/v1/memory/candidates
Activityspine.events, spine.activities, spine.signalsgateway, spine, signals/api/v1/signals, /api/v1/events

10.4 Finance Manager

Sidebar ItemTablesBackend ServicesAPI Contract
Finance Managerspine.entities, spine.signals, spine.events, platform.capabilitiesgateway, spine, projection-engine, govern/api/v1/projections/workspace, /api/v1/capabilities

10.5 Work - Route Based on Role _ Department _ Industry

Sidebar ItemTablesBackend ServicesAPI Contract
Work (View 1..View N)product.workbench_views, product.view_registry, spine.entities, spine.relationships, platform.tenant_configgateway, spine, projection-engine, store/api/v1/projections/workspace, SharedWorkbench contract

Routing rule:

auth.role + auth.department + tenant.industry
  ↓
product.workbench_views
  ↓
view_config
  ↓
domain projection

10.6 Platform

Sidebar ItemTablesBackend ServicesAPI Contract
Integration Managerplatform.connections, platform.integrations, spine.signalsgateway, connector, integration-management-mcp, provider-management-mcp/api/v1/connections, /api/v1/integrations
Connector Marketplacespine_connector_registry, spine_marketplace_apps, spine_app_installs, platform.connector_connectionsgateway, integration-management-mcp, mcp-pool/api/v1/marketplace/apps, /api/v1/connections
Activation Hubplatform.tenant_config, platform.connections, spine.entities, spine.eventsgateway, tenants, pipeline, spine/api/v1/activation/complete-onboarding
Capability Managerplatform.capabilities, platform.governance_requests, platform.outbox_eventsgateway, mcp-pool, integration-management-mcp, govern/api/v1/capabilities, /api/v1/approvals
MCP Poolplatform.mcp_sessions, platform.mcp_tools, platform.mcp_invocations, platform.capabilitiesgateway, mcp-connector, mcp-poolInternal /api/v1/mcp/* only; admin observability only
AI Modelsplatform.ai_models, platform.ai_usage, platform.tenant_configgateway, intelligence, hermes, iw-agent-runtime/api/v1/models, /api/v1/ai/usage

10.7 Knowledge

Sidebar ItemTablesBackend ServicesAPI Contract
Knowledgeknowledge.documents, knowledge.chunks, knowledge.embeddings, spine.entitiesgateway, spine, knowledge, mcp-connector/api/v1/knowledge, public MCP get_relevant_knowledge

10.8 Memory & Continuity

Sidebar ItemTablesBackend ServicesAPI Contract
Memory & Continuityspine.memories, continuity.sessions, spine.events, platform.governance_requestsgateway, spine, continuity, knowledge, govern/api/v1/memory, /api/v1/memory/candidates, /api/v1/continuity

10.9 Automation

Sidebar ItemTablesBackend ServicesAPI Contract
Automationplatform.capabilities, platform.workflows, continuity.sessions, platform.outbox_eventsgateway, mcp-pool, integration-management-mcp, govern, hermes, workflow/api/v1/capabilities, /api/v1/continuity

10.10 Pipelines

Sidebar ItemTablesBackend ServicesAPI Contract
Pipelinesplatform.pipelines, platform.pipeline_runs, spine.entities, spine.eventsgateway, pipeline, connector, normalizer/api/v1/pipelines, /api/v1/projections/entity/:id

10.11 Governance

Sidebar ItemTablesBackend ServicesAPI Contract
Governanceplatform.governance_requests, spine.events, platform.outbox_events, platform.capabilitiesgateway, govern, workflow, task-management/api/v1/approvals, /api/v1/approvals/:id/decision

10.12 Observability

Sidebar ItemTablesBackend ServicesAPI Contract
Observabilityspine.events, platform.outbox_events, spine.signals, spine.activitiesgateway, spine, signals, telemetry, workflow/api/v1/signals, /api/v1/events

10.13 Administration

Sidebar ItemTablesBackend ServicesAPI Contract
Organizationsplatform.organizations, platform.tenant_config, spine.entitiesgateway, admin, tenants/api/v1/admin/organizations
Usersplatform.users, platform.workspace_members, spine.entitiesgateway, admin, tenants/api/v1/admin/users
Rolesplatform.roles, platform.role_scopes, platform.tenant_configgateway, admin, tenants/api/v1/admin/roles
Permissionsplatform.permissions, platform.role_scopes, platform.capabilitiesgateway, admin, tenants/api/v1/admin/permissions
Auditspine.events, platform.audit_log, spine.evidencegateway, spine, admin, govern/api/v1/audit/events
Billingplatform.billing_accounts, platform.billing_events, platform.tenant_configgateway, billing, tenants/api/v1/admin/billing
Deploymentsplatform.deployments, platform.environment_config, platform.outbox_eventsgateway, admin, telemetry/api/v1/admin/deployments
API Keysplatform.api_keys, platform.tenants, platform.outbox_eventsgateway, admin, tenants/api/v1/admin/api-keys
Securityplatform.security_policies, platform.audit_log, spine.eventsgateway, admin, govern/api/v1/admin/security

11. Twin Mapping by Sidebar

Twin is available across all operational routes. Twin actions, memory use, capability resolution, and continuity state are mapped per section in Section 10.

Canonical Twin actions:

  • Ask: reads context, memory, knowledge; no writes
  • Analyze: reads projections and evidence; optional agent read
  • Recommend: resolves capabilities; policy preview only
  • Plan: resolves capabilities and agents; draft only, no write
  • Delegate: creates agent task; assigns context and capabilities; continuity checkpoint
  • Act: invokes governed capability; requires approval when policy demands
  • Continue: resumes continuity workflow; reconciles state
  • Review: inspects governance, execution, memory, evidence
  • Remember: creates memory candidate; requires triage approval

12. Agent Mapping by Sidebar

Agent activation occurs only through Twin or governed workflow.

Sidebar SectionAgent ResponsibilityBackend Service
Agents surfaceAgent selection, task creation, capability assignment, monitoringagent-registry, iw-agent-runtime
Delegated workExecution monitoring, outcome summary, learned outcomestask-management, workflow, continuity
Twin handoffAgent results returned to Twin for summarization and triageintelligence, hermes
Twin sidebarAgent status within Twin contextiw-agent-runtime, continuity

Agent invariants:

  • Agents do not read canonical Spine directly.
  • Agents do not write canonical state.
  • Agents do not promote their own memory.
  • Agents do not approve their own actions.
  • Agents may not bypass Twin, Governance, or Triage.

13. Memory Mapping by Sidebar

Sidebar SectionMemory ScopeBackend TablePromotion Path
NotesPersonal Memory, User Work Memoryspine.memoriesCandidate → Triage → Governance → Approved
Knowledge BaseOrganization Memoryknowledge.documents, knowledge.chunksCandidate → Triage → Pipeline → Spine
Brainstorming SessionsCandidate Memorycontinuity.sessions, spine.memoriesCandidate → Triage
Memory & ContinuityAll scopesspine.memories, continuity.sessionsCandidate → Triage → Governance
Twin sidebarRelevant memory refsspine.memoriesRead-only projection

14. Continuity Mapping by Sidebar

Sidebar SectionContinuity StateBackend TableUser-Facing Language
My Queuequeued, waiting-approvalproduct.work_items, platform.outbox_eventsTwin is continuing this work
Approvalswaiting-approvalplatform.governance_requestsTwin needs your decision
Continuityscheduled, running, retrying, paused, completed, failedcontinuity.sessions, workflowTwin is working / waiting / retrying / completed
Notificationscontinuity updatesspine.events, continuity.sessionsTwin completed the delegated work
Twin sidebaractive continuity IDscontinuity.sessionsTwin will resume after dependency completes

15. Capability Mapping by Sidebar

Sidebar SectionCapability ResponsibilityBackend TableBackend Service
Platform / Capability ManagerDiscovery, enablement, policyplatform.capabilitiesmcp-pool, integration-management-mcp
Twin sidebarResolve, invoke, monitor, summarizeplatform.capabilitiesmcp-pool, govern, hermes
AutomationWorkflow and capability orchestrationplatform.workflows, platform.capabilitiesworkflow, mcp-pool, govern
GovernanceApproval-required capabilitiesplatform.governance_requestsgovern, workflow

Capability Registry hidden fields:

  • Execution target
  • Risk classification
  • Approval requirements
  • Audit requirements

16. Spine Network Mapping by Sidebar

Sidebar SectionSpine Network ResponsibilityBackend TablesBackend Services
HomeGoverned read models, Entity 360, timeline, tasks, signalsspine.entities, spine.relationships, spine.signals, spine.eventsspine, projection-engine, store, gateway
WorkEntity and relationship projectionsspine.entities, spine.relationships, spine.eventsspine, projection-engine
KnowledgeKnowledge entities and chunksknowledge.documents, knowledge.chunks, spine.entitiesknowledge, spine
Memory & ContinuityMemory and session projectionsspine.memories, continuity.sessions, spine.eventsspine, continuity
AdministrationTenant config, schema config, connection configplatform.tenants, platform.tenant_config, platform.connector_connectionstenants, pipeline, spine

Spine invariants:

  • No browser component writes Neon directly.
  • Pipeline promotion is the sole canonical Spine writer.
  • D1/KV are operational caches only.
  • Failed live projections must not silently become demo seed data.

17. Duplicate Removal and Canonical Source Rules

  • Use sql-migrations/081_neon_workbench_spine_v1.sql as the canonical Neon schema.
  • Supabase public schema migration is legacy parity only.
  • Do not create second Spine tables in frontend-owned server routes.
  • Do not duplicate tenant/organization/user schemas across apps.
  • Do not introduce new top-level architecture categories outside the documented 60-core inventory.

18. Verification and Rollout

18.1 Verification Checklist

  • Type checks/build pass
  • Migration validation against 081_neon_workbench_spine_v1.sql
  • Adapter health checks for Neon, Blob, Redis, R2, AI Gateway
  • CRUD tests for entities, tasks, memories, knowledge, artifacts
  • Tenant isolation tests for all schemas
  • AI tool-call tests through AI Gateway adapter
  • Browser tests for:
    • Notes
    • Knowledge Base
    • File upload
    • Pipeline/entity detail
    • Contextual Twin suggestions
    • Role-based workbench routing
  • Confirm secrets never reach client bundles or logs
  • Confirm unavailable providers degrade to clear setup/error states

18.2 Rollout Sequence

  1. Merge backend adapters and validation endpoint
  2. Apply canonical migrations
  3. Wire frontend to real APIs by sidebar section
  4. Enable Twin contextual surfaces
  5. Enable memory, triage, agent, continuity, and capability surfaces
  6. Remove provisional frontend-owned provisioning APIs
  7. Validate marketplace publication prerequisites without publishing

18.3 Post-Vercel Restoration

After Vercel access is restored:

  • Sync environment variables
  • Deploy and verify production bindings
  • Complete Marketplace publication flow

19. Constraints

  • Existing resources are connected by credentials; no new provider account is created automatically.
  • Cloudflare Workers/bindings cannot be provisioned from this project without Cloudflare account authorization; this phase uses R2 through its S3-compatible server API. Worker deployment follows once Cloudflare access is available.
  • Vercel Marketplace installation and MCP listing publication cannot complete while the owning Vercel team is suspended.
  • All data access is server-side, tenant-scoped, auditable, and provider-neutral.
  • L1/L2/L4/L7 must not appear as user-facing product navigation.
  • Legacy runtime aliases must not be introduced as new canonical frontend dependencies.

20. Acceptance Criteria

20.1 Frontend Ownership

  • No provider SDK imported in frontend
  • No direct provider API calls
  • No direct canonical database reads
  • No service-role credentials in frontend runtime
  • No direct Spine writes
  • No direct memory promotion
  • No direct agent capability invocation outside platform contracts

20.2 Twin

  • Twin is available across all operational Workbench routes
  • Twin receives active context
  • Twin responses include evidence
  • Twin can propose actions
  • Twin can delegate to agents
  • Twin displays continuity state
  • Twin submits candidates to Triage

20.3 Agents

  • Agent activation occurs only through Twin or governed workflow
  • Agent receives bounded context
  • Agent receives explicit capabilities
  • Agent execution is auditable
  • Agent cannot write canonical state
  • Agent result returns to Twin

20.4 Memory

  • All memory is scoped
  • Candidate memory is distinguishable from approved memory
  • Promotion requires Triage
  • Organisation memory requires governance
  • Agent memory is isolated by run and policy

20.5 Capabilities

  • Capabilities are business-oriented
  • Every capability declares risk
  • Every write capability passes policy
  • Destructive capability requires approval
  • Execution results produce evidence

20.6 Continuity

  • Long-running work survives a user session
  • Approval waits are durable
  • Retry state is visible
  • Agent pause/resume is supported
  • Completion returns to Twin

20.7 Spine

  • Canonical writes pass through governed mutation contracts
  • Every write includes provenance
  • Projections refresh after approved changes
  • Twin and agents only read projections