flutter-pro-max-cli 1.0.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/README.md +97 -16
  2. package/assets/data/flutter-performance.csv +36 -0
  3. package/assets/data/mobile-accessibility.csv +36 -0
  4. package/assets/{.shared/data → data}/patterns.csv +2 -1
  5. package/assets/data/ui-reasoning.csv +36 -0
  6. package/assets/{.claude/skills/flutter-pro-max/scripts → scripts}/core.py +20 -3
  7. package/assets/{.codex/skills/flutter-pro-max/scripts → scripts}/search.py +1 -1
  8. package/assets/templates/base/quick-reference.md +41 -0
  9. package/assets/templates/base/skill-content.md +179 -0
  10. package/assets/templates/platforms/agent.json +21 -0
  11. package/assets/templates/platforms/claude.json +21 -0
  12. package/assets/templates/platforms/codebuddy.json +18 -0
  13. package/assets/templates/platforms/codex.json +21 -0
  14. package/assets/templates/platforms/continue.json +21 -0
  15. package/assets/templates/platforms/copilot.json +18 -0
  16. package/assets/templates/platforms/cursor.json +18 -0
  17. package/assets/templates/platforms/gemini.json +21 -0
  18. package/assets/templates/platforms/kiro.json +18 -0
  19. package/assets/templates/platforms/opencode.json +21 -0
  20. package/assets/templates/platforms/qoder.json +18 -0
  21. package/assets/templates/platforms/roocode.json +18 -0
  22. package/assets/templates/platforms/trae.json +21 -0
  23. package/assets/templates/platforms/windsurf.json +18 -0
  24. package/dist/commands/init.js +13 -13
  25. package/dist/commands/update.d.ts +6 -0
  26. package/dist/commands/update.js +27 -0
  27. package/dist/commands/versions.d.ts +1 -0
  28. package/dist/commands/versions.js +36 -0
  29. package/dist/index.js +27 -1
  30. package/dist/types/index.d.ts +20 -1
  31. package/dist/types/index.js +4 -1
  32. package/dist/utils/detect.js +11 -1
  33. package/dist/utils/extract.d.ts +5 -0
  34. package/dist/utils/github.d.ts +11 -0
  35. package/dist/utils/github.js +81 -0
  36. package/dist/utils/template.d.ts +25 -0
  37. package/dist/utils/template.js +194 -0
  38. package/package.json +8 -4
  39. package/assets/.agent/workflows/flutter-pro-max.md +0 -165
  40. package/assets/.agent/workflows/scripts/core.py +0 -345
  41. package/assets/.agent/workflows/scripts/search.py +0 -106
  42. package/assets/.claude/skills/flutter-pro-max/SKILL.md +0 -165
  43. package/assets/.claude/skills/flutter-pro-max/scripts/search.py +0 -106
  44. package/assets/.codebuddy/commands/flutter-pro-max.md +0 -165
  45. package/assets/.codebuddy/commands/scripts/core.py +0 -345
  46. package/assets/.codebuddy/commands/scripts/search.py +0 -106
  47. package/assets/.codex/skills/flutter-pro-max/SKILL.md +0 -165
  48. package/assets/.codex/skills/flutter-pro-max/scripts/core.py +0 -345
  49. package/assets/.cursor/commands/flutter-pro-max.md +0 -165
  50. package/assets/.cursor/commands/scripts/core.py +0 -345
  51. package/assets/.cursor/commands/scripts/search.py +0 -106
  52. package/assets/.gemini/skills/flutter-pro-max/SKILL.md +0 -165
  53. package/assets/.gemini/skills/flutter-pro-max/scripts/core.py +0 -345
  54. package/assets/.gemini/skills/flutter-pro-max/scripts/search.py +0 -106
  55. package/assets/.github/prompts/flutter-pro-max.prompt.md +0 -165
  56. package/assets/.github/prompts/scripts/core.py +0 -345
  57. package/assets/.github/prompts/scripts/search.py +0 -106
  58. package/assets/.kiro/steering/flutter-pro-max.md +0 -164
  59. package/assets/.kiro/steering/scripts/core.py +0 -345
  60. package/assets/.kiro/steering/scripts/search.py +0 -106
  61. package/assets/.qoder/rules/flutter-pro-max.md +0 -164
  62. package/assets/.qoder/rules/scripts/core.py +0 -345
  63. package/assets/.qoder/rules/scripts/search.py +0 -106
  64. package/assets/.roo/commands/flutter-pro-max.md +0 -164
  65. package/assets/.roo/commands/scripts/core.py +0 -345
  66. package/assets/.roo/commands/scripts/search.py +0 -106
  67. package/assets/.shared/flutter-pro-max/SKILL.md +0 -165
  68. package/assets/.shared/flutter-pro-max/scripts/core.py +0 -341
  69. package/assets/.shared/flutter-pro-max/scripts/search.py +0 -106
  70. package/assets/.trae/skills/flutter-pro-max/SKILL.md +0 -165
  71. package/assets/.trae/skills/flutter-pro-max/scripts/core.py +0 -345
  72. package/assets/.trae/skills/flutter-pro-max/scripts/search.py +0 -106
  73. package/assets/.windsurf/workflows/flutter-pro-max.md +0 -165
  74. package/assets/.windsurf/workflows/scripts/core.py +0 -345
  75. package/assets/.windsurf/workflows/scripts/search.py +0 -106
  76. package/dist/utils/extract.js +0 -83
  77. /package/assets/{.shared/data → data}/architect.csv +0 -0
  78. /package/assets/{.shared/data → data}/charts.csv +0 -0
  79. /package/assets/{.shared/data → data}/colors.csv +0 -0
  80. /package/assets/{.shared/data → data}/icons.csv +0 -0
  81. /package/assets/{.shared/data → data}/landing.csv +0 -0
  82. /package/assets/{.shared/data → data}/name_convention.csv +0 -0
  83. /package/assets/{.shared/data → data}/package.csv +0 -0
  84. /package/assets/{.shared/data → data}/products.csv +0 -0
  85. /package/assets/{.shared/data → data}/prompts.csv +0 -0
  86. /package/assets/{.shared/data → data}/styles.csv +0 -0
  87. /package/assets/{.shared/data → data}/typography.csv +0 -0
  88. /package/assets/{.shared/data → data}/ux-guidelines.csv +0 -0
  89. /package/assets/{.shared/data → data}/widget.csv +0 -0
package/README.md CHANGED
@@ -47,31 +47,78 @@ For CI/CD or automated setups, you can specify the assistant type directly:
47
47
  # Install for a specific assistant
48
48
  flutter-pro-max init --ai claude
49
49
  flutter-pro-max init --ai cursor
50
+ flutter-pro-max init --ai antigravity
50
51
 
51
52
  # Install for all supported assistants
52
53
  flutter-pro-max init --ai all
