@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.
Files changed (64) hide show
  1. package/VERSION +1 -1
  2. package/core/GEMINI.md.bak +168 -181
  3. package/package.json +2 -2
  4. package/schemas/brain-snapshot.json +167 -0
  5. package/skills/CATALOG.md +70 -0
  6. package/skills/beads-manager/SKILL.md +20 -1
  7. package/skills/memory-sync/SKILL.md +20 -2
  8. package/skills/nm-memory-audit/SKILL.md +157 -0
  9. package/skills/nm-memory-evolution/SKILL.md +202 -0
  10. package/skills/nm-memory-intake/SKILL.md +135 -0
  11. package/skills/nm-memory-sync/SKILL.md +184 -0
  12. package/skills/orchestrator/SKILL.md +41 -50
  13. package/skills/schemas/brain-snapshot.json +167 -0
  14. package/skills/skills/nm-memory-audit/SKILL.md +157 -0
  15. package/skills/skills/nm-memory-evolution/SKILL.md +202 -0
  16. package/skills/skills/nm-memory-intake/SKILL.md +135 -0
  17. package/skills/skills/nm-memory-sync/SKILL.md +184 -0
  18. package/skills/smali-to-kotlin/phase-0-discovery.md +128 -0
  19. package/skills/smali-to-kotlin/phase-1-architecture.md +166 -0
  20. package/skills/smali-to-kotlin/phase-2-blueprint-ui.md +347 -0
  21. package/skills/smali-to-kotlin/phase-2-blueprint.md +228 -0
  22. package/skills/smali-to-kotlin/phase-3-build.md +248 -0
  23. package/skills/smali-to-kotlin/phase-3-logic-build.md +268 -0
  24. package/skills/smali-to-kotlin/templates/app-map.md +101 -0
  25. package/skills/smali-to-kotlin/templates/architecture.md +142 -0
  26. package/skills/smali-to-kotlin/templates/blueprint.md +145 -0
  27. package/skills/smali-to-swift/phase-0-discovery.md +137 -0
  28. package/skills/smali-to-swift/phase-1-architecture.md +168 -0
  29. package/skills/smali-to-swift/phase-2-blueprint-ui.md +348 -0
  30. package/skills/smali-to-swift/phase-2-blueprint.md +173 -0
  31. package/skills/smali-to-swift/phase-3-build.md +257 -0
  32. package/skills/smali-to-swift/phase-3-logic-build.md +312 -0
  33. package/skills/smali-to-swift/templates/app-map.md +82 -0
  34. package/skills/smali-to-swift/templates/architecture.md +97 -0
  35. package/skills/smali-to-swift/templates/blueprint.md +82 -0
  36. package/skills/workflows/nm-import.md +73 -0
  37. package/skills/workflows/nm-recall.md +67 -0
  38. package/skills/workflows/nm-snapshot.md +69 -0
  39. package/workflows/_uncategorized/nm-import.md +73 -0
  40. package/workflows/_uncategorized/nm-recall.md +67 -0
  41. package/workflows/_uncategorized/nm-snapshot.md +69 -0
  42. package/workflows/_uncategorized/reverse-android-build.md +222 -0
  43. package/workflows/_uncategorized/reverse-android-design.md +139 -0
  44. package/workflows/_uncategorized/reverse-android-discover.md +150 -0
  45. package/workflows/_uncategorized/reverse-android-scan.md +158 -0
  46. package/workflows/_uncategorized/reverse-android.md +143 -0
  47. package/workflows/_uncategorized/reverse-ios-build.md +240 -0
  48. package/workflows/_uncategorized/reverse-ios-design.md +112 -0
  49. package/workflows/_uncategorized/reverse-ios-discover.md +120 -0
  50. package/workflows/_uncategorized/reverse-ios-scan.md +155 -0
  51. package/workflows/_uncategorized/reverse-ios.md +152 -0
  52. package/workflows/mobile/reverse-android-build.md +119 -79
  53. package/workflows/mobile/reverse-android-design.md +10 -7
  54. package/workflows/mobile/reverse-android.md +52 -46
  55. package/workflows/mobile/reverse-ios-build.md +161 -50
  56. package/workflows/mobile/reverse-ios-design.md +10 -1
  57. package/workflows/mobile/reverse-ios.md +49 -37
  58. package/skills/adaptive-language/SKILL.md +0 -189
  59. package/skills/ambient-brain/SKILL.md +0 -314
  60. package/skills/ambient-brain/brain-router.md +0 -185
  61. package/skills/ambient-brain/brain-templates.md +0 -201
  62. package/skills/context-help/SKILL.md +0 -180
  63. package/skills/error-translator/SKILL.md +0 -153
  64. package/skills/session-restore/SKILL.md +0 -240
