Unclassified

IntegrateWise Three-Repository Architecture Specification

Status: Proposed final repository and wiring contract
Date: 31 July 2026
Product: IntegrateWise Spine Workspace
Distribution surfaces: Plugin Marketplace and MCP Marketplace
Supersedes: REPOSITORY_TOPOLOGY_AND_MIGRATION_SPEC.md (D8 two-repo decision)


1. Architecture Decision

IntegrateWise will operate through exactly three active product repositories:

1. IntegrateWise Monorepo
2. Spine Plugin Marketplace
3. Spine MCP Marketplace

The split is based on authority and runtime ownership, not merely UI packaging.

IntegrateWise Monorepo
    owns canonical truth, institutional memory,
    model infrastructure, platform agents and the full Workbench.

Plugin Marketplace
    owns Plugin-channel operational state,
    Plugin sessions, Plugin agent memory and Plugin agents.

MCP Marketplace
    owns MCP-channel operational state,
    MCP sessions, MCP agent memory and MCP agents.

Both channel repositories consume the published IntegrateWise Platform SDK.

They never access the Canonical Spine, model providers, Governance, Hermes, provider credentials, or Platform databases directly.


2. Alternatives Considered

2.1 Selected: Thin channel repositories

Channel Repository
→ Operational Spine
→ Channel Agent
→ Platform SDK
→ Canonical Platform

Advantages:

  • One canonical source of truth
  • Independent marketplace releases
  • Independent channel operational state
  • No duplicated Governance or model routing
  • Clear tenant and profile isolation
  • Easier detection of unmapped paths
  • Plugin and MCP runtimes can evolve independently
  • Canonical business behavior remains consistent

This is the selected architecture.

2.2 Rejected: Three independent platforms

Under this model, Plugin and MCP repositories would each duplicate:

  • Canonical entity models
  • Projection Engine
  • Model routing
  • Governance
  • Hermes
  • Institutional memory
  • Connector logic

This would create three versions of truth and three execution systems.

Rejected.

2.3 Rejected: One repository containing all channels

A single repository would reduce packaging overhead, but would couple:

  • Browser releases
  • Plugin marketplace review
  • MCP publication
  • Host SDK changes
  • Operational schema migrations
  • Channel-specific incidents

This would prevent channel-level release and security isolation.

Rejected.


3. Canonical Repository Names

Repository 1

integratewise/integratewise

Canonical logical name:

IntegrateWise Monorepo

Migration source:

integratewise/integratewise-live

Repository 2

integratewise/spine-plugin-marketplace

Canonical logical name:

Spine Plugin Marketplace

Published artifact:

IW-Spine-Network Plugin

Repository 3

integratewise/spine-mcp-marketplace

Canonical logical name:

Spine MCP Marketplace

Published artifact:

IW-Spine-Network MCP

4. Repository 1 — IntegrateWise Monorepo

4.1 Purpose

The Monorepo is the only repository allowed to own:

  • Canonical business truth
  • Canonical institutional memory
  • Platform identity and tenant authority
  • Models and model providers
  • Canonical platform agents
  • Governance
  • Capability resolution
  • Hermes execution
  • Projection generation
  • Full browser Workbench
  • Public Platform SDK contracts

4.2 User-facing applications

apps/
├── marketing
├── workbench
├── documentation
├── changelog
├── portfolio
└── platform-admin

4.3 Platform services

services/
├── gateway
├── identity
├── tenant-authority
├── configuration-manager
├── integration-manager
├── loader
├── normalizer
├── triage
├── canonical-spine
├── knowledge
├── institutional-memory
├── projection-engine
├── model-gateway
├── omni-router
├── agent-runtime
├── capability-fabric
├── governance
├── hermes
├── reconciliation
├── billing
├── observability
└── audit

4.4 Platform packages

packages/
├── contracts
├── schemas
├── platform-sdk
├── platform-agent-sdk
├── react-sdk
├── projection-contracts
├── agent-contracts
├── memory-contracts
├── tunnel-contracts
├── governance-contracts
├── capability-contracts
├── telemetry
├── testing
└── profile-config

4.5 Canonical storage

V0 physical ownership:

D1        Canonical entities, relationships, events and governed memory metadata
R2        Evidence bytes, documents, files and large artifacts
Vectorize Derived semantic retrieval index
KV        Hot configuration and replaceable caches
Queues    Outbox delivery, retries and asynchronous work
DO        Execution coordination and bounded runtime state

5. Repository 2 — Spine Plugin Marketplace

5.1 Purpose

The Plugin repository owns the complete Plugin-channel product:

  • Plugin marketplace listing
  • Plugin installation
  • Host OAuth handoff
  • Host workspace binding
  • Embedded Plugin UI
  • Plugin skills
  • Plugin templates
  • Host capability discovery
  • Plugin session management
  • Plugin channel agents
  • Plugin agent working memory
  • Plugin operational database
  • Plugin publication and review assets

5.2 Plugin operational database

Recommended profile bindings:

iw-plugin-op-dev
iw-plugin-op-customer-zero
iw-plugin-op-external

6. Repository 3 — Spine MCP Marketplace

6.1 Purpose

The MCP repository owns:

  • MCP marketplace listing
  • Remote MCP server
  • MCP transports
  • OAuth and MCP client binding
  • The public IW Spine Tools adapter
  • MCP App UI resources
  • Text and JSON fallback rendering
  • MCP sessions
  • MCP channel agents
  • MCP agent working memory
  • MCP operational database
  • MCP registry publication
  • MCP compatibility testing