53
54
  ```
54
55
 
56
+ ### Other Commands
57
+
58
+ ```bash
59
+ # List available versions from GitHub releases
60
+ flutter-pro-max versions
61
+
62
+ # Update to the latest version
63
+ flutter-pro-max update
64
+ flutter-pro-max update --ai claude
65
+ ```
66
+
55
67
  ---
56
68
 
57
69
  ## 🤖 Supported AI Assistants
58
70
 
59
71
  This CLI bridges the gap between the Flutter Pro Max knowledge base and your development tools:
60
72
 
61
- | Assistant | Type Flag | Installation Path |
62
- |-----------|-----------|-------------------|
63
- | **Claude Code** | `claude` | `.claude/skills/` |
64
- | **Cursor** | `cursor` | `.cursor/commands/` |
65
- | **Windsurf** | `windsurf` | `.windsurf/workflows/` |
66
- | **Antigravity** | `antigravity` | `.agent/workflows/` |
67
- | **Trae** | `trae` | `.trae/skills/` |
68
- | **Gemini CLI** | `gemini` | `.gemini/skills/` |
69
- | **GitHub Copilot** | `copilot` | `.github/prompts/` |
70
- | **RooCode** | `roocode` | `.roo/commands/` |
71
- | **Kiro** | `kiro` | `.kiro/steering/` |
72
- | **Qoder** | `qoder` | `.qoder/rules/` |
73
- | **CodeBuddy** | `codebuddy` | `.codebuddy/commands/` |
74
- | **Codex** | `codex` | `.codex/skills/` |
73
+ | Assistant | Type Flag | Install Type | Structure |
74
+ |-----------|-----------|--------------|-----------|
75
+ | **Claude Code** | `claude` | Full | `.claude/skills/flutter-pro-max/` |
76
+ | **Codex CLI** | `codex` | Full | `.codex/skills/flutter-pro-max/` |
77
+ | **Continue** | `continue` | Full | `.continue/skills/flutter-pro-max/` |
78
+ | **Antigravity** | `antigravity` | Full | `.agent/skills/flutter-pro-max/` |
79
+ | **Cursor** | `cursor` | Reference | `.cursor/commands/` + `.shared/` |
80
+ | **Windsurf** | `windsurf` | Reference | `.windsurf/workflows/` + `.shared/` |
81
+ | **GitHub Copilot** | `copilot` | Reference | `.github/prompts/` + `.shared/` |
82
+ | **Kiro** | `kiro` | Reference | `.kiro/skills/` + `.shared/` |
83
+ | **RooCode** | `roocode` | Reference | `.roo/commands/` + `.shared/` |
84
+ | **Qodo/Qoder** | `qoder` | Reference | `.qodo/skills/` + `.shared/` |
85
+ | **Gemini CLI** | `gemini` | Reference | `.gemini/skills/` + `.shared/` |
86
+ | **Trae** | `trae` | Reference | `.trae/skills/` + `.shared/` |
87
+ | **CodeBuddy** | `codebuddy` | Reference | `.codebuddy/skills/` + `.shared/` |
88
+ | **OpenCode** | `opencode` | Reference | `.opencode/skills/` + `.shared/` |
89
+
90
+ **Install Types:**
91
+ - **Full**: Data và scripts nằm trong skill folder (standalone, ~500KB)
92
+ - **Reference**: Skill file trỏ đến `.shared/` folder chung (tiết kiệm dung lượng khi dùng nhiều assistants)
93
+
94
+ ---
95
+
96
+ ## 📊 What Gets Installed
97
+
98
+ ### Data Files (17 domains)
99
+ | Domain | File | Description |
100
+ |--------|------|-------------|
101
+ | Widgets | `widget.csv` | 65+ Flutter widgets |
102
+ | Packages | `package.csv` | 100+ packages với alternatives |
103
+ | Patterns | `patterns.csv` | 110+ design patterns |
104
+ | Architecture | `architect.csv` | Architecture layers |
105
+ | Performance | `flutter-performance.csv` | 35 optimization patterns |
106
+ | Accessibility | `mobile-accessibility.csv` | 35 accessibility patterns |
107
+ | UI Reasoning | `ui-reasoning.csv` | 35 app category decisions |
108
+ | Colors | `colors.csv` | 50+ color palettes |
109
+ | Typography | `typography.csv` | 40+ font pairings |
110
+ | Styles | `styles.csv` | 60+ UI styles |
111
+ | UX | `ux-guidelines.csv` | 50+ UX rules |
112
+ | Icons | `icons.csv` | 100+ icon recommendations |
113
+ | Landing | `landing.csv` | 30+ landing patterns |
114
+ | Products | `products.csv` | 40+ product recommendations |
115
+ | Prompts | `prompts.csv` | 30+ AI prompts |
116
+ | Charts | `charts.csv` | 20+ chart types |
117
+ | Naming | `name_convention.csv` | Naming conventions |
118
+
119
+ ### Search Scripts
120
+ - `search.py` - BM25 search CLI
121
+ - `core.py` - Search engine core
75
122
 
76
123
  ---
77
124
 
@@ -88,8 +135,42 @@ npm install
88
135
  # Build the project
89
136
  npm run build
90
137
 
91
- # Run locally in development mode
92
- npm run dev
138
+ # Run locally
139
+ node dist/index.js init --ai claude
140
+
141
+ # Test search
142
+ node dist/index.js init --ai claude
143
+ cd .claude/skills/flutter-pro-max
144
+ python3 scripts/search.py "ListView" --domain widget --top 3
145
+ ```
146
+
147
+ ---
148
+
149
+ ## 📁 Project Structure
150
+
151
+ ```
152
+ cli/
153
+ ├── src/
154
+ │ ├── index.ts # CLI entry point
155
+ │ ├── commands/
156
+ │ │ ├── init.ts # Install command
157
+ │ │ ├── versions.ts # List versions
158
+ │ │ └── update.ts # Update command
159
+ │ ├── types/
160
+ │ │ └── index.ts # TypeScript types
161
+ │ └── utils/
162
+ │ ├── detect.ts # AI type detection
163
+ │ ├── github.ts # GitHub API client
164
+ │ ├── logger.ts # Console logger
165
+ │ └── template.ts # Template renderer
166
+ ├── assets/
167
+ │ ├── data/ # 17 CSV knowledge files
168
+ │ ├── scripts/ # Python search scripts
169
+ │ └── templates/
170
+ │ ├── base/ # Markdown templates
171
+ │ └── platforms/ # 14 platform JSON configs
172
+ ├── package.json
173
+ └── tsconfig.json
93
174
  ```
94
175
 
95
176
  ---
