docgen
Systematically analyzes code structure to generate code documentation, API docs, and complexity assessment.
Instructions
Generates comprehensive code documentation with systematic analysis of functions, classes, and complexity. Use for documentation generation, code analysis, complexity assessment, and API documentation. Analyzes code structure and patterns to create thorough documentation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| step | Yes | Current work step content and findings from your overall work | |
| findings | Yes | Important findings, evidence and insights discovered in this step | |
| step_number | Yes | Current step number in work sequence (starts at 1) | |
| total_steps | Yes | Estimated total steps needed to complete work | |
| issues_found | No | Issues identified with severity levels during work | |
| document_flow | Yes | Include call flow/dependency notes when True (default). | |
| relevant_files | No | Files identified as relevant to issue/goal (FULL absolute paths to real files/folders - DO NOT SHORTEN) | |
| continuation_id | No | Unique thread continuation ID for multi-turn conversations. Works across different tools. ALWAYS reuse the last continuation_id you were given—this preserves full conversation context, files, and findings so the agent can resume seamlessly. | |
| update_existing | Yes | True (default) to polish inaccurate or outdated docs instead of leaving them untouched. | |
| relevant_context | No | Methods/functions identified as involved in the issue | |
| next_step_required | Yes | Whether another work step is needed. When false, aim to reduce total_steps to match step_number to avoid mismatch. | |
| document_complexity | Yes | Include algorithmic complexity (Big O) analysis when True (default). | |
| use_assistant_model | No | Use assistant model for expert analysis after workflow steps. False skips expert analysis, relies solely on your personal investigation. Defaults to True for comprehensive validation. | |
| num_files_documented | Yes | Count of files finished so far. Increment only when a file is fully documented. | |
| total_files_to_document | Yes | Total files identified in discovery; completion requires matching this count. | |
| comments_on_complex_logic | Yes | True (default) to add inline comments around non-obvious logic. |