Ask HN:您在使用 Spec Driven Development 吗?
2 分•作者: xpn•13 天前
在专业环境中从事大型语言模型(LLM)开发的开发者们,规格驱动开发(Spec Driven Development, SDD)真的是LLM编码代理的未来方向吗?
在过去的几个月里,我一直在努力尝试拥抱SDD。在试用了SpecKit和GSD之后,我最终选择了OpenSpec作为我偏好的规格生成器。
然而,我还没有完全放弃理解LLM生成的实际代码。
为了帮助我保持对生成代码的理解,我尝试了几种不同的方法,例如为更细粒度的功能生成更小的规格,并在每个主要任务块后暂停以审查代码。通过“/ospx-apply 运行直到任务 3.5 完成,然后暂停审查”的方式,我能够审查生成的代码并根据需要进行更正。但说实话,我遇到的主要问题是,即使加载了适当的AGENTS.md和技能,代码风格和良好的代码卫生仍然常常缺失(通常是多个辅助方法、命名不一致等问题)。
我不禁想知道,开发者们在工作场所是如何做的?SDD是否真的被用作开发者工具集的一部分?是我试图对代码进行过多的控制,而应该让LLM在规格的范围内自由发挥来指导它?还是我应该放弃SDD,寻找其他途径来确保生成的代码至少能够长期维护?
查看原文
Developers working with LLMs in a professional environment, is Spec Driven Development really the way forward with LLM coding agents?<p>Over the past few months I've really tried to lean into SDD, after trying SpecKit and GSD, I finally settled on OpenSpec as my preferred spec generator.<p>However I'm not quite ready to give up on understanding the actual code that the LLM is producing.<p>To help with maintaining my comprehension of the generated code, I've tried a few different methods, such as generating smaller specs for more granular features, and pausing after each major task block to review the code. Approaching this via "/ospx-apply Run until task 3.5 is complete and then pause for review" gives me the ability to vet the code being produced and make corrections if needed. But honestly, the major issue that I have is that coding style and good code hygiene is often lacking, even with appropriate AGENTS.md and Skills loaded (the usual issues of multiple helper methods, inconsistent naming).<p>I can't help but wonder what developers are doing in their workplaces. Is SDD actually used as part of the developer toolkit? Am I trying to keep too much control over the code and should I just let the LLM be free within the bounds of a spec to guide it? Or should I abandon SDD and look at another path to ensure that code being produced can at least be maintained long term?