How redhat-community-ai-tools/code-to-docs works
Code-to-Docs is a GitHub Action that turns PR-comment commands into documentation review suggestions or documentation updates, with an optional Jira/spec-versus-code review mode. The main runtime entry point is src/suggest_docs.py; it coordinates discovery, generation, interactive review, and GitHub operations. The README documents these product capabilities, while the source excerpts and SOURCE INDEX support the internal module links shown here. Some subsystem internals and exact runtime call sequences were not sampled, so those connections are omitted rather than inferred.
Main entry points: suggest_docs.py Command workflow · discovery.py Doc discovery · jira_integration.py Spec-code analysis · security_utils.py Path and secret safety
Components 15
Action workflow
- Command workflow
src/suggest_docs.py - Review comments
src/comments.py
Documentation intelligence
- Doc discovery
src/discovery.py - Semantic doc index
src/doc_index.py - Content generation
src/generation.py
External integrations
- GitHub operations
src/github_ops.py - Spec-code analysis
src/jira_integration.py
Configuration and safety
- Runtime configuration
src/config.py - Path and secret safety
src/security_utils.py - Retry utilities
src/utils.py
Other components
- PR reviewer
- GitHub
- LLM service
- Jira
- Linked spec documents
Connections 28
- PR reviewer → Command workflow: comments command
README.md - Command workflow → Doc discovery: selects docs
src/suggest_docs.py - Doc discovery → Semantic doc index: uses indexes
src/discovery.py - Command workflow → Content generation: requests updates
src/suggest_docs.py - Command workflow → Review comments: posts review
src/suggest_docs.py - PR reviewer → Review comments: curates files
README.md - Command workflow → GitHub operations: publishes docs PR
src/suggest_docs.py - GitHub operations → GitHub: creates PR
src/github_ops.py - Command workflow → Spec-code analysis: enables feature review
src/suggest_docs.py - Spec-code analysis → Jira: fetches ticket
src/jira_integration.py - Spec-code analysis → Linked spec documents: fetches linked specs
README.md - Command workflow → Runtime configuration: loads settings
src/suggest_docs.py - Doc discovery → Runtime configuration: uses settings
src/discovery.py - Content generation → Runtime configuration: uses settings
src/generation.py - Command workflow → Path and secret safety: uses safeguards
src/suggest_docs.py - Doc discovery → Path and secret safety: validates paths
src/discovery.py - Content generation → Path and secret safety: validates files
src/generation.py - GitHub operations → Path and secret safety: runs safe commands
src/github_ops.py - Semantic doc index → Runtime configuration: uses settings
src/doc_index.py - Semantic doc index → Path and secret safety: uses safeguards
src/doc_index.py - Spec-code analysis → Runtime configuration: uses settings
src/jira_integration.py - Spec-code analysis → Path and secret safety: uses safeguards
src/jira_integration.py - Review comments → Runtime configuration: uses settings
src/comments.py - Review comments → Path and secret safety: uses safeguards
src/comments.py - Doc discovery → Retry utilities: uses retry helpers
src/discovery.py - Content generation → LLM service: generates content
README.md - Doc discovery → LLM service: selects relevant docs
README.md - Spec-code analysis → LLM service: analyzes coverage
src/jira_integration.py