Unclassified

Platform Canonicals

Status: SUPERSEDED PLATFORM SNAPSHOT. The table counts, sidebar taxonomy
and storage/routing decisions below are retained for lineage only. Use
../architecture/ARCHITECTURE_LOCK.md
and
../architecture/CANONICAL_SPINE_SCHEMA_FOUNDATION.md.

Original status: CANONICAL
Scope: Single source of truth for IntegrateWise platform state, data model, routing, and execution rules.
Last Updated: 2026-07-25


1. Navigation Layer Mapping

IntegrateWise surfaces are organized into 7 canonical nav groups. Every sidebar item is a projection over the Spine, not a hardcoded page.

GroupScopeProjection Filter
My WorkPersonaluser_id = current_user, then workspace_id
CommunicationsChannelConversational Store unified, Spine entity-linked
WorkspacesDomainRole × Department × Industry
PlatformOperationalPlatform services and connectors
AdministrationTenantTenant control plane
MePersonalProfile, preferences, connected accounts
NavigationSystemSurface selector state

Decision (DECISION-NAV-01): The sidebar is not navigation. It is a role-aware surface selector. Every item renders a projection of the same Spine tables filtered by scope.


2. 14 Core Spine Tables

These are the canonical Account Intelligence tables. They are the only source of operational truth.

#TablePurposeKey Fields
1tenantsPlatform tenantsid, name, plan, settings_json
2workspacesTenant workspacesid, tenant_id, name, department, industry
3usersAll platform usersid, tenant_id, email, role, rbac_roles
4providersExternal providersid, name, type, auth_config_ref
5applicationsClient appsid, tenant_id, name, client_id
6connectionsProvider connectionsid, tenant_id, provider_id, status, credential_ref
7connectorsConnector configsid, tenant_id, provider_id, category, sync_direction
8capabilitiesBusiness capabilitiesid, name, domain, workflow_steps_json
9schemasConnector schemasid, connector_id, version, entity_name, fields_json
10webhooksWebhook endpointsid, tenant_id, connector_id, event, endpoint, secret_ref
11sync_jobsSync job stateid, tenant_id, connector_id, direction, status, last_sync_at
12entitiesCanonical entitiesid, tenant_id, type, data_json, source_links
13timelinesEntity event logid, entity_id, actor_type, action, payload_json, occurred_at
14knowledgeDocuments and notesid, tenant_id, entity_links, content, source_type

3. 7 Missing Platform Config Tables

Required for platform operations but not yet deployed.

#TablePurposeKey Fields
1memoryMemory substrateid, tenant_id, scope, content, embedding_ref, confidence
2policiesGovernance policiesid, tenant_id, name, rules_json, status
3approvalsApproval recordsid, tenant_id, entity_id, actor_id, decision, reason
4auditsAudit logid, tenant_id, actor_id, action, target_type, target_id, before_json, after_json
5signalsRisk and health signalsid, tenant_id, entity_id, signal_type, value, threshold, window_days
6deploymentsDeployment recordsid, tenant_id, service, environment, commit_sha, url, status
7settingsTenant + platform settingsid, tenant_id, category, key, value_json

4. Evidence Tables

Atomic write + link guarantee. Every piece of intelligence traces back to its source.

TablePurposeRelationship
source_linksRaw source documentsentity_id → provenance
intelligence_evidenceAI-generated evidenceentity_id → evidence chain

Rule: A field is not considered trustworthy unless its source_links entry is non-null and its intelligence_evidence entry has an actor_type of system or human, not inference.


5. Routing Logic

Rule (DECISION-ROUTING-01): All Spine queries pass through the Projection Platform. No service reads from Spine tables directly except the Spine service itself.

Spine routing is multi-layered:

  1. Identity: Who is the user? (users)
  2. Tenant: What is the tenant scope? (workspaces.tenant_id)
  3. Scope: Personal → user_id; Work → workspace_id; Department → department; Industry → industry
  4. Role: Which columns/rows are visible? (rbac_roles + field-level permissions)
  5. Connector: Which fields surface? (connector_installations + schemas version)
  6. Cache: Redis hot state first, Postgres fallback, shaped projection returned

Decision (DECISION-ROUTING-02): Adding a connector changes views automatically. The connector writes new fields to the Spine. The Projection Platform detects the schema version event. On the next request, it rebuilds the projection for that tenant's role/department/industry combination. No manual view configuration is required.


6. SSOT Rules

Shared Environment Registry

All secrets, credentials, and configuration values flow through one central registry. There is no alternate source of truth for operational state.

LayerAudienceVariable PrefixSource
Public applicationsEnd users + browsersNEXT_PUBLIC_IW_*Next.js env / Vercel edge
Internal servicesBackend workers onlyIW_*Doppler → Cloudflare Secrets / Vercel env
Platform servicesWorkers, pipelines, spineIW_* + service-specificCloudflare Secrets
InfrastructureProvisioning onlyTF_VAR_*, CLOUD_*Terraform / Doppler

Rules:

  1. Every secret has exactly one source. IW_* vars are owned by the platform; NEXT_PUBLIC_IW_* are public mirrors of non-sensitive platform state.
  2. Every service receives only the secrets it consumes (least-privilege distribution).
  3. Every credential entry stores rotation.policy and last_rotated.
  4. Every config key resolves at startup and fails closed if missing in production.
  5. No hardcoded defaults for production secrets.

7. Long-running and Event-driven Task Taxonomy

DECISION-TAXONOMY-01: Hermes categorizes all long-running and background tasks into 12 canonical categories. No category is a catch-all; every task maps to exactly one.

#CategoryTriggerExamples
1AutomationTime-basedRenewal risk scoring, customer health recalculation, executive summaries, SLA checks, invoice reconciliation, license utilization
2WatchEvent-basedGitHub releases, Salesforce schema changes, HubSpot property changes, Cloudflare deployments, production incidents, documentation updates
3MemoryTime + EventMemory compaction, duplicate detection, entity merging, timeline rebuilding, embedding regeneration, knowledge graph updates, continuity validation
4AIEvent + TimeOvernight account summaries, ticket clustering, meeting summarization, opportunity forecasting, churn prediction, next-best-action generation, knowledge synthesis
5IntegrationTime + EventFull sync, incremental sync, webhook verification, OAuth validation, connector health checks, schema discovery, rate-limit monitoring
6InfrastructureTime-basedWorker health, queue depth monitoring, cache warming, database optimization, secret rotation checks, backup verification, storage cleanup
7GovernanceEvent + TimeApproval reminders, policy drift detection, permission audits, access reviews, audit report generation, compliance validation
8SecurityEvent + TimeToken expiration checks, secret exposure detection, failed login analysis, API key validation, certificate expiration, suspicious activity detection
9WorkspaceEvent + TimeRefresh dashboards, update KPIs, refresh timelines, compute priorities, assign work, generate daily briefings
10AgentEvent + TimeEvaluate completed plans, retry failed executions, clean execution history, optimize workflows, update capability cache, learn from execution outcomes
11MarketplaceEvent + TimeDiscover new connector versions, validate installed connectors, update connector metadata, check marketplace health
12ObservabilityTime-basedAggregate metrics, trace analysis, error clustering, latency analysis, cost reporting, capacity forecasting

8. Task Management MCP

Service Design

DECISION-MCP-01: A dedicated Task Management MCP service owns task execution. Hermes does not execute tasks inline; it schedules or watches them, and the MCP handles runtime, retries, and lifecycle.

Hermes
    │
    ▼
Task Management MCP
    │
    ├── Scheduler        — cron + event-based dispatch
    ├── Event Watches    — real-time change filters
    ├── Workflow Engine  — multi-step task orchestration
    ├── Retry Manager    — exponential backoff + DLQ
    ├── Notifications    — completion / failure alerts
    ├── History          — execution audit trail
    ├── Dead Letter Queue— unrecoverable task capture
    └── Metrics          — task latency, error rate, throughput

Core Capabilities

Every capability is an MCP tool exposed as tasks.<action>.

tasks.create
tasks.schedule
tasks.watch
tasks.run
tasks.pause
tasks.resume
tasks.cancel
tasks.retry
tasks.history
tasks.logs
tasks.metrics

Execution Models

DECISION-MCP-02: The platform supports two execution models. Tasks are typed by model, not by ad-hoc config, so watch tasks cannot accidentally run on a cron timer and automation tasks cannot fire without a schedule.

Time-based

  • Every hour
  • Every day
  • Every Monday
  • First day of the month

Event-based

  • GitHub push received
  • Salesforce opportunity updated
  • Slack message posted
  • New customer onboarded
  • OAuth connection revoked
  • Cloudflare deployment completed

This lets Hermes respond to real operational events while still handling recurring maintenance, giving you a unified execution model for automation across the platform.


9. Adaptive Spine Boundaries

Decision (DECISION-BOUNDARY-01): The Projection Platform is the only surface that reads from the Spine. Nothing else does.

  • Spine = truth. Raw Postgres + Redis hot state.
  • Projection = view. Shaped by permissions, connector schema, and role/department/industry routing.
  • Twin = per-object intelligence. Not a sidebar chat. Activates on a specific object, surfaces evidence, closes on navigation.

Sidebar = role-aware surface selector, not navigation. Every sidebar item is a projection over the same Spine tables.


10. Continuity Loop

Decision (DECISION-CONTINUITY-01): Every execution outcome feeds back into the platform regardless of success or failure.

10 stages:

  1. Observe — ingest signals, events, and state changes
  2. Orient — map to tenant, department, role, and entity context
  3. Plan — select capabilities and execution paths
  4. Execute — run through governed execution paths with approval gates
  5. Learn — write outcomes to memory and timeline
  6. Synthesize — update signals, health scores, and forecasts
  7. Project — rebuild affected projections if schema changed
  8. Notify — deliver alerts via channel preference
  9. Audit — log every change to timelines + audits
  10. Replay — support rollback and schema version recovery

This document is the canonical reference. All implementation must trace back to a decision defined here.