proagents 1.6.20 → 1.6.22

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 (136) hide show
  1. package/.claude/settings.local.json +3 -1
  2. package/.proagents/.cursorrules +1 -1
  3. package/.proagents/.windsurfrules +1 -1
  4. package/.proagents/AGENTS.md +1 -1
  5. package/.proagents/AI_INSTRUCTIONS.md +29 -1
  6. package/.proagents/BOLT.md +1 -1
  7. package/.proagents/CLAUDE.md +1 -1
  8. package/.proagents/GEMINI.md +1 -1
  9. package/.proagents/KIRO.md +1 -1
  10. package/.proagents/LOVABLE.md +1 -1
  11. package/.proagents/REPLIT.md +1 -1
  12. package/.proagents/custom-commands.yaml +1 -2
  13. package/.proagents/docs/command-details.md +1 -2
  14. package/.proagents/getting-started/ai-training-setup.md +0 -1
  15. package/.proagents/performance/README.md +59 -0
  16. package/.proagents/performance/bundle-analysis.md +375 -0
  17. package/.proagents/performance/load-testing.md +563 -0
  18. package/.proagents/performance/runtime-metrics.md +489 -0
  19. package/.proagents/performance/web-vitals.md +425 -0
  20. package/.proagents/proagents.config.yaml +55 -1
  21. package/.proagents/prompts/11-session-tracking.md +100 -0
  22. package/.proagents/prompts/13-commit.md +426 -0
  23. package/.proagents/workflow-modes/entry-modes.md +1 -6
  24. package/COMMANDS.md +19 -0
  25. package/lib/commands/init.js +62 -11
  26. package/package.json +1 -1
  27. package/.proagents/api-versioning/README.md +0 -257
  28. package/.proagents/api-versioning/changelog-template.md +0 -225
  29. package/.proagents/api-versioning/deprecation-workflow.md +0 -470
  30. package/.proagents/api-versioning/versioning-strategy.md +0 -291
  31. package/.proagents/automation/README.md +0 -38
  32. package/.proagents/automation/ai-behavior-rules.md +0 -339
  33. package/.proagents/automation/ai-prompt-injection.md +0 -331
  34. package/.proagents/automation/auto-decisions.md +0 -535
  35. package/.proagents/automation/decision-defaults.yaml +0 -317
  36. package/.proagents/cache/README.md +0 -110
  37. package/.proagents/cache/analysis-metadata.json +0 -76
  38. package/.proagents/cache/conventions.json +0 -125
  39. package/.proagents/cache/dependencies.json +0 -85
  40. package/.proagents/cache/features.json +0 -115
  41. package/.proagents/cache/patterns.json +0 -105
  42. package/.proagents/cache/schemas/conventions-schema.json +0 -138
  43. package/.proagents/cache/schemas/dependencies-schema.json +0 -95
  44. package/.proagents/cache/schemas/features-schema.json +0 -104
  45. package/.proagents/cache/schemas/metadata-schema.json +0 -83
  46. package/.proagents/cache/schemas/patterns-schema.json +0 -136
  47. package/.proagents/cache/schemas/structure-schema.json +0 -72
  48. package/.proagents/cache/structure.json +0 -109
  49. package/.proagents/checklists/README.md +0 -261
  50. package/.proagents/checklists/code-quality.md +0 -137
  51. package/.proagents/checklists/code-review.md +0 -148
  52. package/.proagents/checklists/pr-checklist.md +0 -78
  53. package/.proagents/checklists/pre-deployment.md +0 -132
  54. package/.proagents/checklists/pre-implementation.md +0 -80
  55. package/.proagents/checklists/testing.md +0 -120
  56. package/.proagents/checkpoints.json +0 -13
  57. package/.proagents/cicd/README.md +0 -338
  58. package/.proagents/cicd/azure-devops.md +0 -267
  59. package/.proagents/cicd/github-actions.md +0 -375
  60. package/.proagents/cicd/gitlab-ci.md +0 -278
  61. package/.proagents/cicd/jenkins.md +0 -317
  62. package/.proagents/collaboration/README.md +0 -143
  63. package/.proagents/collaboration/roles.md +0 -248
  64. package/.proagents/collaboration/sessions.md +0 -390
  65. package/.proagents/collaboration/sync.md +0 -358
  66. package/.proagents/cost/README.md +0 -48
  67. package/.proagents/cost/cost-template.md +0 -283
  68. package/.proagents/cost/estimation-framework.md +0 -287
  69. package/.proagents/database/README.md +0 -72
  70. package/.proagents/database/examples/001-create-users.sql +0 -129
  71. package/.proagents/database/examples/002-add-preferences.sql +0 -94
  72. package/.proagents/database/examples/003-add-index.sql +0 -105
  73. package/.proagents/database/examples/004-rename-column.sql +0 -122
  74. package/.proagents/database/examples/005-add-foreign-key.sql +0 -142
  75. package/.proagents/database/examples/006-data-migration.sql +0 -196
  76. package/.proagents/database/examples/007-drop-column.sql +0 -163
  77. package/.proagents/database/examples/README.md +0 -89
  78. package/.proagents/database/migration-workflow.md +0 -478
  79. package/.proagents/database/rollback-scripts.md +0 -487
  80. package/.proagents/database/safety-checks.md +0 -447
  81. package/.proagents/git/README.md +0 -68
  82. package/.proagents/git/branch-strategy.md +0 -164
  83. package/.proagents/git/commit-conventions.md +0 -241
  84. package/.proagents/git/pr-workflow.md +0 -286
  85. package/.proagents/git/rollback-procedures.md +0 -416
  86. package/.proagents/ide-integration/README.md +0 -124
  87. package/.proagents/ide-integration/cline-config.md +0 -429
  88. package/.proagents/ide-integration/continue-config.md +0 -380
  89. package/.proagents/ide-integration/cursor-rules.md +0 -280
  90. package/.proagents/ide-integration/github-copilot.md +0 -384
  91. package/.proagents/ide-integration/windsurf-rules.md +0 -314
  92. package/.proagents/integrations/README.md +0 -97
  93. package/.proagents/integrations/pm/README.md +0 -344
  94. package/.proagents/learning/README.md +0 -136
  95. package/.proagents/learning/adaptation.md +0 -305
  96. package/.proagents/learning/data-collection.md +0 -283
  97. package/.proagents/learning/implementation-guide.md +0 -865
  98. package/.proagents/learning/reports.md +0 -306
  99. package/.proagents/mcp/README.md +0 -133
  100. package/.proagents/mcp/context-providers.md +0 -442
  101. package/.proagents/mcp/server-config.md +0 -306
  102. package/.proagents/mcp/tools-definition.md +0 -513
  103. package/.proagents/pm-integration/README.md +0 -151
  104. package/.proagents/pm-integration/asana.md +0 -346
  105. package/.proagents/pm-integration/github-issues.md +0 -308
  106. package/.proagents/pm-integration/gitlab-issues.md +0 -482
  107. package/.proagents/pm-integration/jira.md +0 -364
  108. package/.proagents/pm-integration/linear.md +0 -409
  109. package/.proagents/pm-integration/notion.md +0 -275
  110. package/.proagents/pm-integration/sync-config.md +0 -533
  111. package/.proagents/pm-integration/trello.md +0 -159
  112. package/.proagents/rules/README.md +0 -179
  113. package/.proagents/rules/custom-rules-template.yaml +0 -286
  114. package/.proagents/rules/custom-rules.md +0 -754
  115. package/.proagents/rules/validation-rules-template.yaml +0 -517
  116. package/.proagents/runbooks/README.md +0 -219
  117. package/.proagents/runbooks/dependency-vulnerability.md +0 -505
  118. package/.proagents/runbooks/incident-response.md +0 -451
  119. package/.proagents/runbooks/performance-degradation.md +0 -584
  120. package/.proagents/runbooks/production-debugging.md +0 -489
  121. package/.proagents/sessions/README.md +0 -5
  122. package/.proagents/sprints/README.md +0 -58
  123. package/.proagents/team/README.md +0 -256
  124. package/.proagents/team/code-ownership.md +0 -306
  125. package/.proagents/team/communication-templates.md +0 -441
  126. package/.proagents/team/handoff-protocol.md +0 -380
  127. package/.proagents/team/ide-setup/README.md +0 -103
  128. package/.proagents/team/ide-setup/cursor.md +0 -276
  129. package/.proagents/team/ide-setup/jetbrains.md +0 -330
  130. package/.proagents/team/ide-setup/neovim.md +0 -640
  131. package/.proagents/team/ide-setup/vscode.md +0 -348
  132. package/.proagents/team/onboarding.md +0 -278
  133. package/.proagents/time-tracking.json +0 -19
  134. package/.proagents/troubleshooting/README.md +0 -730
  135. package/.proagents/troubleshooting/ai-issues.md +0 -601
  136. package/.proagents/troubleshooting/workflow-issues.md +0 -571
