Current
Codebase Alignment Specification
Status: Active alignment plan
Date: July 12, 2026
Authority: Nirmal (Founder)
Canonical Reference: CANONICAL_PLATFORM_ARCHITECTURE.md
Purpose: Maps current services to canonical Platform Planes and defines alignment actions
Current State
The codebase has 30 services in services/. The canonical architecture defines 18 Platform Planes. There is a significant mismatch that needs resolution.
Service → Plane Mapping
Direct Mappings (Service exists and maps to a Plane)
| Current Service | Canonical Plane | Wrangler Name | Status |
|---|---|---|---|
pipeline | Pipeline | integratewise-pipeline | ✅ Maps |
connector | Integration Manager (API Connector) | connector | ✅ Maps |
mcp-connector | Integration Manager (MCP) | integratewise-mcp-connector | ✅ Maps |
intelligence | Integration Manager (AI Connector) | intelligence | ✅ Maps |
knowledge | Knowledge | knowledge | ✅ Maps |
continuity | Continuity Pipeline | continuity | ✅ Maps |
hermes | Hermes | integratewise-hermes | ✅ Maps |
govern | Governance Engine | integratewise-govern | ✅ Maps |
store | Adaptive Spine | integratewise-store | ⚠️ Partial (Spine only, not Cache/Blobs) |
think | Twin (reasoning) | integratewise-think | ⚠️ Partial |
iw-agent-runtime | Twin (runtime) | iw-agent-runtime | ⚠️ Partial |
twin-orchestrator | Twin (orchestration) | twin-orchestrator | ⚠️ Partial |
Services Requiring Renaming/Consolidation
| Current Service | Target Plane | Action Required |
|---|---|---|
loader | Pipeline | Consolidate into pipeline |
normalizer | Pipeline | Consolidate into pipeline |
act | Hermes (execution) | Consolidate into hermes or rename to execution |
connector-sync | Sync Engine | Rename to sync-engine |
webhook-ingress | Integration Manager | Consolidate into connector or rename |
agent-registry | Capability Fabric | Rename to capability-fabric |
workflow | Capability Fabric | Consolidate into capability-fabric |
Services That Are Cross-Cutting Infrastructure
| Current Service | Infrastructure Layer | Action Required |
|---|---|---|
gateway | Identity + Secrets, Queues + Events | Keep as-is (cross-cutting) |
admin | Admin + Operations | Keep as-is (cross-cutting) |
billing | Billing + Entitlements | Keep as-is (cross-cutting) |
telemetry | Observability | Keep as-is (cross-cutting) |
tenants | Configuration Manager (partial) | Keep or consolidate into config-manager |
signals | Queues + Events | Keep or consolidate into events |
Services That Are Legacy/Unknown
| Current Service | Assessment | Action Required |
|---|---|---|
l2 | Legacy overlay schema | Evaluate for retirement |
core-engine | Unknown purpose | Evaluate for retirement or consolidation |
folder-watcher | File monitoring | Evaluate for consolidation into connector |
huggingface-inference | Model inference | Evaluate for consolidation into intelligence |
schema-ai | Schema management | Evaluate for consolidation into config-manager or knowledge |
Canonical Planes Missing Services
| Canonical Plane | Current Service | Action Required |
|---|---|---|
| Configuration Manager | tenants (partial), schema-ai (partial) | Create new config-manager service |
| Activation Bridge | None | Create new activation-bridge service |
| Spine Cache | None (part of store) | Extract from store or create new service |
| Blobs | None (part of store) | Extract from store or create new service |
| User Workbench | apps/live (frontend) | Frontend only, no service needed |
| Twin Memory | None (part of iw-agent-runtime) | Extract from iw-agent-runtime or create new service |
| Session Logs | None (part of iw-agent-runtime) | Extract from iw-agent-runtime or create new service |
| Twin Audit Logs | None (part of iw-agent-runtime) | Extract from iw-agent-runtime or create new service |
| Sync Engine | connector-sync (partial) | Rename and expand connector-sync |
Target State
After alignment, the services should map to:
Platform Plane Services (18)
| Service | Canonical Plane | Wrangler Name |
|---|---|---|
config-manager | Configuration Manager | integratewise-config-manager |
integration-manager | Integration Manager | integratewise-integration-manager |
activation-bridge | Activation Bridge | integratewise-activation-bridge |
pipeline | Pipeline | integratewise-pipeline |
spine | Adaptive Spine | integratewise-spine |
spine-cache | Spine Cache | integratewise-spine-cache |
knowledge | Knowledge | integratewise-knowledge |
blobs | Blobs | integratewise-blobs |
twin | Twin | integratewise-twin |
twin-memory | Twin Memory | integratewise-twin-memory |
session-logs | Session Logs | integratewise-session-logs |
twin-audit-logs | Twin Audit Logs | integratewise-twin-audit-logs |
capability-fabric | Capability Fabric | integratewise-capability-fabric |
governance-engine | Governance Engine | integratewise-governance-engine |
hermes | Hermes | integratewise-hermes |
sync-engine | Sync Engine | integratewise-sync-engine |
continuity-pipeline | Continuity Pipeline | integratewise-continuity-pipeline |
Cross-Cutting Infrastructure Services (8)
| Service | Infrastructure Layer | Wrangler Name |
|---|---|---|
gateway | Identity + Secrets, Queues + Events | gateway |
admin | Admin + Operations | integratewise-admin |
billing | Billing + Entitlements | integratewise-billing |
telemetry | Observability | integratewise-telemetry |
tenants | Config State | integratewise-tenants |
events | Queues + Events | integratewise-events |
secrets | Identity + Secrets | integratewise-secrets |
deployment | Deployment + Runtime | integratewise-deployment |
Frontend Apps (unchanged)
| App | Purpose |
|---|---|
apps/live | User Workbench (primary) |
apps/web | Legacy/marketing |
apps/mobile | Mobile app |
apps/desktop | Desktop app |
apps/workspace | Internal workspace |
apps/docs | Documentation |
Alignment Actions
Phase 1: Consolidation (Reduce service count)
- Consolidate Pipeline services: Merge
loader+normalizerintopipeline - Consolidate Twin services: Merge
think+iw-agent-runtime+twin-orchestratorintotwin - Consolidate Capability Fabric: Merge
agent-registry+workflowintocapability-fabric - Rename Sync Engine: Rename
connector-synctosync-engine
Phase 2: Creation (Fill gaps)
- Create
config-managerfromtenants+schema-ai - Create
activation-bridge(new service) - Extract
spine-cachefromstore - Extract
blobsfromstore - Extract
twin-memoryfromiw-agent-runtime - Extract
session-logsfromiw-agent-runtime - Extract
twin-audit-logsfromiw-agent-runtime
Phase 3: Retirement (Remove legacy)
- Evaluate
l2for retirement - Evaluate
core-enginefor retirement or consolidation - Evaluate
folder-watcherfor consolidation into connector - Evaluate
huggingface-inferencefor consolidation into intelligence - Evaluate
webhook-ingressfor consolidation into connector
Phase 4: Rename (Align names)
- Rename
storetospine - Rename
connectortointegration-manager - Rename
mcp-connector(part of integration-manager) - Rename
intelligencetoai-connector - Rename
governtogovernance-engine
Priority Order
- P0: Consolidate Pipeline (loader + normalizer → pipeline)
- P0: Consolidate Twin (think + iw-agent-runtime + twin-orchestrator → twin)
- P0: Rename store → spine
- P1: Create config-manager from tenants + schema-ai
- P1: Create activation-bridge (new)
- P1: Rename connector-sync → sync-engine
- P2: Extract spine-cache, blobs from store
- P2: Extract twin-memory, session-logs, twin-audit-logs from iw-agent-runtime
- P2: Consolidate capability-fabric from agent-registry + workflow
- P3: Evaluate and retire legacy services
Verification Criteria
After alignment, verify:
- Every canonical Plane has a corresponding service
- No service exists without a canonical Plane mapping
- All wrangler.toml names follow the pattern
integratewise-{plane-name} - All services have consistent TypeScript types matching the canonical data models
- All services have consistent API contracts matching the canonical execution sequences
- Frontend components reference the correct service names
- Deploy scripts reference the correct service names
- Documentation references the correct service names