Super Library Agent:超越单一代码库的多应用联合生成与维护
Super Library Agent: Joint Generation and Maintenance of Multiple Applications Beyond the Single Codebase
August 29, 2026
作者: Daegyu Sung, Yukyeong Lee, Geon Park, Yumin Choi, Sung Ju Hwang
cs.AI
摘要
组织通常开发和维护相关应用程序的组合:这些程序是独立可部署的代码库,但共享大量领域逻辑、接口模式或操作惯例。随着大语言模型编码智能体日益广泛地用于生成和维护这类软件,一种朴素的逐应用程序工作流会在各代码库之间重复共享逻辑,并使长期的智能体式维护积累冗余、死代码和结构退化。我们提出了“超级库智能体问题”(Super Library Agent problem):智能体在依次生成N个相关应用程序组合的同时,维护一个可复用的跨应用组件共享超级库(Super Library)。最小化顺序脚手架原则上可以提取共享代码并将应用程序迁移到不断演化的库中,但在实践中存在提取召回率低和依赖迁移脆弱的问题。我们通过基于代码块摘要的候选引导提取、提取前的代码库整合,以及利用提取轨迹和调用图信息的上下文感知迁移来解决这些不足。在WebGen-Bench和PaperBench上,我们的方法在保持应用程序功能的同时,显著降低冗余和令牌占用(冗长度、令牌长度),优于零样本方法;同时避免了朴素库构建引入的结构退化,并在代码行数(LOC)和最小描述长度(MDL)上也得到进一步缩减。我们的代码可在 https://github.com/sbigstar0310/super-library-agent 获取。
English
Organizations often develop and maintain portfolios of related applications: independently deployable codebases that share substantial domain logic, interface patterns, or operational conventions. As LLM coding agents are increasingly used to generate and maintain such software, a naive application-by-application workflow duplicates shared logic across codebases and allows prolonged agentic maintenance to accumulate verbosity, dead code, and structural erosion. We introduce the Super Library Agent problem, where an agent sequentially generates a portfolio of N related applications while maintaining a shared Super Library of reusable cross-application components. A minimal sequential scaffold can in principle extract shared code and migrate applications to the evolving library, but in practice suffers from low extraction recall and fragile dependency migration. We address these failures with candidate-guided extraction over code chunk summaries, pre-extraction codebase consolidation, and context-aware migration using extraction traces and call-graph information. Across WebGen-Bench and PaperBench, our method preserves application functionality while significantly reducing redundancy and token footprint (verbosity, token length) over zero-shot, and avoiding the structural erosion introduced by naive library construction, with additional reductions in LOC and MDL. Our code is available at https://github.com/sbigstar0310/super-library-agent.