CODENS Turns Pull Requests into Living, Queryable Code Documentation
New system builds a typed knowledge graph from PRs for instant QA.
Maintaining up-to-date code documentation remains a challenge in fast-moving repositories, where design knowledge is scattered across source files and pull requests. CODENS, presented by Abdelhak Kelious, Chyrine Tahri, and Eliot Bardet, addresses this by automatically converting pull requests into living, accessible, and queryable documentation. The system incrementally builds a typed software knowledge graph from PR changes, enriching components through schema-driven semantic extraction. It derives typed relations between components and exposes the resulting knowledge via three retrieval modes, including an agent-guided graph traversal for repository-level question answering. CODENS also preserves semantic change history across PRs, allowing developers to track how design decisions evolved over time.
The system integrates both answer-quality and operational evaluation metrics. In a client Ruby on Rails project used in production, CODENS produced highly relevant and well-grounded answers, demonstrating its practical utility. However, qualitative feedback revealed a remaining challenge in concise, documentation-oriented synthesis—suggesting that while the answers are accurate, they can sometimes be verbose. The paper has been accepted at the 26th ACM Symposium on Document Engineering (DocEng 2026), signaling growing interest in AI-assisted documentation. For teams struggling with stale docs, CODENS offers a promising approach to keep documentation synced with actual code changes.
- Builds a typed software knowledge graph incrementally from each pull request, preserving semantic change history.
- Offers three retrieval modes, including agent-guided graph traversal for repository-level question answering.
- Evaluated on a production Ruby on Rails project; answers are highly relevant but sometimes lack concise synthesis.
Why It Matters
Automating documentation from pull requests can save developers hours and keep codebases understandable at scale.