cs.SEApr 10, 2026

Contract-Coding: Towards Repo-Level Generation via Structured Symbolic Paradigm

Authors: Yi Lin, Lujin Zhao, Yijie Shi

Organizations: State Key Laboratory of Networking and Switching Technology, Beijing University of Posts and Telecommunications, Beijing, 100876, China

Abstract

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.

Figures & tables

Appendix figures & tables10 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Repo0: Design-Driven Zero-to-All Code Generation

    Aug 20, 2026Silin Chen, Haoyi Teng, Xiaodong Gu +5Code GenerationAgentic Code Generation

  2. CodeTeam: An LLM-Powered Multi-Agent Framework for Repository-Level Code Generation

    Jun 20, 2026Yifei Wang, Ruiyin Li, Peng Liang +4Repository-Level Code GenerationMulti-Agent Coding

  3. ReproAgent: Contract-Guided Paper-to-Code Reproduction

    Aug 25, 2026Xue Hu, Zewei Pan, Zhongyuan Wang +3Scientific Code GenerationAgentic Code Generation