EMNLP 2026 Findings

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

Daegyu Sung1*, Yukyeong Lee1*, Geon Park1, Yumin Choi1, Sung Ju Hwang1,2†

1KAIST  ·  2DeepAuto.ai

*Equal contribution  ·  †Corresponding author

Code Paper (arXiv) BibTeX

Shared logic should not be rebuilt for every application.

Super Library Agent jointly generates related applications and a reusable library, preserving functionality while reducing redundant code and portfolio-wide maintenance effort.

VerbosityRedundant code −38%
Joint codebaseTotal LOC −9%
Patch sizeMaintenance edits 3.7× smaller

One Round of Our SLA-Full

One round of our SLA-Full A new request becomes an application, written against the Super Library as it currently stands, so whatever the library already covers is imported rather than rewritten. What the new application still shares with earlier ones is extracted, the library grows by one symbol, and every application written so far is migrated to import from it. Dashed white blocks mark library imports. Gray regions hold local implementations, with white spaces appearing as code is consolidated and migrated. Super Lib. L UI State Chart Request x₃ 1. CODING reads L 2. CONSOLIDATE 3. EXTRACT 4. MIGRATE CODEBASE BLOCKS Library import Local implementation Code c₁ Code c₂ Code c₃
  1. Requesta new task arrives
  2. Codingc₃ written against L
  3. Consolidaterepetition inside the new app
  4. Extractwhat repeats joins the library
  5. Migrateevery application imports it

Plays on its own. Hover to pause, click a step to inspect it.

Motivation

The Cost of Building Related Applications in Isolation

Organizations maintain application portfolios whose independently deployable applications share domain logic, interface patterns, and operational conventions. Generating each application in isolation duplicates these concerns and forces common updates to be repeated across the portfolio. SLA instead builds the portfolio sequentially while maintaining one reusable library.

Independent generation duplicates shared logic across applications, while the Super Library Agent factors shared logic into one reusable library.
Figure 1. Independent generation compared with sequential portfolio construction using a shared Super Library.

Problem Definition

Super Library Agent Problem

Requests arrive one at a time. At each step, the agent generates the new application, updates the Super Library, and patches earlier applications when they should use the new shared code.

Step t
(ct, C<t, ℒt) = 𝒜(xt, C<t, ℒt−1)

Generate the next codebase and update both the previous portfolio and its shared library.

Shared components
t = { uti=1 𝟙[use(u, ci)] ≥ 2 }

The ideal library contains components used by at least two applications.

Objective
max𝒜 ( Sfunc(CN, X), Smaint(CN, ℒN) )

Seek a favorable Pareto trade-off between application functionality and joint-codebase maintainability.

Notation
X
the sequence of application requests
ct
the application generated at step t
C<t
the applications generated before step t
t
the Super Library after step t
𝒜
the agentic workflow that jointly generates and maintains the portfolio

Method

Super Library Agent

SLA-Full turns shared-library construction into an explicit part of sequential application generation. It separates reuse discovery from dependency migration and gives each agent structured context for deciding what to extract and how to update every affected codebase.

Minimal Scaffold on the left and SLA-Full on the right. SLA-Full uses code summaries, candidate selection, extraction traces, and call-graph context.
Figure 2. Minimal Scaffold (left) and SLA-Full (right). SLA-Full provides structured context for discovering reusable components and migrating their dependencies.

How SLA-Full Addresses the Challenges

Naive scaffold

Low extraction recall

Blocks that do the same thing often look nothing alike, so grouping them by code text or embedding similarity misses them. Reuse that is really there never gets found.

Broken migration

Replacing a local implementation means editing its imports and call sites together. The naive agent swaps the call and leaves the imports, the callers and the dead helper behind.

Ours

Index-based candidate extraction

Code-summary indexes
Blocks are summarized in plain language and matched on what they do, not on how they are written.
Pre-extraction consolidation
Each codebase is cleaned against itself first, so the cross-application step sees clean units, not near-copies.

Context-aware dependency migration

Extraction traces
Extraction records where each symbol came from and how to replace it, so migration does not rediscover it.
Call-graph conditioning
Each edit site arrives with its imports and callers attached, so dependents are updated and the dead copy removed.

