flutter-pro-max-cli 1.0.0 → 1.0.1
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.
- package/assets/.agent/workflows/flutter-pro-max.md +60 -62
- package/assets/.agent/workflows/scripts/core.py +4 -0
- package/assets/.claude/skills/flutter-pro-max/SKILL.md +46 -63
- package/assets/.claude/skills/flutter-pro-max/scripts/core.py +4 -0
- package/assets/.codebuddy/commands/flutter-pro-max.md +142 -35
- package/assets/.codebuddy/commands/scripts/core.py +4 -0
- package/assets/.codex/skills/flutter-pro-max/SKILL.md +116 -51
- package/assets/.codex/skills/flutter-pro-max/scripts/core.py +4 -0
- package/assets/.cursor/commands/flutter-pro-max.md +65 -54
- package/assets/.cursor/commands/scripts/core.py +4 -0
- package/assets/.gemini/skills/flutter-pro-max/SKILL.md +116 -51
- package/assets/.gemini/skills/flutter-pro-max/scripts/core.py +4 -0
- package/assets/.github/prompts/flutter-pro-max.prompt.md +145 -41
- package/assets/.github/prompts/scripts/core.py +4 -0
- package/assets/.kiro/steering/flutter-pro-max.md +141 -37
- package/assets/.kiro/steering/scripts/core.py +4 -0
- package/assets/.qoder/rules/flutter-pro-max.md +141 -35
- package/assets/.qoder/rules/scripts/core.py +4 -0
- package/assets/.roo/commands/flutter-pro-max.md +141 -35
- package/assets/.roo/commands/scripts/core.py +4 -0
- package/assets/.trae/skills/flutter-pro-max/SKILL.md +141 -37
- package/assets/.trae/skills/flutter-pro-max/scripts/core.py +4 -0
- package/assets/.windsurf/workflows/flutter-pro-max.md +65 -54
- package/assets/.windsurf/workflows/scripts/core.py +4 -0
- package/package.json +1 -1
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
2
|
+
name: flutter-pro-max
|
|
3
|
+
description: Chuyên gia Flutter với kiến thức sâu về Clean Architecture, Performance và Modern Dart 3
|
|
3
4
|
---
|
|
4
5
|
|
|
5
|
-
#
|
|
6
|
+
# Flutter Pro Max - Flutter Design Intelligence
|
|
6
7
|
|
|
7
|
-
Searchable database của Flutter widgets, packages, design patterns, architecture guidelines,
|
|
8
|
+
Searchable database của Flutter widgets, packages, design patterns, architecture guidelines, và best practices.
|
|
8
9
|
|
|
9
10
|
## Prerequisites
|
|
10
11
|
|
|
12
|
+
Chỉ cần Python (không cần pip install):
|
|
13
|
+
|
|
11
14
|
```bash
|
|
12
|
-
python3 --version
|
|
13
|
-
pip install rank-bm25
|
|
15
|
+
python3 --version || python --version
|
|
14
16
|
```
|
|
15
17
|
|
|
16
18
|
---
|
|
17
19
|
|
|
18
|
-
## How to Use This
|
|
20
|
+
## How to Use This Skill
|
|
19
21
|
|
|
20
|
-
Khi user yêu cầu Flutter work, follow workflow này:
|
|
22
|
+
Khi user yêu cầu Flutter work (design, build, create, implement, review, fix, improve), follow workflow này:
|
|
21
23
|
|
|
22
24
|
### Step 1: Analyze User Requirements
|
|
23
25
|
|
|
@@ -25,44 +27,35 @@ Trích xuất thông tin từ request:
|
|
|
25
27
|
- **Architecture**: Clean Architecture, Feature-First, DDD
|
|
26
28
|
- **State Management**: Riverpod (default), Bloc, Provider
|
|
27
29
|
- **UI Components**: Widgets, Layouts, Animations
|
|
28
|
-
- **Design**: Colors, Typography, Styles
|
|
29
30
|
- **Package needs**: Networking, Database, Security, etc.
|
|
30
31
|
|
|
31
|
-
### Step 2: Search Relevant Data
|
|
32
|
+
### Step 2: Search Relevant Data
|
|
33
|
+
|
|
34
|
+
Sử dụng `search.py` để tìm kiếm (auto-detect domain):
|
|
32
35
|
|
|
33
36
|
```bash
|
|
34
37
|
python3 .agent/workflows/scripts/search.py "<keyword>" --top 5
|
|
35
|
-
python3 .agent/workflows/scripts/search.py "<keyword>" --stack riverpod --top 5
|
|
36
38
|
```
|
|
37
39
|
|
|
38
|
-
**
|
|
39
|
-
|
|
40
|
-
**Search Examples by Domain:**
|
|
40
|
+
**Với domain cụ thể:**
|
|
41
41
|
```bash
|
|
42
|
-
|
|
43
|
-
python3 .agent/workflows/scripts/search.py "
|
|
44
|
-
|
|
45
|
-
# Design Patterns
|
|
46
|
-
python3 .agent/workflows/scripts/search.py "authentication login" --top 5
|
|
47
|
-
|
|
48
|
-
# Charts
|
|
49
|
-
python3 .agent/workflows/scripts/search.py "chart bar comparison" --top 5
|
|
50
|
-
|
|
51
|
-
# Typography
|
|
52
|
-
python3 .agent/workflows/scripts/search.py "font modern SaaS" --top 5
|
|
42
|
+
python3 .agent/workflows/scripts/search.py "<keyword>" --domain widget --top 5
|
|
43
|
+
python3 .agent/workflows/scripts/search.py "<keyword>" --domain package --top 5
|
|
44
|
+
```
|
|
53
45
|
|
|
54
|
-
|
|
55
|
-
|
|
46
|
+
**Với stack filter (loại bỏ conflicts):**
|
|
47
|
+
```bash
|
|
48
|
+
python3 .agent/workflows/scripts/search.py "<keyword>" --stack riverpod --top 5
|
|
49
|
+
```
|
|
56
50
|
|
|
57
|
-
|
|
58
|
-
python3 .agent/workflows/scripts/search.py "touch target accessibility" --top 5
|
|
51
|
+
**Available domains:** `widget`, `package`, `pattern`, `architect`, `chart`, `color`, `typography`, `style`, `ux`, `icon`, `landing`, `naming`, `product`, `prompt`
|
|
59
52
|
|
|
60
|
-
|
|
61
|
-
python3 .agent/workflows/scripts/search.py "glassmorphism neumorphism" --top 5
|
|
62
|
-
```
|
|
53
|
+
**Available stacks:** `riverpod`, `bloc`, `provider`
|
|
63
54
|
|
|
64
55
|
### Step 3: Apply Technical Standards
|
|
65
56
|
|
|
57
|
+
Luôn tuân thủ các tiêu chuẩn:
|
|
58
|
+
|
|
66
59
|
#### Dart 3 Modern Syntax
|
|
67
60
|
```dart
|
|
68
61
|
// ✅ Records
|
|
@@ -89,24 +82,40 @@ String getMessage(UIState state) => switch (state) {
|
|
|
89
82
|
|
|
90
83
|
## Search Reference
|
|
91
84
|
|
|
92
|
-
### Available Data
|
|
85
|
+
### Available Data
|
|
93
86
|
|
|
94
|
-
|
|
|
95
|
-
|
|
96
|
-
|
|
|
97
|
-
|
|
|
98
|
-
|
|
|
87
|
+
| Domain | File | Content |
|
|
88
|
+
|--------|------|---------|
|
|
89
|
+
| Widgets | `widget.csv` | 65+ Flutter widgets với pro-tips |
|
|
90
|
+
| Packages | `package.csv` | 100+ packages với best practices |
|
|
91
|
+
| Patterns | `patterns.csv` | 100+ design patterns với code snippets |
|
|
99
92
|
| Architecture | `architect.csv` | Clean Architecture layer paths |
|
|
100
|
-
|
|
|
101
|
-
|
|
|
102
|
-
| Typography | `typography.csv` | Font pairings
|
|
103
|
-
|
|
|
104
|
-
| UX
|
|
105
|
-
|
|
|
106
|
-
| Landing | `landing.csv` | Landing page
|
|
107
|
-
| Naming | `name_convention.csv` |
|
|
108
|
-
|
|
|
109
|
-
|
|
|
93
|
+
| Charts | `charts.csv` | Chart type recommendations |
|
|
94
|
+
| Colors | `colors.csv` | Color palettes by product type |
|
|
95
|
+
| Typography | `typography.csv` | Font pairings |
|
|
96
|
+
| Styles | `styles.csv` | UI style guidelines |
|
|
97
|
+
| UX Guidelines | `ux-guidelines.csv` | UX best practices |
|
|
98
|
+
| Icons | `icons.csv` | Icon recommendations |
|
|
99
|
+
| Landing | `landing.csv` | Landing page patterns |
|
|
100
|
+
| Naming | `name_convention.csv` | Naming conventions |
|
|
101
|
+
| Products | `products.csv` | Product type styling |
|
|
102
|
+
| Prompts | `prompts.csv` | AI prompt templates |
|
|
103
|
+
|
|
104
|
+
### Search Examples
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# Auto-detect domain
|
|
108
|
+
python3 .agent/workflows/scripts/search.py "ListView" --top 5
|
|
109
|
+
|
|
110
|
+
# Specific domain
|
|
111
|
+
python3 .agent/workflows/scripts/search.py "network http" --domain package --top 5
|
|
112
|
+
|
|
113
|
+
# Stack filter
|
|
114
|
+
python3 .agent/workflows/scripts/search.py "state" --stack riverpod --top 5
|
|
115
|
+
|
|
116
|
+
# JSON output
|
|
117
|
+
python3 .agent/workflows/scripts/search.py "login" --json --top 3
|
|
118
|
+
```
|
|
110
119
|
|
|
111
120
|
---
|
|
112
121
|
|
|
@@ -116,25 +125,20 @@ String getMessage(UIState state) => switch (state) {
|
|
|
116
125
|
|
|
117
126
|
1. **Search widgets:**
|
|
118
127
|
```bash
|
|
119
|
-
python3 .agent/workflows/scripts/search.py "form input
|
|
128
|
+
python3 .agent/workflows/scripts/search.py "form input" --domain widget --top 5
|
|
120
129
|
```
|
|
121
130
|
|
|
122
131
|
2. **Search patterns:**
|
|
123
132
|
```bash
|
|
124
|
-
python3 .agent/workflows/scripts/search.py "authentication login" --top 5
|
|
133
|
+
python3 .agent/workflows/scripts/search.py "authentication login" --domain pattern --top 5
|
|
125
134
|
```
|
|
126
135
|
|
|
127
136
|
3. **Search packages:**
|
|
128
137
|
```bash
|
|
129
|
-
python3 .agent/workflows/scripts/search.py "validation
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
4. **Search colors:**
|
|
133
|
-
```bash
|
|
134
|
-
python3 .agent/workflows/scripts/search.py "saas professional" --top 3
|
|
138
|
+
python3 .agent/workflows/scripts/search.py "validation" --domain package --stack riverpod --top 5
|
|
135
139
|
```
|
|
136
140
|
|
|
137
|
-
|
|
141
|
+
4. **Apply results** to generate code với Riverpod state management
|
|
138
142
|
|
|
139
143
|
---
|
|
140
144
|
|
|
@@ -159,9 +163,3 @@ String getMessage(UIState state) => switch (state) {
|
|
|
159
163
|
- [ ] Riverpod providers được tổ chức hợp lý
|
|
160
164
|
- [ ] Không leak state giữa các features
|
|
161
165
|
- [ ] Error handling với AsyncValue
|
|
162
|
-
|
|
163
|
-
### UX/UI
|
|
164
|
-
- [ ] Touch targets tối thiểu 44x44px
|
|
165
|
-
- [ ] Colors đúng với product type
|
|
166
|
-
- [ ] Typography phù hợp với brand
|
|
167
|
-
- [ ] WCAG contrast requirements
|
|
@@ -20,6 +20,10 @@ def _get_data_dir():
|
|
|
20
20
|
script_dir.parent / ".shared" / "data",
|
|
21
21
|
# When running from .shared/flutter-pro-max/scripts/
|
|
22
22
|
script_dir.parent.parent / "data",
|
|
23
|
+
# When running from .agent/workflows/scripts/ (nested 3 levels deep)
|
|
24
|
+
script_dir.parent.parent.parent / ".shared" / "data",
|
|
25
|
+
# When running from .claude/skills/flutter-pro-max/scripts/ (nested 4 levels deep)
|
|
26
|
+
script_dir.parent.parent.parent.parent / ".shared" / "data",
|
|
23
27
|
# Fallback: cwd
|
|
24
28
|
Path.cwd() / ".shared" / "data",
|
|
25
29
|
]
|
|
@@ -9,18 +9,12 @@ Searchable database của Flutter widgets, packages, design patterns, architectu
|
|
|
9
9
|
|
|
10
10
|
## Prerequisites
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Chỉ cần Python (không cần pip install):
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
15
|
python3 --version || python --version
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
Cài đặt dependency:
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
pip install rank-bm25
|
|
22
|
-
```
|
|
23
|
-
|
|
24
18
|
---
|
|
25
19
|
|
|
26
20
|
## How to Use This Skill
|
|
@@ -33,47 +27,30 @@ Trích xuất thông tin từ request:
|
|
|
33
27
|
- **Architecture**: Clean Architecture, Feature-First, DDD
|
|
34
28
|
- **State Management**: Riverpod (default), Bloc, Provider
|
|
35
29
|
- **UI Components**: Widgets, Layouts, Animations
|
|
36
|
-
- **Design**: Colors, Typography, Styles
|
|
37
30
|
- **Package needs**: Networking, Database, Security, etc.
|
|
38
31
|
|
|
39
32
|
### Step 2: Search Relevant Data
|
|
40
33
|
|
|
41
|
-
Sử dụng `search.py` để tìm kiếm
|
|
34
|
+
Sử dụng `search.py` để tìm kiếm (auto-detect domain):
|
|
42
35
|
|
|
43
36
|
```bash
|
|
44
37
|
python3 .claude/skills/flutter-pro-max/scripts/search.py "<keyword>" --top 5
|
|
45
38
|
```
|
|
46
39
|
|
|
47
|
-
**Với
|
|
40
|
+
**Với domain cụ thể:**
|
|
48
41
|
```bash
|
|
49
|
-
python3 .claude/skills/flutter-pro-max/scripts/search.py "<keyword>" --
|
|
42
|
+
python3 .claude/skills/flutter-pro-max/scripts/search.py "<keyword>" --domain widget --top 5
|
|
43
|
+
python3 .claude/skills/flutter-pro-max/scripts/search.py "<keyword>" --domain package --top 5
|
|
50
44
|
```
|
|
51
45
|
|
|
52
|
-
**
|
|
53
|
-
|
|
54
|
-
**Search Examples by Domain:**
|
|
46
|
+
**Với stack filter (loại bỏ conflicts):**
|
|
55
47
|
```bash
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
# Design Patterns
|
|
60
|
-
python3 scripts/search.py "authentication login" --top 5
|
|
61
|
-
|
|
62
|
-
# Charts
|
|
63
|
-
python3 scripts/search.py "chart bar comparison" --top 5
|
|
64
|
-
|
|
65
|
-
# Typography
|
|
66
|
-
python3 scripts/search.py "font modern SaaS" --top 5
|
|
67
|
-
|
|
68
|
-
# Colors by Product
|
|
69
|
-
python3 scripts/search.py "fintech crypto dark" --top 5
|
|
48
|
+
python3 .claude/skills/flutter-pro-max/scripts/search.py "<keyword>" --stack riverpod --top 5
|
|
49
|
+
```
|
|
70
50
|
|
|
71
|
-
|
|
72
|
-
python3 scripts/search.py "touch target accessibility" --top 5
|
|
51
|
+
**Available domains:** `widget`, `package`, `pattern`, `architect`, `chart`, `color`, `typography`, `style`, `ux`, `icon`, `landing`, `naming`, `product`, `prompt`
|
|
73
52
|
|
|
74
|
-
|
|
75
|
-
python3 scripts/search.py "glassmorphism neumorphism" --top 5
|
|
76
|
-
```
|
|
53
|
+
**Available stacks:** `riverpod`, `bloc`, `provider`
|
|
77
54
|
|
|
78
55
|
### Step 3: Apply Technical Standards
|
|
79
56
|
|
|
@@ -105,24 +82,40 @@ String getMessage(UIState state) => switch (state) {
|
|
|
105
82
|
|
|
106
83
|
## Search Reference
|
|
107
84
|
|
|
108
|
-
### Available Data
|
|
85
|
+
### Available Data
|
|
109
86
|
|
|
110
|
-
|
|
|
111
|
-
|
|
112
|
-
|
|
|
113
|
-
|
|
|
114
|
-
|
|
|
87
|
+
| Domain | File | Content |
|
|
88
|
+
|--------|------|---------|
|
|
89
|
+
| Widgets | `widget.csv` | 65+ Flutter widgets với pro-tips |
|
|
90
|
+
| Packages | `package.csv` | 100+ packages với best practices |
|
|
91
|
+
| Patterns | `patterns.csv` | 100+ design patterns với code snippets |
|
|
115
92
|
| Architecture | `architect.csv` | Clean Architecture layer paths |
|
|
116
|
-
|
|
|
117
|
-
|
|
|
118
|
-
| Typography | `typography.csv` | Font pairings
|
|
119
|
-
|
|
|
120
|
-
| UX
|
|
121
|
-
|
|
|
122
|
-
| Landing | `landing.csv` | Landing page
|
|
123
|
-
| Naming | `name_convention.csv` |
|
|
124
|
-
|
|
|
125
|
-
|
|
|
93
|
+
| Charts | `charts.csv` | Chart type recommendations |
|
|
94
|
+
| Colors | `colors.csv` | Color palettes by product type |
|
|
95
|
+
| Typography | `typography.csv` | Font pairings |
|
|
96
|
+
| Styles | `styles.csv` | UI style guidelines |
|
|
97
|
+
| UX Guidelines | `ux-guidelines.csv` | UX best practices |
|
|
98
|
+
| Icons | `icons.csv` | Icon recommendations |
|
|
99
|
+
| Landing | `landing.csv` | Landing page patterns |
|
|
100
|
+
| Naming | `name_convention.csv` | Naming conventions |
|
|
101
|
+
| Products | `products.csv` | Product type styling |
|
|
102
|
+
| Prompts | `prompts.csv` | AI prompt templates |
|
|
103
|
+
|
|
104
|
+
### Search Examples
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# Auto-detect domain
|
|
108
|
+
python3 .claude/skills/flutter-pro-max/scripts/search.py "ListView" --top 5
|
|
109
|
+
|
|
110
|
+
# Specific domain
|
|
111
|
+
python3 .claude/skills/flutter-pro-max/scripts/search.py "network http" --domain package --top 5
|
|
112
|
+
|
|
113
|
+
# Stack filter
|
|
114
|
+
python3 .claude/skills/flutter-pro-max/scripts/search.py "state" --stack riverpod --top 5
|
|
115
|
+
|
|
116
|
+
# JSON output
|
|
117
|
+
python3 .claude/skills/flutter-pro-max/scripts/search.py "login" --json --top 3
|
|
118
|
+
```
|
|
126
119
|
|
|
127
120
|
---
|
|
128
121
|
|
|
@@ -132,25 +125,20 @@ String getMessage(UIState state) => switch (state) {
|
|
|
132
125
|
|
|
133
126
|
1. **Search widgets:**
|
|
134
127
|
```bash
|
|
135
|
-
python3 scripts/search.py "form input
|
|
128
|
+
python3 .claude/skills/flutter-pro-max/scripts/search.py "form input" --domain widget --top 5
|
|
136
129
|
```
|
|
137
130
|
|
|
138
131
|
2. **Search patterns:**
|
|
139
132
|
```bash
|
|
140
|
-
python3 scripts/search.py "authentication login" --top 5
|
|
133
|
+
python3 .claude/skills/flutter-pro-max/scripts/search.py "authentication login" --domain pattern --top 5
|
|
141
134
|
```
|
|
142
135
|
|
|
143
136
|
3. **Search packages:**
|
|
144
137
|
```bash
|
|
145
|
-
python3 scripts/search.py "validation
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
4. **Search colors:**
|
|
149
|
-
```bash
|
|
150
|
-
python3 scripts/search.py "saas professional" --top 3
|
|
138
|
+
python3 .claude/skills/flutter-pro-max/scripts/search.py "validation" --domain package --stack riverpod --top 5
|
|
151
139
|
```
|
|
152
140
|
|
|
153
|
-
|
|
141
|
+
4. **Apply results** to generate code với Riverpod state management
|
|
154
142
|
|
|
155
143
|
---
|
|
156
144
|
|
|
@@ -175,8 +163,3 @@ String getMessage(UIState state) => switch (state) {
|
|
|
175
163
|
- [ ] Riverpod providers được tổ chức hợp lý
|
|
176
164
|
- [ ] Không leak state giữa các features
|
|
177
165
|
- [ ] Error handling với AsyncValue
|
|
178
|
-
|
|
179
|
-
### UX/UI
|
|
180
|
-
- [ ] Touch targets tối thiểu 44x44px
|
|
181
|
-
- [ ] Colors đúng với product type
|
|
182
|
-
- [ ] Typography phù hợp với brand
|
|
@@ -20,6 +20,10 @@ def _get_data_dir():
|
|
|
20
20
|
script_dir.parent / ".shared" / "data",
|
|
21
21
|
# When running from .shared/flutter-pro-max/scripts/
|
|
22
22
|
script_dir.parent.parent / "data",
|
|
23
|
+
# When running from .agent/workflows/scripts/ (nested 3 levels deep)
|
|
24
|
+
script_dir.parent.parent.parent / ".shared" / "data",
|
|
25
|
+
# When running from .claude/skills/flutter-pro-max/scripts/ (nested 4 levels deep)
|
|
26
|
+
script_dir.parent.parent.parent.parent / ".shared" / "data",
|
|
23
27
|
# Fallback: cwd
|
|
24
28
|
Path.cwd() / ".shared" / "data",
|
|
25
29
|
]
|
|
@@ -1,58 +1,165 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
2
|
+
name: flutter-pro-max
|
|
3
|
+
description: Chuyên gia Flutter với kiến thức sâu về Clean Architecture, Performance và Modern Dart 3
|
|
3
4
|
---
|
|
4
5
|
|
|
5
|
-
#
|
|
6
|
+
# Flutter Pro Max - Flutter Design Intelligence
|
|
6
7
|
|
|
7
|
-
Searchable database
|
|
8
|
+
Searchable database của Flutter widgets, packages, design patterns, architecture guidelines, và best practices.
|
|
8
9
|
|
|
9
10
|
## Prerequisites
|
|
10
11
|
|
|
12
|
+
Chỉ cần Python (không cần pip install):
|
|
13
|
+
|
|
11
14
|
```bash
|
|
12
|
-
|
|
15
|
+
python3 --version || python --version
|
|
13
16
|
```
|
|
14
17
|
|
|
15
|
-
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## How to Use This Skill
|
|
21
|
+
|
|
22
|
+
Khi user yêu cầu Flutter work (design, build, create, implement, review, fix, improve), follow workflow này:
|
|
23
|
+
|
|
24
|
+
### Step 1: Analyze User Requirements
|
|
25
|
+
|
|
26
|
+
Trích xuất thông tin từ request:
|
|
27
|
+
- **Architecture**: Clean Architecture, Feature-First, DDD
|
|
28
|
+
- **State Management**: Riverpod (default), Bloc, Provider
|
|
29
|
+
- **UI Components**: Widgets, Layouts, Animations
|
|
30
|
+
- **Package needs**: Networking, Database, Security, etc.
|
|
31
|
+
|
|
32
|
+
### Step 2: Search Relevant Data
|
|
33
|
+
|
|
34
|
+
Sử dụng `search.py` để tìm kiếm (auto-detect domain):
|
|
16
35
|
|
|
17
36
|
```bash
|
|
18
37
|
python3 .codebuddy/commands/scripts/search.py "<keyword>" --top 5
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**Với domain cụ thể:**
|
|
41
|
+
```bash
|
|
42
|
+
python3 .codebuddy/commands/scripts/search.py "<keyword>" --domain widget --top 5
|
|
43
|
+
python3 .codebuddy/commands/scripts/search.py "<keyword>" --domain package --top 5
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**Với stack filter (loại bỏ conflicts):**
|
|
47
|
+
```bash
|
|
19
48
|
python3 .codebuddy/commands/scripts/search.py "<keyword>" --stack riverpod --top 5
|
|
20
49
|
```
|
|
21
50
|
|
|
22
|
-
**
|
|
51
|
+
**Available domains:** `widget`, `package`, `pattern`, `architect`, `chart`, `color`, `typography`, `style`, `ux`, `icon`, `landing`, `naming`, `product`, `prompt`
|
|
52
|
+
|
|
53
|
+
**Available stacks:** `riverpod`, `bloc`, `provider`
|
|
54
|
+
|
|
55
|
+
### Step 3: Apply Technical Standards
|
|
56
|
+
|
|
57
|
+
Luôn tuân thủ các tiêu chuẩn:
|
|
58
|
+
|
|
59
|
+
#### Dart 3 Modern Syntax
|
|
60
|
+
```dart
|
|
61
|
+
// ✅ Records
|
|
62
|
+
(String name, int age) getUserInfo() => ('John', 25);
|
|
63
|
+
|
|
64
|
+
// ✅ Pattern Matching
|
|
65
|
+
String getMessage(UIState state) => switch (state) {
|
|
66
|
+
LoadingState() => 'Loading...',
|
|
67
|
+
DataState(data: var d) => 'Data: $d',
|
|
68
|
+
ErrorState(message: var m) => 'Error: $m',
|
|
69
|
+
};
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
#### Performance Rules
|
|
73
|
+
- Luôn dùng `const` constructor khi có thể
|
|
74
|
+
- Ưu tiên `SizedBox` hơn `Container` cho spacing
|
|
75
|
+
- Dùng `ListView.builder` thay vì `ListView` + `children`
|
|
76
|
+
|
|
77
|
+
#### State Management
|
|
78
|
+
- **Default**: Riverpod với `riverpod_generator`
|
|
79
|
+
- **Alternative**: Bloc (khi user yêu cầu)
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Search Reference
|
|
84
|
+
|
|
85
|
+
### Available Data
|
|
86
|
+
|
|
87
|
+
| Domain | File | Content |
|
|
88
|
+
|--------|------|---------|
|
|
89
|
+
| Widgets | `widget.csv` | 65+ Flutter widgets với pro-tips |
|
|
90
|
+
| Packages | `package.csv` | 100+ packages với best practices |
|
|
91
|
+
| Patterns | `patterns.csv` | 100+ design patterns với code snippets |
|
|
92
|
+
| Architecture | `architect.csv` | Clean Architecture layer paths |
|
|
93
|
+
| Charts | `charts.csv` | Chart type recommendations |
|
|
94
|
+
| Colors | `colors.csv` | Color palettes by product type |
|
|
95
|
+
| Typography | `typography.csv` | Font pairings |
|
|
96
|
+
| Styles | `styles.csv` | UI style guidelines |
|
|
97
|
+
| UX Guidelines | `ux-guidelines.csv` | UX best practices |
|
|
98
|
+
| Icons | `icons.csv` | Icon recommendations |
|
|
99
|
+
| Landing | `landing.csv` | Landing page patterns |
|
|
100
|
+
| Naming | `name_convention.csv` | Naming conventions |
|
|
101
|
+
| Products | `products.csv` | Product type styling |
|
|
102
|
+
| Prompts | `prompts.csv` | AI prompt templates |
|
|
103
|
+
|
|
104
|
+
### Search Examples
|
|
105
|
+
|
|
23
106
|
```bash
|
|
24
|
-
#
|
|
107
|
+
# Auto-detect domain
|
|
25
108
|
python3 .codebuddy/commands/scripts/search.py "ListView" --top 5
|
|
26
109
|
|
|
27
|
-
#
|
|
28
|
-
python3 .codebuddy/commands/scripts/search.py "
|
|
110
|
+
# Specific domain
|
|
111
|
+
python3 .codebuddy/commands/scripts/search.py "network http" --domain package --top 5
|
|
29
112
|
|
|
30
|
-
#
|
|
31
|
-
python3 .codebuddy/commands/scripts/search.py "
|
|
113
|
+
# Stack filter
|
|
114
|
+
python3 .codebuddy/commands/scripts/search.py "state" --stack riverpod --top 5
|
|
32
115
|
|
|
33
|
-
#
|
|
34
|
-
python3 .codebuddy/commands/scripts/search.py "
|
|
116
|
+
# JSON output
|
|
117
|
+
python3 .codebuddy/commands/scripts/search.py "login" --json --top 3
|
|
35
118
|
```
|
|
36
119
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Example Workflow
|
|
123
|
+
|
|
124
|
+
**User Request:** "Tạo màn hình đăng nhập với Riverpod"
|
|
125
|
+
|
|
126
|
+
1. **Search widgets:**
|
|
127
|
+
```bash
|
|
128
|
+
python3 .codebuddy/commands/scripts/search.py "form input" --domain widget --top 5
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
2. **Search patterns:**
|
|
132
|
+
```bash
|
|
133
|
+
python3 .codebuddy/commands/scripts/search.py "authentication login" --domain pattern --top 5
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
3. **Search packages:**
|
|
137
|
+
```bash
|
|
138
|
+
python3 .codebuddy/commands/scripts/search.py "validation" --domain package --stack riverpod --top 5
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
4. **Apply results** to generate code với Riverpod state management
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Pre-Delivery Checklist
|
|
146
|
+
|
|
147
|
+
### Code Quality
|
|
148
|
+
- [ ] Sử dụng `const` constructors
|
|
149
|
+
- [ ] Sound Null Safety (không dùng `!` bừa bãi)
|
|
150
|
+
- [ ] Dart 3 syntax (Records, Pattern Matching)
|
|
151
|
+
|
|
152
|
+
### Performance
|
|
153
|
+
- [ ] `ListView.builder` cho lists dài
|
|
154
|
+
- [ ] `SizedBox` thay vì `Container` cho spacing
|
|
155
|
+
- [ ] `const` widgets được đánh dấu
|
|
156
|
+
|
|
157
|
+
### Architecture
|
|
158
|
+
- [ ] Tuân thủ Clean Architecture layers
|
|
159
|
+
- [ ] Dependency Injection đúng cách
|
|
160
|
+
- [ ] Repository pattern cho data access
|
|
161
|
+
|
|
162
|
+
### State Management
|
|
163
|
+
- [ ] Riverpod providers được tổ chức hợp lý
|
|
164
|
+
- [ ] Không leak state giữa các features
|
|
165
|
+
- [ ] Error handling với AsyncValue
|
|
@@ -20,6 +20,10 @@ def _get_data_dir():
|
|
|
20
20
|
script_dir.parent / ".shared" / "data",
|
|
21
21
|
# When running from .shared/flutter-pro-max/scripts/
|
|
22
22
|
script_dir.parent.parent / "data",
|
|
23
|
+
# When running from .agent/workflows/scripts/ (nested 3 levels deep)
|
|
24
|
+
script_dir.parent.parent.parent / ".shared" / "data",
|
|
25
|
+
# When running from .claude/skills/flutter-pro-max/scripts/ (nested 4 levels deep)
|
|
26
|
+
script_dir.parent.parent.parent.parent / ".shared" / "data",
|
|
23
27
|
# Fallback: cwd
|
|
24
28
|
Path.cwd() / ".shared" / "data",
|
|
25
29
|
]
|