Source-linked AI summary

From Ripple to Boundary: Deterministic Impact Boundaries for LLM-Based Software Evolution

Jiameng Bai, Zhitao Wang, Long Wang, Keyue Qian, Sai Wu

arXiv:2610.36549v1cs.SE

TL;DR

When design assets change, LLM agents lack a deterministic way to identify which code must evolve, risking missed or unrelated changes. The paper derives causal impact boundaries from a Merkle DAG and uses them to scope code updates. Early evaluation reports captured causal chains and expected multi-file changes without unintended modifications.

  • Problem

    LLM agents lack a deterministic impact boundary for changes across interconnected design assets, leaving the exact code to evolve unclear.

    Source: §I · p. 1, §II · p. 2
  • Method

    The approach models design dependencies as a Merkle DAG, computes a causal boundary by diffing snapshots, and injects scoped context into the agent.

    Source: §I · p. 1, §III · p. 3, §3.4 · p. 4
  • Results

    The Diff engine captured 100% of multi-hop causal chains, while code evolution on 10+ real-world sequence diagrams achieved expected changes with zero unintended modifications.

    Source: §IV · p. 4
  • Takeaways & Limitations

    The authors conclude that preliminary industrial deployment confirms the feasibility of deterministic, scoped code modifications using Merkle-DAG impact boundaries.

    Source: §VI · p. 5

    The evaluation remains qualitative; large-scale quantitative evaluation and generalization remain future work.

    Source: §IV · p. 4, §VI · p. 5

Abstract

from arXiv · show

The landscape of software evolution is undergoing a fundamental paradigm shift in the era of Large Language Models. As industrial software engineering increasingly transitions toward design-driven code generation, the bottleneck of evolution has shifted from writing code to maintaining deterministic consistency between multi-source design assets and the generated code. When a design asset changes, LLM agents currently lack a deterministic impact boundary to identify which code must be evolved, leading to two failure modes: hallucinating missing changes or breaking unrelated code. Probabilistic approaches, such as semantic retrieval or text-based diffing, fail to capture the structural ripple effects across highly interconnected design dependencies. We propose a paradigm shift from probabilistic semantic retrieval to deterministic structural constraints. We formalize the design assets as a Knowledge Graph and organize them into a content-addressed Merkle Directed Acyclic Graph. Our key insight reveals a topological isomorphism between the logical ripple effect of a design change and the content hash propagation within the DAG. By leveraging this, we transform ambiguous impact analysis into verifiable structural operations. Through a two-phase diffing process, we extract a precise causal chain that defines the exact modification boundary. This boundary enables deterministic context injection, providing the LLM agent with strictly scoped code and design updates, thereby fundamentally guaranteeing evolution safety. As a by-product, the KG serves as an agent-queryable knowledge base for natural language design retrieval. Early deployment on a large-scale industrial payment platform demonstrates that our mechanism successfully computes the exact impact boundary and generates incremental code modifications that meet the expected design changes.

I. INTRODUCTION

Design-driven software evolution depends on keeping code consistent with interconnected design assets, but LLM agents lack a deterministic boundary for changes. The paper uses graph structure to compute impact and scope code updates.

I. INTRODUCTION

  • Without a deterministic impact boundary, LLM agents can miss required code changes or alter unrelated shared code when design assets change.Text diffs lose logical dependencies, while semantic retrieval remains probabilistic.Source: §I · p. 1
  • The approach models interconnected design assets as a Knowledge Graph organized into a Merkle DAG, where changes propagate through ancestor hashes.Comparing old and new snapshot hashes prunes unchanged subtrees and drills into modified ones to produce a causal impact chain.Source: §I · p. 1
  • The computed causal chain scopes context injection to affected design assets and existing code, restricting incremental evolution to impacted regions.The agent receives a packaged specification rather than searching for context.Source: §I · p. 2
  • The Knowledge Graph also supports natural-language, multi-step queries about design dependencies for designers.The paper describes the KG as an agent-queryable knowledge base that can answer questions such as which sequences invoke an interface.Source: §I · p. 2
  • Early deployment on an industrial payment microservice platform reports precisely scoped, safe code changes following real-world flow modifications.The authors characterize this as early evidence.Source: §I · p. 2

II. THE DESIGN RIPPLE IN SOFTWARE EVOLUTION

Industrial design assets form a densely connected network, so a local edit can affect multiple flows and their generated code. The section frames the challenge as mechanically finding the exact boundary of those effects.

