@leejungkiin/awkit 1.7.1 → 1.7.4
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/bin/awk.js +576 -84
- package/core/CLAUDE.md +1 -1
- package/core/GEMINI.md +148 -167
- package/core/GEMINI.md.bak +149 -116
- package/core/skill-runtime-manifest.json +3 -0
- package/docs/Claude Fable 5.md +3826 -0
- package/docs/android_kotlin_system_instruction.md +210 -0
- package/docs/brainstorm_ponytail_integration.md +146 -0
- package/docs/brainstorm_smart_setup.md +113 -0
- package/docs/deep-research-report (1).md +293 -0
- package/docs/history/GEMINI.v1.md +135 -0
- package/docs/history/brainstorm_antigravity_unified_architecture.v1.md +105 -0
- package/docs/history/implementation_plan.v1.md +58 -0
- package/package.json +4 -1
- package/scripts/artifact-storage.js +130 -0
- package/scripts/automation-gate.js +35 -2
- package/scripts/claude-plan.js +76 -0
- package/scripts/dependency-manager.js +210 -0
- package/scripts/exec-rtk.js +11 -5
- package/scripts/i18n-helper.js +381 -0
- package/scripts/multi-model-pipeline.js +144 -0
- package/skill-packs/mobile-ios/pack.json +4 -2
- package/skill-packs/reverse-engineering/pack.json +1 -0
- package/skills/CATALOG.md +20 -0
- package/skills/GEMINI.md +9 -1
- package/skills/TRIGGER_INDEX.md +10 -0
- package/skills/ai-music/SKILL.md +275 -0
- package/skills/android-re-analyzer/SKILL.md +238 -0
- package/skills/android-re-analyzer/references/api-extraction-patterns.md +119 -0
- package/skills/android-re-analyzer/references/call-flow-analysis.md +176 -0
- package/skills/android-re-analyzer/references/fernflower-usage.md +115 -0
- package/skills/android-re-analyzer/references/jadx-usage.md +116 -0
- package/skills/android-re-analyzer/references/setup-guide.md +221 -0
- package/skills/android-re-analyzer/scripts/check-deps.sh +129 -0
- package/skills/android-re-analyzer/scripts/decompile.sh +375 -0
- package/skills/android-re-analyzer/scripts/find-api-calls.sh +118 -0
- package/skills/android-re-analyzer/scripts/install-dep.sh +448 -0
- package/skills/animal-island-ui-style/SKILL.md +1450 -0
- package/skills/app-store-review-agent/SKILL.md +164 -0
- package/skills/app-store-review-agent/references/guidelines/README.md +154 -0
- package/skills/app-store-review-agent/references/guidelines/by-app-type/ai_apps.md +37 -0
- package/skills/app-store-review-agent/references/guidelines/by-app-type/all_apps.md +50 -0
- package/skills/app-store-review-agent/references/guidelines/by-app-type/crypto_finance.md +31 -0
- package/skills/app-store-review-agent/references/guidelines/by-app-type/games.md +31 -0
- package/skills/app-store-review-agent/references/guidelines/by-app-type/health_fitness.md +31 -0
- package/skills/app-store-review-agent/references/guidelines/by-app-type/kids.md +27 -0
- package/skills/app-store-review-agent/references/guidelines/by-app-type/macos.md +38 -0
- package/skills/app-store-review-agent/references/guidelines/by-app-type/social_ugc.md +32 -0
- package/skills/app-store-review-agent/references/guidelines/by-app-type/subscription_iap.md +34 -0
- package/skills/app-store-review-agent/references/guidelines/by-app-type/vpn.md +18 -0
- package/skills/app-store-review-agent/references/rules/design/minimum_functionality.md +96 -0
- package/skills/app-store-review-agent/references/rules/design/sign_in_with_apple.md +54 -0
- package/skills/app-store-review-agent/references/rules/entitlements/unused_entitlements.md +83 -0
- package/skills/app-store-review-agent/references/rules/metadata/accurate_metadata.md +54 -0
- package/skills/app-store-review-agent/references/rules/metadata/apple_trademark.md +99 -0
- package/skills/app-store-review-agent/references/rules/metadata/china_storefront.md +72 -0
- package/skills/app-store-review-agent/references/rules/metadata/competitor_terms.md +56 -0
- package/skills/app-store-review-agent/references/rules/metadata/subscription_metadata.md +81 -0
- package/skills/app-store-review-agent/references/rules/privacy/privacy_manifest.md +84 -0
- package/skills/app-store-review-agent/references/rules/privacy/unnecessary_data.md +60 -0
- package/skills/app-store-review-agent/references/rules/subscription/misleading_pricing.md +63 -0
- package/skills/app-store-review-agent/references/rules/subscription/missing_tos_pp.md +54 -0
- package/skills/awf-ponytail/SKILL.md +91 -0
- package/skills/awf-ponytail-review/SKILL.md +67 -0
- package/skills/awf-session-restore/SKILL.md +3 -3
- package/skills/brainstorm-agent/SKILL.md +11 -2
- package/skills/brainstorm-agent/templates/brief-template.md +8 -0
- package/skills/claude-planner/SKILL.md +47 -0
- package/skills/code-review/SKILL.md +87 -0
- package/skills/expo-game-development/SKILL.md +163 -0
- package/skills/flutter/LICENSE.txt +202 -0
- package/skills/flutter/SKILL.md +127 -0
- package/skills/flutter-project-creater/LICENSE.txt +202 -0
- package/skills/flutter-project-creater/SKILL.md +106 -0
- package/skills/game-developer/SKILL.md +163 -0
- package/skills/game-developer/references/ecs-patterns.md +501 -0
- package/skills/game-developer/references/multiplayer-networking.md +475 -0
- package/skills/game-developer/references/performance-optimization.md +422 -0
- package/skills/game-developer/references/unity-patterns.md +271 -0
- package/skills/game-developer/references/unreal-cpp.md +352 -0
- package/skills/generate-gui-assets/SKILL.md +305 -0
- package/skills/generate-gui-assets/agents/openai.yaml +4 -0
- package/skills/generate-gui-assets/references/catalog-schema.md +58 -0
- package/skills/generate-gui-assets/references/extraction-techniques.md +21 -0
- package/skills/generate-gui-assets/references/prompt-patterns.md +58 -0
- package/skills/generate-gui-assets/scripts/__pycache__/clean_chroma_edges.cpython-311.pyc +0 -0
- package/skills/generate-gui-assets/scripts/build_gui_contact_sheet.py +51 -0
- package/skills/generate-gui-assets/scripts/clean_chroma_edges.py +262 -0
- package/skills/generate-gui-assets/scripts/copy_approved_icons.py +64 -0
- package/skills/generate-gui-assets/scripts/prepare_gui_asset_run.py +91 -0
- package/skills/generate-gui-assets/scripts/suggest_grid_options.py +63 -0
- package/skills/generate-gui-assets/scripts/validate_gui_catalog.py +50 -0
- package/skills/godot-game-development/SKILL.md +142 -0
- package/skills/hatch-pet/LICENSE.txt +201 -0
- package/skills/hatch-pet/SKILL.md +420 -0
- package/skills/hatch-pet/agents/openai.yaml +4 -0
- package/skills/hatch-pet/references/animation-rows.md +29 -0
- package/skills/hatch-pet/references/codex-pet-contract.md +35 -0
- package/skills/hatch-pet/references/qa-rubric.md +60 -0
- package/skills/hatch-pet/scripts/__pycache__/clean_chroma_edges.cpython-311.pyc +0 -0
- package/skills/hatch-pet/scripts/clean_chroma_edges.py +262 -0
- package/skills/hatch-pet/scripts/compose_atlas.py +150 -0
- package/skills/hatch-pet/scripts/derive_running_left_from_running_right.py +143 -0
- package/skills/hatch-pet/scripts/extract_strip_frames.py +323 -0
- package/skills/hatch-pet/scripts/finalize_pet_run.py +382 -0
- package/skills/hatch-pet/scripts/generate_pet_images.py +287 -0
- package/skills/hatch-pet/scripts/inspect_frames.py +246 -0
- package/skills/hatch-pet/scripts/make_contact_sheet.py +96 -0
- package/skills/hatch-pet/scripts/package_custom_pet.py +108 -0
- package/skills/hatch-pet/scripts/pet_job_status.py +117 -0
- package/skills/hatch-pet/scripts/prepare_pet_run.py +673 -0
- package/skills/hatch-pet/scripts/queue_pet_repairs.py +172 -0
- package/skills/hatch-pet/scripts/record_imagegen_result.py +250 -0
- package/skills/hatch-pet/scripts/render_animation_videos.py +134 -0
- package/skills/hatch-pet/scripts/render_animation_videos.sh +5 -0
- package/skills/hatch-pet/scripts/validate_atlas.py +139 -0
- package/skills/i18n-orchestrator/SKILL.md +37 -0
- package/skills/ios-simulator-skill/SKILL.md +390 -0
- package/skills/ios-simulator-skill/scripts/accessibility_audit.py +300 -0
- package/skills/ios-simulator-skill/scripts/app_launcher.py +326 -0
- package/skills/ios-simulator-skill/scripts/app_state_capture.py +400 -0
- package/skills/ios-simulator-skill/scripts/appearance.py +385 -0
- package/skills/ios-simulator-skill/scripts/build_and_test.py +348 -0
- package/skills/ios-simulator-skill/scripts/clipboard.py +103 -0
- package/skills/ios-simulator-skill/scripts/common/__init__.py +61 -0
- package/skills/ios-simulator-skill/scripts/common/cache_utils.py +289 -0
- package/skills/ios-simulator-skill/scripts/common/device_utils.py +462 -0
- package/skills/ios-simulator-skill/scripts/common/env_config.py +35 -0
- package/skills/ios-simulator-skill/scripts/common/hang_pipeline.py +862 -0
- package/skills/ios-simulator-skill/scripts/common/hang_sessions.py +490 -0
- package/skills/ios-simulator-skill/scripts/common/idb_utils.py +180 -0
- package/skills/ios-simulator-skill/scripts/common/screenshot_utils.py +338 -0
- package/skills/ios-simulator-skill/scripts/container.py +668 -0
- package/skills/ios-simulator-skill/scripts/gesture.py +394 -0
- package/skills/ios-simulator-skill/scripts/hang_watcher.py +1533 -0
- package/skills/ios-simulator-skill/scripts/keyboard.py +391 -0
- package/skills/ios-simulator-skill/scripts/localization_audit.py +483 -0
- package/skills/ios-simulator-skill/scripts/location.py +467 -0
- package/skills/ios-simulator-skill/scripts/log_monitor.py +493 -0
- package/skills/ios-simulator-skill/scripts/model_inspector.py +645 -0
- package/skills/ios-simulator-skill/scripts/navigator.py +461 -0
- package/skills/ios-simulator-skill/scripts/privacy_manager.py +310 -0
- package/skills/ios-simulator-skill/scripts/push_notification.py +240 -0
- package/skills/ios-simulator-skill/scripts/screen_mapper.py +296 -0
- package/skills/ios-simulator-skill/scripts/sim_health_check.sh +245 -0
- package/skills/ios-simulator-skill/scripts/sim_list.py +299 -0
- package/skills/ios-simulator-skill/scripts/simctl_boot.py +312 -0
- package/skills/ios-simulator-skill/scripts/simctl_create.py +316 -0
- package/skills/ios-simulator-skill/scripts/simctl_delete.py +357 -0
- package/skills/ios-simulator-skill/scripts/simctl_erase.py +351 -0
- package/skills/ios-simulator-skill/scripts/simctl_shutdown.py +290 -0
- package/skills/ios-simulator-skill/scripts/simulator_selector.py +375 -0
- package/skills/ios-simulator-skill/scripts/status_bar.py +250 -0
- package/skills/ios-simulator-skill/scripts/test_recorder.py +323 -0
- package/skills/ios-simulator-skill/scripts/visual_diff.py +235 -0
- package/skills/ios-simulator-skill/scripts/xcode/__init__.py +13 -0
- package/skills/ios-simulator-skill/scripts/xcode/builder.py +397 -0
- package/skills/ios-simulator-skill/scripts/xcode/cache.py +204 -0
- package/skills/ios-simulator-skill/scripts/xcode/config.py +178 -0
- package/skills/ios-simulator-skill/scripts/xcode/reporter.py +343 -0
- package/skills/ios-simulator-skill/scripts/xcode/xcresult.py +451 -0
- package/skills/ios-visual-qa-strategist/SKILL.md +111 -0
- package/skills/ios-visual-qa-strategist/agents/openai.yaml +4 -0
- package/skills/ios-visual-qa-strategist/references/ios-tool-selection.md +61 -0
- package/skills/ios-visual-qa-strategist/references/minimal-capture-policy.md +56 -0
- package/skills/ios-visual-qa-strategist/references/visual-reasoning-heuristics.md +53 -0
- package/skills/orchestrator/SKILL.md +0 -20
- package/skills/persistent-storage/SKILL.md +55 -0
- package/skills/short-maker/SKILL.md +23 -0
- package/skills/short-maker/scripts/effects.js +56 -0
- package/skills/short-maker/scripts/shortmaker-bridge.js +332 -0
- package/skills/short-maker/scripts/videomix.js +601 -0
- package/skills/short-maker/templates/hyperframes/cinematic-character.template.html +172 -0
- package/skills/short-maker/templates/hyperframes/index.template.html +194 -0
- package/skills/smali-to-kotlin/SKILL.md +128 -0
- package/skills/smali-to-kotlin/examples/getting-started/tech-stack.md +58 -0
- package/skills/smali-to-kotlin/examples/pipeline/data-ui-parity.md +118 -0
- package/skills/smali-to-kotlin/examples/pipeline/scanner-and-bootstrap.md +106 -0
- package/skills/smali-to-kotlin/library-patterns.md +189 -0
- package/skills/smali-to-kotlin/phase-0-discovery.md +128 -0
- package/skills/smali-to-kotlin/phase-1-architecture.md +166 -0
- package/skills/smali-to-kotlin/phase-2-blueprint-ui.md +347 -0
- package/skills/smali-to-kotlin/phase-2-blueprint.md +228 -0
- package/skills/smali-to-kotlin/phase-3-build.md +248 -0
- package/skills/smali-to-kotlin/phase-3-logic-build.md +268 -0
- package/skills/smali-to-kotlin/smali-reading-guide.md +310 -0
- package/skills/smali-to-kotlin/templates/app-map.md +101 -0
- package/skills/smali-to-kotlin/templates/architecture.md +142 -0
- package/skills/smali-to-kotlin/templates/blueprint.md +145 -0
- package/skills/spec-gate/SKILL.md +6 -2
- package/skills/symphony-enforcer/SKILL.md +8 -0
- package/skills/symphony-enforcer/examples/mindful-stop.md +2 -0
- package/skills/symphony-enforcer/examples/three-phase.md +16 -0
- package/skills/symphony-enforcer/examples/trigger-points.md +7 -1
- package/skills/unity-game-development/SKILL.md +231 -0
- package/skills/video-edit/SKILL.md +36 -0
- package/skills/video-edit/scripts/video_edit.py +324 -0
- package/templates/project-identity/android.json +2 -2
- package/templates/project-identity/backend-nestjs.json +2 -2
- package/templates/project-identity/expo.json +2 -2
- package/templates/project-identity/ios.json +2 -2
- package/templates/project-identity/web-nextjs.json +2 -2
- package/templates/setup-mapping.json +48 -0
- package/templates/specs/design-template.md +161 -71
- package/templates/specs/requirements-template.md +65 -133
- package/templates/specs/task-spec-template.xml +3 -0
- package/workflows/_uncategorized/critic.md +40 -0
- package/workflows/_uncategorized/git-rebase-flow.md +81 -0
- package/workflows/_uncategorized/image-gen.md +118 -0
- package/workflows/_uncategorized/multi-model-pipeline.md +60 -0
- package/workflows/_uncategorized/pixel-gen.md +86 -0
- package/workflows/_uncategorized/pixel-setup.md +90 -0
- package/workflows/_uncategorized/ponytail-review.md +59 -0
- package/workflows/_uncategorized/reverse-android-build.md +222 -0
- package/workflows/_uncategorized/reverse-android-design.md +139 -0
- package/workflows/_uncategorized/reverse-android-discover.md +150 -0
- package/workflows/_uncategorized/reverse-android-scan.md +158 -0
- package/workflows/_uncategorized/reverse-android.md +143 -0
- package/workflows/_uncategorized/reverse-ios-build.md +240 -0
- package/workflows/_uncategorized/reverse-ios-design.md +112 -0
- package/workflows/_uncategorized/reverse-ios-discover.md +120 -0
- package/workflows/_uncategorized/reverse-ios-scan.md +155 -0
- package/workflows/_uncategorized/reverse-ios.md +152 -0
- package/workflows/_uncategorized/safety-router.md +34 -0
- package/workflows/_uncategorized/teach.md +89 -0
- package/workflows/_uncategorized/verify-ui.md +53 -0
- package/workflows/_uncategorized/visualize-screenshots.md +34 -0
- package/workflows/ads/ads-analyst.md +201 -0
- package/workflows/ads/ads-audit.md +106 -0
- package/workflows/ads/ads-optimize.md +97 -0
- package/workflows/ads/ads-targeting.md +241 -0
- package/workflows/ads/adsExpert.md +160 -0
- package/workflows/ads/smali-ads-config.md +400 -0
- package/workflows/ads/smali-ads-flow.md +331 -0
- package/workflows/ads/smali-ads-interstitial.md +377 -0
- package/workflows/ads/smali-ads-native.md +382 -0
- package/workflows/context/teach.md +89 -0
- package/workflows/gitnexus.md +8 -8
- package/workflows/lifecycle/brainstorm.md +43 -0
- package/workflows/lifecycle/code.md +5 -0
- package/workflows/lifecycle/init.md +23 -5
- package/workflows/lifecycle/multi-model-pipeline.md +60 -0
- package/workflows/quality/ponytail-review.md +59 -0
- package/workflows/roles/critic.md +40 -0
- package/workflows/roles/safety-router.md +34 -0
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 📰 Tích hợp Native Ads vào APK mod - Tận dụng library có sẵn
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Smali Native Ads Integration
|
|
6
|
+
|
|
7
|
+
> **🎯 Mục tiêu**: Tích hợp Native Ads bằng cách tận dụng ads library có sẵn trong APK.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 🔍 Phase 1: Discovery - Tìm Native Ads Library
|
|
12
|
+
|
|
13
|
+
### 1.1. Scan Pattern-based Search
|
|
14
|
+
|
|
15
|
+
**Pattern 1: Tìm theo keyword**
|
|
16
|
+
```bash
|
|
17
|
+
# Tìm file chứa "Native"
|
|
18
|
+
find smali* -name "*Native*.smali" | grep -i ad
|
|
19
|
+
|
|
20
|
+
# Tìm theo nội dung
|
|
21
|
+
find smali* -name "*.smali" | xargs grep -l "NativeAd\|native.*ad"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
**Pattern 2: Tìm theo View components**
|
|
25
|
+
```bash
|
|
26
|
+
# Native Ad thường có View custom
|
|
27
|
+
find smali* -name "*AdView*.smali"
|
|
28
|
+
find smali* -name "*NativeView*.smali"
|
|
29
|
+
|
|
30
|
+
# Hoặc trong layout
|
|
31
|
+
grep -r "NativeAd" res/layout/
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Pattern 3: Google AdMob Native**
|
|
35
|
+
```bash
|
|
36
|
+
# Native Ad từ AdMob SDK
|
|
37
|
+
find smali* -path "*/gms/ads/nativead/*" -type f
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### 1.2. Identify Components
|
|
41
|
+
|
|
42
|
+
**Common structures:**
|
|
43
|
+
- `NativeAd.smali` - Core ad object
|
|
44
|
+
- `NativeAdView.smali` - Container view
|
|
45
|
+
- `NativeAdOptions.smali` - Configuration
|
|
46
|
+
- `MediaView.smali` - Media content view
|
|
47
|
+
- Custom wrappers: `*NativeAdHelper*.smali`
|
|
48
|
+
|
|
49
|
+
**Document findings:**
|
|
50
|
+
```
|
|
51
|
+
[Native Ads Discovery]
|
|
52
|
+
|
|
53
|
+
Library Location: smali_classes*/{path}/
|
|
54
|
+
Core Classes:
|
|
55
|
+
- NativeAd: {ClassName}.smali
|
|
56
|
+
- AdView: {ViewClassName}.smali
|
|
57
|
+
- Loader: {LoaderClassName}.smali
|
|
58
|
+
|
|
59
|
+
View Components:
|
|
60
|
+
- Layout: res/layout/{native_ad_layout}.xml
|
|
61
|
+
- Binding: {package}/databinding/{Binding}.smali (nếu có)
|
|
62
|
+
|
|
63
|
+
Current Usage:
|
|
64
|
+
- Used in: {Activity/Fragment}.smali
|
|
65
|
+
- Inflated in: {methodName}()
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## 📦 Phase 2: Understanding Native Ad Structure
|
|
71
|
+
|
|
72
|
+
### 2.1. Ad Assets Components
|
|
73
|
+
|
|
74
|
+
**Standard Native Ad có các thành phần:**
|
|
75
|
+
|
|
76
|
+
| Asset | Purpose | View Type |
|
|
77
|
+
|-------|---------|-----------|
|
|
78
|
+
| **Headline** | Tiêu đề chính | TextView |
|
|
79
|
+
| **Body** | Mô tả | TextView |
|
|
80
|
+
| **Icon** | Logo/Icon | ImageView |
|
|
81
|
+
| **Media** | Ảnh/Video lớn | MediaView |
|
|
82
|
+
| **Call to Action** | Button hành động | Button |
|
|
83
|
+
| **Advertiser** | Tên advertiser | TextView |
|
|
84
|
+
| **Star Rating** | Đánh giá | RatingBar |
|
|
85
|
+
| **Price** | Giá (nếu có) | TextView |
|
|
86
|
+
| **Store** | Store name | TextView |
|
|
87
|
+
|
|
88
|
+
### 2.2. Analyze Existing Layout
|
|
89
|
+
|
|
90
|
+
**Tìm layout XML:**
|
|
91
|
+
```bash
|
|
92
|
+
# Tìm layout có Native Ad
|
|
93
|
+
grep -r "NativeAdView\|native.*ad" res/layout/
|
|
94
|
+
|
|
95
|
+
# Hoặc tìm theo ID
|
|
96
|
+
grep -r "@id/ad_" res/layout/
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**Structure thường gặp:**
|
|
100
|
+
```xml
|
|
101
|
+
<com.google.android.gms.ads.nativead.NativeAdView>
|
|
102
|
+
<ImageView android:id="@+id/ad_app_icon" />
|
|
103
|
+
<TextView android:id="@+id/ad_headline" />
|
|
104
|
+
<TextView android:id="@+id/ad_body" />
|
|
105
|
+
<com.google.android.gms.ads.nativead.MediaView
|
|
106
|
+
android:id="@+id/ad_media" />
|
|
107
|
+
<Button android:id="@+id/ad_call_to_action" />
|
|
108
|
+
</com.google.android.gms.ads.nativead.NativeAdView>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### 2.3. API Pattern Recognition
|
|
112
|
+
|
|
113
|
+
**Sử dụng jadx để xem pattern:**
|
|
114
|
+
```java
|
|
115
|
+
// Example pattern
|
|
116
|
+
AdLoader adLoader = new AdLoader.Builder(context, "AD_UNIT_ID")
|
|
117
|
+
.forNativeAd(new NativeAd.OnNativeAdLoadedListener() {
|
|
118
|
+
@Override
|
|
119
|
+
public void onNativeAdLoaded(NativeAd nativeAd) {
|
|
120
|
+
// Populate views
|
|
121
|
+
}
|
|
122
|
+
})
|
|
123
|
+
.build();
|
|
124
|
+
|
|
125
|
+
adLoader.loadAd(new AdRequest.Builder().build());
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## 🔧 Phase 3: Integration Strategy
|
|
131
|
+
|
|
132
|
+
### 3.1. Determine Placement
|
|
133
|
+
|
|
134
|
+
**Từ `/smali-ads-flow`:**
|
|
135
|
+
- **Onboarding Activity** - Between slides
|
|
136
|
+
- **Other screens** (optional) - List items, feed, etc.
|
|
137
|
+
|
|
138
|
+
**Layout Strategy:**
|
|
139
|
+
|
|
140
|
+
**Option A: Inline placement**
|
|
141
|
+
```xml
|
|
142
|
+
<ScrollView>
|
|
143
|
+
<LinearLayout>
|
|
144
|
+
<!-- Content -->
|
|
145
|
+
<TextView .../>
|
|
146
|
+
|
|
147
|
+
<!-- Native Ad Container -->
|
|
148
|
+
<include layout="@layout/native_ad_layout" />
|
|
149
|
+
|
|
150
|
+
<!-- More content -->
|
|
151
|
+
</LinearLayout>
|
|
152
|
+
</ScrollView>
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
**Option B: Overlay placement**
|
|
156
|
+
```xml
|
|
157
|
+
<FrameLayout>
|
|
158
|
+
<!-- Main content -->
|
|
159
|
+
<ViewPager .../>
|
|
160
|
+
|
|
161
|
+
<!-- Ad overlay -->
|
|
162
|
+
<include
|
|
163
|
+
layout="@layout/native_ad_layout"
|
|
164
|
+
android:layout_gravity="bottom" />
|
|
165
|
+
</FrameLayout>
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### 3.2. Loading Pattern
|
|
169
|
+
|
|
170
|
+
**Lifecycle integration:**
|
|
171
|
+
```
|
|
172
|
+
onCreate/onViewCreated:
|
|
173
|
+
→ Initialize AdLoader
|
|
174
|
+
→ Load ad
|
|
175
|
+
|
|
176
|
+
onNativeAdLoaded:
|
|
177
|
+
→ Populate NativeAdView
|
|
178
|
+
→ Show ad container
|
|
179
|
+
→ Track impression
|
|
180
|
+
|
|
181
|
+
onDestroy:
|
|
182
|
+
→ Destroy ad
|
|
183
|
+
→ Cleanup resources
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### 3.3. View Population
|
|
187
|
+
|
|
188
|
+
**Generic pattern trong Smali:**
|
|
189
|
+
```
|
|
190
|
+
1. Get ad assets (headline, body, icon, etc.)
|
|
191
|
+
2. Set to corresponding views
|
|
192
|
+
3. Register NativeAdView
|
|
193
|
+
4. Track loaded state
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
**Implementation**: Xem existing usage trong APK để copy pattern
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## 🎨 Phase 4: UI Implementation
|
|
201
|
+
|
|
202
|
+
### 4.1. Layout Creation/Reuse
|
|
203
|
+
|
|
204
|
+
**Option 1: Reuse existing layout**
|
|
205
|
+
```bash
|
|
206
|
+
# Tìm layout có sẵn
|
|
207
|
+
find res/layout -name "*native*.xml"
|
|
208
|
+
find res/layout -name "*ad*.xml"
|
|
209
|
+
|
|
210
|
+
# Copy và modify cho use case mới
|
|
211
|
+
cp res/layout/existing_native_ad.xml res/layout/onboarding_native_ad.xml
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
**Option 2: Create new layout**
|
|
215
|
+
- Design theo style app
|
|
216
|
+
- Include all required ad components
|
|
217
|
+
- Match NativeAdView structure
|
|
218
|
+
|
|
219
|
+
### 4.2. Styling Considerations
|
|
220
|
+
|
|
221
|
+
**Tuân thủ AdMob policy:**
|
|
222
|
+
- Phải có "Ad" badge/label
|
|
223
|
+
- Không được misleading
|
|
224
|
+
- CTA button phải rõ ràng
|
|
225
|
+
- Không che khuất nội dung bắt buộc
|
|
226
|
+
|
|
227
|
+
**Implementation:**
|
|
228
|
+
```xml
|
|
229
|
+
<!-- Ad badge -->
|
|
230
|
+
<TextView
|
|
231
|
+
android:text="Ad"
|
|
232
|
+
android:background="@color/ad_badge_bg"
|
|
233
|
+
.../>
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
## 🔌 Phase 5: Code Injection
|
|
239
|
+
|
|
240
|
+
### 5.1. Hook Points
|
|
241
|
+
|
|
242
|
+
**Trong OnboardingActivity:**
|
|
243
|
+
```
|
|
244
|
+
Location: OnboardingActivity.smali
|
|
245
|
+
Method: onCreate() hoặc setupUI()
|
|
246
|
+
|
|
247
|
+
Actions:
|
|
248
|
+
1. Initialize AdLoader
|
|
249
|
+
2. Load native ad
|
|
250
|
+
3. Setup callback handlers
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### 5.2. Injection Pattern
|
|
254
|
+
|
|
255
|
+
**Generic template:**
|
|
256
|
+
```smali
|
|
257
|
+
# In onCreate or initialization method
|
|
258
|
+
|
|
259
|
+
# Create AdLoader
|
|
260
|
+
new-instance v0, Lcom/google/android/gms/ads/AdLoader$Builder;
|
|
261
|
+
const-string v1, "{AD_UNIT_ID}"
|
|
262
|
+
invoke-direct {v0, p0, v1}, ...; <init>(...)
|
|
263
|
+
|
|
264
|
+
# Set native ad listener
|
|
265
|
+
# ... (copy pattern from existing usage)
|
|
266
|
+
|
|
267
|
+
# Build and load
|
|
268
|
+
invoke-virtual {v0}, ...; build()
|
|
269
|
+
move-result-object v1
|
|
270
|
+
invoke-virtual {v1, ...}, ...; loadAd(...)
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### 5.3. Callback Implementation
|
|
274
|
+
|
|
275
|
+
**Pattern:**
|
|
276
|
+
```smali
|
|
277
|
+
.method private onNativeAdLoaded(Lcom/.../NativeAd;)V
|
|
278
|
+
# 1. Get ad container view
|
|
279
|
+
# 2. Populate assets to views
|
|
280
|
+
# 3. Register ad view
|
|
281
|
+
# 4. Make container visible
|
|
282
|
+
.end method
|
|
283
|
+
|
|
284
|
+
.method private onAdFailedToLoad()V
|
|
285
|
+
# Fallback: hide ad container
|
|
286
|
+
# Continue without ad
|
|
287
|
+
.end method
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
---
|
|
291
|
+
|
|
292
|
+
## ✅ Phase 6: Testing & Validation
|
|
293
|
+
|
|
294
|
+
### 6.1. Functional Tests
|
|
295
|
+
|
|
296
|
+
| Test | Expected | Verification |
|
|
297
|
+
|------|----------|--------------|
|
|
298
|
+
| **Load Success** | Ad loads, views populated | Visual check |
|
|
299
|
+
| **All Assets** | Headline, body, media, CTA shown | Check each element |
|
|
300
|
+
| **Click Works** | Clicking opens advertiser page | Test CTA |
|
|
301
|
+
| **Fallback** | No ad = hidden container | Test with no network |
|
|
302
|
+
| **No Memory Leak** | Destroy properly | Monitor memory |
|
|
303
|
+
|
|
304
|
+
### 6.2. UI/UX Tests
|
|
305
|
+
|
|
306
|
+
- [ ] Ad không che khuất content quan trọng
|
|
307
|
+
- [ ] "Ad" badge visible
|
|
308
|
+
- [ ] Layout responsive với different screen sizes
|
|
309
|
+
- [ ] Không conflict với app UI
|
|
310
|
+
- [ ] Smooth scroll/transition
|
|
311
|
+
|
|
312
|
+
### 6.3. Debug Commands
|
|
313
|
+
|
|
314
|
+
```bash
|
|
315
|
+
# Monitor native ad events
|
|
316
|
+
adb logcat | grep -E "NativeAd|AdLoader|MediaView"
|
|
317
|
+
|
|
318
|
+
# Test with test ad ID
|
|
319
|
+
# ca-app-pub-3940256099942544/2247696110 (Android Test Native)
|
|
320
|
+
|
|
321
|
+
# Check view hierarchy
|
|
322
|
+
adb shell uiautomator dump
|
|
323
|
+
adb pull /sdcard/window_dump.xml
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
---
|
|
327
|
+
|
|
328
|
+
## 📋 Implementation Checklist
|
|
329
|
+
|
|
330
|
+
### Discovery
|
|
331
|
+
- [ ] Tìm được native ad library/wrapper
|
|
332
|
+
- [ ] Xác định NativeAd và NativeAdView classes
|
|
333
|
+
- [ ] Tìm được existing layout
|
|
334
|
+
- [ ] Document API usage pattern
|
|
335
|
+
|
|
336
|
+
### Layout
|
|
337
|
+
- [ ] Có layout cho native ad
|
|
338
|
+
- [ ] Include tất cả required components
|
|
339
|
+
- [ ] Add "Ad" badge
|
|
340
|
+
- [ ] Styling match app design
|
|
341
|
+
|
|
342
|
+
### Integration
|
|
343
|
+
- [ ] Hook vào OnboardingActivity
|
|
344
|
+
- [ ] Inject AdLoader initialization
|
|
345
|
+
- [ ] Implement onNativeAdLoaded callback
|
|
346
|
+
- [ ] Populate view assets
|
|
347
|
+
|
|
348
|
+
### Testing
|
|
349
|
+
- [ ] Load ad successfully
|
|
350
|
+
- [ ] All assets display correctly
|
|
351
|
+
- [ ] Click tracking works
|
|
352
|
+
- [ ] Fallback when no ad
|
|
353
|
+
- [ ] No memory leaks
|
|
354
|
+
|
|
355
|
+
---
|
|
356
|
+
|
|
357
|
+
## 🔗 Related Resources
|
|
358
|
+
|
|
359
|
+
### Workflows
|
|
360
|
+
- `/smali-ads-flow` - Main ads flow
|
|
361
|
+
- `/smali-ads-interstitial` - Interstitial ads
|
|
362
|
+
- `/smali-ads-config` - Remote config
|
|
363
|
+
|
|
364
|
+
### References
|
|
365
|
+
- [AdMob Native Ads Guide](https://developers.google.com/admob/android/native)
|
|
366
|
+
- [Native Ads Policies](https://support.google.com/admob/answer/6329638)
|
|
367
|
+
- [Test Ads](https://developers.google.com/admob/android/test-ads)
|
|
368
|
+
|
|
369
|
+
---
|
|
370
|
+
|
|
371
|
+
## 💡 Tips & Best Practices
|
|
372
|
+
|
|
373
|
+
1. **Reuse existing implementation**: Copy pattern từ native ad có sẵn trong app
|
|
374
|
+
2. **Respect policies**: Luôn có "Ad" badge, không misleading
|
|
375
|
+
3. **Test thoroughly**: Native ad có nhiều assets, test kỹ
|
|
376
|
+
4. **Handle missing assets**: Một số ad không có đủ assets (rating, price)
|
|
377
|
+
5. **Cleanup properly**: Destroy ad trong onDestroy để tránh memory leak
|
|
378
|
+
6. **Responsive design**: Test với nhiều screen sizes
|
|
379
|
+
|
|
380
|
+
---
|
|
381
|
+
|
|
382
|
+
**⚠️ Quan trọng**: Native Ads phải tuân thủ strict policies về disclosure và presentation!
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 🏫 Chế độ giảng dạy cuốn chiếu thông thái (Wise Teacher)
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# WORKFLOW: /teach - The Wise Interactive Mentor
|
|
6
|
+
|
|
7
|
+
> **Mục tiêu:** Giúp con người thấu hiểu sâu sắc toàn bộ buổi làm việc (vấn đề, giải pháp, bối cảnh rộng) một cách cuốn chiếu thông qua tự tóm tắt, giải thích đa cấp độ và câu hỏi trắc nghiệm tương tác.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Giai đoạn 1: Khởi tạo Phiên Học (Setup Learning Session)
|
|
12
|
+
|
|
13
|
+
### 1.1. Khởi tạo Checklist học tập
|
|
14
|
+
AI tạo hoặc cập nhật file checklist học tập tại `.brain/teach_checklist.md`.
|
|
15
|
+
Cấu trúc checklist bao gồm:
|
|
16
|
+
- `[ ]` **Mục 1: The Problem (Vấn đề)**
|
|
17
|
+
- Tại sao vấn đề tồn tại?
|
|
18
|
+
- Các nhánh hướng đi để giải quyết.
|
|
19
|
+
- `[ ]` **Mục 2: The Solution (Giải pháp)**
|
|
20
|
+
- Tại sao giải quyết theo cách này?
|
|
21
|
+
- Quyết định thiết kế & Các trường hợp biên (edge cases).
|
|
22
|
+
- `[ ]` **Mục 3: Broader Context (Bối cảnh rộng)**
|
|
23
|
+
- Tại sao việc này quan trọng?
|
|
24
|
+
- Tác động lâu dài của thay đổi.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Giai đoạn 2: Xác minh Cuốn chiếu (Incremental Mastery Cycle)
|
|
29
|
+
|
|
30
|
+
Với từng mục trong checklist, thực hiện chu trình kiểm tra sau trước khi đánh dấu hoàn thành:
|
|
31
|
+
|
|
32
|
+
```mermaid
|
|
33
|
+
graph TD
|
|
34
|
+
A[Bắt đầu mục] --> B[User tự trình bày hiểu biết - Restatement]
|
|
35
|
+
B --> C[AI phân tích & lấp đầy lỗ hổng kiến thức]
|
|
36
|
+
C --> D[Quiz kiểm tra bằng AskUserQuestion]
|
|
37
|
+
D -->|Sai/Chưa hiểu sâu| C
|
|
38
|
+
D -->|Đúng/Master| E[Đánh dấu hoàn thành mục]
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### 2.1. Yêu cầu User tự trình bày (Proactive Restatement)
|
|
42
|
+
Trước khi giải thích bất kỳ điều gì, AI bắt buộc phải yêu cầu User tự tóm tắt hiểu biết của mình về mục hiện tại.
|
|
43
|
+
> **Ví dụ:** *"Bạn hãy thử tự giải thích xem tại sao hệ thống lại gặp lỗi tràn bộ nhớ trước đó?"*
|
|
44
|
+
|
|
45
|
+
### 2.2. Giải thích thích ứng theo yêu cầu (Adaptive Explanation Levels)
|
|
46
|
+
Dựa trên phản hồi của User, AI giải thích các phần còn thiếu bằng cách sử dụng các cấp độ phù hợp:
|
|
47
|
+
- **ELI5 (Explain Like I'm 5):** Dành cho động lực cốt lõi hoặc khái niệm siêu trừu tượng.
|
|
48
|
+
- **ELI14 (Explain Like I'm 14):** Dành cho logic nghiệp vụ tổng thể và kiến trúc.
|
|
49
|
+
- **ELII (Explain Like I'm Intern):** Dành cho mã nguồn chi tiết, edge cases và các lệnh debug cụ thể.
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Giai đoạn 3: Kiểm tra Đánh giá (Interactive Quizzing)
|
|
54
|
+
|
|
55
|
+
### 3.1. Sử dụng công cụ đố vui
|
|
56
|
+
BẮT BUỘC sử dụng công cụ `AskUserQuestion` (hoặc đặt câu hỏi trắc nghiệm trực quan) để xác nhận mức độ hiểu bài.
|
|
57
|
+
|
|
58
|
+
**Quy tắc ra đề:**
|
|
59
|
+
- Sử dụng câu hỏi trắc nghiệm hoặc câu hỏi mở.
|
|
60
|
+
- Đảo lộn thứ tự đáp án đúng để tránh suy đoán.
|
|
61
|
+
- KHÔNG tiết lộ đáp án đúng cho đến khi User nộp câu trả lời (hoặc submit lựa chọn).
|
|
62
|
+
- Nếu User trả lời sai, quay lại Giai đoạn 2.2 để giảng lại phần kiến thức đó.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Giai đoạn 4: Cập nhật Tiến độ & Kết thúc
|
|
67
|
+
|
|
68
|
+
- Khi một mục được Master, cập nhật trạng thái mục đó thành `[x]` trong `.brain/teach_checklist.md`.
|
|
69
|
+
- Trình bày trực quan phần checklist còn lại.
|
|
70
|
+
- **Quy tắc Kết thúc (`/goal`):** Phiên học chỉ thực sự kết thúc khi tất cả các mục trong checklist đã được đánh dấu Master `[x]`.
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Output Format (Mẫu phản hồi của AI)
|
|
75
|
+
|
|
76
|
+
```markdown
|
|
77
|
+
🏫 **WISE TEACHER SESSION ACTIVATED**
|
|
78
|
+
|
|
79
|
+
Em đã thiết lập checklist học tập tại `.brain/teach_checklist.md`:
|
|
80
|
+
- [ ] **Mục 1: The Problem** - Vấn đề đang giải quyết.
|
|
81
|
+
- [ ] **Mục 2: The Solution** - Cách giải quyết và edge cases.
|
|
82
|
+
- [ ] **Mục 3: Broader Context** - Tác động lâu dài của thay đổi.
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
### 1️⃣ BƯỚC 1: THE PROBLEM
|
|
87
|
+
Để bắt đầu, xin bạn hãy tự tóm tắt lại theo hiểu biết của bạn: **Tại sao vấn đề này xuất hiện và nó gây ra hậu quả gì?**
|
|
88
|
+
*(Bạn có thể yêu cầu em giải thích sâu hơn dưới dạng ELI5, ELI14 hoặc ELII bất cứ lúc nào!)*
|
|
89
|
+
```
|
package/workflows/gitnexus.md
CHANGED
|
@@ -18,17 +18,17 @@ node --version
|
|
|
18
18
|
|
|
19
19
|
2. Index project:
|
|
20
20
|
```bash
|
|
21
|
-
npx -y gitnexus@latest analyze
|
|
21
|
+
pnpm dlx gitnexus analyze # (Hoặc: npx -y gitnexus@latest analyze)
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
3. Verify index:
|
|
25
25
|
```bash
|
|
26
|
-
npx gitnexus status
|
|
26
|
+
pnpm dlx gitnexus status # (Hoặc: npx gitnexus status)
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
4. (Optional) Generate embeddings cho semantic search tốt hơn:
|
|
30
30
|
```bash
|
|
31
|
-
npx gitnexus analyze --embeddings
|
|
31
|
+
pnpm dlx gitnexus analyze --embeddings # (Hoặc: npx gitnexus analyze --embeddings)
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
---
|
|
@@ -38,12 +38,12 @@ npx gitnexus analyze --embeddings
|
|
|
38
38
|
// turbo
|
|
39
39
|
1. Xem trạng thái index:
|
|
40
40
|
```bash
|
|
41
|
-
npx gitnexus status
|
|
41
|
+
pnpm dlx gitnexus status # (Hoặc: npx gitnexus status)
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
2. Nếu stale → suggest re-index:
|
|
45
45
|
```bash
|
|
46
|
-
npx gitnexus analyze
|
|
46
|
+
pnpm dlx gitnexus analyze # (Hoặc: npx gitnexus analyze)
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
---
|
|
@@ -96,7 +96,7 @@ READ gitnexus://repo/{name}/processes
|
|
|
96
96
|
// turbo
|
|
97
97
|
1. Liệt kê tất cả repos:
|
|
98
98
|
```bash
|
|
99
|
-
npx gitnexus list
|
|
99
|
+
pnpm dlx gitnexus list # (Hoặc: npx gitnexus list)
|
|
100
100
|
```
|
|
101
101
|
|
|
102
102
|
---
|
|
@@ -105,12 +105,12 @@ npx gitnexus list
|
|
|
105
105
|
|
|
106
106
|
1. Xóa index project hiện tại:
|
|
107
107
|
```bash
|
|
108
|
-
npx gitnexus clean
|
|
108
|
+
pnpm dlx gitnexus clean # (Hoặc: npx gitnexus clean)
|
|
109
109
|
```
|
|
110
110
|
|
|
111
111
|
2. Xóa tất cả indexes (cẩn thận!):
|
|
112
112
|
```bash
|
|
113
|
-
npx gitnexus clean --all --force
|
|
113
|
+
pnpm dlx gitnexus clean --all --force # (Hoặc: npx gitnexus clean --all --force)
|
|
114
114
|
```
|
|
115
115
|
|
|
116
116
|
---
|
|
@@ -114,6 +114,41 @@ Sau khi hiểu, tóm tắt:
|
|
|
114
114
|
|
|
115
115
|
---
|
|
116
116
|
|
|
117
|
+
## Giai đoạn 1.5: Phân tích Thiết kế Hành vi (Mô hình Hooked)
|
|
118
|
+
|
|
119
|
+
> [!NOTE]
|
|
120
|
+
> Để tạo ra một sản phẩm hình thành thói quen lâu dài, chúng ta cần rà soát qua 4 bước của Mô hình Hooked trong sách *Dẫn dắt người dùng*.
|
|
121
|
+
|
|
122
|
+
Trong bước này, AI PHẢI tự phân tích trong `<thought>` và đưa ra 1-2 câu hỏi phản biện sâu sắc cho người dùng về một trong các thành tố sau:
|
|
123
|
+
|
|
124
|
+
### 1. Kích hoạt (Trigger)
|
|
125
|
+
* **Kích hoạt bên trong (Internal Trigger):** Người dùng đang có cảm xúc tiêu cực nào (lo lắng, chán nản, cô đơn, FOMO) ngay trước khi họ muốn dùng app?
|
|
126
|
+
* *Câu hỏi gợi ý:* "Khi người dùng cảm thấy [cảm xúc tiêu cực], họ sẽ tìm đến app của anh như thế nào? Đâu là khoảnh khắc 'ngòi nổ' thúc đẩy họ?"
|
|
127
|
+
* **Kích hoạt bên ngoài (External Trigger):** Cái gì sẽ lôi kéo họ vào app lần đầu hoặc quay lại?
|
|
128
|
+
* *Câu hỏi gợi ý:* "Chúng ta sẽ dùng thông báo push, email hay tác nhân môi trường nào để kích hoạt hành động của họ mà không gây phiền toái?"
|
|
129
|
+
|
|
130
|
+
### 2. Hành động (Action)
|
|
131
|
+
* **Tối giản hành động:** Hành vi đơn giản nhất người dùng thực hiện để nhận phần thưởng là gì?
|
|
132
|
+
* **Fogg Behavior Model ($B = MAP$):**
|
|
133
|
+
* *Motivation:* Người dùng muốn tìm kiếm điều gì (Niềm vui, Hy vọng, Sự chấp nhận)?
|
|
134
|
+
* *Ability:* Làm sao để giảm ma sát (thời gian, tiền bạc, sức lực, tư duy nhận thức)?
|
|
135
|
+
* *Câu hỏi gợi ý:* "Hành động đơn giản nhất mà người dùng cần làm để nhận được giá trị đầu tiên là gì? Có bước nào chúng ta có thể loại bỏ hoặc tối giản hóa nữa không?"
|
|
136
|
+
|
|
137
|
+
### 3. Phần thưởng biến thiên (Variable Reward)
|
|
138
|
+
* **Tính bất ngờ:** Phần thưởng nào giải quyết được vấn đề của họ nhưng vẫn giữ được sự tò mò và không biết lần sau có gì thú vị hơn?
|
|
139
|
+
* **3 nhóm phần thưởng:**
|
|
140
|
+
* *Reward of the Tribe (Bộ lạc):* Sự công nhận, tương tác xã hội.
|
|
141
|
+
* *Reward of the Hunt (Săn mồi):* Thông tin mới, ưu đãi, tài nguyên.
|
|
142
|
+
* *Reward of the Self (Bản thân):* Cảm giác hoàn thành, làm chủ kỹ năng.
|
|
143
|
+
* *Câu hỏi gợi ý:* "Phần thưởng nào sẽ giúp người dùng thỏa mãn ngay lập tức nhưng vẫn kích thích sự tò mò để họ muốn quay lại khám phá thêm?"
|
|
144
|
+
|
|
145
|
+
### 4. Sự đầu tư (Investment)
|
|
146
|
+
* **Tích lũy giá trị (Stored Value):** Người dùng gửi gắm dữ liệu, thời gian, tiền bạc hay danh tiếng gì vào hệ thống?
|
|
147
|
+
* **Nạp đạn trigger tiếp theo:** Sự đầu tư này có tự động tạo ra kích hoạt tiếp theo không?
|
|
148
|
+
* *Câu hỏi gợi ý:* "Sau khi nhận phần thưởng, người dùng sẽ 'đầu tư' lại gì (ví dụ: tùy chỉnh profile, lưu trữ lịch sử, kết nối bạn bè) để app có giá trị hơn với họ trong tương lai?"
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
117
152
|
## Giai đoạn 2: Research Thị Trường (Nếu User Cần)
|
|
118
153
|
|
|
119
154
|
### 2.1. Hỏi về nhu cầu research
|
|
@@ -266,6 +301,14 @@ Tạo file `docs/BRIEF.md`:
|
|
|
266
301
|
## 2. GIẢI PHÁP ĐỀ XUẤT
|
|
267
302
|
[App sẽ giải quyết vấn đề như thế nào]
|
|
268
303
|
|
|
304
|
+
## 2.5. THIẾT KẾ HÀNH VI (MÔ HÌNH HOOKED)
|
|
305
|
+
- **Kích hoạt (Trigger):**
|
|
306
|
+
- *Internal (Bên trong):* [Cảm xúc tiêu cực/nhu cầu kích hoạt sử dụng]
|
|
307
|
+
- *External (Bên ngoài):* [Tác nhân bên ngoài đưa người dùng trở lại]
|
|
308
|
+
- **Hành động (Action):** [Hành vi đơn giản nhất người dùng thực hiện để nhận phần thưởng & tối giản hóa ma sát]
|
|
309
|
+
- **Phần thưởng biến thiên (Variable Reward):** [Phần thưởng tạo sự thỏa mãn và tò mò (Bộ lạc, Săn mồi, Bản thân)]
|
|
310
|
+
- **Sự đầu tư (Investment):** [Người dùng đầu tư gì để tích lũy giá trị và kích hoạt trigger tiếp theo]
|
|
311
|
+
|
|
269
312
|
## 3. ĐỐI TƯỢNG SỬ DỤNG
|
|
270
313
|
- **Primary:** [Ai dùng chính]
|
|
271
314
|
- **Secondary:** [Ai dùng phụ]
|
|
@@ -132,6 +132,11 @@ User gõ: /code (không có gì)
|
|
|
132
132
|
### 0.3. Lưu Current Plan vào Session
|
|
133
133
|
|
|
134
134
|
Khi bắt đầu code theo phase:
|
|
135
|
+
|
|
136
|
+
### 0.4. Tự động hóa Cô lập Ngữ cảnh (Subagent Research)
|
|
137
|
+
Trước khi phân tích codebase hoặc tìm kiếm nhiều file:
|
|
138
|
+
- BẮT BUỘC gọi subagent `research` (built-in) để thực hiện quét.
|
|
139
|
+
- Chỉ lấy kết quả tóm tắt dạng JSON cấu trúc gửi về qua tin nhắn để tránh dồn log tìm kiếm vào chat chính (chống Context Rot).
|
|
135
140
|
```json
|
|
136
141
|
// .brain/session.json
|
|
137
142
|
{
|
|
@@ -21,16 +21,34 @@ description: ✨ Khởi tạo dự án chuẩn Antigravity (v5.0 - Spec-First +
|
|
|
21
21
|
|
|
22
22
|
---
|
|
23
23
|
|
|
24
|
-
## ⚡ Giai đoạn 1: Context Awareness & Smart Adoption
|
|
24
|
+
## ⚡ Giai đoạn 1: Context Awareness & Smart Adoption (SAEE Engine)
|
|
25
25
|
|
|
26
26
|
**Kịch bản A: Thư mục trống (New Project)**
|
|
27
27
|
* Chạy quy trình phỏng vấn **Vision Capture**.
|
|
28
28
|
* Hỏi: "Anh muốn dùng template có sẵn không?" (Clean Arch, Boilerplate).
|
|
29
29
|
|
|
30
|
-
**Kịch bản B: Thư mục có Code (Adoption Mode)**
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
**Kịch bản B: Thư mục có Code (Adoption Mode - SAEE Activation)**
|
|
31
|
+
AI thực hiện quét phân tích codebase tự động theo 5 bước:
|
|
32
|
+
|
|
33
|
+
1. **Smart Stack Analyzer**:
|
|
34
|
+
* AI chủ động đọc cấu trúc thư mục và xem nội dung các file cấu hình quan trọng như `package.json`, `Podfile`, `build.gradle`, `Package.swift`, `requirements.txt` bằng `view_file` (KHÔNG grep blind).
|
|
35
|
+
* Nhận diện ngôn ngữ, framework (React, Next.js, Expo, UIKit, FastAPI...), DB và package manager.
|
|
36
|
+
|
|
37
|
+
2. **Ecosystem Recommender (MCP & Skills)**:
|
|
38
|
+
* Đối chiếu với bảng mapping tại [setup-mapping.json](file:///Users/trungkientn/Dev/NodeJS/main-awf/templates/setup-mapping.json) để đề xuất:
|
|
39
|
+
* **MCP Servers phù hợp** (ví dụ: `playwright`, `maestro`, `firebase-mcp-server`, `ios-simulator`).
|
|
40
|
+
* **Adaptive Skills cần kích hoạt** (ví dụ: `expo-build-optimizer`, `firebase-firestore`, `swiftui-pro`).
|
|
41
|
+
* Hỏi ý kiến người dùng: *"Tìm thấy stack [Stack]. Bật MCP [MCP] và Skills [Skills] này nhé anh?"*
|
|
42
|
+
|
|
43
|
+
3. **Automated Hook System (AHS)**:
|
|
44
|
+
* Đề xuất kích hoạt các hook tự động như `autoCommit: true`, `build_preflight: "awkit build"` trước khi push.
|
|
45
|
+
* Điền trực tiếp các cấu hình được duyệt vào `.project-identity` của dự án mới.
|
|
46
|
+
|
|
47
|
+
4. **Tailored Workflows**:
|
|
48
|
+
* Đề xuất nạp thêm các custom workflows đặc thù (ví dụ: `/aso-audit` cho Mobile, `/api-test` cho Backend).
|
|
49
|
+
|
|
50
|
+
5. **Tạo File `.project-identity`**:
|
|
51
|
+
* Tự động tổng hợp toàn bộ kết quả phân tích và lựa chọn của người dùng vào file `.project-identity`.
|
|
34
52
|
|
|
35
53
|
---
|
|
36
54
|
|