Lune

ISSTA2026Top-tier venue

From Draft to Precision: Iterative Agentic Framework for Intent-Aware Code Summarization

Yifei Ge, Chunrong Fang, Zhenyu Chen, Juan Zhai

2026Year

Abstract

Code summarization aims to generate natural language (NL) descriptions for code snippets to assist developers in understanding and maintaining programs. Recent advances in large language models (LLMs) have substantially improved the quality of automatic code summarization. In real-world projects, code comments are written to serve different developer intents, which has motivated the development of intent-aware summarization methods. However, existing intent-aware methods still struggle to fully capture developer intent, often producing incomplete or misaligned summaries. Our empirical study reveals that real-world comments are typically refined through multiple rounds of developer revision, which we believe is key to achieving high quality. However, current methods typically overlook this iterative refinement. To bridge this gap, we propose a plan-conditioned revision framework that improves code summarization through iterative revision. It integrates two collaborating agents: a Generator that produces and revises summaries, and a Reviewer that assesses the generated summary and drafts targeted revision plans to guide subsequent edits using available contextual information. By iteratively refining summaries with revision plans and contextual information, our framework yields summaries that are more accurate, complete, and better aligned with developer intent. Extensive experiments on an intent-annotated CSN-Java benchmark demonstrate the effectiveness of our method. On automatic metrics, our method achieves a 28.75% improvement over the state-of-the-art baseline methods across all intents. Besides, in human studies, our framework yields average gains of over 20% in usefulness, adequacy, and intent alignment. It also achieves the highest Top-1 preference (over 40% across all intents), underscoring its practical advantage for developers

Ask about this paper

Ask your agent about it.

Lune has read the top-tier papers around this one, so every answer names the papers it rests on.

Questions to start from

Your agent calls

Lunesearch_papers

Ask in Lune

Free to start. No credit card required.

Related papers

Dusk over the sea between two cliffs drawn in fine vertical lines