flutter-pro-max-cli 2.3.4 → 2.4.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.
- package/README.md +9 -0
- package/assets/data/charts.csv +25 -25
- package/assets/data/colors.csv +96 -96
- package/assets/data/landing.csv +30 -30
- package/assets/data/play-store.csv +14 -0
- package/assets/data/products.csv +96 -96
- package/assets/data/prompts.csv +20 -20
- package/assets/data/styles.csv +58 -58
- package/assets/data/ux-guidelines.csv +99 -99
- package/assets/scripts/core.py +10 -0
- package/assets/scripts/search.py +4 -3
- package/assets/templates/base/quick-reference.md +11 -0
- package/assets/templates/base/rules/01_skill_usage.md +5 -0
- package/assets/templates/base/rules/02_code_quality.md +5 -0
- package/assets/templates/base/rules/03_interaction_flow.md +5 -0
- package/assets/templates/base/rules/04_app_consistency.md +5 -0
- package/assets/templates/base/rules/05_error_handling.md +5 -0
- package/assets/templates/base/rules/06_testing.md +5 -0
- package/assets/templates/base/rules/07_performance.md +17 -2
- package/assets/templates/base/rules/08_security.md +5 -0
- package/assets/templates/base/rules/09_state_management.md +5 -0
- package/assets/templates/base/rules/10_naming_conventions.md +5 -0
- package/assets/templates/base/rules/11_accessibility.md +5 -0
- package/assets/templates/base/rules/12_network_resiliency.md +22 -0
- package/assets/templates/base/rules/13_offline_first.md +25 -0
- package/assets/templates/base/rules/14_ui_graceful_degradation.md +23 -0
- package/assets/templates/base/rules/15_state_lifecycle.md +30 -0
- package/assets/templates/base/rules/16_google_play_aso.md +40 -0
- package/assets/templates/base/rules/17_google_play_compliance.md +39 -0
- package/assets/templates/base/rules/18_google_play_visuals.md +35 -0
- package/assets/templates/base/skill-content.md +30 -1
- package/dist/utils/template.js +12 -4
- package/package.json +1 -1
package/assets/scripts/search.py
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
"""
|
|
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
|
-
|
|
7
|
-
|
|
6
|
+
python search.py "<query>" --design-system [-p "Project Name"]
|
|
7
|
+
python search.py "<query>" --design-system --persist [-p "Project Name"] [--page "dashboard"]
|
|
8
8
|
|
|
9
|
-
Domains: widget, package, pattern, architect, chart, color, typography, style, ux, icon, landing, naming, product, prompt, performance, ui-reasoning, accessibility
|
|
9
|
+
Domains: widget, package, pattern, architect, chart, color, typography, style, ux, icon, landing, naming, product, prompt, play-store, performance, ui-reasoning, accessibility
|
|
10
10
|
Stacks: riverpod, bloc, provider
|
|
11
11
|
|
|
12
12
|
Persistence (Master + Overrides pattern):
|
|
@@ -68,6 +68,7 @@ Examples:
|
|
|
68
68
|
python search.py "ListView pagination" --top 3
|
|
69
69
|
python search.py "network http" --domain package
|
|
70
70
|
python search.py "state management" --stack riverpod
|
|
71
|
+
python search.py "google play store listing" --domain play-store
|
|
71
72
|
python search.py "login" --json
|
|
72
73
|
"""
|
|
73
74
|
)
|
|
@@ -34,6 +34,10 @@ python3 {{SCRIPT_PATH}}/search.py "state" --stack provider --top 5
|
|
|
34
34
|
|
|
35
35
|
# JSON output
|
|
36
36
|
python3 {{SCRIPT_PATH}}/search.py "login" --json --top 3
|
|
37
|
+
|
|
38
|
+
# Google Play Console workflow
|
|
39
|
+
python3 {{SCRIPT_PATH}}/search.py "google play listing" --domain play-store --top 5
|
|
40
|
+
python3 {{SCRIPT_PATH}}/search.py "data safety content rating" --domain play-store --json --top 5
|
|
37
41
|
```
|
|
38
42
|
|
|
39
43
|
### Package Management
|
|
@@ -73,6 +77,13 @@ dart pub remove <package_name>
|
|
|
73
77
|
|
|
74
78
|
4. **Apply results** với native state management (ValueNotifier/ChangeNotifier)
|
|
75
79
|
|
|
80
|
+
### Google Play Console Workflow
|
|
81
|
+
|
|
82
|
+
1. Search `play-store` for ASO, listing copy, and compliance guidance.
|
|
83
|
+
2. Generate text assets with the correct limits before writing anything final.
|
|
84
|
+
3. Validate content rating, data safety, screenshots, and privacy policy details.
|
|
85
|
+
4. Export Markdown for humans and JSON for machine-readable handoff.
|
|
86
|
+
|
|
76
87
|
5. **Validate:**
|
|
77
88
|
```bash
|
|
78
89
|
dart format . && flutter analyze . && flutter test .
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Đảm bảo tính nhất quán (Consistency) của UI, Design Tokens, Widget Patterns
|
|
3
|
+
globs: lib/presentation/**/*.dart, lib/ui/**/*.dart, lib/widgets/**/*.dart
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Rule: App Consistency
|
|
2
7
|
|
|
3
8
|
> Kích hoạt: Khi tạo UI, thêm screen, hoặc chỉnh sửa widget
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Xử lý lỗi, Try-catch, Result pattern, Không fail im lặng
|
|
3
|
+
globs: lib/data/**/*.dart, lib/services/**/*.dart, lib/repositories/**/*.dart, lib/domain/**/*.dart
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Rule: Error Handling
|
|
2
7
|
|
|
3
8
|
> Kích hoạt: Khi viết logic xử lý dữ liệu, API calls, hoặc async operations
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Tối ưu hiệu năng, const, ListView.builder, Async computation
|
|
3
|
+
globs: lib/presentation/**/*.dart, lib/ui/**/*.dart, lib/widgets/**/*.dart
|
|
4
|
+
---
|
|
5
|
+
|
|
1
6
|
# Rule: Performance
|
|
2
7
|
|
|
3
8
|
> Kích hoạt: Khi viết widget, xử lý danh sách, hoặc async operations
|
|
@@ -37,11 +42,21 @@ ValueListenableBuilder<int>(
|
|
|
37
42
|
);
|
|
38
43
|
```
|
|
39
44
|
|
|
45
|
+
### 4. Performance (Bài toán Scale)
|
|
46
|
+
|
|
47
|
+
Code chạy mượt ở 10 items có thể crash app ở 10,000 items. Lỗi tràn RAM (OOM - Out of Memory) thường âm thầm và khó debug.
|
|
48
|
+
|
|
49
|
+
| Quy mô | Giải pháp Render |
|
|
50
|
+
|--------|------------------|
|
|
51
|
+
| Ít items (< 20) | `Column` bọc trong `SingleChildScrollView` (Có thể chấp nhận) |
|
|
52
|
+
| Nhiều items (Hàng ngàn) | **BẮT BUỘC** dùng `ListView.builder` kết hợp Pagination/Infinite Scroll |
|
|
53
|
+
| Bảng dữ liệu lớn | PaginatedDataTable hoặc Virtualized Lists |
|
|
54
|
+
|
|
40
55
|
### Checklist trước ship
|
|
41
56
|
|
|
42
57
|
- [ ] Tất cả widget có `const` constructor nếu có thể
|
|
43
58
|
- [ ] ListView/GridView dùng `.builder` hoặc `.separated`
|
|
59
|
+
- [ ] Màn hình danh sách có hỗ trợ phân trang (Pagination) nếu data có thể phình to
|
|
44
60
|
- [ ] Không có `print()` còn sót (dùng `developer.log`)
|
|
45
|
-
- [ ] Images có loading/error builders
|
|
46
61
|
|
|
47
|
-
> 🔴 **Nếu list > 20 items → BẮT BUỘC dùng `.builder`.**
|
|
62
|
+
> 🔴 **Nếu list > 20 items → BẮT BUỘC dùng `.builder`.** Luôn tự hỏi: *"Nếu user có 1 triệu record thì sao?"*
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Xử lý Network Failures, Tránh bão Request, Exponential Backoff, Circuit Breaker
|
|
3
|
+
globs: lib/data/**/*.dart, lib/services/**/*.dart, lib/repositories/**/*.dart
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Rule: Network & API Resiliency
|
|
7
|
+
|
|
8
|
+
> Kích hoạt: Khi viết API calls, cấu hình HTTP clients (Dio/Http), xử lý timeout
|
|
9
|
+
|
|
10
|
+
## Nguyên tắc: Tránh bão Request
|
|
11
|
+
|
|
12
|
+
Khi API lỗi do server quá tải, **TUYỆT ĐỐI KHÔNG** dùng vòng lặp retry vô tội vạ, vì sẽ tạo thêm gánh nặng làm sập hẳn server đang "thở oxy".
|
|
13
|
+
|
|
14
|
+
### Giải pháp bắt buộc
|
|
15
|
+
|
|
16
|
+
| Tình huống | Kỹ thuật áp dụng |
|
|
17
|
+
|------------|------------------|
|
|
18
|
+
| Lỗi 5xx / Timeout | **Exponential Backoff**: Tăng thời gian chờ sau mỗi lần thử (vd: 1s, 2s, 4s, 8s...) |
|
|
19
|
+
| Server chết liên tục | **Circuit Breaker**: Ngắt hoàn toàn request trong 1 khoảng thời gian nhất định để server phục hồi. |
|
|
20
|
+
| Mạng chập chờn | Cảnh báo UI thanh lịch (Snackbar / Retry button), không quăng exception đỏ màn hình. |
|
|
21
|
+
|
|
22
|
+
> 🔴 **Luôn tự hỏi:** *"Nếu API endpoint này sập, app của mình có sập theo hay không bị treo cứng không?"*
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Tư duy Offline-First, Cache dữ liệu, Đồng bộ ngầm, Xử lý khi mất mạng
|
|
3
|
+
globs: lib/data/**/*.dart, lib/repositories/**/*.dart, lib/presentation/**/*.dart
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Rule: Offline-First Experience
|
|
7
|
+
|
|
8
|
+
> Kích hoạt: Khi thiết kế luồng dữ liệu, fetch data cho màn hình chính (Dashboard, List)
|
|
9
|
+
|
|
10
|
+
## Nguyên tắc: Sống sót không cần mạng
|
|
11
|
+
|
|
12
|
+
Khi thiết bị lọt vào vùng mất mạng, **TUYỆT ĐỐI KHÔNG** để vòng xoay loading chạy vô tận hoặc văng ra màn hình trắng trơn.
|
|
13
|
+
|
|
14
|
+
### Kiến trúc Offline-First
|
|
15
|
+
|
|
16
|
+
1. **Lớp Cache Cache:** Bắt buộc có Local DB (SQLite, Isar, Hive) để lưu dữ liệu quan trọng.
|
|
17
|
+
2. **Luồng ưu tiên Local:**
|
|
18
|
+
- Khi mở màn hình: Load data từ Local DB hiển thị lên UI **ngay lập tức**.
|
|
19
|
+
- Kích hoạt đồng bộ ngầm (background fetch) với server.
|
|
20
|
+
- Khi có data mới từ server: Cập nhật DB nội bộ, luồng stream tự động đẩy data thiết kế mới lên UI một cách mượt mà.
|
|
21
|
+
|
|
22
|
+
### Checklist Offline
|
|
23
|
+
- [ ] Mở app khi ngắt Wi-Fi vẫn thấy được dữ liệu cũ.
|
|
24
|
+
- [ ] Thao tác (Like, Xoá, Nút bấm) được lưu tạm hàng đợi (Queue) để sync lại khi có mạng.
|
|
25
|
+
- [ ] Có thông báo tinh tế báo hiệu đang xài ở chế độ Offline.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Xử lý Graceful Degradation, Fallback UI khi component/dữ liệu lỗi
|
|
3
|
+
globs: lib/presentation/**/*.dart, lib/ui/**/*.dart, lib/widgets/**/*.dart
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Rule: Graceful Degradation (UI Fallback)
|
|
7
|
+
|
|
8
|
+
> Kích hoạt: Khi build UI components, handle Image Network, List Items
|
|
9
|
+
|
|
10
|
+
## Nguyên tắc: Lỗi cục bộ không được sập toàn cục
|
|
11
|
+
|
|
12
|
+
Khi một thành phần UI hoặc dữ liệu bị fail, **đừng làm sập cả màn hình**. Tính thanh lịch của app nằm ở việc fallback giấu lỗi.
|
|
13
|
+
|
|
14
|
+
### Các Fallback Pattern Bắt Buộc
|
|
15
|
+
|
|
16
|
+
| Lỗi Component | Giải pháp UI (Fallback) |
|
|
17
|
+
|---------------|-------------------------|
|
|
18
|
+
| Hình ảnh (Avatar, Banner) lỗi tải (CDN down/404) | Hiển thị Default Image Icon, Placeholder, hoặc Chữ cái đầu của Tên (Initials Avatar). |
|
|
19
|
+
| 1 Item lỗi trong ListView | Hiển thị `ErrorItemWidget` nhỏ cho riêng dòng đó, thay vì ném Exception break toàn list. |
|
|
20
|
+
| Font chữ không tải được | Cấu hình Fallback về System Font mặc định. |
|
|
21
|
+
| Widget tương tác lỗi | Vô hiệu hoá (Disable) nút bấm đó và đổi màu xám thay vì crash khi bấm. |
|
|
22
|
+
|
|
23
|
+
> 🔴 **Quy tắc vàng:** Luôn định nghĩa thuộc tính `errorBuilder` cho mọi Network Image.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Xử lý Vòng đời thiêt bị (Lifecycle), Orientation Change, Background State
|
|
3
|
+
globs: lib/presentation/**/*.dart, lib/logic/**/*.dart, lib/providers/**/*.dart
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Rule: State & Lifecycle Resilience
|
|
7
|
+
|
|
8
|
+
> Kích hoạt: Khi quản lý State (Bloc/Provider/Riverpod), xử lý orientation, handle app background state
|
|
9
|
+
|
|
10
|
+
## Nguyên tắc: Chống hao pin & lag vô ích
|
|
11
|
+
|
|
12
|
+
Quản lý vòng đời (lifecycle) kém sẽ làm máy nóng, lag và hao pin nhanh chóng, đặc biệt trên thiết bị Android yếu.
|
|
13
|
+
|
|
14
|
+
### Xử lý Lifecycle Events
|
|
15
|
+
|
|
16
|
+
1. **Xoay màn hình (Orientation Change):**
|
|
17
|
+
- Việc xoay dọc/ngang không được làm trigger lại các API requests.
|
|
18
|
+
- State phải được giữ nguyên bằng cơ chế State Management chuyên biệt, widget chỉ rebuild UI Layout.
|
|
19
|
+
|
|
20
|
+
2. **App chuyển vào nền (Backgrounded):**
|
|
21
|
+
- Lập tức ngắt (Pause/Cancel) các Streams liên tục (như vị trí GPS, socket).
|
|
22
|
+
- Tạm dừng các `Timer` đếm ngược.
|
|
23
|
+
|
|
24
|
+
3. **Memory Warning (Cảnh báo RAM):**
|
|
25
|
+
- Clear cache hình ảnh trong bộ nhớ (ví dụ: xoá cache network images).
|
|
26
|
+
- Giải phóng tài nguyên memory lớn không dùng tới.
|
|
27
|
+
|
|
28
|
+
### Rò rỉ bộ nhớ (Memory Leaks)
|
|
29
|
+
- Luôn gọi `dispose()` trên các Controller (AnimationController, ScrollController, TextEditingController).
|
|
30
|
+
- Đảm bảo huỷ (cancel) StreamSubscription khi Widget bị huỷ.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Google Play ASO, store listing copy, keyword strategy
|
|
3
|
+
globs: *
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Rule: Google Play ASO
|
|
7
|
+
|
|
8
|
+
> Kich hoat: Khi user yeu cau tao hoac toi uu listing Google Play, app name, short description, full description, keyword set, hoac export Play Console.
|
|
9
|
+
|
|
10
|
+
## Luon lam truoc khi viet copy
|
|
11
|
+
|
|
12
|
+
1. Xac dinh USP thuc su cua app.
|
|
13
|
+
2. Xac dinh persona chinh va pain point.
|
|
14
|
+
3. Lay keyword cluster theo y nghia, khong theo spam density.
|
|
15
|
+
4. Kiem tra gioi han text truoc khi tra ket qua.
|
|
16
|
+
|
|
17
|
+
## Gioi han can tuan thu
|
|
18
|
+
|
|
19
|
+
| Asset | Limit | Nguyen tac |
|
|
20
|
+
|------|-------|------------|
|
|
21
|
+
| App Name | 30 ky tu | Brand + 1 tu khoa chinh |
|
|
22
|
+
| Short Description | 80 ky tu | 1 cau, ro loi ich |
|
|
23
|
+
| Full Description | 4000 ky tu | Co cau truc, de scan |
|
|
24
|
+
|
|
25
|
+
## Khong duoc lam
|
|
26
|
+
|
|
27
|
+
- Khong dung "best", "#1", hoac claim phong dai.
|
|
28
|
+
- Khong spam keyword lap lai vo nghia.
|
|
29
|
+
- Khong viet copy khac voi tinh nang that.
|
|
30
|
+
- Khong bo qua kha nang da ngon ngu neu app co thi truong quoc te.
|
|
31
|
+
|
|
32
|
+
## Output mong doi
|
|
33
|
+
|
|
34
|
+
- App name
|
|
35
|
+
- Short description
|
|
36
|
+
- Full description
|
|
37
|
+
- Keyword set theo muc do uu tien
|
|
38
|
+
- Category va tags de xuat
|
|
39
|
+
|
|
40
|
+
> Neu thong tin dau vao khong du, phai ghi ro gia dinh va phan can xac minh.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Google Play content rating, data safety, privacy policy
|
|
3
|
+
globs: *
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Rule: Google Play Compliance
|
|
7
|
+
|
|
8
|
+
> Kich hoat: Khi user yeu cau content rating, data safety, privacy policy, location disclosure, hoac release checklist.
|
|
9
|
+
|
|
10
|
+
## Content Rating
|
|
11
|
+
|
|
12
|
+
- Tra loi IARC theo tinh nang that.
|
|
13
|
+
- Neu app co UGC, report, block, hoac moderation, phai de cap ro.
|
|
14
|
+
- Neu app co location, phai phan biet approximate va precise.
|
|
15
|
+
- Khong doan mo neu chua biet; danh dau can xac minh.
|
|
16
|
+
|
|
17
|
+
## Data Safety
|
|
18
|
+
|
|
19
|
+
- Chi khai bao du lieu that su thu thap hoac chia se.
|
|
20
|
+
- Neu co du lieu ca nhan, phai ghi ro muc dich su dung.
|
|
21
|
+
- Neu du lieu duoc ma hoa khi truyen, ghi ro "encrypted in transit".
|
|
22
|
+
- Neu app ho tro xoa du lieu, ghi ro duong dan request xoa.
|
|
23
|
+
|
|
24
|
+
## Privacy Policy
|
|
25
|
+
|
|
26
|
+
- Phai co URL on dinh va hoat dong.
|
|
27
|
+
- Phai neu ro loai du lieu, muc dich, retention, sharing, va contact.
|
|
28
|
+
- Email ho tro phai khop voi domain neu co the.
|
|
29
|
+
|
|
30
|
+
## Final Gate
|
|
31
|
+
|
|
32
|
+
Truoc khi xuat ket qua, phai kiem tra:
|
|
33
|
+
|
|
34
|
+
1. Content rating co trung thuc.
|
|
35
|
+
2. Data safety khop voi hanh vi san pham.
|
|
36
|
+
3. Privacy policy co link va noi dung day du.
|
|
37
|
+
4. Thong tin lien he hoat dong.
|
|
38
|
+
|
|
39
|
+
> Compliance sai se gay reject, nen uong dua vao facts, khong phai assumptions.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Google Play screenshots, feature graphic, icon guidance
|
|
3
|
+
globs: *
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Rule: Google Play Visuals
|
|
7
|
+
|
|
8
|
+
> Kich hoat: Khi user yeu cau screenshot, feature graphic, icon guidance, hoac visual pack cho Play Store.
|
|
9
|
+
|
|
10
|
+
## Screenshots
|
|
11
|
+
|
|
12
|
+
- Anh dau tien phai the hien core feature manh nhat.
|
|
13
|
+
- Thu tu anh nen di tu value -> feature -> trust -> CTA.
|
|
14
|
+
- Khong dung device mockup qua cu.
|
|
15
|
+
- Khong nhieu chu, khong lam nguoi xem phai doc qua lau.
|
|
16
|
+
|
|
17
|
+
## Feature Graphic
|
|
18
|
+
|
|
19
|
+
- Mot thong diep chinh, mot focal point ro rang.
|
|
20
|
+
- Chu to, ngan, de nhan biet tren mobile.
|
|
21
|
+
- Giu safe area sach, khong nhot qua nhieu icon.
|
|
22
|
+
|
|
23
|
+
## Icon / Brand
|
|
24
|
+
|
|
25
|
+
- Khong dung trademark cua ben thu ba neu khong co quyen.
|
|
26
|
+
- Giữ mau sac nhat quan voi app.
|
|
27
|
+
- Uu tien hinh khoi don gian, nhan dien nhanh.
|
|
28
|
+
|
|
29
|
+
## Quality Gate
|
|
30
|
+
|
|
31
|
+
- Co core feature ngay anh dau.
|
|
32
|
+
- Device mockup hien dai va dong nhat.
|
|
33
|
+
- Visual khong lam sai san pham that.
|
|
34
|
+
|
|
35
|
+
> Muc tieu la tang conversion, khong phai trang tri vo nghia.
|
|
@@ -43,7 +43,7 @@ python3 {{SCRIPT_PATH}}/search.py "<keyword>" --stack riverpod --top 5
|
|
|
43
43
|
python3 {{SCRIPT_PATH}}/search.py "<keyword>" --json --top 5
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
**Available domains (
|
|
46
|
+
**Available domains (18):** `widget`, `package`, `pattern`, `architect`, `chart`, `color`, `typography`, `style`, `ux`, `icon`, `landing`, `naming`, `product`, `prompt`, `play-store`, `performance`, `ui-reasoning`, `accessibility`
|
|
47
47
|
|
|
48
48
|
**Available stacks:** `riverpod`, `bloc`, `provider`
|
|
49
49
|
|
|
@@ -74,9 +74,38 @@ python3 {{SCRIPT_PATH}}/search.py "<keyword>" --json --top 5
|
|
|
74
74
|
| Naming | `name_convention.csv` | Naming conventions |
|
|
75
75
|
| Products | `products.csv` | Product type styling |
|
|
76
76
|
| Prompts | `prompts.csv` | AI prompt templates |
|
|
77
|
+
| Play Store | `play-store.csv` | ASO, store listing, compliance, privacy |
|
|
77
78
|
|
|
78
79
|
---
|
|
79
80
|
|
|
81
|
+
## Google Play Console Workflow
|
|
82
|
+
|
|
83
|
+
Use the `play-store` domain when the user asks for ASO, app listing copy, content rating, data safety, screenshots, privacy policy, or Play Console export.
|
|
84
|
+
|
|
85
|
+
### Suggested Flow
|
|
86
|
+
|
|
87
|
+
1. Analyze the app input and extract USP, persona, keywords, category, and tags.
|
|
88
|
+
2. Generate store text assets with strict length limits.
|
|
89
|
+
3. Validate compliance details for content rating, data safety, and privacy.
|
|
90
|
+
4. Produce screenshot and feature graphic guidance.
|
|
91
|
+
5. Export the result as Markdown and JSON when needed.
|
|
92
|
+
|
|
93
|
+
### Example Queries
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
python3 {{SCRIPT_PATH}}/search.py "google play store listing" --domain play-store --top 5
|
|
97
|
+
python3 {{SCRIPT_PATH}}/search.py "content rating data safety" --domain play-store --top 5
|
|
98
|
+
python3 {{SCRIPT_PATH}}/search.py "app name short description" --domain play-store --json --top 5
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Output Targets
|
|
102
|
+
|
|
103
|
+
- App Name: max 30 characters, brand + core keyword
|
|
104
|
+
- Short Description: max 80 characters, concise value proposition
|
|
105
|
+
- Full Description: max 4000 characters, structured and policy-safe
|
|
106
|
+
- Compliance Pack: content rating answers, data safety table, privacy notes
|
|
107
|
+
- Visual Pack: first screenshot guidance, feature graphic, icon rules
|
|
108
|
+
|
|
80
109
|
## Example Workflow
|
|
81
110
|
|
|
82
111
|
**User Request:** "Tạo màn hình đăng nhập"
|
package/dist/utils/template.js
CHANGED
|
@@ -93,12 +93,13 @@ export async function renderSkillFile(config) {
|
|
|
93
93
|
// Load base template (use config.template or default to skill-content.md)
|
|
94
94
|
const templateFile = config.template || 'skill-content.md';
|
|
95
95
|
let content = await loadTemplate(`base/${templateFile}`);
|
|
96
|
+
const scriptDir = dirname(config.scriptPath);
|
|
96
97
|
// Load quick reference if needed
|
|
97
98
|
let quickReferenceContent = '';
|
|
98
99
|
if (config.sections.quickReference) {
|
|
99
100
|
quickReferenceContent = await loadTemplate('base/quick-reference.md');
|
|
100
101
|
// Replace script path in quick reference
|
|
101
|
-
quickReferenceContent = quickReferenceContent.replace(/\{\{SCRIPT_PATH\}\}/g,
|
|
102
|
+
quickReferenceContent = quickReferenceContent.replace(/\{\{SCRIPT_PATH\}\}/g, scriptDir);
|
|
102
103
|
}
|
|
103
104
|
// Build the final content
|
|
104
105
|
const frontmatter = renderFrontmatter(config.frontmatter);
|
|
@@ -107,7 +108,7 @@ export async function renderSkillFile(config) {
|
|
|
107
108
|
content = content
|
|
108
109
|
.replace(/\{\{TITLE\}\}/g, config.title)
|
|
109
110
|
.replace(/\{\{DESCRIPTION\}\}/g, config.description)
|
|
110
|
-
.replace(/\{\{SCRIPT_PATH\}\}/g,
|
|
111
|
+
.replace(/\{\{SCRIPT_PATH\}\}/g, scriptDir)
|
|
111
112
|
.replace(/\{\{SKILL_OR_WORKFLOW\}\}/g, config.skillOrWorkflow)
|
|
112
113
|
.replace(/\{\{QUICK_REFERENCE\}\}/g, quickRefWithNewline);
|
|
113
114
|
return frontmatter + content;
|
|
@@ -172,11 +173,15 @@ async function generateRulesFile(targetDir, config) {
|
|
|
172
173
|
}
|
|
173
174
|
existing += '\n\n';
|
|
174
175
|
}
|
|
176
|
+
// Helper to strip YAML frontmatter for appended files
|
|
177
|
+
const stripFrontmatter = (content) => {
|
|
178
|
+
return content.replace(/^---\n[\s\S]*?\n---\n+/, '');
|
|
179
|
+
};
|
|
175
180
|
// Concatenate all rule files
|
|
176
181
|
const allRules = ['# Flutter Pro Max — Agent Rules\n'];
|
|
177
182
|
for (const file of ruleFiles) {
|
|
178
183
|
const content = await readFile(join(rulesDir, file), 'utf-8');
|
|
179
|
-
allRules.push(content);
|
|
184
|
+
allRules.push(stripFrontmatter(content));
|
|
180
185
|
}
|
|
181
186
|
await writeFile(rulesFilePath, existing + allRules.join('\n---\n\n'), 'utf-8');
|
|
182
187
|
}
|
|
@@ -184,9 +189,12 @@ async function generateRulesFile(targetDir, config) {
|
|
|
184
189
|
// Create mode: generate separate files in rules directory
|
|
185
190
|
const rulesTargetDir = dirname(join(targetDir, config.rulesFile.path));
|
|
186
191
|
await mkdir(rulesTargetDir, { recursive: true });
|
|
192
|
+
// If rulesFile.path ends with .mdc, we use .mdc extension for files
|
|
193
|
+
const useMdc = config.rulesFile.path.endsWith('.mdc');
|
|
187
194
|
for (const file of ruleFiles) {
|
|
188
195
|
const content = await readFile(join(rulesDir, file), 'utf-8');
|
|
189
|
-
const
|
|
196
|
+
const targetExt = useMdc ? '.mdc' : '.md';
|
|
197
|
+
const targetPath = join(rulesTargetDir, file.replace(/\.md$/, targetExt));
|
|
190
198
|
await writeFile(targetPath, content, 'utf-8');
|
|
191
199
|
}
|
|
192
200
|
}
|