compare_integration – Cross-File Integration Analysis
Analyze integration compatibility between multiple files and systems with dependency flow mapping
Perfect For
API Integration Compatibility
Verify compatibility between frontend components and backend API endpoints with interface mismatch detection.
Microservice Communication Analysis
Analyze communication patterns between microservices to identify breaking changes and dependency issues.
Library Integration Assessment
Evaluate third-party library integration compatibility and identify potential conflicts before implementation.
Cross-System Data Flow Verification
Analyze data flow between different system components to ensure proper serialization and data handling.
Breaking Change Impact Analysis
Assess the impact of proposed changes across system boundaries with detailed dependency mapping.
Quick Start
houtini-lm:compare_integration with:
- files: ["C:/project/api/users.ts", "C:/project/frontend/UserService.ts"]
- analysisType: "integration"
- focus: ["method_compatibility", "data_flow"]
Project-wide integration analysis:
houtini-lm:compare_integration with:
- projectPath: "C:/microservices-project"
- analysisType: "comprehensive"
- focus: ["namespace_dependencies", "missing_connections"]
Integration Analysis Output
Compatibility Assessment
- Interface Compatibility: Method signature matching and parameter type compatibility analysis
- Data Contract Verification: Request/response schema compatibility and serialization format consistency
- Version Compatibility: API version alignment and backward compatibility assessment
Dependency Flow Analysis
- Import Chain Mapping: Complete dependency graph visualization across system boundaries
- Missing Dependencies: Identification of incomplete imports and unresolved references
- Circular Dependency Detection: Cross-system circular dependency identification and resolution paths
Breaking Change Detection
- Method Signature Changes: Parameter modifications that would break existing integrations
- Data Structure Modifications: Changes to object properties that affect serialization
- Namespace Conflicts: Potential naming collisions across integrated systems
Integration Analysis Example
API and Frontend Integration
// API endpoint (users.ts)
export interface User {
id: number;
email: string;
profile: UserProfile;
}
export async function getUser(id: number): Promise {
// Implementation
}
// Frontend service (UserService.ts)
interface UserData {
id: string; // Type mismatch!
email: string;
name: string; // Missing from API!
}
function fetchUser(userId: string): Promise {
// Integration issues
}
Analysis Results
- Critical: Type Mismatch – User.id is number in API but string in frontend
- Missing Property – Frontend expects ‘name’ property not provided by API
- Interface Incompatibility – UserProfile type missing in frontend interface
- Recommendation – Align interfaces or implement data transformation layer
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
files | array | Specific files to compare for integration | [“api.ts”, “client.ts”] |
projectPath | string | Project root for comprehensive analysis | “C:/my-project” |
analysisType | enum | Focus area for integration analysis | “integration” | “compatibility” | “comprehensive” |
focus | array | Specific integration aspects to analyze | [“method_compatibility”, “data_flow”] |
analysisDepth | enum | Analysis thoroughness level | “basic” | “detailed” | “comprehensive” |
Focus Areas Configuration
- method_compatibility – Function signature and interface matching
- namespace_dependencies – Import and module dependency analysis
- data_flow – Data structure and serialization compatibility
- missing_connections – Incomplete integration and missing dependencies
Advanced Configuration
Microservices Integration Analysis: Comprehensive compatibility assessment across service boundaries.
// Multi-service compatibility check
houtini-lm:compare_integration with:
- files: [
"C:/services/auth/api.ts",
"C:/services/user/client.ts",
"C:/frontend/auth/service.ts"
]
- analysisType: "comprehensive"
- focus: ["method_compatibility", "data_flow", "namespace_dependencies"]
// API versioning compatibility
houtini-lm:compare_integration with:
- files: ["C:/api/v1/users.ts", "C:/api/v2/users.ts"]
- analysisType: "compatibility"
- focus: ["method_compatibility"]
Integration Testing Workflow:
- Run compare_integration for compatibility baseline
- Use diff_method_signatures for detailed signature analysis
- Implement integration tests based on findings
- Use trace_execution_path to verify data flow
- Re-run analysis after integration fixes
Pro Tips
Early Integration Testing: Run integration analysis during development to catch compatibility issues before they become expensive to fix.
API Contract Verification: Use integration analysis to verify that API contracts match client expectations before deployment.
Migration Planning: Analyze integration impact when planning system migrations or major refactoring efforts.
Related Functions
- diff_method_signatures – Detailed method signature compatibility analysis
- trace_execution_path – End-to-end execution flow verification
- analyze_dependencies – Comprehensive dependency relationship mapping
- generate_unit_tests – Create integration tests based on analysis findings