Organizations often maintain portfolios of related applications that share substantial domain logic and interface patterns. As LLM coding agents become more prevalent, a naive application-by-application approach leads to duplicated code and structural erosion over time. Researchers from Hugging Face introduce the Super Library Agent (SLA) problem, where an agent sequentially generates N related applications while maintaining a shared library of reusable components.
The proposed framework addresses key failures of naive scaffolding: low extraction recall and fragile dependency migration. SLA uses candidate-guided extraction over code chunk summaries, pre-extraction codebase consolidation, and context-aware migration using extraction traces and call-graph information. This ensures that shared code is accurately identified and migrated without breaking application functionality.
In evaluations on WebGen-Bench and PaperBench, SLA significantly reduces redundancy and token footprint compared to zero-shot generation. Specifically, on WebGen-Bench, it achieves 38% less redundant code, 9% fewer lines, and 3.7x smaller patches when new requirements are introduced, all while maintaining accuracy. PaperBench shows similar trends with smaller margins.
The authors also discuss version-skew scenarios, where one app is pinned to an old API while another needs a breaking change. They acknowledge that their current framework does not handle selective API deprecation, leaving room for future work. The code and project page are publicly available.