@@ -0,0 +1,36 @@
1
+ No,Category,Issue,Keywords,Description,Do,Don't,Code Example Good,Code Example Bad,Severity
2
+ 1,Build Optimization,Const Constructors,const widget rebuild optimization,Sử dụng const constructor để tránh rebuild widget không cần thiết,"Thêm const cho widget tĩnh","Tạo widget mới mỗi lần build","const SizedBox(height: 16)","SizedBox(height: 16)",High
3
+ 2,Build Optimization,Widget Extraction,extract widget method rebuild,Tách widget thành StatelessWidget riêng thay vì dùng method để tối ưu rebuild,"Tách thành widget class riêng","Dùng method trả về widget","class MyButton extends StatelessWidget { ... }","Widget _buildButton() { return Container(...); }",Critical
4
+ 3,Build Optimization,RepaintBoundary,repaint boundary canvas custom,Bọc widget có animation phức tạp trong RepaintBoundary để isolate vùng repaint,"Dùng RepaintBoundary cho animation phức tạp","Để toàn bộ subtree repaint cùng nhau","RepaintBoundary(child: AnimatedWidget())","AnimatedWidget() // không có boundary",High
5
+ 4,Build Optimization,Builder Pattern,builder lazy build,Sử dụng Builder widgets (ListView.builder) để lazy-load thay vì tạo tất cả widget cùng lúc,"Dùng .builder constructors","Truyền list children trực tiếp","ListView.builder(itemBuilder: (_, i) => Item(i))","ListView(children: items.map((i) => Item(i)).toList())",Critical
6
+ 5,State Management,Selective Listening,select watch notifier rebuild,Chỉ watch những phần state cần thiết thay vì toàn bộ object,"Dùng select() để lọc state","Watch toàn bộ object","ref.watch(userProvider.select((u) => u.name))","ref.watch(userProvider)",High
7
+ 6,State Management,Late Provider Init,lazy init provider notifier,Không khởi tạo provider/state nặng ngay từ đầu,"Dùng autoDispose và lazy init","Khởi tạo tất cả state khi app start","@riverpod class Heavy extends _$Heavy { late final _data; }","final heavy = StateProvider((_) => expensiveInit())",Medium
8
+ 7,State Management,Avoid Unnecessary Notify,notify state equal check,Kiểm tra giá trị mới khác giá trị cũ trước khi notify listeners,"So sánh trước khi update","Notify mỗi lần set value","if (state != newValue) state = newValue","state = newValue // luôn notify",Medium
9
+ 8,Image & Asset,Image Caching,cache image memory network,Sử dụng cached_network_image thay vì Image.network cho danh sách,"Dùng CachedNetworkImage","Dùng Image.network trong list","CachedNetworkImage(imageUrl: url)","Image.network(url)",Critical
10
+ 9,Image & Asset,Image Resolution,resolution precache asset,Precache và sử dụng đúng resolution cho asset images,"Dùng ResolutionAwareAssetBundle","Load ảnh resolution cao không cần thiết","precacheImage(AssetImage('img.png'), context)","Image.asset('high_res.png') // 4K cho thumbnail",Medium
11
+ 10,Image & Asset,Memory Image Dispose,dispose controller animation,Dispose ImageProvider và AnimationController đúng cách để tránh memory leak,"Dispose trong dispose()","Quên dispose controllers","@override void dispose() { _controller.dispose(); super.dispose(); }","// Không có dispose()",Critical
12
+ 11,List & Scroll,Virtualization,lazy load list viewport,Sử dụng ListView.builder để chỉ render items trong viewport,"Dùng builder cho list > 20 items","Render tất cả items cùng lúc","ListView.builder(itemCount: 1000, ...)","ListView(children: List.generate(1000, ...))",Critical
13
+ 12,List & Scroll,ShrinkWrap Avoid,shrinkwrap scroll nested,Tránh sử dụng shrinkWrap: true cho list dài vì tắt lazy loading,"Dùng Expanded hoặc Flexible","Dùng shrinkWrap: true","Expanded(child: ListView.builder(...))","ListView(shrinkWrap: true, children: longList)",Critical
14
+ 13,List & Scroll,Item Extent,itemextent cacheextent scroll,Cung cấp itemExtent khi items có cùng chiều cao để tối ưu scroll performance,"Set itemExtent cho uniform height","Để Flutter tính toán mỗi item","ListView.builder(itemExtent: 72, ...)","ListView.builder(...) // không có itemExtent",Medium
15
+ 14,List & Scroll,Keep Alive Careful,keepalive memory tab,Cân nhắc khi dùng AutomaticKeepAliveClientMixin vì giữ widget trong bộ nhớ,"Chỉ dùng cho tabs quan trọng","Keep alive tất cả tabs","// Chỉ keep alive tab có data quan trọng","// Keep alive tất cả tabs trong TabBarView",Medium
16
+ 15,Animation,Animation Controller Dispose,dispose animation leak,Luôn dispose AnimationController để tránh memory leak và ticker leak,"Dispose trong dispose() method","Quên dispose controller","@override void dispose() { _animController.dispose(); super.dispose(); }","// Không dispose AnimationController",Critical
17
+ 16,Animation,Implicit Over Explicit,implicit animated simple,Ưu tiên implicit animations (AnimatedContainer) cho hiệu ứng đơn giản,"Dùng AnimatedFoo widgets","Dùng AnimationController cho mọi thứ","AnimatedContainer(duration: Duration(milliseconds: 300), ...)","AnimationController + AnimatedBuilder cho color change",Medium
18
+ 17,Animation,TweenAnimationBuilder,tween animation builder stateless,Dùng TweenAnimationBuilder cho animation không cần control manual,"Dùng TweenAnimationBuilder","Tạo StatefulWidget chỉ cho animation đơn giản","TweenAnimationBuilder<double>(tween: Tween(begin: 0, end: 1), ...)","StatefulWidget + AnimationController cho fade in",Medium
19
+ 18,Animation,Animation Curve,curve ease animation timing,Sử dụng Curves phù hợp thay vì linear để animation tự nhiên hơn,"Dùng Curves.easeOutCubic","Dùng Curves.linear cho mọi thứ","curve: Curves.easeOutCubic","curve: Curves.linear",Low
20
+ 19,Async & Network,Isolate Heavy Work,isolate compute background,Chạy JSON parsing lớn và tính toán nặng trong Isolate/compute(),"Dùng compute() cho work > 16ms","Parse JSON lớn trên main thread","final data = await compute(parseJson, response)","final data = jsonDecode(response) // 100MB JSON",High
21
+ 20,Async & Network,Cancel Async Operations,cancel async dispose,Hủy Future/Stream subscriptions khi widget dispose,"Cancel trong dispose()","Để async operations chạy tiếp sau dispose","subscription?.cancel(); // trong dispose","// Không cancel, gây setState after dispose",High
22
+ 21,Async & Network,Debounce Search,debounce timer search input,Debounce search input để tránh gọi API quá nhiều,"Timer 300-500ms trước khi search","Gọi API mỗi keystroke","Timer(Duration(milliseconds: 500), () => search(query))","onChanged: (q) => search(q) // gọi mỗi keystroke",High
23
+ 22,Async & Network,Connection Check,connectivity network offline,Check kết nối mạng trước khi gọi API heavy,"Check connectivity trước","Luôn gọi API rồi xử lý lỗi sau","if (await Connectivity().checkConnectivity() != none) { ... }","try { await api.call() } catch (e) { // network error }",Medium
24
+ 23,Layout,Avoid Nested Layouts,nested row column layout,Tránh nested Row/Column quá sâu, sử dụng CustomMultiChildLayout nếu cần,"Flatten layout structure","Nested 5+ level Row/Column","Wrap, Table, CustomMultiChildLayout","Row(Column(Row(Column(Row(...))))))",Medium
25
+ 24,Layout,Intrinsic Dimension Avoid,intrinsic width height expensive,Tránh IntrinsicHeight/IntrinsicWidth vì gây double layout pass,"Dùng constraints hoặc fixed size","Dùng IntrinsicHeight cho list items","ConstrainedBox hoặc AspectRatio","IntrinsicHeight(child: Row(...))",High
26
+ 25,Layout,Clip Behavior,clip antiAlias expensive,Sử dụng Clip.hardEdge thay vì antiAlias nếu không cần smooth edges,"Clip.hardEdge hoặc Clip.none","Clip.antiAlias everywhere","clipBehavior: Clip.hardEdge","clipBehavior: Clip.antiAlias // mọi Container",Low
27
+ 26,Text & Font,Font Preload,font precache asset,Preload custom fonts khi app start để tránh flash of unstyled text,"Preload fonts trong main()","Để font load lazy","await FontLoader('MyFont').load()","// Font load khi widget đầu tiên dùng nó",Medium
28
+ 27,Text & Font,Text Scale Factor,textscale accessibility responsive,Hỗ trợ textScaleFactor cho accessibility thay vì hardcode font size,"Dùng Theme.of(context).textTheme","Hardcode fontSize everywhere","Text('Hi', style: Theme.of(context).textTheme.bodyLarge)","Text('Hi', style: TextStyle(fontSize: 14))",Medium
29
+ 28,Platform,Platform Channel Batch,platform channel native batch,Batch nhiều platform channel calls thành một để giảm overhead,"Batch calls thành single method","Gọi nhiều method channel riêng lẻ","channel.invokeMethod('batchOperation', [data1, data2])","channel.invokeMethod('op1'); channel.invokeMethod('op2');",Medium
30
+ 29,Platform,Profile vs Debug,profile mode release debug,Test performance trong Profile mode, không phải Debug mode,"Flutter run --profile","Đánh giá perf trong debug mode","flutter run --profile --target=lib/main.dart","flutter run // debug mode chậm hơn nhiều",Critical
31
+ 30,Platform,Skia vs Impeller,impeller ios android render,Sử dụng Impeller trên iOS (default) và test trên Android cho performance tốt hơn,"Enable Impeller nếu chưa","Disable Impeller không lý do","flutter run --enable-impeller","--no-enable-impeller // fallback Skia",Medium
32
+ 31,Startup,Deferred Loading,deferred loading split,Sử dụng deferred loading để giảm initial bundle size,"Deferred import cho features phụ","Load tất cả code lúc startup","import 'heavy.dart' deferred as heavy; await heavy.loadLibrary()","import 'heavy.dart' // load lúc app start",High
33
+ 32,Startup,Lazy Initialization,lazy init singleton service,Khởi tạo services lazy thay vì tất cả trong main(),"Lazy init với getter","Init tất cả trong main()","static final instance = Lazy(() => HeavyService())","void main() { HeavyService.init(); ... }",High
34
+ 33,DevTools,Timeline Profiling,devtools timeline frame,Sử dụng Flutter DevTools Timeline để phát hiện jank frames,"Profile với DevTools Timeline","Đoán nguyên nhân jank","flutter pub global run devtools","// Không dùng profiling tools",Medium
35
+ 34,DevTools,Widget Inspector,inspector rebuild debug,Dùng Widget Inspector để detect unnecessary rebuilds,"Check rebuild indicators","Đoán widget nào rebuild","DevTools > Flutter Inspector > Track widget rebuilds","// Không biết widget nào rebuild nhiều",Medium
36
+ 35,Memory,Dispose Pattern,dispose stream subscription,Implement dispose pattern đúng cách cho tất cả resources,"Dispose tất cả controllers, subscriptions","Quên dispose một số resources","streams.forEach((s) => s.cancel()); controllers.forEach((c) => c.dispose());","// Dispose một số, quên một số",Critical
@@ -0,0 +1,36 @@
1
+ No,Category,Issue,Keywords,Platform,Description,Do,Don't,Code Example Good,Code Example Bad,Severity
2
+ 1,Semantics,Screen Reader Labels,semantics label button accessibility,Flutter,Tất cả interactive widgets cần Semantics label cho screen reader,"Thêm Semantics hoặc semanticLabel","Button không có label","Semantics(label: 'Đóng', child: IconButton(...))","IconButton(icon: Icon(Icons.close), onPressed: ...)",Critical
3
+ 2,Semantics,Exclude Decorative,excludesemantics decorative icon,Flutter,Ẩn decorative icons khỏi screen reader,"Dùng excludeFromSemantics: true","Decorative icon được đọc lên","Icon(Icons.star, semanticLabel: null) // hoặc ExcludeSemantics","Icon(Icons.star) // đọc là 'star'",Medium
4
+ 3,Semantics,Image Descriptions,image semantic description alt,Flutter,Mô tả ảnh cho người dùng khiếm thị,"Thêm semanticLabel cho Image","Image không có description","Image.asset('logo.png', semanticLabel: 'Logo công ty ABC')","Image.asset('logo.png')",High
5
+ 4,Touch Target,Minimum Size,touch target 48 44 size,Flutter,Touch target tối thiểu 48x48 dp (Material) hoặc 44x44 pt (iOS),"Set minimum size 48x48","Nút quá nhỏ","SizedBox(width: 48, height: 48, child: IconButton(...))","IconButton(...) // 24x24 mặc định",Critical
6
+ 5,Touch Target,Hit Test Extension,gesture hitslop padding,Flutter,Mở rộng vùng tap không ảnh hưởng visual size,"Dùng padding hoặc MaterialTapTargetSize","Chỉ dựa vào icon size","GestureDetector(behavior: HitTestBehavior.opaque, child: Padding(...))","Icon(size: 16) // quá nhỏ để tap",High
7
+ 6,Touch Target,Spacing Between Targets,spacing touch targets,Flutter,Khoảng cách tối thiểu 8dp giữa các touch targets,"Thêm spacing >= 8dp","Các button sát nhau","Row(children: [btn1, SizedBox(width: 8), btn2])","Row(children: [btn1, btn2]) // sát nhau",Medium
8
+ 7,Color Contrast,Text Contrast Ratio,contrast ratio wcag text,Flutter,Tỉ lệ contrast tối thiểu 4.5:1 cho text thường và 3:1 cho large text,"Check contrast ratio trước khi chọn màu","Text nhạt trên nền sáng","Text(style: TextStyle(color: Color(0xFF1A1A1A))) // trên nền trắng","Text(style: TextStyle(color: Colors.grey[400])) // trên nền trắng",Critical
9
+ 8,Color Contrast,Non-Text Contrast,contrast icon button visual,Flutter,UI elements (icons buttons borders) cần contrast tối thiểu 3:1,"Đảm bảo icon/border đủ contrast","Icon quá nhạt","Icon(Icons.add, color: Color(0xFF333333))","Icon(Icons.add, color: Colors.grey[300])",High
10
+ 9,Color Contrast,Dark Mode Support,dark mode theme contrast,Flutter,Đảm bảo contrast đạt chuẩn cho cả light và dark mode,"Test cả 2 theme modes","Chỉ test light mode","Theme.of(context).colorScheme.onSurface","Color(0xFF333333) // hardcode không đổi theo theme",High
11
+ 10,Color,Not Only Color,color blind indicator shape,Flutter,Không dùng màu là chỉ báo duy nhất cho thông tin quan trọng,"Kết hợp icon/shape với color","Chỉ dùng màu để phân biệt","Row(children: [Icon(Icons.error), Text('Lỗi', style: TextStyle(color: Colors.red))])","Text('Lỗi', style: TextStyle(color: Colors.red))",High
12
+ 11,Text,Scalable Text,textscaler font size accessibility,Flutter,Hỗ trợ textScaler để người dùng có thể phóng to text,"Dùng Theme.textTheme","Hardcode fontSize","Text('Hi', style: Theme.of(context).textTheme.bodyLarge)","Text('Hi', style: TextStyle(fontSize: 14))",High
13
+ 12,Text,Text Truncation,overflow ellipsis truncate,Flutter,Xử lý text overflow đúng cách với ellipsis hoặc fade,"Set overflow và maxLines","Text tràn ra ngoài","Text('Long...', overflow: TextOverflow.ellipsis, maxLines: 2)","Text('Long text...') // tràn container",Medium
14
+ 13,Text,Dynamic Type,font accessibility large small,Flutter,Test với font size từ nhỏ nhất đến lớn nhất trong settings,"Test với tất cả font scales","Chỉ test với font mặc định","MediaQuery.textScalerOf(context).scale(14)","// Không test với accessibility settings",Medium
15
+ 14,Focus,Focus Management,focus traversal keyboard,Flutter,Quản lý focus order hợp lý cho keyboard navigation,"Set FocusTraversalOrder khi cần","Focus order không logic","FocusTraversalGroup(policy: OrderedTraversalPolicy(...))","// Để Flutter tự quyết định khi order phức tạp",Medium
16
+ 15,Focus,Focus Visibility,focus indicator ring border,Flutter,Hiển thị focus indicator rõ ràng khi navigate bằng keyboard,"Custom focusColor hoặc FocusNode","Focus không hiển thị","Focus(onFocusChange: (f) => setState(() => hasFocus = f))","// Không có visual feedback khi focus",High
17
+ 16,Focus,Restore Focus,autofocus restore modal,Flutter,Restore focus về element trước khi mở modal/dialog,"FocusScope.of(context).previousFocus()","Focus bị mất sau khi đóng modal","Navigator.pop(context); FocusScope.of(context).previousFocus()","Navigator.pop(context) // focus bị mất",Medium
18
+ 17,Navigation,Back Button Handle,popscope android back,Flutter,Xử lý nút Back Android đúng cách với PopScope,"Dùng PopScope","WillPopScope (deprecated)","PopScope(canPop: false, onPopInvokedWithResult: ...)","WillPopScope(onWillPop: ...) // deprecated",High
19
+ 18,Navigation,Screen Reader Announce,announce route semantics,Flutter,Thông báo cho screen reader khi chuyển màn hình,"SemanticsService.announce()","Chuyển màn hình im lặng","SemanticsService.announce('Đã mở trang Cài đặt', TextDirection.ltr)","Navigator.push(...) // không thông báo",Medium
20
+ 19,Navigation,Skip Navigation,skip link content main,Flutter,Cung cấp cách bỏ qua navigation để đến nội dung chính,"Focus node cho main content","Phải tab qua toàn bộ nav","ElevatedButton(onPressed: () => mainContentFocus.requestFocus(), child: Text('Bỏ qua'))","// Không có skip link",Medium
21
+ 20,Forms,Error Messages,form error inline accessible,Flutter,Hiển thị lỗi inline gần field và thông báo cho screen reader,"errorText trong InputDecoration","Lỗi ở xa field","TextFormField(decoration: InputDecoration(errorText: error))","// Hiển thị lỗi ở cuối form",High
22
+ 21,Forms,Form Labels,label hint form input,Flutter,Mỗi form field cần label rõ ràng (không chỉ hint),"labelText trong InputDecoration","Chỉ dùng hintText","TextFormField(decoration: InputDecoration(labelText: 'Email', hintText: 'example@mail.com'))","TextFormField(decoration: InputDecoration(hintText: 'Email'))",High
23
+ 22,Forms,Required Indicator,required asterisk field,Flutter,Đánh dấu rõ ràng các field bắt buộc,"Thêm * hoặc (required) vào label","Không đánh dấu required","InputDecoration(labelText: 'Email *')","InputDecoration(labelText: 'Email') // required nhưng không hiển thị",Medium
24
+ 23,Motion,Reduced Motion,reduce motion animation accessibility,Flutter,Tôn trọng cài đặt Reduce Motion của hệ thống,"Check MediaQuery.disableAnimations","Animation luôn chạy","if (!MediaQuery.disableAnimationsOf(context)) animate()","// Animation luôn chạy bất kể settings",High
25
+ 24,Motion,Auto-play Content,autoplay video audio control,Flutter,Không auto-play video/audio hoặc cho phép tắt,"Cung cấp play button","Auto-play media","VideoPlayer(autoPlay: false)","VideoPlayer(autoPlay: true) // làm phiền user",Medium
26
+ 25,Motion,Animation Duration,animation duration time,Flutter,Animation không nên quá nhanh (< 100ms) hoặc quá chậm (> 500ms),"Duration 150-300ms cho micro-interactions","Animation quá nhanh hoặc quá chậm","Duration(milliseconds: 200)","Duration(milliseconds: 50) // quá nhanh để nhận ra",Low
27
+ 26,Feedback,Loading States,loading indicator progress,Flutter,Hiển thị loading state rõ ràng cho async operations,"CircularProgressIndicator hoặc Skeleton","Không có loading feedback","if (isLoading) CircularProgressIndicator() else Content()","// Blank screen khi loading",High
28
+ 27,Feedback,Error States,error message retry action,Flutter,Hiển thị thông báo lỗi rõ ràng với action để retry,"Error message + Retry button","Im lặng khi lỗi","Column([Text('Có lỗi xảy ra'), ElevatedButton('Thử lại')])","// Blank screen hoặc chỉ có icon lỗi",High
29
+ 28,Feedback,Success Confirmation,success toast snackbar confirmation,Flutter,Xác nhận hành động thành công cho người dùng,"SnackBar hoặc Dialog","Không có feedback","ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: Text('Đã lưu!')))","// Không thông báo gì sau khi save",Medium
30
+ 29,Feedback,Haptic Feedback,haptic vibration touch,Flutter,Sử dụng haptic feedback cho các action quan trọng,"HapticFeedback.lightImpact()","Không có haptic","HapticFeedback.mediumImpact(); // sau khi tap important button","// Không có tactile feedback",Low
31
+ 30,Platform,iOS Guidelines,cupertino ios human interface,Flutter,Tuân thủ Human Interface Guidelines trên iOS,"Dùng Cupertino widgets hoặc adaptive","Material widgets trên iOS","CupertinoPageRoute, CupertinoSwitch khi cần","MaterialPageRoute trên iOS với animation lạ",Medium
32
+ 31,Platform,Android Guidelines,material android guidelines,Flutter,Tuân thủ Material Design guidelines trên Android,"Dùng Material 3 widgets","UI không theo platform conventions","MaterialApp, NavigationBar, FloatingActionButton","Custom navigation không theo Material",Medium
33
+ 32,Platform,Gesture Conventions,gesture swipe back platform,Flutter,Tôn trọng gesture conventions của từng platform,"iOS: swipe right to back","Block platform gestures","Scaffold với Navigator tự động handle","PopScope block iOS swipe back gesture",Medium
34
+ 33,Orientation,Rotation Support,rotation orientation landscape,Flutter,Hỗ trợ rotation nếu phù hợp với app type,"Test cả portrait và landscape","Lock orientation không cần thiết","LayoutBuilder để responsive","SystemChrome.setPreferredOrientations([portrait]) // không cần",Low
35
+ 34,Orientation,Keyboard Overlap,keyboard resize insets,Flutter,Xử lý keyboard hiển thị không che form fields,"resizeToAvoidBottomInset hoặc scroll","Keyboard che input field","Scaffold(resizeToAvoidBottomInset: true)","Scaffold(resizeToAvoidBottomInset: false) // keyboard che field",High
36
+ 35,Testing,Accessibility Audit,accessibility audit testing,Flutter,Chạy accessibility audit trong development,"Dùng flutter accessibility tools","Không test accessibility","debugCheckIntrinsicSizes: true, semanticsDumpEnabled: true","// Không test với TalkBack/VoiceOver",High
@@ -106,4 +106,5 @@ Gap (Spacing),UI/UX,"layout, spacing, margin, khoảng cách","Thay thế SizedB
106
106
  Freezed Union Handling,Logic,"state, pattern matching, union","Xử lý các case của Union Type (Freezed) an toàn.","freezed, map/when","state.map( data: (d) => ShowData(d), error: (e) => ShowError(e), loading: (_) => ShowLoading(), );","Dùng `if (state is Data)` và ép kiểu thủ công."
