Get the big picture view of your codebase. Understand how your project is organised, spot architectural patterns, and identify opportunities for improvement with strategic insights that help you make informed decisions about your code.

Quick Start

Jump straight in with these ready-to-use prompts. Perfect for getting that high-level understanding of any project:

Complete Project Analysis
Analyse the structure of my project at C:/my-react-app
Focus on Architecture
Can you review the architecture of this project? C:/enterprise-app
Complexity Assessment
Please assess the complexity and organisation of C:/legacy-system

Perfect for New Projects

Inherited a codebase? This is your first stop. Get oriented quickly and understand what you're working with before diving into the details.

What It Does

Think of this as your project's architectural X-ray. analyze_project_structure gives you strategic insights about how your project is organised, where complexity lives, and what patterns emerge across your codebase.

Instead of getting lost in individual files, this function helps you see the forest for the trees. It analyses your entire project structure to understand:

  • Architectural Patterns - MVC, component-based, microservices, monolithic structures
  • Code Organisation - How well your folders and files reflect your app's purpose
  • Complexity Distribution - Where the gnarly bits live and why
  • Technology Stack - What you're using and how it all fits together
  • Improvement Opportunities - Strategic recommendations for better organisation

The analysis focuses on big-picture insights rather than line-by-line code review. It's perfect when you need to understand the strategic direction of a codebase or plan major refactoring work.

Parameters

Here's how to customise your project analysis to get exactly the insights you need:

Parameter Type Required Default Description
projectPath string Yes* -

Path to your project root directory

Example: "C:/my-react-app"
filePath string Yes* -

Single file to analyse (alternative to projectPath)

Use when focusing on one specific file's context
analysisDepth string No "detailed"

Analysis depth: "basic", "detailed", "comprehensive"

"comprehensive" gives the most strategic insights
analysisType string No "comprehensive"

Focus area: "architecture", "patterns", "comprehensive"

"architecture" for structural insights
focusAreas array No []

Specific areas to focus on: architecture, dependencies, complexity, patterns

Example: ["architecture", "complexity"]
maxDepth number No 3

Maximum directory depth to analyse (1-5)

Increase for deeply nested projects

*Either projectPath or filePath is required

Real-World Examples

Here's how to use this function in different scenarios:

Complete React App Analysis

Full React Project Review
houtini-lm:analyze_project_structure with:
- projectPath: "C:/my-react-app"
- analysisDepth: "comprehensive"
- focusAreas: ["architecture", "patterns", "complexity"]
- maxDepth: 4

Legacy Enterprise System Assessment

Enterprise Architecture Review
houtini-lm:analyze_project_structure with:
- projectPath: "C:/enterprise-system"
- analysisType: "architecture"
- analysisDepth: "comprehensive"
- focusAreas: ["architecture", "dependencies"]

Quick Project Overview

Fast Assessment
houtini-lm:analyze_project_structure with:
- projectPath: "C:/new-project"
- analysisDepth: "basic"
- maxDepth: 2

WordPress Plugin Structure Review

WordPress Plugin Analysis
houtini-lm:analyze_project_structure with:
- projectPath: "C:/wp-content/plugins/my-plugin"
- analysisType: "patterns"
- focusAreas: ["architecture", "patterns"]

What You Get Back

This analysis delivers strategic insights that help you understand and improve your project's architecture:

🏗️ Architectural Assessment

  • Pattern Recognition - MVC, component architecture, layered design
  • Structural Analysis - How your folders and files relate to each other
  • Technology Integration - How different parts of your stack work together
  • Design Principles - Adherence to SOLID, DRY, and other principles

📊 Complexity Insights

  • Complexity Hotspots - Where the most complex code lives
  • Metrics Analysis - Cyclomatic complexity, nesting depth, file sizes
  • Refactoring Priorities - Which areas would benefit most from attention
  • Maintainability Score - Overall assessment of code maintainability

🔗 Dependency Analysis

  • Component Relationships - How different parts depend on each other
  • Coupling Assessment - Tight vs loose coupling identification
  • Circular Dependencies - Problematic interdependencies
  • Modular Design - How well separated your concerns are

