proagents 1.6.11 → 1.6.13

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.
@@ -4,6 +4,28 @@ Detailed execution instructions for all `pa:` commands.
4
4
 
5
5
  ---
6
6
 
7
+ ## ⚠️ MANDATORY: Auto-Sync on EVERY pa: Command
8
+
9
+ **BEFORE executing ANY `pa:` command, AI MUST run these steps FIRST:**
10
+
11
+ ```bash
12
+ cat .proagents/worklog/_context.md # Current state
13
+ cat .proagents/changelog/_recent.md # Recent changes
14
+ tail -10 .proagents/activity.log # Recent activity
15
+ ```
16
+
17
+ **AFTER executing ANY `pa:` command that changes files, AI MUST:**
18
+
19
+ ```bash
20
+ # 1. Prepend to .proagents/changelog/_recent.md
21
+ # 2. Update .proagents/worklog/_context.md
22
+ # 3. Log to .proagents/activity.log
23
+ ```
24
+
25
+ **This applies to ALL commands: pa:fix, pa:feature, pa:test, pa:doc, etc.**
26
+
27
+ ---
28
+
7
29
  ## CRITICAL: AI Must Execute All Commands
8
30
 
9
31
  **NEVER tell user to do something. AI must DO it.**
@@ -12,6 +34,7 @@ Detailed execution instructions for all `pa:` commands.
12
34
 
13
35
  | Command | AI Runs This |
14
36
  |---------|--------------|
37
+ | `pa:help` | Display comprehensive help with examples and categories |
15
38
  | `pa:history` | `grep -v "^#" .proagents/activity.log \| tail -30` |
16
39
  | `pa:progress` | `cat .proagents/active-features/_index.json` |
17
40
  | `pa:activity` | `cat .proagents/activity.log \| tail -20` |
@@ -84,6 +107,72 @@ echo "[$(date '+%Y-%m-%d %H:%M')] [AI_NAME] [COMMAND] Result" >> .proagents/acti
84
107
 
85
108
  ---
86
109
 
110
+ ## Help Command
111
+
112
+ ### pa:help
113
+
114
+ **Show comprehensive help with examples and categories.**
115
+
116
+ **Command variations:**
117
+ ```
118
+ pa:help # Full help with examples
119
+ pa:help <command> # Detailed help for specific command
120
+ pa:help --quick # Quick reference only
121
+ ```
122
+
123
+ **Output format:**
124
+ ```
125
+ ProAgents Help
126
+ ══════════════════════════════════════════════════════════
127
+
128
+ 🚀 Quick Start Examples
129
+ ───────────────────────
130
+ pa:feature "user authentication" Start a new feature
131
+ pa:fix "login button not working" Quick bug fix
132
+ pa:status Check current progress
133
+ pa:resume Continue where you left off
134
+
135
+ 📋 Common Workflows
136
+ ───────────────────
137
+ Feature: pa:feature → pa:analyze → pa:design → pa:implement → pa:test
138
+ Bug Fix: pa:fix "description" → auto-fix → auto-test → done
139
+ Resume: pa:sync → pa:resume → continue working
140
+
141
+ 📂 Commands by Category
142
+ ───────────────────────
143
+ Core: pa:feature, pa:fix, pa:status, pa:help
144
+ Workflow: pa:analyze, pa:design, pa:implement, pa:test, pa:deploy
145
+ Progress: pa:progress, pa:activity, pa:history
146
+ Collab: pa:sync, pa:resume, pa:handoff
147
+
148
+ 💡 Tips
149
+ ───────
150
+ • Aliases: pa:f (feature), pa:s (status), pa:h (help)
151
+ • AI auto-syncs - no manual sync needed
152
+ • Changes auto-logged to changelog
153
+
154
+ Type "pa:help <command>" for specific command help.
155
+ ```
156
+
157
+ **For specific command (pa:help feature):**
158
+ ```
159
+ pa:feature - Start New Feature
160
+ ══════════════════════════════════════════════════════════
161
+
162
+ Usage:
163
+ pa:feature "feature name"
164
+
165
+ What it does:
166
+ 1. Creates feature folder
167
+ 2. Analyzes codebase
168
+ 3. Guides through workflow phases
169
+ 4. Tracks progress
170
+
171
+ Related: pa:feature-list, pa:feature-complete, pa:status
172
+ ```
173
+
174
+ ---
175
+
87
176
  ## Feature Commands
88
177
 
89
178
  ### pa:feature "name"
@@ -139,13 +228,80 @@ Completed (3):
139
228
 
140
229
  ### pa:fix "description"
141
230
 
231
+ **Fix bugs with before/after diff and affected tests.**
232
+
142
233
  Quick bug fix mode (bypasses full workflow):
143
234
 
235
+ **STEP 1: Auto-Sync (MANDATORY FIRST)**
236
+ ```bash
237
+ cat .proagents/worklog/_context.md # Current state
238
+ cat .proagents/changelog/_recent.md # Recent changes
239
+ tail -10 .proagents/activity.log # Recent activity
240
+ ```
241
+
242
+ **STEP 2: Fix the bug**
144
243
  1. Analyze the bug description
145
244
  2. Search codebase for relevant code
146
245
  3. Implement fix directly
147
246
  4. Run relevant tests
