Show HN:TDAD - 開源的測試驅動開發工作流程,讓 AI 逐步完善程式碼
TDAD(測試驅動 AI 開發)是一個新推出的開源視覺化工作流程引擎,旨在透過強制執行嚴謹的「規劃 → 規格 → 測試 → 修復」循環,並利用運行時回饋來確保生成功能性軟體,從而提升 AI 程式碼生成的能力。
Navigation Menu
Search code, repositories, users, issues, pull requests...
Provide feedback
We read every piece of feedback, and take your input very seriously.
Saved searches
Use saved searches to filter your results more quickly
To see all available qualifiers, see our documentation.
Visual Test-Driven AI Development for AI Agents
License
zd8899/TDAD
Folders and files
Latest commit
History
Repository files navigation
TDAD: Test-Driven AI Development
TDAD (Test-Driven AI Development) is a visual workflow engine that upgrades your AI from a chaotic code generator into a disciplined engineer.
It enforces a Plan → Spec → Test → Fix cycle where runtime feedback (not just text) guides your AI to deliver working software, not just snippets.
Key Features: Local-first, Zero API calls, Use your own AI (Claude, ChatGPT, Cursor, etc.) and Free.

Quick Links: Installation • Getting Started • Features • Contributing • Community
The Problem with AI Coding (And How We Fix It)
Most AI coding tools fail because they lack runtime feedback and engineering discipline. TDAD fixes the 4 major flaws of AI development:
1. Problem: "Getting Lost in the Chat"
AI chats are linear and forgetful. As you build more features, you lose track of the big picture, what's actually finished, and how it all connects.
2. Problem: The "Lazy Prompt" Effect
Most AI code fails because the prompt was vague. You shouldn't have to write paragraphs of context to get a simple feature.
3. Problem: The "Code Snippet" Trap
You ask for a feature, the AI generates 5 files, and... nothing works. The imports are wrong, and the logic is hallucinated.
4. Problem: The Debugging Loop of Death
When code fails, you paste the error back to the AI. It guesses blindly, often breaking five other things in the process.
Privacy & Control
Installation
Prerequisites
Install from VS Code Marketplace
Manual Installation (Development)
Getting Started
Quick Start (New Project)
Quick Start (Existing Project)
Your First Feature
Features
1. The "Canvas" System (Visual Workflow Board)
Instead of generating code blindly, TDAD provides a visual canvas to plan and track your features.
2. The "Interactive Workflow" (The Core Experience)
TDAD does not call OpenAI/Claude for code generation. Instead, it serves as a Prompt Engineering Platform with a 4-step linear pipeline.

The Bottom Action Bar displays when a feature node is selected, showing a strict TDD workflow:
Step 1: BDD (Always available - the starting point)
Step 2: Tests (Enabled ONLY if BDD exists)
Step 3: Run (Enabled ONLY if Tests exist)
Step 4: Fix (Enabled ONLY if Tests exist)
Key Benefits:
3. The "Project Wizard" (Onboarding & Setup)
We solve the "Blank Page Problem" with two distinct workflows accessible from the Welcome Overlay.

Option A: Start New Project (3-step wizard)
Step 1: Define & Document
Step 2: Scaffold Structure
Step 3: Generate Blueprint
Option B: Map Existing Codebase (Reverse engineer mode)
4. The Dependency System (Reusing Actions)
When Feature B depends on Feature A, avoid duplicating logic. Instead, import and call the action function from the dependency.
5. The "Golden Packet" (Fixing Tests)
When a test fails, TDAD provides the "Golden Packet" to help the AI fix it.
The Golden Packet contains these sections:
SYSTEM RULES: FIX MODE - AI instructions emphasizing:
Scaffolded Files - Paths to read:
Project Context - Tech stack detected from package.json (React, Next.js, Playwright, etc.)
Dependencies - For each upstream feature:
Documentation Context - Optional files linked by user:
Previous Fix Attempts - What was already tried (automated mode only):
TEST RESULTS - The critical debugging data:
Your Task - Clear instructions: Read specs → Use trace → Fix APP → Verify
Checklist - Pre-flight checks before submitting fixes
6. The "Orchestrator" (Test Runner)
TDAD runs the loop.
7. "Auto-Pilot" (Lazy Mode)
Auto-Pilot (aka "Lazy Mode") automates the repetitive loop of BDD → Test → Fix by orchestrating your CLI agents (Claude, Cursor, etc).

Status: Available Now (Free)
How it works:
Note: Auto-Pilot works with your own CLI agents (Claude Code, Aider, etc.). TDAD doesn't accept or store any API keys - you use your preferred agent with your own credentials and security policies.
Technical Architecture
1. Smart Scaffolding (Filesystem)
2. TDAD Fixtures (Centralized Trace Capture)
3. The Prompt Library (The Protocol)
4. The Cortex (Dynamic Context Engine)
The Cortex is the brain that feeds the "Golden Packet".
Contributing
Contributions are welcome! TDAD is open source and community-driven.
How to Contribute
Areas for Contribution
Development Setup
See the Installation section for manual installation steps. After cloning:
License
TDAD is licensed under the MIT License. See the LICENSE file for full details.
Community
Join the discussion:
Support
Commercial Support
For enterprise support, training, or custom integrations, contact us at [email protected]
Built with ❤️ by the TDAD community
About
Visual Test-Driven AI Development for AI Agents
Topics
Resources
License
Uh oh!
There was an error while loading. Please reload this page.
Stars
Watchers
Forks
Releases
Packages
0
Contributors
3
Languages
Footer
Footer navigation
相關文章