Transform your entire project into comprehensive, professional documentation that makes onboarding new team members a breeze and keeps everyone aligned on architecture and workflows.
Quick Start
Create complete project documentation in minutes with these ready-to-use prompts:
Generate comprehensive documentation for my project at C:/my-react-app
Create API documentation for my Node.js project with focus on endpoints and architecture
Generate setup and contributing documentation for team onboarding at C:/enterprise-app
Pro Tip
The function intelligently discovers your project structure and generates documentation that matches your actual architecture. No configuration files needed!
What It Does
Imagine having a technical writer who understands code spend a week analysing your project and creating comprehensive documentation. generate_project_documentation
does exactly that in minutes, not days.
This powerhouse function orchestrates comprehensive project documentation by analysing your entire codebase structure, identifying key architectural patterns, extracting metadata, and creating detailed documentation that covers everything from setup to deployment.
It's like having an expert technical writer who:
- Understands your architecture - Maps out how your components interact and data flows
- Speaks developer language - Creates docs that developers actually want to read
- Knows your stack - Tailors documentation to your specific frameworks and tools
- Thinks about users - Creates both technical reference and getting-started guides
- Keeps it current - Documentation that reflects your actual code, not wishful thinking
The result is documentation that serves multiple audiences - from new developers joining your team to stakeholders who need to understand system architecture.
Parameters
Configure the documentation generation to match your exact needs:
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 document (alternative to projectPath) Use when you want focused documentation on one file
|
files |
array | Yes* | - |
Specific files to include in documentation Example:
["src/api.js", "src/auth.js"] |
docStyle |
string | No | "markdown" |
Documentation format: "markdown", "jsdoc", "typedoc", "sphinx" Markdown is perfect for GitHub/GitLab wikis
|
focusAreas |
array | No | ["api", "architecture", "setup"] |
What to emphasise: "api", "architecture", "setup", "contributing" Choose what matters most to your team
|
includeExamples |
boolean | No | true |
Include usage examples and code snippets Makes documentation immediately actionable
|
analysisDepth |
string | No | "detailed" |
Analysis depth: "basic", "detailed", "comprehensive" Comprehensive gives you the full picture
|
maxDepth |
number | No | 3 |
Maximum directory depth for file discovery (1-5) Increase for deeply nested projects
|
*One of projectPath, filePath, or files is required
Real-World Examples
See how to generate documentation for different project types and requirements:
Complete React App Documentation
houtini-lm:generate_project_documentation with:
- projectPath: "C:/my-react-app"
- docStyle: "markdown"
- focusAreas: ["api", "architecture", "setup", "contributing"]
- includeExamples: true
- analysisDepth: "comprehensive"
API-First Documentation
houtini-lm:generate_project_documentation with:
- projectPath: "C:/api-server"
- focusAreas: ["api", "architecture"]
- docStyle: "markdown"
- analysisDepth: "detailed"
- maxDepth: 4
Team Onboarding Focus
houtini-lm:generate_project_documentation with:
- projectPath: "C:/enterprise-app"
- focusAreas: ["setup", "contributing", "architecture"]
- includeExamples: true
- analysisDepth: "comprehensive"
Specific Files Documentation
houtini-lm:generate_project_documentation with:
- files: ["src/api/routes.js", "src/middleware/auth.js", "src/utils/database.js"]
- docStyle: "markdown"
- focusAreas: ["api"]
- includeExamples: true
What You Get Back
Professional-grade documentation that covers every aspect of your project:
📋 Executive Summary
- Project purpose and scope - What it does and why it exists
- Key features overview - Main capabilities and use cases
- Target audience - Who should use this and how
- Technology stack summary - Frameworks, languages, and tools used
🏗️ Architecture Documentation
- System design overview - High-level architecture diagrams and descriptions
- Component relationships - How different parts work together
- Data flow analysis - How information moves through your system
- Design patterns identified - Architectural patterns in use
- Security architecture - Authentication, authorization, and data protection
🔌 API Reference
- Complete endpoint documentation - All routes with methods and parameters
- Request/response examples - Working examples you can copy-paste
- Authentication requirements - How to authenticate API calls
- Error handling guide - Common errors and how to handle them
- Rate limiting and usage - API consumption guidelines
🚀 Setup & Installation Guide
- Prerequisites checklist - Everything needed before starting
- Step-by-step installation - From clone to running
- Environment configuration - ENV files, database setup, API keys
- Development workflow - How to run, test, and debug locally
- Troubleshooting section - Common setup issues and solutions
👥 Developer Onboarding
- Contributing guidelines - How to add features and fix bugs
- Code style guide - Formatting, naming, and structure conventions
- Testing strategy - How to write and run tests
- Git workflow - Branching, commits, and PR process
- Deployment process - How to get code to production
📚 Component Documentation
- Individual module docs - Purpose and usage of each component
- Function signatures - Parameters, return values, examples
- Integration examples - How components work together
- Configuration options - Customisation and extension points
⚙️ Configuration Guide
- Environment setup - Different environments (dev, staging, prod)
- Build processes - How compilation and bundling works
- Deployment instructions - Getting your project live
- Monitoring and logging - How to track performance and issues
Smart Documentation
The documentation automatically adapts to your project type - React apps get component docs, APIs get endpoint references, and libraries get usage examples.
Focus Areas Explained
Tailor your documentation to exactly what your team needs most:
🔌 "api" Focus
Perfect for: Backend services, REST APIs, GraphQL servers, microservices
You get: Comprehensive endpoint documentation, authentication guides, request/response examples, rate limiting, error handling, and integration examples.
🏗️ "architecture" Focus
Perfect for: Complex systems, enterprise applications, team onboarding
You get: System design documentation, component relationships, data flow diagrams, design patterns, security architecture, and scalability considerations.
🚀 "setup" Focus
Perfect for: Open source projects, team collaboration, client handovers
You get: Detailed installation guides, environment configuration, dependency management, development workflows, and troubleshooting sections.
👥 "contributing" Focus
Perfect for: Team projects, open source contributions, code quality standards
You get: Contributing guidelines, code style guides, testing requirements, Git workflows, review processes, and deployment procedures.
Mix and Match
You can combine multiple focus areas! ["api", "setup", "contributing"]
gives you comprehensive documentation that covers technical details, onboarding, and collaboration.
Perfect Use Cases
Here's when this function becomes absolutely invaluable:
🆕 New Team Member Onboarding
Generate comprehensive documentation that gets new developers productive in hours, not weeks. Include setup guides, architecture overviews, and contributing guidelines that answer the questions before they're asked.
📋 Client Project Handover
Create professional documentation that makes client handovers smooth and builds confidence in your work. Include everything from installation to maintenance procedures.
📚 Open Source Project Documentation
Generate the kind of documentation that attracts contributors and makes your project approachable. Perfect README files, API references, and contribution guides.
🔍 Architecture Review Preparation
Create detailed architecture documentation for stakeholder presentations, technical reviews, or compliance audits. Show how your system works and why design decisions were made.
📖 Legacy System Documentation
Finally document that mysterious legacy system everyone's afraid to touch. Generate comprehensive guides that preserve institutional knowledge and make maintenance safer.
🔄 Project Migration Documentation
When moving to new frameworks or architectures, create documentation that explains both the current state and migration path.
🏢 Compliance and Audit Preparation
Generate technical documentation that satisfies audit requirements and demonstrates system security and reliability.
Best Practices
Get the most comprehensive and useful documentation with these proven strategies:
📁 Start with Clean Project Structure
The function works best with well-organised projects. Before generating documentation:
- Clean up temporary files and build artifacts
- Ensure your main files are in logical directories
- Update package.json and README files
- Remove or organise any experimental or dead code
🎯 Choose the Right Focus Areas
- For APIs:
["api", "architecture"]
- Focus on endpoints and system design - For team projects:
["setup", "contributing", "architecture"]
- Onboarding and collaboration - For libraries:
["api", "setup"]
- Usage examples and installation - For complex systems:
["architecture", "api", "setup", "contributing"]
- Everything
📏 Optimise Analysis Depth
- "basic" - Quick overview docs, great for simple projects
- "detailed" - Balanced documentation, perfect for most projects
- "comprehensive" - Deep analysis, ideal for complex systems or critical documentation
🔧 Tune Directory Depth
- maxDepth: 2-3 - Standard projects with typical structure
- maxDepth: 4-5 - Complex projects with deep nesting
- Consider file count - Very large projects might need focused documentation on specific areas
✨ Enhancement Tips
- Include examples - Always set
includeExamples: true
for practical documentation - Choose the right format - Markdown for wikis, JSDoc for code documentation
- Regular updates - Re-generate docs after major changes or releases
- Review and customise - Use generated docs as foundation, then add project-specific details
Performance Note
Large projects might take a few minutes to analyse comprehensively. For very large codebases, consider documenting specific modules separately, then combining the results.
Troubleshooting
Resolve common issues and get the documentation quality you expect:
Documentation seems generic or missing key details
The generated documentation doesn't capture your project's unique aspects or important details.
- Increase
analysisDepth
to "comprehensive" for deeper analysis - Ensure your project has clear structure with descriptive file names
- Add or update README, package.json, and configuration files
- Use specific
focusAreas
relevant to your project type - Consider documenting key modules separately for more detailed coverage
Function takes too long or times out on large projects
Documentation generation is slow or fails on large codebases.
- Start with
analysisDepth: "basic"
to test, then increase if needed - Reduce
maxDepth
to 2-3 for initial runs on deep projects - Use the
files
parameter to document specific important modules first - Clean up build artifacts, node_modules, and temporary files before running
- Ensure your LM Studio model has sufficient memory allocation
Missing framework-specific documentation patterns
Not getting React, Vue, Express, or other framework-specific documentation styles.
- Ensure your project has clear framework indicators (package.json, config files)
- Use descriptive folder names (components, routes, middleware, etc.)
- Include configuration files that indicate your stack
- Use "comprehensive" analysis depth for better framework detection
API documentation is incomplete or unclear
Generated API docs miss endpoints or don't show clear usage examples.
- Include "api" in your
focusAreas
array - Ensure API route files are in standard locations (routes/, api/, controllers/)
- Use clear, RESTful naming conventions in your route files
- Include middleware and validation files in the analysis
- Set
includeExamples: true
for request/response examples
File access errors or permission denied
Cannot access project files or getting permission errors.
- Use absolute paths:
C:/project
not./project
- Verify the project path is within your
LLM_MCP_ALLOWED_DIRS
- Check read permissions on your project directory and files
- Ensure no files are locked by other applications (IDEs, build tools)
- Try using the
files
parameter with specific file paths as a test
Documentation format doesn't match requirements
Generated documentation isn't in the format you need for your platform.
- Use
docStyle: "markdown"
for GitHub/GitLab wikis - Use
docStyle: "jsdoc"
for JavaScript inline documentation - Use
docStyle: "typedoc"
for TypeScript projects - Use
docStyle: "sphinx"
for Python documentation sites - Remember you can always convert between formats using other tools