- Rating
- 5
- Clarity
- 4
- Confidence
- 4
- Originality
- 4
- Quality
- 4
- Significance
- 3
Read review
Summary
This paper proposes MemDocAgent, a long-horizon agentic framework for repository-level code documentation. The key idea is to treat documentation generation as a single cumulative trajectory over the whole repository rather than as independent per-component tasks. The framework combines dependency-aware traversal, which orders documentation units according to both code dependencies and the component/module/repository hierarchy, with memory-guided agentic interaction, where a shared RepoMemory stores retrieved context, generated documents, claims, and verification scores.
Strengths and weaknesses
- Innovative Framing and Problem Identification: The paper accurately points out that treating code components as isolated tasks leads to redundant retrieval and logical inconsistencies, and innovatively reframes this as a long-horizon agentic task with a shared memory state, intuitively and effectively solving this major pain point.
- Novel "Information Sufficiency" Metric: Introducing a quantitative "information sufficiency" metric that measures code regeneration capability via Pass@k and CodeBLEU provides an objective utility evaluation standard that surpasses subjective "LLM-as-a-judge" approaches.
- Comprehensive Evaluation and Ablations: Robust empirical results demonstrate the framework's superior performance across both open-source and closed-source models, and ablation studies successfully verify the indispensability of the three core components: ReAct-style reasoning, RepoMemory, and conflict verification.
- Scope Limitation of Information Sufficiency Evaluation: Although the framework advocates for hierarchical documentation generation, "information sufficiency" is only evaluated on component-level function regeneration, lacking quantitative data to prove how module-level or repository-level documentation functions in broader architectural tasks.
- Hyperparameter Sensitivity: The system relies on strict hardcoded thresholds, such as the number of revisions and verification passing scores, but lacks a sensitivity analysis to show the impact of altering these thresholds on the trade-offs among documentation quality, computational cost, and execution time.
Questions
-
When a component reaches the maximum revision limit (2 revisions) but still fails to meet the 0.90 verification threshold, is the flawed documentation forcibly committed to RepoMemory, or is it discarded entirely? Regardless of the outcome, how does this affect the NLI-based conflict verification process for downstream components that depend on it?
-
Given the framework's reliance on specific hardcoded thresholds (e.g., a maximum of 2 revisions, a maximum of 10 steps per sub-trajectory, and a 0.90 verification passing score), how sensitive is the overall system performance to these hyperparameter choices? Could the authors provide a sensitivity analysis to demonstrate the trade-offs between documentation quality, token cost, and execution time when these thresholds are relaxed or tightened?
Limitations
See weaknesses
Paper formatting concerns
None
Final justification
The author's response has addressed most of my concerns.
Dear Reviewer, kK9H
Thank you for your thorough and insightful review! We greatly appreciate your recognition of our method's contributions. Your constructive critiques and suggestions are valuable and have helped us significantly strengthen the paper. We have carefully considered each of your comments and provide detailed responses below.
Responses to W1 and Q4 : Language and scale generalizability
We thank the reviewer for this valuable question. MemDocAgent satisfies generalizability along three axes, language, size, and domain, which we clarify below with existing results and additional experiments.
1. Language-agnostic: As shown in our anonymous code link, MemDocAgent's dependency parser is built on tree-sitter, which natively supports JavaScript, TypeScript, Java, C++, C, C#, PHP, and Kotlin in addition to Python. The framework can therefore generate comprehensive documentation for repositories written in languages beyond Python.
2. Stability across software size: In Appendix C.2 (Table 24), we already report a scalability analysis showing consistent performance on large repositories, including very large ones such as mingus and ydata-profiling (194+ files, 600+ components). To further demonstrate language-agnosticism and size stability, we collected additional large-scale GitHub repositories in Java and C++ during the rebuttal period and report the results below.
[Table: Performance on other language, large-scaled repositories (backbone: Qwen3-Coder)]
These repositories are 2~4× larger in file count and 6–14× larger in component count than the largest repository used in our paper. In such large-scale settings, per-document time increases slightly due to reading dependency-related documents at the module and repository levels, yet MemDocAgent remains more efficient than the SOTA baseline DocAgent in both quality and time cost.
3. Domain generalizability: As shown in Appendix B.4 (Table 20), the 20 repositories in our evaluation span 10 distinct domains (Communication, Internet, Utilities, etc.), differing substantially in code style and repository structure. Tables 21, 22, and 23 show that MemDocAgent performs consistently well across all of these domains.
In conclusion, MemDocAgent satisfies language, size, and domain generalizability. We will explain this more clearly in the revised version.
Responses to W2 : Regarding important details in appendix
We appreciate this suggestion. Due to the page limit, several important details were placed in the appendix. In the revised version, we will move the following into the main text:
Response to W3: Fairness of Experimental Comparisons
We thank the reviewer for this comment. We would like to clarify how our comparison is designed.
Therefore, any observed performance difference stems solely from the pipeline design, and is not driven by confounds in the model or evaluation setup.
Response to Q1: Dependency Graph Construction and Ordering
Thank you for this question. We clarify the three parts (construction, ordering, and cycles) below.
We acknowledge that compressing this into algorithms makes it harder to follow, and we will describe this step-by-step procedure more explicitly in the main text of the revised version.
Response to Q3: Stronger Generator and Human-Docstring Baseline
[Table: Information sufficiency with Claude Sonnet as the generator (backbone: Qwen3-Coder)]
Response to Q5: Analysis of Verification-Failure Cases
We thank the reviewer for this important question. We manually inspected 29 cases that never passed verification. As a result, None of them contain critical factual errors that could mislead a user. The 29 cases mostly fall into two mechanisms.
Case 1 : Unresolved cross-component NLI conflict (18/29)
The document is factually correct, but a phrasing mismatch with a neighboring component's document keeps the cross-NLI conflict score high enough to block the final score.
Case 2 — Self-consistency score plateaus just below threshold (11/29)
The document is correct, but the self-evaluation score creeps up without quite reaching 0.90 before the revision budget is exhausted.
Across all 29 cases, no failure stems from a misleading factual error. The common cause is that the strict 0.90 threshold rejects documents whose cross-NLI penalty or helpfulness sub-score falls marginally short. This is also why such documents are never used as trusted references for downstream verification (Appendix A.3, Step 1), so they cannot propagate errors even when committed for coverage. We will add this failure-case analysis to the revised version with clear explanations.
References
[1] DocAgent: An Agentic Framework for Multi-Modal Long-Context Document Understanding (Sun et al., EMNLP 2025)
[2] Repoagent: An llm-powered open-source framework for repository-level code documentation generation. (Luo, Qinyu, et al., EMNLP 2024)
Our final comments :
We have conducted and presented all additional experiments and analyses about all weaknesses and reviewer’s questions. We believe that most of the raised concerns have been adequately addressed. If there are still concerns that need to be addressed, please let us know, and we would be glad to provide further clarification or additional analysis.