@leejungkiin/awkit 1.0.6 → 1.0.8
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/VERSION +1 -1
- package/core/GEMINI.md.bak +168 -181
- package/package.json +2 -2
- package/schemas/brain-snapshot.json +167 -0
- package/skills/CATALOG.md +70 -0
- package/skills/beads-manager/SKILL.md +20 -1
- package/skills/memory-sync/SKILL.md +20 -2
- package/skills/nm-memory-audit/SKILL.md +157 -0
- package/skills/nm-memory-evolution/SKILL.md +202 -0
- package/skills/nm-memory-intake/SKILL.md +135 -0
- package/skills/nm-memory-sync/SKILL.md +184 -0
- package/skills/orchestrator/SKILL.md +41 -50
- package/skills/schemas/brain-snapshot.json +167 -0
- package/skills/skills/nm-memory-audit/SKILL.md +157 -0
- package/skills/skills/nm-memory-evolution/SKILL.md +202 -0
- package/skills/skills/nm-memory-intake/SKILL.md +135 -0
- package/skills/skills/nm-memory-sync/SKILL.md +184 -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/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/smali-to-swift/phase-0-discovery.md +137 -0
- package/skills/smali-to-swift/phase-1-architecture.md +168 -0
- package/skills/smali-to-swift/phase-2-blueprint-ui.md +348 -0
- package/skills/smali-to-swift/phase-2-blueprint.md +173 -0
- package/skills/smali-to-swift/phase-3-build.md +257 -0
- package/skills/smali-to-swift/phase-3-logic-build.md +312 -0
- package/skills/smali-to-swift/templates/app-map.md +82 -0
- package/skills/smali-to-swift/templates/architecture.md +97 -0
- package/skills/smali-to-swift/templates/blueprint.md +82 -0
- package/skills/workflows/nm-import.md +73 -0
- package/skills/workflows/nm-recall.md +67 -0
- package/skills/workflows/nm-snapshot.md +69 -0
- package/workflows/_uncategorized/nm-import.md +73 -0
- package/workflows/_uncategorized/nm-recall.md +67 -0
- package/workflows/_uncategorized/nm-snapshot.md +69 -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/mobile/reverse-android-build.md +119 -79
- package/workflows/mobile/reverse-android-design.md +10 -7
- package/workflows/mobile/reverse-android.md +52 -46
- package/workflows/mobile/reverse-ios-build.md +161 -50
- package/workflows/mobile/reverse-ios-design.md +10 -1
- package/workflows/mobile/reverse-ios.md +49 -37
- package/skills/adaptive-language/SKILL.md +0 -189
- package/skills/ambient-brain/SKILL.md +0 -314
- package/skills/ambient-brain/brain-router.md +0 -185
- package/skills/ambient-brain/brain-templates.md +0 -201
- package/skills/context-help/SKILL.md +0 -180
- package/skills/error-translator/SKILL.md +0 -153
- package/skills/session-restore/SKILL.md +0 -240
|
@@ -1,170 +1,210 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: 🔨 RE Android Phase 2+3 —
|
|
2
|
+
description: 🔨 RE Android Phase 2+3+4 — Blueprint + UI Shell → Logic Build → Final Parity (UI-First)
|
|
3
3
|
parent: reverse-android
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# /re-android-build — Blueprint
|
|
6
|
+
# /re-android-build — Blueprint + UI + Build (Per Feature)
|
|
7
7
|
|
|
8
|
-
> **Parent:** [`/reverse-android`](reverse-android.md) → Phase 2+3
|
|
8
|
+
> **Parent:** [`/reverse-android`](reverse-android.md) → Phase 2+3+4
|
|
9
9
|
> **Prerequisite:** Completed Architecture from [`/re-android-design`](reverse-android-design.md)
|
|
10
|
-
> **Skill:** `smali-to-kotlin` → `phase-2-blueprint.md` + `phase-3-build.md`
|
|
10
|
+
> **Skill:** `smali-to-kotlin` → `phase-2-blueprint-ui.md` + `phase-3-logic-build.md`
|
|
11
11
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
## 🔄 Feature Loop
|
|
14
|
+
## 🔄 Feature Loop (UI-First)
|
|
15
15
|
|
|
16
16
|
```
|
|
17
17
|
For each feature (from Architecture Build Order):
|
|
18
|
-
Phase 2: Blueprint (
|
|
19
|
-
↓
|
|
20
|
-
Phase 3:
|
|
21
|
-
↓
|
|
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
22
|
→ Next feature
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
---
|
|
26
26
|
|
|
27
|
-
##
|
|
27
|
+
## 📐🎨 Phase 2: Blueprint + UI Design
|
|
28
28
|
|
|
29
|
-
> **Output:**
|
|
29
|
+
> **Output:** Approved contracts + Working Compose UI shell with mock data.
|
|
30
30
|
|
|
31
|
-
###
|
|
31
|
+
### Part A: Contracts (signatures only)
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
- Control flow → business rules (document, don't code)
|
|
37
|
-
|
|
38
|
-
### 2.2: Contracts
|
|
39
|
-
|
|
40
|
-
Define for this feature:
|
|
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`.
|
|
41
36
|
|
|
37
|
+
#### 2.2–2.5: Define Contracts
|
|
42
38
|
```kotlin
|
|
43
|
-
// Domain Model
|
|
44
|
-
data class [Model](val
|
|
39
|
+
// 2.2 Domain Model
|
|
40
|
+
data class [Model](val field: Type, ...)
|
|
45
41
|
|
|
46
|
-
// Repository Interface
|
|
42
|
+
// 2.3 Repository Interface
|
|
47
43
|
interface [Feature]Repository {
|
|
48
44
|
suspend fun [method](...): Result<[Type]>
|
|
49
|
-
fun [stream](): Flow<[Type]>
|
|
50
45
|
}
|
|
51
46
|
|
|
52
|
-
// API Interface
|
|
47
|
+
// 2.4 API Interface
|
|
53
48
|
interface [Feature]Api {
|
|
54
49
|
@[METHOD]("[endpoint]")
|
|
55
50
|
suspend fun [method](...): [Response]
|
|
56
51
|
}
|
|
57
52
|
|
|
58
|
-
// UseCase
|
|
53
|
+
// 2.5 UseCase
|
|
59
54
|
class [Action]UseCase(repo: [Feature]Repository) {
|
|
60
55
|
suspend operator fun invoke(...): Result<[Type]> // TODO()
|
|
61
56
|
}
|
|
62
57
|
```
|
|
63
58
|
|
|
64
|
-
|
|
65
|
-
|
|
59
|
+
#### 2.6: UI State Design
|
|
66
60
|
```kotlin
|
|
67
61
|
data class [Screen]UiState(
|
|
68
62
|
val field: Type = default,
|
|
69
63
|
val isLoading: Boolean = false,
|
|
70
64
|
val error: String? = null
|
|
71
65
|
)
|
|
72
|
-
|
|
73
66
|
sealed interface [Screen]Event { /* navigation, snackbar */ }
|
|
74
67
|
sealed interface [Screen]Action { /* user interactions */ }
|
|
75
68
|
```
|
|
76
69
|
|
|
77
|
-
###
|
|
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
|
+
```
|
|
78
79
|
|
|
79
|
-
|
|
80
|
+
Copy ONLY needed resources. Verify they compile.
|
|
80
81
|
|
|
81
|
-
|
|
82
|
+
#### 2.8: UI Implementation ⭐ (Visual shell with mock data)
|
|
82
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")) } }
|
|
83
107
|
```
|
|
84
|
-
|
|
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"
|
|
85
128
|
```
|
|
86
129
|
|
|
130
|
+
> ⚠️ **DO NOT proceed to Phase 3 without user approval.**
|
|
131
|
+
|
|
87
132
|
---
|
|
88
133
|
|
|
89
|
-
## 🔨 Phase 3:
|
|
134
|
+
## 🔨 Phase 3: Logic Build
|
|
90
135
|
|
|
91
|
-
> **Output:** Full production-quality Kotlin code
|
|
136
|
+
> **Output:** Full production-quality Kotlin code. Wire logic to EXISTING UI.
|
|
92
137
|
|
|
93
138
|
### 3.1: Domain Layer
|
|
94
|
-
|
|
95
|
-
- Models (data classes from Blueprint)
|
|
96
|
-
- Repository interfaces (from Blueprint)
|
|
97
|
-
- UseCases (implement invoke with repo calls)
|
|
139
|
+
Models + Repository interfaces + UseCases (implement invoke with repo calls)
|
|
98
140
|
|
|
99
141
|
### 3.2: Data Layer
|
|
100
|
-
|
|
101
|
-
- DTOs (@Serializable)
|
|
102
|
-
- Retrofit API interface
|
|
103
|
-
- Room entities + DAOs (if applicable)
|
|
104
|
-
- Repository implementation (offline-first)
|
|
142
|
+
DTOs + Retrofit API + Room (if applicable) + Repository implementation
|
|
105
143
|
|
|
106
144
|
### 3.3: DI Module
|
|
107
|
-
|
|
108
|
-
- Hilt @Module with @Binds for repository
|
|
145
|
+
Hilt @Module with @Binds for repository
|
|
109
146
|
|
|
110
147
|
### 3.4: ViewModel
|
|
148
|
+
@HiltViewModel with StateFlow + SharedFlow, implements onAction()
|
|
111
149
|
|
|
112
|
-
|
|
113
|
-
- Implement onAction() handler from Blueprint actions
|
|
114
|
-
|
|
115
|
-
### 3.5: Compose Screen
|
|
150
|
+
### 3.5: Wire UI ↔ Logic ⭐ (NOT "code new UI")
|
|
116
151
|
|
|
117
|
-
|
|
118
|
-
- UI from wireframe
|
|
119
|
-
- LaunchedEffect for events
|
|
152
|
+
The UI already exists from Phase 2.8. Only CONNECT it:
|
|
120
153
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
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
|
+
}
|
|
126
170
|
```
|
|
127
171
|
|
|
128
|
-
###
|
|
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)
|
|
129
177
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
3. Unit test IMMEDIATELY with known pairs
|
|
134
|
-
|
|
135
|
-
> ⚠️ Crypto MUST produce identical output to original app.
|
|
178
|
+
### 🔒 Crypto Utils (Special)
|
|
179
|
+
If crypto involved: implement + unit test IMMEDIATELY with known pairs.
|
|
180
|
+
> ⚠️ MUST produce identical output.
|
|
136
181
|
|
|
137
182
|
### ✅ Feature Checkpoint
|
|
138
183
|
|
|
139
184
|
```markdown
|
|
140
185
|
## ✅ Feature Complete: [Name]
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
### Resources extracted: [only needed]
|
|
144
|
-
### Tests: [crypto verified? API matches?]
|
|
145
|
-
|
|
146
|
-
### ⏭️ Next Feature: [Name]
|
|
147
|
-
→ Return to Phase 2 (Blueprint) for next feature
|
|
186
|
+
Files: [list] | Resources: [count] | Tests: [status]
|
|
187
|
+
⏭️ Next Feature: [Name] → Return to Phase 2
|
|
148
188
|
```
|
|
149
189
|
|
|
150
190
|
---
|
|
151
191
|
|
|
152
|
-
## ✅ Final Parity Check (After ALL features)
|
|
192
|
+
## ✅ Phase 4: Final Parity Check (After ALL features)
|
|
153
193
|
|
|
154
194
|
### Checklist
|
|
155
195
|
- [ ] API Parity — all endpoints match (headers, body, encoding)
|
|
156
196
|
- [ ] Data Parity — crypto/hash output identical
|
|
157
197
|
- [ ] UI Parity — screen-by-screen comparison
|
|
158
198
|
- [ ] Edge Cases — empty states, errors, offline, lifecycle
|
|
159
|
-
- [ ] Build
|
|
199
|
+
- [ ] Build: `./gradlew assembleDebug && ./gradlew test && ./gradlew lint`
|
|
160
200
|
|
|
161
201
|
### 🎉 Final Summary
|
|
162
202
|
|
|
163
203
|
```markdown
|
|
164
204
|
## ✅ Reverse Engineering Complete!
|
|
165
|
-
- Screens: [
|
|
166
|
-
- Libs reused: [
|
|
167
|
-
- Tests: [pass/fail] | Lint: [
|
|
205
|
+
- Screens: [N] | Features: [N]
|
|
206
|
+
- Libs reused: [N] | Replaced: [N]
|
|
207
|
+
- Tests: [pass/fail] | Lint: [warnings]
|
|
168
208
|
|
|
169
209
|
⏭️ Next: /test → /deploy → /code-janitor
|
|
170
210
|
```
|
|
@@ -175,8 +215,8 @@ If feature involves crypto/hashing:
|
|
|
175
215
|
|
|
176
216
|
- **Parent:** [`/reverse-android`](reverse-android.md)
|
|
177
217
|
- **Previous:** [`/re-android-design`](reverse-android-design.md) (Phase 1)
|
|
178
|
-
- **Skill:** `smali-to-kotlin` → `phase-2-blueprint.md` + `phase-3-build.md`
|
|
218
|
+
- **Skill:** `smali-to-kotlin` → `phase-2-blueprint-ui.md` + `phase-3-logic-build.md`
|
|
179
219
|
|
|
180
220
|
---
|
|
181
221
|
|
|
182
|
-
*re-android-build
|
|
222
|
+
*re-android-build v4.0.0 — UI-First Blueprint + Build*
|
|
@@ -84,16 +84,19 @@ app/src/main/java/[package]/
|
|
|
84
84
|
└── util/
|
|
85
85
|
```
|
|
86
86
|
|
|
87
|
-
## 🔢 Step 6: Build Order
|
|
87
|
+
## 🔢 Step 6: Build Order (UI-First) ⭐
|
|
88
88
|
|
|
89
89
|
| # | Phase | Scope | Complexity |
|
|
90
90
|
|---|-------|-------|-----------|
|
|
91
|
-
| 1 | 🟢
|
|
92
|
-
| 2 | 🟢
|
|
93
|
-
| 3 |
|
|
94
|
-
| 4 |
|
|
95
|
-
| 5 |
|
|
96
|
-
|
|
|
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.
|
|
97
100
|
|
|
98
101
|
## 🔧 Step 7: Tech Stack Confirmation
|
|
99
102
|
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: 🔧 Dịch ngược APK Android (Apktool output) → App Kotlin hiện đại với Jetpack Compose, Clean Architecture
|
|
2
|
+
description: 🔧 Dịch ngược APK Android (Apktool output) → App Kotlin hiện đại với Jetpack Compose, Clean Architecture, và UI-First methodology.
|
|
3
3
|
skill: smali-to-kotlin
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# /reverse-android — Android APK Reverse Engineering Workflow
|
|
7
7
|
|
|
8
8
|
> **Skill:** `smali-to-kotlin` v2.0 | **Tech:** Kotlin + Compose + Hilt + Retrofit + Room
|
|
9
|
-
> **Philosophy:** "
|
|
10
|
-
> **
|
|
9
|
+
> **Philosophy:** "Map → Blueprint → UI First → Logic Behind"
|
|
10
|
+
> **Key:** UI is designed and approved BEFORE coding any business logic.
|
|
11
11
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
14
|
## ⚡ QUICK START
|
|
15
15
|
|
|
16
16
|
User cung cấp: Apktool output dir, `AndroidManifest.xml`, hoặc nói "reverse engineer APK này".
|
|
17
|
-
Workflow dẫn dắt qua **
|
|
17
|
+
Workflow dẫn dắt qua **5 phases** — UI-First approach, **không bao giờ nhảy cóc**.
|
|
18
18
|
|
|
19
19
|
---
|
|
20
20
|
|
|
@@ -27,10 +27,11 @@ reverse_session:
|
|
|
27
27
|
project_name: "[TBD - từ manifest]"
|
|
28
28
|
apktool_dir: "[path]"
|
|
29
29
|
current_phase: 0
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
current_feature: null
|
|
31
|
+
phase_2_status:
|
|
32
|
+
contracts: pending
|
|
33
|
+
ui_shell: pending
|
|
34
|
+
resources: pending
|
|
34
35
|
completed_features: []
|
|
35
36
|
pending_features: []
|
|
36
37
|
decisions: []
|
|
@@ -39,7 +40,7 @@ reverse_session:
|
|
|
39
40
|
### Bước 0.2: Xác nhận input
|
|
40
41
|
|
|
41
42
|
```
|
|
42
|
-
🔧 Android Reverse Engineering v2.0 —
|
|
43
|
+
🔧 Android Reverse Engineering v2.0 — UI-First Pipeline
|
|
43
44
|
|
|
44
45
|
Em cần biết:
|
|
45
46
|
1. Thư mục Apktool output ở đâu?
|
|
@@ -50,14 +51,15 @@ Chưa chạy Apktool? → apktool d your-app.apk -o ./decompiled/
|
|
|
50
51
|
|
|
51
52
|
---
|
|
52
53
|
|
|
53
|
-
## 📋 Pipeline Overview (
|
|
54
|
+
## 📋 Pipeline Overview (5 Phases — UI-First)
|
|
54
55
|
|
|
55
|
-
| Phase | Name | Sub-workflow |
|
|
56
|
-
|
|
57
|
-
| 0 | 🗺️ Discovery | [`/re-android-discover`](reverse-android-discover.md) |
|
|
58
|
-
| 1 | 🏗️ Architecture | [`/re-android-design`](reverse-android-design.md) |
|
|
59
|
-
| 2 |
|
|
60
|
-
| 3 | 🔨
|
|
56
|
+
| Phase | Name | Sub-workflow | Code? | Gate |
|
|
57
|
+
|-------|------|-------------|-------|------|
|
|
58
|
+
| 0 | 🗺️ Discovery | [`/re-android-discover`](reverse-android-discover.md) | ❌ | User approves Map |
|
|
59
|
+
| 1 | 🏗️ Architecture | [`/re-android-design`](reverse-android-design.md) | ❌ | User approves Architecture |
|
|
60
|
+
| 2 | 📐🎨 Blueprint + UI | [`/re-android-build`](reverse-android-build.md) | UI code | User approves UI + Contracts |
|
|
61
|
+
| 3 | 🔨 Logic Build | [`/re-android-build`](reverse-android-build.md) | Full logic | Feature checkpoint |
|
|
62
|
+
| 4 | ✅ Final Parity | [`/re-android-build`](reverse-android-build.md) | — | Final check |
|
|
61
63
|
|
|
62
64
|
### Execution Flow
|
|
63
65
|
|
|
@@ -68,31 +70,34 @@ Phase 0: Discovery (/re-android-discover) → App Map
|
|
|
68
70
|
↓ [User approves]
|
|
69
71
|
Phase 1: Architecture (/re-android-design) → Architecture Blueprint
|
|
70
72
|
↓ [User approves + picks feature]
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
Feature Loop (/re-android-build):
|
|
74
|
+
Phase 2: Blueprint + UI (contracts + visual shell + resources)
|
|
75
|
+
↓ 🚦 GATE: User approves UI + contracts
|
|
76
|
+
Phase 3: Logic Build (domain → data → DI → VM → wire UI)
|
|
77
|
+
↓ 📊 CHECKPOINT: Feature done
|
|
78
|
+
→ Repeat for next feature
|
|
75
79
|
↓
|
|
76
|
-
|
|
80
|
+
Phase 4: Final Parity Check & Quality Gate
|
|
77
81
|
```
|
|
78
82
|
|
|
79
83
|
---
|
|
80
84
|
|
|
81
85
|
## 🔭 ZOOM CONTROL
|
|
82
86
|
|
|
83
|
-
AI phải tự check **TRƯỚC MỖI output**:
|
|
84
|
-
|
|
85
87
|
```yaml
|
|
86
88
|
pre_output_check:
|
|
87
|
-
- "Đang ở
|
|
88
|
-
- "Output có đúng
|
|
89
|
-
- "
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
89
|
+
- "Đang ở phase nào?"
|
|
90
|
+
- "Output có đúng phase rule không?"
|
|
91
|
+
- "Phase 0/1: NO CODE BODIES"
|
|
92
|
+
- "Phase 2: UI code + signatures (no logic bodies)"
|
|
93
|
+
- "Phase 3: Full implementation code"
|
|
94
|
+
|
|
95
|
+
phase_rules:
|
|
96
|
+
phase_0: "NO CODE. Only diagrams, tables, maps."
|
|
97
|
+
phase_1: "NO CODE BODIES. Only architecture diagrams, file lists."
|
|
98
|
+
phase_2_contracts: "SIGNATURES ONLY. Interfaces, data classes, sealed classes."
|
|
99
|
+
phase_2_ui: "FULL UI CODE. Compose with hardcoded mock data + @Preview."
|
|
100
|
+
phase_3: "FULL LOGIC CODE. Domain → Data → DI → VM → Wire UI."
|
|
96
101
|
```
|
|
97
102
|
|
|
98
103
|
---
|
|
@@ -101,23 +106,24 @@ zoom_rules:
|
|
|
101
106
|
|
|
102
107
|
```yaml
|
|
103
108
|
never_skip:
|
|
104
|
-
- Phase 0 (Discovery) — always first
|
|
105
|
-
- Phase 1 (Architecture) —
|
|
106
|
-
-
|
|
107
|
-
- Per-feature Blueprint before
|
|
109
|
+
- Phase 0 (Discovery) — always first
|
|
110
|
+
- Phase 1 (Architecture) — design before coding
|
|
111
|
+
- Phase 2 UI Gate — user MUST approve UI before Phase 3
|
|
112
|
+
- Per-feature Blueprint before Logic Build
|
|
108
113
|
|
|
109
114
|
never_do:
|
|
110
|
-
- Write code
|
|
115
|
+
- Write logic code before UI is approved
|
|
111
116
|
- Mass-copy resources from APK (on-demand only)
|
|
112
117
|
- Implement multiple features simultaneously
|
|
113
|
-
-
|
|
118
|
+
- Modify UI significantly in Phase 3 (only wire, don't redesign)
|
|
119
|
+
- Skip crypto parity check
|
|
114
120
|
|
|
115
121
|
always_do:
|
|
116
|
-
-
|
|
117
|
-
-
|
|
118
|
-
-
|
|
119
|
-
- Checkpoint after each feature
|
|
120
|
-
- Document all decisions
|
|
122
|
+
- Extract resources BEFORE coding UI (Phase 2.7 → 2.8)
|
|
123
|
+
- Create @Preview for ALL states
|
|
124
|
+
- Keep stateless composable (LoginScreenContent) after wiring
|
|
125
|
+
- Checkpoint after each feature
|
|
126
|
+
- Document all decisions
|
|
121
127
|
```
|
|
122
128
|
|
|
123
129
|
---
|
|
@@ -127,11 +133,11 @@ always_do:
|
|
|
127
133
|
- **Sub-workflows:**
|
|
128
134
|
- [`/re-android-discover`](reverse-android-discover.md) — Phase 0: Discovery
|
|
129
135
|
- [`/re-android-design`](reverse-android-design.md) — Phase 1: Architecture
|
|
130
|
-
- [`/re-android-build`](reverse-android-build.md) — Phase 2+3: Blueprint + Build
|
|
131
|
-
- **Skill:** `smali-to-kotlin` v2.0 (
|
|
136
|
+
- [`/re-android-build`](reverse-android-build.md) — Phase 2+3+4: Blueprint + UI + Build
|
|
137
|
+
- **Skill:** `smali-to-kotlin` v2.0 (UI-First pipeline)
|
|
132
138
|
- **Sibling:** `/reverse-ios` (iOS counterpart)
|
|
133
139
|
- **After RE done:** `/test`, `/deploy`, `/code-janitor`
|
|
134
140
|
|
|
135
141
|
---
|
|
136
142
|
|
|
137
|
-
*reverse-android workflow
|
|
143
|
+
*reverse-android workflow v4.0.0 — UI-First RE Pipeline*
|