148
- 5. Log fix in activity.log
247
+
248
+ **STEP 3: Auto-Log (MANDATORY AFTER)**
249
+ ```bash
250
+ # Prepend to _recent.md
251
+ # Update _context.md
252
+ # Log to activity.log
253
+ ```
254
+
255
+ **Example: pa:fix "login button not working"**
256
+ ```
257
+ 1. READ _context.md, _recent.md, activity.log ← SYNC FIRST
258
+ 2. Search for login-related code ← ANALYZE
259
+ 3. Find and fix the bug ← FIX
260
+ 4. Run tests ← VERIFY
261
+ 5. Prepend fix to _recent.md ← LOG CHANGE
262
+ 6. Update _context.md Quick Summary ← UPDATE CONTEXT
263
+ 7. Append to activity.log ← LOG ACTIVITY
264
+ ```
265
+
266
+ **Output format (bug fix summary):**
267
+ ```
268
+ Bug Fix Summary
269
+ ═══════════════════════════════════════════════════════════
270
+
271
+ 🐛 Issue: Login validation not checking email format
272
+
273
+ 📁 File: src/auth/login.ts
274
+
275
+ 📝 Changes
276
+ ──────────
277
+ Line 45:
278
+ Before: if (email) {
279
+ After: if (email && email.includes('@')) {
280
+
281
+ Line 52:
282
+ Before: return { success: true }
283
+ After: return { success: true, validated: true }
284
+
285
+ Diff: +3 lines, -1 line
286
+
287
+ 🧪 Affected Tests
288
+ ─────────────────
289
+ → auth.test.ts (3 tests affected)
290
+ → validation.test.ts (2 tests affected)
291
+
292
+ Running affected tests...
293
+ ✓ auth.test.ts 5/5 passed
294
+ ✓ validation.test.ts 4/4 passed
295
+
296
+ 📋 Related
297
+ ──────────
298
+ Issue: #123 (if detected from description)
299
+
300
+ ═══════════════════════════════════════════════════════════
301
+ ✅ Fix applied and verified!
302
+
303
+ Next: pa:test (full suite) or pa:commit
304
+ ```
149
305
 
150
306
  ---
151
307
 
@@ -234,7 +390,18 @@ Quick bug fix mode (bypasses full workflow):
234
390
 
235
391
  ### pa:test
236
392
 
237
- **AI runs tests and shows results:**
393
+ **Run tests with enhanced coverage visualization.**
394
+
395
+ **Command variations:**
396
+ ```
397
+ pa:test # Run all tests with coverage
398
+ pa:test-unit # Unit tests only
399
+ pa:test-e2e # E2E tests only
400
+ pa:test-watch # Watch mode
401
+ pa:test "file" # Test specific file
402
+ ```
403
+
404
+ **AI runs tests and shows enhanced results:**
238
405
 
239
406
  ```bash
240
407
  # AI executes (check config first):
@@ -242,31 +409,115 @@ npm test 2>&1
242
409
  # OR from proagents.config.yaml testing.tools.unit.command
243
410
  ```
244
411
 
245
- Then reports:
412
+ **Output format (enhanced):**
246
413
  ```
247
414
  Test Results
248
- ════════════
249
- ✓ 45 passed
250
- 2 failed
251
- ○ 3 skipped
415
+ ═══════════════════════════════════════════════════════════
416
+
417
+ Summary: 45 passed | 2 failed | 3 skipped 2.3s
418
+
419
+ Coverage
420
+ ────────
421
+ Overall: ████████████████░░░░ 78% (target: 80%)
422
+
423
+ By Module:
424
+ src/auth/ ████████████████████ 95% ✓
425
+ src/api/ ████████████████░░░░ 80% ✓
426
+ src/services/ ██████████████░░░░░░ 72% ⚠️
427
+ src/utils/ ██████████░░░░░░░░░░ 52% ✗ below target
428
+
429
+ Failing Tests
430
+ ─────────────
431
+ ✗ auth.test.ts:45
432
+ └─ login validation: expected true, got false
252
433
 
253
- Failed:
254
- src/auth/login.test.ts:23 - Expected true, got false
255
- • src/api/user.test.ts:45 - Timeout after 5000ms
434
+ ✗ api.test.ts:102
435
+ └─ user endpoint: timeout after 5000ms
436
+
437
+ Slow Tests (>1s)
438
+ ────────────────
439
+ ⚠️ e2e/checkout.test.ts 3.2s
440
+ ⚠️ integration/api.test.ts 1.8s
441
+
442
+ ═══════════════════════════════════════════════════════════
443
+ Next: Fix failing tests or run "pa:test --update-snapshots"
444
+ ```
445
+
446
+ **If all tests pass:**
447
+ ```
448
+ Test Results
449
+ ═══════════════════════════════════════════════════════════
450
+
451
+ ✅ All 47 tests passed! 1.8s
452
+
453
+ Coverage: ████████████████░░░░ 82% (target: 80%) ✓
454
+
455
+ ═══════════════════════════════════════════════════════════
456
+ Ready for: pa:review or pa:deploy
256
457
  ```
257
458
 
258
459
  **NEVER say "run npm test" - actually run it!**
259
460
 
260
461
  ### pa:review
261
462
 
463
+ **Show code review checklist for current changes.**
464
+
465
+ **Command variations:**
466
+ ```
467
+ pa:review # Review current changes
468
+ pa:review --staged # Review staged files only
469
+ pa:review --pr # PR review mode
470
+ ```
471
+
472
+ **Steps:**
262
473
  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
474
+ 2. Get list of changed files (git diff)
475
+ 3. Analyze code for common issues
476
+ 4. Display interactive checklist
477
+
478
+ **Output format (review checklist):**
479
+ ```
480
+ Code Review Checklist
481
+ ═══════════════════════════════════════════════════════════
482
+
483
+ Files Changed: 8 (+342, -89)
484
+ ──────────────────────────────
485
+
486
+ 📋 Code Quality
487
+ ───────────────
488
+ ✓ No console.log statements cleaned
489
+ ✓ No debugger statements cleaned
490
+ ✓ No commented-out code cleaned
491
+ ✓ No TODO without issue number checked
492
+ ⚠️ Complex function detected see below
493
+
494
+ 🔒 Security
495
+ ───────────
496
+ ✓ No hardcoded credentials scanned
497
+ ✓ Input validation present checked
498
+ ✓ No SQL injection risks analyzed
499
+ ○ Auth checks on new endpoints needs review
500
+
501
+ 🧪 Testing
502
+ ──────────
503
+ ✓ Tests added for new functions 4 new tests
504
+ ⚠️ Test coverage decreased -3% (78% → 75%)
505
+ ○ Edge cases covered needs review
506
+
507
+ 📝 Documentation
508
+ ────────────────
509
+ ✓ JSDoc on public functions present
510
+ ○ README update needed new feature
511
+ ○ API docs update needed new endpoint
512
+
513
+ ⚠️ Attention Required
514
+ ─────────────────────
515
+ src/services/payment.ts:45
516
+ └─ Cyclomatic complexity: 18 (max: 15)
517
+
518
+ ═══════════════════════════════════════════════════════════
519
+ Status: 12/16 checks passed | 2 warnings | 2 need review
520
+ ```
270
521
 
