analyze_project_structure – Complete Project Architecture Analysis
Comprehensive architectural assessment with component relationship mapping, complexity metrics, and strategic improvement recommendations
Perfect For
Legacy System Assessment
Understand inherited codebase architecture, identify technical debt patterns, and create modernisation roadmaps with confidence.
Architecture Review and Planning
Strategic analysis for scaling decisions, refactoring planning, and team structure optimisation based on codebase organisation.
Team Onboarding Documentation
Generate comprehensive architectural documentation for new developers with component relationships and data flow analysis.
Technical Due Diligence
Professional assessment of codebase quality, maintainability metrics, and architectural risk evaluation for business decisions.
Refactoring Strategy Development
Identify refactoring priorities, component boundaries, and architectural improvements with detailed impact analysis.
Quick Start
Use Houtini LM to analyse your project architecture:
local-llm:analyze_project_structure with:
- projectPath: "C:/enterprise-app"
- analysisDepth: "comprehensive"
- focusAreas: ["architecture", "complexity"]
Focused dependency architecture analysis:
local-llm:analyze_project_structure with:
- projectPath: "C:/microservices/api"
- analysisDepth: "detailed"
- focusAreas: ["dependencies", "patterns"]
- maxDepth: 4
Architecture Analysis Output
Architectural Patterns Assessment
- Design Pattern Detection: MVC, MVVM, component architecture, and microservice pattern identification
- Framework Architecture Analysis: React/Vue component hierarchy, Node.js service patterns, database layer organisation
- Anti-Pattern Identification: God objects, tight coupling, and architectural debt detection with remediation strategies
Component Relationship Mapping
- Dependency Graph Analysis: Visual representation of component relationships with depth and coupling analysis
- Data Flow Mapping: Information flow patterns through application layers with bottleneck identification
- Interface Boundary Analysis: API boundaries, module interfaces, and integration point assessment
Complexity and Quality Metrics
- Cyclomatic Complexity Analysis: Function and module complexity metrics with maintainability scoring
- Technical Debt Assessment: Quantified technical debt with prioritised remediation recommendations
- Scalability Indicators: Architecture scalability assessment with growth pattern analysis
Architecture Analysis Example
Project Structure Overview
enterprise-app/
├── src/
│ ├── components/ (45 files) - React UI components
│ ├── services/ (12 files) - Business logic layer
│ ├── utils/ (8 files) - Shared utilities
│ ├── hooks/ (15 files) - Custom React hooks
│ └── types/ (6 files) - TypeScript definitions
├── api/
│ ├── routes/ (20 files) - Express.js API endpoints
│ ├── middleware/ (7 files) - Authentication & validation
│ └── models/ (14 files) - Database models
└── tests/ (89 files) - Test coverage: 78%
Architecture Assessment Results
- Architecture Pattern: Clean layered architecture with good separation of concerns
- Complexity Score: 7.2/10 – Moderate complexity, manageable for team development
- Technical Debt: Low-medium level, primarily in legacy service layer modules
- Scalability Assessment: Good horizontal scaling potential, some database bottlenecks identified
Strategic Recommendations
- Immediate Priority: Refactor UserService.ts (high complexity, 450+ lines)
- Architecture Enhancement: Implement caching layer for improved performance
- Team Structure: Well-organised for 3-5 developer team with clear module ownership
- Testing Improvement: Focus test coverage on services layer (currently 65%)
Parameters
Parameter | Type | Description | Example |
---|---|---|---|
projectPath | string | Root directory for architectural analysis | “C:/enterprise-app” |
filePath | string | Single file structural analysis | “C:/src/services/UserService.ts” |
analysisDepth | enum | Analysis thoroughness level | “basic” | “detailed” | “comprehensive” |
focusAreas | array | Specific analysis domains | [“architecture”, “complexity”] |
maxDepth | number | Directory traversal depth (1-5) | 3 |
Focus Areas Configuration
- architecture: Design patterns, layer separation, and structural organisation assessment
- dependencies: Component relationships, coupling analysis, and dependency health
- complexity: Code complexity metrics, maintainability scoring, and refactoring priorities
- patterns: Design pattern usage, anti-pattern detection, and best practice compliance
Advanced Configuration
Use Houtini LM for strategic architectural analysis: Start with comprehensive analysis for complete understanding, then focus on specific areas for detailed assessment.
// Full architectural assessment
local-llm:analyze_project_structure with:
- projectPath: "C:/production-system"
- analysisDepth: "comprehensive"
- focusAreas: ["architecture", "dependencies", "complexity", "patterns"]
- maxDepth: 4
// Legacy system modernisation analysis
local-llm:analyze_project_structure with:
- projectPath: "C:/legacy-monolith"
- analysisDepth: "detailed"
- focusAreas: ["architecture", "complexity"]
- maxDepth: 3
Architecture Review Workflow:
- Run comprehensive project structure analysis for baseline assessment
- Use count_files for detailed file organisation overview
- Run analyze_dependencies for dependency relationship mapping
- Use security_audit to identify architectural security considerations
- Generate comprehensive documentation with architectural insights
Pro Tips
Strategic Planning: Use architectural analysis results to guide refactoring priorities and team structure decisions for maximum development efficiency.
Documentation Excellence: Architecture analysis provides executive-level insights perfect for technical specifications and stakeholder communications.
Continuous Assessment: Regular architectural analysis helps maintain code quality and prevents architectural drift as projects evolve.
Related Functions
- count_files – Detailed project structure overview complementing architectural insights
- analyze_dependencies – Deep dependency relationship analysis and circular reference detection
- security_audit – Security assessment with architectural security considerations
- generate_project_documentation – Comprehensive project documentation with architectural details