107
107
  Value Key (Widget Identity),Performance,"key, widget, update, định danh","Giúp Flutter phân biệt các widget trong danh sách khi thứ tự thay đổi.","ValueKey","ListView( children: items.map((item) => ListTile(key: ValueKey(item.id), ...)).toList() )","Không dùng Key hoặc dùng `index` làm Key (gây lỗi khi xóa/thêm item)."
108
108
  Interactive Bottom Sheet,UI/UX,"bottom sheet, modal, drag, menu kéo","BottomSheet có thể tương tác (cuộn bên trong) và đóng khi kéo xuống.","showModalBottomSheet","showModalBottomSheet( isScrollControlled: true, builder: (_) => DraggableScrollableSheet(...) );","Bottom Sheet bị cố định chiều cao, không hiển thị hết nội dung."
109
- Check Internet Connection Stream,System,"network, wifi, stream, theo dõi mạng","Lắng nghe thay đổi trạng thái mạng theo thời gian thực.","connectivity_plus","Connectivity().onConnectivityChanged.listen((ConnectivityResult result) { // Update UI status });","Chỉ kiểm tra một lần lúc gọi API."
109
+ Check Internet Connection Stream,System,"network, wifi, stream, theo dõi mạng","Lắng nghe thay đổi trạng thái mạng theo thời gian thực.","connectivity_plus","Connectivity().onConnectivityChanged.listen((ConnectivityResult result) { // Update UI status });","Chỉ kiểm tra một lần lúc gọi API."
110
+ Pill Button Padding,UI/UX,"button, pill, stadium, border radius, padding, text clipped, chữ bị cắt, nút bo tròn","Khi dùng button dạng pill (borderRadius = height/2), cần tăng padding horizontal để text không bị cắt ở hai đầu do vùng bo tròn chiếm không gian.","ElevatedButton, FilledButton, OutlinedButton","ElevatedButton( style: ElevatedButton.styleFrom( shape: StadiumBorder(), padding: EdgeInsets.symmetric(horizontal: 32, vertical: 16), // horizontal >= borderRadius + 8 ), child: Text('Nhận Chuyến'), )","Dùng default padding với pill button hoặc fixed height mà không tính toán padding. Ví dụ sai: SizedBox(height: 50, child: ElevatedButton(borderRadius: 25)) với default padding sẽ làm text bị cắt."
@@ -0,0 +1,36 @@
1
+ No,App_Category,Recommended_Pattern,Style_Priority,Color_Mood,Typography_Mood,Key_Effects,Decision_Rules,Anti_Patterns,Severity
2
+ 1,E-commerce App,Hero + Grid + Cart,Material 3 + Vibrant,Brand primary + Success green + Trust,Clear + Engaging,Card elevation + Add to cart animation + Price highlight,"{""if_luxury"": ""use-premium-colors"", ""must_have"": ""quick-add-to-cart""}",Tiny tap targets + Hidden cart + Cluttered product grid,HIGH
3
+ 2,Social Media App,Feed + Stories + Profile,Vibrant + Motion-driven,Engagement colors + Notification red,Modern + Bold,Pull to refresh + Like animation + Story progress,"{""must_have"": ""infinite-scroll"", ""must_have"": ""engagement-feedback""}",No loading states + Static content + Poor image loading,HIGH
4
+ 3,Banking/Fintech App,Dashboard + Cards + Transactions,Material 3 + Trust,Navy + Trust Blue + Security green,Professional + Clear,Balance animation + Transaction list + Security indicators,"{""must_have"": ""biometric-auth"", ""must_have"": ""transaction-security""}",Insecure storage + No encryption + Hidden fees,CRITICAL
5
+ 4,Healthcare App,Appointments + Records + Chat,Accessible + Calm,Calm blue + Health green + White,Readable (16px+) + Clear,Appointment reminders + Health charts + Doctor availability,"{""must_have"": ""hipaa-compliance"", ""must_have"": ""accessibility""}",Small text + Complex navigation + No offline access,HIGH
6
+ 5,Fitness/Workout App,Progress + Workouts + Stats,Vibrant + Energetic,Energetic orange + Progress green,Bold + Motivational,Progress rings + Achievement unlocks + Workout timer,"{""must_have"": ""progress-tracking"", ""if_gamification"": ""add-achievements""}",No visual feedback + Static progress + Poor timer UX,HIGH
7
+ 6,Food Delivery App,Search + Menu + Tracking,Appetizing + Fast,Warm (Orange Red) + Success green,Clear + Appetizing,Real-time tracking + Order status + Cart animation,"{""must_have"": ""real-time-tracking"", ""must_have"": ""easy-reorder""}",No tracking + Hidden delivery time + Complex checkout,HIGH
8
+ 7,Travel/Booking App,Search + Listings + Booking,Inspiring + Trust,Sky blue + Destination colors + Trust,Inspirational + Clear,Search animation + Map integration + Price comparison,"{""must_have"": ""search-filters"", ""must_have"": ""booking-confirmation""}",Complex booking flow + No price transparency + Poor photos,HIGH
9
+ 8,Education/Learning App,Courses + Progress + Quiz,Friendly + Engaging,Learning blue + Progress green + Playful,Friendly + Readable,Progress bars + Quiz feedback + Certificate animation,"{""must_have"": ""progress-saving"", ""must_have"": ""offline-mode""}",No progress indication + Lost progress + Boring design,HIGH
10
+ 9,Productivity/Todo App,Lists + Calendar + Reminders,Minimal + Clean,Neutral + Priority colors (Red Yellow Green),Clean + Efficient,Task completion animation + Calendar sync + Quick actions,"{""must_have"": ""quick-add"", ""must_have"": ""reminders""}",Complex task creation + No sync + Hidden features,MEDIUM
11
+ 10,Messaging/Chat App,Conversations + Messages + Media,Clean + Personal,Brand + Read indicators + Online status,Modern + Readable,Typing indicator + Message status + Media preview,"{""must_have"": ""message-status"", ""must_have"": ""media-support""}",No read receipts + Poor media handling + Slow loading,HIGH
12
+ 11,Music/Audio App,Library + Player + Playlists,Immersive + Dark,Album art colors + Control accents,Modern + Bold,Waveform visualization + Now playing animation + Playlist shuffle,"{""must_have"": ""background-playback"", ""must_have"": ""audio-controls""}",Poor audio player UX + No background play + No offline,HIGH
13
+ 12,News/Media App,Feed + Articles + Categories,Clean + Readable,Neutral + Category accents,Editorial + Clear,Pull to refresh + Reading progress + Share animation,"{""must_have"": ""offline-reading"", ""must_have"": ""category-filtering""}",Cluttered layout + Slow loading + No offline cache,MEDIUM
14
+ 13,Dating App,Profiles + Matching + Chat,Personal + Warm,Warm (Pink Red) + Match success,Friendly + Personal,Swipe animation + Match celebration + Profile reveal,"{""must_have"": ""privacy-controls"", ""must_have"": ""report-system""}",No privacy + Poor profile display + Generic design,HIGH
15
+ 14,Real Estate App,Listings + Search + Favorites,Professional + Trust,Trust blue + Premium gold + Clean white,Professional + Clear,Property gallery + Map markers + Price comparison,"{""must_have"": ""map-view"", ""must_have"": ""save-favorites""}",Poor photos + Complex search + No saved properties,HIGH
16
+ 15,Ride-sharing App,Booking + Tracking + Payment,Fast + Trust,Brand + Live tracking + Safety indicators,Clear + Functional,Real-time map + Driver tracking + Fare estimation,"{""must_have"": ""real-time-tracking"", ""must_have"": ""safety-features""}",No live tracking + Hidden pricing + Poor driver info,CRITICAL
17
+ 16,Wallet/Payment App,Balance + Send + History,Secure + Trust,Trust blue + Money green + Security,Professional + Clear,Balance animation + Transaction confirmation + QR scanner,"{""must_have"": ""biometric-auth"", ""must_have"": ""transaction-receipts""}",Insecure + No confirmation + Hidden fees,CRITICAL
18
+ 17,Weather App,Current + Forecast + Alerts,Atmospheric + Dynamic,Sky gradients + Weather-based colors,Clear + Large,Weather animation + Location-based + Push alerts,"{""must_have"": ""location-accuracy"", ""must_have"": ""severe-alerts""}",Inaccurate data + No alerts + Static design,MEDIUM
19
+ 18,Gaming App,Game + Leaderboard + Store,Immersive + Engaging,Vibrant + Achievement gold,Bold + Impactful,Game animations + Achievement unlock + Score celebration,"{""must_have"": ""save-progress"", ""must_have"": ""leaderboards""}",Lost progress + Poor performance + No haptics,HIGH
20
+ 19,Event/Ticketing App,Events + Tickets + QR,Exciting + Trust,Event colors + Ticket accents,Engaging + Clear,Event discovery + QR ticket + Calendar add,"{""must_have"": ""qr-ticket"", ""must_have"": ""calendar-integration""}",No offline ticket + Complex purchase + Hidden fees,HIGH
21
+ 20,Grocery/Shopping App,Categories + Cart + Delivery,Fresh + Fast,Fresh green + Category colors + CTA,Clear + Appetizing,Product search + Quick add + Delivery slots,"{""must_have"": ""search-autocomplete"", ""must_have"": ""delivery-scheduling""}",Poor product images + Complex checkout + No reorder,HIGH
22
+ 21,Photography/Camera App,Camera + Gallery + Edit,Creative + Minimal,Neutral + Creative accents,Minimal + Clean,Camera controls + Filter preview + Edit tools,"{""must_have"": ""fast-capture"", ""must_have"": ""non-destructive-editing""}",Slow capture + Poor gallery + Complex editing,MEDIUM
23
+ 22,Podcast/Audio App,Shows + Episodes + Player,Content-focused + Dark,Dark + Audio waveform accents,Modern + Clear,Audio player + Episode progress + Download indicator,"{""must_have"": ""background-audio"", ""must_have"": ""download-offline""}",Poor player controls + No downloads + No playback speed,HIGH
24
+ 23,Job Search App,Search + Applications + Profile,Professional + Trust,Professional blue + Success green,Clear + Professional,Job match + Application tracker + Interview reminders,"{""must_have"": ""application-tracking"", ""must_have"": ""profile-completion""}",Complex application + No tracking + Hidden salary,HIGH
25
+ 24,Pet Care App,Pets + Health + Reminders,Friendly + Warm,Playful + Pet category colors,Friendly + Clear,Pet profiles + Health tracking + Vet reminders,"{""must_have"": ""vaccination-tracking"", ""must_have"": ""vet-locator""}",Generic design + No reminders + Poor pet profiles,MEDIUM
26
+ 25,Home Automation App,Devices + Scenes + Schedules,Smart + Dark,Dark + Device status colors + Accent,Clear + Functional,Device control + Scene activation + Real-time status,"{""must_have"": ""real-time-control"", ""must_have"": ""automation""}",Slow response + No offline control + Complex setup,HIGH
27
+ 26,Meditation/Wellness App,Sessions + Progress + Sounds,Calm + Minimal,Calm pastels + Nature colors,Calming + Readable,Breathing animation + Timer + Progress tracking,"{""must_have"": ""offline-audio"", ""must_have"": ""reminders""}",Harsh colors + Distracting UI + No offline,HIGH
28
+ 27,Parking App,Find + Pay + Navigate,Fast + Trust,Location blue + Payment green,Clear + Functional,Map markers + Payment flow + Timer notification,"{""must_have"": ""map-accuracy"", ""must_have"": ""payment-receipts""}",Inaccurate locations + Complex payment + No timer,HIGH
29
+ 28,Restaurant/Menu App,Menu + Order + Reservation,Appetizing + Brand,Brand + Food colors + CTA,Appetizing + Clear,Menu browsing + Table booking + Order tracking,"{""must_have"": ""menu-photos"", ""must_have"": ""reservation-system""}",Poor food photos + Complex ordering + No confirmation,HIGH
30
+ 29,Rental/Sharing App,Browse + Book + Return,Trust + Efficient,Trust blue + Status colors,Clear + Efficient,Availability calendar + Booking confirmation + Return reminder,"{""must_have"": ""availability-check"", ""must_have"": ""damage-reporting""}",No availability + Complex booking + Poor damage flow,HIGH
31
+ 30,Language Learning App,Lessons + Practice + Progress,Engaging + Playful,Learning colors + Progress indicators,Friendly + Clear,Lesson progress + Quiz feedback + Streak animation,"{""must_have"": ""progress-sync"", ""must_have"": ""gamification""}",Boring design + No motivation + Lost progress,HIGH
32
+ 31,Pharmacy/Medicine App,Prescriptions + Orders + Reminders,Trust + Healthcare,Medical blue + Trust + Alert colors,Clear + Accessible,Prescription scanner + Refill reminders + Drug info,"{""must_have"": ""reminder-system"", ""must_have"": ""drug-interactions""}",Complex refill + No reminders + Poor drug info,HIGH
33
+ 32,Insurance App,Policies + Claims + Support,Trust + Professional,Trust blue + Success green + Alert,Professional + Clear,Policy overview + Claim status + Document upload,"{""must_have"": ""claim-tracking"", ""must_have"": ""document-management""}",Hidden policy details + Complex claims + No tracking,HIGH
34
+ 33,Donation/Charity App,Causes + Donate + Impact,Heartfelt + Trust,Warm + Impact colors + Trust,Heartfelt + Clear,Impact visualization + Donation confirmation + Recurring setup,"{""must_have"": ""impact-transparency"", ""must_have"": ""easy-recurring""}",Hidden impact + Complex donation + No receipts,HIGH
35
+ 34,Survey/Form App,Questions + Progress + Submit,Clean + Efficient,Brand + Progress + Completion,Clear + Readable,Progress indicator + Skip logic + Submit confirmation,"{""must_have"": ""save-progress"", ""must_have"": ""clear-navigation""}",Lost progress + Complex questions + No feedback,MEDIUM
36
+ 35,Kids/Family App,Content + Controls + Profiles,Safe + Playful,Playful + Safe colors,Large + Friendly,Parental controls + Age-appropriate content + Usage stats,"{""must_have"": ""parental-controls"", ""must_have"": ""content-filtering""}",No controls + Inappropriate content + Small targets,CRITICAL
@@ -16,13 +16,15 @@ def _get_data_dir():
16
16
  """Auto-detect data directory based on script location"""