📝 Strategic Recommendations

  • Architectural Improvements - Specific suggestions for better structure
  • Refactoring Opportunities - Areas that would benefit from reorganisation
  • Technology Recommendations - Tools or patterns that could help
  • Scalability Considerations - How well your structure supports growth

Strategic Focus

Unlike file-by-file analysis, this gives you the 30,000-foot view that helps with planning, architecture decisions, and understanding the overall health of your project.

Perfect Use Cases

Here's when this function becomes your architectural compass:

🔍 Inherited Codebase Assessment

New job, new project, or taking over someone else's code? Get oriented quickly with a comprehensive overview that helps you understand what you're working with and where to start.

📋 Architecture Reviews

Preparing for technical reviews or planning major changes? Get objective insights about your project's structure that help inform architectural decisions and refactoring priorities.

🚀 Scaling Preparation

Before your app grows significantly, understand where your current architecture might struggle and what changes would support future growth effectively.

🔄 Refactoring Planning

Thinking about a major refactor? Use this to identify which parts of your codebase would benefit most from attention and plan your refactoring strategy accordingly.

📚 Team Onboarding

Help new team members understand your project's structure and conventions quickly. Use the analysis as documentation for how your code is organised and why.

🎯 Technical Debt Assessment

Get an objective view of where technical debt has accumulated and prioritise which areas need attention to keep your project healthy and maintainable.

Best Practices

Get the most valuable insights from your project structure analysis:

🎯 Choose the Right Depth

Match your analysis depth to your needs:

  • "basic" - Quick overview, good for first impressions
  • "detailed" - Balanced analysis, perfect for most reviews
  • "comprehensive" - Deep strategic insights, ideal for major decisions

🔧 Focus Your Analysis

Use focusAreas to get targeted insights:

  • ["architecture"] - Structural patterns and design principles
  • ["complexity"] - Where complexity lives and why
  • ["dependencies"] - How components relate to each other
  • ["patterns"] - Design patterns and conventions used

📏 Set Appropriate Depth Limits

Configure maxDepth based on your project:

  • maxDepth: 2 - Small projects, simple structures
  • maxDepth: 3 - Most projects, good balance
  • maxDepth: 4-5 - Large enterprise systems with deep nesting

🔄 Combine with Other Functions

Get the complete picture by using complementary analysis:

  • Start with analyze_project_structure for the big picture
  • Use analyze_dependencies for detailed relationship analysis
  • Follow up with analyze_single_file for specific areas of concern
  • Run security_audit for comprehensive security review

Strategic Thinking

Use this analysis to inform decisions, not as absolute rules. Consider your team's expertise, project constraints, and business requirements when acting on recommendations.

Troubleshooting

Common issues and how to resolve them:

Analysis seems shallow or misses key insights

The analysis doesn't capture the architectural complexity you know exists.

  • Increase analysisDepth to "comprehensive"
  • Raise maxDepth to 4 or 5 for deeply nested projects
  • Use specific focusAreas to target your concerns
  • Ensure you're using a sufficiently powerful model (13B+ parameters)
Large projects cause timeouts or poor performance

Analysis takes too long or doesn't complete on very large codebases.

  • Start with maxDepth: 2 and increase gradually
  • Use "basic" analysis depth first, then "detailed" if needed
  • Focus on specific subdirectories rather than the entire project
  • Ensure LM Studio has sufficient memory allocated
Recommendations don't match project reality

Suggestions seem generic or don't understand your specific context.

  • Use more specific focus areas that match your concerns
  • Try "comprehensive" analysis for more nuanced insights
  • Consider your project's constraints and requirements when evaluating suggestions
  • Combine with single-file analysis for specific problem areas
Can't access project directory

Getting permission errors or path not found messages.

  • Use absolute paths: C:/project not ./project
  • Check that the path is within your LLM_MCP_ALLOWED_DIRS
  • Ensure the directory exists and you have read permissions
  • Try analysing a subdirectory if the root is inaccessible
Analysis doesn't recognise framework patterns

Missing React, Vue, Laravel, or other framework-specific insights.

  • Ensure your project structure follows framework conventions
  • Use "comprehensive" analysis depth for better pattern recognition
  • Try focusing on "patterns" analysis type
  • Consider that unconventional structures may not match standard patterns