Skip to content

Commit 0ef9266

Browse files
Junghwan RheeJeongho HanHyojin Jung
authored andcommitted
feat: Add TDD code generation workflow as optional path
Add Test-Driven Development (TDD) as a selectable code generation strategy in the Construction phase. Users can now choose between TDD and standard approaches before code generation begins. Changes: - Add tdd-code-generation.md with full TDD workflow (Red-Green-Refactor) - Add TDD selection prompt (Step 0) in core-workflow.md - Add TDD artifact detection in build-and-test.md Validation: - Internal large-scale TTT conducted comparing TDD vs Standard paths. Teams using TDD completed development in significantly less time with more complete results (100% improvement). - Field feedback confirmed that TDD-based AI-DLC runs produced finished outputs in a single pass or with minimal issues. - Stability verified through multiple customer 1-day workshops with consistent, reliable results. Co-authored-by: Jeongho Han <[email protected]> Co-authored-by: Hyojin Jung <[email protected]>
1 parent 879a011 commit 0ef9266

File tree

3 files changed

+593
-6
lines changed

3 files changed

+593
-6
lines changed

aidlc-rules/aws-aidlc-rule-details/construction/build-and-test.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,30 @@
99

1010
---
1111

12+
## Step 0: Detect TDD Artifacts (MANDATORY)
13+
14+
**Check for TDD artifacts** in `aidlc-docs/construction/plans/`:
15+
- Look for `{unit-name}-test-plan.md` files
16+
- Look for `{unit-name}-contracts.md` files
17+
18+
**If TDD artifacts found**:
19+
- TDD was used for code generation
20+
- Unit tests already executed and passed (🟢 status in test-plan.md)
21+
- Load test results from `{unit-name}-test-plan.md`
22+
- Skip re-running unit tests that are already 🟢 Passed
23+
- Focus on integration tests and other test types
24+
25+
**If NO TDD artifacts found**:
26+
- Standard code generation was used
27+
- Proceed with full test execution
28+
29+
---
30+
1231
## Step 1: Analyze Testing Requirements
1332

1433
Analyze the project to determine appropriate testing strategy:
1534
- **Unit tests**: Already generated per unit during code generation
35+
- **If TDD**: Already executed and passed - verify only
1636
- **Integration tests**: Test interactions between units/services
1737
- **Performance tests**: Load, stress, and scalability testing
1838
- **End-to-end tests**: Complete user workflows
@@ -81,6 +101,14 @@ Create `aidlc-docs/construction/build-and-test/unit-test-instructions.md`:
81101

82102
## Run Unit Tests
83103

104+
**If TDD was used** (test-plan.md exists):
105+
- Unit tests already executed during Code Generation
106+
- All tests should be 🟢 Passed in `{unit-name}-test-plan.md`
107+
- Run verification only to confirm tests still pass after any final changes
108+
109+
**If Standard code generation was used**:
110+
- Execute full unit test suite
111+
84112
### 1. Execute All Unit Tests
85113
\`\`\`bash
86114
[Command to run all unit tests]

0 commit comments

Comments
 (0)