271
522
  ### pa:doc
272
523
 
@@ -307,10 +558,109 @@ Total: 12 files created
307
558
 
308
559
  ### pa:deploy
309
560
 
561
+ **Show interactive deployment checklist with real-time status.**
562
+
563
+ **Command variations:**
564
+ ```
565
+ pa:deploy # Full deployment workflow
566
+ pa:deploy-check # Pre-deployment checklist only
567
+ pa:deploy-staging # Deploy to staging
568
+ pa:deploy-prod # Deploy to production
569
+ ```
570
+
571
+ **Steps:**
310
572
  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
573
+ 2. Run pre-deployment checks (tests, lint, build)
574
+ 3. Display interactive checklist with real-time status
575
+ 4. Guide through deployment steps
576
+ 5. Show post-deployment verification
577
+
578
+ **Output format (enhanced checklist):**
579
+ ```
580
+ Deployment Checklist
581
+ ═══════════════════════════════════════════════════════════
582
+
583
+ 📋 Pre-Deployment
584
+ ─────────────────
585
+ ✓ All tests passing 12/12 tests
586
+ ✓ No linting errors 0 errors
587
+ ✓ Build successful 2.3s
588
+ ✓ No console.log statements cleaned
589
+ ○ Version bumped pending
590
+ ○ Changelog updated pending
591
+
592
+ 🔒 Security
593
+ ───────────
594
+ ✓ No hardcoded secrets scanned
595
+ ✓ Dependencies audited 0 vulnerabilities
596
+ ○ Security review approved awaiting
597
+
598
+ 📦 Build & Assets
599
+ ─────────────────
600
+ ✓ Bundle size acceptable 245kb (limit: 300kb)
601
+ ✓ Assets optimized images compressed
602
+ ○ Source maps generated pending
603
+
604
+ 📝 Documentation
605
+ ────────────────
606
+ ✓ README updated current
607
+ ○ API docs updated pending
608
+ ○ Release notes prepared pending
609
+
610
+ 🚀 Ready to Deploy?
611
+ ───────────────────
612
+ Status: 8/14 checks passed
613
+
614
+ Blockers:
615
+ ⚠️ Version not bumped - run: npm version patch
616
+ ⚠️ Changelog needs update - run: pa:changelog
617
+ ⚠️ Security review pending
618
+
619
+ Run "pa:deploy --fix" to auto-fix resolvable issues.
620
+ ```
621
+
622
+ **During deployment:**
623
+ ```
624
+ Deploying to Staging
625
+ ═══════════════════════════════════════════════════════════
626
+
627
+ [1/5] Building application... ✓ Complete (2.3s)
628
+ [2/5] Running migrations... ✓ Complete (0.5s)
629
+ [3/5] Deploying to staging... ● In progress...
630
+ [4/5] Running smoke tests... ○ Pending
631
+ [5/5] Verifying health checks... ○ Pending
632
+
633
+ Progress: ██████████░░░░░░░░░░ 50%
634
+ ```
635
+
636
+ **Post-deployment verification:**
637
+ ```
638
+ Post-Deployment Verification
639
+ ═══════════════════════════════════════════════════════════
640
+
641
+ 🏥 Health Checks
642
+ ────────────────
643
+ ✓ API responding 200 OK (45ms)
644
+ ✓ Database connected healthy
645
+ ✓ Cache working redis OK
646
+ ✓ External services all reachable
647
+
648
+ 📊 Metrics (last 5 min)
649
+ ───────────────────────
650
+ Error rate: 0.1% (baseline: 0.2%) ✓ OK
651
+ Response time: 120ms (baseline: 150ms) ✓ OK
652
+ Requests/sec: 450 (baseline: 400) ✓ OK
653
+
654
+ ══════════════════════════════════════════════════════════
655
+ ✅ Deployment Successful!
656
+ ```
657
+
658
+ **Legend:**
659
+ - `✓` = Check passed
660
+ - `●` = In progress
661
+ - `○` = Pending
662
+ - `✗` = Failed
663
+ - `⚠️` = Warning/Blocker
314
664
 
315
665
  ---
316
666
 
@@ -374,36 +724,66 @@ cat .proagents/changelog/modules/[name].md
374
724
 
375
725
  **Run FIRST when starting work on any AI platform.**
376
726
 
377
- AI reads context files to understand current state:
727
+ AI reads context files and shows visual diff of what changed:
378
728
 
379
729
  ```bash
380
730
  # AI executes:
381
731
  cat .proagents/worklog/_context.md
382
732
  cat .proagents/changelog/_recent.md
383
- ls -t .proagents/worklog/*.md | head -3 | xargs cat
733
+ tail -30 .proagents/activity.log
384
734
  cat .proagents/active-features/_index.json
385
- tail -20 .proagents/activity.log
735
+ git log --oneline -5 2>/dev/null
736
+ git diff --stat HEAD~3 2>/dev/null
386
737
  ```
387
738
 
