@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.
Files changed (55) hide show
  1. package/core/GEMINI.md.bak +168 -181
  2. package/package.json +2 -2
  3. package/schemas/brain-snapshot.json +167 -0
  4. package/skills/CATALOG.md +70 -0
  5. package/skills/beads-manager/SKILL.md +20 -1
  6. package/skills/memory-sync/SKILL.md +20 -2
  7. package/skills/nm-memory-audit/SKILL.md +157 -0
  8. package/skills/nm-memory-evolution/SKILL.md +202 -0
  9. package/skills/nm-memory-intake/SKILL.md +135 -0
  10. package/skills/nm-memory-sync/SKILL.md +184 -0
  11. package/skills/orchestrator/SKILL.md +41 -50
  12. package/skills/schemas/brain-snapshot.json +167 -0
  13. package/skills/skills/nm-memory-audit/SKILL.md +157 -0
  14. package/skills/skills/nm-memory-evolution/SKILL.md +202 -0
  15. package/skills/skills/nm-memory-intake/SKILL.md +135 -0
  16. package/skills/skills/nm-memory-sync/SKILL.md +184 -0
  17. package/skills/smali-to-kotlin/SKILL.md +331 -85
  18. package/skills/smali-to-kotlin/phase-0-discovery.md +93 -94
  19. package/skills/smali-to-kotlin/phase-1-architecture.md +67 -58
  20. package/skills/smali-to-kotlin/phase-2-blueprint.md +228 -0
  21. package/skills/smali-to-kotlin/phase-3-build.md +248 -0
  22. package/skills/smali-to-kotlin/templates/app-map.md +101 -0
  23. package/skills/smali-to-kotlin/templates/architecture.md +142 -0
  24. package/skills/smali-to-kotlin/templates/blueprint.md +145 -0
  25. package/skills/smali-to-swift/SKILL.md +532 -91
  26. package/skills/smali-to-swift/phase-0-discovery.md +101 -118
  27. package/skills/smali-to-swift/phase-1-architecture.md +62 -67
  28. package/skills/smali-to-swift/phase-2-blueprint.md +173 -0
  29. package/skills/smali-to-swift/phase-3-build.md +257 -0
  30. package/skills/smali-to-swift/templates/app-map.md +82 -0
  31. package/skills/smali-to-swift/templates/architecture.md +97 -0
  32. package/skills/smali-to-swift/templates/blueprint.md +82 -0
  33. package/skills/workflows/nm-import.md +73 -0
  34. package/skills/workflows/nm-recall.md +67 -0
  35. package/skills/workflows/nm-snapshot.md +69 -0
  36. package/workflows/_uncategorized/nm-import.md +73 -0
  37. package/workflows/_uncategorized/nm-recall.md +67 -0
  38. package/workflows/_uncategorized/nm-snapshot.md +69 -0
  39. package/workflows/_uncategorized/reverse-android-build.md +222 -0
  40. package/workflows/_uncategorized/reverse-android-design.md +139 -0
  41. package/workflows/_uncategorized/reverse-android-discover.md +150 -0
  42. package/workflows/_uncategorized/reverse-android-scan.md +158 -0
  43. package/workflows/_uncategorized/reverse-android.md +143 -0
  44. package/workflows/_uncategorized/reverse-ios-build.md +240 -0
  45. package/workflows/_uncategorized/reverse-ios-design.md +112 -0
  46. package/workflows/_uncategorized/reverse-ios-discover.md +120 -0
  47. package/workflows/_uncategorized/reverse-ios-scan.md +155 -0
  48. package/workflows/_uncategorized/reverse-ios.md +152 -0
  49. package/skills/adaptive-language/SKILL.md +0 -189
  50. package/skills/ambient-brain/SKILL.md +0 -314
  51. package/skills/ambient-brain/brain-router.md +0 -185
  52. package/skills/ambient-brain/brain-templates.md +0 -201
  53. package/skills/context-help/SKILL.md +0 -180
  54. package/skills/error-translator/SKILL.md +0 -153
  55. 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