proagents 1.6.17 → 1.6.18

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 (168) hide show
  1. package/.claude/settings.local.json +169 -0
  2. package/COMMANDS.md +595 -0
  3. package/README.md +13 -23
  4. package/package.json +2 -7
  5. package/.proagents/ai-models/README.md +0 -141
  6. package/.proagents/ai-models/cost-management.md +0 -362
  7. package/.proagents/ai-models/fallbacks.md +0 -342
  8. package/.proagents/ai-models/model-config.md +0 -318
  9. package/.proagents/ai-models/task-routing.md +0 -503
  10. package/.proagents/ai-training/README.md +0 -155
  11. package/.proagents/ai-training/continuous-learning.md +0 -413
  12. package/.proagents/ai-training/domain-knowledge.md +0 -378
  13. package/.proagents/ai-training/pattern-learning.md +0 -455
  14. package/.proagents/ai-training/training-data.md +0 -337
  15. package/.proagents/ai-training/user-preferences.md +0 -346
  16. package/.proagents/approval-workflows/README.md +0 -146
  17. package/.proagents/approval-workflows/approval-config.md +0 -332
  18. package/.proagents/approval-workflows/approval-stages.md +0 -503
  19. package/.proagents/approval-workflows/emergency-bypass.md +0 -351
  20. package/.proagents/approval-workflows/examples.md +0 -859
  21. package/.proagents/approval-workflows/notifications.md +0 -320
  22. package/.proagents/compliance/README.md +0 -206
  23. package/.proagents/compliance/access-control.md +0 -310
  24. package/.proagents/compliance/audit-logging.md +0 -444
  25. package/.proagents/compliance/compliance-frameworks.md +0 -429
  26. package/.proagents/compliance/reports.md +0 -491
  27. package/.proagents/compliance/retention-policies.md +0 -454
  28. package/.proagents/config-versioning/README.md +0 -120
  29. package/.proagents/config-versioning/changelog.md +0 -300
  30. package/.proagents/config-versioning/rollback.md +0 -283
  31. package/.proagents/config-versioning/versioning.md +0 -330
  32. package/.proagents/contract-testing/README.md +0 -223
  33. package/.proagents/contract-testing/contract-testing.md +0 -614
  34. package/.proagents/contract-testing/pact-integration.md +0 -507
  35. package/.proagents/contract-testing/schema-validation.md +0 -565
  36. package/.proagents/dependency-management/README.md +0 -140
  37. package/.proagents/dependency-management/automation.md +0 -363
  38. package/.proagents/dependency-management/compatibility.md +0 -319
  39. package/.proagents/dependency-management/security-scanning.md +0 -413
  40. package/.proagents/dependency-management/update-policies.md +0 -374
  41. package/.proagents/disaster-recovery/README.md +0 -247
  42. package/.proagents/disaster-recovery/automation.md +0 -366
  43. package/.proagents/disaster-recovery/backup-recovery.md +0 -571
  44. package/.proagents/disaster-recovery/incident-response.md +0 -565
  45. package/.proagents/disaster-recovery/rollback-procedures.md +0 -499
  46. package/.proagents/disaster-recovery/runbooks.md +0 -603
  47. package/.proagents/disaster-recovery/scenarios.md +0 -892
  48. package/.proagents/disaster-recovery/testing.md +0 -438
  49. package/.proagents/environments/README.md +0 -244
  50. package/.proagents/environments/configuration.md +0 -437
  51. package/.proagents/environments/promotion.md +0 -434
  52. package/.proagents/environments/setup.md +0 -420
  53. package/.proagents/examples/README.md +0 -55
  54. package/.proagents/examples/backend-nodejs/README.md +0 -188
  55. package/.proagents/examples/backend-nodejs/complete-conversation.md +0 -601
  56. package/.proagents/examples/backend-nodejs/proagents.config.yaml +0 -415
  57. package/.proagents/examples/backend-nodejs/workflow-example.md +0 -909
  58. package/.proagents/examples/fullstack-nextjs/README.md +0 -155
  59. package/.proagents/examples/fullstack-nextjs/complete-conversation.md +0 -604
  60. package/.proagents/examples/fullstack-nextjs/proagents.config.yaml +0 -287
  61. package/.proagents/examples/fullstack-nextjs/workflow-example.md +0 -553
  62. package/.proagents/examples/mobile-react-native/README.md +0 -171
  63. package/.proagents/examples/mobile-react-native/complete-conversation.md +0 -825
  64. package/.proagents/examples/mobile-react-native/proagents.config.yaml +0 -330
  65. package/.proagents/examples/mobile-react-native/workflow-example.md +0 -723
  66. package/.proagents/examples/web-frontend-react/README.md +0 -125
  67. package/.proagents/examples/web-frontend-react/complete-conversation.md +0 -556
  68. package/.proagents/examples/web-frontend-react/proagents.config.yaml +0 -183
  69. package/.proagents/examples/web-frontend-react/workflow-example.md +0 -603
  70. package/.proagents/existing-projects/README.md +0 -65
  71. package/.proagents/existing-projects/challenges.md +0 -861
  72. package/.proagents/existing-projects/coexistence-mode.md +0 -483
  73. package/.proagents/existing-projects/compatibility-assessment.md +0 -541
  74. package/.proagents/existing-projects/gradual-adoption.md +0 -515
  75. package/.proagents/existing-projects/migration-strategies.md +0 -788
  76. package/.proagents/existing-projects/pattern-reconciliation.md +0 -489
  77. package/.proagents/existing-projects/team-onboarding.md +0 -617
  78. package/.proagents/existing-projects/technical-debt-handling.md +0 -644
  79. package/.proagents/feature-flags/README.md +0 -263
  80. package/.proagents/feature-flags/ab-testing.md +0 -413
  81. package/.proagents/feature-flags/configuration.md +0 -420
  82. package/.proagents/feature-flags/kill-switches.md +0 -444
  83. package/.proagents/feature-flags/rollout-strategies.md +0 -392
  84. package/.proagents/history.log +0 -12
  85. package/.proagents/i18n/README.md +0 -133
  86. package/.proagents/i18n/extraction.md +0 -433
  87. package/.proagents/i18n/tms-integration.md +0 -332
  88. package/.proagents/i18n/translation-workflow.md +0 -413
  89. package/.proagents/i18n/validation.md +0 -355
  90. package/.proagents/logging/README.md +0 -276
  91. package/.proagents/logging/aggregation.md +0 -475
  92. package/.proagents/logging/log-levels.md +0 -376
  93. package/.proagents/logging/sensitive-data.md +0 -423
  94. package/.proagents/logging/structured-logging.md +0 -406
  95. package/.proagents/metrics/README.md +0 -69
  96. package/.proagents/metrics/code-quality-kpis.md +0 -461
  97. package/.proagents/metrics/deployment-metrics.md +0 -517
  98. package/.proagents/metrics/developer-productivity.md +0 -368
  99. package/.proagents/metrics/learning-effectiveness.md +0 -478
  100. package/.proagents/migrations/README.md +0 -77
  101. package/.proagents/migrations/from-claude-projects.md +0 -313
  102. package/.proagents/migrations/from-cursor-rules.md +0 -345
  103. package/.proagents/migrations/from-custom-workflows.md +0 -410
  104. package/.proagents/monitoring/README.md +0 -308
  105. package/.proagents/monitoring/alerting.md +0 -449
  106. package/.proagents/monitoring/dashboards.md +0 -454
  107. package/.proagents/monitoring/health-checks.md +0 -436
  108. package/.proagents/monitoring/metrics.md +0 -434
  109. package/.proagents/multi-project/README.md +0 -170
  110. package/.proagents/multi-project/coordinated-deploy.md +0 -510
  111. package/.proagents/multi-project/cross-project-deps.md +0 -395
  112. package/.proagents/multi-project/unified-changelog.md +0 -477
  113. package/.proagents/multi-project/walkthroughs/monorepo-setup.md +0 -787
  114. package/.proagents/multi-project/workspace-config.md +0 -408
  115. package/.proagents/notifications/README.md +0 -151
  116. package/.proagents/notifications/channels.md +0 -457
  117. package/.proagents/notifications/preferences.md +0 -415
  118. package/.proagents/notifications/routing.md +0 -449
  119. package/.proagents/notifications/scheduling.md +0 -425
  120. package/.proagents/notifications/templates.md +0 -446
  121. package/.proagents/offline-mode/README.md +0 -145
  122. package/.proagents/offline-mode/caching.md +0 -344
  123. package/.proagents/offline-mode/offline-operations.md +0 -312
  124. package/.proagents/offline-mode/queue-specifications.md +0 -679
  125. package/.proagents/offline-mode/sync.md +0 -475
  126. package/.proagents/parallel-features/README.md +0 -85
  127. package/.proagents/parallel-features/conflict-detection.md +0 -226
  128. package/.proagents/parallel-features/dependency-management.md +0 -392
  129. package/.proagents/parallel-features/merge-coordination.md +0 -506
  130. package/.proagents/parallel-features/tracking-system.md +0 -416
  131. package/.proagents/performance/README.md +0 -59
  132. package/.proagents/performance/bundle-analysis.md +0 -375
  133. package/.proagents/performance/load-testing.md +0 -563
  134. package/.proagents/performance/runtime-metrics.md +0 -489
  135. package/.proagents/performance/web-vitals.md +0 -425
  136. package/.proagents/plugins/README.md +0 -139
  137. package/.proagents/plugins/creating-plugins.md +0 -504
  138. package/.proagents/plugins/plugin-api.md +0 -467
  139. package/.proagents/plugins/plugin-registry.md +0 -276
  140. package/.proagents/reporting/README.md +0 -158
  141. package/.proagents/reporting/dashboards.md +0 -366
  142. package/.proagents/reporting/exports.md +0 -524
  143. package/.proagents/reporting/quality-metrics.md +0 -385
  144. package/.proagents/reporting/templates/README.md +0 -56
  145. package/.proagents/reporting/templates/dashboard-config.json +0 -187
  146. package/.proagents/reporting/templates/metrics-queries.md +0 -427
  147. package/.proagents/reporting/templates/react-dashboard.tsx +0 -544
  148. package/.proagents/reporting/templates/widgets.md +0 -451
  149. package/.proagents/reporting/velocity-metrics.md +0 -340
  150. package/.proagents/reverse-engineering/README.md +0 -151
  151. package/.proagents/reverse-engineering/architecture-extraction.md +0 -325
  152. package/.proagents/reverse-engineering/code-analysis.md +0 -377
  153. package/.proagents/reverse-engineering/dependency-mapping.md +0 -567
  154. package/.proagents/reverse-engineering/diagram-generation.md +0 -586
  155. package/.proagents/reverse-engineering/documentation-generation.md +0 -468
  156. package/.proagents/reverse-engineering/pattern-detection.md +0 -569
  157. package/.proagents/reverse-engineering/quality-assessment.md +0 -733
  158. package/.proagents/secrets/README.md +0 -278
  159. package/.proagents/secrets/access-control.md +0 -443
  160. package/.proagents/secrets/rotation.md +0 -403
  161. package/.proagents/secrets/scanning.md +0 -487
  162. package/.proagents/secrets/storage.md +0 -394
  163. package/.proagents/webhooks/README.md +0 -126
  164. package/.proagents/webhooks/endpoints.md +0 -298
  165. package/.proagents/webhooks/events.md +0 -316
  166. package/.proagents/webhooks/payloads.md +0 -325
  167. package/.proagents/webhooks/reliability.md +0 -363
  168. package/.proagents/webhooks/security.md +0 -380