@@ -0,0 +1,166 @@
1
+ # πŸ—οΈ Phase 1: Architecture (District View)
2
+
3
+ > **Zoom Level:** 1 β€” Architecture Design
4
+ > **Goal:** Design the overall architecture BEFORE writing any code.
5
+ > **Input:** Completed App Map from Phase 0.
6
+ > **Output:** Architecture Blueprint (layer maps, feature tables, API list). **NO CODE BODIES.**
7
+
8
+ ---
9
+
10
+ ## β›” OUTPUT RULE
11
+
12
+ ```
13
+ βœ… ALLOWED: Architecture diagrams, layer maps, feature-to-file mapping tables, API endpoint tables
14
+ βœ… ALLOWED: File paths, package names, dependency lists
15
+ ❌ BLOCKED: Function bodies, implementation details, actual Kotlin code
16
+ ⚠️ EXCEPTION: build.gradle.kts skeleton (plugin + dependency declarations only)
17
+ ```
18
+
19
+ ---
20
+
21
+ ## πŸ“‹ Sub-steps
22
+
23
+ ### 1.1: Layer Design
24
+
25
+ Design Clean Architecture layers based on App Map:
26
+
27
+ ```
28
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
29
+ β”‚ Presentation β”‚
30
+ β”‚ β”œβ”€β”€ screens/ ([N] screens) β”‚
31
+ β”‚ β”œβ”€β”€ navigation/ (NavGraph) β”‚
32
+ β”‚ └── theme/ (Material3) β”‚
33
+ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
34
+ β”‚ Domain β”‚
35
+ β”‚ β”œβ”€β”€ model/ ([N] business models) β”‚
36
+ β”‚ β”œβ”€β”€ repository/ ([N] interfaces) β”‚
37
+ β”‚ └── usecase/ ([N] use cases) β”‚
38
+ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
39
+ β”‚ Data β”‚
40
+ β”‚ β”œβ”€β”€ remote/ ([N] API services) β”‚
41
+ β”‚ β”œβ”€β”€ local/ (Room, DataStore) β”‚
42
+ β”‚ └── repository/ (implementations) β”‚
43
+ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
44
+ β”‚ DI β”‚
45
+ β”‚ └── modules/ (Network, DB, Repo) β”‚
46
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
47
+ ```
48
+
49
+ ### 1.2: Feature β†’ File Mapping
50
+
51
+ Map each feature to its Clean Architecture components:
52
+
53
+ | Feature | Domain Model | Repository | UseCase | Screen | ViewModel |
54
+ |---------|-------------|-----------|---------|--------|-----------|
55
+ | Auth | User, Token | AuthRepo | LoginUC | Login | AuthVM |
56
+ | Home | Data | HomeRepo | GetDataUC | Home | HomeVM |
57
+ | ... | ... | ... | ... | ... | ... |
58
+
59
+ ### 1.3: API Endpoint Inventory
60
+
61
+ Extract ALL API endpoints from Smali analysis:
62
+
63
+ | # | Method | Endpoint | Auth | Request | Response | Notes |
64
+ |---|--------|----------|------|---------|----------|-------|
65
+ | 1 | POST | /auth/login | No | email, pwd | JWT token | - |
66
+ | 2 | GET | /users/me | Bearer | - | User object | - |
67
+
68
+ **How to find in Smali:**
69
+ ```
70
+ Look for: const-string β†’ "https://" or "http://"
71
+ Look for: .field β†’ BASE_URL, API_URL
72
+ Look for: StringBuilder + append patterns (endpoint construction)
73
+ Look for: annotation patterns (@GET, @POST in okhttp/retrofit)
74
+ ```
75
+
76
+ ### 1.4: Data Schema Inventory
77
+
78
+ List ALL data structures found:
79
+
80
+ | Model | Fields (key ones) | Source | Storage |
81
+ |-------|-------------------|--------|---------|
82
+ | User | id, name, email, avatar | API | Room + Memory |
83
+ | Settings | theme, language, notifications | Local | DataStore |
84
+
85
+ ### 1.5: Project Structure
86
+
87
+ Propose directory structure based on features:
88
+
89
+ ```
90
+ app/src/main/java/com/package/
91
+ β”œβ”€β”€ App.kt
92
+ β”œβ”€β”€ di/ (AppModule, NetworkModule, DatabaseModule)
93
+ β”œβ”€β”€ data/
94
+ β”‚ β”œβ”€β”€ remote/api/ ([N] Retrofit interfaces)
95
+ β”‚ β”œβ”€β”€ remote/dto/ (DTOs)
96
+ β”‚ β”œβ”€β”€ local/db/ (Room)
97
+ β”‚ β”œβ”€β”€ local/datastore/ (DataStore)
98
+ β”‚ └── repository/ (Implementations)
99
+ β”œβ”€β”€ domain/
100
+ β”‚ β”œβ”€β”€ model/ (Business models)
101
+ β”‚ β”œβ”€β”€ repository/ (Interfaces)
102
+ β”‚ └── usecase/ (Use cases)
103
+ β”œβ”€β”€ presentation/
104
+ β”‚ β”œβ”€β”€ navigation/ (NavGraph, Routes)
105
+ β”‚ β”œβ”€β”€ theme/ (Colors, Typography, Theme)
106
+ β”‚ β”œβ”€β”€ components/ (Shared composables)
107
+ β”‚ └── screens/
108
+ β”‚ β”œβ”€β”€ splash/
109
+ β”‚ β”œβ”€β”€ auth/
110
+ β”‚ β”œβ”€β”€ home/
111
+ β”‚ └── [feature]/
112
+ └── util/ (Extensions, helpers)
113
+ ```
114
+
115
+ ### 1.6: Build Order Suggestion
116
+
117
+ Recommend order based on dependency graph:
118
+
119
+ ```
120
+ 1. 🟒 Project setup + DI skeleton + Theme
121
+ 2. 🟒 Domain models (data classes β€” no logic)
122
+ 3. 🟑 Data layer (API interfaces + Room entities)
123
+ 4. 🟑 Core utils (crypto, formatters β€” need parity testing)
124
+ 5. πŸ”΄ UI screens (per-feature, starting from auth)
125
+ 6. πŸ”΄ SDK integration + Parity check
126
+ ```
127
+
128
+ ### 1.7: Tech Stack Decisions
129
+
130
+ Confirm decisions from Phase 0 Library Report:
131
+
132
+ | Decision | Choice | Rationale |
133
+ |----------|--------|-----------|
134
+ | Image Loading | Coil (replace Glide) | Modern, Compose-native |
135
+ | JSON | Kotlin Serialization | Type-safe, no reflection |
136
+ | ... | ... | ... |
137
+
138
+ ---
139
+
140
+ ## πŸ“Š Output: Architecture Blueprint
141
+
142
+ Use template from `templates/architecture.md`. Must include:
143
+
144
+ 1. **Layer Map** β€” ASCII architecture diagram with counts
145
+ 2. **Feature Table** β€” feature β†’ file mapping
146
+ 3. **API Inventory** β€” all endpoints found
147
+ 4. **Data Schema** β€” all models with key fields
148
+ 5. **Project Structure** β€” proposed directory tree
149
+ 6. **Build Order** β€” suggested implementation sequence
150
+ 7. **Tech Decisions** β€” confirmed choices
151
+
152
+ ---
153
+
154
+ ## βœ… Gate
155
+
156
+ ```
157
+ "πŸ—οΈ Architecture Blueprint xong. Anh muα»‘n bαΊ―t Δ‘αΊ§u tα»« feature nΓ o?
158
+ Em suggest: [Feature X] vΓ¬ [reason β€” e.g., nhiều feature khΓ‘c phα»₯ thuα»™c]."
159
+
160
+ β†’ User picks feature β†’ Proceed to Phase 2 (Blueprint) for that feature
161
+ β†’ User wants changes β†’ Adjust architecture
162
+ ```
163
+
164
+ ---
165
+
166
+ *Phase 1: Architecture β€” Design before you build*
@@ -0,0 +1,347 @@
1
+ # πŸ“ Phase 2: Blueprint + UI Design (Per Feature) β€” Android
2
+
3
+ > **Zoom Level:** 2 β€” Feature Detail
4
+ > **Goal:** Design contracts AND code UI visual shell for ONE feature.
5
+ > **Input:** Architecture Blueprint (Phase 1) + user's chosen feature.
6
+ > **Output:** Approved contracts + Working UI shell with mock data.
7
+
8
+ ---
9
+
10
+ ## β›” OUTPUT RULE
11
+
12
+ ```
13
+ PART A β€” Contracts (signatures only):
14
+ βœ… Interface signatures, data class definitions, sealed classes
15
+ βœ… Retrofit interface with @GET/@POST annotations (no body)
16
+ βœ… UiState sealed class, Event sealed class, Action sealed class
17
+ ❌ Function body implementations (use TODO())
18
+
19
+ PART B β€” UI (visual code):
20
+ βœ… Full Jetpack Compose code for screen
21
+ βœ… Hardcoded mock data (using UiState from Part A)
22
+ βœ… Real resources (icons, colors, images extracted in 2.7)
23
+ βœ… @Preview for ALL states (normal, loading, error, empty)
24
+ ❌ Real ViewModel connection β€” use parameter defaults
25
+ ❌ Real API calls
26
+ ❌ Business logic
27
+ ```
28
+
29
+ ---
30
+
31
+ ## πŸ“‹ Sub-steps
32
+
33
+ ### 2.1: Deep Smali Reading
34
+
35
+ Read Smali/Java files for the chosen feature.
36
+
37
+ **What to extract:**
38
+ - Class hierarchy (extends, implements)
39
+ - Field declarations β†’ model properties
40
+ - Method signatures β†’ API contracts
41
+ - String constants β†’ URLs, keys, messages
42
+ - Control flow β†’ business rules (document, don't code)
43
+
44
+ **Smali Quick Ref:**
45
+ ```
46
+ .field β†’ class fields (properties)
47
+ .method β†’ method start
48
+ .end method β†’ method end
49
+ invoke-virtual β†’ instance method call
50
+ invoke-static β†’ static method call
51
+ const-string β†’ string literal
52
+ new-instance β†’ object creation
53
+ if-eqz/if-nez β†’ conditional branches
54
+ ```
55
+
56
+ See `smali-reading-guide.md` for comprehensive guide.
57
+
58
+ ### 2.2: Domain Model Contracts
59
+
60
+ ```kotlin
61
+ // Domain model
62
+ data class User(
63
+ val id: String,
64
+ val fullName: String,
65
+ val email: String,
66
+ val avatarUrl: String?,
67
+ val isVerified: Boolean
68
+ )
69
+
70
+ // DTO (from API)
71
+ @Serializable
72
+ data class UserDto(
73
+ @SerialName("user_id") val userId: String,
74
+ @SerialName("full_name") val fullName: String,
75
+ @SerialName("email") val email: String,
76
+ @SerialName("avatar_url") val avatarUrl: String?,
77
+ @SerialName("is_verified") val isVerified: Boolean
78
+ )
79
+ ```
80
+
81
+ ### 2.3: Repository Contract
82
+
83
+ ```kotlin
84
+ interface AuthRepository {
85
+ suspend fun login(email: String, password: String): Result<User>
86
+ suspend fun register(name: String, email: String, password: String): Result<User>
87
+ suspend fun logout()
88
+ fun isLoggedIn(): Flow<Boolean>
89
+ fun getCurrentUser(): Flow<User?>
90
+ }
91
+ ```
92
+
93
+ ### 2.4: API Contract
94
+
95
+ ```kotlin
96
+ interface AuthApi {
97
+ @POST("auth/login")
98
+ suspend fun login(@Body request: LoginRequest): LoginResponse
99
+
100
+ @POST("auth/register")
101
+ suspend fun register(@Body request: RegisterRequest): RegisterResponse
102
+
103
+ @GET("auth/me")
104
+ suspend fun getCurrentUser(@Header("Authorization") token: String): UserDto
105
+ }
106
+ ```
107
+
108
+ ### 2.5: UseCase Signatures
109
+
110
+ ```kotlin
111
+ class LoginUseCase(private val authRepo: AuthRepository) {
112
+ suspend operator fun invoke(email: String, password: String): Result<User>
113
+ // Implementation: TODO()
114
+ }
115
+ ```
116
+
117
+ ### 2.6: UI State Design
118
+
119
+ ```kotlin
120
+ // State
121
+ data class LoginUiState(
122
+ val email: String = "",
123
+ val password: String = "",
124
+ val isLoading: Boolean = false,
125
+ val error: String? = null,
126
+ val isPasswordVisible: Boolean = false
127
+ )
128
+
129
+ // Events (one-time actions)
130
+ sealed interface LoginEvent {
131
+ data class NavigateToHome(val user: User) : LoginEvent
132
+ data class ShowSnackbar(val message: String) : LoginEvent
133
+ }
134
+
135
+ // Actions (user interactions)
136
+ sealed interface LoginAction {
137
+ data class UpdateEmail(val email: String) : LoginAction
138
+ data class UpdatePassword(val password: String) : LoginAction
139
+ data object TogglePasswordVisibility : LoginAction
140
+ data object Submit : LoginAction
141
+ }
142
+ ```
143
+
144
+ ### 2.7: Resource Extraction ⭐ (Before UI code!)
145
+
146
+ > **Why here?** UI code (2.8) needs real assets. If resources come later, UI will be full of placeholders β€” defeating the purpose of visual parity.
147
+
148
+ **Process:**
149
+ 1. Analyze layout XML to list needed resources:
150
+ ```bash
151
+ grep -o '@drawable/[a-z_]*' [apktool]/res/layout/activity_login.xml | sort -u
152
+ grep -o '@color/[a-z_]*' [apktool]/res/layout/activity_login.xml | sort -u
153
+ grep 'const-string' [apktool]/smali/.../LoginActivity.smali | grep -i string
154
+ ```
155
+ 2. Copy ONLY needed resources to new project
156
+ 3. Verify all resources compile
157
+
158
+ **Output:**
159
+ ```markdown
160
+ ### πŸ“¦ Resources for [Screen]
161
+ - Drawables: [list]
162
+ - Colors: [list]
163
+ - Strings: [list]
164
+ - Dimens: [list]
165
+ βœ… All accessible
166
+ ```
167
+
168
+ ### 2.8: UI Implementation β€” Visual Shell ⭐
169
+
170
+ > **Goal:** Code the screen with HARDCODED mock data. Pixel-perfect visual parity with original app.
171
+
172
+ **Rules:**
173
+ ```
174
+ βœ… MUST DO:
175
+ - Use UiState from 2.6 (hardcode sample values as defaults)
176
+ - Use REAL resources extracted in 2.7
177
+ - Display ALL visual elements from original app
178
+ - Match: spacing, font size, colors, icon placement
179
+ - Code ALL states: normal, loading, error, empty
180
+ - Create @Preview for each state
181
+
182
+ ❌ MUST NOT:
183
+ - Connect real ViewModel (use parameter defaults)
184
+ - Call real APIs
185
+ - Code business logic
186
+ - Use DI/injection
187
+ ```
188
+
189
+ **Pattern β€” Stateless Composable:**
190
+ ```kotlin
191
+ @Composable
192
+ fun LoginScreenContent(
193
+ uiState: LoginUiState = LoginUiState(), // Hardcoded default
194
+ onAction: (LoginAction) -> Unit = {} // No-op default
195
+ ) {
196
+ Scaffold { padding ->
197
+ Column(
198
+ modifier = Modifier
199
+ .fillMaxSize()
200
+ .padding(padding)
201
+ .padding(24.dp),
202
+ horizontalAlignment = Alignment.CenterHorizontally
203
+ ) {
204
+ // Logo β€” real resource from 2.7
205
+ Image(
206
+ painter = painterResource(R.drawable.app_logo),
207
+ contentDescription = null,
208
+ modifier = Modifier.size(120.dp)
209
+ )
210
+ Spacer(Modifier.height(48.dp))
211
+
212
+ // Email
213
+ OutlinedTextField(
214
+ value = uiState.email,
215
+ onValueChange = { onAction(LoginAction.UpdateEmail(it)) },
216
+ label = { Text("Email") },
217
+ keyboardOptions = KeyboardOptions(keyboardType = KeyboardType.Email),
218
+ modifier = Modifier.fillMaxWidth()
219
+ )
220
+ Spacer(Modifier.height(16.dp))
221
+
222
+ // Password with toggle
223
+ OutlinedTextField(
224
+ value = uiState.password,
225
+ onValueChange = { onAction(LoginAction.UpdatePassword(it)) },
226
+ label = { Text("Password") },
227
+ visualTransformation = if (uiState.isPasswordVisible)
228
+ VisualTransformation.None else PasswordVisualTransformation(),
229
+ trailingIcon = {
230
+ IconButton(onClick = { onAction(LoginAction.TogglePasswordVisibility) }) {
231
+ Icon(
232
+ imageVector = if (uiState.isPasswordVisible)
233
+ Icons.Default.VisibilityOff else Icons.Default.Visibility,
234
+ contentDescription = "Toggle password"
235
+ )
236
+ }
237
+ },
238
+ modifier = Modifier.fillMaxWidth()
239
+ )
240
+ Spacer(Modifier.height(32.dp))
241
+
242
+ // Login Button
243
+ Button(
244
+ onClick = { onAction(LoginAction.Submit) },
245
+ enabled = !uiState.isLoading,
246
+ modifier = Modifier.fillMaxWidth().height(50.dp)
247
+ ) {
248
+ if (uiState.isLoading) {
249
+ CircularProgressIndicator(
250
+ modifier = Modifier.size(24.dp),
251
+ color = MaterialTheme.colorScheme.onPrimary
252
+ )
253
+ } else {
254
+ Text("Login", style = MaterialTheme.typography.labelLarge)
255
+ }
256
+ }
257
+ }
258
+ }
259
+ }
260
+
261
+ // ===== PREVIEWS =====
262
+ @Preview(showBackground = true)
263
+ @Composable
264
+ private fun NormalPreview() {
265
+ AppTheme { LoginScreenContent(LoginUiState(email = "user@example.com")) }
266
+ }
267
+
268
+ @Preview(showBackground = true)
269
+ @Composable
270
+ private fun LoadingPreview() {
271
+ AppTheme { LoginScreenContent(LoginUiState(isLoading = true)) }
272
+ }
273
+
274
+ @Preview(showBackground = true)
275
+ @Composable
276
+ private fun ErrorPreview() {
277
+ AppTheme { LoginScreenContent(LoginUiState(error = "Invalid credentials")) }
278
+ }
279
+ ```
280
+
281
+ ### 2.9: Visual Parity Check ⭐
282
+
283
+ Compare UI shell with original app screenshot:
284
+
285
+ ```markdown
286
+ ### πŸ“Έ Visual Parity: [Screen Name]
287
+
288
+ Layout:
289
+ - [ ] Structure matches original (components, sections)
290
+ - [ ] Spacing between elements correct
291
+ - [ ] Alignment matches
292
+
293
+ Styling:
294
+ - [ ] Colors match (background, text, buttons, header)
295
+ - [ ] Typography matches (font size, weight)
296
+ - [ ] Icons/images correct and positioned
297
+ - [ ] Borders, shadows, rounded corners
298
+
299
+ States:
300
+ - [ ] Normal state displays correctly
301
+ - [ ] Loading state β€” progress in right position
302
+ - [ ] Error state β€” error message shows properly
303
+ - [ ] Empty state β€” guidance shown
304
+
305
+ Platform:
306
+ - [ ] Material 3 conventions followed
307
+ - [ ] Edge-to-edge / system bars handled
308
+ - [ ] Looks good on different screen sizes
309
+ ```
310
+
311
+ ---
312
+
313
+ ## πŸ“Š Output: Feature Blueprint + UI
314
+
315
+ Use template from `templates/blueprint.md`.
316
+
317
+ ---
318
+
319
+ ## βœ… Gate (MANDATORY)
320
+
321
+ ```
322
+ "πŸ“ Blueprint + UI cho [Feature] xong:
323
+
324
+ πŸ“ Contracts:
325
+ - [N] domain models
326
+ - [N] repository interfaces
327
+ - [N] use case signatures
328
+ - [N] API endpoints
329
+
330
+ 🎨 UI:
331
+ - [Screen] implemented with mock data
332
+ - Resources: [N] drawables, [N] strings, [N] colors
333
+ - Previews: [N] states (normal, loading, error, empty)
334
+
335
+ πŸ“Έ Visual Parity: [OK / cαΊ§n chỉnh X, Y, Z]
336
+
337
+ Anh xem UI + contracts α»•n khΓ΄ng?
338
+ β†’ βœ… Approve β†’ Phase 3 (Logic Build)
339
+ β†’ 🎨 Adjust UI β†’ fix then re-check
340
+ β†’ πŸ“ Adjust contracts β†’ revise blueprint"
341
+ ```
342
+
343
+ > ⚠️ **DO NOT proceed to Phase 3 until user approves BOTH UI and contracts.**
344
+
345
+ ---
346
+
347
+ *Phase 2: Blueprint + UI Design β€” See it before you code it*