mlsanityData to 7 Oct 2026

DocSync: Agentic Documentation Maintenance via Critic-Guided Reflexion

arXiv 2605.02163 ↗First posted 4 May 2026cs.SE cs.AIcited by 0

On the map: LLM agents and tool use → Software engineering coding agents

Abstract (arXiv)

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 critic-guided refinement loop based on the Reflexion paradigm, allowing the model to self-correct candidate updates against the source code. We empirically evaluate a resource-constrained implementation of DocSync-using a LoRA-adapted small language model - on a proxy code-to-text maintenance task. Our findings demonstrate that this AST-aware agentic approach substantially outperforms standard encoder-decoder baselines across semantic alignment, summary-line faithfulness, and automated judge preferences (e.g., achieving an automated judge score of 3.44/5.0 compared to 1.91 for CodeT5-base). Crucially, the iterative critic loop yields measurable improvements in semantic correctness without requiring scaled-up parameter counts. These results provide strong evidence that coupling structural retrieval with agentic refinement is a highly promising direction for autonomously mitigating documentation debt.

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 12 of its 17 references that are in the map. First posted on arXiv 4 May 2026.

Builds on

12 of 17 references.

Closest ancestors · 1

Same direction, newest first

  1. 2026SWE-Replay: Efficient Test-Time Scaling for Software Engineering Agents29 Jan

Other references · 11

  1. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
  2. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
  3. 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,393
  4. 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
  5. 2019BERTScore: Evaluating Text Generation with BERTcited by 5,462
  6. 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,064
  7. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
  8. 2024Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phonecited by 1,883
  9. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
  10. 2023StarCoder: may the source be with you!cited by 790
  11. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2026Remember Your Trace: Memory-Guided Long-Horizon Agentic Framework for Consistent and Hierarchical Repository-Level Code Documentation
  2. 2026Compact Documentation for Coding Agents: A Benchmark, an Optimizer, and Why It Does Not Transfer
  3. 2025DocAgent: A Multi-Agent System for Automated Code Documentation Generation
  4. 2026DOCSCHISEL: Adaptive Tool Documentation Optimization Framework for LLM Agents
  5. 2026A Jagged Frontier: Evaluating Robustness of Code Agents to Semantics-Preserving Transformations
  6. 2026Needle in the Repo: A Benchmark for Maintainability in AI-Generated Repository Edits
  7. 2026Context-as-AI-Service: Surfacing Cross-File Dependency Chains for LLM-Generated Developer Documentation
  8. 2026AI-Generated Smells: An Analysis of Code and Architecture in LLM and Agent-Driven Development