6.2 MCP operational database

Recommended profile bindings:

iw-mcp-op-dev
iw-mcp-op-customer-zero
iw-mcp-op-external

6.3 Public tool contract

The public inventory remains exactly 19 semantic tools:

  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

7. Cross-Repository Ownership Matrix

ResponsibilityMonorepoPlugin repoMCP repo
Canonical DBOwnForbiddenForbidden
Canonical entity schemaOwnConsumeConsume
Institutional memoryOwnPropose promotionPropose promotion
Model provider registryOwnForbiddenForbidden
Model GatewayOwnForbiddenForbidden
Omni RouterOwnForbiddenForbidden
Projection EngineOwnConsumeConsume
Platform SDKPublishConsumeConsume
Authentication authorityOwnHandoff and sessionHandoff and session
GovernanceOwnSubmit and displaySubmit and display
HermesOwnObserve onlyObserve only
Channel agentsShared interfacesOwn Plugin agentsOwn MCP agents
Channel agent memory—OwnOwn
Operational DBPlatform runtime onlyOwn Plugin DBOwn MCP DB

8. The Spine Tunnel

8.1 Definition

The Spine Tunnel is the only supported communication boundary between a channel Operational Spine and the Canonical Spine.

Plugin Operational Spine ─┐
                          ├── Platform SDK / Spine Tunnel ── Canonical Platform
MCP Operational Spine ────┘

8.2 Tunnel lanes

  1. Projection lane: Canonical → Channel (projections, context, entities)
  2. Command lane: Channel → Canonical (store, propose, approve)
  3. Observation lane: Channel → Triage (feedback, patterns, evidence)
  4. Memory-promotion lane: Channel memory → Canonical memory
  5. Execution-status lane: Governance → Hermes → Provider → Channel
  6. Reconciliation lane: Bidirectional checkpoint sync

9. Three Profiles in Every Repository

development
customer-zero
external

Profiles are deployment and isolation contracts, not UI personas.


10. Three State Classes

ClassAuthorityExamples
Client stateBrowser/hostOpen tab, draft, filters
Operational Spine stateChannel operational DBInstallation, session, tool call, widget state
Canonical Spine stateMonorepoAccount, decision, memory, proposal, approval

11. CI Architecture Gates

CI must fail when:

  1. Frontend network call not declared in wiring.yaml
  2. Channel repo contains canonical DB URL
  3. Channel repo imports internal Platform service
  4. Channel repo imports provider execution SDK
  5. Surface has no declared final-state authority
  6. Operational table lacks owner, retention, tenant key or profile
  7. Agent lacks declared memory scope
  8. Tool lacks Platform SDK mapping
  9. SDK method lacks contract version
  10. Command lacks idempotency key
  11. Profile reuses another profile's resource binding
  12. Customer Zero contains approval bypass
  13. Canonical mutation bypasses governed writers
  14. Direct DB read exists in frontend code
  15. Execution path does not terminate in reconciliation
  16. Endpoint has no active consumer and is not marked internal
  17. Frontend section has no test evidence
  18. Deprecated route remains reachable
  19. Projection cache presented as current without version/freshness
  20. Plugin and MCP contract versions incompatible with deployed Platform SDK

12. Migration Sequence

Phase 1 — Freeze ownership

Phase 2 — Publish Platform contracts

Phase 3 — Establish central canonical ownership

Phase 4 — Create Plugin repository

Phase 5 — Create MCP repository

Phase 6 — Rebuild Workbench consumers

Phase 7 — Close all gaps

Phase 8 — External publication


13. Final Architecture

┌─────────────────────────────────────────────────────────────┐
│ REPOSITORY 1 — INTEGRATEWISE MONOREPO                       │
│                                                             │
│ Marketing · Workbench · Docs · Changelog · Portfolio       │
│                                                             │
│ Canonical DB · Memory · Knowledge · Models · Providers     │
│ Canonical Agents · Projection · Governance · Hermes        │
│ Platform SDK · Agent SDK · Tunnel Contracts                │
└──────────────────────────────┬──────────────────────────────┘
                               │
                  Versioned Platform SDK / Spine Tunnel
                 ┌─────────────┴──────────────┐
                 │                            │
┌────────────────▼────────────────┐  ┌────────▼─────────────────┐
│ REPOSITORY 2                    │  │ REPOSITORY 3             │
│ SPINE PLUGIN MARKETPLACE        │  │ SPINE MCP MARKETPLACE    │
│                                 │  │                          │
│ Plugin UI                       │  │ Remote MCP               │
│ Plugin Operational DB           │  │ MCP Operational DB       │
│ Plugin Sessions                 │  │ MCP Sessions             │
│ Plugin Agent Memory             │  │ MCP Agent Memory         │
│ Plugin Channel Agents           │  │ MCP Channel Agents       │
│ Host Adapters                    │  │ Transport Adapters       │
│ Plugin Tunnel Worker            │  │ MCP Tunnel Worker        │
└─────────────────────────────────┘  └──────────────────────────┘

Final authority rule

The Monorepo owns what the organization knows and authorizes.

The Plugin repository owns how the Plugin channel operates.

The MCP repository owns how the MCP channel operates.

The Spine Tunnel is the only route between channel operations
and canonical organizational continuity.