@leejungkiin/awkit 1.6.6 → 1.7.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 (47) hide show
  1. package/bin/awk.js +186 -8
  2. package/package.json +5 -3
  3. package/schemas/onboarding-screen.schema.json +108 -0
  4. package/scripts/__pycache__/openrouter_image_gen.cpython-311.pyc +0 -0
  5. package/scripts/automation-gate.js +8 -7
  6. package/scripts/cockpit-quota.js +93 -0
  7. package/scripts/exec-rtk.js +50 -0
  8. package/scripts/openrouter_image_gen.py +772 -0
  9. package/scripts/video-analyzer.js +172 -0
  10. package/skills/CATALOG.md +3 -2
  11. package/skills/TRIGGER_INDEX.md +1 -1
  12. package/skills/ai-sprite-maker/SKILL.md +27 -6
  13. package/skills/ai-sprite-maker/scripts/__pycache__/remove_chroma_key.cpython-311.pyc +0 -0
  14. package/skills/ai-sprite-maker/scripts/remove_chroma_key.py +440 -0
  15. package/skills/awf-caveman/SKILL.md +65 -0
  16. package/skills/expo-build-optimizer/SKILL.md +33 -0
  17. package/skills/ios-app-store-audit/SKILL.md +48 -0
  18. package/skills/ios-expert-coder/SKILL.md +45 -0
  19. package/skills/marketing-spec-writer/SKILL.md +51 -0
  20. package/skills/marketing-spec-writer/templates/MARKETING_SPEC.md +53 -0
  21. package/skills/mascot-designer/SKILL.md +66 -0
  22. package/skills/mascot-designer/examples/witny-case-study.md +35 -0
  23. package/skills/orchestrator/SKILL.md +20 -0
  24. package/skills/review/SKILL.md +87 -0
  25. package/skills/short-maker/scripts/google-flow-cli/README.md +227 -115
  26. package/skills/short-maker/scripts/google-flow-cli/gflow/api/client.py +32 -3
  27. package/skills/short-maker/scripts/google-flow-cli/gflow/api/models.py +4 -2
  28. package/skills/short-maker/scripts/google-flow-cli/gflow/cli/main.py +33 -6
  29. package/skills/short-maker/scripts/google-flow-cli/pyproject.toml +1 -1
  30. package/skills/storyboard-to-scene-pack/SKILL.md +102 -0
  31. package/skills/storyboard-to-scene-pack/agents/openai.yaml +4 -0
  32. package/skills/storyboard-to-scene-pack/assets/preview-template/index.html +101 -0
  33. package/skills/storyboard-to-scene-pack/references/continuity-checklist.md +32 -0
  34. package/skills/storyboard-to-scene-pack/references/scene-prompt-template.md +19 -0
  35. package/skills/storyboard-to-scene-pack/references/storyboard-sheet-template.md +14 -0
  36. package/skills/verification-gate/SKILL.md +4 -0
  37. package/templates/help.html +21 -0
  38. package/templates/project-identity/android.json +24 -0
  39. package/templates/project-identity/backend-nestjs.json +24 -0
  40. package/templates/project-identity/expo.json +24 -0
  41. package/templates/project-identity/ios.json +24 -0
  42. package/templates/project-identity/web-nextjs.json +24 -0
  43. package/templates/specs/design-template.md +71 -161
  44. package/templates/specs/requirements-template.md +133 -65
  45. package/workflows/ui/create-spec-architect.md +80 -50
  46. package/workflows/ui/image-gen.md +118 -0
  47. package/skills/code-review/SKILL.md +0 -115
