Large language models (LLMs) accelerate software development but often exhibit instability, non-determinism, and weak adherence to development discipline in unconstrained workflows. While test-driven development (TDD) provides a structured Red-Green-Refactor process, existing LLM-based approaches typically use tests as auxiliary inputs rather than enforceable process constraints. We present an AI-native TDD framework that operationalizes classical TDD principles as structured prompt-level and workflow-level governance mechanisms. Extracted principles are formalized in a machine-readable manifesto and distributed across planning, generation, repair, and validation stages within a layered architecture that separates model proposal from deterministic engine authority. The system enforces phase ordering, bounded repair loops, validation gates, and atomic mutation control to improve stability and reproducibility. We describe architecture and discuss encoding software engineering discipline directly into prompt orchestration, which we think offers a promising direction for reliable LLM-assisted development.
翻译:大语言模型加速了软件开发,但在非约束型工作流中常表现出不稳定性、非确定性以及对开发规范遵循度弱等问题。尽管测试驱动开发(TDD)提供了结构化的"红-绿-重构"流程,但现有基于大语言模型的方法通常将测试用例视为辅助输入,而非可执行的流程约束。我们提出一种AI原生TDD框架,将经典TDD原则操作化为结构化提示层与工作流层的治理机制。提取的原则被形式化为机器可读的宣言,并分布在分层架构中的规划、生成、修复与验证阶段,该架构将模型提案与确定性引擎权限相分离。系统通过实施阶段顺序控制、有界修复循环、验证门控及原子变更管理,提升了稳定性与可复现性。我们描述了系统架构,并探讨了如何将软件工程规范直接编码至提示编排中,认为这为可靠的大语言模型辅助开发提供了可行方向。