arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2607.10621cs.SE

WebDesignIter:用于仓库级前端代码生成的协同进化设计知识

WebDesignIter: Co-Evolving Design Knowledge for Repository-Level Front-End Code Generation

Zheng Pei, Mingwei Liu, Zhenxi Chen, Zihao Wang, Yanlin Wang

首次发表
浏览论文内容

中文总结 AI 辅助

研究针对前端开发仓库级代码生成问题,提出WebDesignIter框架,通过持久知识图谱融合设计知识与仓库结构,分两阶段工作,实验证明其相比基线和通用编码代理有优势,凸显设计知识对仓库级代码生成的重要性。

中文摘要 AI 辅助

前端开发在仓库级别不断积累变化,形成复杂的跨文件依赖关系,当前针对单次任务调整的大型语言模型编码代理无法在多个迭代中可靠跟踪,导致功能回归和难以维护的代码。我们认为缺失的是设计知识,如架构原则、模块职责和结构约束等。为此,我们提出WebDesignIter框架,围绕持久知识图谱(WebAppArchKG)构建,融合仓库结构与设计知识并在开发周期中保持同步。WebDesignIter分两个阶段工作:设计知情规划从WebAppArchKG获取历史上下文和架构概述以生成带有相应测试脚本的实施计划,设计感知生成通过基于目标差异的补丁执行该计划,并通过沙盒执行和自动语法修复进行验证。在Web-Bench上,与现有基线相比,WebDesignIter在九个基础模型上平均Pass@2增益9.55个百分点。更重要的是,在每个模型配置上,WebDesignIter均优于通用编码代理Claude Code、OpenHands、SWE-Agent、Codex CLI,Pass@1和Pass@2最高且输入令牌少2530个。消融实验表明设计知识是最有影响力的组件,去除它会使Pass@1下降11.40个百分点,降幅远大于去除代码图检索、基于补丁的生成或沙盒验证,证实设计知识为仓库级代码生成提供了更高效可靠的路径。

英文摘要

Front-end development accumulates change after change at the repository level, weaving complex cross-file dependencies that current LLM coding agents tuned for single-shot tasks cannot reliably track across multiple iterations, leading to functional regressions and code that resists maintenance. We argue the missing piece is design knowledge: architectural principles, module responsibilities, and structural constraints that developers lean on to keep code readable, maintainable, and evolvable as a system scales. To operationalize this, we propose WebDesignIter, a framework built around a persistent knowledge graph (WebAppArchKG) that fuses repository structure with design knowledge and keeps both in sync across development cycles. WebDesignIter works in two stages: design-informed planning pulls historical context and architectural overviews from WebAppArchKG to produce an implementation plan with corresponding test scripts, and design-aware generation executes that plan through targeted diff-based patches, validated by sandbox execution and automatic syntax repair. On Web-Bench, WebDesignIter delivers an average Pass@2 gain of 9.55 percentage points across nine foundation models over existing baselines. More importantly, WebDesignIter outperforms every general-purpose coding agent Claude Code, OpenHands, SWE-Agent, Codex CLI on every model configuration, posting the highest Pass@1 and Pass@2 while consuming 2530 fewer input tokens. Ablation singles out design knowledge as the most impactful component: stripping it drops Pass@1 by 11.40 percentage points, a degradation far larger than removing code-graph retrieval, patch-based generation, or sandbox verification, confirming that design knowledge provides a fundamentally more efficient and reliable path to repository-level code generation.

↑