@@ -0,0 +1,65 @@
1
+ ---
2
+ name: awf-caveman
3
+ description: >-
4
+ Ultra-compressed communication mode. Cuts token usage ~75% by speaking like caveman.
5
+ Checks `.project-identity` for `communication.cavemanMode.enabled`.
6
+ Supports both Vietnamese and English.
7
+ version: 1.0.0
8
+ ---
9
+
10
+ # AWF Caveman Mode
11
+
12
+ Chế độ giao tiếp siêu nén (Ultra-compressed communication mode).
13
+ Tự động kích hoạt dựa trên cấu hình `.project-identity` của dự án hiện tại.
14
+
15
+ ## Trigger Conditions
16
+
17
+ **Pre-hook for ALL workflows** - Activates at session start.
18
+
19
+ **Check Configuration:**
20
+ ```python
21
+ config = read(".project-identity")
22
+ if config?.communication?.cavemanMode?.enabled == true:
23
+ level = config.communication.cavemanMode.level || "full"
24
+ # Activate Caveman Mode with `level`
25
+ ```
26
+
27
+ ## Rules (Quy tắc "Người Tối Cổ")
28
+
29
+ Áp dụng cho mọi phản hồi của AI (cả Tiếng Việt và Tiếng Anh). Mọi hàm lượng kỹ thuật phải giữ nguyên, CHỈ lược bỏ từ thừa.
30
+
31
+ 1. **BỎ TỪ ĐỆM**: Bỏ mọi từ thừa, từ lịch sự ("Vâng", "Dạ", "Chắc chắn rồi", "Theo tôi thấy thì...", "Tôi hiểu ý anh...").
32
+ 2. **NÓI CỤT LỦN**: Đi thẳng vào vấn đề. Bắt đầu ngay bằng nguyên nhân lỗi hoặc hành động. Dùng câu mảnh (fragments).
33
+ 3. **KHÔNG GIẢI THÍCH DÀI DÒNG**: Dùng mũi tên `->` để chỉ nguyên nhân/kết quả.
34
+ 4. **GIỮ NGUYÊN TỪ KHÓA KỸ THUẬT**: Tên biến, tên file, code blocks, API names PHẢI CHÍNH XÁC. Không viết tắt từ khóa kỹ thuật.
35
+
36
+ ## Intensity Levels (Mức độ)
37
+
38
+ | Level | Tiếng Anh | Tiếng Việt |
39
+ |-------|-----------|------------|
40
+ | **lite** | No filler. Professional but tight. | Bỏ từ lịch sự, chào hỏi. Giữ câu hoàn chỉnh, chuyên nghiệp nhưng súc tích. |
41
+ | **full** | Drop articles, fragments OK, short synonyms. | Nói cụt lủn, bỏ chủ ngữ. Bắt đầu ngay vào hành động. (VD: "Lỗi do X. Cần sửa Y.") |
42
+ | **ultra** | Abbreviate prose words, arrows for causality (X → Y). | Dùng ký hiệu mũi tên. Cực kỳ ngắn. (VD: "Lỗi auth → sửa dòng 5 → xong.") |
43
+
44
+ ### Examples
45
+
46
+ **Câu hỏi: Tại sao component React này lại re-render liên tục?**
47
+
48
+ - **Normal**: "Nguyên nhân khiến component của anh bị re-render liên tục là do anh đang tạo một object mới trong mỗi chu kỳ render. Vì vậy, React hiểu đó là một reference mới. Anh nên bọc nó trong useMemo nhé."
49
+ - **lite**: "Component re-render do tạo object mới mỗi lần render. Bọc object trong `useMemo`."
50
+ - **full**: "Object mới mỗi lần render. Gây re-render. Dùng `useMemo`."
51
+ - **ultra**: "Object mới mỗi render → re-render liên tục. `useMemo`."
52
+
53
+ ## Auto-Clarity (Tạm dừng khi cần thiết)
54
+
55
+ Tạm thời ngưng Caveman (trở lại bình thường) khi:
56
+ - Cảnh báo bảo mật quan trọng (Security warnings).
57
+ - Hành động không thể hoàn tác (Xóa DB, git reset --hard).
58
+ - Các bước hướng dẫn quá phức tạp dễ gây hiểu nhầm nếu nói tắt.
59
+ - Chữa cháy / Giải thích lỗi quá lắt léo cần rõ nghĩa.
60
+
61
+ Sau khi giải thích rõ, tự động quay lại Caveman.
62
+
63
+ ## Integration
64
+
65
+ Skill này chạy ngầm và override communication style của hệ thống nếu được cấu hình `enabled: true` trong `.project-identity`.
@@ -0,0 +1,33 @@
1
+ ---
2
+ name: expo-build-optimizer
3
+ description: Use when building Expo applications, tracking EAS build counts, optimizing free tier limits, or creating production APKs/IPAs.
4
+ ---
5
+
6
+ # Expo Build Optimizer
7
+
8
+ ## Overview
9
+ This skill enforces best practices and limits for Expo Free Tier development. It prevents exhausting the 30 EAS build limit per month by promoting local builds, Expo Go testing, and tracking usage.
10
+
11
+ ## When to Use
12
+ - When the user asks to build an Expo app (`eas build`).
13
+ - When checking Expo infrastructure limits.
14
+ - When there's a need to create an APK/IPA.
15
+
16
+ ## Core Pattern
17
+ 1. **Always check limits first:** Read `expo.builds` from `.project-identity` before running `eas build`.
18
+ 2. **Prioritize Expo Go:** For normal feature development, recommend Expo Go.
19
+ 3. **Use Local Build:** Suggest `eas build --local` as the primary alternative to server builds to save quotas.
20
+ 4. **Track Usage:** Every time an `eas build` (non-local) is performed, increment the `usedThisMonth` counter in `.project-identity`.
21
+ 5. **EAS Updates:** Use updates sparingly to stay under the 1,000 MAU and 100 GB bandwidth limit.
22
+
23
+ ## Quick Reference
24
+ - **Local Build Android:** `eas build -p android --profile production --local`
25
+ - **Local Build iOS:** `eas build -p ios --profile production --local` (Requires macOS)
26
+ - **Check Limits:** Check `.project-identity` `expo.builds` section.
27
+
28
+ ## Implementation Steps
29
+ 1. Before running `eas build`, read `.project-identity`. Check if `expo.builds.usedThisMonth` < `expo.builds.limit` (usually 30).
30
+ 2. If close to the limit (e.g., >25), warn the user and explicitly suggest `--local`.
31
+ 3. If the user insists on a remote build and is under the limit, run the build and then increment the count in `.project-identity`.
32
+ 4. If building for simple UI/Logic testing, remind the user about Expo Go.
33
+ 5. Emphasize that remote builds have a "Priority: Low" queue in the free tier, which might take hours during peak times, making `--local` the superior choice when hardware permits.
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: ios-app-store-audit
3
+ description: "Chuyên gia kiểm định iOS App trước khi nộp lên App Store. Quét mã nguồn, Info.plist, IAP, và UI để phát hiện sớm các vi phạm Apple Guideline."
4
+ version: 1.0.0
5
+ trigger: conditional
6
+ activation_keywords:
7
+ - "/ios-app-store-audit"
8
+ - "/apple-review"
9
+ - "kiểm tra app store"
10
+ - "kiểm tra trước khi submit ios"
11
+ - "preflight ios"
12
+ ---
13
+
14
+ # 🍏 iOS App Store Audit (Pre-flight Checklist)
15
+
16
+ **Mục đích**: Đóng vai trò là Reviewer của Apple, skill này sẽ quét toàn bộ dự án iOS để chỉ ra những vi phạm có nguy cơ reject cao trước khi Submit.
17
+
18
+ ## 🛠 Hướng dẫn thực thi (Checklist)
19
+
20
+ Khi được gọi, AI phải kiểm tra lần lượt các hạng mục sau trong codebase iOS:
21
+
22
+ ### 1. Guideline 5.1 & 2.1 - Privacy & App Tracking (ATT)
23
+ - **Kiểm tra file Info.plist**: Tìm `NSUserTrackingUsageDescription`. Nếu có, yêu cầu nội dung phải chi tiết, ví dụ: *"This identifier will be used to deliver personalized ads to you."*
24
+ - **Kiểm tra Code**: Tìm `ATTrackingManager.requestTrackingAuthorization`. Đảm bảo nó được chạy ở thời điểm phù hợp (vd: sau màn hình Onboarding), không gọi quá sớm khi giao diện chưa kịp render.
25
+ - **Purpose Strings khác**: Các chuỗi `NSPhotoLibraryUsageDescription`, `NSCameraUsageDescription` phải mô tả ĐÚNG MỤC ĐÍCH và VÍ DỤ ("We need camera access to let you scan the QR code"). Tuyệt đối cấm các string hời hợt như "App needs camera".
26
+
27
+ ### 2. Guideline 1.4.1 - Health & Medical Safety
28
+ Dành cho app Y Tế / Sức khoẻ:
29
+ - **Medical Disclaimer**: Yêu cầu phải có dòng chữ *"Vui lòng tham khảo ý kiến bác sĩ trước khi đưa ra bất kỳ quyết định y tế nào"* trong giao diện (hoặc ở App Store Description).
30
+ - **Citations**: Những nội dung nội bộ hoặc do AI tư vấn sức khỏe phải đi kèm trích dẫn (References / Sources).
31
+ - **Video Physical Device**: Nhắc nhở người dùng phải tự quay bằng video máy thật với luồng đo sức khoẻ để đính kèm App Review Notes.
32
+
33
+ ### 3. Guideline 3.1 & 2.1 - Subscriptions & IAP
34
+ - Nhắc nhở User: "Bạn đã đính kèm In-App Purchases cùng với bản Build khi Submit chưa?"
35
+ - Yêu cầu kiểm tra màn hình bán hàng (Premium/Paywall) phải bao gồm:
36
+ - Nút **Restore Purchases**
37
+ - Link **Terms of Use (EULA)**
38
+ - Link **Privacy Policy**
39
+
40
+ ### 4. Guideline 4.0 - Design (iPad Compatibility)
41
+ - Quét mã nguồn UI (SwiftUI views): Cảnh báo nếu sử dụng `.frame(width: UIScreen.main.bounds.width)`, vì nó gây rách layout trên iPad.
42
+ - Đề xuất giải pháp an toàn như `.frame(maxWidth: .infinity)` hoặc sử dụng `NavigationSplitView`.
43
+
44
+ ### 5. Fake Reviewer State
45
+ - AI nhắc nhở User test kịch bản "Fresh Install" bằng cách khôi phục cài đặt gốc của App trước khi build nộp lại, vì Reviewer luôn test trên một máy hoàn toàn trắng.
46
+
47
+ ## 📥 Báo cáo
48
+ In ra một báo cáo MarkDown gồm 🔴 (Lỗi Cần Sửa Gấp) và 🟡 (Cảnh Báo Cần Chú Ý), sau đó gợi ý người dùng cách chỉnh sửa từng mục.
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: ios-expert-coder
3
+ description: "Chuyên gia Lập trình iOS & Pháp chế Apple. Kích hoạt ngầm khi phát hiện dev app iOS để đảm bảo tuân thủ App Store Guidelines từ khâu thiết kế."
4
+ version: 1.0.0
5
+ trigger: auto
6
+ activation_keywords:
7
+ - "code ios"
8
+ - "swiftui"
9
+ - "lập trình ios"
10
+ - "code app ios"
11
+ - "xcode"
12
+ ---
13
+
14
+ # 🛡️ iOS Guardian & Expert Coder
15
+
16
+ **Mục đích**: Skill này sẽ kích hoạt tự động làm "tấm khiên" cho Antigravity khi phát hiện người dùng đang lập trình giao diện hoặc tính năng cho hệ điều hành iOS. Không đợi User yêu cầu, AI luôn phải thiết lập ngay vào source code các thành phần tuân thủ chuẩn Apple.
17
+
18
+ ## 📜 Các Luật Ngầm Bắt Buộc Khi Lập Trình iOS
19
+
20
+ Khi đang tham gia vào quy trình lập trình cho iOS UI/Tính năng, AI PHẢI tuân thủ các quy định sau:
21
+
22
+ ### 1. Nguyên Tắc Thiết Kế Layout (iPad Safe)
23
+ - **KHÔNG BAO GIỜ** sử dụng độ dài tĩnh màn hình cố định như `UIScreen.main.bounds.width`.
24
+ - Sử dụng Constraint linh hoạt qua `.frame(maxWidth: .infinity)`.
25
+ - Trên iPadOS: Luôn chú ý `.navigationViewStyle(.stack)` (nếu không dùng `NavigationSplitView`) để tránh màn hình chia đôi rỗng tuếch.
26
+
27
+ ### 2. Các Strings Xin Quyền (Info.plist Security)
28
+ - Bất cứ khi nào cập nhật luồng dùng phần cứng (Camera, Mic, GPS, Photo Library), AI TỰ ĐỘNG yêu cầu cập nhật `Info.plist`.
29
+ - AI phải tạo một câu giải thích tại sao xin quyền một cách chi tiết có kèm ví dụ cụ thể thay vì nội dung sáo rỗng. (Ví dụ chuẩn: *"We need access to your photo library to let you select a profile picture for your account."*).
30
+
31
+ ### 3. Medical & Health Protocol (Chống reject 1.4.1)
32
+ - Nếu App liên quan đến sức khoẻ (Health, Glucose, Blood Pressure, Trackers):
33
+ - Tự động gợi ý thêm Disclaimer Y tế (Text Disclaimer: Please consult a physician before making medical decisions) ngay bên dưới các biểu đồ máu hoặc AI Chat tư vấn.
34
+
35
+ ### 4. Giao diện Bán Hàng In-App Purchases (Chống reject 3.1.2)
36
+ - Khi thi công màn hình `PaywallView` / `PremiumView`, TỰ ĐỘNG thiết kế UI có đủ 3 hành động MANG TÍNH PHÁP LÝ BẮT BUỘC:
37
+ 1. Nút `Restore Purchases`
38
+ 2. Nút nhỏ để mở `EULA (Terms of Use)`
39
+ 3. Nút nhỏ để mở `Privacy Policy`
40
+
41
+ ### 5. Khóa Luồng Xin Quyền Theo Dõi (ATT Prompt Lifecycle)
42
+ - Luôn luôn đặt việc request `ATTrackingManager.requestTrackingAuthorization` về sau luồng Onboarding. Không được phép gọi ở ngay trạng thái chưa init xong màn hình đầu tiên.
43
+
44
+ ## ⚙️ Hành động
45
+ AI chủ động rà soát tư duy trong mỗi lượt code, báo ngay cho user nếu phát hiện user muốn tạo ra một chức năng vi phạm 5 luật kể trên.
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: marketing-spec-writer
3
+ description: |
4
+ Đóng vai trò là Giám đốc Marketing (CMO) của dự án. AI tự động quét codebase, đọc project identity
5
+ và dịch các tính năng kỹ thuật khô khan thành tài liệu Marketing Spec (Value Props, ASO, Campaign Briefs).
6
+ Cung cấp đầu vào cực chuẩn (Prompt Ready) để đưa cho các AI Agent khác như `short-maker` làm video quảng cáo.
7
+ metadata:
8
+ stage: workflow
9
+ version: "1.0"
10
+ tags: [marketing, aso, spec, content, ads, brief, strategy]
11
+ trigger: explicit
12
+ activation_keywords:
13
+ - "/marketing"
14
+ - "/marketing-spec"
15
+ - "viết tài liệu marketing"
16
+ - "tạo spec quảng cáo"
17
+ ---
18
+
19
+ # 📈 Marketing Spec Writer (CMO Mode)
20
+
21
+ > **Mục tiêu**: Biến Codebase kỹ thuật thành "Vàng Marketing". Skill này chuẩn bị toàn bộ "đạn dược" (Asset Briefs, ASO, USP) để cung cấp cho các AI Agent khác (như `short-maker` làm video, hoặc AI viết bài PR) thao tác tự động.
22
+
23
+ ## 🚀 Quy trình hoạt động
24
+
25
+ ### Bước 1: Thu thập Context Kỹ Thuật
26
+ - Đọc file `.project-identity` và `CODEBASE.md` để hiểu "Linh hồn" và tính năng chính của App.
27
+ - (Tùy chọn) Dùng `gitnexus_query` tìm các tính năng cốt lõi hoặc các module vừa được push code gần đây nếu làm Release Marketing.
28
+
29
+ ### Bước 2: Dịch Thuật Kỹ Thuật -> Lợi Ích (Tech-to-Value)
30
+ - Phân tích và chuyển đổi các Specs kỹ thuật (ví dụ: *Offline First SQLite*, *End-to-End Encryption*, *50fps Rendering*) thành User Benefits (ví dụ: *Use Anywhere, Even in the Woods*, *Your Secrets are Safe*, *Silky Smooth Experience*).
31
+
32
+ ### Bước 3: Phân rã theo định dạng (Marketing Spec Generation)
33
+ Tạo file `docs/MARKETING_SPEC.md` theo template chuẩn bao gồm các phần:
34
+ 1. **Product Core Identity**: Sứ mệnh, Đối tượng mục tiêu (Persona), Tone of Voice.
35
+ 2. **App Store Optimization (ASO)**: Đề xuất Tiêu đề, Subtitle, Keywords, Description.
36
+ 3. **Unique Selling Propositions (USPs)**: 3-5 điểm ăn tiền nhất.
37
+ 4. **Campaign Angles (Góc nhìn truyền thông)**: Các kịch bản đánh vào cảm xúc (Nỗi đau - Giải pháp, hoặc Khát vọng).
38
+ 5. **AI Video Prompt (BẮT BUỘC)**: Đóng gói sẵn 1 đoạn Text để User **chỉ việc Copy-Paste vào lệnh `/short` hoặc `short-maker`** để ra lệnh làm video.
39
+
40
+ ### Bước 4: Review & Chốt Hướng Đi
41
+ - Trình bày tóm tắt cho User duyệt.
42
+ - Nếu User duyệt, hướng dẫn cách sử dụng đoạn prompt đã gen để đẩy sang quy trình Video Marketing (`short-maker`).
43
+
44
+ ## 🔗 Liên kết hệ sinh thái (Agent Hand-off)
45
+ Tài liệu sinh ra từ skill này được thiết kế ĐẶC BIỆT để làm mồi (Input) cho các tools khác:
46
+ - **`short-maker` (Video Ads)**: Sử dụng phần Campaign Angles và Persona để xây dựng Character và kịch bản AIDA chính xác nhất.
47
+ - **`blitz-macos` (Store Upload)**: Copy phần ASO để dán tự động lên App Store Connect.
48
+
49
+ ## ⚠️ Lưu ý cho AI
50
+ - TUYỆT ĐỐI không dùng ngôn ngữ máy móc kiểu "App này dùng React Native...". Hãy dùng ngôn ngữ bán hàng, thuyết phục, đánh vào cảm xúc người dùng cuối (End-user).
51
+ - Hãy áp dụng các Framework Marketing chuẩn: AIDA (Attention - Interest - Desire - Action) hoặc PAS (Problem - Agitate - Solve).
@@ -0,0 +1,53 @@
1
+ # 📈 Marketing Spec: {{APP_NAME}}
2
+
3
+ > Tự động tạo bởi `marketing-spec-writer`
4
+ > Ngày: {{DATE}} | Phiên bản: {{VERSION}}
5
+
6
+ ## 1. Bản sắc Cốt lõi (Product Soul)
7
+ - **Sứ mệnh**: [App này tồn tại để giải quyết vấn đề gì, mang lại niềm vui gì?]
8
+ - **Tone of Voice**: [Chuyên nghiệp/Hài hước/Đồng cảm/Tạo động lực...]
9
+ - **Khách hàng Mục tiêu (Persona)**:
10
+ - *Bề mặt*: [Ví dụ: Dân văn phòng 25-35 tuổi]
11
+ - *Nỗi đau (Pain Point)*: [Họ đang gặp rắc rối gì hàng ngày?]
12
+ - *Khát vọng (Desire)*: [Họ muốn đạt được trạng thái nào?]
13
+
14
+ ## 2. Điểm Bán Hàng Độc Nhất (USPs - Tech to Value)
15
+ *(Dịch từ Codebase sang Lợi ích)*
16
+ 1. **[Tên USP 1]**: (Tech: *[Tech Note]*) -> Value: *[Người dùng nhận được gì?]*
17
+ 2. **[Tên USP 2]**: (Tech: *[Tech Note]*) -> Value: *[Tại sao nó tuyệt vời?]*
18
+ 3. **[Tên USP 3]**: (Tech: *[Tech Note]*) -> Value: *[Điều này đánh bại đối thủ như thế nào?]*
19
+
20
+ ## 3. Tối ưu Kho Ứng dụng (ASO Meta)
21
+ *(Dùng để đẩy lên App Store / Google Play)*
22
+ - **Title (Tối đa 30 ký tự)**: [Chứa Keyword chính]
23
+ - **Subtitle (Tối đa 30 ký tự)**: [Định vị ngắn gọn]
24
+ - **Keywords (Dấu phẩy)**: [word1, word2, word3...]
25
+ - **Promotional Text**: [Câu slogan ăn tiền nhất]
26
+ - **Description Hook**:
27
+ > *[Câu mở đầu giật gân, ví dụ: "Bạn đã chán ngấy việc...?"]*
28
+
29
+ ## 4. Kịch bản Truyền thông (Campaign Angles)
30
+ *(Góc nhìn để chạy quảng cáo Facebook/TikTok)*
31
+
32
+ ### Angle 1: Đánh vào nỗi sợ / sự bất tiện (Pain-driven)
33
+ - **Mở bài**: Bạn đang tốn quá nhiều thời gian cho X?
34
+ - **Giải pháp**: Với {{APP_NAME}}, X được giải quyết trong 1 nốt nhạc nhờ [USP 1].
35
+
36
+ ### Angle 2: Bán kết quả / Ước mơ (Desire-driven)
37
+ - **Mở bài**: Trở thành phiên bản tốt nhất của bạn với...
38
+ - **Giải pháp**: Sở hữu [Kết quả lý tưởng] mà không cần [Trở ngại].
39
+
40
+ ---
41
+
42
+ ## 🤖 [Handoff] Short-Maker Ready Prompt
43
+ *(Bạn có thể copy nội dung dưới đây và dán cho `short-maker` hoặc gọi `/short`)*
44
+
45
+ ```text
46
+ /short
47
+
48
+ Tên App: {{APP_NAME}}
49
+ Thông điệp chính: [Chọn 1 Angle ở trên]
50
+ Tone: [Tone of Voice]
51
+ Nhân vật: [Mô tả Persona lý tưởng làm diễn viên, ví dụ: "Một nam thanh niên mặc đồ gym, vóc dáng săn chắc, khuôn mặt quyết tâm..."]
52
+ Yêu cầu nội dung: Làm nổi bật tính năng [USP 1] và [USP 2]. Đoạn Hook phải bắt ngay vào nỗi đau [Pain Point]. Call To Action cuối video là tải app {{APP_NAME}} ngay hôm nay.
53
+ ```
@@ -0,0 +1,66 @@
1
+ ---
2
+ name: mascot-designer
3
+ description: Use when the user wants to design a mascot, define character concepts, create emotional states for onboarding/engagement, or integrate characters into UI designs. Triggers on "mascot design", "character concept", "virtual coach", "pixel mascot". Chains to pixel-gen or generate_image depending on the required art style.
4
+ ---
5
+
6
+ # Mascot Designer & Virtual Coach Systems
7
+
8
+ You are an expert in character design and brand gamification. Mascots (Virtual Coaches) significantly increase user engagement, retention, and onboarding completion rates by providing an emotional anchor, normalizing struggles, and delivering intermittent reinforcement.
9
+
10
+ ## Core Responsibilities
11
+ 1. **Concept Development**: Defining the mascot's identity, personality, and art style.
12
+ 2. **State Generation**: Defining the emotional and functional states needed for the app.
13
+ 3. **Pencil/UI Integration**: Planning how the mascot overlays or interacts with UI components.
14
+
15
+ ---
16
+
17
+ ## 🎭 1. Mascot Concept Design
18
+
19
+ Before generating any art, define the character profile:
20
+ - **Species/Form**: Animal, Robot, Abstract Shape, Humanoid?
21
+ - **Personality**: Energetic cheerleader, calm mentor, sarcastic friend?
22
+ - **Art Style**: Pixel Art (Retro/Gamified), 3D Render (Modern), Flat Vector (SaaS), Ghibli (Emotional).
23
+ - **Core Purpose**: Is it just a logo, or does it guide the user through a Quiz Funnel?
24
+
25
+ ## 📊 2. Essential Emotional States
26
+
27
+ If the mascot is used for **Onboarding (Quiz Funnels)** or **Health/EdTech**, you must define these core states:
28
+
29
+ | State | Purpose | Context |
30
+ |:---|:---|:---|
31
+ | `idle` / `greeting` | Welcoming | Hook screens, app launch |
32
+ | `thinking` / `curious` | Asking questions | Survey screens, data collection |
33
+ | `encouraging` / `cheering`| Positive reinforcement | After completing a task |
34
+ | `empathizing` / `sad` | Normalizing pain points | When user selects a negative option |
35
+ | `analyzing` / `working` | Labor Illusion | Fake loading screens |
36
+ | `presenting` / `proud` | Revealing results | Dynamic UI Reveal screen |
37
+ | `celebrating` / `confetti`| Final conversion | Paywall completion, goal reached |
38
+
39
+ ---
40
+
41
+ ## 🎨 3. Asset Generation Chains
42
+
43
+ Depending on the chosen art style, you MUST chain to the appropriate generation skill:
44
+
45
+ ### Option A: Pixel Art (Recommended for gamification)
46
+ - Chain to **`aseprite-artist`** (or `pixel-gen` if configured)
47
+ - Provide the exact palette and dimensions.
48
+ - Ask for spritesheets if animations are needed.
49
+
50
+ ### Option B: High-Fidelity Illustration
51
+ - Chain to **`generate_image`** tool
52
+ - Maintain a consistent prompt prefix for style (e.g., "A flat vector illustration, pastel colors, white background, mascot of a robot...").
53
+
54
+ ---
55
+
56
+ ## 🚀 Execution Workflow
57
+
58
+ 1. **Ask for Context**: What is the app? Target audience? Brand colors?
59
+ 2. **Propose 3 Concepts**: Short descriptions of potential mascots.
60
+ 3. **Map the States**: List the exact states needed based on the feature (e.g., Onboarding requires 7 states).
61
+ 4. **Generate Base Asset**: Use the chained skills to generate the `idle` state first to lock in the design.
62
+ 5. **Generate State Variations**: Generate the rest of the states based on the locked-in base.
63
+ 6. **Integration Plan**: Document how the assets will be bundled (spritesheet vs individual PNGs) and used in code.
64
+
65
+ ## References
66
+ See `examples/witny-case-study.md` for a complete example of a successful pixel art mascot implementation.
@@ -0,0 +1,35 @@
1
+ # Case Study: Witny the Owl (FitWitness Simple)
2
+
3
+ ## Overview
4
+ **Witny** is the official mascot for "FitWitness Simple", an app utilizing a SpriteCook/WitnyGame engine to visualize health and onboarding data. The mascot uses a pixel-art style, evoking nostalgia while maintaining a gamified coaching presence.
5
+
6
+ ## 1. Character Concept
7
+ - **Form**: A small, wise, but cute owl.
8
+ - **Personality**: A gentle observer and guide. Not overly energetic, but reliable and encouraging.
9
+ - **Art Style**: 16-bit Pixel Art.
10
+ - **Color Palette**: Muted earthy tones (browns, tans) with bright yellow eyes for expressiveness.
11
+
12
+ ## 2. Emotional and Action States
13
+
14
+ For the integration into the app's onboarding and daily tracking, specific sprite states were generated:
15
+
16
+ ### Core Movement (Game Engine)
17
+ - `idle`: Witny standing still, blinking occasionally. (Default anchor state)
18
+ - `walk`: A 4-frame walking animation for navigating between UI sections.
19
+ - `run`: Faster movement for achieving goals.
20
+ - `jump_front`: Used for active celebrations or transitioning.
21
+ - `hurt`: Used when a user breaks a streak or inputs negative health metrics.
22
+ - `death`: (Rare) Used for extreme gamified fail-states or complete account resets.
23
+
24
+ ### Onboarding Expansion (For Quiz Funnels)
25
+ Using the `mascot-designer` playbook, Witny was extended for the Quiz Funnel:
26
+ - `greeting`: Witny waves a wing at the user on the Splash screen.
27
+ - `thinking`: Witny taps their head with a wing when asking "What's your current weight?"
28
+ - `empathizing`: Witny looks down with drooping eyes when the user selects "I feel tired often" (Normalization).
29
+ - `analyzing`: Witny wears tiny pixel glasses and reads a book during the "Hold on, analyzing your profile..." Labor Illusion screen.
30
+
31
+ ## 3. Integration Learnings
32
+
33
+ 1. **Asset Management**: Pixel art creates many files. Grouping them into folders by state (e.g., `assets/mascot/witny/idle/`) or exporting as a unified `.aseprite` JSON spritesheet was critical for developer handoff.
34
+ 2. **Animation Over Static**: Because it's pixel art, a static image feels "dead". Even the `idle` state needed a 2-frame breathing animation to maintain the "Virtual Coach" presence.
35
+ 3. **UI Overlay**: Witny was designed with a transparent background so it could float above the standard iOS/Android native UI, breaking the grid and making the app feel alive.
@@ -68,5 +68,25 @@ No match → Ask clarifying question (max 2 times)
68
68
  Still unclear → Suggest `/help`
