Generate documentation from code (JSDoc, docstrings, README, API docs)
Generates comprehensive documentation from code including READMEs, API references, and inline docstrings.
/plugin marketplace add Benny9193/devflow/plugin install benny9193-devflow@Benny9193/devflowGenerate comprehensive documentation from source code.
Select what to generate:
# Project Name
Brief description from package.json/setup.py/Cargo.toml
## Installation
[Detect from package manager]
## Quick Start
[Example from tests or main entry point]
## Usage
[Key API examples]
## Configuration
[Environment variables, config files]
## License
[From LICENSE file]
For each public export:
## `functionName(param1, param2)`
Description from existing docstring or inferred from code.
**Parameters:**
- `param1` (type) - Description
- `param2` (type, optional) - Description. Default: `value`
**Returns:** type - Description
**Throws:** ErrorType - When condition
**Example:**
\`\`\`javascript
const result = functionName('value', { option: true });
\`\`\`
# Architecture Overview
## System Components
[Diagram of major modules/services]
## Data Flow
[How data moves through the system]
## Key Decisions
[Why certain patterns were chosen]
## Dependencies
[External services, libraries]
Add JSDoc/docstrings to undocumented code:
// Before
function processOrder(order, options) {
// implementation
}
// After
/**
* Processes an order through the fulfillment pipeline.
*
* @param order - The order to process
* @param options - Processing options
* @param options.priority - Priority level (1-5)
* @param options.notify - Whether to send notifications
* @returns The processed order with tracking info
* @throws {ValidationError} If order is invalid
*/
function processOrder(order: Order, options: ProcessOptions): ProcessedOrder {
// implementation
}
Match existing documentation style:
| Language | Style |
|---|---|
| JavaScript/TypeScript | JSDoc with @param, @returns |
| Python | Google-style or NumPy-style docstrings |
| Rust | /// doc comments with markdown |
| Go | GoDoc format |
| Java | Javadoc |
/docsUpdate or generate YAML documentation for SQL models with proper descriptions and tests