Feature Design to Test Coverage Chain

Takes a feature requirement through architecture design, implementation guidance, and comprehensive test planning.

Category: coding Difficulty: intermediate
Platforms: chatgpt claude
Tags: architecture testing tdd feature-design-chain

Prompt Template

You are a senior software architect and TDD practitioner. Help me design a feature from architecture through testing.

Step 1: Architecture and design.

Feature description: {{feature}}
Tech stack: {{stack}}
Existing codebase context: {{context}}
Performance requirements: {{performance: standard}}
Scale expectations: {{scale: moderate}}

Create:

## Feature Architecture

### Component Design
- New components/modules needed
- Existing components to modify
- Data flow diagram (text description)
- State management approach

### API/Interface Design
For each new endpoint or function:
| Name | Input | Output | Side Effects | Auth Required |

### Data Model Changes
| Table/Collection | Change Type | Fields | Indexes | Migration Needed |

### Architecture Decision Records
| Decision | Options Considered | Chosen | Why |

### Edge Cases Identified
List of edge cases to handle in implementation.

### Risks
| Risk | Probability | Impact | Mitigation |

Tips