# Feature Development Prompt

## 📋 Requirements

**Title:** {{TITLE}}

**Description:**
{{DESCRIPTION}}

**User Stories:**
{{USER_STORIES}}

**Acceptance Criteria:**
{{ACCEPTANCE_CRITERIA}}

**Design Specifications:**
{{DESIGN_SPECS}}

**Constraints & Limitations:**
{{CONSTRAINTS}}

---

## 🎯 Your Task

Build this feature systematically following the phases below.

### Phase 1: Design & Planning

Before writing code:

1. **Understand Requirements**
   - What exactly needs to be built?
   - Who will use this?
   - When do they need it?

2. **Plan Architecture**
   - What layers/components are needed?
   - How do they interact?
   - What database changes are needed?
   - What API endpoints are required?

3. **Identify Dependencies**
   - Does this depend on other features?
   - Are there related systems to consider?
   - Any performance implications?

4. **Design Database Schema** (if applicable)
   - New tables or columns?
   - Relationships and indexes?
   - Migration strategy?

5. **Design API Endpoints** (if applicable)
   - What endpoints are needed?
   - Request/response formats?
   - Error handling?

### Phase 2: Implementation

Build the feature following your design:

1. **Backend/Core Logic**
   - Models and migrations
   - Services and business logic
   - API endpoints or methods
   - Error handling

2. **Frontend/UI** (if applicable)
   - Component structure
   - User interactions
   - State management
   - Styling approach

3. **Follow Team Patterns**
   - Use existing conventions
   - Match code style
   - Use approved libraries
   - Follow architectural patterns

### Phase 3: Testing

Ensure quality:

```bash
# Unit tests - test individual components
npm test -- --unit

# Integration tests - test component interactions
npm test -- --integration

# Run full test suite
npm test

# Check code quality
npm run lint

# Check performance (if applicable)
npm run benchmark
```

Test everything:
- ✅ Happy path (normal usage)
- ✅ Edge cases (boundary conditions)
- ✅ Error scenarios (what breaks?)
- ✅ Acceptance criteria (meets requirements?)

### Phase 4: Verification

Verify against requirements:

**Acceptance Criteria Checklist:**
- [ ] {{ACCEPTANCE_CRITERIA_1}}
- [ ] {{ACCEPTANCE_CRITERIA_2}}
- [ ] {{ACCEPTANCE_CRITERIA_3}}

**Code Quality:**
- [ ] Code style compliant
- [ ] No security issues
- [ ] Performance acceptable
- [ ] Tests comprehensive
- [ ] Documentation complete

---

## 📚 Team Framework Rules

{{FRAMEWORK_RULES}}

---

## 📏 Team Rules & Standards

{{TEAM_RULES}}

---

## 🏗️ Implementation Checklist

### Setup Phase
- [ ] Created feature branch
- [ ] Updated .env if needed
- [ ] Database schema designed

### Development Phase
- [ ] Core logic implemented
- [ ] API endpoints working
- [ ] UI components built
- [ ] Integrated together

### Testing Phase
- [ ] Unit tests written
- [ ] Integration tests written
- [ ] All tests passing
- [ ] No linting errors

### Review Phase
- [ ] Meets acceptance criteria
- [ ] Follows team patterns
- [ ] Code quality high
- [ ] Documentation complete
- [ ] Performance acceptable
- [ ] No breaking changes

---

## 💡 Tips

- **Start with design** → Plan before coding
- **Follow patterns** → Use what exists
- **Write tests early** → Verify as you build
- **Test thoroughly** → Don't skip edge cases
- **Document as you go** → Help future maintainers
- **Keep it simple** → Don't over-engineer

---

## 🚀 Success Criteria

- [ ] All acceptance criteria met
- [ ] Full test coverage
- [ ] Code follows team standards
- [ ] No performance issues
- [ ] Ready for production
- [ ] Team can understand and maintain

---

**Build features right: understand requirements, design well, test thoroughly.** ✨

Start development now! 🚀
