DocGen: AI-Powered Documentation Assistant for VS Code
Introduction
HCLSW DocGen is a Visual Studio Code extension designed for automated codebase analysis and documentation generation. It leverages the VS Code API and language models to scan, improve, and generate project documentation directly within the IDE, streamlining the documentation workflow for developers.
Key Features
- Automated Codebase Analysis
- Scans the workspace to summarize architecture and extract documentation from markdown files.
- Documentation Generation
- Generates architecture overviews and project documentation using AI-powered prompts.
- Documentation Improvement
- Enhances existing markdown documentation with suggestions and improvements from language models.
- Chat-Based Commands
- Integrates with VS Code's chat API for interactive documentation commands.
- Concurrent Processing
- Efficiently handles large codebases with batching and concurrency utilities.
- Persistent State Management
- Tracks active requests and stores global state for seamless user experience.
Main Commands & Usage
- ScanDocs: Analyze the workspace and extract documentation.
- ImproveDocs: Enhance existing documentation using AI.
- GenerateDocs: Create new documentation and architecture summaries.
- Chat Participant ("DocGen"): Interact via VS Code's chat for documentation tasks.
Getting Started
Installation Requirements
To use DocGen, you'll need:
- Visual Studio Code (1.107.1 or higher)
- An active internet connection for AI capabilities
- Github Copilot
How to Use DocGen
DocGen integrates seamlessly with VS Code through two easy methods:
1. Using GitHub Copilot Chat
- Open GitHub Copilot chat in VS Code
- Type
@DocGen followed by your request
- Choose from three main commands:
ScanDocs — Analyze your entire workspace to identify source files, summarize architecture, extract key components, and gather existing documentation for further processing
GenerateDocs — Create new documentation such as README.generated.md, Architecture.generated.md, DeploymentAndConfigurations.generated.md, and more
ImproveDocs — Enhance existing documentation by analyzing markdown files, identifying gaps or outdated content, and providing AI-powered suggestions, rewrites, and improvements for clarity, completeness, and consistency
2. Conversational Workflow
- Interact with DocGen naturally through the chat interface
- Ask questions about your documentation needs
- Get real-time suggestions and improvements
Tracking Your Progress
DocGen keeps you informed every step of the way:
- View progress updates in the VS Code output panel
- Receive notifications when tasks complete
- Monitor ongoing documentation generation
Key Benefits
✓ Save Time — Automate tedious documentation tasks
✓ Improve Quality — AI-powered insights ensure comprehensive coverage
✓ Stay Organized — Keep documentation in sync with your code
✓ Work Seamlessly — Never leave your VS Code environment
✓ Scale Effortlessly — Handle large workspaces with batch processing
Security & Privacy
DocGen processes your code and documentation locally within the VS Code environment. When using AI-powered features, code snippets and documentation may be sent to language model services for analysis and generation. No data is stored or shared beyond these interactions.
Frequently Asked Questions
Q: Do I need to know how to code to use DocGen?
A: No. DocGen is user-friendly—simply use the chat interface to interact with the extension.
Q: Can DocGen work with any programming language?
A: Yes. DocGen is language-agnostic and can analyze and document code in any language.
Q: Will DocGen overwrite my existing documentation?
A: DocGen provides suggestions for improving documentation. You can review and apply changes as needed.
Q: How does DocGen handle large projects?
A: DocGen processes files in batches for efficient handling of large workspaces.
Q: Does DocGen require GitHub Copilot?
A: No. DocGen integrates with language models via prompt utilities and does not require GitHub Copilot.
Q: How are commands handled?
A: Commands are registered with the VS Code command system and routed to handlers in the participant services layer.
Support & Feedback
Having issues or suggestions? We'd love to hear from you! Your feedback helps us make DocGen better for everyone.