{"slug":"architecture/PRODUCT_MAPPING_RECOVERY","title":"Product Mapping: From Current to Recovered State","section":"architecture","sectionLabel":"Architecture","status":"unclassified","type":"document","path":"architecture/PRODUCT_MAPPING_RECOVERY.mdx","bytes":12843,"description":null,"updated":null,"source":"integratewise/Integratewise-docs-wiki","content":"\n\n> **Tier C — Historical.** This document is a point-in-time snapshot preserved for reference. For current architecture, see [CANONICAL_PLATFORM_ARCHITECTURE.md](../architecture/CANONICAL_PLATFORM_ARCHITECTURE.md).\n\n## Understanding the Drift\n\n| Dimension | Jan 2025 (Strong) | Current (Diluted) | Fixed (Recovered) |\n|-----------|------------------|------------------|-------------------|\n| Center of Gravity | Human Workbench | AI Agents | Human Workbench |\n| Primary Product | Adaptive workspace | MCP/ADK infrastructure | Continuity surface |\n| What customers buy | \"One place to work\" | \"AI orchestration\" | \"Nothing lost in context\" |\n| Customer question | \"How do I stop context switching?\" | \"How do I build AI agents?\" | \"How do I stop being a human API?\" |\n| AI role | Support layer | Primary actor | Invisible infrastructure |\n| User spends time in | Work surfaces (8h/day) | AI chat/approval (30min/day) | Work surfaces (8h/day) |\n| Moat | Continuity + Entity360 | Multi-model routing | Continuity + Spine |\n\n---\n\n## Current State Diagnosis\n\n### What Exists (Good)\n- ✅ **Backend Contract Solid**\n  - Auth with password enabled\n  - Gateway routing correct\n  - Twin model route operational\n  - Knowledge service + queue + cron\n\n- ✅ **Real Customer Zero Infrastructure**\n  - Tenant: `iw-customer-zero`\n  - User: Nirmal Prince\n  - Verification component wired\n\n- ✅ **Frontend Foundation**\n  - Shell and routing architecture\n  - L1 domain surfaces (dashboard, contacts, companies, etc.)\n  - L2 overlay system for collaboration\n  - Real Customer Zero integration\n\n### What's Wrong (Problems)\n- ❌ **Wrong Focus**\n  - AI treated as primary product\n  - Surfaces treated as overlays\n  - Continuity not positioned as moat\n  - Humans treated as approval layer\n\n- ❌ **Wrong Architecture**\n  - AI on top, humans below\n  - Enables \"agent autonomy\" but kills adoption\n  - Surfaces not configurable\n  - No clear workbench primacy\n\n- ❌ **Wrong Value Prop**\n  - \"Here's another AI\" ← resonates poorly\n  - \"Solve your fragmentation\" ← resonates well but lost\n\n---\n\n## Mapping: Current Components to Recovered Structure\n\n### Level 1: Human Workbench (What exists, needs focus)\n\n**Current State:**\n- Dashboard (exists but not primary)\n- Contacts/Companies (buried in UI)\n- Tasks/Calendar (secondary to AI)\n- Communications (viewed through AI)\n\n**Recovered State:**\n- **Dashboard** → Primary entry point (always first)\n- **Accounts** → Your profile, preferences\n- **Contacts** → People you work with\n- **Companies** → Customers, prospects, partners\n- **Opportunities** → Deals, pipeline\n- **Tasks** → Personal and team work\n- **Calendar** → Meetings, availability\n- **Notes** → Quick capture\n- **Meetings** → Recording, summary, actions\n- **Communications** → Email, messages, Slack history\n- **Documents** → Files, shared, versions\n- **Knowledge** → FAQs, processes, learnings\n- **Goals** → Quarterly, tracking\n- **Values** → Principles, culture\n- **Reports** → Custom dashboards\n- **Settings** → Integrations, preferences\n\n**What Changes:**\n- Surfaces moved from \"overlay\" to \"primary\"\n- Left sidebar shows all surfaces (configurable)\n- User chooses where to work\n- AI recommendation appears as side panel, not center\n- \"Stop Being Human APIs\" becomes visible again\n\n### Level 2: AI Workbench (Needs to be built separately)\n\n**Current State:**\n- Twin integrated into overlay\n- No persistent home for AI\n- No daily routines\n- Memory not persistent\n\n**Recovered State:**\n- **AI's Own Environment** (separate from human surfaces)\n  - Observations dashboard (what Twin sees today)\n  - Memory consolidation (learnings from sessions)\n  - Daily routines (morning standup, EOD summary)\n  - Recommendation queue (prepared options)\n  - Approval queue (waiting human decision)\n  - Collaboration history (past conversations)\n\n- **AI Visibility** (human can see Twin's work)\n  - \"Twin saw X today. Should we Y?\"\n  - \"Your patterns: You code 6-9pm. Block calendar?\"\n  - \"Team insight: 5 PRs waiting >2 days. Should we review?\"\n  - \"Follow-up: Customer complained Monday. Haven't heard back?\"\n\n- **AI Autonomy** (Twin works continuously)\n  - Morning: Reviews overnight emails, flags urgent\n  - Hourly: Monitors for anomalies\n  - Evening: Consolidates learning\n  - Weekly: Generates insights\n\n**What Changes:**\n- AI not idle (has real responsibilities)\n- AI has persistent memory (learns over time)\n- AI has boundaries (can't override human work)\n- AI has visibility (human always sees what it's doing)\n\n### Level 3: Continuity Engine (Always IntegrateWise)\n\n**Current State:**\n- Spine exists but not featured\n- Memory not front-and-center\n- Auth hidden\n- Governance invisible\n\n**Recovered State:**\n- **Identity (Always IW)**\n  - Authentication (not delegated)\n  - Authorization (IntegrateWise governs)\n  - Organizations, Teams, Roles\n  - Permissions, Boundaries\n  - Governance policies\n\n- **Spine Schema (Always IW)**\n  - Canonical truth for all entities\n  - Relationship definitions\n  - Memory scoping rules\n  - Continuity rules\n  - Lineage tracking\n\n- **Shared Memory (Always IW)**\n  - Org Memory (principles, goals, rules)\n  - Work Memory (current projects, priorities)\n  - Personal Memory (user preferences, patterns)\n  - AI Memory (learnings, continuity facts)\n\n- **Invisible Continuity**\n  - Context follows the user\n  - Nothing is forgotten\n  - Connections are hidden\n  - Intelligence is obvious\n\n**What Changes:**\n- Continuity becomes the moat (not MCP or agents)\n- Spine defines what connections mean (not just endpoints)\n- Memory scopes defined by governance (not data access)\n- Users experience continuity but don't think about it\n\n### Level 4: AI Infrastructure (Invisible)\n\n**Current State:**\n- MCP highlighted\n- ADK discussed frequently\n- Multi-model routing complex\n- Reflection loops debated\n\n**Recovered State:**\n- **Still exists, but hidden**\n  - MCP routers (how tools communicate)\n  - ADK discovery (how Twin finds capabilities)\n  - Multi-model orchestration (Claude → GPT → Gemini)\n  - Reflection & consolidation (memory promotion)\n  - Voice & multimodal (speech input/output)\n\n- **Users don't need to know about:**\n  - Which model is processing\n  - How MCP works\n  - ADK routing details\n  - Reflection mechanisms\n  - These are implementation details\n\n**What Changes:**\n- Infrastructure is means, not end\n- Product story doesn't mention MCP\n- AI model choice is transparent to user\n- Continuity is what users experience, not infrastructure\n\n### Level 5: Connected Applications (100+)\n\n**Current State:**\n- Apps treated as data sources\n- Continuity applied post-connection\n- User doesn't see connection logic\n\n**Recovered State:**\n- **Apps remain external**\n  - Gmail (email, calendar)\n  - Slack (messages)\n  - GitHub (projects, code)\n  - Figma (designs)\n  - Notion (docs)\n  - Salesforce (CRM)\n  - HubSpot (leads)\n  - Linear (tasks)\n  - Drive (files)\n  - Calendar (availability)\n  - WhatsApp (personal)\n  - and 90+ more\n\n- **Connected through Spine**\n  - Not just synced\n  - Relationships mapped\n  - Entities normalized\n  - Memory extracted\n\n**What Changes:**\n- Users see fewer duplicate entities\n- Connections are federated (not replicated)\n- Continuity flows across all apps\n- No context lost between tools\n\n---\n\n## Configuration Architecture\n\n### Surface Registry (Built)\n\nEach surface is independently functional:\n\n```typescript\ninterface Surface {\n  id: string                    // 'dashboard', 'contacts', 'tasks'\n  label: string                 // 'Dashboard', 'Contacts', 'Tasks'\n  icon: string                  // 'home', 'users', 'checkbox'\n  component: React.ComponentType\n  enabled: boolean              // Can user disable?\n  requiresTools?: string[]      // Which tools it depends on\n  order: number                 // Default position in sidebar\n  pinned?: boolean              // User's preference\n}\n```\n\n### Sidebar Configuration (User-Driven)\n\n```typescript\ninterface SidebarConfig {\n  order: string[]               // ['dashboard', 'accounts', 'contacts', ...]\n  hidden: Set<string>           // User hidden surfaces\n  pinned: string[]              // User pinned favorites\n  collapsed: Set<string>        // Collapsed sections\n  theme: 'default' | 'compact'\n}\n\n// User actions:\nuseSurfaceConfig()\n  .toggleSurface('notes')       // Hide/show\n  .reorderSurfaces([...])       // Drag-drop\n  .pin('opportunities')         // Pin to top\n  .reset()                      // Back to factory\n```\n\n### Per-Role Configuration (Admin)\n\n```typescript\ninterface RoleConfig {\n  surfaces: {\n    [surfaceId]: {\n      visible: boolean          // Can they see it?\n      editable: boolean         // Can they edit?\n      connectedTools: string[]  // Which integrations show?\n    }\n  }\n}\n\n// Example: Sales role\n{\n  surfaces: {\n    dashboard: { visible: true, editable: false },\n    accounts: { visible: true, editable: true },\n    contacts: { visible: true, editable: true },\n    companies: { visible: true, editable: true },\n    opportunities: { visible: true, editable: true },\n    tasks: { visible: true, editable: true },\n    calendar: { visible: true, editable: false },\n    goals: { visible: false, editable: false },  // Hidden for sales\n    values: { visible: false, editable: false },  // Hidden for sales\n  }\n}\n```\n\n---\n\n## Implementation Checklist: Current → Recovered\n\n### Phase 0: Cleanup (TODAY)\n- [ ] Remove `components/l1/entity-stretch.tsx`\n- [ ] Remove `components/l1/domains/customer-zero/`\n- [ ] Flag `/pages/Metrics.tsx` for Replit reconciliation\n- [ ] Verify `tsc --noEmit` clean\n\n### Phase 1: Deploy (THIS WEEK)\n- [ ] Deploy cleaned workbench to preview\n- [ ] Verify all backend services online\n- [ ] Confirm Customer Zero can access\n- [ ] Test each L1 surface (dashboard, contacts, companies, etc.)\n\n### Phase 2: Activate (WEEK 1)\n- [ ] Customer Zero starts daily usage\n- [ ] First tool connection (Gmail)\n- [ ] Second tool connection (Slack)\n- [ ] Third tool connection (GitHub)\n- [ ] Fourth tool connection (Calendar)\n- [ ] Spine ingests first entities\n\n### Phase 3: Schema (WEEK 2)\n- [ ] Document Spine Schema v1.0\n- [ ] Map entities (Person, Org, Work, Communication)\n- [ ] Map relationships (50+ types)\n- [ ] Map memory scopes (Org, Work, Personal, AI)\n- [ ] Governance rules (access, boundaries)\n\n### Phase 4: AI Home (WEEK 2-3)\n- [ ] Build AI Workbench separately\n- [ ] Implement daily routines\n- [ ] Connect memory consolidation\n- [ ] Enable human-AI collaboration\n\n### Phase 5: Surfaces (WEEK 3)\n- [ ] Implement Surface Registry\n- [ ] Build Sidebar Configuration UI\n- [ ] Enable per-user customization\n- [ ] Support drag-drop reordering\n- [ ] Add hide/show functionality\n\n### Phase 6: Integration (ONGOING)\n- [ ] Customer Zero connects 10+ tools\n- [ ] Spine handles duplicates/conflicts\n- [ ] Memory consolidation working\n- [ ] Human-AI working together\n- [ ] Continuity invisible but omnipresent\n\n---\n\n## What NOT to Do\n\n❌ Don't rebuild the frontend from scratch\n- Existing foundation is solid\n- Just shift focus from AI to human\n\n❌ Don't move AI to the center\n- Keep it UNDERNEATH as infrastructure\n- Surface it only in collaboration overlay\n\n❌ Don't hide the workbench surfaces\n- Make them PRIMARY and prominent\n- Left sidebar is the main navigation\n\n❌ Don't make Spine visible\n- Continuity is the moat\n- Users shouldn't think about it\n\n❌ Don't build AI autonomy first\n- Build human workbench first\n- AI gets its own environment separately\n\n---\n\n## What TO Do\n\n✅ Deploy the existing workbench (cleanup only)\n✅ Let Customer Zero work naturally\n✅ Let Spine evolve from real usage\n✅ Build AI home separately and persistently\n✅ Focus on invisible continuity, not AI visibility\n\n---\n\n## Success = Back to Original Vision\n\n**Original (Jan 2025):**\n> \"Stop Being Human APIs. All your work appears in one adaptive workspace. Every conversation, ticket, customer, document and action stays connected. Nothing is lost when switching tools.\"\n\n**Today (Current):**\n> \"Use AI agents to orchestrate your tools. Create MCP flows. Configure reflection loops.\"\n\n**Recovered (June 2026+):**\n> \"All your work in one place. Your Twin understands everything. Nothing is forgotten. No context switching. One unified surface.\"\n\n---\n\n## Timeline Summary\n\n```\nTODAY:\n  Cleanup files, deploy workbench\n\nWEEK 1:\n  Customer Zero uses, connects tools\n\nWEEK 2:\n  Spine Schema documented, AI ready\n\nWEEK 3+:\n  Continuity invisible, productivity obvious\n\nEND STATE:\n  Product focused.\n  Humans supported by AI.\n  AI infrastructure hidden.\n  Continuity omnipresent.\n  \"Stop Being Human APIs\" vindicated.\n```\n\n---\n\n**Status: Ready to Implement**\n\nThe mapping is clear. The infrastructure exists. All that remains is execution.\nFirst step: Clean files → Deploy → Activate Customer Zero → Build from reality.\n\n"}