17
17
  script_dir = Path(__file__).parent
18
18
  possible_paths = [
19
+ # Full install: .claude/skills/flutter-pro-max/scripts/ -> data/ (sibling)
20
+ script_dir.parent / "data",
21
+ # Reference install: .shared/flutter-pro-max/scripts/ -> ../data
22
+ script_dir.parent.parent / "data",
19
23
  # When running from root/scripts/
20
24
  script_dir.parent / ".shared" / "data",
21
- # When running from .shared/flutter-pro-max/scripts/
22
- script_dir.parent.parent / "data",
23
25
  # When running from .agent/workflows/scripts/ (nested 3 levels deep)
24
26
  script_dir.parent.parent.parent / ".shared" / "data",
25
- # When running from .claude/skills/flutter-pro-max/scripts/ (nested 4 levels deep)
27
+ # When running from .claude/skills/flutter-pro-max/scripts/ (reference mode)
26
28
  script_dir.parent.parent.parent.parent / ".shared" / "data",
27
29
  # Fallback: cwd
28
30
  Path.cwd() / ".shared" / "data",
@@ -106,6 +108,21 @@ CSV_CONFIG = {
106
108
  "file": "prompts.csv",
107
109
  "search_cols": ["Style Category", "AI Prompt Keywords (Copy-Paste Ready)", "CSS/Technical Keywords"],
108
110
  "output_cols": ["Style Category", "AI Prompt Keywords (Copy-Paste Ready)", "CSS/Technical Keywords", "Implementation Checklist"]
111
+ },
112
+ "performance": {
113
+ "file": "flutter-performance.csv",
114
+ "search_cols": ["Category", "Issue", "Keywords", "Description", "Do", "Don't"],
115
+ "output_cols": ["Category", "Issue", "Keywords", "Description", "Do", "Don't", "Code Example Good", "Code Example Bad", "Severity"]
116
+ },
117
+ "ui-reasoning": {
118
+ "file": "ui-reasoning.csv",
119
+ "search_cols": ["App_Category", "Recommended_Pattern", "Style_Priority", "Color_Mood", "Key_Effects", "Decision_Rules"],
120
+ "output_cols": ["App_Category", "Recommended_Pattern", "Style_Priority", "Color_Mood", "Typography_Mood", "Key_Effects", "Decision_Rules", "Anti_Patterns", "Severity"]
121
+ },
122
+ "accessibility": {
123
+ "file": "mobile-accessibility.csv",
124
+ "search_cols": ["Category", "Issue", "Keywords", "Platform", "Description", "Do", "Don't"],
125
+ "output_cols": ["Category", "Issue", "Keywords", "Platform", "Description", "Do", "Don't", "Code Example Good", "Code Example Bad", "Severity"]
109
126
  }
110
127
  }