388
- Then reports:
739
+ **Enhanced output with visual diff:**
389
740
  ```
390
- Project Context Loaded!
391
-
392
- Active Work:
393
- - Feature: user-auth (70% complete)
394
- - Last: JWT validation added by Claude
395
-
396
- Recent Changes:
397
- 1. Added login validation (Claude, Mar 11)
398
- 2. Fixed API endpoint (Gemini, Mar 10)
399
-
400
- Pending:
401
- - [ ] Complete email verification
402
- - [ ] Add unit tests
741
+ Project Context Loaded
742
+ ══════════════════════════════════════════════════════════
743
+
744
+ 📊 Changes Since Your Last Session
745
+ ───────────────────────────────────
746
+ ├─ 5 files modified by Cursor (2h ago)
747
+ │ └─ src/auth/auth.service.ts (+45, -12)
748
+ │ └─ src/auth/auth.controller.ts (+23, -5)
749
+ │ └─ src/auth/auth.module.ts (+8, -2)
750
+ │ └─ src/users/user.service.ts (+15, -3)
751
+ │ └─ tests/auth.spec.ts (+30, -0)
752
+
753
+ ├─ 2 new commits
754
+ │ └─ "Add JWT validation" (Cursor)
755
+ │ └─ "Fix login endpoint" (Cursor)
756
+
757
+ └─ 1 feature updated: user-auth (60% → 75%)
758
+
759
+ 🎯 Current State
760
+ ────────────────
761
+ Feature: user-auth (75% complete)
762
+ Phase: Implementation (4/6)
763
+ Branch: feature/user-auth
764
+
765
+ 📝 Last Actions (by other AIs)
766
+ ──────────────────────────────
767
+ [14:30] [Cursor] 🔨 pa:implement - Added JWT validation
768
+ [14:00] [Cursor] 🐛 pa:fix - Fixed login endpoint
769
+ [12:00] [Claude] 🎨 pa:design - Created auth flow diagram
770
+
771
+ ⏭️ Next Steps
772
+ ─────────────
773
+ → Complete email verification
774
+ → Add password reset endpoint
775
+ → Write unit tests
403
776
 
404
777
  Ready to continue. What would you like to work on?
405
778
  ```
406
779
 
780
+ **Key features:**
781
+ - Shows files changed since last session with line counts
782
+ - Shows commits made by other AIs
783
+ - Shows feature progress delta (was → now)
784
+ - Lists recent actions by ALL AI platforms
785
+ - Shows clear next steps
786
+
407
787
  ### pa:session-start
408
788
 
409
789
  Begin a new work session:
@@ -446,42 +826,60 @@ Next AI can continue from: [next steps listed]
446
826
 
447
827
  ### pa:resume
448
828
 
449
- **Quick resume for returning AI - loads context and shows next action.**
829
+ **Quick resume for returning AI - compact context + clear next action.**
450
830
 
451
831
  ```bash
452
832
  # AI executes:
453
833
  cat .proagents/worklog/_context.md
454
- cat .proagents/changelog/_recent.md
455
- ls -t .proagents/worklog/*.md 2>/dev/null | head -2 | tail -1 | xargs cat
834
+ tail -5 .proagents/changelog/_recent.md
456
835
  tail -10 .proagents/activity.log
836
+ cat .proagents/active-features/*/status.json 2>/dev/null | head -20
457
837
  ```
458
838
 
459
- Output:
839
+ **Enhanced compact output:**
460
840
  ```
461
- Resume Context
462
- ══════════════
463
- Last Session: 2024-03-11 by Claude (opus-4)
464
- Duration: 45 min
465
-
466
- What Was Done:
467
- - Added JWT validation
468
- - Fixed login bug
469
- - Updated API docs
470
-
471
- Pending Tasks:
472
- 1. [ ] Complete email verification
473
- 2. [ ] Add unit tests for auth
474
-
475
- Files Recently Modified:
476
- - src/auth/login.ts (2 hours ago)
477
- - src/auth/validate.ts (2 hours ago)
478
-
479
- Suggested Next Action:
480
- → Continue with "Complete email verification"
481
-
482
- Ready to proceed?
841
+ Quick Resume
842
+ ══════════════════════════════════════════════════════════
843
+
844
+ 🕐 Last Session
845
+ ───────────────
846
+ AI: Claude (opus-4) When: 2 hours ago
847
+ Duration: 45 min Actions: 8
848
+
849
+ 📋 What Was Done
850
+ ────────────────
851
+ Added JWT token validation
852
+ Fixed login endpoint bug
853
+ Updated API documentation
854
+ └─ 5 files changed (+120, -23)
855
+
856
+ 🎯 Current Feature
857
+ ──────────────────
858
+ user-auth ████████████████░░░░ 75%
859
+ Phase: Implementation → Testing next
860
+
861
+ ⚡ Next Action
862
+ ──────────────
863
+ → Complete email verification
864
+ File: src/auth/email.service.ts
865
+ Est: ~30 min
866
+
867
+ 📁 Hot Files (recently modified)
868
+ ────────────────────────────────
869
+ src/auth/auth.service.ts 2h ago (Claude)
870
+ src/auth/auth.controller.ts 2h ago (Claude)
871
+ tests/auth.spec.ts 2h ago (Claude)
872
+
873
+ Ready to continue?
483
874
  ```
484
875
 
876
+ **Key features:**
877
+ - Shows last session info (AI, time, duration)
878
+ - Compact summary of what was done
879
+ - Current feature with visual progress
880
+ - Single clear next action with file and estimate
881
+ - Hot files that were recently modified
882
+
485
883
  ### pa:conflict-check
486
884
 
487
885
  **Check if files you're about to modify were changed by another AI.**
@@ -641,7 +1039,17 @@ Example auto-generated entry:
641
1039
 
642
1040
  ### pa:qa
643
1041
 
