@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
@@ -1,36 +1,37 @@
1
1
  ---
2
- description: 🔨 RE iOS Phase 2+3 — Per-feature Blueprint → Implementation → Parity Check
2
+ description: 🔨 RE iOS Phase 2+3+4 — Blueprint + UI Shell Logic Build Final Parity (UI-First)
3
3
  parent: reverse-ios
4
4
  ---
5
5
 
6
- # /re-ios-build — Blueprint & Build (Per Feature)
6
+ # /re-ios-build — Blueprint + UI + Build (Per Feature)
7
7
 
8
- > **Parent:** [`/reverse-ios`](reverse-ios.md) → Phase 2+3
8
+ > **Parent:** [`/reverse-ios`](reverse-ios.md) → Phase 2+3+4
9
9
  > **Prerequisite:** Completed Architecture from [`/re-ios-design`](reverse-ios-design.md)
10
- > **Skill:** `smali-to-swift` → `phase-2-blueprint.md` + `phase-3-build.md`
10
+ > **Skill:** `smali-to-swift` → `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 (Zoom 2 signatures only)
19
- [User approves]
20
- Phase 3: Implementation (Zoom 3 full code)
21
- [Checkpoint]
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
- ## 📐 Phase 2: Feature Blueprint (Zoom 2)
27
+ ## 📐🎨 Phase 2: Blueprint + UI Design
28
28
 
29
- > **Output:** Contracts, protocols, state design. **Signatures only.**
29
+ > **Output:** Approved contracts + Working SwiftUI shell with mock data.
30
30
 
31
- ### 2.1: Deep Header Reading
31
+ ### Part A: Contracts (signatures only)
32
32
 
33
- Read class-dump headers + Hopper pseudo-code for chosen feature.
33
+ #### 2.1: Deep Header Reading
34
+ Read class-dump headers + Hopper pseudo-code. See `objc-reading-guide.md`.
34
35
 
35
36
  **ObjC → Swift Quick Ref:**
36
37
  ```
@@ -40,90 +41,200 @@ Read class-dump headers + Hopper pseudo-code for chosen feature.
40
41
  + (instancetype)sharedInstance → static let shared
41
42
  ```
42
43
 
43
- ### 2.2: Domain Contracts
44
-
44
+ #### 2.2–2.5: Define Contracts
45
45
  ```swift
46
+ // 2.2 Domain Model
46
47
  struct [Model]: Codable, Identifiable, Sendable {
47
- let field1: Type
48
- // CodingKeys if needed
48
+ let field: Type
49
49
  }
50
50
 
51
+ // 2.3 Repository Protocol
51
52
  protocol [Feature]Repository: Sendable {
52
53
  func [method](...) async throws -> [Type]
53
54
  }
54
55
 
