Gap Analysis & Migration Guide

Current State to Target Architecture

6
Components Complete
4
Require Migration
8
New Implementation
18
Total Components

Existing Components (Ready to Migrate)

These components have working implementations in the current codebase

Component Current Location Status Target Migration Effort
Workiva OAuth2 Client app/services/workiva.py ✓ Complete func_bridge
Workiva Read/Write Ops app/api/routes/workiva.py ✓ Complete func_bridge
Multi-Agent Orchestration app/services/agentic_extractor.py ✓ Complete func_reason
PDF/Excel Extraction app/services/pdf_extracter.py ✓ Complete func_ingest
Document Search Tools app/services/document_tools.py ✓ Complete func_ingest
Step Logger / Audit app/services/step_logger.py ✓ Complete All Functions
🔄

Components Requiring Migration

These need adaptation to work with Azure services

Component Current State Status Required Changes Priority
LLM Integration Google Gemini 2.5 Flash ⇄ Migrate Replace with Azure OpenAI GPT-5.1, update prompts High
Notifications SMTP Email (Gmail) ⇄ Migrate Replace with Teams/Copilot webhooks Medium
Configuration mapper.yaml + .env ⇄ Migrate Move to Azure Key Vault + App Configuration High
API Runtime FastAPI + Uvicorn ⇄ Migrate Convert to Azure Functions triggers High

New Components (To Implement)

These components need to be built from scratch

Component Description Status Complexity Priority
Azure Event Grid Event routing for blob triggers ✗ New
High
Azure AI Search (RAG) Vector DB for historical context ✗ New
High
VNET + Private Endpoints Zero-egress network architecture ✗ New
High
Copilot Studio Agent Teams-based command interface ✗ New
Medium
SharePoint Integration Drop zone with event triggers ✗ New
Medium
Azure Document Intelligence Enhanced PDF/form extraction ✗ New
Medium
Azure Key Vault Secrets and credential management ✗ New
High
Monitoring Dashboard Log Analytics + Application Insights ✗ New
Low
📁

Code Migration Mapping

File-to-function mapping for migration

🚀

func_ingest

Document Parsing Function
pdf_extracter.py → extraction/
document_tools.py → tools/
step_logger.py → logging/
+ Document Intelligence → NEW
🧠

func_reason

LLM Orchestration Function
agentic_extractor.py → agents/
Google Gemini → Azure OpenAI
+ AI Search RAG → NEW
+ Prompt Templates → NEW
🔗

func_bridge

Workiva API Bridge
workiva.py (service) → api/
workiva.py (routes) → handlers/
mapper.yaml → Key Vault
+ Retry Logic → ENHANCE
🗣

Copilot Studio

Teams Interface Agent
notifications.py → Teams Webhook
+ Agent Definition → NEW
+ Adaptive Cards → NEW
+ Power Automate → NEW

Implementation Timeline by Phase

1
Azure Infrastructure
VNET, Storage, Key Vault
2
Functions Migration
ingest, reason, bridge
3
Intelligence Layer
OpenAI, AI Search
4
Interface Layer
SharePoint, Copilot
5
Integration & Test
E2E Testing, Deploy

Effort Estimation Summary

Based on existing codebase analysis and target requirements

~4,000
Lines of Existing Code
~60%
Code Reuse Potential
5
Implementation Phases
18
Total Components
🔗

Key Dependencies & Blockers

External dependencies that may affect implementation

Dependency Type Status Impact Action Required
Azure OpenAI GPT-5.1 Access Service Pending Blocker Request private deployment approval
Workiva Production Credentials Credential Available Low Migrate to Key Vault
Norway East Region Quota Quota Check Medium Verify compute quotas available
Historical Factbooks (RAG Data) Data Required Blocker Collect and prepare documents
M365 Copilot License License Check Medium Confirm Copilot Studio access

Project Northern Lights Gap Analysis v1.0 | Danta Labs for KPMG Lighthouse

Migration Planning Document