proagents 1.6.9 → 1.6.10

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.
@@ -0,0 +1,813 @@
1
+ # ProAgents Command Details
2
+
3
+ Detailed execution instructions for all `pa:` commands.
4
+
5
+ ---
6
+
7
+ ## CRITICAL: AI Must Execute All Commands
8
+
9
+ **NEVER tell user to do something. AI must DO it.**
10
+
11
+ ### Commands That READ Data - AI Must Run:
12
+
13
+ | Command | AI Runs This |
14
+ |---------|--------------|
15
+ | `pa:history` | `grep -v "^#" .proagents/activity.log \| tail -30` |
16
+ | `pa:progress` | `cat .proagents/active-features/_index.json` |
17
+ | `pa:activity` | `cat .proagents/activity.log \| tail -20` |
18
+ | `pa:status` | `cat .proagents/active-features/_index.json` |
19
+ | `pa:context` | `cat .proagents/context.md` |
20
+ | `pa:decisions` | `cat .proagents/decisions.md` |
21
+ | `pa:errors` | `cat .proagents/errors.md` |
22
+ | `pa:feedback` | `cat .proagents/feedback.md` |
23
+ | `pa:handoff-read` | `cat .proagents/handoff.md` |
24
+ | `pa:config` | `cat proagents.config.yaml` |
25
+ | `pa:lock` | `cat .proagents/.lock 2>/dev/null` |
26
+ | `pa:feature-list` | `cat .proagents/active-features/_index.json` |
27
+ | `pa:todo` | `grep -rn "TODO\|FIXME" src/` |
28
+ | `pa:deps` | `cat package.json \| grep dependencies -A 50` |
29
+ | `pa:deps-outdated` | `npm outdated 2>/dev/null` |
30
+
31
+ ### Commands That RUN Tools - AI Must Execute:
32
+
33
+ | Command | AI Runs This |
34
+ |---------|--------------|
35
+ | `pa:test` | `npm test` (or from config) |
36
+ | `pa:test-unit` | `npm run test:unit` |
37
+ | `pa:test-e2e` | `npm run test:e2e` |
38
+ | `pa:test-mobile` | Install Maestro if missing → Create tests → Run `maestro test` |
39
+ | `pa:lint` | `npm run lint` |
40
+ | `pa:qa` | `npm run lint && npm test` |
41
+ | `pa:coverage` | `npm run test:coverage` |
42
+ | `pa:logs` | `adb logcat -d '*:S' ReactNativeJS:V \| tail -100` |
43
+ | `pa:env-check` | `node -v && npm -v && git --version` |
44
+ | `pa:secrets-scan` | `grep -rn "password\|secret\|api_key" src/` |
45
+ | `pa:db-migrate` | `npm run db:migrate` (or from config) |
46
+
47
+ ### Commands That GENERATE Files - AI Must Create:
48
+
49
+ **AI MUST create actual files, never just show templates or options.**
50
+
51
+ | Command | AI Creates | Location |
52
+ |---------|------------|----------|
53
+ | `pa:doc` | Full documentation | `./docs/*.md` |
54
+ | `pa:doc-api` | API documentation | `./docs/api/*.md` |
55
+ | `pa:doc-module X` | Module documentation | `./docs/modules/X.md` |
56
+ | `pa:doc-file X` | File documentation | `./docs/files/X.md` |
57
+ | `pa:changelog` | Updates changelog | `./CHANGELOG.md` |
58
+ | `pa:release` | Release notes | `./RELEASE_NOTES.md` |
59
+ | `pa:readme` | Updates README | `./README.md` |
60
+ | `pa:handoff` | Handoff notes | `.proagents/handoff.md` |
61
+ | `pa:generate-component` | Component file | Based on project structure |
62
+ | `pa:generate-test` | Test file | Based on project structure |
63
+
64
+ **Example - pa:doc execution:**
65
+ ```bash
66
+ # AI creates directory structure
67
+ mkdir -p docs docs/api docs/modules docs/components
68
+
69
+ # AI analyzes code and creates doc files
70
+ # (AI writes actual content to each file)
71
+
72
+ # AI reports:
73
+ echo "Created: ./docs/README.md"
74
+ echo "Created: ./docs/api/endpoints.md"
75
+ echo "Total: 8 documentation files"
76
+ ```
77
+
78
+ ### Commands That LOG Activity - AI Must Append:
79
+
80
+ After EVERY pa: command, AI runs:
81
+ ```bash
82
+ echo "[$(date '+%Y-%m-%d %H:%M')] [AI_NAME] [COMMAND] Result" >> .proagents/activity.log
83
+ ```
84
+
85
+ ---
86
+
87
+ ## Feature Commands
88
+
89
+ ### pa:feature "name"
90
+
91
+ Start a new feature workflow:
92
+
93
+ 1. Create feature folder: `./.proagents/active-features/feature-[name]/`
94
+ 2. Create `status.json`:
95
+ ```json
96
+ {
97
+ "name": "feature-name",
98
+ "started": "2024-03-06T15:00:00Z",
99
+ "phase": "analysis",
100
+ "progress": 0,
101
+ "branch": "feature/feature-name"
102
+ }
103
+ ```
104
+ 3. Update `_index.json` to add feature to `active_features`
105
+ 4. Create git branch if git enabled
106
+ 5. Start analysis phase
107
+
108
+ ### pa:feature-list
109
+
110
+ **AI reads and displays features:**
111
+
112
+ ```bash
113
+ # AI executes:
114
+ cat .proagents/active-features/_index.json 2>/dev/null
115
+ ls .proagents/active-features/feature-*/status.json 2>/dev/null | while read f; do cat "$f"; done
116
+ ```
117
+
118
+ Then formats:
119
+ ```
120
+ Features
121
+ ════════
122
+ Active (2):
123
+ 🔄 user-auth - implementation (60%)
124
+ 🔍 dashboard - analysis (20%)
125
+
126
+ Paused (1):
127
+ ⏸ notifications - blocked on API
128
+
129
+ Completed (3):
130
+ ✅ login-page, signup-form, forgot-password
131
+ ```
132
+
133
+ ### pa:feature-complete
134
+
135
+ 1. Move feature from `active_features` to `completed_features` in `_index.json`
136
+ 2. Update feature's `status.json` with completion timestamp
137
+ 3. Generate changelog entry
138
+ 4. Suggest PR creation if git enabled
139
+
140
+ ### pa:fix "description"
141
+
142
+ Quick bug fix mode (bypasses full workflow):
143
+
144
+ 1. Analyze the bug description
145
+ 2. Search codebase for relevant code
146
+ 3. Implement fix directly
147
+ 4. Run relevant tests
148
+ 5. Log fix in activity.log
149
+
150
+ ---
151
+
152
+ ## Workflow Phase Commands
153
+
154
+ ### pa:analyze
155
+
156
+ 1. Read `./.proagents/prompts/01-analysis.md`
157
+ 2. Scan project structure
158
+ 3. Identify:
159
+ - Framework/tech stack
160
+ - Code patterns
161
+ - Dependencies
162
+ - Architecture style
163
+ 4. Cache results in `./.proagents/cache/`
164
+ 5. Output analysis summary
165
+
166
+ ### pa:requirements
167
+
168
+ 1. Read `./.proagents/prompts/02-requirements.md`
169
+ 2. If feature specified, focus on that feature
170
+ 3. Document:
171
+ - Functional requirements
172
+ - Non-functional requirements
173
+ - Acceptance criteria
174
+ 4. Save to feature folder
175
+
176
+ ### pa:design
177
+
178
+ 1. Read `./.proagents/prompts/03-ui-design.md`
179
+ 2. Create:
180
+ - UI mockups/wireframes (if applicable)
181
+ - Component structure
182
+ - Architecture decisions
183
+ 3. Document design decisions
184
+
185
+ ### pa:plan
186
+
187
+ 1. Read `./.proagents/prompts/04-planning.md`
188
+ 2. Create implementation plan:
189
+ - Files to create/modify
190
+ - Order of implementation
191
+ - Dependencies between tasks
192
+ - Estimated complexity
193
+ 3. Save plan to feature folder
194
+
195
+ ### pa:implement
196
+
197
+ 1. Read `./.proagents/prompts/05-implementation.md`
198
+ 2. Follow the plan created in planning phase
199
+ 3. Write code following project patterns
200
+ 4. Create/update tests as you go
201
+ 5. Update progress in status.json
202
+
203
+ ### pa:test-mobile
204
+
205
+ **AI sets up and runs mobile E2E tests:**
206
+
207
+ 1. Check if Maestro/Detox installed:
208
+ ```bash
209
+ maestro --version 2>/dev/null || echo "Not installed"
210
+ ```
211
+
212
+ 2. If NOT installed - INSTALL IT:
213
+ ```bash
214
+ curl -Ls "https://get.maestro.mobile.dev" | bash
215
+ ```
216
+
217
+ 3. If no test flows exist - CREATE THEM:
218
+ ```bash
219
+ mkdir -p .maestro
220
+ # AI creates test flows based on the feature being tested
221
+ ```
222
+
223
+ 4. RUN the tests:
224
+ ```bash
225
+ maestro test .maestro/
226
+ ```
227
+
228
+ 5. Report results
229
+
230
+ **WRONG:** "E2E not configured, test manually..."
231
+ **CORRECT:** "Installing Maestro... Creating tests... Running..."
232
+
233
+ ---
234
+
235
+ ### pa:test
236
+
237
+ **AI runs tests and shows results:**
238
+
239
+ ```bash
240
+ # AI executes (check config first):
241
+ npm test 2>&1
242
+ # OR from proagents.config.yaml testing.tools.unit.command
243
+ ```
244
+
245
+ Then reports:
246
+ ```
247
+ Test Results
248
+ ════════════
249
+ ✓ 45 passed
250
+ ✗ 2 failed
251
+ ○ 3 skipped
252
+
253
+ Failed:
254
+ • src/auth/login.test.ts:23 - Expected true, got false
255
+ • src/api/user.test.ts:45 - Timeout after 5000ms
256
+ ```
257
+
258
+ **NEVER say "run npm test" - actually run it!**
259
+
260
+ ### pa:review
261
+
262
+ 1. Read `./.proagents/prompts/06.5-code-review.md`
263
+ 2. Review all changes in current feature
264
+ 3. Check:
265
+ - Code quality
266
+ - Test coverage
267
+ - Security issues
268
+ - Performance concerns
269
+ 4. Generate review report
270
+
271
+ ### pa:doc
272
+
273
+ **AI MUST create actual documentation files, not just show options.**
274
+
275
+ 1. Read `./.proagents/prompts/07-documentation.md`
276
+ 2. Analyze codebase structure
277
+ 3. **CREATE** documentation files:
278
+
279
+ ```bash
280
+ # AI runs:
281
+ mkdir -p docs docs/api docs/modules docs/components
282
+
283
+ # Then AI CREATES these files:
284
+ # - ./docs/README.md (project overview)
285
+ # - ./docs/api/*.md (API documentation)
286
+ # - ./docs/modules/*.md (module docs)
287
+ # - ./docs/components/*.md (component docs)
288
+ ```
289
+
290
+ 4. Sub-commands:
291
+ - `pa:doc-api` → Creates `./docs/api/*.md`
292
+ - `pa:doc-module auth` → Creates `./docs/modules/auth.md`
293
+ - `pa:doc-file src/api.ts` → Creates doc for that file
294
+ - `pa:doc-readme` → Updates `./README.md`
295
+ - `pa:changelog` → Updates `./CHANGELOG.md`
296
+ - `pa:release` → Creates `./RELEASE_NOTES.md`
297
+
298
+ 5. **Output:**
299
+ ```
300
+ Documentation generated:
301
+ ✓ ./docs/README.md
302
+ ✓ ./docs/api/endpoints.md
303
+ ✓ ./docs/modules/auth.md
304
+ ...
305
+ Total: 12 files created
306
+ ```
307
+
308
+ ### pa:deploy
309
+
310
+ 1. Read `./.proagents/prompts/08-deployment.md`
311
+ 2. Run pre-deployment checks
312
+ 3. Create deployment checklist
313
+ 4. Generate release notes if needed
314
+
315
+ ---
316
+
317
+ ## Documentation Commands
318
+
319
+ ### pa:release
320
+
321
+ Generate release notes:
322
+
323
+ 1. Read recent commits/changes
324
+ 2. Categorize changes (features, fixes, breaking)
325
+ 3. Generate formatted release notes
326
+ 4. Save to `./RELEASE_NOTES.md`
327
+
328
+ ### pa:changelog
329
+
330
+ Update changelog:
331
+
332
+ 1. Read changes since last entry
333
+ 2. Format according to Keep a Changelog
334
+ 3. Update `./CHANGELOG.md`
335
+
336
+ ---
337
+
338
+ ## Quality Commands
339
+
340
+ ### pa:qa
341
+
342
+ **AI runs ALL checks and reports:**
343
+
344
+ ```bash
345
+ # AI executes each:
346
+ npm run lint 2>&1
347
+ npm test 2>&1
348
+ npm run test:coverage 2>&1
349
+ npm audit 2>&1
350
+ ```
351
+
352
+ Then reports:
353
+ ```
354
+ QA Report
355
+ ═════════
356
+ Lint: ✓ No issues
357
+ Tests: ✓ 45/45 passed
358
+ Coverage: 82% (target: 80%) ✓
359
+ Security: 0 vulnerabilities ✓
360
+
361
+ Overall: PASSED
362
+ ```
363
+
364
+ **NEVER say "run these commands" - run them!**
365
+
366
+ ### pa:qa-security
367
+
368
+ Security-focused audit:
369
+
370
+ 1. Check for common vulnerabilities (OWASP)
371
+ 2. Scan dependencies for known issues
372
+ 3. Review auth/permissions code
373
+ 4. Generate security report
374
+
375
+ ### pa:lint
376
+
377
+ **AI runs linter and shows results:**
378
+
379
+ ```bash
380
+ # AI executes:
381
+ npm run lint 2>&1
382
+ # If errors, auto-fix:
383
+ npm run lint -- --fix 2>&1
384
+ ```
385
+
386
+ Then reports:
387
+ ```
388
+ Lint Results
389
+ ════════════
390
+ ✓ 120 files checked
391
+ ✗ 3 errors found
392
+ ⚠ 5 warnings
393
+
394
+ Auto-fixed: 2 errors
395
+ Remaining: 1 error in src/utils/helper.ts:45
396
+
397
+ Fixing remaining issue...
398
+ [AI edits the file to fix]
399
+ ```
400
+
401
+ **NEVER say "run npm run lint" - run it!**
402
+
403
+ ---
404
+
405
+ ## Collaboration Commands
406
+
407
+ ### pa:handoff
408
+
409
+ **AI creates handoff file:**
410
+
411
+ ```bash
412
+ # AI creates .proagents/handoff.md with content
413
+ ```
414
+
415
+ ### pa:handoff-read
416
+
417
+ **AI reads and displays handoff:**
418
+
419
+ ```bash
420
+ # AI executes:
421
+ cat .proagents/handoff.md 2>/dev/null || echo "No handoff notes"
422
+ ```
423
+
424
+ Then displays the content to continue where previous AI left off.
425
+
426
+ ### pa:handoff (write)
427
+
428
+ Create handoff notes for other AIs:
429
+
430
+ 1. Summarize current work status
431
+ 2. List completed items
432
+ 3. List in-progress items
433
+ 4. Document blockers
434
+ 5. Save to `./.proagents/handoff.md`
435
+
436
+ ### pa:feedback "description"
437
+
438
+ Log feedback for AI learning:
439
+
440
+ 1. Append to `./.proagents/feedback.md`:
441
+ ```markdown
442
+ ## [DATE] Feedback
443
+ **Type:** correction/preference/pattern
444
+ **Description:** [user's feedback]
445
+ **Action:** [what should be done differently]
446
+ ```
447
+ 2. Apply learning to current work
448
+
449
+ ### pa:decisions
450
+
451
+ **AI reads and displays all decisions:**
452
+
453
+ ```bash
454
+ # AI executes:
455
+ cat .proagents/decisions.md 2>/dev/null || echo "No decisions logged"
456
+ ```
457
+
458
+ ### pa:errors
459
+
460
+ **AI reads and displays error history:**
461
+
462
+ ```bash
463
+ # AI executes:
464
+ cat .proagents/errors.md 2>/dev/null || echo "No errors logged"
465
+ ```
466
+
467
+ ### pa:context
468
+
469
+ **AI reads project context:**
470
+
471
+ ```bash
472
+ # AI executes:
473
+ cat .proagents/context.md 2>/dev/null
474
+ ```
475
+
476
+ This should be read at START of every session!
477
+
478
+ ### pa:feedback
479
+
480
+ **AI reads feedback/corrections:**
481
+
482
+ ```bash
483
+ # AI executes:
484
+ cat .proagents/feedback.md 2>/dev/null || echo "No feedback"
485
+ ```
486
+
487
+ Learn from these to avoid repeating mistakes!
488
+
489
+ ### pa:decision "title"
490
+
491
+ Log architectural decision:
492
+
493
+ 1. Create ADR in `./.proagents/adr/`
494
+ 2. Document:
495
+ - Context
496
+ - Decision
497
+ - Consequences
498
+ 3. Reference in current feature
499
+
500
+ ### pa:activity
501
+
502
+ **AI runs and displays:**
503
+
504
+ ```bash
505
+ # AI executes:
506
+ cat .proagents/activity.log | grep -v "^#" | tail -20
507
+ ```
508
+
509
+ Then formats output:
510
+ ```
511
+ Recent Activity
512
+ ═══════════════
513
+ [2024-03-06 16:00] [Gemini] pa:test - 12 tests passed
514
+ [2024-03-06 15:45] [Claude] pa:implement - Created UserService
515
+ ```
516
+
517
+ ---
518
+
519
+ ## Configuration Commands
520
+
521
+ ### pa:config
522
+
523
+ **AI reads and displays config:**
524
+
525
+ ```bash
526
+ # AI executes:
527
+ cat proagents.config.yaml
528
+ ```
529
+
530
+ Then formats:
531
+ ```
532
+ ProAgents Configuration
533
+ ═══════════════════════
534
+ Project: my-app (nextjs)
535
+
536
+ Platforms: claude, cursor, copilot
537
+
538
+ Testing:
539
+ Framework: vitest
540
+ Coverage: 80%
541
+
542
+ Git:
543
+ Enabled: true
544
+ Branch prefix: feature/
545
+ ```
546
+
547
+ ### pa:checkpoint
548
+
549
+ Pause for user approval:
550
+
551
+ 1. Summarize completed work
552
+ 2. Show next steps
553
+ 3. Wait for user confirmation
554
+ 4. Log checkpoint in activity
555
+
556
+ ### pa:skip-checkpoint
557
+
558
+ Skip the current checkpoint and continue.
559
+
560
+ ---
561
+
562
+ ## History & Progress Commands
563
+
564
+ ### pa:history
565
+
566
+ **AI MUST read the actual activity.log file and display contents.**
567
+
568
+ 1. Run: `cat .proagents/activity.log | tail -30`
569
+ 2. Parse and format entries
570
+ 3. Display most recent first
571
+ 4. NEVER say "no commands yet" without reading the file first
572
+
573
+ **Wrong behavior:**
574
+ ```
575
+ "No commands recorded yet" ← Without reading file!
576
+ ```
577
+
578
+ **Correct behavior:**
579
+ ```
580
+ Reading .proagents/activity.log...
581
+
582
+ Command History
583
+ ═══════════════
584
+ [2024-03-06 16:00] [Gemini] pa:logs - Captured 50 entries
585
+ [2024-03-06 15:30] [Cursor] pa:test - 12 tests passed
586
+ ```
587
+
588
+ ### pa:progress
589
+
590
+ **AI MUST read feature status files and calculate progress.**
591
+
592
+ 1. Run: `cat .proagents/active-features/_index.json`
593
+ 2. Read each feature's status.json
594
+ 3. Calculate progress percentage
595
+ 4. Show visual progress bar
596
+
597
+ ### pa:activity
598
+
599
+ **AI MUST read and display activity.log:**
600
+
601
+ 1. Run: `cat .proagents/activity.log | tail -20`
602
+ 2. Show recent AI activity
603
+ 3. Highlight actions by different AI platforms
604
+
605
+ ---
606
+
607
+ ## Session Commands
608
+
609
+ ### pa:session-end
610
+
611
+ Generate session summary:
612
+
613
+ 1. List all changes made
614
+ 2. List files modified
615
+ 3. List commands executed
616
+ 4. Document any issues
617
+ 5. Save to session history
618
+
619
+ ### pa:lock
620
+
621
+ **AI reads and displays lock status:**
622
+
623
+ ```bash
624
+ # AI executes:
625
+ cat .proagents/.lock 2>/dev/null || echo "No lock file"
626
+ ```
627
+
628
+ Then reports:
629
+ ```
630
+ Lock Status
631
+ ═══════════
632
+ Locked by: Claude (opus-4)
633
+ Task: pa:feature user-auth
634
+ Started: 2024-03-06 15:00
635
+ Expires: 2024-03-06 17:00
636
+
637
+ Or if no lock:
638
+ No active lock. Safe to proceed.
639
+ ```
640
+
641
+ ### pa:lock-release
642
+
643
+ Release lock if you hold it:
644
+
645
+ 1. Verify you hold the lock
646
+ 2. Delete `./.proagents/.lock`
647
+ 3. Log release in activity
648
+
649
+ ---
650
+
651
+ ## Debug & Log Commands
652
+
653
+ **CRITICAL: AI must RUN log commands itself, never tell user to "check the logs".**
654
+
655
+ ### pa:debug
656
+
657
+ Start a debug session:
658
+
659
+ 1. Detect project platform (Web, React Native, Android, iOS)
660
+ 2. Identify the issue from user description
661
+ 3. **RUN log capture commands:**
662
+ - React Native: `adb logcat -d *:S ReactNativeJS:V | tail -200`
663
+ - Android: `adb logcat -d -s AppTag:D | tail -200`
664
+ - iOS: `xcrun simctl spawn booted log show --last 5m`
665
+ 4. **ANALYZE** the captured output
666
+ 5. **REPORT** findings and implement fix
667
+
668
+ ### pa:debug-add
669
+
670
+ Add debug logs throughout code:
671
+
672
+ 1. Detect platform (Web/RN/Android/iOS)
673
+ 2. Analyze code structure
674
+ 3. Add appropriate logging:
675
+ - Function entry/exit with params
676
+ - Variable state changes
677
+ - API calls and responses
678
+ - Error conditions
679
+ 4. Mark all logs with `// DEBUG:START` and `// DEBUG:END`
680
+ 5. Use platform-appropriate syntax:
681
+ - JS/TS: `console.log('[DEBUG]', ...)`
682
+ - Android: `Log.d("DEBUG", ...)`
683
+ - iOS: `print("[DEBUG]", ...)`
684
+
685
+ ### pa:debug-trace "function"
686
+
687
+ Add detailed tracing to specific function:
688
+
689
+ 1. Find function in codebase
690
+ 2. Add entry log with all parameters
691
+ 3. Add timing measurement
692
+ 4. Add exit log with return value
693
+ 5. Wrap in try-catch with error logging
694
+
695
+ ### pa:debug-var "variable"
696
+
697
+ Track all changes to a variable:
698
+
699
+ 1. Find variable declaration
700
+ 2. Add change tracking (willSet/didSet, proxy, setter)
701
+ 3. Log old value → new value
702
+ 4. Include stack trace for debugging
703
+
704
+ ### pa:debug-api
705
+
706
+ Add API request/response logging:
707
+
708
+ 1. Find all API/fetch calls
709
+ 2. Add request logging (method, url, body)
710
+ 3. Add response logging (status, data, timing)
711
+ 4. Add error logging with full details
712
+
713
+ ### pa:debug-state
714
+
715
+ Add state change logging:
716
+
717
+ 1. Find state management code
718
+ 2. Add logging for state changes:
719
+ - React: useState, useReducer, Redux, Zustand
720
+ - Android: ViewModel, LiveData, StateFlow
721
+ - iOS: @State, @Published, ObservableObject
722
+ 3. Log before/after values
723
+
724
+ ### pa:debug-error
725
+
726
+ Add comprehensive error logging:
727
+
728
+ 1. Wrap risky code in try-catch
729
+ 2. Add error boundaries (React)
730
+ 3. Log error message, stack, context
731
+ 4. Add breadcrumb trail
732
+
733
+ ### pa:debug-web
734
+
735
+ Web/browser debugging:
736
+
737
+ 1. Check browser console for errors
738
+ 2. Inspect network requests
739
+ 3. Review console.log statements
740
+ 4. Check for debugger statements
741
+ 5. Analyze stack traces
742
+
743
+ ### pa:debug-rn
744
+
745
+ React Native debugging:
746
+
747
+ 1. Check Metro bundler logs
748
+ 2. Use Flipper or Reactotron
749
+ 3. View device logs via ADB (Android) or Console.app (iOS)
750
+ 4. Check `__DEV__` conditional logs
751
+ 5. Analyze red screen errors
752
+
753
+ ### pa:debug-android
754
+
755
+ Android native debugging:
756
+
757
+ 1. Run `adb logcat` with appropriate filters
758
+ 2. Filter by tag: `adb logcat -s MyApp:D`
759
+ 3. Filter by priority: `adb logcat *:E` (errors only)
760
+ 4. Check for crashes in Logcat
761
+ 5. Use Android Studio Logcat panel
762
+
763
+ ### pa:debug-ios
764
+
765
+ iOS native debugging:
766
+
767
+ 1. Use Xcode console (Cmd+Shift+C)
768
+ 2. Check Console.app with device selected
769
+ 3. Filter by subsystem/category with os_log
770
+ 4. Run `xcrun simctl spawn booted log stream`
771
+ 5. Check crash logs in Organizer
772
+
773
+ ### pa:logs
774
+
775
+ **AI runs log commands and shows output:**
776
+
777
+ 1. Detect platform
778
+ 2. Run appropriate command:
779
+ - RN: `adb logcat -d *:S ReactNativeJS:V | tail -100`
780
+ - Android: `adb logcat -d | tail -100`
781
+ - iOS: `xcrun simctl spawn booted log show --last 2m`
782
+ 3. Parse and display results
783
+ 4. Highlight errors and warnings
784
+
785
+ ### pa:logs-filter "term"
786
+
787
+ **AI runs filtered log command:**
788
+
789
+ 1. Run: `adb logcat -d | grep -i "term"` (or platform equivalent)
790
+ 2. Parse output
791
+ 3. Show matching entries with context
792
+ 4. Analyze patterns in matches
793
+
794
+ ### pa:logs-clear
795
+
796
+ Clear debug logs:
797
+
798
+ - Web: Clear browser console
799
+ - React Native: Restart Metro bundler
800
+ - Android: `adb logcat -c`
801
+ - iOS: Clear in Console.app
802
+
803
+ ### pa:debug-clean
804
+
805
+ Remove debug statements before production:
806
+
807
+ 1. Find all debug statements:
808
+ - `console.log`, `console.debug`, `debugger` (JS)
809
+ - `Log.d`, `Log.v`, `System.out` (Android)
810
+ - `print`, `debugPrint`, `NSLog` (iOS)
811
+ 2. List found statements with file:line
812
+ 3. Offer to remove or comment out
813
+ 4. Verify no production-breaking changes