Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

flutter-pro-max-cli

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flutter-pro-max-cli - npm Package Compare versions

Comparing version
2.4.1
to
2.4.2
+75
assets/templates/b...ules/19_architecture_decision_matrix.md
---
description: Ma tran quyet dinh kien truc cho Greenfield va Brownfield
globs: lib/**/*.dart, test/**/*.dart
---
# Rule: Architecture Decision Matrix
> Kich hoat: Khi bat dau task moi, them feature, sua bug, hoac refactor
## Muc tieu
- Mac dinh su dung Clean Architecture cho code moi.
- Van maintain duoc du an cu theo kien truc hien huu (MVC/MVVM/Layered).
- Khong ep migrate tong the khi chua co yeu cau ro rang.
## Step 1 - Xac dinh loai task
Chon dung 1 trong 3 loai truoc khi code:
1. **Greenfield:** Module/feature moi, chua co rang buoc kien truc cu.
2. **Brownfield Feature:** Them/chinh sua chuc nang tren module da ton tai.
3. **Brownfield Hotfix:** Sua loi nhanh, uu tien an toan va khong gay hoi quy.
## Step 2 - Decision Matrix
| Task Type | Architecture Strategy | State Strategy | Refactor Scope |
|----------|------------------------|----------------|----------------|
| Greenfield | Bat buoc Clean Architecture | Native-first theo rule state, dat state owner o presentation | Cho phep to chuc lai theo chuan Clean |
| Brownfield Feature | Follow kien truc hien huu cua module, khong doi framework lon | Giu stack state hien co cua module | Chi refactor tang dan trong pham vi file/feature bi cham toi |
| Brownfield Hotfix | Fix toi thieu, dung diem roi | Khong thay doi state framework | Khong refactor rong, chi tach nho neu can de fix an toan |
## Step 3 - Nguyen tac bat buoc
1. **No Forced Migration:** Khong tu y doi MVC -> Clean, Bloc -> Riverpod, Provider -> Bloc.
2. **No New Debt:** Du theo kien truc nao, van cam God File, God Class, Logic Leakage.
3. **Incremental Refactor:** Moi lan cham code la mot co hoi giam no ky thuat nho, khong dai phau neu khong duoc yeu cau.
4. **Consistency First:** Pattern moi phai giong module hien huu truoc, roi moi de xuat nang cap.
## Mapping nhanh theo kien truc hien huu
| Hien trang module | Noi dat business logic uu tien |
|-------------------|---------------------------------|
| Clean | UseCase/Service/Repository theo layer |
| MVC | Controller + Service + data layer hien huu |
| MVVM | ViewModel + Service + Repository |
| Layered cu | Theo convention module, tach ro UI/logic/data |
## Khi nao duoc de xuat migrate tong the?
Chi de xuat migration lon khi co it nhat 1 dieu kien:
1. User yeu cau ro rang migrate.
2. Chi phi maintain vuot nguong (bug lap lai, velocity giam manh, testability rat kem).
3. Co ke hoach rollout theo giai doan (khong big-bang) va co test safety net.
Neu khong dat dieu kien, tiep tuc chien luoc maintain theo kien truc hien huu.
## Checklist truoc khi implement
- [ ] Da gan task vao dung nhom Greenfield/Brownfield Feature/Brownfield Hotfix.
- [ ] Da chon architecture strategy tu matrix.
- [ ] Da xac dinh state strategy dung voi module.
- [ ] Da gioi han refactor scope phu hop muc tieu task.
- [ ] Khong co hanh dong forced migration ngoai pham vi yeu cau.
## Output format bat buoc (implement/review)
Moi task phai mo dau bang 4 dong sau truoc khi mo ta cach lam:
```md
Task Type: <Greenfield | Brownfield Feature | Brownfield Hotfix>
Architecture Strategy: <Clean default | Follow existing architecture>
State Strategy: <stack duoc chon cho module>
Refactor Scope: <minimal | incremental | structured>
```
+1
-1
{
"name": "flutter-pro-max-cli",
"version": "2.4.1",
"version": "2.4.2",
"description": "CLI to install Flutter Pro Max skill for AI coding assistants",

@@ -5,0 +5,0 @@ "type": "module",

@@ -114,2 +114,14 @@ # 🚀 Flutter Pro Max CLI

### Rules Files (19 modules)
| Tier | Rules | Description |
|------|-------|-------------|
| **Foundation (5)** | 01-05 | Skill usage, Code quality, Interaction flow, Consistency, Error handling |
| **Code Quality (5)** | 06-10 | Testing, Performance, Security, State Management, Naming |
| **UX & Resilience (5)** | 11-15 | Accessibility, Network resilience, Offline-first, Graceful degradation, Lifecycle |
| **Product (4)** | 16-19 | Google Play ASO, Compliance, Visuals, Architecture decisions |
**Rules are automatically generated** into platform-specific locations:
- **Append mode** (Claude, Copilot): Rules concatenated into existing file
- **Create mode** (Cursor, Windsurf, others): Separate `.mdc` or `.md` files in rules folder
### Data Files (17 domains)

@@ -166,2 +178,46 @@ | Domain | File | Description |

## 🔄 Syncing Assets (Rules & Data)
When you update rules or data files in the source directory, you must sync them to CLI assets before publishing.
### Sync Rules Only
After adding/updating rules in `src/flutter-pro-max/templates/base/rules/`:
```bash
# Copy all rules to CLI
cp -r src/flutter-pro-max/templates/base/rules/* cli/assets/templates/base/rules/
# Verify sync
ls cli/assets/templates/base/rules/ | wc -l # Should show 19 files
```
### Sync All Assets (Complete)
Before publishing to npm:
```bash
# Sync data files (17 domains)
cp -r src/flutter-pro-max/data/* cli/assets/data/
# Sync scripts
cp -r src/flutter-pro-max/scripts/* cli/assets/scripts/
# Sync templates (skills + rules + platforms)
cp -r src/flutter-pro-max/templates/* cli/assets/templates/
# Verify
cd cli/assets
find . -type f | wc -l # Should show significantly more files
```
### Pre-Publish Checklist
- [ ] All 19 rules present in `cli/assets/templates/base/rules/`
- [ ] All 17 data files present in `cli/assets/data/`
- [ ] All scripts present in `cli/assets/scripts/`
- [ ] Version bumped in `cli/package.json`
- [ ] No uncommitted changes in CLI files
> ⚠️ **CRITICAL:** Without syncing, users will not receive the latest rules/data when they run `flutter-pro-max-cli`
---
## 📁 Project Structure

@@ -168,0 +224,0 @@