arXiv:2608.21208cs.SEAug 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2608.21208

Specification Portability Across LLM Development Agents: Cross-Agent Compatibility in Specification-Driven Software Migration

Oleg Grynets, Oleksii Ilchuk, Dariia Zatulna, Vasyl Lyashkevych

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Oleg Grynets

EPAM Systems

McLean, Virginia, USA

oleg_grynets@epam.com

Oleksii Ilchuk

EPAM Systems

Lviv, Ukraine

oleksii_ilchuk@epam.com

Dariia Zatulna

EPAM Systems

Lviv, Ukraine

dariia_zatulna@epam.com

Vasyl Lyashkevych

EPAM Systems

Lviv, Ukraine

vasyl_lyashkevych@epam.com

Abstract—Large Language Models (LLMs) are increasingly used in specification-driven software development, where specifications become operational artifacts that directly guide implementation agents. This raises an important interoperability question: whether a specification created or structured within one LLM development environment can be reliably consumed by another agent without degrading implementation quality. This paper investigates cross-agent specification portability using Oracle-to-PostgreSQL migration as a controlled software transformation task. The study combines two experimental stages. First, a specification-first migration pipeline was evaluated on 1,006 PL/SQL files, of which 623 were successfully regenerated and 380 generated scripts executed successfully in PostgreSQL 16. Second, cross-agent experiments were conducted on a dataset of 1,802 Oracle scripts with corresponding PostgreSQL implementations using Amazon Kiro, Google Gemini, and GitHub Copilot, with Claude Code and Cursor included in the initial single-agent evaluation. Native and foreign specifications were assessed using Token F1, exact match, SQL syntax validity, AST exact match, AST mean similarity, and immediate runnability. The results show that specification size alone does not predict implementation quality and that cross-agent transfer can produce substantial agent-dependent degradation. The strongest replicated case occurred when Gemini directly consumed a Kiro-origin specification, producing a Token F1 of 0.035, SQL syntax validity of 2.33%, and AST mean similarity of 0.015. Rewrite, compression, and retrieval-augmented specification ingestion were further evaluated as adaptation strategies. Rewriting substantially improved Gemini in the tested configuration, compression did not provide a universal benefit, and retrieval-augmented ingestion was the only common strategy represented on the per-agent Pareto frontiers of both Gemini and Copilot. The findings suggest that specifications in heterogeneous SDD workflows should not automatically be treated as agent-neutral artifacts and motivate explicit consideration of specification portability, agent-specific interpretation, and retrieval-based access in multi-agent software engineering.

Keywords—specification-driven development, specification portability, cross-agent compatibility, large language models, multi-agent software engineering, Oracle-to-PostgreSQL migration, retrieval-augmented generation.

I. INTRODUCTION

Large language models (LLMs) are increasingly integrated into software engineering workflows for code generation, translation, program repair, documentation, testing, and software modernization. This transition is accompanied by a shift from conventional prompt-based assistance toward agentic development, in which an LLM-based agent can interpret a high-level task, decompose it, invoke tools, generate artifacts, and iteratively refine an implementation [1]. Specification-driven development (SDD) extends this transition by making a specification an operational input to the development process rather than only a descriptive document. The idea has historical roots in Agile Specification-Driven Development, where specifications, contracts, and tests were integrated into the development workflow [2]. In contemporary LLM-assisted development, however, specifications may directly guide autonomous code generation and therefore become an intermediate representation between software intent and implementation [3].

This change is particularly relevant to software migration. Database migration between heterogeneous database management systems requires preservation of application semantics while transforming dialect-specific constructs, data types, built-in functions, procedural logic, triggers, exception handling, sequences, packages, and other platform-dependent elements. LLM-supported SQL translation can automate portions of this work, but direct source-to-target generation may introduce semantic drift and reduce transformation traceability [4]. A specification-based Code-Text-Code approach addresses this limitation by introducing an intermediate textual representation that captures behavior, identifiers, computational flow, conditions, dependencies, side effects, and domain intent before target code is generated [5]. In this interpretation, migration becomes a controlled transformation through an intermediate specification rather than direct syntactic translation.

The importance of the intermediate representation is also supported by related work on architecture-level knowledge representation and specification-controlled software generation. A unified architecture metamodel can provide structured context across representation layers [6], while security-oriented SDD research shows that information required for downstream implementation must be made operational and traceable in a specification rather than remaining implicit [7]. Token-optimization experiments in Oracle-to-PostgreSQL migration further demonstrate that reducing context is not equivalent to preserving useful context: aggressive information reduction may increase efficiency while damaging semantic preservation, whereas selective strategies may retain substantially more transformation quality [8]. These findings motivate investigation of not only what information is contained in a specification, but also how that information is represented and consumed.

XXX-X-XXXX-XXXX-X/XX/$XX.00 ©20XX IEEE

The problem becomes more complex in multi-agent software engineering. An implementation workflow may use different agents for requirements processing, specification generation, implementation, testing, migration, or validation. Dynamic orchestration research consequently treats agents as specialized components whose roles and interaction paths may change at runtime [9]. Specification-driven synthesis research similarly treats the specification as a first-class artifact from which generated software artifacts can be produced and regenerated [10]. At the same time, studies of LLM-mediated software development identify security, reliability, and behavioral risks associated with generated code [11], reinforcing the need for controlled intermediate representations and validation. Thus, heterogeneous agent workflows introduce an additional question that is not addressed by merely improving a single model or a single prompt: whether a specification prepared in one agent environment remains operationally effective when transferred to another.