644
- **AI runs ALL checks and reports:**
1042
+ **Show quality dashboard with all metrics.**
1043
+
1044
+ **Command variations:**
1045
+ ```
1046
+ pa:qa # Full quality dashboard
1047
+ pa:qa-security # Security audit only
1048
+ pa:qa-performance # Performance check only
1049
+ pa:qa-lint # Lint check only
1050
+ ```
1051
+
1052
+ **AI runs ALL checks:**
645
1053
 
646
1054
  ```bash
647
1055
  # AI executes each:
@@ -651,10 +1059,54 @@ npm run test:coverage 2>&1
651
1059
  npm audit 2>&1
652
1060
  ```
653
1061
 
654
- Then reports:
1062
+ **Output format (quality dashboard):**
655
1063
  ```
656
- QA Report
657
- ═════════
1064
+ Code Quality Dashboard
1065
+ ═══════════════════════════════════════════════════════════
1066
+
1067
+ Overall Score: ████████████████░░░░ 85% (Good)
1068
+
1069
+ 🔒 Security
1070
+ ───────────
1071
+ Status: ✓ No vulnerabilities
1072
+ Dependencies: 142 packages scanned
1073
+ Secrets: ✓ No hardcoded secrets found
1074
+ Last audit: 2 hours ago
1075
+
1076
+ 📏 Linting
1077
+ ──────────
1078
+ Errors: 0 ✓
1079
+ Warnings: 3 ⚠️
1080
+ └─ unused variable (2), missing return type (1)
1081
+ Auto-fixable: 2
1082
+
1083
+ 🧪 Test Coverage
1084
+ ────────────────
1085
+ Coverage: ████████████████░░░░ 78%
1086
+ Target: 80%
1087
+ Status: ⚠️ 2% below target
1088
+ Untested: src/utils/helpers.ts, src/api/legacy.ts
1089
+
1090
+ 📦 Bundle Size
1091
+ ──────────────
1092
+ Current: 245kb
1093
+ Limit: 300kb
1094
+ Status: ✓ Within limit
1095
+ Largest: react-dom (42kb), lodash (24kb)
1096
+
1097
+ 📝 Documentation
1098
+ ────────────────
1099
+ Documented: ████████████░░░░░░░░ 60%
1100
+ Missing: 15 functions, 3 components
1101
+ README: ✓ Up to date
1102
+
1103
+ 🔄 Code Complexity
1104
+ ──────────────────
1105
+ Average: 8.2 (Good)
1106
+ High (>15): 2 functions
1107
+
1108
+ ═══════════════════════════════════════════════════════════
1109
+ Issues: 3 warnings | Run "pa:qa --fix" for auto-fixes
658
1110
  Lint: ✓ No issues
659
1111
  Tests: ✓ 45/45 passed
660
1112
  Coverage: 82% (target: 80%) ✓
@@ -801,19 +1253,164 @@ Log architectural decision:
801
1253
 
802
1254
  ### pa:activity
803
1255
 
1256
+ **CRITICAL: Show ALL AI platforms, not just your own!**
1257
+
1258
+ The purpose of this command is cross-AI visibility. Users need to see what Claude, Cursor, ChatGPT, Gemini, and ALL other AIs have done.
1259
+
1260
+ **Command variations:**
1261
+ ```
1262
+ pa:activity # All recent activity (default)
1263
+ pa:activity --today # Today's activity only
1264
+ pa:activity --ai Claude # Filter by AI platform
1265
+ pa:activity --command pa:fix # Filter by command type
1266
+ pa:activity --files # Show files changed per action
1267
+ ```
1268
+
804
1269
  **AI runs and displays:**
805
1270
 
806
1271
  ```bash
807
- # AI executes:
808
- cat .proagents/activity.log | grep -v "^#" | tail -20
1272
+ # AI executes - DO NOT filter by platform:
1273
+ cat .proagents/activity.log | grep -v "^#" | tail -50
809
1274
  ```
810
1275
 
811
- Then formats output:
1276
+ **Action icons:**
1277
+ | Command | Icon |
1278
+ |---------|------|
1279
+ | `pa:feature` | ✨ |
1280
+ | `pa:fix` | 🐛 |
1281
+ | `pa:test` | ✅ |
1282
+ | `pa:doc` | 📝 |
1283
+ | `pa:implement` | 🔨 |
1284
+ | `pa:analyze` | 🔍 |
1285
+ | `pa:design` | 🎨 |
1286
+ | `pa:review` | 👀 |
1287
+ | `pa:deploy` | 🚀 |
1288
+
1289
+ **Output format (enhanced with time grouping and icons):**
812
1290
  ```
