@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,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "🎮 Setup pixel-mcp MCP Server cho Aseprite pixel art"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Pixel Setup — First-Time Configuration
|
|
6
|
+
|
|
7
|
+
## Prerequisites Check
|
|
8
|
+
|
|
9
|
+
1. **Verify Aseprite installation:**
|
|
10
|
+
```bash
|
|
11
|
+
# macOS
|
|
12
|
+
ls -la /Applications/Aseprite.app/Contents/MacOS/aseprite 2>/dev/null && echo "✅ Aseprite found" || echo "❌ Aseprite not found"
|
|
13
|
+
|
|
14
|
+
# Linux
|
|
15
|
+
which aseprite 2>/dev/null && echo "✅ Aseprite found" || echo "❌ Aseprite not found"
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
2. **Detect Aseprite path:**
|
|
19
|
+
- macOS: `/Applications/Aseprite.app/Contents/MacOS/aseprite`
|
|
20
|
+
- Linux: `/usr/bin/aseprite` or `/usr/local/bin/aseprite`
|
|
21
|
+
- Windows: `C:\Program Files\Aseprite\Aseprite.exe`
|
|
22
|
+
|
|
23
|
+
If Aseprite not found, inform user:
|
|
24
|
+
> ⚠️ Aseprite chưa được cài đặt. Tải từ https://www.aseprite.org/ (có phí) hoặc build từ source (miễn phí).
|
|
25
|
+
|
|
26
|
+
## Step 1: Install pixel-mcp
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
# Option A: Download pre-built binary from GitHub Releases
|
|
30
|
+
# https://github.com/willibrandon/pixel-mcp/releases
|
|
31
|
+
|
|
32
|
+
# Option B: Build from source (requires Go 1.23+)
|
|
33
|
+
git clone https://github.com/willibrandon/pixel-mcp.git /tmp/pixel-mcp-build
|
|
34
|
+
cd /tmp/pixel-mcp-build
|
|
35
|
+
make build
|
|
36
|
+
mkdir -p ~/.local/bin
|
|
37
|
+
cp bin/pixel-mcp ~/.local/bin/pixel-mcp
|
|
38
|
+
chmod +x ~/.local/bin/pixel-mcp
|
|
39
|
+
echo "✅ pixel-mcp installed to ~/.local/bin/pixel-mcp"
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Step 2: Create Configuration
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
mkdir -p ~/.config/pixel-mcp
|
|
46
|
+
cat > ~/.config/pixel-mcp/config.json << 'PIXEL_CONFIG'
|
|
47
|
+
{
|
|
48
|
+
"aseprite_path": "/Applications/Aseprite.app/Contents/MacOS/aseprite",
|
|
49
|
+
"temp_dir": "/tmp/pixel-mcp",
|
|
50
|
+
"timeout": 30,
|
|
51
|
+
"log_level": "info"
|
|
52
|
+
}
|
|
53
|
+
PIXEL_CONFIG
|
|
54
|
+
echo "✅ Config created at ~/.config/pixel-mcp/config.json"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**Note:** If user provides Aseprite path as argument `$1`, use that instead of the default macOS path.
|
|
58
|
+
|
|
59
|
+
## Step 3: Verify MCP Server
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
~/.local/bin/pixel-mcp --health 2>&1 || echo "⚠️ Health check failed — may need Aseprite path correction"
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Step 4: Add to MCP Config (if not already present)
|
|
66
|
+
|
|
67
|
+
Check if `aseprite` entry exists in the user's MCP config. If not, add it:
|
|
68
|
+
|
|
69
|
+
```json
|
|
70
|
+
{
|
|
71
|
+
"aseprite": {
|
|
72
|
+
"command": "~/.local/bin/pixel-mcp",
|
|
73
|
+
"args": []
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Done
|
|
79
|
+
|
|
80
|
+
Report to user:
|
|
81
|
+
```
|
|
82
|
+
✅ Pixel MCP Setup Complete
|
|
83
|
+
- Aseprite: [detected path]
|
|
84
|
+
- pixel-mcp: ~/.local/bin/pixel-mcp
|
|
85
|
+
- Config: ~/.config/pixel-mcp/config.json
|
|
86
|
+
- Status: [health check result]
|
|
87
|
+
|
|
88
|
+
Bạn có thể bắt đầu tạo pixel art bằng cách mô tả. Ví dụ:
|
|
89
|
+
"Tạo một sprite Game Boy 32x32 của một nhân vật"
|
|
90
|
+
```
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Review code hoặc diff để phát hiện over-engineering. Chỉ ra code thừa, stdlib bị viết lại, dependency không cần thiết.
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
priority: "medium"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Ponytail Review — Over-Engineering Audit
|
|
8
|
+
|
|
9
|
+
## 🎯 Mục đích
|
|
10
|
+
|
|
11
|
+
Quét code/diff để tìm các điểm phức tạp không cần thiết. Không review logic/security — chỉ hunt complexity.
|
|
12
|
+
|
|
13
|
+
## 🔧 Quy trình thực hiện
|
|
14
|
+
|
|
15
|
+
### Bước 1: Xác định phạm vi
|
|
16
|
+
- Nếu user chỉ định file/directory → quét đó.
|
|
17
|
+
- Nếu không → quét diff hiện tại (`git diff --staged` hoặc `git diff`).
|
|
18
|
+
- Nếu không có diff → quét toàn bộ `src/` hoặc thư mục code chính.
|
|
19
|
+
|
|
20
|
+
### Bước 2: Áp dụng Ponytail Ladder ngược
|
|
21
|
+
Với mỗi đoạn code, kiểm tra:
|
|
22
|
+
1. **Có cần tồn tại không?** → Tag `delete:` nếu speculative/dead.
|
|
23
|
+
2. **Stdlib đã có?** → Tag `stdlib:` + tên hàm stdlib thay thế.
|
|
24
|
+
3. **Native platform có?** → Tag `native:` + tên feature thay thế.
|
|
25
|
+
4. **Abstraction duy nhất?** → Tag `yagni:` nếu interface/factory/wrapper chỉ có 1 implementation.
|
|
26
|
+
5. **Có thể ngắn hơn?** → Tag `shrink:` + đoạn code rút gọn.
|
|
27
|
+
|
|
28
|
+
### Bước 3: Output format
|
|
29
|
+
```
|
|
30
|
+
L<line>: <tag> <what>. <replacement>.
|
|
31
|
+
```
|
|
32
|
+
Hoặc multi-file:
|
|
33
|
+
```
|
|
34
|
+
<file>:L<line>: <tag> <what>. <replacement>.
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Bước 4: Tổng kết
|
|
38
|
+
```
|
|
39
|
+
net: -<N> lines possible.
|
|
40
|
+
```
|
|
41
|
+
Nếu code đã tối giản: `Lean already. Ship.`
|
|
42
|
+
|
|
43
|
+
## 📋 Ví dụ Output
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
L12-38: stdlib: 27-line email validator. "@" in email, 1 line.
|
|
47
|
+
L4: native: moment.js for one format call. Intl.DateTimeFormat, 0 deps.
|
|
48
|
+
utils.py:L88: yagni: AbstractRepository, 1 impl. Inline it.
|
|
49
|
+
L52-71: delete: retry wrapper on idempotent local call. Nothing.
|
|
50
|
+
L30-44: shrink: manual loop → dict(zip(keys, values)), 1 line.
|
|
51
|
+
|
|
52
|
+
net: -87 lines possible.
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## ⚠️ Ranh giới
|
|
56
|
+
|
|
57
|
+
- KHÔNG flag smoke tests hoặc assert-based self-checks — đó là ponytail minimum.
|
|
58
|
+
- KHÔNG sửa code — chỉ liệt kê findings.
|
|
59
|
+
- Correctness bugs, security holes → dùng review workflow khác.
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 🔨 RE Android Phase 2+3+4 — Blueprint + UI Shell → Logic Build → Final Parity (UI-First)
|
|
3
|
+
parent: reverse-android
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /re-android-build — Blueprint + UI + Build (Per Feature)
|
|
7
|
+
|
|
8
|
+
> **Parent:** [`/reverse-android`](reverse-android.md) → Phase 2+3+4
|
|
9
|
+
> **Prerequisite:** Completed Architecture from [`/re-android-design`](reverse-android-design.md)
|
|
10
|
+
> **Skill:** `smali-to-kotlin` → `phase-2-blueprint-ui.md` + `phase-3-logic-build.md`
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## 🔄 Feature Loop (UI-First)
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
For each feature (from Architecture Build Order):
|
|
18
|
+
Phase 2: Blueprint + UI (contracts + visual shell)
|
|
19
|
+
↓ 🚦 GATE: User approves UI + contracts
|
|
20
|
+
Phase 3: Logic Build (domain → data → wire)
|
|
21
|
+
↓ 📊 CHECKPOINT
|
|
22
|
+
→ Next feature
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 📐🎨 Phase 2: Blueprint + UI Design
|
|
28
|
+
|
|
29
|
+
> **Output:** Approved contracts + Working Compose UI shell with mock data.
|
|
30
|
+
|
|
31
|
+
### Part A: Contracts (signatures only)
|
|
32
|
+
|
|
33
|
+
#### 2.1: Deep Smali Reading
|
|
34
|
+
Read Smali files for the chosen feature. Extract class hierarchy, fields, method signatures,
|
|
35
|
+
string constants, control flow. See `smali-reading-guide.md`.
|
|
36
|
+
|
|
37
|
+
#### 2.2–2.5: Define Contracts
|
|
38
|
+
```kotlin
|
|
39
|
+
// 2.2 Domain Model
|
|
40
|
+
data class [Model](val field: Type, ...)
|
|
41
|
+
|
|
42
|
+
// 2.3 Repository Interface
|
|
43
|
+
interface [Feature]Repository {
|
|
44
|
+
suspend fun [method](...): Result<[Type]>
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// 2.4 API Interface
|
|
48
|
+
interface [Feature]Api {
|
|
49
|
+
@[METHOD]("[endpoint]")
|
|
50
|
+
suspend fun [method](...): [Response]
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// 2.5 UseCase
|
|
54
|
+
class [Action]UseCase(repo: [Feature]Repository) {
|
|
55
|
+
suspend operator fun invoke(...): Result<[Type]> // TODO()
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
#### 2.6: UI State Design
|
|
60
|
+
```kotlin
|
|
61
|
+
data class [Screen]UiState(
|
|
62
|
+
val field: Type = default,
|
|
63
|
+
val isLoading: Boolean = false,
|
|
64
|
+
val error: String? = null
|
|
65
|
+
)
|
|
66
|
+
sealed interface [Screen]Event { /* navigation, snackbar */ }
|
|
67
|
+
sealed interface [Screen]Action { /* user interactions */ }
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Part B: UI Visual Shell
|
|
71
|
+
|
|
72
|
+
#### 2.7: Resource Extraction ⭐ (BEFORE UI code!)
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
# Only resources for THIS screen
|
|
76
|
+
grep -o '@drawable/[a-z_]*' [apktool_dir]/res/layout/activity_[screen].xml | sort -u
|
|
77
|
+
grep -o '@color/[a-z_]*' [apktool_dir]/res/layout/activity_[screen].xml | sort -u
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Copy ONLY needed resources. Verify they compile.
|
|
81
|
+
|
|
82
|
+
#### 2.8: UI Implementation ⭐ (Visual shell with mock data)
|
|
83
|
+
|
|
84
|
+
- Use UiState from 2.6 with hardcoded defaults
|
|
85
|
+
- Use REAL resources from 2.7
|
|
86
|
+
- Create `[Screen]Content` composable (stateless)
|
|
87
|
+
- Match visual parity with original app
|
|
88
|
+
- NO ViewModel connection, NO real API calls
|
|
89
|
+
|
|
90
|
+
```kotlin
|
|
91
|
+
@Composable
|
|
92
|
+
fun [Screen]Content(
|
|
93
|
+
uiState: [Screen]UiState = [Screen]UiState(), // Mock
|
|
94
|
+
onAction: ([Screen]Action) -> Unit = {} // No-op
|
|
95
|
+
) {
|
|
96
|
+
// Full Compose UI matching original app
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@Preview @Composable
|
|
100
|
+
private fun NormalPreview() { AppTheme { [Screen]Content() } }
|
|
101
|
+
|
|
102
|
+
@Preview @Composable
|
|
103
|
+
private fun LoadingPreview() { AppTheme { [Screen]Content([Screen]UiState(isLoading = true)) } }
|
|
104
|
+
|
|
105
|
+
@Preview @Composable
|
|
106
|
+
private fun ErrorPreview() { AppTheme { [Screen]Content([Screen]UiState(error = "Error")) } }
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
#### 2.9: Visual Parity Check ⭐
|
|
110
|
+
|
|
111
|
+
Compare with original app:
|
|
112
|
+
- [ ] Layout structure matches
|
|
113
|
+
- [ ] Colors, typography, spacing correct
|
|
114
|
+
- [ ] Icons/images positioned correctly
|
|
115
|
+
- [ ] All states: normal, loading, error, empty
|
|
116
|
+
|
|
117
|
+
### 🚦 UI + Contracts Gate (MANDATORY)
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
"📐🎨 Blueprint + UI cho [Feature] xong:
|
|
121
|
+
📝 Contracts: [N] models, [N] repos, [N] use cases, [N] APIs
|
|
122
|
+
🎨 UI: [Screen] with [N] state previews
|
|
123
|
+
📸 Visual Parity: [OK / needs adjustment]
|
|
124
|
+
|
|
125
|
+
→ ✅ Approve → Phase 3 (Logic Build)
|
|
126
|
+
→ 🎨 Adjust UI → fix then re-check
|
|
127
|
+
→ 📝 Adjust contracts → revise"
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
> ⚠️ **DO NOT proceed to Phase 3 without user approval.**
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## 🔨 Phase 3: Logic Build
|
|
135
|
+
|
|
136
|
+
> **Output:** Full production-quality Kotlin code. Wire logic to EXISTING UI.
|
|
137
|
+
|
|
138
|
+
### 3.1: Domain Layer
|
|
139
|
+
Models + Repository interfaces + UseCases (implement invoke with repo calls)
|
|
140
|
+
|
|
141
|
+
### 3.2: Data Layer
|
|
142
|
+
DTOs + Retrofit API + Room (if applicable) + Repository implementation
|
|
143
|
+
|
|
144
|
+
### 3.3: DI Module
|
|
145
|
+
Hilt @Module with @Binds for repository
|
|
146
|
+
|
|
147
|
+
### 3.4: ViewModel
|
|
148
|
+
@HiltViewModel with StateFlow + SharedFlow, implements onAction()
|
|
149
|
+
|
|
150
|
+
### 3.5: Wire UI ↔ Logic ⭐ (NOT "code new UI")
|
|
151
|
+
|
|
152
|
+
The UI already exists from Phase 2.8. Only CONNECT it:
|
|
153
|
+
|
|
154
|
+
```kotlin
|
|
155
|
+
// Keep stateless Content composable from Phase 2 (for Preview):
|
|
156
|
+
// [Screen]Content(uiState, onAction) — DO NOT MODIFY
|
|
157
|
+
|
|
158
|
+
// ADD wrapper that wires ViewModel:
|
|
159
|
+
@Composable
|
|
160
|
+
fun [Screen](
|
|
161
|
+
viewModel: [Screen]ViewModel = hiltViewModel(),
|
|
162
|
+
onNavigate: () -> Unit
|
|
163
|
+
) {
|
|
164
|
+
val uiState by viewModel.uiState.collectAsStateWithLifecycle()
|
|
165
|
+
LaunchedEffect(Unit) {
|
|
166
|
+
viewModel.events.collect { event -> /* handle navigation */ }
|
|
167
|
+
}
|
|
168
|
+
[Screen]Content(uiState = uiState, onAction = viewModel::onAction)
|
|
169
|
+
}
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### 3.6: Integration Test ⭐
|
|
173
|
+
- [ ] API calls succeed, data displays
|
|
174
|
+
- [ ] Loading/error states work
|
|
175
|
+
- [ ] Navigation correct
|
|
176
|
+
- [ ] Crypto output matches (if applicable)
|
|
177
|
+
|
|
178
|
+
### 🔒 Crypto Utils (Special)
|
|
179
|
+
If crypto involved: implement + unit test IMMEDIATELY with known pairs.
|
|
180
|
+
> ⚠️ MUST produce identical output.
|
|
181
|
+
|
|
182
|
+
### ✅ Feature Checkpoint
|
|
183
|
+
|
|
184
|
+
```markdown
|
|
185
|
+
## ✅ Feature Complete: [Name]
|
|
186
|
+
Files: [list] | Resources: [count] | Tests: [status]
|
|
187
|
+
⏭️ Next Feature: [Name] → Return to Phase 2
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## ✅ Phase 4: Final Parity Check (After ALL features)
|
|
193
|
+
|
|
194
|
+
### Checklist
|
|
195
|
+
- [ ] API Parity — all endpoints match (headers, body, encoding)
|
|
196
|
+
- [ ] Data Parity — crypto/hash output identical
|
|
197
|
+
- [ ] UI Parity — screen-by-screen comparison
|
|
198
|
+
- [ ] Edge Cases — empty states, errors, offline, lifecycle
|
|
199
|
+
- [ ] Build: `./gradlew assembleDebug && ./gradlew test && ./gradlew lint`
|
|
200
|
+
|
|
201
|
+
### 🎉 Final Summary
|
|
202
|
+
|
|
203
|
+
```markdown
|
|
204
|
+
## ✅ Reverse Engineering Complete!
|
|
205
|
+
- Screens: [N] | Features: [N]
|
|
206
|
+
- Libs reused: [N] | Replaced: [N]
|
|
207
|
+
- Tests: [pass/fail] | Lint: [warnings]
|
|
208
|
+
|
|
209
|
+
⏭️ Next: /test → /deploy → /code-janitor
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## 🔗 Related
|
|
215
|
+
|
|
216
|
+
- **Parent:** [`/reverse-android`](reverse-android.md)
|
|
217
|
+
- **Previous:** [`/re-android-design`](reverse-android-design.md) (Phase 1)
|
|
218
|
+
- **Skill:** `smali-to-kotlin` → `phase-2-blueprint-ui.md` + `phase-3-logic-build.md`
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
*re-android-build v4.0.0 — UI-First Blueprint + Build*
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 🏗️ RE Android Phase 1 — Architecture Design (NO CODE BODIES)
|
|
3
|
+
parent: reverse-android
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /re-android-design — Architecture Blueprint
|
|
7
|
+
|
|
8
|
+
> **Parent:** [`/reverse-android`](reverse-android.md) → Phase 1
|
|
9
|
+
> **Prerequisite:** Completed App Map from [`/re-android-discover`](reverse-android-discover.md)
|
|
10
|
+
> **Skill:** `smali-to-kotlin` → `phase-1-architecture.md`
|
|
11
|
+
> **Zoom Level:** 1 — District View
|
|
12
|
+
> **Output:** Architecture Blueprint (diagrams, tables, NO CODE BODIES)
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## ⛔ ZOOM 1 RULE
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
This workflow produces NO CODE BODIES.
|
|
20
|
+
Allowed: Architecture diagrams, layer maps, feature tables, file paths, API endpoint lists.
|
|
21
|
+
Allowed: build.gradle.kts plugin/dependency declarations (declaration only).
|
|
22
|
+
If you are about to write a function body → STOP → wrong zoom level.
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 📐 Step 1: Layer Design
|
|
28
|
+
|
|
29
|
+
Design Clean Architecture layers based on App Map:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
┌─────────────────────────────────────┐
|
|
33
|
+
│ Presentation │
|
|
34
|
+
│ ├── screens/ ([N] screens) │
|
|
35
|
+
│ ├── navigation/ (NavGraph + Routes) │
|
|
36
|
+
│ ├── theme/ (Material 3) │
|
|
37
|
+
│ └── components/ (Shared UI) │
|
|
38
|
+
├─────────────────────────────────────┤
|
|
39
|
+
│ Domain │
|
|
40
|
+
│ ├── model/ ([N] models) │
|
|
41
|
+
│ ├── repository/ ([N] interfaces) │
|
|
42
|
+
│ └── usecase/ ([N] use cases) │
|
|
43
|
+
├─────────────────────────────────────┤
|
|
44
|
+
│ Data │
|
|
45
|
+
│ ├── remote/ ([N] API services) │
|
|
46
|
+
│ ├── local/ (Room, DataStore) │
|
|
47
|
+
│ └── repository/ (implementations) │
|
|
48
|
+
├─────────────────────────────────────┤
|
|
49
|
+
│ DI (Hilt) │
|
|
50
|
+
│ └── modules/ (Network, DB, Repo) │
|
|
51
|
+
└─────────────────────────────────────┘
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## 📋 Step 2: Feature → File Mapping
|
|
55
|
+
|
|
56
|
+
Map mỗi feature tới Clean Architecture components:
|
|
57
|
+
|
|
58
|
+
| Feature | Domain Model | Repository | UseCase | Screen(s) | ViewModel |
|
|
59
|
+
|---------|-------------|-----------|---------|-----------|-----------|
|
|
60
|
+
|
|
61
|
+
## 🌐 Step 3: API Endpoint Inventory
|
|
62
|
+
|
|
63
|
+
Trích xuất TẤT CẢ API endpoints từ Smali:
|
|
64
|
+
|
|
65
|
+
| # | Method | Endpoint | Auth | Notes |
|
|
66
|
+
|---|--------|----------|------|-------|
|
|
67
|
+
|
|
68
|
+
**Base URL:** `[from Smali const-string]`
|
|
69
|
+
|
|
70
|
+
## 💾 Step 4: Data Schema
|
|
71
|
+
|
|
72
|
+
| Model | Key Fields | Source | Storage |
|
|
73
|
+
|-------|-----------|--------|---------|
|
|
74
|
+
|
|
75
|
+
## 📁 Step 5: Project Structure
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
app/src/main/java/[package]/
|
|
79
|
+
├── App.kt
|
|
80
|
+
├── di/
|
|
81
|
+
├── data/remote/ + data/local/ + data/repository/
|
|
82
|
+
├── domain/model/ + domain/repository/ + domain/usecase/
|
|
83
|
+
├── presentation/navigation/ + screens/ + theme/
|
|
84
|
+
└── util/
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## 🔢 Step 6: Build Order (UI-First) ⭐
|
|
88
|
+
|
|
89
|
+
| # | Phase | Scope | Complexity |
|
|
90
|
+
|---|-------|-------|-----------|
|
|
91
|
+
| 1 | 🟢 Foundation | Project + DI skeleton + Theme/Design System | Low |
|
|
92
|
+
| 2 | 🟢 Navigation | Routes, tab bar, NavGraph | Low |
|
|
93
|
+
| 3 | 🔵 Per Feature | Blueprint (contracts) + UI Shell (visual) | Medium |
|
|
94
|
+
| 4 | 🚦 UI Gate | User approves UI before logic | — |
|
|
95
|
+
| 5 | 🟡 Per Feature | Logic Build (Domain → Data → VM → Wire UI) | High |
|
|
96
|
+
| 6 | 📦 SDKs | Third-party SDK + Native libs integration | Medium |
|
|
97
|
+
| N | 🔴 Final | Full Parity Check | High |
|
|
98
|
+
|
|
99
|
+
> **UI-First:** Design and approve UI before coding logic for each feature.
|
|
100
|
+
|
|
101
|
+
## 🔧 Step 7: Tech Stack Confirmation
|
|
102
|
+
|
|
103
|
+
| Decision | Choice | Rationale |
|
|
104
|
+
|----------|--------|-----------|
|
|
105
|
+
| UI | Jetpack Compose + M3 | Modern |
|
|
106
|
+
| DI | Hilt | Standard |
|
|
107
|
+
| ... | ... | ... |
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## 📊 Output: Architecture Blueprint
|
|
112
|
+
|
|
113
|
+
Sử dụng template từ `skills/smali-to-kotlin/templates/architecture.md`.
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## ✅ Gate: Chuyển sang Phase 2
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
"🏗️ Architecture Blueprint xong!
|
|
121
|
+
Anh muốn bắt đầu từ feature nào?
|
|
122
|
+
Em suggest: [Feature X] vì [reason]."
|
|
123
|
+
|
|
124
|
+
→ User picks feature → /re-android-build (Phase 2: Blueprint for that feature)
|
|
125
|
+
→ User wants changes → adjust architecture
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## 🔗 Related
|
|
131
|
+
|
|
132
|
+
- **Previous:** [`/re-android-discover`](reverse-android-discover.md) (Phase 0)
|
|
133
|
+
- **Next:** [`/re-android-build`](reverse-android-build.md) (Phase 2+3)
|
|
134
|
+
- **Parent:** [`/reverse-android`](reverse-android.md)
|
|
135
|
+
- **Skill:** `skills/smali-to-kotlin/phase-1-architecture.md`
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
*re-android-design v3.0.0 — Phase 1: Architecture Blueprint*
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 🗺️ RE Android Phase 0 — Discovery & App Map (NO CODE output)
|
|
3
|
+
parent: reverse-android
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /re-android-discover — Discovery & App Map
|
|
7
|
+
|
|
8
|
+
> **Parent:** [`/reverse-android`](reverse-android.md) → Phase 0
|
|
9
|
+
> **Skill:** `smali-to-kotlin` → `phase-0-discovery.md`
|
|
10
|
+
> **Zoom Level:** 0 — Satellite View
|
|
11
|
+
> **Output:** App Map (diagrams, tables, NO CODE)
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## ⛔ ZOOM 0 RULE
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
This workflow produces NO CODE output.
|
|
19
|
+
Only: diagrams, tables, bullet lists, bash scan commands.
|
|
20
|
+
If you are about to write Kotlin code → STOP → you are at wrong zoom level.
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 📦 Step 0: Library Scanner
|
|
26
|
+
|
|
27
|
+
> Nhận diện toàn bộ thư viện **trước khi làm bất kỳ thứ gì**.
|
|
28
|
+
|
|
29
|
+
### 0.1: Quét structure
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# Top-level packages
|
|
33
|
+
find [apktool_dir]/smali -maxdepth 3 -type d | sed 's|.*/smali/||' | sort
|
|
34
|
+
|
|
35
|
+
# Multi-dex check
|
|
36
|
+
find [apktool_dir] -name "smali*" -maxdepth 1 -type d
|
|
37
|
+
|
|
38
|
+
# Resource counts
|
|
39
|
+
ls [apktool_dir]/res/layout/ 2>/dev/null | wc -l
|
|
40
|
+
ls [apktool_dir]/res/drawable*/ 2>/dev/null | wc -l
|
|
41
|
+
|
|
42
|
+
# Native + Assets
|
|
43
|
+
find [apktool_dir]/lib -name "*.so" 2>/dev/null
|
|
44
|
+
ls [apktool_dir]/assets/ 2>/dev/null
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 0.2: Phân loại thư viện
|
|
48
|
+
|
|
49
|
+
Dùng patterns từ `library-patterns.md`, phân thành 5 nhóm:
|
|
50
|
+
|
|
51
|
+
| Category | Example | Action |
|
|
52
|
+
|----------|---------|--------|
|
|
53
|
+
| ✅ Reuse | Retrofit, OkHttp | Add to build.gradle |
|
|
54
|
+
| 🔄 Replace | Volley, AsyncTask | Map to modern |
|
|
55
|
+
| 🔵 Google/Firebase | FCM, Analytics | Use latest |
|
|
56
|
+
| 📱 Native | .so files | Keep, JNI bridge |
|
|
57
|
+
| 🏷️ App Code | com.app.* | Rebuild |
|
|
58
|
+
|
|
59
|
+
### 0.3: User approval
|
|
60
|
+
|
|
61
|
+
> **GATE:** Hiển thị Library Report → User approve trước khi tiếp.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## 📄 Step 1: Manifest Analysis
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
cat [apktool_dir]/AndroidManifest.xml
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### 1.1: Trích xuất
|
|
72
|
+
|
|
73
|
+
- Application ID + Package name
|
|
74
|
+
- Min/Target SDK
|
|
75
|
+
- Permissions (phân nhóm: network, storage, camera, location, other)
|
|
76
|
+
- Entry points: Application class, Launcher Activity, MainActivity
|
|
77
|
+
- Components: Activities (→ future screens), Services, Receivers, Providers
|
|
78
|
+
- Deep links / Intent filters
|
|
79
|
+
|
|
80
|
+
### 1.2: Screen Map
|
|
81
|
+
|
|
82
|
+
Map Activities → future Compose screens:
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
SplashActivity → presentation/screens/splash/
|
|
86
|
+
LoginActivity → presentation/screens/auth/
|
|
87
|
+
MainActivity → presentation/screens/main/
|
|
88
|
+
DetailActivity → presentation/screens/detail/
|
|
89
|
+
SettingsActivity → presentation/screens/settings/
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Draw navigation flow (ASCII or Mermaid).
|
|
93
|
+
|
|
94
|
+
### 1.3: Complexity Estimate
|
|
95
|
+
|
|
96
|
+
| Area | Rating | Notes |
|
|
97
|
+
|------|--------|-------|
|
|
98
|
+
| Data Layer | ●●●○○ | [evidence] |
|
|
99
|
+
| Core Logic | ●●○○○ | [evidence] |
|
|
100
|
+
| UI Screens | ●●●●○ | [evidence] |
|
|
101
|
+
| SDK Integration | ●●○○○ | [evidence] |
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## 📊 Output: App Map
|
|
106
|
+
|
|
107
|
+
Sử dụng template từ `skills/smali-to-kotlin/templates/app-map.md`:
|
|
108
|
+
|
|
109
|
+
```markdown
|
|
110
|
+
## 🗺️ App Map: [App Name]
|
|
111
|
+
|
|
112
|
+
### Identity
|
|
113
|
+
[package, SDK, counts]
|
|
114
|
+
|
|
115
|
+
### Screen Flow
|
|
116
|
+
[navigation graph]
|
|
117
|
+
|
|
118
|
+
### Library Landscape
|
|
119
|
+
[categorized table]
|
|
120
|
+
|
|
121
|
+
### Complexity Estimate
|
|
122
|
+
[rating dots]
|
|
123
|
+
|
|
124
|
+
### Key Observations
|
|
125
|
+
[notable findings]
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## ✅ Gate: Chuyển sang Phase 1
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
"🗺️ App Map xong! Anh review map này.
|
|
134
|
+
Có gì cần điều chỉnh không? OK → em sẽ thiết kế Architecture."
|
|
135
|
+
|
|
136
|
+
→ User approves → /re-android-design (Phase 1)
|
|
137
|
+
→ User has questions → investigate và update map
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## 🔗 Related
|
|
143
|
+
|
|
144
|
+
- **Next:** [`/re-android-design`](reverse-android-design.md) (Phase 1: Architecture)
|
|
145
|
+
- **Parent:** [`/reverse-android`](reverse-android.md)
|
|
146
|
+
- **Skill reference:** `skills/smali-to-kotlin/phase-0-discovery.md`
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
*re-android-discover v3.0.0 — Phase 0: Discovery & App Map*
|