This question is important because current empirical evidence on LLM-based software engineering consistently shows strong sensitivity to context and task structure. A systematic review of LLM applications in software engineering identifies code generation as one of the dominant research areas while also emphasizing unresolved challenges related to reliability, evaluation, context, and practical software-engineering integration [13]. Empirical research on LLM code generation additionally demonstrates substantial nondeterminism: repeated requests can produce structurally and behaviorally different implementations even for the same task, which complicates reproducibility and the interpretation of single-run comparisons [14]. These findings imply that variation observed after transferring a specification cannot automatically be attributed to specification quality alone.

The difficulty grows as the generated artifact becomes larger and more dependent on external context. SWE-bench demonstrated that real-world software engineering tasks require models to coordinate changes across functions, classes, files, execution environments, and long contexts [15]. EvalPlus similarly showed that apparently correct generated programs may fail when subjected to substantially expanded functional testing [16]. At class level, ClassEval found that model performance decreases when generation moves from isolated methods to collections of interdependent program elements [17]. DevEval extends this observation to real repositories, where requirements and implementation depend on repository-level structure and dependencies [18]. These studies collectively indicate that lexical similarity or isolated code-generation success is insufficient for evaluating complex LLM-mediated transformations.

Context availability is another critical factor. CrossCodeEval demonstrates that cross-file code completion becomes substantially more difficult when relevant external context is absent and that providing appropriate context improves completion quality [19]. RepoCoder addresses this problem using iterative retrieval and generation at repository level [20], while Repoformer shows that retrieval itself should be selective because irrelevant retrieved context can reduce robustness and efficiency [21]. These results are directly relevant to specification ingestion: a long specification should not necessarily be interpreted as a single undifferentiated context, and selective access to its relevant portions may constitute an alternative to complete direct ingestion.

The emergence of multi-agent development frameworks makes specification transfer even more consequential. ChatDev distributes software-development activities among communicating agents participating in design, coding, and testing [22]. MetaGPT similarly organizes specialized agents around standardized operating procedures and intermediate artifacts [23]. Such architectures demonstrate that software generation no longer necessarily occurs inside a single agent/model interaction. Instead, artifacts created by one role can become inputs to another. This makes the interoperability of intermediate artifacts—requirements, specifications, designs, tests, and code—a practical multi-agent software-engineering problem.

Requirements representation also influences generated behavior. Test-driven interactive code generation has been proposed as a mechanism for formalizing ambiguous intent before accepting generated implementations [24]. Repository-level code question answering studies further show that retrieval and self-alignment can improve an LLM's access to distributed software context [25]. Retrieval-augmented code generation has also demonstrated benefits for programming languages with limited training resources when appropriate examples or documentation are retrieved [26]. ClarifyGPT, in turn, showed that ambiguous natural-language requirements can lead to divergent implementations and that explicit clarification of the requirement can improve generated-code correctness [27]. Collectively, these studies indicate that generation quality depends not only on model capability but also on the structure, completeness, accessibility, and interpretation of the information provided to the model.

Despite this progress, existing research primarily evaluates model capability, repository context, retrieval mechanisms, requirements clarification, or collaboration among agents. The portability of a complete software specification between heterogeneous LLM development agents remains insufficiently characterized. In particular, it is unclear whether a specification that produces acceptable implementation behavior with the agent for which it was generated will retain this effectiveness when consumed by another implementation agent, and whether adaptation strategies can reduce incompatibility.

The present study investigates this problem using Oracle-to-PostgreSQL migration as a controlled software-transformation task. The experimental study consists of two complementary stages. In the first study, a specification-first Oracle-to-PostgreSQL pipeline was evaluated on 1,006 PL/SQL source files. Of these, 623 files were successfully regenerated, and 380 of the regenerated files subsequently executed successfully in a PostgreSQL 16 environment. The experiment also showed substantial differences among database-object categories, with tables reaching approximately 85% regeneration success while procedural and dependency-sensitive constructs remained more difficult.

The second study extended the experiment to cross-agent specification transfer. A dataset of 1,802 Oracle scripts with corresponding PostgreSQL scripts was used to evaluate specifications and implementations involving Amazon Kiro, Google Gemini, GitHub Copilot, and, during the initial stage, Claude Code and Cursor. The measured dimensions included Token F1, exact match, SQL syntax validity, AST exact match, AST mean similarity, and immediate runnability. Native and foreign specifications were compared, followed by experiments with specification rewriting, summarization/compression, and retrieval-augmented ingestion. The resulting measurements showed that specification length alone did not explain code-generation quality and that the effect of using a specification originating from another agent was strongly agent-dependent. In particular, the substantial degradation observed when Gemini directly consumed a Kiro-origin specification was reproduced in a second run. Retrieval-augmented ingestion did not dominate every individual metric but was the only common ingestion strategy represented on the per-agent Pareto frontiers reported for both Gemini and Copilot.

Based on these observations, this paper addresses the following research questions:

RQ1: How does the origin of a specification affect implementation quality when the specification is transferred between heterogeneous LLM development agents?

RQ2: Are differences in generated-code quality sufficiently explained by specification size, or do specification representation and agent-specific interpretation also affect the result?

RQ3: To what extent can rewriting, compression, or retrieval-augmented ingestion mitigate degradation associated with a foreign specification?

RQ4: Which specification-ingestion strategy provides the most robust trade-off across the evaluated implementation agents?

The contribution of the study is therefore empirical rather than a claim of universal agent incompatibility. The paper (i) combines a specification-driven Oracle-to-PostgreSQL migration pipeline with controlled cross-agent specification-transfer experiments; (ii) evaluates native and foreign specifications using lexical, syntactic, structural, and operational metrics; (iii) compares direct, rewritten, compressed, and retrieval-augmented specification ingestion using only the measured experimental configurations; and (iv) identifies specification portability as an open problem for heterogeneous specification-driven development.

References (27)