@@ -1,859 +0,0 @@
1
- # Approval Workflow Examples
2
-
3
- Practical examples of approval workflows for different scenarios.
4
-
5
- ---
6
-
7
- ## Example 1: Standard Feature Approval
8
-
9
- Basic feature approval with tech lead review.
10
-
11
- ### Configuration
12
-
13
- ```yaml
14
- # proagents.config.yaml
15
-
16
- approvals:
17
- enabled: true
18
-
19
- feature_approval:
20
- stages:
21
- - name: "code_review"
22
- approvers: ["@team/tech-leads"]
23
- required: true
24
- timeout: "48h"
25
- ```
26
-
27
- ### Workflow
28
-
29
- ```
30
- Developer Tech Lead System
31
- │ │ │
32
- │ Complete Feature │ │
33
- ├──────────────────────────►│ │
34
- │ │ │
35
- │ Request Approval │ │
36
- │───────────────────────────┼──────────────────────────►│
37
- │ │ │
38
- │ │◄───────Notification───────│
39
- │ │ │
40
- │ │ Review Code │
41
- │ │ │
42
- │ │ Approve │
43
- │ ├──────────────────────────►│
44
- │ │ │
45
- │◄───────────────────Approval Complete──────────────────│
46
- │ │ │
47
- │ Merge & Deploy │ │
48
- │ │ │
49
- ```
50
-
51
- ### Commands
52
-
53
- ```bash
54
- # Developer requests approval
55
- proagents approval request --stage code_review
56
-
57
- # Tech lead reviews
58
- proagents approval review feature/user-auth
59
-
60
- # Tech lead approves
61
- proagents approval approve feature/user-auth --comment "LGTM"
62
-
63
- # Developer can now proceed
64
- proagents status
65
- # Output: ✅ Approved - Ready to merge
66
- ```
67
-
68
- ---
69
-
70
- ## Example 2: Multi-Stage Feature Approval
71
-
72
- Feature requires both technical and product approval.
73
-
74
- ### Configuration
75
-
76
- ```yaml
77
- approvals:
78
- enabled: true
79
-
80
- feature_approval:
81
- stages:
82
- # Stage 1: Technical Review
83
- - name: "tech_review"
84
- description: "Technical implementation review"
85
- approvers: ["@team/tech-leads"]
86
- required: true
87
- criteria:
88
- - "Code quality meets standards"
89
- - "Tests are comprehensive"
90
- - "No security issues"
91
-
92
- # Stage 2: Product Review
93
- - name: "product_review"
94
- description: "Feature meets requirements"
95
- approvers: ["@team/product-managers"]
96
- required: true
97
- criteria:
98
- - "Feature matches requirements"
99
- - "UX is acceptable"
100
- - "Ready for users"
101
-
102
- # Stage 3: Final Sign-off (Optional)
103
- - name: "final_signoff"
104
- description: "Final approval for release"
105
- approvers: ["@team/engineering-manager"]
106
- required: false
107
- condition: "major_feature"
108
-
109
- # Stages run sequentially
110
- sequential: true
111
- ```
112
-
113
- ### Workflow
114
-
115
- ```
116
- Developer Tech Lead Product Eng Manager
117
- │ │ │ │
118
- │ Request │ │ │
119
- ├───────────────►│ │ │
120
- │ │ │ │
121
- │ │ Review │ │
122
- │ │ Approve ✅ │ │
123
- │ ├───────────────►│ │
124
- │ │ │ │
125
- │ │ │ Review │
126
- │ │ │ Approve ✅ │
127
- │ │ ├───────────────►│
128
- │ │ │ │
129
- │ │ │ │ (Optional)
130
- │ │ │ │ Sign-off ✅
131
- │◄───────────────┴────────────────┴────────────────┤
132
- │ │
133
- │ All Approvals Complete │
134
- │ │
135
- ```
136
-
137
- ### Commands
138
-
139
- ```bash
140
- # Developer submits for approval
141
- proagents approval request --all-stages
142
-
143
- # Check current status
144
- proagents approval status
145
-
146
- # Output:
147
- # Approval Status: feature/user-dashboard
148
- # ─────────────────────────────────────────
149
- # Stage 1: tech_review ⏳ Pending
150
- # Stage 2: product_review ⏸ Waiting (blocked by Stage 1)
151
- # Stage 3: final_signoff ⏸ Waiting (blocked by Stage 2)
152
-
153
- # After tech review approves:
154
- # Stage 1: tech_review ✅ Approved (by @tech-lead, 2h ago)
155
- # Stage 2: product_review ⏳ Pending
156
- # Stage 3: final_signoff ⏸ Waiting
157
- ```
158
-
159
- ---
160
-
161
- ## Example 3: Deployment Approval Gates
162
-
163
- Different approval requirements for different environments.
164
-
165
- ### Configuration
166
-
167
- ```yaml
168
- approvals:
169
- enabled: true
170
-
171
- deployment_approval:
172
- # Development - No approval needed
173
- development:
174
- required: false
175
- auto_approve: true
176
-
177
- # Staging - Single approval
178
- staging:
179
- required: true
180
- approvers: ["@team/developers"]
181
- min_approvals: 1
182
- self_approve: true # Developer can approve their own
183
-
184
- # Production - Strict approval
185
- production:
186
- required: true
187
- approvers:
188
- - "@team/tech-leads"
189
- - "@team/devops"
190
- min_approvals: 2
191
- self_approve: false
192
- additional_checks:
193
- - "staging_verified"
194
- - "load_test_passed"
195
- - "security_scan_clear"
196
-
197
- # Hotfix - Expedited approval
198
- hotfix:
199
- required: true
200
- approvers:
201
- - "@team/tech-leads"
202
- - "@team/on-call"
203
- min_approvals: 1
204
- expedited: true
205
- timeout: "1h"
206
- ```
207
-
208
- ### Workflow Example: Production Deployment
209
-
210
- ```bash
211
- # Step 1: Deploy to staging (auto-approved)
212
- proagents deploy staging
213
-
214
- # Step 2: Verify on staging
215
- proagents test smoke --env staging
216
- proagents test e2e --env staging
217
-
218
- # Step 3: Request production deployment
219
- proagents deploy production --request-approval
220
-
221
- # Output:
222
- # Production Deployment Approval Request
223
- # ──────────────────────────────────────
224
- # Feature: user-authentication
225
- # Version: v2.3.0
226
- #
227
- # Pre-deployment Checks:
228
- # ✅ Staging verified
229
- # ✅ Load test passed
230
- # ✅ Security scan clear
231
- #
232
- # Approvers Notified:
233
- # - @tech-lead-1
234
- # - @tech-lead-2
235
- # - @devops-team
236
- #
237
- # Required: 2 approvals
238
- # Timeout: 48 hours
239
-
240
- # Step 4: Tech lead approves
241
- proagents approval approve deploy/production/v2.3.0 --role tech-lead
242
-
243
- # Step 5: DevOps approves
244
- proagents approval approve deploy/production/v2.3.0 --role devops
245
-
246
- # Step 6: Deployment proceeds
247
- # Output:
248
- # ✅ All approvals received (2/2)
249
- # 🚀 Starting production deployment...
250
- ```
251
-
252
- ---
253
-
254
- ## Example 4: Conditional Approval Rules
255
-
256
- Different approval requirements based on what changed.
257
-
258
- ### Configuration
259
-
260
- ```yaml
261
- approvals:
262
- enabled: true
263
-
264
- conditional_rules:
265
- # High-risk paths need extra approval
266
- - name: "security_changes"
267
- condition:
268
- paths:
269
- - "src/auth/**"
270
- - "src/security/**"
271
- - "src/middleware/auth*"
272
- stages:
273
- - name: "security_review"
274
- approvers: ["@team/security"]
275
- required: true
276
-
277
- # Database changes need DBA review
278
- - name: "database_changes"
279
- condition:
280
- paths:
281
- - "prisma/schema.prisma"
282
- - "migrations/**"
283
- stages:
284
- - name: "dba_review"
285
- approvers: ["@team/dbas"]
286
- required: true
287
-
288
- # API changes need backend lead
289
- - name: "api_changes"
290
- condition:
291
- paths:
292
- - "src/api/**"
293
- - "openapi.yaml"
294
- stages:
295
- - name: "api_review"
296
- approvers: ["@team/backend-leads"]
297
- required: true
298
-
299
- # Large changes need additional review
300
- - name: "large_changes"
301
- condition:
302
- files_changed: ">20"
303
- lines_changed: ">500"
304
- stages:
305
- - name: "architecture_review"
306
- approvers: ["@team/architects"]
307
- required: true
308
-
309
- # Small changes - simplified approval
310
- - name: "small_changes"
311
- condition:
312
- files_changed: "<5"
313
- lines_changed: "<50"
314
- not_matching: ["security_changes", "database_changes"]
315
- stages:
316
- - name: "peer_review"
317
- approvers: ["@team/developers"]
318
- required: true
319
- self_approve: true
320
- ```
321
-
322
- ### How It Works
323
-
324
- ```bash
325
- # Feature that touches auth code
326
- proagents approval analyze feature/auth-improvements
327
-
328
- # Output:
329
- # Approval Analysis: feature/auth-improvements
330
- # ────────────────────────────────────────────
331
- # Files Changed: 8
332
- # Lines Changed: 234
333
- #
334
- # Matching Rules:
335
- # ✓ security_changes (touching src/auth/)
336
- # ✓ api_changes (touching src/api/auth/)
337
- #
338
- # Required Approvals:
339
- # 1. security_review - @team/security
340
- # 2. api_review - @team/backend-leads
341
- # 3. standard tech_review - @team/tech-leads
342
-
343
- # Small documentation change
344
- proagents approval analyze feature/update-docs
345
-
346
- # Output:
347
- # Approval Analysis: feature/update-docs
348
- # ────────────────────────────────────────────
349
- # Files Changed: 2
350
- # Lines Changed: 25
351
- #
352
- # Matching Rules:
353
- # ✓ small_changes (< 5 files, < 50 lines)
354
- #
355
- # Required Approvals:
356
- # 1. peer_review - @team/developers (self-approve allowed)
357
- ```
358
-
359
- ---
360
-
361
- ## Example 5: Emergency Bypass Workflow
362
-
363
- For critical production issues that need immediate deployment.
364
-
365
- ### Configuration
366
-
367
- ```yaml
368
- approvals:
369
- enabled: true
370
-
371
- emergency_bypass:
372
- enabled: true
373
-
374
- # Who can trigger bypass
375
- authorized_users:
376
- - "@team/tech-leads"
377
- - "@team/on-call"
378
- - "@vp-engineering"
379
-
380
- # Required information
381
- require_justification: true
382
- require_incident_id: true
383
-
384
- # Post-bypass requirements
385
- post_bypass:
386
- retrospective_required: true
387
- retrospective_deadline: "48h"
388
- approval_required_after: true # Still need approval post-facto
389
-
390
- # Audit
391
- audit:
392
- log_all_bypasses: true
393
- notify:
394
- - "@team/engineering-leadership"
395
- - "#security-alerts"
396
- ```
397
-
398
- ### Emergency Bypass Workflow
399
-
400
- ```bash
401
- # During incident: Critical production bug found
402
- # Normal approval would take too long
403
-
404
- # Step 1: Initiate emergency bypass
405
- proagents approval bypass --reason "critical" --incident INC-12345
406
-
407
- # Output:
408
- # ⚠️ EMERGENCY BYPASS REQUESTED
409
- # ────────────────────────────────
410
- # User: @senior-dev
411
- # Time: 2024-01-15 03:30:00 UTC
412
- # Incident: INC-12345
413
- #
414
- # Please provide justification:
415
- > Production payments failing for all users. Fix identified and tested locally.
416
-
417
- # Verification:
418
- # ✅ User is authorized for bypass
419
- # ✅ Justification provided
420
- # ✅ Incident ID linked
421
- #
422
- # ⚠️ BYPASS APPROVED - Proceed with caution
423
- #
424
- # Required Actions:
425
- # 1. Deploy fix immediately
426
- # 2. Complete retrospective within 48 hours
427
- # 3. Obtain approval post-deployment
428
-
429
- # Step 2: Deploy without normal approval
430
- proagents deploy production --emergency
431
-
432
- # Step 3: After incident - complete retrospective
433
- proagents bypass retrospective INC-12345
434
-
435
- # Step 4: Post-deployment approval
436
- proagents approval request --bypass-followup INC-12345
437
- ```
438
-
439
- ### Bypass Audit Log
440
-
441
- ```
442
- ┌─────────────────────────────────────────────────────────────┐
443
- │ Emergency Bypass Audit Log │
444
- ├─────────────────────────────────────────────────────────────┤
445
- │ Bypass ID: BYP-2024-0015 │
446
- │ Time: 2024-01-15 03:30:00 UTC │
447
- │ User: @senior-dev │
448
- │ Incident: INC-12345 │
449
- │ │
450
- │ Justification: │
451
- │ "Production payments failing for all users. Fix identified │
452
- │ and tested locally. Estimated impact: $50K/hour" │
453
- │ │
454
- │ Changes Deployed: │
455
- │ - src/services/payment.ts (15 lines) │
456
- │ - src/lib/stripe.ts (3 lines) │
457
- │ │
458
- │ Post-Bypass Status: │
459
- │ ✅ Retrospective completed: 2024-01-16 09:00 UTC │
460
- │ ✅ Post-approval received: 2024-01-16 10:30 UTC │
461
- │ │
462
- │ Root Cause: Stripe API version mismatch │
463
- │ Prevention: Added API version pinning │
464
- └─────────────────────────────────────────────────────────────┘
465
- ```
466
-
467
- ---
468
-
469
- ## Example 6: Team-Based Approval Routing
470
-
471
- Route approvals to appropriate teams based on expertise.
472
-
473
- ### Configuration
474
-
475
- ```yaml
476
- approvals:
477
- enabled: true
478
-
479
- # Define teams and their domains
480
- teams:
481
- frontend:
482
- members: ["@alice", "@bob", "@charlie"]
483
- domains:
484
- - "src/components/**"
485
- - "src/pages/**"
486
- - "src/styles/**"
487
-
488
- backend:
489
- members: ["@dave", "@eve", "@frank"]
490
- domains:
491
- - "src/api/**"
492
- - "src/services/**"
493
- - "src/models/**"
494
-
495
- infrastructure:
496
- members: ["@grace", "@henry"]
497
- domains:
498
- - "docker/**"
499
- - "terraform/**"
500
- - ".github/**"
501
- - "k8s/**"
502
-
503
- security:
504
- members: ["@ivan", "@julia"]
505
- domains:
506
- - "src/auth/**"
507
- - "src/middleware/security*"
508
-
509
- # Auto-route based on changes
510
- auto_routing:
511
- enabled: true
512
- rules:
513
- - match: "domains"
514
- assign: "team"
515
- require: 1
516
-
517
- - match: "cross_domain" # Changes span multiple domains
518
- assign: ["primary_domain_team", "@team/tech-leads"]
519
- require: 2
520
- ```
521
-
522
- ### Auto-Routing in Action
523
-
524
- ```bash
525
- # Feature changes frontend components
526
- proagents approval request feature/new-dashboard
527
-
528
- # Output:
529
- # Auto-Routing Analysis
530
- # ─────────────────────
531
- # Changes:
532
- # - src/components/Dashboard.tsx
533
- # - src/components/Chart.tsx
534
- # - src/styles/dashboard.css
535
- #
536
- # Detected Domains: frontend
537
- #
538
- # Auto-assigned Reviewers:
539
- # - @alice (frontend)
540
- # - @bob (frontend)
541
- # - @charlie (frontend)
542
- #
543
- # Required: 1 approval from frontend team
544
-
545
- # Feature changes both frontend and backend
546
- proagents approval request feature/full-stack-feature
547
-
548
- # Output:
549
- # Auto-Routing Analysis
550
- # ─────────────────────
551
- # Changes:
552
- # - src/components/UserProfile.tsx
553
- # - src/api/users.ts
554
- # - src/services/UserService.ts
555
- #
556
- # Detected Domains: frontend, backend (cross-domain)
557
- #
558
- # Auto-assigned Reviewers:
559
- # - @alice (frontend - primary based on file count)
560
- # - @dave (backend)
561
- # - @team/tech-leads (cross-domain)
562
- #
563
- # Required: 2 approvals
564
- ```
565
-
566
- ---
567
-
568
- ## Example 7: Time-Based Approval Rules
569
-
570
- Different approval rules based on timing.
571
-
572
- ### Configuration
573
-
574
- ```yaml
575
- approvals:
576
- enabled: true
577
-
578
- time_based_rules:
579
- # Freeze periods
580
- freezes:
581
- - name: "code_freeze"
582
- schedule:
583
- - "friday 17:00 - monday 09:00" # Weekends
584
- - "december 20 - january 2" # Holiday freeze
585
- actions:
586
- - block_deployments: true
587
- - allow_emergency: true
588
- - require_bypass: ["@team/on-call", "@vp-engineering"]
589
-
590
- # Business hours - standard process
591
- business_hours:
592
- schedule: "monday-friday 09:00-17:00"
593
- timezone: "America/New_York"
594
- rules:
595
- production_deploy:
596
- required: true
597
- approvers: ["@team/tech-leads"]
598
- min_approvals: 1
599
-
600
- # Off-hours - stricter requirements
601
- off_hours:
602
- rules:
603
- production_deploy:
604
- required: true
605
- approvers:
606
- - "@team/tech-leads"
607
- - "@team/on-call"
608
- min_approvals: 2
609
- additional_notification: ["@team/engineering-leadership"]
610
-
611
- # Pre-release freeze
612
- release_freeze:
613
- trigger: "24h before scheduled_release"
614
- rules:
615
- all_changes:
616
- block: true
617
- allow: "release_fixes_only"
618
- require_approval: ["@release-manager"]
619
- ```
620
-
621
- ### Time-Based Behavior
622
-
623
- ```bash
624
- # Attempt deployment on Saturday
625
- proagents deploy production
626
-
627
- # Output:
628
- # ⚠️ DEPLOYMENT BLOCKED
629
- # ─────────────────────────
630
- # Reason: Code freeze in effect
631
- # Period: Friday 17:00 - Monday 09:00
632
- #
633
- # Options:
634
- # 1. Wait until Monday 09:00 EST
635
- # 2. Request emergency bypass (requires @team/on-call approval)
636
- #
637
- # To request bypass:
638
- # proagents approval bypass --freeze-override
639
-
640
- # Deployment during off-hours (Tuesday 11pm)
641
- proagents deploy production
642
-
643
- # Output:
644
- # ⚠️ Off-Hours Deployment
645
- # ────────────────────────
646
- # Current time: Tuesday 23:00 EST (off-hours)
647
- #
648
- # Additional requirements:
649
- # - 2 approvals required (instead of 1)
650
- # - On-call team notified
651
- # - Engineering leadership notified
652
- #
653
- # Proceed with approval request? [y/N]
654
- ```
655
-
656
- ---
657
-
658
- ## Example 8: Approval with Automated Checks
659
-
660
- Combine manual approval with automated verification.
661
-
662
- ### Configuration
663
-
664
- ```yaml
665
- approvals:
666
- enabled: true
667
-
668
- automated_checks:
669
- # Checks must pass before approval can be granted
670
- pre_approval:
671
- - name: "tests_pass"
672
- type: "ci_status"
673
- required: true
674
-
675
- - name: "coverage_threshold"
676
- type: "metric"
677
- metric: "test_coverage"
678
- threshold: 80
679
- required: true
680
-
681
- - name: "security_scan"
682
- type: "ci_status"
683
- job: "security-scan"
684
- required: true
685
-
686
- - name: "build_success"
687
- type: "ci_status"
688
- job: "build"
689
- required: true
690
-
691
- # Checks displayed to approver
692
- informational:
693
- - name: "performance_impact"
694
- type: "metric"
695
- metric: "bundle_size_delta"
696
- display: true
697
-
698
- - name: "dependency_changes"
699
- type: "file_diff"
700
- files: ["package.json", "package-lock.json"]
701
- display: true
702
-
703
- feature_approval:
704
- stages:
705
- - name: "tech_review"
706
- approvers: ["@team/tech-leads"]
707
- required: true
708
- blocked_until:
709
- - "tests_pass"
710
- - "coverage_threshold"
711
- - "security_scan"
712
- - "build_success"
713
- ```
714
-
715
- ### Approval with Checks
716
-
717
- ```bash
718
- # Request approval
719
- proagents approval request
720
-
721
- # Output:
722
- # Approval Request: feature/payment-integration
723
- # ─────────────────────────────────────────────
724
- #
725
- # Automated Checks:
726
- # ✅ tests_pass - All 234 tests passing
727
- # ✅ coverage_threshold - 85% (threshold: 80%)
728
- # ✅ security_scan - No vulnerabilities found
729
- # ✅ build_success - Build completed in 2m 34s
730
- #
731
- # Informational:
732
- # ℹ️ performance_impact - Bundle size: +12KB (+2.4%)
733
- # ℹ️ dependency_changes - 2 packages updated
734
- # - stripe: 10.0.0 → 11.0.0
735
- # - zod: 3.20.0 → 3.21.0
736
- #
737
- # Approval Status:
738
- # Stage: tech_review - ⏳ Pending
739
- # Approvers notified: @tech-lead-1, @tech-lead-2
740
- #
741
- # All automated checks passed ✅
742
- # Ready for manual review
743
-
744
- # If checks fail:
745
- # Output:
746
- # ⚠️ Approval Blocked
747
- # ───────────────────
748
- # The following checks must pass before approval:
749
- #
750
- # ❌ coverage_threshold - 72% (threshold: 80%)
751
- # ❌ security_scan - 1 high severity issue found
752
- #
753
- # Fix these issues and push changes to continue.
754
- ```
755
-
756
- ---
757
-
758
- ## Example 9: Delegated Approval
759
-
760
- Allow temporary delegation of approval authority.
761
-
762
- ### Configuration
763
-
764
- ```yaml
765
- approvals:
766
- delegation:
767
- enabled: true
768
-
769
- # Rules for delegation
770
- rules:
771
- - role: "tech_lead"
772
- can_delegate_to: ["senior_developers"]
773
- max_duration: "14d"
774
- require_reason: true
775
-
776
- - role: "engineering_manager"
777
- can_delegate_to: ["tech_leads"]
778
- max_duration: "30d"
779
- require_reason: true
780
-
781
- # Audit
782
- audit:
783
- log_all_delegations: true
784
- notify_on_delegation: true
785
- ```
786
-
787
- ### Delegation Workflow
788
-
789
- ```bash
790
- # Tech lead going on vacation, delegates authority
791
- proagents approval delegate --to @senior-dev --duration 7d --reason "Vacation Jan 15-22"
792
-
793
- # Output:
794
- # Approval Authority Delegated
795
- # ────────────────────────────
796
- # From: @tech-lead
797
- # To: @senior-dev
798
- # Duration: 7 days (Jan 15 - Jan 22)
799
- # Reason: Vacation Jan 15-22
800
- #
801
- # @senior-dev can now:
802
- # ✅ Approve feature reviews
803
- # ✅ Approve staging deployments
804
- # ❌ Approve production deployments (not delegatable)
805
- #
806
- # Delegation logged and team notified.
807
-
808
- # During delegation period
809
- proagents approval status
810
-
811
- # Output:
812
- # Current Approvers for tech_review:
813
- # - @tech-lead (delegated to @senior-dev until Jan 22)
814
- # - @other-tech-lead
815
-
816
- # Revoke delegation early
817
- proagents approval delegate revoke --from @senior-dev
818
-
819
- # Output:
820
- # Delegation Revoked
821
- # ──────────────────
822
- # @senior-dev's delegated authority has been revoked.
823
- # @tech-lead's approval authority is restored.
824
- ```
825
-
826
- ---
827
-
828
- ## Commands Quick Reference
829
-
830
- | Command | Description |
831
- |---------|-------------|
832
- | `proagents approval request` | Request approval for current feature |
833
- | `proagents approval status` | Check approval status |
834
- | `proagents approval approve <id>` | Approve a request |
835
- | `proagents approval reject <id>` | Reject with feedback |
836
- | `proagents approval bypass` | Emergency bypass |
837
- | `proagents approval delegate` | Delegate authority |
838
- | `proagents approval analyze` | Analyze approval requirements |
839
- | `proagents approval history` | View approval history |
840
-
841
- ---
842
-
843
- ## Best Practices
844
-
845
- 1. **Right-size approvals** - Don't require too many approvals for simple changes
846
- 2. **Use conditional rules** - Stricter rules for risky changes, simpler for safe ones
847
- 3. **Enable automation** - Combine automated checks with manual review
848
- 4. **Have bypass procedures** - Emergencies happen, plan for them
849
- 5. **Audit everything** - Keep records of all approvals and bypasses
850
- 6. **Delegate wisely** - Allow delegation for coverage, track it
851
- 7. **Review and iterate** - Regularly review approval rules for effectiveness
852
-
853
- ---
854
-
855
- ## Next Steps
856
-
857
- - [Approval Configuration](./approval-config.md)
858
- - [Emergency Bypass](./emergency-bypass.md)
859
- - [Notifications Setup](./notifications.md)