prprompts-flutter-generator
Version:
AI-powered Flutter development with full automation + official extension support - Generate 32 security-audited guides & auto-implement in 2-3 hours. NEW v5.1: Official Claude Code plugin with hooks, Gemini TOML commands, Qwen MCP settings. Features: Comp
189 lines (143 loc) ⢠6.53 kB
Markdown
---
name: implement-next
description: "[prprompts] Auto-implement next feature from IMPLEMENTATION_PLAN.md (10 min)"
category: Automation
version: 4.0.0
tags: [prprompts, automation, implementation, flutter]
badge: NEW
---
# /implement-next - Auto-Implement Next Feature
⨠**v4.0 Automation** - Automatically implement the next feature from your `IMPLEMENTATION_PLAN.md` in ~10 minutes. Includes data layer, domain logic, BLoC state management, UI screens, and comprehensive tests.
## Usage
```bash
/implement-next
```
## What It Does
1. **Reads Implementation Plan:** Parses `IMPLEMENTATION_PLAN.md` to find next pending feature
2. **Consults PRPROMPTS:** References relevant PRPROMPTS guides (architecture, security, testing)
3. **Generates Code:** Creates all necessary files with Clean Architecture pattern
4. **Writes Tests:** Unit, widget, and integration tests (85%+ coverage)
5. **Validates:** Runs tests, linting, security checks
6. **Updates Plan:** Marks feature as complete in `IMPLEMENTATION_PLAN.md`
## Example Session
```
/implement-next
š Reading IMPLEMENTATION_PLAN.md...
ā Found 7 features, 3 completed, 4 pending
Next Feature: "Appointment Scheduling"
Complexity: HIGH
Dependencies: [Authentication, Patient Profile]
Estimated Time: 45 minutes
š Consulting PRPROMPTS...
ā 02-state_management.md (BLoC patterns)
ā 03-data_layer.md (Repository pattern)
ā 11-testing_strategy.md (Test structure)
ā 14-security_patterns.md (Authorization)
ā 19-offline_sync.md (Offline-first)
š Implementing Appointment Scheduling...
Phase 1: Data Layer (2 min)
ā AppointmentModel (DTO with JSON serialization)
ā Appointment entity (domain model)
ā AppointmentRemoteDataSource (API calls)
ā AppointmentLocalDataSource (Hive storage)
ā AppointmentRepository (offline-first sync)
Phase 2: Domain Layer (1 min)
ā GetAppointments use case
ā BookAppointment use case
ā CancelAppointment use case
ā RescheduleAppointment use case
Phase 3: Presentation Layer (4 min)
ā AppointmentBloc (state management)
ā AppointmentEvent classes (4 events)
ā AppointmentState classes (loading, loaded, error)
ā AppointmentListPage (UI)
ā BookAppointmentPage (form UI)
ā AppointmentDetailsPage (details)
Phase 4: Testing (3 min)
ā Repository unit tests (12 test cases)
ā Use case unit tests (16 test cases)
ā BLoC unit tests (23 test cases)
ā Widget tests for all 3 screens (18 test cases)
ā Integration test flow (book ā view ā cancel)
Phase 5: Validation
ā flutter analyze (0 issues)
ā flutter test (69 tests passed)
ā Security scan (0 vulnerabilities)
ā Coverage: 87.3% (target: 85%)
ā
Implementation Complete! (9 min 23 sec)
Generated:
- 23 Dart files (2,847 lines)
- 12 test files (1,923 lines)
- 69 test cases (87.3% coverage)
Updated IMPLEMENTATION_PLAN.md:
ā Feature #4 marked complete
ā Next: Feature #5 "Secure Messaging"
Commit suggestion:
feat: implement appointment scheduling feature
- Add appointment booking, viewing, canceling
- Offline-first sync with Hive
- 87.3% test coverage (69 tests)
- HIPAA compliant (PHI encryption)
Run /review-and-commit? (y/n)
```
## Output Files
For each feature, generates:
### Data Layer
- `lib/features/{feature}/data/models/{feature}_model.dart`
- `lib/features/{feature}/data/datasources/{feature}_remote_datasource.dart`
- `lib/features/{feature}/data/datasources/{feature}_local_datasource.dart`
- `lib/features/{feature}/data/repositories/{feature}_repository_impl.dart`
### Domain Layer
- `lib/features/{feature}/domain/entities/{feature}.dart`
- `lib/features/{feature}/domain/repositories/{feature}_repository.dart`
- `lib/features/{feature}/domain/usecases/get_{feature}s.dart`
- `lib/features/{feature}/domain/usecases/create_{feature}.dart`
### Presentation Layer
- `lib/features/{feature}/presentation/bloc/{feature}_bloc.dart`
- `lib/features/{feature}/presentation/bloc/{feature}_event.dart`
- `lib/features/{feature}/presentation/bloc/{feature}_state.dart`
- `lib/features/{feature}/presentation/pages/{feature}_list_page.dart`
- `lib/features/{feature}/presentation/pages/{feature}_details_page.dart`
- `lib/features/{feature}/presentation/widgets/{feature}_card.dart`
### Tests
- `test/features/{feature}/data/repositories/{feature}_repository_impl_test.dart`
- `test/features/{feature}/domain/usecases/get_{feature}s_test.dart`
- `test/features/{feature}/presentation/bloc/{feature}_bloc_test.dart`
- `test/features/{feature}/presentation/pages/{feature}_list_page_test.dart`
## Complexity Handling
| Complexity | Estimated Time | Files Generated | Tests Generated |
|------------|---------------|----------------|-----------------|
| LOW | 5-8 min | 12-15 files | 30-40 tests |
| MEDIUM | 8-12 min | 18-25 files | 50-70 tests |
| HIGH | 12-18 min | 25-35 files | 70-100 tests |
| CRITICAL | 18-25 min | 35-50 files | 100-150 tests |
## Automatic Patterns
- **Authentication:** Auto-adds JWT token to requests
- **Authorization:** Role-based access control (RBAC)
- **Encryption:** PHI/PII encrypted at rest (AES-256-GCM)
- **Offline-First:** Hive caching with sync on reconnect
- **Error Handling:** Try-catch with custom exceptions
- **Logging:** Debug, info, error logs with context
- **Validation:** Input validation for forms
- **Accessibility:** Semantic labels, screen reader support
## Requirements
- **Bootstrap:** Must run `/bootstrap-from-prprompts` first
- **IMPLEMENTATION_PLAN.md:** Generated by bootstrap or manual
- **Dependencies:** `flutter pub get` completed
## Next Steps
After implementation:
1. **Review Code:** Check generated files
2. **Run App:** `flutter run` to test manually
3. **Commit:** `/review-and-commit` (validates & commits)
4. **Continue:** `/implement-next` for next feature, or `/full-cycle` for batch
## Related Commands
- `/bootstrap-from-prprompts` - Initial setup
- `/full-cycle` - Auto-implement 1-10 features in batch
- `/review-and-commit` - Validate & commit changes
- `/qa-check` - Comprehensive compliance audit
## Time Savings
**Manual Implementation:** 4-8 hours per feature (with tests)
**Auto-implementation:** 10-15 minutes per feature
**Speedup:** 20-30x faster per feature
---
**Powered by PRPROMPTS v4.0** | **40-60x Faster Development** | [Docs](https://github.com/Kandil7/prprompts-flutter-generator#readme)