@leejungkiin/awkit 1.0.0
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/CHANGELOG.md +27 -0
- package/README.md +146 -0
- package/VERSION +1 -0
- package/bin/awf.js +549 -0
- package/bin/awk.js +1759 -0
- package/core/AGENTS.md +39 -0
- package/core/GEMINI.md +202 -0
- package/core/GEMINI.md.bak +244 -0
- package/core/orchestrator.md +58 -0
- package/package.json +46 -0
- package/schemas/brain.schema.json +342 -0
- package/schemas/preferences.schema.json +95 -0
- package/schemas/session.schema.json +112 -0
- package/skill-packs/neural-memory/README.md +111 -0
- package/skill-packs/neural-memory/pack.json +35 -0
- package/skill-packs/neural-memory/schemas/brain-snapshot.json +167 -0
- package/skill-packs/neural-memory/skills/nm-memory-audit/SKILL.md +157 -0
- package/skill-packs/neural-memory/skills/nm-memory-evolution/SKILL.md +202 -0
- package/skill-packs/neural-memory/skills/nm-memory-intake/SKILL.md +135 -0
- package/skill-packs/neural-memory/skills/nm-memory-sync/SKILL.md +184 -0
- package/skill-packs/neural-memory/workflows/nm-import.md +73 -0
- package/skill-packs/neural-memory/workflows/nm-recall.md +67 -0
- package/skill-packs/neural-memory/workflows/nm-snapshot.md +69 -0
- package/skills/adaptive-language/SKILL.md +189 -0
- package/skills/ambient-brain/SKILL.md +314 -0
- package/skills/ambient-brain/brain-router.md +185 -0
- package/skills/ambient-brain/brain-templates.md +201 -0
- package/skills/auto-save/SKILL.md +223 -0
- package/skills/awf-adaptive-language/SKILL.md +189 -0
- package/skills/awf-context-help/SKILL.md +180 -0
- package/skills/awf-error-translator/SKILL.md +153 -0
- package/skills/awf-session-restore/SKILL.md +270 -0
- package/skills/awf-version-tracker/SKILL.md +32 -0
- package/skills/awf-version-tracker/scripts/snapshot.sh +22 -0
- package/skills/beads-manager/SKILL.md +323 -0
- package/skills/brainstorm-agent/SKILL.md +295 -0
- package/skills/context-help/SKILL.md +180 -0
- package/skills/error-translator/SKILL.md +153 -0
- package/skills/ios-engineer/SKILL.md +101 -0
- package/skills/memory-sync/SKILL.md +378 -0
- package/skills/memory-sync/memory-router.md +185 -0
- package/skills/memory-sync/memory-templates.md +201 -0
- package/skills/orchestrator/SKILL.md +193 -0
- package/skills/session-restore/SKILL.md +240 -0
- package/templates/CODEBASE.md +80 -0
- package/templates/brain.example.json +321 -0
- package/templates/preferences.example.json +21 -0
- package/templates/project-identity/android.json +28 -0
- package/templates/project-identity/backend-nestjs.json +24 -0
- package/templates/project-identity/expo.json +27 -0
- package/templates/project-identity/ios.json +27 -0
- package/templates/project-identity/web-nextjs.json +24 -0
- package/templates/session.example.json +53 -0
- package/templates/specs/design-template.md +166 -0
- package/templates/specs/requirements-template.md +65 -0
- package/templates/specs/tasks-template.md +132 -0
- package/templates/structures/android.txt +10 -0
- package/templates/structures/backend-nestjs.txt +6 -0
- package/templates/structures/expo.txt +9 -0
- package/templates/structures/ios.txt +9 -0
- package/templates/structures/web-nextjs.txt +6 -0
- package/templates/workflow_dual_mode_template.md +87 -0
- package/workflows/_uncategorized/README.md +339 -0
- package/workflows/_uncategorized/ads-creative.md +357 -0
- package/workflows/_uncategorized/ads-full-optimization.md +308 -0
- package/workflows/_uncategorized/ads-plan.md +247 -0
- package/workflows/_uncategorized/ads-user-analysis.md +337 -0
- package/workflows/_uncategorized/skill-health.md +35 -0
- package/workflows/_uncategorized/skill-rollback.md +35 -0
- package/workflows/ads/admob.md +62 -0
- package/workflows/ads/ads-analyst.md +201 -0
- package/workflows/ads/ads-audit.md +106 -0
- package/workflows/ads/ads-optimize.md +97 -0
- package/workflows/ads/ads-targeting.md +241 -0
- package/workflows/ads/adsExpert.md +160 -0
- package/workflows/ads/smali-ads-config.md +400 -0
- package/workflows/ads/smali-ads-flow.md +331 -0
- package/workflows/ads/smali-ads-interstitial.md +377 -0
- package/workflows/ads/smali-ads-native.md +382 -0
- package/workflows/context/auto-execution-workflow.md +291 -0
- package/workflows/context/auto-implement.md +211 -0
- package/workflows/context/codebase-sync.md +163 -0
- package/workflows/context/logic-reasoning-workflow.md +260 -0
- package/workflows/context/next.md +195 -0
- package/workflows/context/recap.md +212 -0
- package/workflows/context/save-brain.md +285 -0
- package/workflows/context/user-intent-analysis-workflow.md +206 -0
- package/workflows/expert/codeExpert.md +126 -0
- package/workflows/expert/debugExpert.md +136 -0
- package/workflows/expert/planExpert.md +112 -0
- package/workflows/git/cloudflare-tunnel.md +135 -0
- package/workflows/git/git-commit-workflow.md +75 -0
- package/workflows/git/hotfix.md +357 -0
- package/workflows/git/release-notes.md +160 -0
- package/workflows/git/rollback.md +52 -0
- package/workflows/git/smart-git-ops.md +103 -0
- package/workflows/lifecycle/brainstorm.md +377 -0
- package/workflows/lifecycle/code.md +663 -0
- package/workflows/lifecycle/debug.md +116 -0
- package/workflows/lifecycle/deploy.md +95 -0
- package/workflows/lifecycle/init.md +152 -0
- package/workflows/lifecycle/master-code-workflow.md +300 -0
- package/workflows/lifecycle/migration.md +196 -0
- package/workflows/lifecycle/plan.md +91 -0
- package/workflows/lifecycle/refactor.md +165 -0
- package/workflows/lifecycle/run.md +52 -0
- package/workflows/lifecycle/test.md +91 -0
- package/workflows/meta/customize.md +346 -0
- package/workflows/meta/file-protection-rules.md +129 -0
- package/workflows/meta/help.html +350 -0
- package/workflows/meta/project-identity-enforcement.md +180 -0
- package/workflows/mobile/app-analysis.md +64 -0
- package/workflows/mobile/maestro-qa-workflow.md +470 -0
- package/workflows/mobile/maestro-test-workflow.md +84 -0
- package/workflows/mobile/structure-clean-architect.md +271 -0
- package/workflows/mobile/turbo-mobile-build.md +190 -0
- package/workflows/quality/accessibility-audit.md +311 -0
- package/workflows/quality/audit.md +217 -0
- package/workflows/quality/bug-hunter.md +243 -0
- package/workflows/quality/code-janitor.md +209 -0
- package/workflows/quality/code-quality-rules.md +132 -0
- package/workflows/quality/performance-audit.md +343 -0
- package/workflows/quality/project-audit.md +61 -0
- package/workflows/quality/self-healing-test.md +192 -0
- package/workflows/quality/ui-review.md +130 -0
- package/workflows/quality/ux-audit.md +213 -0
- package/workflows/quality/visual-debug.md +34 -0
- package/workflows/roles/oracle.md +267 -0
- package/workflows/roles/product-manager-workflow.md +52 -0
- package/workflows/roles/qa-engineer-workflow.md +41 -0
- package/workflows/roles/tech-lead-workflow.md +45 -0
- package/workflows/roles/ui-ux-designer-workflow.md +42 -0
- package/workflows/roles/vibe-coding-master-workflow.md +52 -0
- package/workflows/ui/app-screen-analyzer.md +152 -0
- package/workflows/ui/create-feature.md +332 -0
- package/workflows/ui/create-spec-architect.md +184 -0
- package/workflows/ui/design-to-ui.md +308 -0
- package/workflows/ui/ui-first-methodology.md +279 -0
- package/workflows/ui/visualize.md +298 -0
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Khởi tạo nhanh cấu trúc Clean Architecture cho các tính năng Swift, Kotlin hoặc Expo.
|
|
3
|
+
safe_auto_run: true
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /structure-clean-architect - Mobile Feature Scaffolder
|
|
7
|
+
|
|
8
|
+
> 💡 **Tip:** For complete feature design from scratch (architecture → specs → UI → implementation), use `/feature-design-pipeline` master workflow.
|
|
9
|
+
|
|
10
|
+
Generates complete file structure for a new feature based on `.project-identity` and platform.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Phase 1: Input Parsing
|
|
15
|
+
|
|
16
|
+
**Trigger**: User says "Create feature [FeatureName]"
|
|
17
|
+
|
|
18
|
+
1. **Extract feature name** (e.g., "ProfileSettings", "Checkout")
|
|
19
|
+
2. **Read `.project-identity`** for:
|
|
20
|
+
- Platform (iOS/Android/Expo)
|
|
21
|
+
- Architecture (MVVM/TCA/MVI)
|
|
22
|
+
- Language (Swift/Kotlin/TypeScript)
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Phase 2: iOS (Swift/SwiftUI) Scaffold
|
|
27
|
+
|
|
28
|
+
### MVVM Architecture
|
|
29
|
+
// turbo
|
|
30
|
+
Create directory structure:
|
|
31
|
+
```
|
|
32
|
+
Features/[FeatureName]/
|
|
33
|
+
├── Views/
|
|
34
|
+
│ └── [FeatureName]View.swift
|
|
35
|
+
├── ViewModels/
|
|
36
|
+
│ └── [FeatureName]ViewModel.swift
|
|
37
|
+
├── Models/
|
|
38
|
+
│ └── [FeatureName]Model.swift
|
|
39
|
+
├── Services/
|
|
40
|
+
│ └── [FeatureName]Service.swift
|
|
41
|
+
└── Tests/
|
|
42
|
+
└── [FeatureName]ViewModelTests.swift
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### File Templates
|
|
46
|
+
|
|
47
|
+
**[FeatureName]View.swift**
|
|
48
|
+
```swift
|
|
49
|
+
import SwiftUI
|
|
50
|
+
|
|
51
|
+
struct [FeatureName]View: View {
|
|
52
|
+
@StateObject private var viewModel = [FeatureName]ViewModel()
|
|
53
|
+
|
|
54
|
+
var body: some View {
|
|
55
|
+
Text("Hello, [FeatureName]!")
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
#Preview {
|
|
60
|
+
[FeatureName]View()
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**[FeatureName]ViewModel.swift**
|
|
65
|
+
```swift
|
|
66
|
+
import Foundation
|
|
67
|
+
import Combine
|
|
68
|
+
|
|
69
|
+
@MainActor
|
|
70
|
+
final class [FeatureName]ViewModel: ObservableObject {
|
|
71
|
+
enum State {
|
|
72
|
+
case idle
|
|
73
|
+
case loading
|
|
74
|
+
case loaded([FeatureName]Model)
|
|
75
|
+
case error(Error)
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@Published private(set) var state: State = .idle
|
|
79
|
+
|
|
80
|
+
private let service: [FeatureName]Service
|
|
81
|
+
|
|
82
|
+
init(service: [FeatureName]Service = [FeatureName]Service()) {
|
|
83
|
+
self.service = service
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
func load() async {
|
|
87
|
+
state = .loading
|
|
88
|
+
// TODO: Implement loading logic
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**[FeatureName]Model.swift**
|
|
94
|
+
```swift
|
|
95
|
+
import Foundation
|
|
96
|
+
|
|
97
|
+
struct [FeatureName]Model: Codable, Identifiable {
|
|
98
|
+
let id: String
|
|
99
|
+
// TODO: Add properties
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Phase 3: Android (Kotlin/Compose) Scaffold
|
|
106
|
+
|
|
107
|
+
### MVVM Architecture
|
|
108
|
+
// turbo
|
|
109
|
+
Create directory structure:
|
|
110
|
+
```
|
|
111
|
+
features/[featurename]/
|
|
112
|
+
├── ui/
|
|
113
|
+
│ └── [FeatureName]Screen.kt
|
|
114
|
+
├── viewmodel/
|
|
115
|
+
│ └── [FeatureName]ViewModel.kt
|
|
116
|
+
├── model/
|
|
117
|
+
│ └── [FeatureName].kt
|
|
118
|
+
├── repository/
|
|
119
|
+
│ └── [FeatureName]Repository.kt
|
|
120
|
+
└── di/
|
|
121
|
+
└── [FeatureName]Module.kt
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### File Templates
|
|
125
|
+
|
|
126
|
+
**[FeatureName]Screen.kt**
|
|
127
|
+
```kotlin
|
|
128
|
+
package com.app.features.[featurename].ui
|
|
129
|
+
|
|
130
|
+
import androidx.compose.runtime.*
|
|
131
|
+
import androidx.compose.material3.*
|
|
132
|
+
import androidx.hilt.navigation.compose.hiltViewModel
|
|
133
|
+
|
|
134
|
+
@Composable
|
|
135
|
+
fun [FeatureName]Screen(
|
|
136
|
+
viewModel: [FeatureName]ViewModel = hiltViewModel()
|
|
137
|
+
) {
|
|
138
|
+
val uiState by viewModel.uiState.collectAsStateWithLifecycle()
|
|
139
|
+
|
|
140
|
+
[FeatureName]Content(uiState = uiState)
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
@Composable
|
|
144
|
+
private fun [FeatureName]Content(uiState: [FeatureName]UiState) {
|
|
145
|
+
Text("Hello, [FeatureName]!")
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
**[FeatureName]ViewModel.kt**
|
|
150
|
+
```kotlin
|
|
151
|
+
package com.app.features.[featurename].viewmodel
|
|
152
|
+
|
|
153
|
+
import androidx.lifecycle.ViewModel
|
|
154
|
+
import dagger.hilt.android.lifecycle.HiltViewModel
|
|
155
|
+
import kotlinx.coroutines.flow.*
|
|
156
|
+
import javax.inject.Inject
|
|
157
|
+
|
|
158
|
+
@HiltViewModel
|
|
159
|
+
class [FeatureName]ViewModel @Inject constructor(
|
|
160
|
+
private val repository: [FeatureName]Repository
|
|
161
|
+
) : ViewModel() {
|
|
162
|
+
|
|
163
|
+
private val _uiState = MutableStateFlow<[FeatureName]UiState>([FeatureName]UiState.Loading)
|
|
164
|
+
val uiState: StateFlow<[FeatureName]UiState> = _uiState.asStateFlow()
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
sealed interface [FeatureName]UiState {
|
|
168
|
+
data object Loading : [FeatureName]UiState
|
|
169
|
+
data class Success(val data: [FeatureName]) : [FeatureName]UiState
|
|
170
|
+
data class Error(val message: String) : [FeatureName]UiState
|
|
171
|
+
}
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## Phase 4: Expo (TypeScript) Scaffold
|
|
177
|
+
|
|
178
|
+
// turbo
|
|
179
|
+
Create directory structure:
|
|
180
|
+
```
|
|
181
|
+
app/[featurename]/
|
|
182
|
+
├── index.tsx
|
|
183
|
+
├── [id].tsx (if detail needed)
|
|
184
|
+
components/[featurename]/
|
|
185
|
+
├── [FeatureName]Card.tsx
|
|
186
|
+
├── [FeatureName]List.tsx
|
|
187
|
+
hooks/
|
|
188
|
+
├── use[FeatureName].ts
|
|
189
|
+
services/
|
|
190
|
+
├── [featurename]Service.ts
|
|
191
|
+
types/
|
|
192
|
+
├── [featurename].ts
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### File Templates
|
|
196
|
+
|
|
197
|
+
**app/[featurename]/index.tsx**
|
|
198
|
+
```typescript
|
|
199
|
+
import { View, Text } from 'react-native';
|
|
200
|
+
import { use[FeatureName] } from '@/hooks/use[FeatureName]';
|
|
201
|
+
|
|
202
|
+
export default function [FeatureName]Screen() {
|
|
203
|
+
const { data, isLoading, error } = use[FeatureName]();
|
|
204
|
+
|
|
205
|
+
if (isLoading) return <Text>Loading...</Text>;
|
|
206
|
+
if (error) return <Text>Error: {error.message}</Text>;
|
|
207
|
+
|
|
208
|
+
return (
|
|
209
|
+
<View>
|
|
210
|
+
<Text>Hello, [FeatureName]!</Text>
|
|
211
|
+
</View>
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
**hooks/use[FeatureName].ts**
|
|
217
|
+
```typescript
|
|
218
|
+
import { useQuery } from '@tanstack/react-query';
|
|
219
|
+
import { [featurename]Service } from '@/services/[featurename]Service';
|
|
220
|
+
|
|
221
|
+
export function use[FeatureName]() {
|
|
222
|
+
return useQuery({
|
|
223
|
+
queryKey: ['[featurename]'],
|
|
224
|
+
queryFn: [featurename]Service.getAll,
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
## Phase 5: Registration
|
|
232
|
+
|
|
233
|
+
### iOS
|
|
234
|
+
// turbo
|
|
235
|
+
- Add to Navigation/Router if using coordinator pattern
|
|
236
|
+
- Register in DI container if applicable
|
|
237
|
+
|
|
238
|
+
### Android
|
|
239
|
+
// turbo
|
|
240
|
+
- Add navigation route to NavGraph
|
|
241
|
+
- Register Hilt module if using DI
|
|
242
|
+
|
|
243
|
+
### Expo
|
|
244
|
+
// turbo
|
|
245
|
+
- Route auto-registered via file-based routing
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
## Phase 6: Summary
|
|
250
|
+
|
|
251
|
+
Return checklist:
|
|
252
|
+
- ✅ Created files: [list]
|
|
253
|
+
- 📝 TODOs to implement:
|
|
254
|
+
- [ ] Add model properties
|
|
255
|
+
- [ ] Implement service/repository
|
|
256
|
+
- [ ] Connect to API
|
|
257
|
+
- [ ] Add UI elements
|
|
258
|
+
|
|
259
|
+
**Optional**: Create feature specs?
|
|
260
|
+
- `docs/specs/[feature]/requirements.md`
|
|
261
|
+
- `docs/specs/[feature]/design.md`
|
|
262
|
+
- `docs/specs/[feature]/design.md`
|
|
263
|
+
|
|
264
|
+
Use `/feature-completion` to generate specs if needed.
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
## ⚠️ NEXT STEPS:
|
|
269
|
+
- Add UI → `/ui-review`
|
|
270
|
+
- Implement logic → `/feature-completion`
|
|
271
|
+
- Run app → `/run`
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Tự động hóa build dự án mobile và khắc phục lỗi môi trường phổ biến.
|
|
3
|
+
safe_auto_run: true
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /turbo-mobile-build - The Build Doctor
|
|
7
|
+
|
|
8
|
+
Automates the build process for mobile apps. Attempts to build, detects errors, applies known fixes, and rebuilds.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Phase 1: Platform Detection & Clean
|
|
13
|
+
// turbo
|
|
14
|
+
|
|
15
|
+
1. **Detect platform:**
|
|
16
|
+
- `*.xcworkspace` → iOS (prefer workspace over project)
|
|
17
|
+
- `*.xcodeproj` → iOS
|
|
18
|
+
- `build.gradle.kts` → Android
|
|
19
|
+
- `app.json` with expo → Expo
|
|
20
|
+
|
|
21
|
+
2. **Clean build artifacts:**
|
|
22
|
+
|
|
23
|
+
### iOS
|
|
24
|
+
```bash
|
|
25
|
+
# Clean DerivedData
|
|
26
|
+
rm -rf ~/Library/Developer/Xcode/DerivedData/[ProjectName]*
|
|
27
|
+
|
|
28
|
+
# Clean build folder
|
|
29
|
+
xcodebuild clean -workspace *.xcworkspace -scheme [Scheme]
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Android
|
|
33
|
+
```bash
|
|
34
|
+
./gradlew clean
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Expo
|
|
38
|
+
```bash
|
|
39
|
+
npx expo start -c # Clear cache
|
|
40
|
+
rm -rf node_modules/.cache
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Phase 2: Dependency Resolution
|
|
46
|
+
// turbo
|
|
47
|
+
|
|
48
|
+
### iOS - CocoaPods
|
|
49
|
+
```bash
|
|
50
|
+
# Check Podfile.lock vs Pods
|
|
51
|
+
pod install --repo-update
|
|
52
|
+
|
|
53
|
+
# If still failing
|
|
54
|
+
rm -rf Pods Podfile.lock
|
|
55
|
+
pod install
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### iOS - SPM (Swift Package Manager)
|
|
59
|
+
```bash
|
|
60
|
+
# Resolve packages
|
|
61
|
+
xcodebuild -resolvePackageDependencies
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Android - Gradle
|
|
65
|
+
```bash
|
|
66
|
+
# Refresh dependencies
|
|
67
|
+
./gradlew --refresh-dependencies
|
|
68
|
+
|
|
69
|
+
# If cache issues
|
|
70
|
+
rm -rf ~/.gradle/caches
|
|
71
|
+
./gradlew build
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Expo
|
|
75
|
+
```bash
|
|
76
|
+
rm -rf node_modules
|
|
77
|
+
npm install
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Phase 3: Build Execution
|
|
83
|
+
// turbo
|
|
84
|
+
|
|
85
|
+
### iOS
|
|
86
|
+
```bash
|
|
87
|
+
xcodebuild build \
|
|
88
|
+
-workspace *.xcworkspace \
|
|
89
|
+
-scheme [Scheme] \
|
|
90
|
+
-destination 'generic/platform=iOS Simulator' \
|
|
91
|
+
-configuration Debug \
|
|
92
|
+
CODE_SIGNING_ALLOWED=NO
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Android
|
|
96
|
+
```bash
|
|
97
|
+
./gradlew assembleDebug
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Expo
|
|
101
|
+
```bash
|
|
102
|
+
npx expo export --platform ios
|
|
103
|
+
npx expo export --platform android
|
|
104
|
+
# Or for native build
|
|
105
|
+
eas build --platform ios --profile development
|
|
106
|
+
eas build --platform android --profile development
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Phase 4: Error Analysis & Auto-Fix Loop
|
|
112
|
+
|
|
113
|
+
### iOS Common Errors
|
|
114
|
+
|
|
115
|
+
| Error Pattern | Auto-Fix |
|
|
116
|
+
| :--- | :--- |
|
|
117
|
+
| `No such module 'X'` | `pod install --repo-update` |
|
|
118
|
+
| `Command PhaseScriptExecution failed` | Check build phases, re-run |
|
|
119
|
+
| `Signing requires a development team` | Set `CODE_SIGNING_ALLOWED=NO` for simulator |
|
|
120
|
+
| `Multiple commands produce` | Clean DerivedData |
|
|
121
|
+
| `Package resolution failed` | `xcodebuild -resolvePackageDependencies` |
|
|
122
|
+
| `Framework not found` | Check Podfile, reinstall pods |
|
|
123
|
+
|
|
124
|
+
### Android Common Errors
|
|
125
|
+
|
|
126
|
+
| Error Pattern | Auto-Fix |
|
|
127
|
+
| :--- | :--- |
|
|
128
|
+
| `Gradle daemon stopped` | `./gradlew --stop && ./gradlew build` |
|
|
129
|
+
| `SDK location not found` | Set ANDROID_HOME in local.properties |
|
|
130
|
+
| `Dependency resolution failed` | `./gradlew --refresh-dependencies` |
|
|
131
|
+
| `Kotlin version mismatch` | Sync Kotlin versions in build.gradle |
|
|
132
|
+
| `AAPT2 error` | Clean and rebuild |
|
|
133
|
+
|
|
134
|
+
### Expo Common Errors
|
|
135
|
+
|
|
136
|
+
| Error Pattern | Auto-Fix |
|
|
137
|
+
| :--- | :--- |
|
|
138
|
+
| `Metro bundler crashed` | `npx expo start -c` |
|
|
139
|
+
| `Native module not linked` | `npx expo prebuild --clean` |
|
|
140
|
+
| `EAS build failed` | Check eas.json, credentials |
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Phase 5: Report
|
|
145
|
+
// turbo
|
|
146
|
+
|
|
147
|
+
### Success Report
|
|
148
|
+
```
|
|
149
|
+
✅ BUILD SUCCESSFUL
|
|
150
|
+
|
|
151
|
+
Platform: [iOS/Android/Expo]
|
|
152
|
+
Scheme: [Scheme Name]
|
|
153
|
+
Duration: [X] seconds
|
|
154
|
+
Output: [path to .app/.apk]
|
|
155
|
+
|
|
156
|
+
Actions Taken:
|
|
157
|
+
- Cleaned DerivedData
|
|
158
|
+
- Installed CocoaPods
|
|
159
|
+
- Built successfully
|
|
160
|
+
|
|
161
|
+
Next: /run to launch, or /deploy to publish
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Failure Report
|
|
165
|
+
```
|
|
166
|
+
❌ BUILD FAILED
|
|
167
|
+
|
|
168
|
+
Platform: [iOS/Android/Expo]
|
|
169
|
+
Error Type: [Compilation/Linking/Signing]
|
|
170
|
+
|
|
171
|
+
Error Details:
|
|
172
|
+
[First 10 lines of error]
|
|
173
|
+
|
|
174
|
+
Attempted Fixes:
|
|
175
|
+
- [Fix 1] - ❌ Did not resolve
|
|
176
|
+
- [Fix 2] - ❌ Did not resolve
|
|
177
|
+
|
|
178
|
+
Remaining Issues:
|
|
179
|
+
- [Issue 1] - Likely code error in [File]
|
|
180
|
+
- [Issue 2] - Missing dependency
|
|
181
|
+
|
|
182
|
+
Recommendation: Use /debug to investigate code errors
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## ⚠️ NEXT STEPS:
|
|
188
|
+
- Build passed → `/run` to launch
|
|
189
|
+
- Build failed (env issue) → Retry with suggested fix
|
|
190
|
+
- Build failed (code issue) → `/debug`
|