@leejungkiin/awkit 1.0.7 β 1.0.9
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/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/SKILL.md +331 -85
- package/skills/smali-to-kotlin/phase-0-discovery.md +93 -94
- package/skills/smali-to-kotlin/phase-1-architecture.md +67 -58
- 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/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/SKILL.md +532 -91
- package/skills/smali-to-swift/phase-0-discovery.md +101 -118
- package/skills/smali-to-swift/phase-1-architecture.md +62 -67
- 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/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/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
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
# π¨ Phase 3: Implementation (Ground View β per feature)
|
|
2
|
+
|
|
3
|
+
> **Zoom Level:** 3 β Code Implementation
|
|
4
|
+
> **Goal:** Write actual, production-quality code for ONE feature.
|
|
5
|
+
> **Input:** Approved Blueprint from Phase 2.
|
|
6
|
+
> **Output:** Complete implementation files.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## β
PREREQUISITES
|
|
11
|
+
|
|
12
|
+
Before writing ANY code, confirm:
|
|
13
|
+
- [ ] Phase 0 App Map exists and is approved
|
|
14
|
+
- [ ] Phase 1 Architecture Blueprint exists and is approved
|
|
15
|
+
- [ ] Phase 2 Feature Blueprint exists for THIS feature and is approved
|
|
16
|
+
- [ ] All contracts (interfaces, models, state) are defined in Blueprint
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## π Implementation Order (per feature)
|
|
21
|
+
|
|
22
|
+
### 3.1: Domain Layer
|
|
23
|
+
|
|
24
|
+
1. **Models** β data classes from Blueprint 2.2
|
|
25
|
+
2. **Repository interfaces** β from Blueprint 2.3
|
|
26
|
+
3. **UseCases** β implement invoke() with repository calls
|
|
27
|
+
|
|
28
|
+
```kotlin
|
|
29
|
+
class LoginUseCase @Inject constructor(
|
|
30
|
+
private val authRepository: AuthRepository
|
|
31
|
+
) {
|
|
32
|
+
suspend operator fun invoke(email: String, password: String): Result<User> {
|
|
33
|
+
return authRepository.login(email, password)
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### 3.2: Data Layer
|
|
39
|
+
|
|
40
|
+
1. **DTOs** β @Serializable data classes matching API JSON
|
|
41
|
+
2. **API interfaces** β Retrofit with correct annotations
|
|
42
|
+
3. **Room entities + DAOs** (if applicable)
|
|
43
|
+
4. **DataStore** setup (if applicable)
|
|
44
|
+
5. **Repository implementation** β offline-first pattern:
|
|
45
|
+
|
|
46
|
+
```kotlin
|
|
47
|
+
class AuthRepositoryImpl @Inject constructor(
|
|
48
|
+
private val api: AuthApi,
|
|
49
|
+
private val tokenStore: TokenDataStore
|
|
50
|
+
) : AuthRepository {
|
|
51
|
+
|
|
52
|
+
override suspend fun login(email: String, password: String): Result<User> {
|
|
53
|
+
return runCatching {
|
|
54
|
+
val response = api.login(LoginRequest(email, password))
|
|
55
|
+
tokenStore.saveToken(response.accessToken)
|
|
56
|
+
response.user.toDomain()
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
override fun isLoggedIn(): Flow<Boolean> {
|
|
61
|
+
return tokenStore.tokenFlow.map { it.isNotEmpty() }
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### 3.3: DI Module
|
|
67
|
+
|
|
68
|
+
```kotlin
|
|
69
|
+
@Module
|
|
70
|
+
@InstallIn(SingletonComponent::class)
|
|
71
|
+
abstract class RepositoryModule {
|
|
72
|
+
@Binds
|
|
73
|
+
abstract fun bindAuthRepository(impl: AuthRepositoryImpl): AuthRepository
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### 3.4: ViewModel
|
|
78
|
+
|
|
79
|
+
Implement using UiState + Events from Blueprint:
|
|
80
|
+
|
|
81
|
+
```kotlin
|
|
82
|
+
@HiltViewModel
|
|
83
|
+
class LoginViewModel @Inject constructor(
|
|
84
|
+
private val loginUseCase: LoginUseCase
|
|
85
|
+
) : ViewModel() {
|
|
86
|
+
|
|
87
|
+
private val _uiState = MutableStateFlow(LoginUiState())
|
|
88
|
+
val uiState = _uiState.asStateFlow()
|
|
89
|
+
|
|
90
|
+
private val _events = MutableSharedFlow<LoginEvent>()
|
|
91
|
+
val events = _events.asSharedFlow()
|
|
92
|
+
|
|
93
|
+
fun onAction(action: LoginAction) {
|
|
94
|
+
when (action) {
|
|
95
|
+
is LoginAction.UpdateEmail -> _uiState.update { it.copy(email = action.email) }
|
|
96
|
+
is LoginAction.UpdatePassword -> _uiState.update { it.copy(password = action.password) }
|
|
97
|
+
LoginAction.TogglePasswordVisibility -> _uiState.update { it.copy(isPasswordVisible = !it.isPasswordVisible) }
|
|
98
|
+
LoginAction.Submit -> login()
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
private fun login() {
|
|
103
|
+
viewModelScope.launch {
|
|
104
|
+
_uiState.update { it.copy(isLoading = true, error = null) }
|
|
105
|
+
loginUseCase(uiState.value.email, uiState.value.password)
|
|
106
|
+
.onSuccess { user -> _events.emit(LoginEvent.NavigateToHome(user)) }
|
|
107
|
+
.onFailure { e -> _uiState.update { it.copy(error = e.message, isLoading = false) } }
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### 3.5: Compose Screen
|
|
114
|
+
|
|
115
|
+
```kotlin
|
|
116
|
+
@Composable
|
|
117
|
+
fun LoginScreen(
|
|
118
|
+
viewModel: LoginViewModel = hiltViewModel(),
|
|
119
|
+
onNavigateToHome: () -> Unit
|
|
120
|
+
) {
|
|
121
|
+
val uiState by viewModel.uiState.collectAsStateWithLifecycle()
|
|
122
|
+
|
|
123
|
+
LaunchedEffect(Unit) {
|
|
124
|
+
viewModel.events.collect { event ->
|
|
125
|
+
when (event) {
|
|
126
|
+
is LoginEvent.NavigateToHome -> onNavigateToHome()
|
|
127
|
+
is LoginEvent.ShowSnackbar -> { /* snackbar */ }
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Compose UI from Blueprint wireframe
|
|
133
|
+
Scaffold { padding ->
|
|
134
|
+
Column(
|
|
135
|
+
modifier = Modifier
|
|
136
|
+
.fillMaxSize()
|
|
137
|
+
.padding(padding)
|
|
138
|
+
.padding(24.dp),
|
|
139
|
+
horizontalAlignment = Alignment.CenterHorizontally
|
|
140
|
+
) {
|
|
141
|
+
// Logo, TextFields, Button β matching wireframe
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### 3.6: Resource Extraction (On-Demand)
|
|
148
|
+
|
|
149
|
+
**ONLY** extract resources used by this screen:
|
|
150
|
+
- Drawables referenced in layout XML
|
|
151
|
+
- Strings used in this Activity's Smali
|
|
152
|
+
- Colors and Dimens for this screen
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
# Find drawables used in layout
|
|
156
|
+
grep -o '@drawable/[a-z_]*' [apktool_dir]/res/layout/activity_login.xml | sort -u
|
|
157
|
+
|
|
158
|
+
# Find strings used in Activity smali
|
|
159
|
+
grep 'const-string.*R.string' [apktool_dir]/smali/.../LoginActivity.smali
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## π CRYPTO UTILS (Special Handling)
|
|
165
|
+
|
|
166
|
+
If the feature involves encryption/hashing:
|
|
167
|
+
|
|
168
|
+
1. **Read Smali carefully** β exact algorithm, padding, encoding
|
|
169
|
+
2. **Implement in Kotlin** β preserve exact input/output
|
|
170
|
+
3. **Unit test IMMEDIATELY** β with known pairs from original app
|
|
171
|
+
|
|
172
|
+
```kotlin
|
|
173
|
+
object CryptoUtils {
|
|
174
|
+
fun hashMd5(input: String): String {
|
|
175
|
+
val md = MessageDigest.getInstance("MD5")
|
|
176
|
+
return md.digest(input.toByteArray())
|
|
177
|
+
.joinToString("") { "%02x".format(it) }
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// TEST (mandatory)
|
|
182
|
+
class CryptoUtilsTest {
|
|
183
|
+
@Test
|
|
184
|
+
fun `md5 matches original app output`() {
|
|
185
|
+
// Capture known pairs from running original app
|
|
186
|
+
assertEquals("expected_hash", CryptoUtils.hashMd5("known_input"))
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
> β οΈ Crypto functions MUST produce identical output. Any mismatch breaks server communication.
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## β
Checkpoint (After each feature)
|
|
196
|
+
|
|
197
|
+
```markdown
|
|
198
|
+
## β
Feature Complete: [Feature Name]
|
|
199
|
+
|
|
200
|
+
### Files created:
|
|
201
|
+
- domain/model/User.kt
|
|
202
|
+
- domain/repository/AuthRepository.kt
|
|
203
|
+
- domain/usecase/LoginUseCase.kt
|
|
204
|
+
- data/remote/api/AuthApi.kt
|
|
205
|
+
- data/remote/dto/LoginRequest.kt, LoginResponse.kt
|
|
206
|
+
- data/repository/AuthRepositoryImpl.kt
|
|
207
|
+
- presentation/screens/auth/LoginScreen.kt
|
|
208
|
+
- presentation/screens/auth/LoginViewModel.kt
|
|
209
|
+
- presentation/screens/auth/LoginUiState.kt
|
|
210
|
+
|
|
211
|
+
### Resources extracted:
|
|
212
|
+
- [only what was needed]
|
|
213
|
+
|
|
214
|
+
### Tests:
|
|
215
|
+
- [ ] Crypto utils verified
|
|
216
|
+
- [ ] API contract matches original
|
|
217
|
+
|
|
218
|
+
### βοΈ Next Feature: [Name]
|
|
219
|
+
β Return to Phase 2 (Blueprint) for this feature
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## π Loop
|
|
225
|
+
|
|
226
|
+
```
|
|
227
|
+
Phase 2 (Blueprint for Feature X) β Phase 3 (Build Feature X) β Checkpoint
|
|
228
|
+
β
|
|
229
|
+
Phase 2 (Blueprint for Feature Y) β Phase 3 (Build Feature Y) β Checkpoint
|
|
230
|
+
β
|
|
231
|
+
... (repeat for all features from Architecture Build Order)
|
|
232
|
+
β
|
|
233
|
+
Final: Parity Check & Quality Gate
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
## β
Final Parity Check (After all features)
|
|
239
|
+
|
|
240
|
+
1. **API Parity** β all endpoints match (headers, body, encoding)
|
|
241
|
+
2. **Data Parity** β crypto/hash output identical
|
|
242
|
+
3. **UI Parity** β screen-by-screen comparison
|
|
243
|
+
4. **Edge Cases** β empty states, errors, offline
|
|
244
|
+
5. **Build & Test** β `./gradlew assembleDebug && ./gradlew test && ./gradlew lint`
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
*Phase 3: Implementation β One feature at a time, guided by Blueprint*
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# πΊοΈ App Map: [App Name]
|
|
2
|
+
|
|
3
|
+
**Generated:** [Date]
|
|
4
|
+
**Source:** [Apktool dir path]
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## π± Identity
|
|
9
|
+
|
|
10
|
+
| Property | Value |
|
|
11
|
+
|----------|-------|
|
|
12
|
+
| Package | [com.example.app] |
|
|
13
|
+
| App Name | [Display Name] |
|
|
14
|
+
| Min SDK | [value] |
|
|
15
|
+
| Target SDK | [value] |
|
|
16
|
+
| Screens | [count] Activities |
|
|
17
|
+
| Services | [count] |
|
|
18
|
+
| Receivers | [count] |
|
|
19
|
+
| Providers | [count] |
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## π§ Screen Flow
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
ββββββββββββ ββββββββββββ ββββββββββββββββ
|
|
27
|
+
β Splash ββββββ Login ββββββ Main Tab β
|
|
28
|
+
ββββββββββββ ββββββββββββ ββββββββββββββββ€
|
|
29
|
+
β Tab 1: Home β
|
|
30
|
+
β Tab 2: ... β
|
|
31
|
+
β Tab 3: ... β
|
|
32
|
+
ββββββββββββββββ
|
|
33
|
+
β
|
|
34
|
+
βββββββ΄ββββββ
|
|
35
|
+
β Detail β
|
|
36
|
+
β ... β
|
|
37
|
+
βββββββββββββ
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
*Or use Mermaid:*
|
|
41
|
+
```mermaid
|
|
42
|
+
graph LR
|
|
43
|
+
Splash --> Login
|
|
44
|
+
Login --> MainTab
|
|
45
|
+
MainTab --> Home
|
|
46
|
+
MainTab --> Tab2
|
|
47
|
+
MainTab --> Tab3
|
|
48
|
+
Home --> Detail
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## π¦ Library Landscape
|
|
54
|
+
|
|
55
|
+
### β
Reuse (add to build.gradle)
|
|
56
|
+
| Library | Detected Package | Latest Version | Action |
|
|
57
|
+
|---------|-----------------|----------------|--------|
|
|
58
|
+
|
|
59
|
+
### π Replace (legacy β modern)
|
|
60
|
+
| Old Library | Detected Package | Modern Replacement |
|
|
61
|
+
|-------------|-----------------|-------------------|
|
|
62
|
+
|
|
63
|
+
### π΅ Firebase / Google SDKs
|
|
64
|
+
| SDK | Detected | Action |
|
|
65
|
+
|-----|----------|--------|
|
|
66
|
+
|
|
67
|
+
### π± Native (.so) β Keep
|
|
68
|
+
| File | Architecture | Notes |
|
|
69
|
+
|------|-------------|-------|
|
|
70
|
+
|
|
71
|
+
### π·οΈ App Code (rebuild in Kotlin)
|
|
72
|
+
| Package | Estimated Module |
|
|
73
|
+
|---------|-----------------|
|
|
74
|
+
|
|
75
|
+
### β Unknown (needs investigation)
|
|
76
|
+
| Package | Path | Possible Library |
|
|
77
|
+
|---------|------|-----------------|
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## π Complexity Estimate
|
|
82
|
+
|
|
83
|
+
| Area | Rating | Notes |
|
|
84
|
+
|------|--------|-------|
|
|
85
|
+
| Data Layer | βββββ | [N] APIs, [N] local DB, [N] DataStores |
|
|
86
|
+
| Core Logic | βββββ | [N] crypto utils, [N] formatters |
|
|
87
|
+
| UI Screens | βββββ | [N] screens, [N] complex layouts |
|
|
88
|
+
| SDK Integration | βββββ | [N] third-party, [N] native libs |
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## π Key Observations
|
|
93
|
+
|
|
94
|
+
- [Notable patterns: obfuscation level, unusual architecture, etc.]
|
|
95
|
+
- [Security observations: certificate pinning, root detection, etc.]
|
|
96
|
+
- [Risks: native libs without source, proprietary SDKs, etc.]
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
> **Next:** Anh review map nΓ y, cΓ³ gΓ¬ cαΊ§n Δiα»u chα»nh khΓ΄ng?
|
|
101
|
+
> β OK β Proceed to Phase 1 (Architecture Design)
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# ποΈ Architecture Blueprint: [App Name]
|
|
2
|
+
|
|
3
|
+
**Generated:** [Date]
|
|
4
|
+
**Based on:** App Map v[date]
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## π Layer Map
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
βββββββββββββββββββββββββββββββββββββββ
|
|
12
|
+
β Presentation β
|
|
13
|
+
β βββ screens/ ([N] screens) β
|
|
14
|
+
β βββ navigation/ (NavGraph + Routes) β
|
|
15
|
+
β βββ theme/ (Material 3 Theme) β
|
|
16
|
+
β βββ components/ (Shared UI) β
|
|
17
|
+
βββββββββββββββββββββββββββββββββββββββ€
|
|
18
|
+
β Domain β
|
|
19
|
+
β βββ model/ ([N] business models) β
|
|
20
|
+
β βββ repository/ ([N] interfaces) β
|
|
21
|
+
β βββ usecase/ ([N] use cases) β
|
|
22
|
+
βββββββββββββββββββββββββββββββββββββββ€
|
|
23
|
+
β Data β
|
|
24
|
+
β βββ remote/ ([N] API services) β
|
|
25
|
+
β βββ local/ (Room DB, DataStore) β
|
|
26
|
+
β βββ repository/ ([N] impls) β
|
|
27
|
+
βββββββββββββββββββββββββββββββββββββββ€
|
|
28
|
+
β DI (Hilt) β
|
|
29
|
+
β βββ modules/ (Network, DB, Repo) β
|
|
30
|
+
βββββββββββββββββββββββββββββββββββββββ
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## ποΈ Feature β File Mapping
|
|
36
|
+
|
|
37
|
+
| Feature | Domain Model | Repository | UseCase | Screen(s) | ViewModel |
|
|
38
|
+
|---------|-------------|-----------|---------|-----------|-----------|
|
|
39
|
+
| Auth | User, Token | AuthRepo | LoginUC, RegisterUC | Login, Register | AuthVM |
|
|
40
|
+
| Home | [Model] | [Repo] | [UC] | Home | HomeVM |
|
|
41
|
+
| Profile | [Model] | [Repo] | [UC] | Profile, Edit | ProfileVM |
|
|
42
|
+
| Settings | [Model] | [Repo] | [UC] | Settings | SettingsVM |
|
|
43
|
+
| ... | ... | ... | ... | ... | ... |
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## π API Endpoints
|
|
48
|
+
|
|
49
|
+
| # | Method | Endpoint | Auth | Notes |
|
|
50
|
+
|---|--------|----------|------|-------|
|
|
51
|
+
| 1 | POST | /auth/login | No | JWT response |
|
|
52
|
+
| 2 | GET | /users/me | Bearer | User profile |
|
|
53
|
+
| ... | ... | ... | ... | ... |
|
|
54
|
+
|
|
55
|
+
**Base URL:** `[extracted from Smali]`
|
|
56
|
+
**Auth Type:** [Bearer token / API key / Custom]
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## πΎ Data Schema
|
|
61
|
+
|
|
62
|
+
| Model | Key Fields | Source | Storage |
|
|
63
|
+
|-------|-----------|--------|---------|
|
|
64
|
+
| User | id, name, email, avatar | API + Local | Room |
|
|
65
|
+
| Settings | theme, lang, notif | Local only | DataStore |
|
|
66
|
+
| ... | ... | ... | ... |
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## π Project Structure
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
app/src/main/java/[package]/
|
|
74
|
+
βββ App.kt
|
|
75
|
+
βββ di/
|
|
76
|
+
β βββ AppModule.kt
|
|
77
|
+
β βββ NetworkModule.kt
|
|
78
|
+
β βββ DatabaseModule.kt
|
|
79
|
+
βββ data/
|
|
80
|
+
β βββ remote/
|
|
81
|
+
β β βββ api/
|
|
82
|
+
β β βββ dto/
|
|
83
|
+
β β βββ interceptor/
|
|
84
|
+
β βββ local/
|
|
85
|
+
β β βββ db/
|
|
86
|
+
β β βββ dao/
|
|
87
|
+
β β βββ entity/
|
|
88
|
+
β β βββ datastore/
|
|
89
|
+
β βββ repository/
|
|
90
|
+
βββ domain/
|
|
91
|
+
β βββ model/
|
|
92
|
+
β βββ repository/
|
|
93
|
+
β βββ usecase/
|
|
94
|
+
βββ presentation/
|
|
95
|
+
β βββ navigation/
|
|
96
|
+
β βββ theme/
|
|
97
|
+
β βββ components/
|
|
98
|
+
β βββ screens/
|
|
99
|
+
β βββ splash/
|
|
100
|
+
β βββ auth/
|
|
101
|
+
β βββ home/
|
|
102
|
+
β βββ .../
|
|
103
|
+
βββ util/
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## π’ Build Order
|
|
109
|
+
|
|
110
|
+
| # | Phase | Scope | Complexity |
|
|
111
|
+
|---|-------|-------|-----------|
|
|
112
|
+
| 1 | π’ Setup | Project + DI skeleton + Theme | Low |
|
|
113
|
+
| 2 | π’ Models | Domain data classes | Low |
|
|
114
|
+
| 3 | π‘ Data | API + Room + DataStore | Medium |
|
|
115
|
+
| 4 | π‘ Utils | Crypto, formatters (parity test!) | Medium |
|
|
116
|
+
| 5 | π΄ Feature: [First] | Blueprint β Build | High |
|
|
117
|
+
| 6 | π΄ Feature: [Second] | Blueprint β Build | High |
|
|
118
|
+
| ... | ... | ... | ... |
|
|
119
|
+
| N | π΄ Final | Parity check + QA | High |
|
|
120
|
+
|
|
121
|
+
**Suggested first feature:** [Name] β because [reason]
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## π§ Tech Stack Decisions
|
|
126
|
+
|
|
127
|
+
| Decision | Choice | Rationale |
|
|
128
|
+
|----------|--------|-----------|
|
|
129
|
+
| UI Framework | Jetpack Compose + Material 3 | Modern, declarative |
|
|
130
|
+
| DI | Hilt | Standard Android DI |
|
|
131
|
+
| Network | Retrofit + OkHttp | [Keep/Replace based on scan] |
|
|
132
|
+
| JSON | Kotlin Serialization | Type-safe, KMP ready |
|
|
133
|
+
| Image Loading | [Coil / Keep Glide] | [reason] |
|
|
134
|
+
| Local DB | Room | [reason] |
|
|
135
|
+
| Preferences | DataStore | Replaces SharedPreferences |
|
|
136
|
+
| Async | Coroutines + Flow | Modern concurrency |
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
> **Next:** Anh muα»n bαΊ―t ΔαΊ§u tα»« feature nΓ o?
|
|
141
|
+
> Em suggest: **[Feature]** vì [reason].
|
|
142
|
+
> β Pick feature β Phase 2 (Blueprint)
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# π Feature Blueprint: [Feature Name]
|
|
2
|
+
|
|
3
|
+
**Generated:** [Date]
|
|
4
|
+
**Architecture:** [App Name] v[date]
|
|
5
|
+
**Feature:** [Feature Name]
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## π Smali Analysis Summary
|
|
10
|
+
|
|
11
|
+
| Item | Value |
|
|
12
|
+
|------|-------|
|
|
13
|
+
| Files analyzed | [list of Smali files] |
|
|
14
|
+
| Classes found | [count] |
|
|
15
|
+
| API calls detected | [count] |
|
|
16
|
+
| Local storage | [types: SharedPrefs, SQLite, etc.] |
|
|
17
|
+
|
|
18
|
+
### Key Observations
|
|
19
|
+
- [Pattern 1: e.g., "Uses MD5 + Base64 for password hashing"]
|
|
20
|
+
- [Pattern 2: e.g., "Token stored in SharedPreferences key 'auth_token'"]
|
|
21
|
+
- [Pattern 3: e.g., "Custom header 'X-App-Key' in all requests"]
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## π¦ Domain Models
|
|
26
|
+
|
|
27
|
+
```kotlin
|
|
28
|
+
data class [Model](
|
|
29
|
+
val field1: Type,
|
|
30
|
+
val field2: Type,
|
|
31
|
+
// ...
|
|
32
|
+
)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## π‘ API Contract
|
|
38
|
+
|
|
39
|
+
```kotlin
|
|
40
|
+
interface [Feature]Api {
|
|
41
|
+
@[METHOD]("[endpoint]")
|
|
42
|
+
suspend fun [method](@Body request: [Request]): [Response]
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**Request/Response DTOs:**
|
|
47
|
+
```kotlin
|
|
48
|
+
@Serializable
|
|
49
|
+
data class [Request](/* fields */)
|
|
50
|
+
|
|
51
|
+
@Serializable
|
|
52
|
+
data class [Response](/* fields */)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## ποΈ Repository Contract
|
|
58
|
+
|
|
59
|
+
```kotlin
|
|
60
|
+
interface [Feature]Repository {
|
|
61
|
+
suspend fun [method1](...): Result<[Type]>
|
|
62
|
+
fun [method2](): Flow<[Type]>
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## π§© UseCase Signatures
|
|
69
|
+
|
|
70
|
+
```kotlin
|
|
71
|
+
class [Action]UseCase(private val repo: [Feature]Repository) {
|
|
72
|
+
suspend operator fun invoke(...): Result<[Type]>
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## π¨ UI State Design
|
|
79
|
+
|
|
80
|
+
```kotlin
|
|
81
|
+
// State
|
|
82
|
+
data class [Screen]UiState(
|
|
83
|
+
val field1: Type = default,
|
|
84
|
+
val isLoading: Boolean = false,
|
|
85
|
+
val error: String? = null
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
// One-time events
|
|
89
|
+
sealed interface [Screen]Event {
|
|
90
|
+
data class NavigateTo[Next](/* params */) : [Screen]Event
|
|
91
|
+
data class ShowSnackbar(val message: String) : [Screen]Event
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// User actions
|
|
95
|
+
sealed interface [Screen]Action {
|
|
96
|
+
data class Update[Field](val value: Type) : [Screen]Action
|
|
97
|
+
data object Submit : [Screen]Action
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## πΌοΈ Screen Wireframe
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
ββββββββββββββββββββββββββ
|
|
107
|
+
β β
|
|
108
|
+
β [Layout sketch] β
|
|
109
|
+
β β
|
|
110
|
+
ββββββββββββββββββββββββββ
|
|
111
|
+
|
|
112
|
+
Behaviors:
|
|
113
|
+
- [Interaction 1]
|
|
114
|
+
- [Interaction 2]
|
|
115
|
+
- [Error handling]
|
|
116
|
+
- [Navigation on success]
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## π Files to Create
|
|
122
|
+
|
|
123
|
+
| File | Layer | Type |
|
|
124
|
+
|------|-------|------|
|
|
125
|
+
| [Model].kt | domain/model | Data class |
|
|
126
|
+
| [Feature]Repository.kt | domain/repository | Interface |
|
|
127
|
+
| [Action]UseCase.kt | domain/usecase | Class |
|
|
128
|
+
| [Feature]Api.kt | data/remote/api | Retrofit interface |
|
|
129
|
+
| [DTOs].kt | data/remote/dto | Serializable |
|
|
130
|
+
| [Feature]RepositoryImpl.kt | data/repository | Implementation |
|
|
131
|
+
| [Screen]Screen.kt | presentation/screens | Composable |
|
|
132
|
+
| [Screen]ViewModel.kt | presentation/screens | ViewModel |
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## π Dependencies
|
|
137
|
+
|
|
138
|
+
- **Depends on:** [other features/modules this needs]
|
|
139
|
+
- **Depended by:** [features that need this]
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
> **Next:** Anh xem contracts α»n khΓ΄ng?
|
|
144
|
+
> β OK β Phase 3 (Implementation)
|
|
145
|
+
> β Adjust β Update blueprint
|