How hmoubarak72/self-healing-docs works
DocHeal is a documentation-staleness analyzer and repair tool, exposed as a local CLI and GitHub Action. Its main workflow parses code and Markdown into linked semantic units, classifies changes, finds affected sections, verifies and repairs stale text, then reports results and may open a fix PR. The graph preserves both LLM and deterministic rule engines, plus embedding-based indexing and GitHub delivery. Relationships for unsampled modules are included only where the README or source index supports them; optional provider and vector-store integrations are shown separately.
Main entry points: cli.py CLI and Action · pipeline.py Check orchestration · graph.py Link graph · llm.py LLM and rule engines
Components 19
Entry and settings
- CLI and Action
docheal/cli.py - Runtime settings
docheal/config.py
Code-doc mapping
- Code parser
docheal/code_parser.py - Markdown parser
docheal/doc_parser.py - Link graph
docheal/graph.py - Embedding providers
docheal/embeddings.py - Persisted index
Change analysis
- Semantic diff
docheal/diff.py - Change facts
docheal/facts.py - Shared data models
docheal/models.py - Check orchestration
docheal/pipeline.py
Verification and repair
- LLM and rule engines
docheal/llm.py
Reporting and delivery
- Report renderer
docheal/report.py - GitHub operations
docheal/github_io.py
Other components
- PR author
- LLM providers
- Documentation files
- Repository code
- GitHub PR and checks
Connections 24
- PR author → CLI and Action: starts check
README.md - CLI and Action → Runtime settings: loads settings
docheal/cli.py - CLI and Action → Check orchestration: runs check
README.md - Repository code → Code parser: parsed into chunks
README.md - Documentation files → Markdown parser: parsed into sections
README.md - Code parser → Link graph: supplies code chunks
README.md - Markdown parser → Link graph: supplies doc sections
README.md - Link graph → Embedding providers: builds similarity links
docheal/graph.py - Link graph → Persisted index: persists index
README.md - CLI and Action → Link graph: builds index
docheal/cli.py - Semantic diff → Code parser: parses both versions
docheal/diff.py - CLI and Action → Semantic diff: checks changes
docheal/cli.py - Check orchestration → Semantic diff: classifies changes
docheal/pipeline.py - Check orchestration → Link graph: looks up suspects
docheal/pipeline.py - Check orchestration → Change facts: ranks evidence
docheal/pipeline.py - Check orchestration → LLM and rule engines: verifies and repairs
README.md - LLM and rule engines → Change facts: uses change facts
docheal/llm.py - LLM and rule engines → LLM providers: requests completions
- Check orchestration → Documentation files: writes corrections
README.md - Check orchestration → Report renderer: provides check results
docheal/report.py - CLI and Action → GitHub operations: publishes Action results
docheal/cli.py - GitHub operations → GitHub PR and checks: comments and opens fix PR
README.md - Report renderer → GitHub operations: renders PR content
docheal/github_io.py - CLI and Action → GitHub PR and checks: runs on pull requests
README.md