# CodePlan: Repository-level Coding using LLMs and Planning

**Authors:** Ramakrishna Bairi, Atharv Sonwane, Aditya Kanade, Vageesh D C, Arun Iyer, Suresh Parthasarathy, Sriram Rajamani, B. Ashok, Shashank Shet  
**arXiv:** [2309.12499](https://arxiv.org/abs/2309.12499)  
**Date:** 2023-09-21  
**Summary page:** https://www.summarizepaper.com/en/arxiv-id/2309.12499v1/

## Key points

- CodePlan is a task-agnostic framework for repository-level coding using Large Language Models (LLMs) and planning
- CodePlan frames repository-level coding as a planning problem by synthesizing a multi-step chain of edits
- It combines incremental dependency analysis, change may-impact analysis, and an adaptive planning algorithm to generate effective plans for complex coding tasks
- Two repository-level tasks were evaluated: package migration in C# and temporal code edits in Python
- Results show that CodePlan outperforms baselines without planning but with similar contextual information
- CodePlan successfully passes validity checks in 5 out of 6 repositories, demonstrating its ability to build without errors and make correct code edits
- Overall, this paper presents CodePlan as an effective approach for automating complex repository-level coding tasks using LLMs and planning techniques.

## Summary

This paper introduces CodePlan, a task-agnostic framework for repository-level coding using Large Language Models (LLMs) and planning. CodePlan frames repository-level coding as a planning problem by synthesizing a multi-step chain of edits. It combines incremental dependency analysis, change may-impact analysis and an adaptive planning algorithm to generate effective plans for complex coding tasks. To evaluate the effectiveness of CodePlan two repository-level tasks are considered: package migration in C# and temporal code edits in Python. The results show that CodePlan outperforms baselines without planning but with similar contextual information. It successfully passes validity checks in 5 out of 6 repositories demonstrating its ability to build without errors and make correct code edits. Overall, this paper presents CodePlan as an effective approach for automating complex repository-level coding tasks using LLMs and planning techniques.
