合同编码:通过结构化符号范式实现仓库级生成
Contract-Coding: Towards Repo-Level Generation via Structured Symbolic Paradigm
AI总结:
本文提出合同编码,通过结构化符号范式解决仓库级生成中意图与代码之间的模糊性问题,实现意图驱动的架构合成。
摘要:
向意图驱动的软件工程(常称为“Vibe Coding”)转变暴露了一个关键的上下文保真度权衡问题:模糊的用户意图会淹没线性推理链,导致复杂仓库级生成的架构崩溃。我们提出了合同编码,一种结构化的符号范式,通过自主符号接地将无结构的意图与可执行代码连接起来。通过将模糊意图投影到正式的语言合同中,我们的框架充当单一真实来源(SSOT),强制拓扑独立性,有效地隔离模块间的实现细节,减少拓扑执行深度并解锁架构并行性。实证上,尽管最先进的代理在Greenfield-5基准上表现出不同的幻觉,合同编码在47%的功能成功率的同时保持了接近完美的结构完整性。我们的工作标志着向仓库级自主工程迈出的关键一步:从严格的“规范遵循”转向稳健的意图驱动架构合成。我们的代码可在https://github.com/imliinyi/Contract-Coding上获得。
英文摘要:
The shift toward intent-driven software engineering (often termed "Vibe Coding") exposes a critical Context-Fidelity Trade-off: vague user intents overwhelm linear reasoning chains, leading to architectural collapse in complex repo-level generation. We propose Contract-Coding, a structured symbolic paradigm that bridges unstructured intent and executable code via Autonomous Symbolic Grounding. By projecting ambiguous intents into a formal Language Contract, our framework serves as a Single Source of Truth (SSOT) that enforces topological independence, effectively isolating inter-module implementation details, decreasing topological execution depth and unlocking Architectural Parallelism. Empirically, while state-of-the-art agents suffer from different hallucinations on the Greenfield-5 benchmark, Contract-Coding achieves 47\% functional success while maintaining near-perfect structural integrity. Our work marks a critical step towards repository-scale autonomous engineering: transitioning from strict "specification-following" to robust, intent-driven architecture synthesis. Our code is available at https://github.com/imliinyi/Contract-Coding.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。