@@ -0,0 +1,425 @@
1
+ # Web Vitals Performance Guide
2
+
3
+ Monitor and optimize Core Web Vitals for better user experience.
4
+
5
+ ---
6
+
7
+ ## Core Web Vitals
8
+
9
+ ### LCP - Largest Contentful Paint
10
+
11
+ **What:** Time until largest content element is visible
12
+ **Target:** < 2.5 seconds
13
+ **Measures:** Loading performance
14
+
15
+ ### FID - First Input Delay
16
+
17
+ **What:** Time from first interaction to browser response
18
+ **Target:** < 100 milliseconds
19
+ **Measures:** Interactivity
20
+
21
+ ### CLS - Cumulative Layout Shift
22
+
23
+ **What:** Visual stability (unexpected layout shifts)
24
+ **Target:** < 0.1
25
+ **Measures:** Visual stability
26
+
27
+ ---
28
+
29
+ ## Measuring Web Vitals
30
+
31
+ ### Using web-vitals Library
32
+
33
+ ```javascript
34
+ // Install
35
+ npm install web-vitals
36
+
37
+ // Usage
38
+ import { getCLS, getFID, getLCP, getFCP, getTTFB } from 'web-vitals';
39
+
40
+ function sendToAnalytics(metric) {
41
+ console.log(metric);
42
+ // Send to analytics service
43
+ analytics.track('Web Vitals', {
44
+ name: metric.name,
45
+ value: metric.value,
46
+ rating: metric.rating, // 'good', 'needs-improvement', 'poor'
47
+ id: metric.id,
48
+ });
49
+ }
50
+
51
+ getCLS(sendToAnalytics);
52
+ getFID(sendToAnalytics);
53
+ getLCP(sendToAnalytics);
54
+ getFCP(sendToAnalytics);
55
+ getTTFB(sendToAnalytics);
56
+ ```
57
+
58
+ ### React Integration
59
+
60
+ ```javascript
61
+ // In React app
62
+ import { useEffect } from 'react';
63
+ import { getCLS, getFID, getLCP } from 'web-vitals';
64
+
65
+ function App() {
66
+ useEffect(() => {
67
+ getCLS(console.log);
68
+ getFID(console.log);
69
+ getLCP(console.log);
70
+ }, []);
71
+
72
+ return <MainApp />;
73
+ }
74
+
75
+ // Or in reportWebVitals.js (Create React App)
76
+ const reportWebVitals = (onPerfEntry) => {
77
+ if (onPerfEntry && onPerfEntry instanceof Function) {
78
+ import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
79
+ getCLS(onPerfEntry);
80
+ getFID(onPerfEntry);
81
+ getFCP(onPerfEntry);
82
+ getLCP(onPerfEntry);
83
+ getTTFB(onPerfEntry);
84
+ });
85
+ }
86
+ };
87
+ ```
88
+
89
+ ### Lighthouse
90
+
91
+ ```bash
92
+ # CLI
93
+ npm install -g lighthouse
94
+ lighthouse https://example.com --output html --output-path report.html
95
+
96
+ # Chrome DevTools
97
+ 1. Open DevTools (F12)
98
+ 2. Go to Lighthouse tab
99
+ 3. Click "Generate report"
100
+ ```
101
+
102
+ ---
103
+
104
+ ## Optimizing LCP
105
+
106
+ ### Common LCP Elements
107
+
108
+ - `<img>` elements
109
+ - `<video>` poster images
110
+ - Elements with background-image
111
+ - Block-level text elements
112
+
113
+ ### Optimization Techniques
114
+
115
+ #### 1. Optimize Images
116
+
117
+ ```html
118
+ <!-- Use modern formats -->
119
+ <picture>
120
+ <source srcset="image.avif" type="image/avif">
121
+ <source srcset="image.webp" type="image/webp">
122
+ <img src="image.jpg" alt="...">
123
+ </picture>
124
+
125
+ <!-- Responsive images -->
126
+ <img
127
+ srcset="small.jpg 300w,
128
+ medium.jpg 600w,
129
+ large.jpg 1200w"
130
+ sizes="(max-width: 600px) 300px,
131
+ (max-width: 1200px) 600px,
132
+ 1200px"
133
+ src="medium.jpg"
134
+ alt="..."
135
+ >
136
+
137
+ <!-- Preload LCP image -->
138
+ <link rel="preload" as="image" href="hero-image.webp">
139
+ ```
140
+
141
+ #### 2. Optimize Server Response
142
+
143
+ ```javascript
144
+ // Enable caching
145
+ app.use((req, res, next) => {
146
+ res.setHeader('Cache-Control', 'public, max-age=31536000');
147
+ next();
148
+ });
149
+
150
+ // Use CDN
151
+ // Configure CDN for static assets
152
+
153
+ // Enable compression
154
+ const compression = require('compression');
155
+ app.use(compression());
156
+ ```
157
+
158
+ #### 3. Preload Critical Resources
159
+
160
+ ```html
161
+ <head>
162
+ <!-- Preload critical CSS -->
163
+ <link rel="preload" href="critical.css" as="style">
164
+
165
+ <!-- Preload fonts -->
166
+ <link rel="preload" href="font.woff2" as="font" type="font/woff2" crossorigin>
167
+
168
+ <!-- Preconnect to origins -->
169
+ <link rel="preconnect" href="https://api.example.com">
170
+ <link rel="dns-prefetch" href="https://cdn.example.com">
171
+ </head>
172
+ ```
173
+
174
+ ---
175
+
176
+ ## Optimizing FID
177
+
178
+ ### Optimization Techniques
179
+
180
+ #### 1. Break Up Long Tasks
181
+
182
+ ```javascript
183
+ // BAD: Long blocking task
184
+ function processData(data) {
185
+ // 1000ms of work
186
+ data.forEach(item => heavyComputation(item));
187
+ }
188
+
189
+ // GOOD: Break into chunks
190
+ async function processData(data) {
191
+ const chunks = chunkArray(data, 100);
192
+
193
+ for (const chunk of chunks) {
194
+ chunk.forEach(item => heavyComputation(item));
195
+ // Yield to main thread
196
+ await new Promise(resolve => setTimeout(resolve, 0));
197
+ }
198
+ }
199
+ ```
200
+
201
+ #### 2. Use Web Workers
202
+
203
+ ```javascript
204
+ // Heavy computation in worker
205
+ const worker = new Worker('worker.js');
206
+
207
+ worker.postMessage({ data: largeDataSet });
208
+ worker.onmessage = (event) => {
209
+ console.log('Processed:', event.data);
210
+ };
211
+
212
+ // worker.js
213
+ self.onmessage = (event) => {
214
+ const result = heavyComputation(event.data);
215
+ self.postMessage(result);
216
+ };
217
+ ```
218
+
219
+ #### 3. Defer Non-Critical JavaScript
220
+
221
+ ```html
222
+ <!-- Defer non-critical scripts -->
223
+ <script src="analytics.js" defer></script>
224
+ <script src="non-critical.js" defer></script>
225
+
226
+ <!-- Async for independent scripts -->
227
+ <script src="independent.js" async></script>
228
+ ```
229
+
230
+ #### 4. Lazy Load Components
231
+
232
+ ```javascript
233
+ // React
234
+ const HeavyComponent = React.lazy(() => import('./HeavyComponent'));
235
+
236
+ function App() {
237
+ return (
238
+ <Suspense fallback={<Loading />}>
239
+ <HeavyComponent />
240
+ </Suspense>
241
+ );
242
+ }
243
+ ```
244
+
245
+ ---
246
+
247
+ ## Optimizing CLS
248
+
249
+ ### Common Causes
250
+
251
+ 1. Images without dimensions
252
+ 2. Ads/embeds without reserved space
253
+ 3. Dynamically injected content
254
+ 4. Web fonts causing FOIT/FOUT
255
+
256
+ ### Optimization Techniques
257
+
258
+ #### 1. Always Set Image Dimensions
259
+
260
+ ```html
261
+ <!-- Always specify width and height -->
262
+ <img src="image.jpg" width="800" height="600" alt="...">
263
+
264
+ <!-- Or use aspect-ratio -->
265
+ <style>
266
+ .image-container {
267
+ aspect-ratio: 16 / 9;
268
+ }
269
+ </style>
270
+ ```
271
+
272
+ #### 2. Reserve Space for Dynamic Content
273
+
274
+ ```css
275
+ /* Reserve space for ads */
276
+ .ad-container {
277
+ min-height: 250px;
278
+ }
279
+
280
+ /* Skeleton for loading content */
281
+ .skeleton {
282
+ min-height: 200px;
283
+ background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
284
+ background-size: 200% 100%;
285
+ animation: loading 1.5s infinite;
286
+ }
287
+ ```
288
+
289
+ #### 3. Optimize Font Loading
290
+
291
+ ```css
292
+ /* Use font-display */
293
+ @font-face {
294
+ font-family: 'CustomFont';
295
+ src: url('font.woff2') format('woff2');
296
+ font-display: swap;
297
+ }
298
+
299
+ /* Or use optional for non-critical fonts */
300
+ @font-face {
301
+ font-family: 'NiceToHave';
302
+ src: url('font.woff2') format('woff2');
303
+ font-display: optional;
304
+ }
305
+ ```
306
+
307
+ ```html
308
+ <!-- Preload critical fonts -->
309
+ <link rel="preload" href="font.woff2" as="font" type="font/woff2" crossorigin>
310
+ ```
311
+
312
+ #### 4. Avoid Inserting Content Above Existing
313
+
314
+ ```javascript
315
+ // BAD: Insert at top
316
+ container.prepend(newElement);
317
+
318
+ // GOOD: Insert below fold or with reserved space
319
+ reservedSpace.appendChild(newElement);
320
+ ```
321
+
322
+ ---
323
+
324
+ ## Performance Budget
325
+
326
+ ```javascript
327
+ // performance-budget.json
328
+ {
329
+ "budgets": [
330
+ {
331
+ "resourceSizes": [
332
+ { "resourceType": "script", "budget": 150 },
333
+ { "resourceType": "image", "budget": 300 },
334
+ { "resourceType": "stylesheet", "budget": 50 },
335
+ { "resourceType": "total", "budget": 500 }
336
+ ],
337
+ "timings": [
338
+ { "metric": "largest-contentful-paint", "budget": 2500 },
339
+ { "metric": "first-input-delay", "budget": 100 },
340
+ { "metric": "cumulative-layout-shift", "budget": 0.1 },
341
+ { "metric": "time-to-interactive", "budget": 3500 }
342
+ ]
343
+ }
344
+ ]
345
+ }
346
+ ```
347
+
348
+ ---
349
+
350
+ ## Monitoring Dashboard
351
+
352
+ ```markdown
353
+ # Web Vitals Dashboard
354
+
355
+ ## Current Performance
356
+
357
+ | Metric | P75 Value | Target | Status |
358
+ |--------|-----------|--------|--------|
359
+ | LCP | 2.1s | < 2.5s | ✅ Good |
360
+ | FID | 80ms | < 100ms | ✅ Good |
361
+ | CLS | 0.15 | < 0.1 | ⚠️ Needs Improvement |
362
+ | FCP | 1.5s | < 1.8s | ✅ Good |
363
+ | TTFB | 300ms | < 600ms | ✅ Good |
364
+
365
+ ## Trends (Last 30 Days)
366
+
367
+ LCP: ████████░░ Improved 15%
368
+ FID: ██████████ Stable
369
+ CLS: ██████░░░░ Degraded 5%
370
+
371
+ ## Top Issues
372
+
373
+ 1. CLS on product pages (0.2)
374
+ - Cause: Images without dimensions
375
+ - Fix: Add width/height attributes
376
+
377
+ 2. LCP on homepage (2.8s)
378
+ - Cause: Large hero image
379
+ - Fix: Optimize and preload image
380
+ ```
381
+
382
+ ---
383
+
384
+ ## CI/CD Integration
385
+
386
+ ```yaml
387
+ # .github/workflows/performance.yml
388
+ name: Performance Check
389
+
390
+ on: pull_request
391
+
392
+ jobs:
393
+ lighthouse:
394
+ runs-on: ubuntu-latest
395
+ steps:
396
+ - uses: actions/checkout@v3
397
+
398
+ - name: Run Lighthouse
399
+ uses: treosh/lighthouse-ci-action@v9
400
+ with:
401
+ urls: |
402
+ https://example.com/
403
+ https://example.com/products
404
+ budgetPath: ./performance-budget.json
405
+ uploadArtifacts: true
406
+
407
+ - name: Check Web Vitals
408
+ run: |
409
+ if [ "$LCP" -gt 2500 ]; then
410
+ echo "LCP exceeds budget"
411
+ exit 1
412
+ fi
413
+ ```
414
+
415
+ ---
416
+
417
+ ## Commands
418
+
419
+ | Command | Description |
420
+ |---------|-------------|
421
+ | `pa:perf-vitals` | Check Web Vitals |
422
+ | `pa:perf-lcp` | Analyze LCP |
423
+ | `pa:perf-cls` | Analyze CLS |
424
+ | `pa:perf-fid` | Analyze FID |
425
+ | `pa:perf-report` | Generate performance report |
@@ -40,6 +40,61 @@ git:
40
40
  commit_convention: "conventional" # conventional | simple | custom