Results 01

Initial Portfolio Construction

Experimental setup

We group related benchmark tasks into suites and process each suite sequentially. Every method builds the same WebGen-Bench and PaperBench portfolios, which we compare for functionality and joint-codebase maintainability.

Functionality Maintainability
Method Acc ↑Appr ↑ LOC ↓Tok ↓MDL ↓ Eros ↓Verb ↓
Zero-Shot 76.04 3.84 9393 70364 34875 0.1032 0.1603
Librarian (K=8) 75.78 3.89 8973 68159 33919 0.1352 0.1472
Naive-Implicit 76.95 3.89 9133 69777 35103 0.1567 0.1408
Naive-Ward 76.07 3.90 8786 67774 34675 0.1250 0.1370
SLA-Full 77.21 3.86 8552 65633 34195 0.0987 0.0994
Δ vs Zero-Shot +1.5% +0.5% −9.0% −6.7% −1.9% −4.4% −38.0%
Three 8-application suites, three trials each; maintainability metrics cover all applications plus the shared library. Acc is the WebVoyager UI-test pass rate (partial completions count half) and Appr the VLM appearance grade (0–5). Eros is structural erosion: the share of complexity mass in functions with cyclomatic complexity above 10. Verb is verbosity: the fraction of logical lines covered by duplicated code or rule-flagged redundant patterns. Lower is better for both.

Results 02

Post-Construction Maintenance

Experimental setup

We request one shared update for each completed WebGen-Bench suite. The same edit agent applies it to every method, allowing us to compare preserved functionality and patch size.

Patch size Functionality after the patch
Method Total ↓App ↓Library Original ↑Requested ↑Appr ↑
Zero-Shot936936077.981.93.93
Librarian5225002274.076.93.83
Naive-Implicit6326181476.982.93.82
Naive-Ward3803631877.781.13.95
SLA-Full2562322477.480.03.86
Three WebGen suites, three trials. Original and Requested are post-patch pass rates on the behaviors that already existed and the ones just asked for.

Analysis

Library Reuse and Abstraction Quality

01 · A Real Super Library from an Eight-Application Suite

Extracted by SLA-Full from an eight-application suite. Badges indicate the number of applications importing each symbol.

 

02 · Applications after Dependency Migration

Representative applications after SLA-Full migrates shared dependencies into the Super Library.

03 · Higher-Level Abstractions Extracted by SLA-Full

Highly reused symbols show that SLA-Full extracts task-level abstractions, not only low-level utilities.

Bar chart of highly reused library symbols per method, in three categories: primitive UI components, behavioral hooks and utilities, and page or domain patterns. On primitives the two naive variants and SLA-Full sit close together (3.2 to 3.4) while Librarian is far lower (1.0). On the other two categories SLA-Full is highest by a wide margin.
Highly reused symbols (imported by 4+ of 8 applications) per run, by abstraction level.
Method Primitive UI Behavioral hooks / utils Page / domain patterns
Librarian FooterHeader useLocalStoragesaveToStorage ContactFormLoginForm
Naive-Implicit HeaderFooter useLocalStorageuseFormValidation ContactFormKpiCard
Naive-Ward HeaderCard useLocalStoragecreateAuthContext ContactForm
SLA-Full NavigationBarSection useRouteruseFilteredList FeatureCardGridMessageBanner
Up to two examples per category. The complete export inventory, with per-symbol reuse rates, is in the paper (Appendix I).

Limitations

Citation

Preprint: arXiv:2608.29310. The Anthology entry adds pages and url after publication.

@inproceedings{sla2026,
  title     = {{Super Library Agent}: Joint Generation and Maintenance of Multiple Applications Beyond the Single Codebase},
  author    = {Sung, Daegyu and Lee, Yukyeong and Park, Geon and Choi, Yumin and Hwang, Sung Ju},
  booktitle = {Findings of the Association for Computational Linguistics: EMNLP 2026},
  month     = oct,
  year      = {2026},
  address   = {Budapest, Hungary},
  publisher = {Association for Computational Linguistics}
}