DocSync: Agentic Documentation Maintenance via Critic-Guided Reflexion
Sidhesh Badrinarayan, Adithya Parthasarathy

TL;DR
DocSync introduces an agentic, structurally grounded approach to maintain software documentation by combining AST representations, retrieval-augmented generation, and critic-guided refinement, significantly improving semantic accuracy.
Contribution
This work presents a novel, structurally aware, agentic workflow that enhances documentation updates with iterative self-correction, outperforming standard models in semantic fidelity.
Findings
Outperforms encoder-decoder baselines in semantic alignment and faithfulness.
The critic-guided refinement loop improves semantic correctness.
Effective even with resource-constrained models like LoRA-adapted small language models.
Abstract
Software documentation frequently drifts from executable logic as codebases evolve, creating technical debt that degrades maintainability and causes downstream API misuse. While static analysis tools can detect the absence of documentation, they cannot evaluate its semantic consistency. Conversely, standard Large Language Models (LLMs) offer generative flexibility but frequently hallucinate when updating documentation without deep structural awareness of the underlying code. To address this gap, we propose DocSync, an agentic workflow that frames documentation maintenance as a structurally grounded, iterative generation task. DocSync bridges syntactic changes and natural language descriptions by fusing Abstract Syntax Tree (AST) representations and Retrieval-Augmented Generation (RAG) to provide dependency-aware context. Furthermore, to ensure factual consistency, we incorporate a…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
