Skip to content

[FEATURE] LLM Documentation Generator — Auto-generate and maintain documentation #477

Description

@gelluisaac

Description

Automatically generate and maintain documentation from code, comments, and usage
patterns using LLMs.

Scope

Build documentation automation pipeline.

Files to Touch/Create

  • astroml/llm/docs/__init__.py
  • astroml/llm/docs/generator.py — Doc generation orchestrator
  • astroml/llm/docs/code_analyzer.py — Code analysis
  • astroml/llm/docs/writers.py — Different doc formats (MD, RST, HTML)
  • astroml/llm/docs/updater.py — Documentation updater
  • astroml/llm/docs/validator.py — Doc quality checker
  • tools/doc_generator/ — CLI tool
  • .github/workflows/docs.yml — Auto-update workflow

Documentation Types

  1. API Documentation: From FastAPI endpoints and type hints
  2. Code Documentation: From docstrings and type annotations
  3. Architecture Docs: From code structure and comments
  4. Tutorials: From code examples and notebooks
  5. Changelog: From git commits and PR description
  6. README sections: From project structure

Implementation Details

  • Parse AST for accurate code analysis
  • Extract type hints and signatures
  • Generate examples from test cases
  • Maintain consistency with existing style
  • Link related documentation
  • Detect and flag outdated docs

Acceptance Criteria

  • API docs auto-generated and accurate
  • Doc generation <5min for entire codebase
  • Outdated docs detected automatically
  • Generated examples are runnable
  • Documentation stays in sync with code
  • Supports multiple output formats

Quality Checks

  • Broken link detection
  • Code example validation
  • Completeness scoring
  • Readability metrics

Labels

enhancement, llm, documentation, automation

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions