oh-my-ag 1.2.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.
Files changed (77) hide show
  1. package/.agent/skills/_shared/api-contracts/README.md +56 -0
  2. package/.agent/skills/_shared/api-contracts/template.md +88 -0
  3. package/.agent/skills/_shared/clarification-protocol.md +217 -0
  4. package/.agent/skills/_shared/common-checklist.md +31 -0
  5. package/.agent/skills/_shared/context-budget.md +118 -0
  6. package/.agent/skills/_shared/context-loading.md +105 -0
  7. package/.agent/skills/_shared/difficulty-guide.md +55 -0
  8. package/.agent/skills/_shared/lessons-learned.md +113 -0
  9. package/.agent/skills/_shared/memory-protocol.md +79 -0
  10. package/.agent/skills/_shared/reasoning-templates.md +161 -0
  11. package/.agent/skills/_shared/skill-routing.md +80 -0
  12. package/.agent/skills/_shared/verify.sh +252 -0
  13. package/.agent/skills/backend-agent/SKILL.md +47 -0
  14. package/.agent/skills/backend-agent/resources/api-template.py +326 -0
  15. package/.agent/skills/backend-agent/resources/checklist.md +36 -0
  16. package/.agent/skills/backend-agent/resources/error-playbook.md +98 -0
  17. package/.agent/skills/backend-agent/resources/examples.md +85 -0
  18. package/.agent/skills/backend-agent/resources/execution-protocol.md +45 -0
  19. package/.agent/skills/backend-agent/resources/snippets.md +197 -0
  20. package/.agent/skills/backend-agent/resources/tech-stack.md +39 -0
  21. package/.agent/skills/commit/SKILL.md +121 -0
  22. package/.agent/skills/commit/config/commit-config.yaml +55 -0
  23. package/.agent/skills/commit/resources/conventional-commits.md +166 -0
  24. package/.agent/skills/debug-agent/SKILL.md +51 -0
  25. package/.agent/skills/debug-agent/resources/bug-report-template.md +332 -0
  26. package/.agent/skills/debug-agent/resources/checklist.md +30 -0
  27. package/.agent/skills/debug-agent/resources/common-patterns.md +734 -0
  28. package/.agent/skills/debug-agent/resources/debugging-checklist.md +362 -0
  29. package/.agent/skills/debug-agent/resources/error-playbook.md +94 -0
  30. package/.agent/skills/debug-agent/resources/examples.md +87 -0
  31. package/.agent/skills/debug-agent/resources/execution-protocol.md +51 -0
  32. package/.agent/skills/frontend-agent/SKILL.md +48 -0
  33. package/.agent/skills/frontend-agent/resources/checklist.md +38 -0
  34. package/.agent/skills/frontend-agent/resources/component-template.tsx +92 -0
  35. package/.agent/skills/frontend-agent/resources/error-playbook.md +108 -0
  36. package/.agent/skills/frontend-agent/resources/examples.md +77 -0
  37. package/.agent/skills/frontend-agent/resources/execution-protocol.md +49 -0
  38. package/.agent/skills/frontend-agent/resources/snippets.md +205 -0
  39. package/.agent/skills/frontend-agent/resources/tailwind-rules.md +343 -0
  40. package/.agent/skills/frontend-agent/resources/tech-stack.md +36 -0
  41. package/.agent/skills/mobile-agent/SKILL.md +46 -0
  42. package/.agent/skills/mobile-agent/resources/checklist.md +35 -0
  43. package/.agent/skills/mobile-agent/resources/error-playbook.md +106 -0
  44. package/.agent/skills/mobile-agent/resources/examples.md +79 -0
  45. package/.agent/skills/mobile-agent/resources/execution-protocol.md +49 -0
  46. package/.agent/skills/mobile-agent/resources/screen-template.dart +298 -0
  47. package/.agent/skills/mobile-agent/resources/snippets.md +235 -0
  48. package/.agent/skills/mobile-agent/resources/tech-stack.md +45 -0
  49. package/.agent/skills/orchestrator/SKILL.md +99 -0
  50. package/.agent/skills/orchestrator/config/cli-config.yaml +78 -0
  51. package/.agent/skills/orchestrator/resources/memory-schema.md +212 -0
  52. package/.agent/skills/orchestrator/resources/subagent-prompt-template.md +153 -0
  53. package/.agent/skills/orchestrator/scripts/parallel-run.sh +330 -0
  54. package/.agent/skills/orchestrator/scripts/spawn-agent.sh +263 -0
  55. package/.agent/skills/orchestrator/templates/backend-task.md +18 -0
  56. package/.agent/skills/orchestrator/templates/debug-task.md +16 -0
  57. package/.agent/skills/orchestrator/templates/frontend-task.md +17 -0
  58. package/.agent/skills/orchestrator/templates/mobile-task.md +17 -0
  59. package/.agent/skills/orchestrator/templates/qa-task.md +16 -0
  60. package/.agent/skills/orchestrator/templates/tasks-example.yaml +15 -0
  61. package/.agent/skills/pm-agent/SKILL.md +47 -0
  62. package/.agent/skills/pm-agent/resources/error-playbook.md +75 -0
  63. package/.agent/skills/pm-agent/resources/examples.md +121 -0
  64. package/.agent/skills/pm-agent/resources/execution-protocol.md +46 -0
  65. package/.agent/skills/pm-agent/resources/task-template.json +57 -0
  66. package/.agent/skills/qa-agent/SKILL.md +43 -0
  67. package/.agent/skills/qa-agent/resources/checklist.md +294 -0
  68. package/.agent/skills/qa-agent/resources/error-playbook.md +95 -0
  69. package/.agent/skills/qa-agent/resources/examples.md +100 -0
  70. package/.agent/skills/qa-agent/resources/execution-protocol.md +50 -0
  71. package/.agent/skills/qa-agent/resources/self-check.md +27 -0
  72. package/.agent/skills/workflow-guide/SKILL.md +57 -0
  73. package/.agent/skills/workflow-guide/resources/examples.md +68 -0
  74. package/README.ko.md +459 -0
  75. package/README.md +563 -0
  76. package/bin/cli.js +205 -0
  77. package/package.json +75 -0
