Member-only story
RepoDoc: Building Better Code Documentation with Knowledge Graphs
Writing documentation feels satisfying until the next pull request makes part of it outdated.
For large, fast-changing repositories, keeping documentation trustworthy can be harder than creating it.
Why Repository Documentation Keeps Falling Behind
Current LLM-powered documentation tools can generate documentation, but producing repository-level docs that are well structured, coherent, affordable, and accurate as the codebase evolves remains difficult.
Three core problems stand out.
- Fragmented Documentation Structure: Most existing tools split code by directory, file, or fixed token limits rather than by functionality and dependency relationships. Under those designs, documentation can become fragmented: individual APIs may be described, while cross-module relationships and an architectural overview are harder to preserve.
- High Generation Costs: In the two representative baselines, RepoAgent injects caller-callee context, while CodeWiki carries source code, submodule documentation, and structural information into higher-level prompts. This context stacking increases token use and runtime, especially as repositories grow.
- Inaccurate Incremental Updates: A small code change can affect far more than the file where it was made. Its impact may spread through function calls, inheritance relationships, interface…










