CodeS : Natural Language to Code Repository via Multi-Layer Sketch
Daoguang Zan, Ailun Yu, Wei Liu, Dong Chen, Bo Shen, Yafen Yao et al. · 2026 · 51 citationsRead the paper
All 14 authors
Wei Li, X. Chen, Yongshun Gong, Bei Guan, Zhiguang Yang, Yongji Wang, Lizhen Cui, Qianxiang Wang
The impressive performance of Large Language Models (LLMs) on code-related tasks has shown the potential of fully automated software development. In light of this, we introduce a new software engineering task, namely Natural Language to Code Repository (NL2Repo). This task aims to generate an entire code repository from its natural language requirements. To address this task, we propose a simple yet effective framework CodeS , which decomposes NL2Repo into multiple sub-tasks by a multi-layer sketch. Specifically, CodeS includes three modules: RepoSketcher, FileSketcher, and SketchFiller. RepoSketcher first generates a repository’s directory structure for given requirements; FileSketcher then generates a file sketch for each file in the generated structure; SketchFiller finally fills in the details for each function in the generated file sketch. To rigorously assess CodeS on the NL2Repo task, we carry out evaluations through both automated benchmarking and manual feedback analysis. For benchmark-based evaluation, we craft a repository-oriented benchmark, SketchEval, and design an evaluation metric, SketchBLEU. For feedback-based evaluation, we develop a VSCode plugin for CodeS and engage 30 participants in conducting empirical studies. Extensive experiments prove the effectiveness and practicality of CodeS on the NL2Repo task.
What the full text shows
Working prototype- CodeS (CodeLlama 34B, SFT) achieved the highest overall SketchBLEU score on the SketchEval benchmark. — 64.98% (Supervised Fine-Tuning (SFT) on SketchEval benchmark)
- SFT consistently improves performance over Prompt Engineering (PE) across various base models. — 13.15% average improvement in SketchBLEU (Across different base model sizes)
- CodeS supports significantly larger repository generation than ChatDev. — Up to 25 files and 7,334 lines vs. max 8 files and 842 lines for ChatDev (Repository generation from NL requirements)
- SFT effectiveness for CodeLlama models requires a minimum dataset size to outperform PE. — Threshold of 60 repositories (Fine-tuning on CodeLlama series models)
- RepoSketcher fine-tuned on Python generalizes to other languages. — Python-tuned RepoSketcher achieved 71.57% BLEU for Go and 57.36% for Java (Evaluation on Java, C++, and Go projects)
- Setup
- Evaluated using CodeLlama (7B, 13B, 34B), StarCoder2, and DeepSeekCoder models; benchmark consists of 19 repositories; user study involved 30 participants.
- How
- The authors proposed CodeS, a framework that decomposes repository generation into three stages: RepoSketcher (directory structure), FileSketcher (file-level sketches), and SketchFiller (function implementation). They evaluated the system using a new benchmark (SketchEval), a metric (SketchBLEU), and a VSCode plugin for user studies.
- Limitations
- SFT results in performance decline if the training dataset is too small (below 60 repositories) due to overfitting. · Performance plateaus when the number of training repositories reaches or exceeds 80.
Summarized by Gemma 4 from the open-access full text · 24 Nov 2026. Read it