55
- struct [Action]UseCase: Sendable {
56
- func execute(...) async throws -> [Type]
56
+ // 2.4 API Endpoint
57
+ enum [Feature]Endpoint {
58
+ case [action](param: Type)
59
+ var path: String { /* ... */ }
60
+ }
61
+
62
+ // 2.5 UseCase
63
+ struct [Action]UseCase {
64
+ func execute(...) async throws -> [Type] // TODO
65
+ }
66
+ ```
67
+
68
+ #### 2.6: UI State Design
69
+ ```swift
70
+ struct [Screen]ViewState {
71
+ var field: Type = default
72
+ var isLoading: Bool = false
73
+ var error: String? = nil
74
+ }
75
+ enum [Screen]Action { /* user interactions */ }
76
+ enum [Screen]Event { /* navigation, alerts */ }
77
+
78
+ extension [Screen]ViewState {
79
+ static let normal = [Screen]ViewState(/* sample */)
80
+ static let loading = [Screen]ViewState(isLoading: true)
81
+ static let error = [Screen]ViewState(error: "Error message")
82
+ }
83
+ ```
84
+
85
+ ### Part B: UI Visual Shell
86
+
87
+ #### 2.7: Resource Extraction ⭐ (BEFORE UI code!)
88
+
89
+ Extract from IPA bundle / Assets.car:
90
+ - Images → Assets.xcassets
91
+ - Colors → Color extension or asset catalog
92
+ - Strings → Localizable.xcstrings
93
+ - Fonts → custom fonts
94
+
95
+ Copy ONLY needed resources. Verify they build.
96
+
97
+ #### 2.8: UI Implementation ⭐ (Visual shell with mock data)
98
+
99
+ - Use ViewState from 2.6 with hardcoded defaults
100
+ - Use REAL resources from 2.7
101
+ - Create `[Screen]Content` view (stateless)
102
+ - Match visual parity with original app
103
+ - NO ViewModel connection, NO real API calls
104
+
105
+ ```swift
106
+ struct [Screen]Content: View {
107
+ var state: [Screen]ViewState = .normal // Mock
108
+ var onAction: ([Screen]Action) -> Void = { _ in } // No-op
109
+
110
+ var body: some View {
111
+ // Full SwiftUI matching original app
112
+ }
57
113
  }
114
+
115
+ #Preview("Normal") { [Screen]Content(state: .normal) }
116
+ #Preview("Loading") { [Screen]Content(state: .loading) }
117
+ #Preview("Error") { [Screen]Content(state: .error) }
58
118
  ```
59
119
 
60
- ### 2.3: UI State Design
120
+ #### 2.9: Visual Parity Check ⭐
61
121
 
62
- - @Observable ViewModel properties
63
- - User actions
64
- - Navigation events
65
- - Wireframe
122
+ Compare with original app:
123
+ - [ ] Layout structure matches
124
+ - [ ] Colors, typography, spacing correct
125
+ - [ ] Icons/images positioned correctly
126
+ - [ ] All states: normal, loading, error, empty
66
127
 
67
- ### Blueprint Gate
128
+ ### 🚦 UI + Contracts Gate (MANDATORY)
68
129
 
69
130
  ```
70
- "📐 Blueprint cho [Feature] xong. OK? → Code."
131
+ "📐🎨 Blueprint + UI cho [Feature] xong:
132
+ 📝 Contracts: [N] models, [N] protocols, [N] use cases, [N] endpoints
133
+ 🎨 UI: [Screen] with [N] state previews
134
+ 📸 Visual Parity: [OK / needs adjustment]
135
+
136
+ → ✅ Approve → Phase 3 (Logic Build)
137
+ → 🎨 Adjust UI → fix then re-check
138
+ → 📝 Adjust contracts → revise"
71
139
  ```
72
140
 
141
+ > ⚠️ **DO NOT proceed to Phase 3 without user approval.**
142
+
73
143
  ---
74
144
 
75
- ## 🔨 Phase 3: Implementation (Zoom 3)
145
+ ## 🔨 Phase 3: Logic Build
76
146
 
77
- > **Full Swift code for THIS feature only.**
147
+ > **Output:** Full Swift code. Wire logic to EXISTING UI.
78
148
 
79
- ### 3.1: Domain → Data → DI → ViewModel → Screen
149
+ ### 3.1: Domain Layer
150
+ Models + Repository protocols + UseCases (implement with repo calls)
80
151
 
81
- Standard implementation order:
82
- 1. Codable structs
83
- 2. Repository protocol + implementation
84
- 3. APIClient endpoints
85
- 4. SwiftData models (if applicable)
86
- 5. DI container entries
87
- 6. @Observable ViewModel
88
- 7. SwiftUI Screen
89
- 8. Resource extraction (on-demand only)
152
+ ### 3.2: Data Layer
153
+ DTOs + APIClient endpoints + SwiftData (if applicable) + Repository implementation
90
154
 
91
- ### 🔒 Crypto (Special)
155
+ ### 3.3: DI Container
156
+ AppContainer with lazy properties for repos, use cases, view models
157
+
158
+ ### 3.4: ViewModel
159
+ @Observable with state property + handle(_ action:) + event handler
160
+
161
+ ### 3.5: Wire UI ↔ Logic ⭐ (NOT "code new UI")
162
+
163
+ The UI already exists from Phase 2.8. Only CONNECT it:
92
164
 
165
+ ```swift
166
+ // Keep stateless Content view from Phase 2 (for Preview):
167
+ // [Screen]Content(state:, onAction:) — DO NOT MODIFY
168
+
169
+ // ADD wrapper that wires ViewModel:
170
+ struct [Screen]: View {
171
+ @State private var viewModel: [Screen]ViewModel
172
+
173
+ init(container: AppContainer) {
174
+ _viewModel = State(initialValue: container.make[Screen]ViewModel())
175
+ }
176
+
177
+ var body: some View {
178
+ [Screen]Content(
179
+ state: viewModel.state,
180
+ onAction: viewModel.handle
181
+ )
182
+ }
183
+ }
184
+ ```
185
+
186
+ ### 3.6: Integration Test ⭐
187
+ - [ ] API calls succeed, data displays
188
+ - [ ] Loading/error states work
189
+ - [ ] Navigation correct
190
+ - [ ] Crypto output matches (if applicable)
191
+
192
+ ### 🔒 Crypto (Special)
93
193
  ```swift
94
194
  import CryptoKit
95
195
  import CommonCrypto
96
196
  // XCTest mandatory for crypto utils
97
197
  ```
98
-
99
198
  > ⚠️ Crypto MUST match original output.
100
199
 
101
200
  ### ✅ Feature Checkpoint
102
201
 
103
202
  ```markdown
104
203
  ## ✅ Feature Complete: [Name]
105
- ### Files created: [list]
106
- ### Tests: [crypto verified?]
107
- ⏭️ Next: Phase 2 for [next feature]
204
+ Files: [list] | Resources: [count] | Tests: [status]
205
+ ⏭️ Next Feature: [Name] → Return to Phase 2
108
206
  ```
109
207
 
110
208
  ---
111
209
 
112
- ## ✅ Final Parity Check
210
+ ## ✅ Phase 4: Final Parity Check (After ALL features)
113
211
 
114
- - [ ] API Parity
115
- - [ ] Data/Crypto Parity
116
- - [ ] UI Parity
212
+ ### Checklist
213
+ - [ ] API Parity — all endpoints match
214
+ - [ ] Data/Crypto Parity — output identical
215
+ - [ ] UI Parity — screen-by-screen comparison
216
+ - [ ] Edge Cases — empty, error, offline, lifecycle
117
217
  - [ ] Build: `xcodebuild build && xcodebuild test`
118
218
 
219
+ ### 🎉 Final Summary
220
+
221
+ ```markdown
222
+ ## ✅ Reverse Engineering Complete!
223
+ - Screens: [N] | Features: [N]
224
+ - Frameworks reused: [N] | Replaced: [N]
225
+ - Tests: [pass/fail]
226
+
227
+ ⏭️ Next: /test → /deploy → /code-janitor
228
+ ```
229
+
119
230
  ---
120
231
 
121
232
  ## 🔗 Related
122
233
 
123
234
  - **Parent:** [`/reverse-ios`](reverse-ios.md)
124
- - **Previous:** [`/re-ios-design`](reverse-ios-design.md)
125
- - **Skill:** `smali-to-swift` → `phase-2-blueprint.md` + `phase-3-build.md`
235
+ - **Previous:** [`/re-ios-design`](reverse-ios-design.md) (Phase 1)
236
+ - **Skill:** `smali-to-swift` → `phase-2-blueprint-ui.md` + `phase-3-logic-build.md`
126
237
 
127
238
  ---
128
239
 
129
- *re-ios-build v3.0.0 — Phase 2+3: Blueprint & Build*
240
+ *re-ios-build v4.0.0 — UI-First Blueprint + Build*
@@ -65,10 +65,19 @@ App/
65
65
  └── Resources/
66
66
  ```
67
67
 
68
- ### Step 6: Build Order
68
+ ### Step 6: Build Order (UI-First) ⭐
69
69
 
70
70
  | # | Phase | Scope | Complexity |
71
71
  |---|-------|-------|-----------|
72
+ | 1 | 🟢 Foundation | Xcode project + DI skeleton + Theme | Low |
73
+ | 2 | 🟢 Navigation | NavigationStack, TabView, routes | Low |
74
+ | 3 | 🔵 Per Feature | Blueprint (contracts) + UI Shell (visual) | Medium |
75
+ | 4 | 🚦 UI Gate | User approves UI before logic | — |
76
+ | 5 | 🟡 Per Feature | Logic Build (Domain → Data → VM → Wire UI) | High |
77
+ | 6 | 📦 SDKs | Third-party SDK + Native libs integration | Medium |
78
+ | N | 🔴 Final | Full Parity Check | High |
79
+
80
+ > **UI-First:** Design and approve UI before coding logic for each feature.
72
81
 
73
82
  ### Step 7: Tech Decisions
74
83
 
@@ -1,13 +1,13 @@
1
1
  ---
2
- description: 🍎 Dịch ngược IPA iOS (class-dump, Hopper output) → App Swift hiện đại với SwiftUI, Clean Architecture. Progressive Disclosure: Map → Blueprint → Build.
2
+ description: 🍎 Dịch ngược IPA iOS (class-dump, Hopper output) → App Swift hiện đại với SwiftUI, Clean Architecture, UI-First methodology.
3
3
  skill: smali-to-swift
4
4
  ---
5
5
 
6
6
  # /reverse-ios — iOS IPA Reverse Engineering Workflow
7
7
 
8
8
  > **Skill:** `smali-to-swift` v2.0 | **Tech:** Swift + SwiftUI + async/await + URLSession + SwiftData
9
- > **Philosophy:** "Treat decompiled code as a MAP, not a TODO list"
10
- > **Approach:** Map Blueprint Build (progressive disclosure)
9
+ > **Philosophy:** "Map Blueprint UI First Logic Behind"
10
+ > **Key:** UI is designed and approved BEFORE coding any business logic.
11
11
  > **Sibling:** `/reverse-android`
12
12
 
13
13
  ---
@@ -15,7 +15,7 @@ skill: smali-to-swift
15
15
  ## ⚡ QUICK START
16
16
 
17
17
  User cung cấp: Decrypted `.app` bundle, class-dump headers, Hopper pseudo-code, hoặc nói "reverse engineer IPA này".
18
- Workflow dẫn dắt qua **4 phases** — mỗi phase có zoom level riêng, **không bao giờ nhảy cóc**.
18
+ Workflow dẫn dắt qua **5 phases** — UI-First approach, **không bao giờ nhảy cóc**.
19
19
 
20
20
  ---
21
21
 
@@ -29,10 +29,11 @@ reverse_ios_session:
29
29
  app_bundle_dir: "[path]"
30
30
  headers_dir: "[class-dump output]"
31
31
  current_phase: 0
32
- current_zoom: 0
33
32
  current_feature: null
34
- app_map_done: false
35
- architecture_done: false
33
+ phase_2_status:
34
+ contracts: pending
35
+ ui_shell: pending
36
+ resources: pending
36
37
  completed_features: []
37
38
  pending_features: []
38
39
  decisions: []
@@ -41,7 +42,7 @@ reverse_ios_session:
41
42
  ### Bước 0.2: Xác nhận input
42
43
 
43
44
  ```
44
- 🍎 iOS Reverse Engineering v2.0 — Map → Blueprint → Build
45
+ 🍎 iOS Reverse Engineering v2.0 — UI-First Pipeline
45
46
 
46
47
  Em cần biết:
47
48
  1. Decrypted .app bundle ở đâu?
@@ -55,14 +56,15 @@ Chưa chuẩn bị?
55
56
 
56
57
  ---
57
58
 
58
- ## 📋 Pipeline Overview (4 Phases)
59
+ ## 📋 Pipeline Overview (5 Phases — UI-First)
59
60
 
60
- | Phase | Name | Sub-workflow | Zoom | Code? | Gate |
61
- |-------|------|-------------|------|-------|------|
62
- | 0 | 🗺️ Discovery | [`/re-ios-discover`](reverse-ios-discover.md) | Satellite | ❌ | User approves Map |
63
- | 1 | 🏗️ Architecture | [`/re-ios-design`](reverse-ios-design.md) | District | ❌ | User approves Architecture |
64
- | 2 | 📐 Blueprint | [`/re-ios-build`](reverse-ios-build.md) | Block | Signatures | Per-feature approval |
65
- | 3 | 🔨 Implementation | [`/re-ios-build`](reverse-ios-build.md) | Ground | Full | Per-feature checkpoint |
61
+ | Phase | Name | Sub-workflow | Code? | Gate |
62
+ |-------|------|-------------|-------|------|
63
+ | 0 | 🗺️ Discovery | [`/re-ios-discover`](reverse-ios-discover.md) | ❌ | User approves Map |
64
+ | 1 | 🏗️ Architecture | [`/re-ios-design`](reverse-ios-design.md) | ❌ | User approves Architecture |
65
+ | 2 | 📐🎨 Blueprint + UI | [`/re-ios-build`](reverse-ios-build.md) | UI code | User approves UI + Contracts |
66
+ | 3 | 🔨 Logic Build | [`/re-ios-build`](reverse-ios-build.md) | Full logic | Feature checkpoint |
67
+ | 4 | ✅ Final Parity | [`/re-ios-build`](reverse-ios-build.md) | — | Final check |
66
68
 
67
69
  ### Execution Flow
68
70
 
@@ -73,11 +75,14 @@ Phase 0: Discovery (/re-ios-discover) → App Map
73
75
  ↓ [User approves]
74
76
  Phase 1: Architecture (/re-ios-design) → Architecture Blueprint
75
77
  ↓ [User approves + picks feature]
76
- Phase 2+3 Loop (/re-ios-build):
77
- Blueprint Feature X Build Feature X Checkpoint
78
- Blueprint Feature Y Build Feature Y → Checkpoint
78
+ Feature Loop (/re-ios-build):
79
+ Phase 2: Blueprint + UI (contracts + visual shell + resources)
80
+ 🚦 GATE: User approves UI + contracts
81
+ Phase 3: Logic Build (domain → data → DI → VM → wire UI)
82
+ ↓ 📊 CHECKPOINT: Feature done
83
+ → Repeat for next feature
79
84
 
80
- Final: Parity Check & Quality Gate
85
+ Phase 4: Final Parity Check & Quality Gate
81
86
  ```
82
87
 
83
88
  ---
@@ -86,15 +91,18 @@ Final: Parity Check & Quality Gate
86
91
 
87
92
  ```yaml
88
93
  pre_output_check:
89
- - "Đang ở zoom level nào?"
90
- - "Output có đúng zoom level không?"
91
- - "Có function body trong Phase 0/1 không? REMOVE"
92
-
93
- zoom_rules:
94
- zoom_0: "NO CODE. Only diagrams, tables, maps."
95
- zoom_1: "NO CODE BODIES. Only architecture, file lists."
96
- zoom_2: "SIGNATURES ONLY. Protocols, structs, enums."
97
- zoom_3: "FULL CODE. Implementation for ONE feature."
94
+ - "Đang ở phase nào?"
95
+ - "Output có đúng phase rule không?"
96
+ - "Phase 0/1: NO CODE BODIES"
97
+ - "Phase 2: UI code + signatures (no logic bodies)"
98
+ - "Phase 3: Full implementation code"
99
+
100
+ phase_rules:
101
+ phase_0: "NO CODE. Only diagrams, tables, maps."
102
+ phase_1: "NO CODE BODIES. Only architecture, file lists."
103
+ phase_2_contracts: "SIGNATURES ONLY. Protocols, structs, enums."
104
+ phase_2_ui: "FULL UI CODE. SwiftUI with hardcoded mock data + #Preview."
105
+ phase_3: "FULL LOGIC CODE. Domain → Data → DI → VM → Wire UI."
98
106
  ```
99
107
 
100
108
  ---
@@ -104,23 +112,27 @@ zoom_rules:
104
112
  ```yaml
105
113
  never_skip:
106
114
  - Phase 0 (Discovery) — always first
107
- - Phase 1 (Architecture) — design before code
108
- - Per-feature Blueprint before Implementation
115
+ - Phase 1 (Architecture) — design before coding
116
+ - Phase 2 UI Gate — user MUST approve UI before Phase 3
117
+ - Per-feature Blueprint before Logic Build
109
118
 
110
119
  never_do:
111
- - Write code in Phase 0 or Phase 1
112
- - Mass-copy assets from IPA
120
+ - Write logic code before UI is approved
121
+ - Mass-copy assets from IPA (on-demand only)
113
122
  - Use UIKit when SwiftUI equivalent exists
114
123
  - Use GCD for new async code (use async/await)
115
124
  - Use ObjC in new code (Swift only)
125
+ - Modify UI significantly in Phase 3 (only wire, don't redesign)
116
126
  - Implement multiple features simultaneously
117
127
 
118
128
  always_do:
119
- - Start with App Map
120
- - Create Blueprint before each feature
129
+ - Extract resources BEFORE coding UI (Phase 2.7 → 2.8)
130
+ - Create #Preview for ALL states
131
+ - Keep stateless View (LoginScreenContent) after wiring
121
132
  - XCTest all crypto/hash functions
122
133
  - Use @Observable for ViewModels
123
134
  - Use NavigationStack, SPM
135
+ - Checkpoint after each feature
124
136
  ```
125
137
 
126
138
  ---
@@ -130,11 +142,11 @@ always_do:
130
142
  - **Sub-workflows:**
131
143
  - [`/re-ios-discover`](reverse-ios-discover.md) — Phase 0: Discovery
132
144
  - [`/re-ios-design`](reverse-ios-design.md) — Phase 1: Architecture
133
- - [`/re-ios-build`](reverse-ios-build.md) — Phase 2+3: Blueprint + Build
134
- - **Skill:** `smali-to-swift` v2.0
145
+ - [`/re-ios-build`](reverse-ios-build.md) — Phase 2+3+4: Blueprint + UI + Build
146
+ - **Skill:** `smali-to-swift` v2.0 (UI-First pipeline)
135
147
  - **Sibling:** `/reverse-android`
136
148
  - **After RE done:** `/test`, `/deploy`, `/code-janitor`
137
149
 
138
150
  ---
139
151
 
140
- *reverse-ios workflow v3.0.0 — Progressive Disclosure RE Pipeline*
152
+ *reverse-ios workflow v4.0.0 — UI-First RE Pipeline*
@@ -1,189 +0,0 @@
1
- ---
2
- name: awf-adaptive-language
3
- description: >-
4
- Adjust terminology based on user technical level. Keywords: language,
5
- terminology, jargon, level, beginner, newbie, simple, explain.
6
- Reads technical_level from preferences.json and sets communication context.
7
- version: 1.0.0
8
- ---
9
-
10
- # AWF Adaptive Language
11
-
12
- Tự động điều chỉnh ngôn ngữ kỹ thuật theo trình độ user.
13
-
14
- ## Trigger Conditions
15
-
16
- **Pre-hook for ALL workflows** - Activates at session start.
17
-
18
- **Check preferences:**
19
- ```
20
- if exists(".brain/preferences.json"):
21
- → Read technical_level
22
- else if exists("~/.antigravity/preferences.json"):
23
- → Read global technical_level
24
- else:
25
- → Default: "basic"
26
- ```
27
-
28
- ## Personality Modes (from /customize)
29
-
30
- **Also read `personality` from preferences.json:**
31
-
32
- ### Mentor Mode (`mentor`)
33
- ```
34
- Khi làm bất kỳ task nào:
35
- 1. Giải thích TẠI SAO làm vậy
36
- 2. Giải thích thuật ngữ mới gặp
37
- 3. Đôi khi hỏi ngược: "Anh nghĩ tại sao phải làm vậy?"
38
- 4. Sau khi xong: "Anh học được gì từ bước này?"
39
- ```
40
-
41
- ### Strict Coach Mode (`strict_coach`)
42
- ```
43
- Khi làm bất kỳ task nào:
44
- 1. Đòi hỏi cao về chất lượng
45
- 2. Chỉ ra cách làm tốt hơn
46
- 3. Giải thích best practices
47
- 4. Không chấp nhận code xấu: "Cách này không tối ưu vì..."
48
- ```
49
-
50
- ### Default (không có personality setting)
51
- → Dùng style "Trợ lý thông minh" - hữu ích, đưa lựa chọn
52
-
53
- ---
54
-
55
- ## Technical Levels
56
-
57
- ### Level: `newbie`
58
- **Target:** Không biết code, chỉ có ý tưởng
59
-
60
- | Term | Translation |
61
- |------|-------------|
62
- | database | kho lưu trữ thông tin |
63
- | API | cổng giao tiếp giữa các phần mềm |
64
- | deploy | đưa lên mạng cho người khác dùng |
65
- | commit | lưu lại thay đổi |
66
- | branch | bản nháp của dự án |
67
- | error | lỗi cần sửa |
68
- | debug | tìm và sửa lỗi |
69
- | test | kiểm tra xem có chạy đúng không |
70
- | server | máy tính chạy ứng dụng |
71
- | frontend | giao diện người dùng thấy |
72
- | backend | phần xử lý ẩn phía sau |
73
-
74
- **Communication style:**
75
- - Giải thích MỌI khái niệm kỹ thuật
76
- - Dùng ví dụ đời thường
77
- - Tránh từ viết tắt
78
- - Bước nhỏ, từng bước một
79
-
80
- ### Level: `basic`
81
- **Target:** Biết dùng máy tính, đọc được code cơ bản
82
-
83
- | Term | Usage |
84
- |------|-------|
85
- | database | database (cơ sở dữ liệu) |
86
- | API | API (giao diện lập trình) |
87
- | deploy | deploy (triển khai) |
88
- | commit | commit (lưu thay đổi vào git) |
89
-
90
- **Communication style:**
91
- - Giải thích từ kỹ thuật lần đầu
92
- - Sau đó dùng bình thường
93
- - Gợi ý tra cứu thêm nếu cần
94
- - Nhóm nhiều bước nhỏ lại
95
-
96
- ### Level: `technical`
97
- **Target:** Developers, có kinh nghiệm code
98
-
99
- **Communication style:**
100
- - Dùng thuật ngữ chuẩn
101
- - Không cần giải thích
102
- - Tập trung vào implementation
103
- - Có thể dùng viết tắt (PR, CI/CD, etc.)
104
-
105
- ## Execution Logic
106
-
107
- ### Step 1: Load Preferences
108
-
109
- ```
110
- preferences = null
111
-
112
- # Try local first
113
- if exists(".brain/preferences.json"):
114
- preferences = parse(".brain/preferences.json")
115
-
116
- # Fallback to global
117
- if !preferences && exists("~/.antigravity/preferences.json"):
118
- preferences = parse("~/.antigravity/preferences.json")
119
-
120
- # Extract level
121
- level = preferences?.technical?.technical_level || "basic"
122
- ```
123
-
124
- ### Step 2: Set Context
125
-
126
- ```
127
- Set internal context for session:
128
- - terminology_level = level
129
- - Apply translation rules based on level
130
- ```
131
-
132
- ### Step 3: Silent Operation
133
-
134
- This skill operates SILENTLY:
135
- - KHÔNG show indicator
136
- - KHÔNG notify user
137
- - Just sets context for subsequent responses
138
-
139
- ## Integration with Workflows
140
-
141
- All AWF workflows should respect the set terminology level:
142
-
143
- ```
144
- When outputting technical terms:
145
- if level == "newbie":
146
- → Use translated terms from table
147
- → Add explanations
148
- elif level == "basic":
149
- → Use term (explanation) format first time
150
- → Plain term after that
151
- else:
152
- → Use standard technical terms
153
- ```
154
-
155
- ## Performance
156
-
157
- - Load time: < 100ms
158
- - Single file read
159
- - Cached for session duration
160
-
161
- ## Error Handling
162
-
163
- ```
164
- If preferences.json corrupted:
165
- → Use default level: "basic"
166
- → NO error message to user
167
-
168
- If technical_level invalid:
169
- → Map to closest: "newbie"/"basic"/"technical"
170
- → Log warning internally
171
- ```
172
-
173
- ## Example Behavior
174
-
175
- **User level: newbie**
176
- ```
177
- User: /deploy
178
-
179
- Output: "Sẵn sàng đưa ứng dụng lên mạng (deploy) cho người khác dùng.
180
- Em sẽ kiểm tra xem mọi thứ đã sẵn sàng chưa..."
181
- ```
182
-
183
- **User level: technical**
184
- ```
185
- User: /deploy
186
-
187
- Output: "Initiating deployment pipeline.
188
- Running pre-deploy checks..."
189
- ```