Shared Super Library cuts web-app code 9% and shrinks cross-app patches from 936 to 256 lines

Super Library Agent: Joint Generation and Maintenance of Multiple Applications Beyond the Single Codebase

Daegyu Sung, Yukyeong Lee, Geon Park, Yumin Choi, Sung Ju Hwang

EMNLP 2026

cs.SE, cs.AI, cs.CL

2026-08-29

KAIST's Super Library Agent writes related apps while keeping a shared library, cutting WebGen LOC 9% and verbosity 38% and shrinking shared patches from 936 to 256 lines.

What problem this solves

LLM coding agents can now emit a website or reproduce a paper end to end. Real organizations usually keep a portfolio of related apps that share UI primitives, state hooks, and data pipelines. Generating each app in isolation duplicates that logic, so a bug fix has to be copied by hand across near-duplicates. Long agentic sessions also pile up slop: code that still passes tests while growing verbose and structurally messy.

KAIST and DeepAuto.ai name this the Super Library Agent problem. Requests arrive one by one. The agent must implement each new app, keep a shared Super Library of cross-app components, and migrate earlier apps onto the updated library. Single-repo Librarian left multi-repo library construction open; this paper takes that setting.

Method

A minimal scaffold writes the new codebase, then lets one library agent extract shared components and migrate dependents. In practice that SLA-NAIVE agent misses reusable blocks and breaks imports. SLA-FULL splits extraction from migration.

The ideal library holds only components used by at least two apps. App-specific logic stays local.

Results

Three 8-task WebGen-Bench suites and five 4-task PaperBench Code-Dev suites, three trials each. Functionality barely moves. Maintainability does.

MethodWebGen AccLOCVerbosityPaperBench Code-DevPatch size
Zero-Shot76.0493930.16030.4687936
Librarian (K=8)75.7889730.14720.4591522
SLA-NAIVE-Implicit76.9591330.14080.4802632
SLA-FULL77.2185520.09940.4809256

Versus Zero-Shot, SLA-FULL cuts WebGen LOC 9.0%, tokens 6.7%, verbosity 38.0%; PaperBench LOC 5.0%, tokens 7.4%, structural erosion 10.4%. Shared policy patches drop from 936 added lines to 256, with application-side edits falling from 936 to 232. Functionality gaps are not statistically significant.

Librarian wins WebGen MDL by picking the lowest-MDL refactor among K=8 samples, but its erosion rises above Zero-Shot. Naive scaffolds also dump complexity into shared components. SLA-FULL exports 13.3 symbols on average, 4.8 of them reused by 6-8 apps, against 2.0-2.7 for naive variants. The extra symbols are behavioral hooks and page-level patterns, not just Header and Footer. Feeding the mature library to a vanilla agent on eight content-presentation tasks lifts accuracy from 80.95 to 84.35 and still reduces application-local code.

Why it matters

For teams that let agents write a product line, this is a workable structure: extract once, patch once. The 73% smaller maintenance patch is the number closest to real ops value. It is incremental software engineering, not a new generation paradigm. It fits UI kits, training loops, and data pipelines. Off-the-shelf single-task coding benches are not SLA benches; they have to be sliced into related sequences.

Limitations

The authors say this themselves. Existing benches were not built for long-horizon library growth, maintenance is one round, and the apps have no users or commit history, so the patch-size win may not survive production. Size, duplication, and verbosity are proxies, not proof that humans find the code easier to change. A bad library edit propagates to every importer at once. Only DeepSeek-v4-flash was used as the coding backbone.

Terms

Source

Related papers

All paper explainers