Unclassified

Historical v0 Frontend Specification — Superseded

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

Do not implement the permanent Twin sidebar/panel or one-to-one UI/table
authority described below.

Original Snapshot: IntegrateWise v0 Frontend Spec

Status: Definitive alignment spec
Date: July 23, 2026
Scope: Frontend surfaces, backend service mapping, Twin/agent/memory/triage/continuity/capabilities/Spine network integration, interaction flow, and exhaustive one-to-one and cross-mapping tables for v0


1. Context

v0 is the first aligned frontend release after the canonical architecture correction. Its purpose is not to add new platform concepts, but to make the existing frozen product doctrine executable through one identity path, one public continuity contract, one truth path, one projection path, and one governed execution path.

The user must never be asked to explain context already held by the Spine Network. Twin inherits permitted active context, reads governed evidence, prepares work, and stays silent when there is no material contribution. All durable execution, approval, memory promotion, and canonical writes remain in the backend.


2. Current State of the Codebase

2.1 Frontend

  • Marketing, auth, onboarding, and authenticated workbench routes exist under apps/web/src/app.
  • AppShell.tsx manages stage flow: login → signup → provisioning → loading → workspace.
  • Route rendering is centralized in apps/web/src/app/_components/route-views.tsx.
  • Department/module routing is derived from @integratewise/workbench-config in apps/web/src/app/_lib/workbench-routes.ts.
  • Reusable workbench views exist under packages/ui/src/views/*.tsx.

2.2 Backend Services

Canonical deployable services:

ServiceCanonical Role
gatewayPublic entry, JWT/tenant routing, projections, capability routing
pipelineNormalization, triage, promotion, canonical writes
spineCanonical read model and internal Spine operations
tenantsTenant lifecycle, workspace context, plan limits
mcp-connector / mcp-poolInbound/outbound MCP pool, tenant-scoped tool routing
integration-management-mcp / provider-management-mcpIntegration and provider MCP surfaces
connector / connector-syncProvider adapters, OAuth, sync, credential wall
normalizer / schema-aiSchema discovery, normalization, canonical mapping
knowledge / continuityKnowledge base, memory lifecycle, continuity substrate
intelligence / hermes / iw-agent-runtimeAI routing, orchestration, agent runtime
signals / telemetrySignal interpretation, observability
govern / workflow / task-managementApproval, workflow, task accountability
store / admin / folder-watcher / webhook-ingressProjection persistence, admin, telemetry, webhooks

Legacy aliases such as think, act, l2, and historical twin-orchestrator references are not canonical runtime entry points and must not be introduced as new frontend dependencies.


3. Correct Platform Sequence

User intent
  ↓
Twin
  ↓
Context Builder
  ↓
User / Work / Organization Memory
  ↓
Knowledge and AI Search
  ↓
Capability and Agent Resolver
  ↓
Governance
  ↓
Agent or capability execution
  ↓
Continuity runtime
  ↓
Triage candidates
  ↓
Approved Spine writes
  ↓
Updated projections
  ↓
Twin reports the result

Frontend ownership rules:

  • The user interacts with Twin, not internal orchestrators.
  • The Workbench renders governed projections only.
  • Approval, execution, continuity, and memory promotion happen in the backend.
  • The frontend never writes canonical state directly.

4. Frontend Surfaces and Functions

Frontend Surfacev0 FunctionOwner
MarketingDiscovery, sign-in/sign-up, onboarding entryMarketing
OnboardingIntent capture, domain selection, connector setup, activationPlatform
Workbench shellNavigation, context propagation, role-aware layout, Twin entryPlatform
Domain viewsProjection-based operational surfacesPlatform
Twin sidebar/panelAsk, analyze, explain, recommend, plan, delegate, act, continue, review, rememberTwin
Governance surfaceApproval queue, proposal review, evidence, decision captureGovernance
Knowledge surfaceKnowledge search, extraction feedback, document reviewKnowledge
Memory surfaceMemory triage, promotion review, contradiction reviewMemory
Agents surfaceAgent selection, task monitoring, outcome reviewTwin/Agents
Capabilities surfaceCapability discovery, execution, approval-state visibilityCapability Fabric
Continuity surfaceWorkflow status, retry/escalation state, completion trackingContinuity
Admin surfaceUsers, roles, policies, connections, integrations, models, billingAdministration

5. Backend Service Mapping

Frontend SurfacePrimary Backend ServicesSecondary Backend Services
Marketinggateway, tenants, mcp-connectorprovider-management-mcp
Onboardinggateway, tenants, pipeline, spineintegration-management-mcp, connector
Workbench shellgateway, spine, projection-enginestore, signals, telemetry
Domain viewsgateway, spine, pipelineknowledge, signals
Twin sidebar/panelintelligence, hermes, iw-agent-runtimemcp-connector, knowledge, continuity
Governance surfacegovern, workflowgateway, task-management
Knowledge surfaceknowledgepipeline, spine, mcp-connector
Memory surfacecontinuity, knowledgegovern, pipeline, spine
Agents surfaceiw-agent-runtime, agent-registryintelligence, hermes, task-management
Capabilities surfacemcp-pool, integration-management-mcpgovern, hermes, provider-management-mcp
Continuity surfaceworkflow, task-management, continuityhermes, signals, telemetry
Admin surfacegateway, admin, tenantsstore, billing, provider-management-mcp

6. Twin Ownership

Twin is the primary intelligent actor visible to the user.

Twin responsibilities:

  • Understands user intent
  • Retrieves governed context
  • Reasons over Knowledge and Memory
  • Recommends actions
  • Activates agents
  • Selects capabilities
  • Delegates work
  • Requests approvals
  • Tracks delegated outcomes
  • Explains evidence and decisions
  • Maintains continuity from the user’s perspective

Frontend implication: Every major surface is Twin-mediated. The Workbench never exposes raw backend control surfaces without Twin framing.


7. Agent Interaction Model

Agents do not independently control the user experience. Agents are activated and coordinated through Twin.

Interaction rule:

User
  ↓
Twin
  ↓
Agent Registry
  ↓
Agent selection
  ↓
Context assignment
  ↓
Capability assignment
  ↓
Governed execution
  ↓
Result returned to Twin

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.

Frontend implication: Agent surfaces must always show Twin as the supervisor. Execution histories and outcomes are surfaced under Twin review, not as standalone agent control panels.


8. Memory Mapping

Twin reads permission-filtered memory projections.

Memory ScopeFrontend ExposureTwin UseBackend Dependency
Personal MemoryMemory surface, Twin contextUser preferences and private contextcontinuity
User Work MemoryRole and assignment contextWork contextcontinuity, knowledge
Work MemoryAccount/project/task historyOperational contextspine, continuity
Organization MemoryApproved institutional knowledgeReference contextknowledge, pipeline
Agent Working MemoryActive delegated execution stateExecution contextiw-agent-runtime, task-management
Agent Episodic MemoryPrevious run outcomesOutcome reviewcontinuity, task-management
Candidate MemoryUnapproved material, triage queueReview and promotion recommendationcontinuity, govern

Promotion path:

Twin insight
  ↓
Memory candidate
  ↓
Triage
  ↓
Governance
  ↓
Approved memory

Frontend implication:

  • Twin surfaces read memory projections.
  • Triage surfaces review candidates.
  • Promotion is always backend-governed.

9. Triage Mapping

Frontend SectionTriage ResponsibilityBackend Dependency
Memory triageCandidate review, contradiction review, promotioncontinuity, govern, pipeline
Knowledge triageExtraction feedback, document review, promotionknowledge, pipeline
Outcome triageExecution outcomes, learning candidateshermes, pipeline, spine

Triage rule:

  • Only triage and governance may promote material into canonical Spine.
  • Twin may recommend promotion only.

Frontend implication: Triage surfaces must be review-only for Twin. Submission paths are governed and approval-gated.


10. Continuity Mapping

User-facing continuity language:

  • Twin is continuing this work
  • Twin is waiting for approval
  • Twin will resume after dependency completes
  • Twin retried the failed action
  • Twin completed the delegated workflow
  • Twin needs your decision

Internal continuity language:

  • Workflow runtime
  • Continuation service
  • Scheduler
  • Queue
  • Durable checkpoint
  • Orchestration engine
Frontend SectionContinuity ResponsibilityBackend Dependency
Continuity surfaceWorkflow status, retry, resume, completionworkflow, task-management, continuity
Twin continuityTwin-reported durable execution statehermes, workflow
Agent continuityAgent pause/resume, checkpoint, outcome returniw-agent-runtime, task-management

Frontend implication: Continuity is presented as a Twin state, not as raw infrastructure. The frontend never exposes queue names, durable object identities, or internal scheduler state.


11. Capabilities Mapping

Twin is the primary capability consumer.

Frontend SectionCapability ResponsibilityBackend Dependency
Capabilities surfaceDiscovery, execution, approval visibilitymcp-pool, integration-management-mcp
Twin capability useResolve, invoke, monitor, summarizemcp-pool, govern, hermes
Agent capability assignmentScoped capability assignment and executionagent-registry, iw-agent-runtime, mcp-pool

Capability Registry exposes:

  • Capability identity
  • Purpose
  • Inputs/outputs
  • Required scopes
  • Compatible agents
  • Execution target
  • Risk classification
  • Approval requirements
  • Audit requirements

Frontend implication: Capabilities are surfaced as governed actions. Discovery is permission-scoped. Execution requires approval flow where policy demands.


12. Spine Network Mapping

Frontend SectionSpine Network ResponsibilityBackend Dependency
Workbench projectionsGoverned read models, Entity 360, timeline, searchspine, projection-engine, store
Twin contextPermission-filtered memory and knowledge projectionsspine, continuity, knowledge
Governance and approvalProposal and approval artifacts, evidencegovern, spine, workflow
Admin and configurationTenant config, schema config, connection configtenants, pipeline, spine

Spine invariants:

  • No browser component, Twin runtime, MCP tool, connector, or projection component writes Neon directly.
  • Pipeline promotion is the sole canonical Spine writer.
  • D1/KV are operational caches only; Neon/R2 are canonical.

Frontend implication: Every read path goes through Gateway and Projection Engine. Direct Spine schema access is forbidden from the browser surface.


13. MCP Pool and Integration Mapping

Public MCP is the 19-tool Spine contract only. Broader MCP Pool and capability registries remain internal.

Frontend FunctionPublic/InternalBackend Service
Twin AskPublicmcp-connector
Twin ActPublic via Twin surfacemcp-connector, govern, hermes
Knowledge retrievalPublicmcp-connector
Memory retrievalPublicmcp-connector
Capability executionInternalmcp-pool, integration-management-mcp
Provider invocationInternalprovider-management-mcp, connector, connector-sync

Frontend implication:

  • The browser never chooses MCP transport.
  • The browser never sees provider credential state.
  • The browser never calls provider APIs directly after approval.

14. Activation and Connector Mapping

Frontend SectionActivation ResponsibilityBackend Dependency
Onboarding activationIntent, domain, identity, initial connectiongateway, tenants, pipeline, spine
Connector setupOAuth, scopes, health, sync scheduleconnector, integration-management-mcp, provider-management-mcp
MarketplacesDiscovery of available apps/connectorsintegration-management-mcp, mcp-pool

Frontend implication:

  • Onboarding collects intent and domain only.
  • Connector setup results in governed connection state, not raw credentials.
  • Integration management is exposed through approved capability surfaces.

15. Existing UI Component and Route Mapping

15.1 Routes and Shells

Frontend Path/SurfaceExisting Filev0 Purpose
/apps/web/src/app/page.tsxMarketing home
/appapps/web/src/app/app/[...segments]/page.tsxAuthenticated app shell
/app/adminapps/web/src/app/admin/page.tsxAdmin surface
/app/administrationapps/web/src/app/administration/page.tsxAdministration workbench
/app/governanceapps/web/src/app/governance/page.tsxGovernance queue
/app/knowledgeapps/web/src/app/knowledge/page.tsxKnowledge surface
/app/marketplaceapps/web/src/app/marketplace/page.tsxMarketplace entry
/app/onboardingapps/web/src/app/onboarding/page.tsxOnboarding flow
/app/settingsapps/web/src/app/settings/page.tsxSettings surface
/workbench/:departmentapps/web/src/app/workbench/[department]/page.tsxRole-aware workbench
/workspace/:departmentapps/web/src/app/workspace/[department]/page.tsxWorkspace domain view
/domainsapps/web/src/app/domains/page.tsxDomain routing shell
Auth entry/callbackapps/web/src/components/core/auth/*Clerk/Descope auth entry and callback
Layout/shellapps/web/src/AppShell.tsxAuthenticated layout, stage flow, providers
Route renderingapps/web/src/app/_components/route-views.tsxDynamic route mounts
Workbench routing configapps/web/src/app/_lib/workbench-routes.tsDepartment/module routing manifest

15.2 Workbench UI Components

Existing Component/Viewv0 Workbench SectionMapping
packages/ui/src/views/home-view.tsxWorkbench HomeTwin primary surface + workspace projection
packages/ui/src/views/tasks-view.tsxTasksTask runtime + continuity state
packages/ui/src/views/knowledge-view.tsxKnowledgeKnowledge service + AI search
packages/ui/src/views/clients-view.tsxAccountsEntity 360 + spine projection
packages/ui/src/views/deals-view.tsxOpportunitiesEntity 360 + spine projection
packages/ui/src/views/projects-view.tsxProjectsEntity 360 + task runtime
packages/ui/src/views/settings-view.tsxSettingsAdmin/tenant configuration
packages/ui/src/views/governance-view.tsxGovernanceApproval queue, policy evidence
packages/ui/src/views/integrations-view.tsxIntegrationsIntegration Manager + MCP Pool
packages/ui/src/views/insights-view.tsxIntelligenceSignal Engine + projections
packages/ui/src/views/brainstorming-view.tsxTwin draftingMemory + knowledge + triage candidates
packages/ui/src/views/iq-hub-view.tsxIntelligence hubAI search + reasoning + recommendations
packages/ui/src/views/sessions-view.tsxTwin session/continuityContinuity + memory + execution history

15.3 Twin and Cognitive Surfaces

Existing views that map to Twin roles:

  • brainstorming-view.tsx → Twin draft/review
  • iq-hub-view.tsx → Intelligence hub
  • sessions-view.tsx → Twin session/continuity

Definitive v0 addition needed:

  • A dedicated Twin sidebar/panel in AppShell.tsx that exposes Ask, Analyze, Explain, Recommend, Plan, Delegate, Act, Continue, Review, Remember.
  • The sidebar receives current user, tenant, workspace, selected entity, task, document, conversation, active section, available capabilities, relevant memory, and pending approvals.

16. One-to-One Mapping: Frontend Function ↔ Backend Service

#Frontend FunctionBackend ServiceAPI/Contract
1Marketing pagesgateway, tenantsPublic routes, onboarding discovery
2Authenticationgateway, tenantsClerk JWT validation, tenant resolution
3Onboardinggateway, tenants, pipeline/api/v1/workspace/profile, activation routes
4Domain routinggateway, spineProjection Engine responses
5Workbench homespine, projection-engine, storeSharedWorkbench contracts
6Taskstask-management, workflow, gatewayTask/projection APIs
7Knowledge searchknowledge, mcp-connectorPublic Spine MCP get_relevant_knowledge
8Memory triagecontinuity, govern, pipelineMemory candidate → promotion contracts
9Twin askintelligence, hermes, mcp-connectorask_twin, context assembly
10Twin delegateiw-agent-runtime, hermes, task-managementAgent task creation and monitoring
11Twin actgovern, hermes, mcp-poolprepare_action, approve_action, execution
12Governance approvalsgovern, workflow, task-managementApproval/proposal APIs
13Capabilities browsemcp-pool, integration-management-mcpCapability registry/resolver
14Continuity statusworkflow, task-management, continuityWorkflow/continuity APIs
15Admin users/rolesadmin, tenants, gatewayAdmin API
16Admin integrationsprovider-management-mcp, integration-management-mcpConnection/registry APIs
17Webhook ingestionwebhook-ingress, gatewayWebhook routes, signature verification
18Entity 360spine, projection-engine, storeEntity projections, memory, tasks
19Signal/telemetrysignals, telemetrySignal streams, telemetry APIs
20MCP discoverymcp-connectorPublic 19-tool Spine MCP

17. Cross-Mapping: Twin + Memory + Agents + Continuity + Capabilities

#Frontend EventTwin ActionAgent ActionMemory ActionContinuity ActionCapability ActionBackend Service Path
1User asks questionRetrieve context, explainNoneRead permitted memoryNoneNonemcp-connector → intelligence → continuity
2Twin recommends actionBuild proposalNoneNoneNoneResolve capabilityintelligence → mcp-pool
3User approves proposalSummarize decisionNoneNoneSchedule executionInvoke capabilitygovern → hermes → workflow
4Twin delegates to agentSelect agent, assign contextExecute taskRead working memoryCheckpoint/resumeAssign capabilityiw-agent-runtime → task-management
5Agent returns resultSummarize outcomeReturn resultWrite episodic memoryUpdate execution stateNoneintelligence → continuity → spine
6Triage reviewRecommend promotionNonePromote candidateNoneNonecontinuity → govern → pipeline
7Continuity retryNotify userNoneNoneRetry/backoffNoneworkflow → continuity → hermes
8Cancel executionExplain cancellationPause/stopArchive working memoryCancel workflowRevoke capability tokentask-management → workflow → govern
9Memory contradictionExplain conflictNoneSurface contradictionNoneNonecontinuity → knowledge → spine
10Knowledge promotionRecommend promotionNoneNoneNoneNoneknowledge → pipeline → spine

18. Cross-Mapping: Frontend Section ↔ Backend Service ↔ UI Component

#Frontend SectionUI Components/RoutesBackend Services
1Home/Workbenchhome-view.tsx, tasks-view.tsx, AppShell.tsxspine, projection-engine, task-management, store, gateway
2Knowledgeknowledge-view.tsx, /knowledge routeknowledge, pipeline, mcp-connector
3Memorybrainstorming-view.tsx, memory triage UIcontinuity, govern, pipeline
4Governancegovernance-view.tsx, /governance routegovern, workflow, task-management
5Integrationsintegrations-view.tsxintegration-management-mcp, provider-management-mcp, connector
6AgentsAgent task panel, execution history, iq-hub-view.tsxiw-agent-runtime, intelligence, task-management
7CapabilitiesCapability browser, action plan, approval flowmcp-pool, govern, hermes
8ContinuityWorkflow status, retry/escalation panel, sessions-view.tsxworkflow, continuity, hermes
9Adminadmin/page.tsx, /administrationadmin, tenants, gateway
10MarketingMarketing shell, platform, pricing, solutionsgateway, tenants, mcp-connector
11Twin panelTwin sidebar in AppShell.tsxintelligence, hermes, iw-agent-runtime, mcp-connector, knowledge, continuity
12Entity 360Entity detail views, Entity 360 panelsspine, projection-engine, store

19. Interaction Flow by Day

DayUser JourneyFrontend SectionBackend Services Involved
0Discovers platform, signs upMarketing / Authgateway, tenants
0Onboards domain and connectorsOnboardinggateway, tenants, pipeline, spine, connector
1Enters workbench, sees projectionsWorkbench shell / Homespine, projection-engine, store, gateway
1Asks Twin for contextTwin sidebarmcp-connector, intelligence, continuity, knowledge
2Reviews memory and knowledgeKnowledge / Memoryknowledge, continuity, spine
2Approves proposed actionsGovernancegovern, workflow, task-management
3Assigns delegated work to agentAgents / Twiniw-agent-runtime, agent-registry, task-management
3Monitors continuity and outcomesContinuity / Twinworkflow, continuity, hermes, signals
4Reviews triage candidatesMemory / Governancecontinuity, govern, pipeline
4Uses discovered capabilitiesCapabilitiesmcp-pool, integration-management-mcp, govern
5Configures integrations and adminAdmin / Integrationsadmin, tenants, provider-management-mcp, integration-management-mcp

20. v0 Build Order

  1. Twin sidebar/panel in AppShell.tsx
  2. Twin Workbench core routes and projections
  3. Memory triage surface
  4. Governance approval queue surface
  5. Agent task and execution surface
  6. Continuity status surface
  7. Capability discovery and execution surface
  8. Knowledge surface alignment
  9. Admin surface alignment
  10. Marketing-to-onboarding handoff alignment

21. Stop-Ship Invariants for v0

  • Frontend must not invoke provider APIs directly after approval; Hermes coordinates approved external execution.
  • Frontend must not write canonical Spine state directly.
  • D1/KV are operational caches only; they must not be described or used as canonical business truth.
  • Public MCP remains the 19-tool Spine contract only; broader MCP Pool and capability registries remain internal.
  • Twin is the canonical cognitive and interaction layer; continuity runtime is internal durable execution.
  • Agents are delegated specialists only; they may not read canonical Spine, write canonical state, promote memory, or approve their own actions.
  • Failed live projections must not silently become demo seed data.
  • L1/L2/L4/L7 must not appear as user-facing product navigation.
  • Legacy runtime aliases must not be introduced as new canonical frontend dependencies.