813
- Recent Activity
814
- ═══════════════
815
- [2024-03-06 16:00] [Gemini] pa:test - 12 tests passed
816
- [2024-03-06 15:45] [Claude] pa:implement - Created UserService
1291
+ Recent Activity (All AI Platforms)
1292
+ ══════════════════════════════════════════════════════════
1293
+
1294
+ Today (5 actions)
1295
+ ─────────────────
1296
+ [16:00] [Claude] ✨ pa:feature - Started user-auth
1297
+ └─ 2 files: feature.json, status.json
1298
+ [15:30] [Cursor] 🐛 pa:fix - Fixed login validation bug
1299
+ └─ 1 file: auth.service.ts (+12, -3)
1300
+ [15:00] [Gemini] ✅ pa:test - 12 tests passed, 2 failing
1301
+ [14:30] [Claude] 🔨 pa:implement - Created UserService
1302
+ └─ 3 files: user.service.ts, user.controller.ts, user.module.ts
1303
+ [14:00] [ChatGPT] 🔍 pa:analyze - Analyzed auth module
1304
+
1305
+ Yesterday (8 actions)
1306
+ ─────────────────────
1307
+ [18:00] [Claude] 🎨 pa:design - Created component diagram
1308
+ [16:30] [Cursor] 📝 pa:doc - Updated API documentation
1309
+ ...
1310
+
1311
+ ──────────────────────────────────────────────────────────
1312
+ Summary: 13 actions | 4 AIs active | Last 48h
1313
+ Claude: 5 | Cursor: 4 | Gemini: 2 | ChatGPT: 2
1314
+ ```
1315
+
1316
+ **IMPORTANT:**
1317
+ - Show activity from ALL AI platforms in the log
1318
+ - Do NOT filter to only show your own platform's activity
1319
+ - Group entries by time period (Today, Yesterday, Earlier)
1320
+ - Add action icons based on command type
1321
+ - Show files changed when available (read from changelog)
1322
+ - Show summary of actions per platform
1323
+
1324
+ ---
1325
+
1326
+ ### pa:standup
1327
+
1328
+ **Generate daily standup summary automatically.**
1329
+
1330
+ **Command variations:**
1331
+ ```
1332
+ pa:standup # Today's standup
1333
+ pa:standup --yesterday # What was done yesterday
1334
+ pa:standup --week # Weekly summary
1335
+ pa:standup --team # All AI activity (team view)
1336
+ ```
1337
+
1338
+ **Steps:**
1339
+ 1. Read `.proagents/activity.log` for recent activity
1340
+ 2. Read `.proagents/changelog/_recent.md` for changes
1341
+ 3. Read current feature status from `active-features/`
1342
+ 4. Identify blockers from context
1343
+ 5. Generate formatted standup
1344
+
1345
+ **Output format:**
1346
+ ```
1347
+ Daily Standup - March 13, 2026
1348
+ ═══════════════════════════════════════════════════════════
1349
+
1350
+ 👤 Your Session (Claude)
1351
+ ────────────────────────
1352
+
1353
+ ✅ Yesterday / Last Session:
1354
+ • Completed JWT token implementation
1355
+ • Fixed 2 login validation bugs (#123, #124)
1356
+ • Added 8 unit tests for auth module
1357
+ • Updated API documentation
1358
+
1359
+ 📋 Today / Current:
1360
+ • Password reset feature (in progress - 40%)
1361
+ └─ Next: Email template integration
1362
+ • API rate limiting implementation
1363
+ • Review PR #45 (user dashboard)
1364
+
1365
+ 🚧 Blockers:
1366
+ • None currently
1367
+
1368
+ 📊 Stats:
1369
+ Files changed: 12 | Tests: +8 | Coverage: 78% → 82%
1370
+
1371
+ ──────────────────────────────────────────────────────────
1372
+
1373
+ 👥 Team Activity (All AIs) - Last 24h
1374
+ ─────────────────────────────────────
1375
+ Claude: 5 tasks │ auth module, API docs
1376
+ Cursor: 3 tasks │ UI components, styling
1377
+ Gemini: 2 tasks │ database optimization
1378
+
1379
+ ═══════════════════════════════════════════════════════════
1380
+ Active Features: user-auth (80%), dashboard (40%)
1381
+ ```
1382
+
1383
+ **Weekly summary (pa:standup --week):**
1384
+ ```
1385
+ Weekly Summary - Week of March 10, 2026
1386
+ ═══════════════════════════════════════════════════════════
1387
+
1388
+ 📈 Progress
1389
+ ───────────
1390
+ Features completed: 2
1391
+ Features in progress: 3
1392
+ Bugs fixed: 8
1393
+ Tests added: 24
1394
+
1395
+ 📊 By AI Platform
1396
+ ─────────────────
1397
+ Claude ████████████████░░░░ 45% (18 tasks)
1398
+ Cursor ████████████░░░░░░░░ 32% (13 tasks)
1399
+ Gemini ████████░░░░░░░░░░░░ 23% (9 tasks)
1400
+
1401
+ ✅ Completed
1402
+ ────────────
1403
+ • User authentication feature
1404
+ • Dashboard redesign
1405
+ • 8 bug fixes
1406
+
1407
+ 📋 Next Week
1408
+ ────────────
1409
+ • Password reset feature
1410
+ • Payment integration
1411
+
1412
+ ═══════════════════════════════════════════════════════════
1413
+ Total: 40 tasks | 156 files changed | Coverage: 75% → 82%
817
1414
  ```
818
1415
 
819
1416
  ---
@@ -889,20 +1486,90 @@ Command History
889
1486
 
890
1487
  ### pa:progress
891
1488
 
892
- **AI MUST read feature status files and calculate progress.**
1489
+ **AI MUST read feature status files and calculate enhanced progress.**
893
1490
 
1491
+ **Steps:**
894
1492
  1. Run: `cat .proagents/active-features/_index.json`
895
- 2. Read each feature's status.json
896
- 3. Calculate progress percentage
897
- 4. Show visual progress bar
1493
+ 2. Read each feature's `status.json`
1494
+ 3. Run: `cat .proagents/activity.log | tail -50`
1495
+ 4. Calculate progress percentage
1496
+ 5. Show enhanced visual progress bar with:
1497
+ - Task count (completed/total)
1498
+ - Duration (days since started)
1499
+ - Last AI that worked on it
1500
+ - Phase timeline with status indicators
1501
+
1502
+ **Output format:**
1503
+ ```
1504
+ Feature Progress
1505
+ ════════════════════════════════════════════════════════════
1506
+
1507
+ user-auth ████████████████░░░░ 80% (8/10 tasks) 3d Claude
1508
+ └─ Analysis ✓ → Requirements ✓ → Design ✓ → Implementation ✓ → Testing ● → Review ○
1509
+
1510
+ dashboard ████████░░░░░░░░░░░░ 40% (4/10 tasks) 5d Cursor
1511
+ └─ Analysis ✓ → Requirements ✓ → Design ● → Implementation ○ → Testing ○ → Review ○
1512
+
1513
+ ────────────────────────────────────────────────────────────
1514
+ Summary: 2 active | 5 completed | Avg: 4.2 days/feature
1515
+ ```
1516
+
1517
+ **Legend:**
1518
+ - `✓` = Phase completed
1519
+ - `●` = Current phase (in progress)
1520
+ - `○` = Phase not started
1521
+ - `(8/10 tasks)` = Completed/Total tasks
1522
+ - `3d` = Days since feature started
1523
+ - `Claude` = Last AI that worked on feature
898
1524
 
899
1525
  ### pa:activity
900
1526
 
901
- **AI MUST read and display activity.log:**
1527
+ **CRITICAL: Show ALL AI platforms activity, not just your own!**
1528
+
1529
+ 1. Run: `cat .proagents/activity.log | tail -30`
1530
+ 2. Show ALL AI activity (Claude, Cursor, ChatGPT, Gemini, etc.)
1531
+ 3. Do NOT filter to only your platform
1532
+ 4. Show summary with action count per platform
1533
+
1534
+ ### pa:status
1535
+
1536
+ **AI MUST show enhanced project status with real data.**
1537
+
1538
+ **Steps:**
1539
+ 1. Run: `cat .proagents/active-features/_index.json`
1540
+ 2. Read current feature's `status.json`
1541
+ 3. Run: `git status` and `git log --oneline -5`
1542
+ 4. Run: `cat .proagents/activity.log | tail -20`
1543
+ 5. Display enhanced status
1544
+
1545
+ **Output format:**
1546
+ ```
1547
+ Project Status
1548
+ ══════════════════════════════════════════════════════════
1549
+
1550
+ Feature: user-auth Branch: feature/user-auth
1551
+ Phase: Implementation (4/6) Started: 3d ago
1552
+ Progress: ████████████░░░░░░░░ 60% Time: ~4.5h
1553
+
1554
+ Tasks: 3/5 completed
1555
+ ✓ Create auth service
1556
+ ✓ Add login endpoint
1557
+ ✓ Add register endpoint
1558
+ → Implement JWT tokens (in progress)
1559
+ ○ Add password reset
902
1560
 
903
- 1. Run: `cat .proagents/activity.log | tail -20`
904
- 2. Show recent AI activity
905
- 3. Highlight actions by different AI platforms
1561
+ Files: 8 modified (+245, -32) Tests: 12 | 2 ✗ | 80% cov
1562
+ Contributors: Claude (60%), Cursor (40%)
1563
+
1564
+ ──────────────────────────────────────────────────────────
1565
+ Next: Complete JWT token implementation
1566
+ ```
1567
+
1568
+ **Status indicators:**
1569
+ - `✓` = Task completed
1570
+ - `→` = In progress
1571
+ - `○` = Not started
1572
+ - `⚠️ BLOCKED:` = Show if blockers exist
906
1573
 
907
1574
  ---
908
1575
 
@@ -1113,3 +1780,239 @@ Remove debug statements before production:
1113
1780
  2. List found statements with file:line
1114
1781
  3. Offer to remove or comment out
1115
1782
  4. Verify no production-breaking changes
1783
+
1784
+ ---
1785
+
1786
+ ## Undo Commands
1787
+
1788
+ ### pa:undo-last
1789
+
1790
+ **Quick undo of last AI's changes - revert to before last AI session.**
1791
+
1792
+ AI workflow:
1793
+
1794
+ ```bash
1795
+ # 1. Read AI stats to find last AI
1796
+ cat .proagents/worklog/ai-stats.json
1797
+
1798
+ # 2. Find last session log
1799
+ ls -t .proagents/worklog/*.md | head -2 | tail -1
1800
+
1801
+ # 3. Read session to find files changed
1802
+ # Extract "Files Changed" section
1803
+
1804
+ # 4. Check git for those files
1805
+ git log --oneline -5 -- [files]
1806
+
1807
+ # 5. Show user what will be reverted
1808
+ ```
1809
+
1810
+ Output:
1811
+ ```
1812
+ Undo Last AI's Changes
1813
+ ══════════════════════
1814
+ Last AI: Gemini (1.5-pro)
1815
+ Session: 2024-03-11 14:30
1816
+ Duration: 45 min
1817
+
1818
+ Files Modified:
1819
+ - src/auth/login.ts (+23, -5)
1820
+ - src/auth/validate.ts (+15, -2)
1821
+ - tests/auth.test.ts (new file)
1822
+
1823
+ Commits to revert:
1824
+ - abc123: Add login validation
1825
+ - def456: Add auth tests
1826
+
1827
+ Options:
1828
+ 1. Revert all changes (git revert)
1829
+ 2. Revert specific files only
1830
+ 3. View changes first (git diff)
1831
+ 4. Cancel
1832
+
1833
+ Your choice?
1834
+ ```
1835
+
1836
+ After user confirms:
1837
+ ```bash
1838
+ # Revert commits
1839
+ git revert --no-commit abc123 def456
1840
+ git commit -m "Revert: Undo Gemini session 2024-03-11
1841
+
1842
+ Reverted changes from session 2024-03-11-gemini-001.md
1843
+
1844
+ Co-Authored-By: [Current AI]"
1845
+
1846
+ # Update stats
1847
+ # Increment "reverts" counter in ai-stats.json
1848
+ ```
1849
+
1850
+ **Safety checks:**
1851
+ - Never revert if uncommitted changes exist
1852
+ - Warn if files modified by multiple AIs
1853
+ - Always show diff before revert
1854
+ - Update ai-stats.json with revert count
1855
+
1856
+ ### pa:undo-file "path"
1857
+
1858
+ **Undo changes to a specific file.**
1859
+
1860
+ ```bash
1861
+ # Find last commit that modified this file
1862
+ git log --oneline -1 -- [path]
1863
+
1864
+ # Show the change
1865
+ git diff HEAD~1 -- [path]
1866
+
1867
+ # Offer revert options
1868
+ ```
1869
+
1870
+ ### pa:undo-commit "hash"
1871
+
1872
+ **Undo a specific commit.**
1873
+
1874
+ ```bash
1875
+ git revert [hash] --no-commit
1876
+ git commit -m "Revert: [original message]"
1877
+ ```
1878
+
1879
+ ---
1880
+
1881
+ ## Learning Commands
1882
+
1883
+ ### pa:learn "pattern"
1884
+
1885
+ **Teach AI a pattern or preference.**
1886
+
1887
+ When user says `pa:learn "description"`, add to `.proagents/.learning/`:
1888
+
1889
+ ```json
1890
+ // .proagents/.learning/global/patterns.json
1891
+ {
1892
+ "patterns": [
1893
+ {
1894
+ "id": "pattern-001",
1895
+ "description": "[user's description]",
1896
+ "learned_at": "2024-01-15T10:30:00Z",
1897
+ "source": "explicit",
1898
+ "examples": [],
1899
+ "apply_to": "all"
1900
+ }
1901
+ ]
1902
+ }
1903
+ ```
1904
+
1905
+ **Example usage:**
1906
+ ```
1907
+ User: pa:learn "Always use TypeScript strict mode"
1908
+ AI: ✓ Learned: Always use TypeScript strict mode
1909
+ Saved to: .proagents/.learning/global/patterns.json
1910
+ Will apply to: All future code generation
1911
+ ```
1912
+
1913
+ ### pa:forget "pattern"
1914
+
1915
+ **Remove a learned pattern or preference.**
1916
+
1917
+ When user says `pa:forget "pattern"`, search and remove from learning files:
1918
+
1919
+ ```
1920
+ User: pa:forget "TypeScript strict mode"
1921
+ AI: Found matching patterns:
1922
+ 1. [pattern-001] Always use TypeScript strict mode
1923
+
1924
+ Remove this pattern? [Y/n]
1925
+
1926
+ User: Y
1927
+ AI: ✓ Removed pattern: Always use TypeScript strict mode
1928
+ ```
1929
+
1930
+ **Search locations:**
1931
+ - `.proagents/.learning/global/patterns.json`
1932
+ - `.proagents/.learning/global/user-preferences.json`
1933
+ - `.proagents/.learning/projects/*/patterns.json`
1934
+
1935
+ ### pa:learning
1936
+
1937
+ **Show learning report with all learned data.**
1938
+
1939
+ Display comprehensive learning status:
1940
+
1941
+ ```
1942
+ ┌─────────────────────────────────────────────────────────┐
1943
+ │ 🧠 ProAgents Learning Report │
1944
+ ├─────────────────────────────────────────────────────────┤
1945
+ │ Patterns Learned: 12 │
1946
+ │ Corrections Applied: 8 │
1947
+ │ User Preferences: 5 │
1948
+ │ Auto-Apply Rules: 3 │
1949
+ ├─────────────────────────────────────────────────────────┤
1950
+ │ Recent Patterns: │
1951
+ │ • Use Zustand for state management │
1952
+ │ • Prefer functional components │
1953
+ │ • Always add JSDoc to public functions │
1954
+ ├─────────────────────────────────────────────────────────┤
1955
+ │ Active Corrections (auto-applying): │
1956
+ │ • "use axios" → "use fetch" (7 corrections) │
1957
+ │ • "class component" → "functional" (5 corrections) │
1958
+ ├─────────────────────────────────────────────────────────┤
1959
+ │ Preferences: │
1960
+ │ • checkpoints.after_design: always review │
1961
+ │ • output_verbosity: detailed │
1962
+ │ • test_framework: vitest │
1963
+ └─────────────────────────────────────────────────────────┘
1964
+ ```
1965
+
1966
+ **Data sources:**
1967
+ - `.proagents/.learning/global/patterns.json`
1968
+ - `.proagents/.learning/global/user-preferences.json`
1969
+ - `.proagents/.learning/global/corrections.json`
1970
+ - `.proagents/.learning/projects/[hash]/patterns.json`
1971
+
1972
+ ### pa:suggestions
1973
+
1974
+ **Show AI suggestions based on learned patterns.**
1975
+
1976
+ Analyze current context and suggest improvements:
1977
+
1978
+ ```
1979
+ ┌─────────────────────────────────────────────────────────┐
1980
+ │ 💡 AI Suggestions │
1981
+ ├─────────────────────────────────────────────────────────┤
1982
+ │ Based on your patterns: │
1983
+ │ │
1984
+ │ 1. [Code Style] │
1985
+ │ You prefer Zustand. Consider migrating Redux │
1986
+ │ in src/stores/legacy-store.ts │
1987
+ │ │
1988
+ │ 2. [Testing] │
1989
+ │ You use Vitest. Found Jest config in package.json │
1990
+ │ Consider unifying test frameworks │
1991
+ │ │
1992
+ │ 3. [Documentation] │
1993
+ │ 12 public functions missing JSDoc comments │
1994
+ │ Run pa:doc to generate │
1995
+ ├─────────────────────────────────────────────────────────┤
1996
+ │ Based on corrections: │
1997
+ │ │
1998
+ │ • Found 3 instances of axios in new code │
1999
+ │ (You've corrected this to use fetch 7 times) │
2000
+ └─────────────────────────────────────────────────────────┘
2001
+ ```
2002
+
2003
+ ### Learning System Auto-Apply Rules
2004
+
2005
+ The learning system automatically applies corrections after a threshold:
2006
+
2007
+ | Correction Count | Behavior |
2008
+ |-----------------|----------|
2009
+ | 1-2 occurrences | Tracked, AI remembers |
2010
+ | 3-4 occurrences | AI mentions learned preference |
2011
+ | 5+ occurrences | Auto-applied without asking |
2012
+
2013
+ **Example auto-apply:**
2014
+ ```
2015
+ AI working on code...
2016
+ ℹ️ Auto-applying learned preference: "Use fetch instead of axios"
2017
+ (Corrected 7 times previously)
2018
+ ```