41
41
  require_pr: true
42
42
 
43
+ # Pre-commit checks for pa:commit
44
+ pre_commit:
45
+ enabled: true # Master toggle for pre-commit checks
46
+ lint: true # Run linter before commit
47
+ type_check: true # Run type checker before commit
48
+ test_affected: false # Run tests for changed files
49
+
50
+ # Safety warnings for pa:commit
51
+ safety:
52
+ warn_main_branch: true # Warn if committing to main/master
53
+ warn_sensitive_files: true # Warn for .env, credentials, etc.
54
+ warn_large_files: true # Warn if file > threshold
55
+ large_file_threshold: 1048576 # 1MB in bytes
56
+ sensitive_patterns:
57
+ - ".env*"
58
+ - "credentials*"
59
+ - "secrets*"
60
+ - "*.pem"
61
+ - "*.key"
62
+ - "id_rsa*"
63
+
64
+ # Workflow Configuration
65
+ # Controls how AI handles task size and worktrees
66
+ workflow:
67
+ # Worktree mode: auto | always-ask | always-branch | always-worktree
68
+ # - auto: Small tasks use branch (no ask), large tasks ask user
69
+ # - always-ask: Always ask user for workflow choice
70
+ # - always-branch: Never use worktree, always simple branch
71
+ # - always-worktree: Always create worktree for each task
72
+ worktree_mode: "auto"
73
+
74
+ # Task size indicators for auto mode
75
+ task_indicators:
76
+ small:
77
+ - "fix typo"
78
+ - "small bug"
79
+ - "quick fix"
80
+ - "update text"
81
+ - "minor change"
82
+ - "hotfix"
83
+ large:
84
+ - "implement"
85
+ - "create feature"
86
+ - "refactor"
87
+ - "new module"
88
+ - "authentication"
89
+ - "payment"
90
+ - "integration"
91
+ - "migration"
92
+
93
+ # Worktree naming
94
+ worktree_naming:
95
+ prefix: "../" # Relative to current directory
96
+ format: "{project}-{taskname}" # e.g., myapp-user-auth
97
+
43
98
  # Parallel Feature Development
