LegacyDoc AI is an AI code documentation generator that runs in VS Code, primarily aimed at legacy projects, AI-generated applications, rapid prototypes, and inherited codebases. Its goal is not to make documentation look pretty, but to make codebases reviewable, handover-ready, and cleanable.
Purpose
When a project lacks documentation, comments, and architectural explanations, every modification can introduce risk. LegacyDoc AI helps developers generate structured documentation and contextual materials for code before cleaning up, auditing, or handing over code. It is suitable for the following scenarios:
- Supplementing documentation for legacy projects that have no JSDoc, no README, and confusing variable naming.
- Generating project context packages for AI coding agents such as Claude Code, Cursor, and Codex, avoiding the need to repeatedly explain project background in every session.
- Generating architectural explanations and module notes before hiring cleanup experts or using AI refactoring, helping assess workload and risk.
- Providing project context packages during onboarding for new developers, replacing vague READMEs and lengthy chat logs.
- When reviewing AI-generated code, first documenting the application's actual routes, components, services, and data flows, then comparing them with the expected workflows.
Main Capabilities
LegacyDoc AI performs generation operations on selected files or folders within VS Code, with output including:
- Inline JSDoc and comments: Automatically inserts JSDoc above functions, explaining parameters, return values, side effects, and intended usage, and adds explanatory inline comments while preserving the existing code style.
- Markdown documentation: Generates standalone .md files containing function signatures, parameter descriptions, usage examples, and module overviews, making it easy to hand over to team members, freelancers, cleanup experts, or AI coding agents.
- Mermaid architecture diagrams: Generates Mermaid diagrams showing module dependencies, class hierarchies, and call flows, which can be rendered directly in the sidebar.
- Project context packages: Generates context files usable by AI coding tools, summarizing project structure, purpose, and key modules, supporting Claude Code, Cursor, Codex, and others.
- Cleanup-ready notes: Identifies areas that need inspection, missing documentation, and module summaries, preparing for cleanup or refactoring.
- Multi-model / bring your own key: Use your own API key to connect to Claude, GPT,Gemini, Grok, or any OpenAI-compatible endpoint, with no API fees from LegacyDoc AI.
How to Use
The workflow for using LegacyDoc AI in VS Code is as follows:
- Install and Configure: Install the extension from the VS Code Marketplace, and add the AI model's API key in the settings.
- Select and Generate: Right-click a file or folder, and choose the content to generate, such as inline JSDoc, Markdown, or both.
- Preview and Apply: Preview the generated documentation in the sidebar, then choose to apply it inline or save it as a Markdown file.
The tool supports JavaScript, TypeScript, and Python out of the box, and the AI can also handle most other languages, with more first-class support in development.
Use Cases
LegacyDoc AI is suitable for the following people and scenarios:
- Developers who need to add documentation for legacy code.
- Indie developers or teams who need to prepare project context for AI coding agents.
- Projects that need to generate audit-ready context packages before cleanup, refactoring, or handover.
- Users who need to evaluate the security of VS Code extensions or install AI coding tools in sensitive repositories.
- Founders who need release-ready reviews for AI-generated applications.
- Developers who want to make rapid prototype code reviewable.
- Teams that need to generate Mermaid diagrams before refactoring to understand module structure.
Limitations
LegacyDoc AI is intentionally conservative; it is an AI code documentation generator, not an autonomous refactoring tool. Specific limitations include:
- It only generates documentation, architecture diagrams, and audit-ready context packages; it will not rewrite, refactor, or modify code logic, will not rename files, and will not push commits without review.
- It does not perform formal security audits and does not guarantee production readiness.
- The generated documentation is a draft and requires human review of assumptions, edge cases, TODOs, and security considerations before it can be used as documentation from a trusted source.
- It is recommended to first run it on a single folder, feature, or module; a focused selection produces clearer documentation, better diagrams, and context packages that are easier to audit.
- Code is sent to the AI model API configured by the user (such as Anthropic, OpenAI), and is not sent to RomantiCode server; users must manage API keys themselves.
Pricing
LegacyDoc AI offers a free version and a Pro version:
- Free version: 5 generations per day, no credit card required, supports inline JSDoc, Markdown, Mermaid, supports Claude / GPT / Gemini / Grok / custom models, and uses your own API key.
- Pro version: one-time payment of $29, no subscription. Includes unlimited generations, custom prompt templates, batch file processing, priority support, and can be activated on up to 3 devices. After purchase, the license key is sent by email; enter it in the VS Code settings to unlock.
Payments are processed by Creem. AI API keys and code do not pass through RomantiCode servers; the extension directly uses the AI provider configured by the user.