arXiv:2604.05278cs.SEcs.AI2026-04被引 5

让编程智能体读懂代码库上下文,减少错误生成。

Spec Kit Agents: Context-Grounded Agentic Workflows

  • 引入阶段级上下文钩子,让每个开发阶段基于真实代码库证据。
  • 提升代码质量评分0.15分(+3%),测试兼容性保持99.7%以上。
  • 适合需要高可靠性代码生成的工程团队和自动化开发场景。

以规范驱动的AI编程开发虽有结构化流程,但智能体在大型动态代码库中常因“上下文盲”导致虚构接口与架构违规。本文提出Spec Kit Agents,一种多智能体规范驱动开发流水线(含产品经理与开发者角色),通过只读探测钩子将每个阶段(定义、规划、任务、实现)锚定在仓库证据上,并用验证钩子检查中间产物是否符合环境。在五个仓库中对32个功能进行128次实验评估,上下文钩子使人工判断质量提升0.15分(1-5分制,+3.0%满分分值;威尔科克斯符号秩检验,p<0.05),同时保持99.7%-100%仓库级测试兼容性。在SWE-bench Lite上的评估显示,增强钩子使基线性能提升1.7%,达到58.2% Pass@1。

原文摘要 · Abstract (English)

Spec-driven development (SDD) with AI coding agents provides a structured workflow, but agents often remain "context blind" in large, evolving repositories, leading to hallucinated APIs and architectural violations. We present Spec Kit Agents, a multi-agent SDD pipeline (with PM and developer roles) that adds phase-level, context-grounding hooks. Read-only probing hooks ground each stage (Specify, Plan, Tasks, Implement) in repository evidence, while validation hooks check intermediate artifacts against the environment. We evaluate 128 runs covering 32 features across five repositories. Context-grounding hooks improve judged quality by +0.15 on a 1-5 composite LLM-as-judge score (+3.0 percent of the full score; Wilcoxon signed-rank, p < 0.05) while maintaining 99.7-100 percent repository-level test compatibility. We further evaluate the framework on SWE-bench Lite, where augmentation hooks improve baseline by 1.7 percent, achieving 58.2 percent Pass@1.

AI编程智能体系统代码生成

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。