44
99
  parallel_features:
45
100
  enabled: true
@@ -67,7 +122,6 @@ documentation:
67
122
  internal:
68
123
  feature_docs: "./.proagents/active-features/" # Feature-specific docs
69
124
  dev_changelog: "./.proagents/changelog/" # Detailed dev notes
70
- analysis: "./.proagents/cache/" # Codebase analysis
71
125
  learning: "./.proagents/.learning/" # AI learning data
72
126
 
73
127
  required_for_all_modes: true
@@ -76,6 +76,106 @@ AI: "Fixed the login bug in src/auth/login.ts"
76
76
  | `pa:session-start` | Begin work session (AUTO) |
77
77
  | `pa:session-end` | End session (AUTO - logs on each change) |
78
78
  | `pa:handoff` | Create detailed handoff |
79
+ | `pa:worktree-create "name"` | Create worktree for large task |
80
+ | `pa:worktree-list` | List all active worktrees |
81
+ | `pa:worktree-remove "name"` | Remove worktree after merge |
82
+
83
+ ---
84
+
85
+ ## Smart Workflow Mode
86
+
87
+ AI automatically detects task size and chooses workflow.
88
+
89
+ ### Task Size Indicators
90
+
91
+ | Small Task | Large Task |
92
+ |------------|------------|
93
+ | "fix typo", "small bug", "quick fix" | "implement", "feature", "refactor" |
94
+ | 1-2 files | Multiple files |
95
+ | Single function | New module |
96
+
97
+ ### Workflow Decision
98
+
99
+ Read `workflow.worktree_mode` from `proagents.config.yaml`:
100
+
101
+ - **auto** (default): Small → branch, Large → ask user
102
+ - **always-ask**: Always ask user
103
+ - **always-branch**: Never use worktree
104
+ - **always-worktree**: Always create worktree
105
+
106
+ ### Small Task (Auto Branch)
107
+
108
+ ```
109
+ User: "Fix the typo in README"
110
+ AI: [Creates branch, proceeds immediately, no question]
111
+ ```
112
+
113
+ ### Large Task (Ask User)
114
+
115
+ ```
116
+ User: "Implement user authentication"
117
+ AI:
118
+ ═══════════════════════════════════════
119
+ 📋 LARGE TASK DETECTED
120
+
121
+ Task: "Implement user authentication"
122
+
123
+ 1. Continue here (current branch)
124
+ 2. Create worktree (isolated directory)
125
+
126
+ Which approach? [1/2]
127
+ ═══════════════════════════════════════
128
+ ```
129
+
130
+ ---
131
+
132
+ ## Worktree Commands
133
+
134
+ ### pa:worktree-create "name"
135
+
136
+ Creates isolated worktree for task:
137
+
138
+ ```bash
139
+ git worktree add ../[project]-[name] feature/[name]
140
+ ```
141
+
142
+ Output:
143
+ ```
144
+ ═══════════════════════════════════════
145
+ ✅ Worktree Created
146
+
147
+ Directory: ../myapp-user-auth/
148
+ Branch: feature/user-auth
149
+
150
+ Next Steps:
151
+ 1. Open the new directory in your IDE
152
+ 2. Work there - all changes go to feature/user-auth
153
+ 3. When done: pa:worktree-remove "user-auth"
154
+ ═══════════════════════════════════════
155
+ ```
156
+
157
+ ### pa:worktree-list
158
+
159
+ ```bash
160
+ git worktree list
161
+ ```
162
+
163
+ Output:
164
+ ```
165
+ ═══════════════════════════════════════
166
+ 📁 Active Worktrees
167
+
168
+ /path/to/myapp main
169
+ /path/to/myapp-user-auth feature/user-auth [Claude]
170
+ /path/to/myapp-rate-limiting feature/rate-limiting [Cursor]
171
+ ═══════════════════════════════════════
172
+ ```
173
+
174
+ ### pa:worktree-remove "name"
175
+
176
+ ```bash
177
+ git worktree remove ../myapp-[name]
178
+ ```
79
179
 
80
180
  ---
81
181