@@ -0,0 +1,343 @@
1
+ # Tailwind CSS Best Practices
2
+
3
+ ## Core Principles
4
+
5
+ 1. **NO inline styles** - Always use Tailwind classes
6
+ 2. **Responsive-first** - Design for mobile, scale up
7
+ 3. **Consistent spacing** - Use Tailwind's spacing scale
8
+ 4. **Dark mode support** - Use `dark:` variant
9
+
10
+ ## Spacing Scale
11
+
12
+ Use Tailwind's consistent scale:
13
+
14
+ ```tsx
15
+ // ✅ GOOD
16
+ <div className="p-4 mb-6 gap-2">
17
+
18
+ // ❌ BAD - arbitrary values without reason
19
+ <div className="p-[17px] mb-[23px]">
20
+ ```
21
+
22
+ Standard scale:
23
+ - `1` = 0.25rem (4px)
24
+ - `2` = 0.5rem (8px)
25
+ - `4` = 1rem (16px)
26
+ - `6` = 1.5rem (24px)
27
+ - `8` = 2rem (32px)
28
+
29
+ ## Responsive Design
30
+
31
+ Mobile-first approach:
32
+
33
+ ```tsx
34
+ // ✅ GOOD - Mobile first, then scale up
35
+ <div className="
36
+ grid grid-cols-1
37
+ sm:grid-cols-2
38
+ lg:grid-cols-3
39
+ gap-4
40
+ ">
41
+
42
+ // ❌ BAD - Desktop first
43
+ <div className="grid-cols-3 sm:grid-cols-1">
44
+ ```
45
+
46
+ Breakpoints:
47
+ - `sm`: 640px
48
+ - `md`: 768px
49
+ - `lg`: 1024px
50
+ - `xl`: 1280px
51
+ - `2xl`: 1536px
52
+
53
+ ## Color System
54
+
55
+ Use semantic color tokens:
56
+
57
+ ```tsx
58
+ // ✅ GOOD - Semantic tokens
59
+ <div className="bg-background text-foreground border-border">
60
+ <button className="bg-primary text-primary-foreground">
61
+
62
+ // ❌ BAD - Hardcoded colors
63
+ <div className="bg-white text-black border-gray-300">
64
+ ```
65
+
66
+ Semantic tokens:
67
+ - `background` / `foreground`
68
+ - `primary` / `primary-foreground`
69
+ - `secondary` / `secondary-foreground`
70
+ - `muted` / `muted-foreground`
71
+ - `accent` / `accent-foreground`
72
+ - `destructive` / `destructive-foreground`
73
+ - `border` / `input` / `ring`
74
+
75
+ ## Dark Mode
76
+
77
+ Always support dark mode:
78
+
79
+ ```tsx
80
+ // ✅ GOOD
81
+ <div className="
82
+ bg-white dark:bg-gray-900
83
+ text-gray-900 dark:text-gray-100
84
+ border-gray-200 dark:border-gray-800
85
+ ">
86
+
87
+ // ❌ BAD - No dark mode
88
+ <div className="bg-white text-black">
89
+ ```
90
+
91
+ ## Layout
92
+
93
+ ### Flexbox
94
+ ```tsx
95
+ // Horizontal layout
96
+ <div className="flex items-center gap-4">
97
+
98
+ // Vertical layout
99
+ <div className="flex flex-col gap-2">
100
+
101
+ // Centered content
102
+ <div className="flex items-center justify-center min-h-screen">
103
+ ```
104
+
105
+ ### Grid
106
+ ```tsx
107
+ // Auto-fit columns
108
+ <div className="grid grid-cols-[repeat(auto-fit,minmax(300px,1fr))] gap-4">
109
+
110
+ // Responsive grid
111
+ <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
112
+ ```
113
+
114
+ ## Typography
115
+
116
+ ```tsx
117
+ // Headings
118
+ <h1 className="text-4xl font-bold tracking-tight">
119
+ <h2 className="text-3xl font-semibold">
120
+ <h3 className="text-2xl font-semibold">
121
+
122
+ // Body text
123
+ <p className="text-base leading-7">
124
+ <p className="text-sm text-muted-foreground">
125
+
126
+ // Links
127
+ <a className="text-primary hover:underline">
128
+ ```
129
+
130
+ ## Interactive Elements
131
+
132
+ ### Buttons
133
+ ```tsx
134
+ // Primary button
135
+ <button className="
136
+ inline-flex items-center justify-center
137
+ rounded-md px-4 py-2
138
+ bg-primary text-primary-foreground
139
+ hover:bg-primary/90
140
+ disabled:opacity-50 disabled:pointer-events-none
141
+ transition-colors
142
+ ">
143
+
144
+ // Ghost button
145
+ <button className="
146
+ hover:bg-accent hover:text-accent-foreground
147
+ transition-colors
148
+ ">
149
+ ```
150
+
151
+ ### Inputs
152
+ ```tsx
153
+ <input className="
154
+ flex h-10 w-full rounded-md border border-input
155
+ bg-background px-3 py-2
156
+ text-sm
157
+ placeholder:text-muted-foreground
158
+ focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring
159
+ disabled:cursor-not-allowed disabled:opacity-50
160
+ " />
161
+ ```
162
+
163
+ ## Animations
164
+
165
+ Use Tailwind's transition utilities:
166
+
167
+ ```tsx
168
+ // Color transitions
169
+ <div className="transition-colors hover:bg-accent">
170
+
171
+ // Multiple properties
172
+ <div className="transition-all duration-200 hover:scale-105">
173
+
174
+ // Custom animations
175
+ <div className="animate-pulse">
176
+ <div className="animate-spin">
177
+ <div className="animate-bounce">
178
+ ```
179
+
180
+ ## Accessibility
181
+
182
+ ### Focus States
183
+ ```tsx
184
+ // Always include focus styles
185
+ <button className="
186
+ focus:outline-none
187
+ focus-visible:ring-2
188
+ focus-visible:ring-ring
189
+ focus-visible:ring-offset-2
190
+ ">
191
+ ```
192
+
193
+ ### Screen Reader Only
194
+ ```tsx
195
+ <span className="sr-only">Hidden text for screen readers</span>
196
+ ```
197
+
198
+ ## Common Patterns
199
+
200
+ ### Card
201
+ ```tsx
202
+ <div className="rounded-lg border bg-card p-6 shadow-sm">
203
+ <h3 className="text-2xl font-semibold mb-2">Title</h3>
204
+ <p className="text-muted-foreground">Description</p>
205
+ </div>
206
+ ```
207
+
208
+ ### Modal Overlay
209
+ ```tsx
210
+ <div className="fixed inset-0 z-50 bg-black/80">
211
+ <div className="fixed left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2">
212
+ {/* Modal content */}
213
+ </div>
214
+ </div>
215
+ ```
216
+
217
+ ### Loading State
218
+ ```tsx
219
+ <div className="flex items-center justify-center p-8">
220
+ <div className="h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" />
221
+ </div>
222
+ ```
223
+
224
+ ### Skeleton
225
+ ```tsx
226
+ <div className="space-y-2">
227
+ <div className="h-4 w-full bg-muted animate-pulse rounded" />
228
+ <div className="h-4 w-3/4 bg-muted animate-pulse rounded" />
229
+ </div>
230
+ ```
231
+
232
+ ## cn() Utility
233
+
234
+ Use `cn()` for conditional classes:
235
+
236
+ ```tsx
237
+ import { cn } from '@/lib/utils';
238
+
239
+ // Merge classes with conditions
240
+ <div className={cn(
241
+ 'base-class',
242
+ condition && 'conditional-class',
243
+ {
244
+ 'variant-a': variant === 'a',
245
+ 'variant-b': variant === 'b',
246
+ },
247
+ className // Allow prop overrides
248
+ )} />
249
+ ```
250
+
251
+ ## Arbitrary Values
252
+
253
+ Only use when absolutely necessary:
254
+
255
+ ```tsx
256
+ // ✅ GOOD - Use standard values
257
+ <div className="w-64 h-64">
258
+
259
+ // ⚠️ OK - Special case
260
+ <div className="w-[789px]"> // Specific design requirement
261
+
262
+ // ❌ BAD - Should use standard value
263
+ <div className="w-[250px]"> // Just use w-64 (256px)
264
+ ```
265
+
266
+ ## Custom Utilities
267
+
268
+ Add to `tailwind.config.js`:
269
+
270
+ ```js
271
+ module.exports = {
272
+ theme: {
273
+ extend: {
274
+ spacing: {
275
+ '18': '4.5rem', // Custom spacing
276
+ },
277
+ colors: {
278
+ brand: {
279
+ 50: '#...',
280
+ // ...
281
+ 900: '#...',
282
+ },
283
+ },
284
+ },
285
+ },
286
+ };
287
+ ```
288
+
289
+ ## Performance
290
+
291
+ ### Purging
292
+ Tailwind auto-purges unused classes in production.
293
+
294
+ ### JIT Mode
295
+ Enabled by default in Tailwind 3+.
296
+
297
+ ### Avoid @apply
298
+ Prefer utility classes in JSX over `@apply` in CSS:
299
+
300
+ ```tsx
301
+ // ✅ GOOD
302
+ <button className="px-4 py-2 bg-primary text-white rounded">
303
+
304
+ // ❌ BAD
305
+ // In CSS: .btn { @apply px-4 py-2 bg-primary text-white rounded; }
306
+ <button className="btn">
307
+ ```
308
+
309
+ ## Linting
310
+
311
+ Use Prettier plugin for class sorting:
312
+
313
+ ```bash
314
+ npm install -D prettier prettier-plugin-tailwindcss
315
+ ```
316
+
317
+ `.prettierrc`:
318
+ ```json
319
+ {
320
+ "plugins": ["prettier-plugin-tailwindcss"]
321
+ }
322
+ ```
323
+
324
+ Classes will auto-sort:
325
+ ```tsx
326
+ // Before
327
+ <div className="text-white p-4 bg-blue-500 rounded">
328
+
329
+ // After (auto-sorted)
330
+ <div className="rounded bg-blue-500 p-4 text-white">
331
+ ```
332
+
333
+ ## Checklist
334
+
335
+ - [ ] No inline styles used
336
+ - [ ] Responsive design (mobile-first)
337
+ - [ ] Dark mode support (`dark:` variants)
338
+ - [ ] Semantic color tokens used
339
+ - [ ] Consistent spacing scale
340
+ - [ ] Focus states for interactive elements
341
+ - [ ] Hover states with transitions
342
+ - [ ] Loading/skeleton states
343
+ - [ ] Classes sorted (with Prettier plugin)
@@ -0,0 +1,36 @@
1
+ # Frontend Agent - Tech Stack Reference
2
+
3
+ ## Core Stack
4
+ - **Framework**: Next.js 14+ (App Router), React 18+
5
+ - **Language**: TypeScript (strict mode)
6
+ - **Styling**: Tailwind CSS 3+ (NO inline styles)
7
+ - **Components**: shadcn/ui, Radix UI
8
+ - **State**: React Context, Zustand, or Redux Toolkit
9
+ - **Forms**: React Hook Form + Zod
10
+ - **API Client**: TanStack Query
11
+ - **Testing**: Vitest, React Testing Library, Playwright
12
+
13
+ ## Code Standards
14
+ - Explicit TypeScript interfaces for props
15
+ - Tailwind classes only (no inline styles)
16
+ - Semantic HTML with ARIA labels
17
+ - Keyboard navigation support
18
+
19
+ ## Project Structure
20
+
21
+ ```
22
+ src/
23
+ app/ # Next.js App Router pages
24
+ components/
25
+ ui/ # Reusable primitives (button, card)
26
+ [feature]/ # Feature components
27
+ lib/
28
+ api/ # API clients (TanStack Query hooks)
29
+ hooks/ # Custom hooks
30
+ types/ # TypeScript types
31
+ ```
32
+
33
+ ## Serena MCP Shortcuts
34
+ - `find_symbol("ComponentName")`: Locate existing component
35
+ - `get_symbols_overview("src/components")`: List all components
36
+ - `find_referencing_symbols("Button")`: Find usages before changes
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: mobile-agent
3
+ description: Mobile specialist for Flutter, React Native, and cross-platform mobile development
4
+ ---
5
+
6
+ # Mobile Agent - Cross-Platform Mobile Specialist
7
+
8
+ ## When to use
9
+ - Building native mobile applications (iOS + Android)
10
+ - Mobile-specific UI patterns
11
+ - Platform features (camera, GPS, push notifications)
12
+ - Offline-first architecture
13
+
14
+ ## When NOT to use
15
+ - Web frontend -> use Frontend Agent
16
+ - Backend APIs -> use Backend Agent
17
+
18
+ ## Core Rules
19
+ 1. Clean Architecture: domain -> data -> presentation
20
+ 2. Riverpod/Bloc for state management (no raw setState for complex logic)
21
+ 3. Material Design 3 (Android) + iOS HIG (iOS)
22
+ 4. All controllers disposed in `dispose()` method
23
+ 5. Dio with interceptors for API calls; handle offline gracefully
24
+ 6. 60fps target; test on both platforms
25
+
26
+ ## How to Execute
27
+ Follow `resources/execution-protocol.md` step by step.
28
+ See `resources/examples.md` for input/output examples.
29
+ Before submitting, run `resources/checklist.md`.
30
+
31
+ ## Serena Memory (CLI Mode)
32
+ See `../_shared/serena-memory-protocol.md`.
33
+
34
+ ## References
35
+ - Execution steps: `resources/execution-protocol.md`
36
+ - Code examples: `resources/examples.md`
37
+ - Code snippets: `resources/snippets.md`
38
+ - Checklist: `resources/checklist.md`
39
+ - Error recovery: `resources/error-playbook.md`
40
+ - Tech stack: `resources/tech-stack.md`
41
+ - Screen template: `resources/screen-template.dart`
42
+ - Context loading: `../_shared/context-loading.md`
43
+ - Reasoning templates: `../_shared/reasoning-templates.md`
44
+ - Clarification: `../_shared/clarification-protocol.md`
45
+ - Context budget: `../_shared/context-budget.md`
46
+ - Lessons learned: `../_shared/lessons-learned.md`
@@ -0,0 +1,35 @@
1
+ # Mobile Agent - Self-Verification Checklist
2
+
3
+ Run through every item before submitting your work.
4
+
5
+ ## Architecture
6
+ - [ ] Clean Architecture layers: domain -> data -> presentation
7
+ - [ ] Entities are pure Dart (no framework dependencies)
8
+ - [ ] Repository pattern with interface + implementation
9
+ - [ ] Riverpod/Bloc for state management (no setState in complex widgets)
10
+
11
+ ## Platform
12
+ - [ ] Material Design 3 for Android
13
+ - [ ] iOS Human Interface Guidelines followed
14
+ - [ ] Platform-specific code guarded with `Platform.isIOS`/`Platform.isAndroid`
15
+ - [ ] Tested on both iOS and Android (emulator or device)
16
+ - [ ] Dark mode supported
17
+
18
+ ## Performance
19
+ - [ ] 60fps scrolling (no jank)
20
+ - [ ] Controllers disposed in `dispose()` method
21
+ - [ ] No memory leaks (listeners, subscriptions cleaned up)
22
+ - [ ] Images cached and sized appropriately
23
+ - [ ] Cold start < 2s
24
+
25
+ ## API Integration
26
+ - [ ] Dio with interceptors (auth, error handling)
27
+ - [ ] Loading states shown during API calls
28
+ - [ ] Error states with retry action
29
+ - [ ] Offline handling (graceful degradation or offline-first)
30
+
31
+ ## Testing
32
+ - [ ] Unit tests for domain logic and providers
33
+ - [ ] Widget tests for key screens
34
+ - [ ] Edge cases: empty lists, error states, offline mode
35
+ - [ ] Tests pass on both platforms
@@ -0,0 +1,106 @@
1
+ # Mobile Agent - Error Recovery Playbook
2
+
3
+ When you encounter a failure, find the matching scenario and follow the recovery steps.
4
+ Do NOT stop or ask for help until you have exhausted the playbook.
5
+
6
+ ---
7
+
8
+ ## Dart Analysis Error
9
+
10
+ **Symptoms**: `flutter analyze` errors, type mismatch, null safety issues
11
+
12
+ 1. Read the error — file, line, expected type vs actual
13
+ 2. Null safety issue: add `?` for nullable, `!` only if you're certain it's non-null
14
+ 3. Type mismatch: check the model class — does it match the API response?
15
+ 4. Missing override: add `@override` annotation
16
+ 5. **절대 하지 말 것**: `// ignore:` comments로 분석 경고 무시
17
+
18
+ ---
19
+
20
+ ## Build Failure
21
+
22
+ **Symptoms**: `flutter build` fails, Gradle/Xcode errors
23
+
24
+ 1. **Gradle (Android)**:
25
+ - `Could not resolve`: dependency version conflict → check `pubspec.yaml`
26
+ - `minSdkVersion`: update `android/app/build.gradle` minimum SDK
27
+ 2. **Xcode (iOS)**:
28
+ - `Pod install` failure: note in result — may need `pod repo update`
29
+ - Minimum deployment target: check `ios/Podfile`
30
+ 3. Clean and retry: `flutter clean && flutter pub get`
31
+ 4. If persists: note in result with full error — 환경 문제일 수 있음
32
+
33
+ ---
34
+
35
+ ## Test Failure
36
+
37
+ **Symptoms**: `flutter test` FAILED, widget test assertion errors
38
+
39
+ 1. Read the error — which test, which widget, expected vs actual
40
+ 2. Widget test: check if `pumpAndSettle()` is needed (async operations)
41
+ 3. Provider not found: wrap test widget with `ProviderScope` (Riverpod)
42
+ 4. Mock missing: ensure all dependencies are mocked
43
+ 5. Re-run specific test: `flutter test test/path/to_test.dart`
44
+ 6. **3회 실패 시**: 다른 접근 방식 시도
45
+
46
+ ---
47
+
48
+ ## State Management Issue
49
+
50
+ **Symptoms**: UI not updating, stale state, provider errors
51
+
52
+ 1. **Riverpod**: Check provider type — `StateNotifierProvider` vs `FutureProvider` vs `AsyncNotifierProvider`
53
+ 2. Is the widget watching correctly? (`ref.watch` not `ref.read` for UI)
54
+ 3. Is the state being mutated instead of replaced? (create new state object)
55
+ 4. Add debug print in provider to trace state changes
56
+ 5. Check: is `dispose` being called prematurely?
57
+
58
+ ---
59
+
60
+ ## Platform-Specific Crash
61
+
62
+ **Symptoms**: Works on one platform, crashes on another
63
+
64
+ 1. Check for `Platform.isIOS` / `Platform.isAndroid` guards
65
+ 2. Check permissions: camera, location, storage — different per platform
66
+ 3. Check native plugin compatibility — some plugins don't support both platforms
67
+ 4. If plugin issue: note in result with platform and version info
68
+ 5. Test on emulator for the failing platform
69
+
70
+ ---
71
+
72
+ ## Memory Leak
73
+
74
+ **Symptoms**: App slows down over time, `flutter run` shows increasing memory
75
+
76
+ 1. Check: are all controllers disposed? (`TextEditingController`, `AnimationController`)
77
+ 2. Check: are streams closed? (`StreamSubscription.cancel()`)
78
+ 3. Check: are listeners removed? (`removeListener` in `dispose`)
79
+ 4. Check: are `Timer` / `Timer.periodic` cancelled?
80
+ 5. Use `DevTools` memory tab to identify leak source
81
+
82
+ ---
83
+
84
+ ## API Integration Error
85
+
86
+ **Symptoms**: Dio errors, `DioException`, wrong response parsing
87
+
88
+ 1. **Connection refused**: backend running? correct URL/port?
89
+ 2. **401**: auth interceptor sending token? token expired?
90
+ 3. **Parse error**: `response.data` shape doesn't match model → log raw response
91
+ 4. **Timeout**: increase Dio timeout or check network conditions
92
+ 5. If backend issue: document expected contract in result
93
+
94
+ ---
95
+
96
+ ## Rate Limit / Quota / Memory Fallback
97
+
98
+ 동일: backend-agent 플레이북의 "Rate Limit" 및 "Serena Memory" 섹션 참조.
99
+
100
+ ---
101
+
102
+ ## 일반 원칙
103
+
104
+ - **3회 실패**: 같은 접근 3번 실패하면 반드시 다른 방법 시도
105
+ - **막힘**: 5턴 이상 진전 없으면 현재 상태 저장, `Status: blocked`
106
+ - **범위 초과**: backend/frontend 문제는 result에 기록만
@@ -0,0 +1,79 @@
1
+ # Mobile Agent - Examples
2
+
3
+ ## Example 1: List Screen with CRUD
4
+
5
+ **Input**: "Create a todo list screen with add, toggle, and swipe-to-delete"
6
+
7
+ **Output**:
8
+ ```
9
+ ## Task: Todo List Screen
10
+
11
+ ### Implementation
12
+ - Screens: TodoListScreen, AddTodoSheet (bottom sheet)
13
+ - State: Riverpod with AsyncNotifier for todo list
14
+ - API: Dio with auth interceptor -> /api/todos
15
+
16
+ ### Platform Support
17
+ - [x] iOS (14.0+) - Cupertino swipe actions
18
+ - [x] Android (API 24+) - Material Dismissible
19
+ - [x] Dark mode
20
+
21
+ ### Files Created
22
+ - lib/features/todo/domain/entities/todo.dart
23
+ - lib/features/todo/domain/repositories/todo_repository.dart
24
+ - lib/features/todo/data/models/todo_model.dart
25
+ - lib/features/todo/data/repositories/todo_repository_impl.dart
26
+ - lib/features/todo/presentation/providers/todo_provider.dart
27
+ - lib/features/todo/presentation/screens/todo_list_screen.dart
28
+ - lib/features/todo/presentation/widgets/todo_item.dart
29
+ - test/features/todo/todo_provider_test.dart
30
+ - test/features/todo/todo_list_screen_test.dart
31
+ ```
32
+
33
+ ## Example 2: Authentication Flow
34
+
35
+ **Input**: "Create login and register screens with JWT auth"
36
+
37
+ **Output**:
38
+ ```
39
+ ## Task: Authentication Screens
40
+
41
+ ### Implementation
42
+ - Screens: LoginScreen, RegisterScreen
43
+ - State: Riverpod AuthNotifier (token storage via flutter_secure_storage)
44
+ - Navigation: GoRouter redirect guard for unauthenticated users
45
+ - Validation: Form validation for email + password
46
+
47
+ ### Files Created
48
+ - lib/core/auth/auth_provider.dart
49
+ - lib/core/auth/auth_interceptor.dart (Dio interceptor)
50
+ - lib/features/auth/presentation/screens/login_screen.dart
51
+ - lib/features/auth/presentation/screens/register_screen.dart
52
+ - lib/features/auth/presentation/widgets/auth_form.dart
53
+ - test/core/auth/auth_provider_test.dart
54
+ ```
55
+
56
+ ## Example 3: Offline-First Feature
57
+
58
+ **Input**: "Make the notes feature work offline with sync"
59
+
60
+ **Output**:
61
+ ```
62
+ ## Task: Offline Notes with Sync
63
+
64
+ ### Implementation
65
+ - Local DB: Drift (SQLite) for offline storage
66
+ - Sync: Queue-based sync on connectivity change
67
+ - UI: Sync status indicator (synced/pending/error)
68
+
69
+ ### Architecture
70
+ - NoteLocalDataSource (Drift) + NoteRemoteDataSource (Dio)
71
+ - NoteRepository merges local + remote with conflict resolution
72
+ - ConnectivityProvider triggers sync on reconnect
73
+
74
+ ### Files Created
75
+ - lib/features/notes/data/local/note_dao.dart
76
+ - lib/features/notes/data/local/note_database.dart
77
+ - lib/features/notes/data/repositories/note_sync_repository.dart
78
+ - lib/core/sync/sync_queue.dart
79
+ ```
@@ -0,0 +1,49 @@
1
+ # Mobile Agent - Execution Protocol
2
+
3
+ ## Step 0: Prepare
4
+ 1. **Assess difficulty** — see `../_shared/difficulty-guide.md`
5
+ - **Simple**: Skip to Step 3 | **Medium**: All 4 steps | **Complex**: All steps + checkpoints
6
+ 2. **Check lessons** — read your domain section in `../_shared/lessons-learned.md`
7
+ 3. **Clarify requirements** — follow `../_shared/clarification-protocol.md`
8
+ - Check **Uncertainty Triggers**: 비즈니스 로직, 보안/인증, 기존 코드 충돌?
9
+ - Determine level: LOW → proceed | MEDIUM → present options | HIGH → ask immediately
10
+ 4. **Budget context** — follow `../_shared/context-budget.md` (read symbols, not whole files)
11
+
12
+ **⚠️ Intelligent Escalation**: When uncertain, escalate early. Don't blindly proceed.
13
+
14
+ Follow these steps in order (adjust depth by difficulty).
15
+
16
+ ## Step 1: Analyze
17
+ - Read the task requirements carefully
18
+ - Identify which screens, widgets, and providers are needed
19
+ - Check existing code with Serena: `get_symbols_overview("lib/features")`, `find_symbol("ScreenName")`
20
+ - Determine platform-specific requirements (iOS vs Android)
21
+ - List assumptions; ask if unclear
22
+
23
+ ## Step 2: Plan
24
+ - Decide on feature structure using Clean Architecture
25
+ - Define entities (domain) and repository interfaces
26
+ - Plan state management (Riverpod providers)
27
+ - Identify navigation routes (GoRouter)
28
+ - Plan offline-first strategy if required
29
+ - Note platform differences (Material Design 3 vs iOS HIG)
30
+
31
+ ## Step 3: Implement
32
+ - Create/modify files in this order:
33
+ 1. Domain: entities and repository interfaces
34
+ 2. Data: models, API clients (Dio), repository implementations
35
+ 3. Presentation: providers (Riverpod), screens, widgets
36
+ 4. Navigation: GoRouter routes
37
+ 5. Tests: unit + widget tests
38
+ - Use `resources/screen-template.dart` as reference
39
+ - Follow Clean Architecture layers strictly
40
+
41
+ ## Step 4: Verify
42
+ - Run `resources/checklist.md` items
43
+ - Run `../_shared/common-checklist.md` items
44
+ - Test on both iOS and Android (or emulators)
45
+ - Verify 60fps performance (no jank)
46
+ - Check dark mode support
47
+
48
+ ## On Error
49
+ See `resources/error-playbook.md` for recovery steps.