{"slug":"strategy/business-strategy/STRATEGIC_ACTION_PLAN","title":"IntegrateWise Strategic Action Plan","section":"strategy","sectionLabel":"Strategy","status":"unclassified","type":"document","path":"strategy/business-strategy/STRATEGIC_ACTION_PLAN.mdx","bytes":7968,"description":null,"updated":null,"source":"integratewise/Integratewise-docs-wiki","content":"\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**Based On**: Complete deep excavation of 335K LOC codebase  \n**Date**: July 10, 2026  \n**Objective**: Create Customer Zero—end-to-end proof that all 34 subsystems work together\n\n---\n\n## The Situation\n\nYou have a **complete, production-scale platform** but it's architecturally separated:\n\n- **Frontend** (apps/live): Beautiful UI, deployed on Vercel, returns mock data\n- **Backend** (services/): 27 services, fully functional, undeployed\n- **Packages** (30+): Capability Fabric, Memory, Twin, Connectors all built\n- **Gap**: No visible working example that connects them\n\n---\n\n## What \"Customer Zero\" Means\n\nA single user action that flows through **all three Life Cycles**:\n\n### Action: User clicks \"Sell Deal\" capability\n\n### LC1 (Work Surface):\n\n```\n1. Frontend: User on /capabilities page\n2. Clicks \"Sell Deal\"\n3. Sees AI recommendation with confidence score\n4. Clicks \"Execute\"\n5. Sees deal created in CRM\n```\n\n### LC2 (Silent Partner):\n\n```\nBehind the scenes:\n- Twin generates recommendation\n- Memory records the interaction\n- Learning updates capability quality scores\n```\n\n### LC3 (Connected Fabric):\n\n```\n- System queries Salesforce for account data\n- Signals engine highlights deal risks\n- Pipeline handles approval if needed\n- Connectors update all linked systems\n```\n\n---\n\n## The Execution Plan\n\n### PHASE 1: Wire Frontend → Gateway (3-4 hours)\n\n**What**: Make apps/live/api/capabilities/execute actually connect to services/gateway\n\n**Steps**:\n\n1. **Get Gateway URL** (30 min)\n   - Deploy services/gateway (currently not deployed)\n   - Or use local gateway for testing\n   - OR configure for staging environment\n\n2. **Update API Route** (30 min)\n\n   ```typescript\n   // apps/live/app/api/capabilities/execute/route.ts\n\n   // Current: returns mock data\n   // Update to: call services/gateway endpoint\n   const response = await fetch(`${GATEWAY_URL}/capabilities/execute`, {\n     method: \"POST\",\n     headers: {\n       Authorization: `Bearer ${session.idToken}`,\n       \"Content-Type\": \"application/json\",\n     },\n     body: JSON.stringify({\n       capabilityId: \"sell-deal\",\n       entityId,\n       context,\n     }),\n   });\n   ```\n\n3. **Test Loop** (1-2 hours)\n   - Click capability in frontend\n   - Watch request flow to gateway\n   - See response come back\n   - Display result to user\n\n4. **Commit** (15 min)\n   ```bash\n   git commit -m \"feat: wire apps/live → services/gateway for capability execution\"\n   ```\n\n---\n\n### PHASE 2: Capability Execution (2-3 hours)\n\n**What**: Actually execute the capability through the stack\n\n**Components Involved**:\n\n- services/gateway → routes request\n- packages/core/capability-registry → looks up \"Sell Deal\"\n- packages/core/capability-context → assembles data from Spine\n- services/intelligence OR services/think → AI processing\n- services/connector → calls Salesforce\n- services/hermes → records memory\n\n**Steps**:\n\n1. **Trace Path** (30 min)\n   - Open services/gateway/src/routes.ts\n   - Find capability execution route\n   - Trace what it calls next\n   - Document the flow\n\n2. **Fix Missing Wiring** (1-2 hours)\n   - Gateway knows about Intelligence service? ✓ or ✗\n   - Intelligence knows about Connector? ✓ or ✗\n   - Connector has Salesforce config? ✓ or ✗\n   - Each link either works or needs fixing\n\n3. **Test End-to-End** (30 min)\n   - Execute capability from frontend\n   - Watch it flow through all services\n   - See result appear in frontend\n\n---\n\n### PHASE 3: Memory & Twin (1-2 hours)\n\n**What**: Record to memory system and update Twin\n\n**Components**:\n\n- services/hermes (memory)\n- services/twin-orchestrator (Twin)\n- packages/hermes-spine-memory\n\n**Steps**:\n\n1. **After Capability Executes**:\n\n   ```typescript\n   // In capability execution response\n   await memory.record({\n     type: \"capability_execution\",\n     capabilityId: \"sell-deal\",\n     result: { dealId: \"...\" },\n     userId,\n     timestamp,\n   });\n\n   await twin.update({\n     userId,\n     newContext: { recentDeal: dealId },\n   });\n   ```\n\n2. **Test**:\n   - Execute capability\n   - Check memory system shows it\n   - Check Twin has updated context\n\n---\n\n### PHASE 4: Visible Proof (30 min - 1 hour)\n\n**What**: Create a \"Customer Zero Walkthrough\" page\n\n**Do This**:\n\n1. **Add /customer-zero route** to apps/live\n2. **Create interactive flow**:\n\n   ```\n   Step 1: View available capabilities (/api/capabilities/discover)\n   Step 2: Click \"Sell Deal\"\n   Step 3: See AI recommendation (from services/intelligence)\n   Step 4: Click \"Execute\"\n   Step 5: See deal created (in Salesforce)\n   Step 6: See memory recorded (check hermes)\n   Step 7: See Twin updated (check twin-orchestrator)\n   ```\n\n3. **Screenshot each step**\n4. **Create walkthrough video**\n5. **This becomes your proof of concept**\n\n---\n\n## Priority: Focus Only On Sell Deal\n\n**Don't try to**:\n\n- Wire all 24 capabilities\n- Connect all 27 services\n- Build entire memory pipeline\n- Create full Twin\n\n**Do try to**:\n\n- Make ONE capability work end-to-end\n- Call ONE external system (Salesforce)\n- Record ONE memory entry\n- Update ONE Twin\n\n**Why**: Proves the architecture. Everything else follows the same pattern.\n\n---\n\n## What Each Service Needs\n\n### services/gateway\n\n- ✅ Has routing table to other services\n- ❌ Needs to know about apps/live endpoints\n- Action: Check `services/gateway/src/routes.ts`\n\n### services/intelligence\n\n- ✅ Has AI pipeline\n- ❌ Needs LLM credentials\n- Action: Check `.env` or config\n\n### services/connector\n\n- ✅ Has 80+ integration templates\n- ❌ Might need Salesforce OAuth setup\n- Action: Check `services/connector/src/integrations/salesforce.ts`\n\n### services/hermes\n\n- ✅ Has memory recording\n- ❌ Needs database connection\n- Action: Check Supabase integration\n\n---\n\n## Immediate Next Steps\n\n### Day 1 (Now):\n\n1. Read `services/gateway/src/routes.ts` - understand routing\n2. Find Sell Deal capability definition\n3. Trace where it routes for execution\n\n### Day 2:\n\n1. Update apps/live/api/capabilities/execute to call gateway\n2. Deploy gateway (or set up local)\n3. Test request flow\n\n### Day 3:\n\n1. Fix any missing service-to-service wiring\n2. Test full execution\n3. Check Salesforce updated\n\n### Day 4:\n\n1. Add memory recording\n2. Check Twin updated\n3. Create /customer-zero page\n4. Demo\n\n---\n\n## Success Criteria\n\n- ✅ User can click capability in /capabilities\n- ✅ Frontend sends request to gateway\n- ✅ Gateway routes to intelligence service\n- ✅ Intelligence returns recommendation\n- ✅ Frontend displays recommendation\n- ✅ User clicks \"Execute\"\n- ✅ Capability executes on Salesforce\n- ✅ Memory system records it\n- ✅ Twin context updates\n- ✅ User sees result in frontend\n\n**When all 9 are true: You have Customer Zero.**\n\n---\n\n## Then What?\n\nOnce Customer Zero works:\n\n1. **Wire remaining 23 capabilities** (same pattern, 2-3 hours each)\n2. **Add database schema** (1-2 hours)\n3. **Deploy services** (2-3 hours)\n4. **Enable real connectors** (1-2 hours per connector)\n5. **Production hardening** (ongoing)\n\n**Timeline**: 1-2 weeks from today to full production platform.\n\n---\n\n## Why This Matters\n\nRight now:\n\n- Beautiful frontend ✓\n- Powerful backend ✓\n- But they don't talk ✗\n\nAfter Customer Zero:\n\n- Beautiful frontend ✓\n- Powerful backend ✓\n- Talking together ✓\n- **Platform works** ✓\n\n---\n\n## Where to Start\n\n**Go to**: `services/gateway/src/`\n\n**Read**: `routes.ts`, `auth.ts`\n\n**Question**: \"What endpoint handles capability execution?\"\n\n**Answer to that question** leads you to the path.\n\n**That path** is where you'll make your first fix.\n\n**That first fix** gets you 10% of the way.\n\n**The next 9 fixes** get you to 100%.\n\n---\n\nThe platform is built. It just needs to be wired. You have everything. Execute.\n"}