111
128
 
@@ -4,7 +4,7 @@
4
4
  Flutter Pro Max Search - CLI for Flutter knowledge base search
5
5
  Usage: python search.py "<query>" [--domain <domain>] [--stack <stack>] [--top 5]
6
6
 
7
- Domains: widget, package, pattern, architect, chart, color, typography, style, ux, icon, landing, naming, product, prompt
7
+ Domains: widget, package, pattern, architect, chart, color, typography, style, ux, icon, landing, naming, product, prompt, performance, ui-reasoning, accessibility
8
8
  Stacks: riverpod, bloc, provider
9
9
  """
10
10
 
@@ -0,0 +1,41 @@
1
+
2
+ ---
3
+
4
+ ## Quick Reference
5
+
6
+ ### Search Commands
7
+
8
+ ```bash
9
+ # Auto-detect domain
10
+ python3 {{SCRIPT_PATH}}/search.py "ListView" --top 5
11
+
12
+ # Specific domain
13
+ python3 {{SCRIPT_PATH}}/search.py "network http" --domain package --top 5
14
+
15
+ # Stack filter
16
+ python3 {{SCRIPT_PATH}}/search.py "state" --stack riverpod --top 5
17
+
18
+ # JSON output
19
+ python3 {{SCRIPT_PATH}}/search.py "login" --json --top 3
20
+ ```
21
+
22
+ ### Example Workflow
23
+
24
+ **User Request:** "Tạo màn hình đăng nhập với Riverpod"
25
+
26
+ 1. **Search widgets:**
27
+ ```bash
28
+ python3 {{SCRIPT_PATH}}/search.py "form input" --domain widget --top 5
29
+ ```
30
+
31
+ 2. **Search patterns:**
32
+ ```bash
33
+ python3 {{SCRIPT_PATH}}/search.py "authentication login" --domain pattern --top 5
34
+ ```
35
+
36
+ 3. **Search packages:**
37
+ ```bash
38
+ python3 {{SCRIPT_PATH}}/search.py "validation" --domain package --stack riverpod --top 5
39
+ ```
40
+
41
+ 4. **Apply results** to generate code với Riverpod state management
@@ -0,0 +1,179 @@
1
+ # {{TITLE}}
2
+
3
+ {{DESCRIPTION}}
4
+
5
+ ---
6
+
7
+ ## 🏛️ ROLE & IDENTITY: The Pragmatic Architect
8
+
9
+ Bạn là **"The Pragmatic Architect"** (Kiến trúc sư Thực dụng), một Senior Principal Software Engineer.
10
+
11
+ Sứ mệnh của bạn không chỉ là viết code chạy được, mà là kiến tạo phần mềm:
12
+ - **Bền vững (Sustainable)** - Code sống được qua nhiều đời dev
13
+ - **Dễ đọc (Readable)** - Code tự giải thích, không cần comment thừa
14
+ - **Tách biệt (Decoupled)** - Modules độc lập, dễ test và thay thế
15
+
16
+ > 🚫 **Zero Tolerance Policy:** Không khoan nhượng với code rác, đặc biệt là **God Objects** và **God Files**.
17
+
18
+ ---
19
+
20
+ ## 📐 CORE PHILOSOPHIES (Triết lý Bất biến)
21
+
22
+ ### A. SOLID Principles (Bắt buộc)
23
+
24
+ | Principle | Rule | Flutter Example |
25
+ |-----------|------|----------------|
26
+ | **S - Single Responsibility** | Một class/hàm chỉ làm 1 việc duy nhất | `LoginUseCase` chỉ xử lý login, không validate form |
27
+ | **O - Open/Closed** | Mở để mở rộng, đóng để sửa đổi | Dùng `abstract class AuthProvider` thay vì `if-else` |
28
+ | **L - Liskov Substitution** | Class con thay thế hoàn hảo class cha | `GoogleAuth extends AuthProvider` hoạt động như AuthProvider |
29
+ | **I - Interface Segregation** | Không ép client dùng hàm không cần | Tách `Readable` và `Writable` thay vì `FileHandler` |
30
+ | **D - Dependency Inversion** | Phụ thuộc Abstraction, không Implementation | Inject `AuthRepository` interface, không phải `FirebaseAuthRepository` |
31
+
32
+ ### B. Pragmatic Rules
33
+
34
+ | Rule | Guideline | Action |
35
+ |------|-----------|--------|
36
+ | **DRY** | Logic lặp lại > 2 lần | ➜ Tách hàm/Class ngay |
37
+ | **KISS** | Đơn giản là đỉnh cao | ➜ Ưu tiên giải pháp dễ hiểu nhất |
38
+ | **YAGNI** | Không code cho tương lai viển vông | ➜ Chỉ build những gì cần ngay |
39
+ | **Boy Scout Rule** | Dọn dẹp code rác khi nhìn thấy | ➜ Refactor ngay, không để nợ |
40
+
41
+ ---
42
+
43
+ ## ⛔ HARD CONSTRAINTS (Vùng Cấm)
44
+
45
+ ### 🚫 NO GOD CLASSES
46
+
47
+ | Indicator | Threshold | Action |
48
+ |-----------|-----------|--------|
49
+ | Public methods | > 10 methods | 🔴 **REFACTOR** |
50
+ | Lines of logic | > 200 lines | 🔴 **REFACTOR** |
51
+ | Mixed concerns | Logic + UI + DB | 🔴 **TÁCH NGAY** |
52
+
53
+ ### 🚫 NO GOD FILES
54
+
55
+ | Rule | Limit |
56
+ |------|-------|
57
+ | **File size** | ≤ 300 dòng (tối đa 500) |
58
+ | **Classes per file** | 1 Class chính duy nhất |
59
+
60
+ ### 🚫 NO LOGIC LEAKAGE
61
+
62
+ | Violation | Correct Layer |
63
+ |-----------|---------------|
64
+ | Business Logic trong Widget | ➜ Move to `UseCase` / `Service` |
65
+ | SQL/Query trong Controller | ➜ Move to `Repository` |
66
+ | API calls trong UI | ➜ Move to `DataSource` |
67
+
68
+ ---
69
+
70
+ ## 🔄 INTERACTION FLOW (ABCR)
71
+
72
+ 1. **AUDIT** - Quét code smells, kiểm tra God Class/File
73
+ 2. **BLOCK** - Cảnh báo nếu vi phạm, giải thích Technical Debt
74
+ 3. **REFACTOR** - Sửa kiến trúc trước khi fix bug
75
+ 4. **EXPLAIN** - Giải thích lý do tách/refactor
76
+
77
+ ---
78
+
79
+ ## Prerequisites
80
+
81
+ ```bash
82
+ python3 --version || python --version
83
+ ```
84
+
85
+ ---
86
+
87
+ ## How to Use This {{SKILL_OR_WORKFLOW}}
88
+
89
+ ### Step 1: Analyze User Requirements
90
+
91
+ Trích xuất thông tin từ request:
92
+ - **Architecture**: Clean Architecture, Feature-First, DDD
93
+ - **State Management**: Riverpod (default), Bloc, Provider
94
+ - **UI Components**: Widgets, Layouts, Animations
95
+
96
+ ### Step 2: Search Relevant Data
97
+
98
+ ```bash
99
+ python3 {{SCRIPT_PATH}}/search.py "<keyword>" --top 5
100
+ ```
101
+
102
+ **Với domain cụ thể:**
103
+ ```bash
104
+ python3 {{SCRIPT_PATH}}/search.py "<keyword>" --domain widget --top 5
105
+ python3 {{SCRIPT_PATH}}/search.py "<keyword>" --domain package --top 5
106
+ ```
107
+
108
+ **Với stack filter:**
109
+ ```bash
110
+ python3 {{SCRIPT_PATH}}/search.py "<keyword>" --stack riverpod --top 5
111
+ ```
112
+
113
+ **Available domains:** `widget`, `package`, `pattern`, `architect`, `chart`, `color`, `typography`, `style`, `ux`, `icon`, `landing`, `naming`, `product`, `prompt`
114
+
115
+ **Available stacks:** `riverpod`, `bloc`, `provider`
116
+
117
+ ---
118
+
119
+ ## Search Reference
120
+
121
+ | Domain | File | Content |
122
+ |--------|------|---------|
123
+ | Widgets | `widget.csv` | 65+ Flutter widgets |
124
+ | Packages | `package.csv` | 100+ packages |
125
+ | Patterns | `patterns.csv` | 100+ design patterns |
126
+ | Architecture | `architect.csv` | Clean Architecture layers |
127
+ | Charts | `charts.csv` | Chart recommendations |
128
+ | Colors | `colors.csv` | Color palettes |
129
+ | Typography | `typography.csv` | Font pairings |
130
+ | Styles | `styles.csv` | UI style guidelines |
131
+ | UX Guidelines | `ux-guidelines.csv` | UX best practices |
132
+ | Icons | `icons.csv` | Icon recommendations |
133
+ | Landing | `landing.csv` | Landing page patterns |
134
+ | Naming | `name_convention.csv` | Naming conventions |
135
+ | Products | `products.csv` | Product type styling |
136
+ | Prompts | `prompts.csv` | AI prompt templates |
137
+
138
+ ---
139
+
140
+ ## Technical Standards
141
+
142
+ ### Dart 3 Modern Syntax
143
+ ```dart
144
+ // ✅ Records
145
+ (String name, int age) getUserInfo() => ('John', 25);
146
+
147
+ // ✅ Pattern Matching
148
+ String getMessage(UIState state) => switch (state) {
149
+ LoadingState() => 'Loading...',
150
+ DataState(data: var d) => 'Data: $d',
151
+ ErrorState(message: var m) => 'Error: $m',
152
+ };
153
+ ```
154
+
155
+ ### Performance Rules
156
+ - Luôn dùng `const` constructor khi có thể
157
+ - Ưu tiên `SizedBox` hơn `Container` cho spacing
158
+ - Dùng `ListView.builder` thay vì `ListView` + `children`
159
+
160
+ ### State Management
161
+ - **Default**: Riverpod với `riverpod_generator`
162
+ - **Alternative**: Bloc (khi user yêu cầu)
163
+
164
+ ---
165
+
166
+ ## Pre-Delivery Checklist
167
+
168
+ ### 🏛️ Pragmatic Architect
169
+ - [ ] No God Class (≤ 10 methods, ≤ 200 lines)
170
+ - [ ] No God File (≤ 300 lines)
171
+ - [ ] No Logic Leakage
172
+ - [ ] SOLID Compliance
173
+
174
+ ### Code Quality
175
+ - [ ] `const` constructors
176
+ - [ ] Sound Null Safety
177
+ - [ ] Dart 3 syntax
178
+ - [ ] Clear naming
179
+ {{QUICK_REFERENCE}}
@@ -0,0 +1,21 @@
1
+ {
2
+ "platform": "antigravity",
3
+ "displayName": "Antigravity / Generic Agent",
4
+ "installType": "full",
5
+ "folderStructure": {
6
+ "root": ".agent",
7
+ "skillPath": "skills/flutter-pro-max",
8
+ "filename": "SKILL.md"
9
+ },
10
+ "scriptPath": "skills/flutter-pro-max/scripts/search.py",
11
+ "frontmatter": {
12
+ "name": "flutter-pro-max",
13
+ "description": "Flutter design intelligence. Widgets, packages, patterns, architecture, UI/UX best practices."
14
+ },
15
+ "sections": {
16
+ "quickReference": false
17
+ },
18
+ "title": "Flutter Pro Max",
19
+ "description": "Comprehensive Flutter development guide with searchable database of widgets, packages, design patterns, architecture guidelines, performance optimization, accessibility, and UI/UX best practices.",
20
+ "skillOrWorkflow": "Skill"
21
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "platform": "claude",
3
+ "displayName": "Claude Code",
4
+ "installType": "full",
5
+ "folderStructure": {
6
+ "root": ".claude",
7
+ "skillPath": "skills/flutter-pro-max",
8
+ "filename": "SKILL.md"
9
+ },
10
+ "scriptPath": ".claude/skills/flutter-pro-max/scripts",
11
+ "frontmatter": {
12
+ "name": "flutter-pro-max",
13
+ "description": "Chuyên gia Flutter với kiến thức sâu về Clean Architecture, Performance và Modern Dart 3"
14
+ },
15
+ "sections": {
16
+ "quickReference": true
17
+ },
18
+ "title": "Flutter Pro Max - Flutter Design Intelligence",
19
+ "description": "Searchable database của Flutter widgets, packages, design patterns, architecture guidelines, và best practices.",
20
+ "skillOrWorkflow": "Skill"
21
+ }