II. THE DESIGN RIPPLE IN SOFTWARE EVOLUTION

  • The design Knowledge Graph connects class diagrams, sequence diagrams, and behavior, logic, and infrastructure assets in a cross-referenced DAG.Messages invoke interfaces, and shared rules or infrastructure can be referenced across flows.Source: §II · p. 2
  • Adding a field to a Request DataType can invalidate its interface hash and propagate through bound Messages to entire Sequence Diagrams.The example affects multiple flows, including Sequence Diagrams B and C.Source: §II · p. 2
  • Each affected Sequence Diagram maps to generated code that must be evolved, including callers that need to handle the new Request field.An imprecise boundary risks missed callers and compile or runtime errors, or incorrect changes to unrelated flows.Source: §II · pp. 2–3

III. APPROACH

The approach represents design dependencies as a Merkle DAG, finds causal changes with a two-phase diff, and injects scoped task context for code evolution. The same Knowledge Graph also supports interactive design queries.

III. APPROACH

  • Each Knowledge Graph node’s structural hash combines its label, scalar properties, and child hashes, so changes propagate to ancestor hashes.Shallow serialization stores child hash pointers; unchanged subtrees can be reused and stored once.Source: §III · p. 3
  • The two-phase diff first classifies added, deleted, and modified assets, then drills into changed nodes to record property changes and structural additions or deletions.Matching unchanged hashes allow entire subtrees to be pruned; recursion yields a causal diff tree.Source: §III · p. 3
  • For each affected task, the context injector packages incremental-development constraints, the causal diff rationale, and local code alongside newly fetched design assets.This task specification is derived from the computed causal boundary.Source: §III · p. 3

3.4 Constrained LLM Code Evolution. The LLM agent

  • The agent uses the injected blueprint to modify relevant code blocks, while the rigid boundary aims to prevent unintended edits across dependent files.A shared DecisionTable may require incremental modifications in multiple code files.Source: §3.4 · p. 4
  • A schema-aware agent also lets designers ask natural-language questions and retrieve exact evidence paths through multi-step KG queries.The described toolset includes schema exploration, intent analysis, parameterized template queries, and Cypher generation.Source: §3.4 · p. 4

IV. FUTURE PLANS

Early industrial results report bounded, expected code changes across real-world sequence diagrams, while large-scale quantitative evaluation remains future work. Planned work covers benchmark construction, quantitative evaluation, and generalization to other structured artifacts.

C. Generalizing to Other Artifacts

  • The evaluation remains qualitative, and planned generalization targets database schema evolution and Infrastructure-as-Code alongside broader software evolution applications.The proposed applications include cascading database-schema changes to SQL views and blast-radius computation in microservice topologies.Source: §IV · p. 4

Early Results from Industrial Deployment

  • 10+ real-world sequence diagrams received expected multi-file changes with zero unintended modifications; KG Q&A returned accurate evidence paths.The diff engine captured 100% of multi-hop causal chains across three mutation operations.Source: §IV · p. 4

A. Comprehensive Benchmark

  • A planned benchmark will use stratified sampling across KG node types, atomic and combined mutations, and traced cascades to derive evaluation ground truth.Atomic mutations affect isolated nodes; combined mutations change multi-node linkages.Source: §IV · p. 4

B. Quantitative Evaluation

  • The planned quantitative evaluation will compare against agentic RAG and full-context prompting using boundary precision and recall, compilation pass rate, and unintended breaking changes.Source: §IV · p. 4

V. RELATED WORK

Prior work addresses agent context acquisition, structural change handling, and multi-file consistency, but the paper distinguishes its approach by computing a deterministic design-to-code impact boundary. Related approaches include probabilistic dependency discovery, architecture-document routing, initial synthesis, and agent benchmarks.

V. RELATED WORK

  • Existing agentic frameworks use iterative planning or graph retrieval to discover dependencies probabilistically, while Aegis routes target code files to relevant architecture documents.The paper distinguishes its Merkle DAG as propagating design changes to compute exact code files for modification and injects that boundary as a hard constraint.Source: §V · p. 4
  • Requirement diffing, traceability-guided generation, and knowledge-graph-augmented evolution address structural changes, but the paper says none computes a deterministic impact boundary.Source: §V · p. 4
  • Sequence-diagram-based data dependency generation targets initial code synthesis, while agent benchmarks and frameworks identify persistent multi-file consistency difficulty without a structural contract.Source: §V · p. 5

VI. CONCLUSION

The conclusion presents Merkle-DAG impact-boundary computation and boundary injection as a deterministic structural constraint approach, with preliminary industrial deployment indicating feasibility.

VI. CONCLUSION

  • Preliminary industrial deployment confirms feasibility of computing causal impact boundaries via a Merkle DAG and injecting them into agents for safe, scoped code modifications.The conclusion identifies quantitative evaluation and generalization as future work.Source: §VI · p. 5
Loading 2610.36549v1…