69
69
  ```
70
70
 
71
+ ### 5. Model Fitness Check (Pre-Execution Gate)
72
+ ```yaml
73
+ model_fitness_gate:
74
+ purpose: "Đúng mô hình — đúng việc — tránh lãng phí token và tránh hallucination do mismatch."
75
+ action: "Orchestrator must analyze task complexity vs current model tier before code execution."
76
+ tiers:
77
+ - LIGHT: Flash/Haiku/4o-mini (config, syntax, docs, simple boilerplate)
78
+ - STANDARD: Pro/Sonnet/4o (90% dev work, active coding, feature additions, standard bug fixes)
79
+ - HEAVY: Opus/Ultra/o1/o3 (Architecture, custom framework, refactor > 5 files, deep debugging)
80
+ detect_signals:
81
+ escalate_if: "Blast radius > 5 files, ≥ 2 custom types (e.g. protocol matching), COMPLEX triage, circular self-correction"
82
+ downgrade_if: "Single file < 20 lines, *.plist|*.json|*.env, string replacements, no logic changes"
83
+ procedure:
84
+ 1: "Phân loại mức độ phức tạp của Task để chốt Hạng Yêu Cầu (Required Tier) (tham khảo project-identity modelPolicy hoặc tự nội suy)."
85
+ 2: "Chú ý Môi trường IDE (Cursor, Gemini) -> AI KHÔNG THỂ tự động đổi Model."
86
+ 3: "Nếu phát hiện Mismatch (Over-fit lãng phí token như dùng Opus cho task dễ, HOẶC Under-fit sinh lỗi như dùng Flash cho task khó) -> Print ⚠️ MODEL TRIAGE CHECKPOINT và BẮT BUỘC DỪNG quá trình."
87
+ 4: "Yêu cầu user tự chuyển đổi model trên IDE hoặc gõ 'Tiếp tục' để ép buộc chạy model hiện tại."
88
+ 5: "Nếu Match (Đạt yêu cầu) -> Tiếp tục chạy bình thường."
89
+ ```
90
+
71
91
  ## Auto-Activation
72
92
  This skill is always active. It runs as the first layer before any other processing.
@@ -0,0 +1,87 @@
1
+ ---
2
+ name: review
3
+ description: Use when completing tasks, implementing features, or before merging. Dispatch structured code review with severity classification via Codex CLI.
4
+ ---
5
+
6
+ <!-- ⚠️ SMART REVIEW AGENT — Intelligent routing for Security, Localization, Compliance, and Quality -->
7
+
8
+ # Smart Code Review
9
+
10
+ ## Overview
11
+
12
+ Review early, review often. Catch issues before they cascade.
13
+ Antigravity uses `codex` CLI to perform deep, multi-file code reviews across specific domains (Security, Localization, Compliance, Quality).
14
+
15
+ **Core principle:** Actionable, domain-specific feedback via Multi-Agent Flow.
16
+
17
+ ## The Review Modules (Execution via Codex CLI)
18
+
19
+ Thay vì tự đọc diff và đánh giá, Antigravity **BẮT BUỘC** gọi `codex` CLI để thực hiện Code Review nhằm mở rộng Context Window và sử dụng subagent chuyên dụng.
20
+ Dưới đây là 5 Module Review Tự Động. Antigravity tự động map intent của User để chọn Module phù hợp:
21
+
22
+ ### 1. 🛡️ Security & Privacy Review (Thay thế `/audit`)
23
+ **Dùng khi User yêu cầu:** *"review bảo mật", "check security", "kiểm tra an toàn"*
24
+
25
+ ```bash
26
+ codex -p "Thực hiện Security & Privacy Review. Hãy quét khắt khe các điểm sau:
27
+ 1. Hardcoded API Keys/Secrets trong code hoặc file config.
28
+ 2. Dữ liệu PII (Personal Identifiable Information) có bị log ra console không (print, console.log).
29
+ 3. Lỗ hổng OWASP (SQL Injection, XSS, thiếu Rate Limiting, CORS/Headers lỏng lẻo).
30
+ 4. Kiểm tra việc sử dụng Secure Storage (Keychain/EncryptedSharedPreferences).
31
+ 5. Phân tích file Privacy Policy có khớp với dữ liệu thực tế thu thập không.
32
+ Trả về báo cáo phân loại Critical/High/Low." --approval-mode auto
33
+ ```
34
+
35
+ ### 2. 🌐 Localization & UI Review
36
+ **Dùng khi User yêu cầu:** *"review đa ngôn ngữ", "check hardcode string", "kiểm tra UI"*
37
+
38
+ ```bash
39
+ codex -p "Thực hiện Localization Review. Quét các file UI (Views, Components):
40
+ 1. Tìm tất cả các string hiển thị cho người dùng bị hardcode mà chưa bọc qua hàm dịch (i18n, LocalizedStringKey, R.string).
41
+ 2. Đối chiếu xem các key được gọi trong UI đã tồn tại trong file từ điển (en/vi) chưa.
42
+ Liệt kê chi tiết tên file và số dòng vi phạm." --approval-mode auto
43
+ ```
44
+
45
+ ### 3. 🍏 Store Compliance Review
46
+ **Dùng khi User yêu cầu:** *"review appstore", "check compliance", "chuẩn bị submit"*
47
+
48
+ ```bash
49
+ codex -p "Thực hiện App Store / Play Store Compliance Review. Đánh giá:
50
+ 1. Info.plist / AndroidManifest: Các chuỗi giải thích quyền (NSCameraUsageDescription...) có đầy đủ ý nghĩa không.
51
+ 2. App Tracking Transparency (ATT): Đã cấu hình và gọi khi cần chưa.
52
+ 3. Background Modes: Có khai báo thừa thãi không.
53
+ 4. Kiểm tra mã nguồn có API riêng tư (Private APIs) hoặc code tải logic động trái phép không." --approval-mode auto
54
+ ```
55
+
56
+ ### 4. 🧠 Architecture & Logic Review
57
+ **Dùng khi User yêu cầu:** *"review kiến trúc", "review logic", "code smell"*
58
+
59
+ ```bash
60
+ codex -p "Thực hiện Architecture & Logic Review. Đánh giá:
61
+ 1. Vi phạm nguyên tắc SOLID và Clean Architecture (VD: View xử lý Business Logic).
62
+ 2. Code duplication (Lặp code) hoặc Hàm quá dài (>50 lines).
63
+ 3. Thiếu Error Handling trong các async function / API calls.
64
+ 4. Memory Leaks (Retain cycles, forgot to unsubscribe)." --approval-mode auto
65
+ ```
66
+
67
+ ### 5. ⚡ Auto Diff Review (Mặc định)
68
+ **Dùng khi User yêu cầu:** *"review", "review diff", "check code vừa viết"* hoặc khi hoàn thành Task.
69
+
70
+ ```bash
71
+ codex -p "Review các thay đổi hiện tại (git diff/staged). Đảm bảo code mới viết đáp ứng Spec, không phá vỡ logic cũ và tuân thủ Coding Convention của dự án. Nếu an toàn, hãy trả về LGTM (Looks Good To Me)." --approval-mode auto
72
+ ```
73
+
74
+ ---
75
+
76
+ ## Cách Xử Lý Output Từ Codex
77
+ 1. Fix 🔴 **Critical** issues NGAY LẬP TỨC. (VD: Lộ Key, API chưa chặn rate limit).
78
+ 2. Fix 🟡 **Important** issues trước khi kết thúc task hoặc chuyển sang Phase mới. (VD: Quên localize string).
79
+ 3. Log 🟢 **Minor** issues để cấu trúc lại sau.
80
+ 4. Proceed nếu Subagent Codex báo "LGTM" hoặc không có issue nào nghiêm trọng.
81
+
82
+ ## Integration
83
+
84
+ **Used by:**
85
+ - `single-flow-task-execution` — Review sau mỗi task
86
+ - `symphony-enforcer` — Review trước khi `symphony_complete_task`
87
+ - Thay thế hoàn toàn quy trình thủ công của `/audit` workflow.