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,406 +0,0 @@
1
- # Structured Logging
2
-
3
- JSON-formatted logs for better parsing and analysis.
4
-
5
- ---
6
-
7
- ## Why Structured Logging?
8
-
9
- | Unstructured | Structured |
10
- |--------------|------------|
11
- | `User john logged in at 2024-01-15` | `{"event":"login","user":"john","time":"2024-01-15T10:30:00Z"}` |
12
- | Hard to parse | Easy to parse |
13
- | Inconsistent format | Consistent schema |
14
- | Limited querying | Rich querying |
15
- | Manual correlation | Automatic correlation |
16
-
17
- ---
18
-
19
- ## Log Schema
20
-
21
- ### Standard Fields
22
-
23
- ```yaml
24
- # proagents.config.yaml
25
- logging:
26
- structured:
27
- enabled: true
28
-
29
- # Standard fields included in every log
30
- standard_fields:
31
- timestamp:
32
- format: "iso8601"
33
- field_name: "@timestamp"
34
-
35
- level:
36
- field_name: "level"
37
- include_numeric: true
38
-
39
- message:
40
- field_name: "message"
41
-
42
- # Service identification
43
- service:
44
- name: "${SERVICE_NAME}"
45
- version: "${SERVICE_VERSION}"
46
- environment: "${NODE_ENV}"
47
- instance_id: "${HOSTNAME}"
48
-
49
- # Request context (when available)
50
- request:
51
- include: ["request_id", "trace_id", "span_id"]
52
- ```
53
-
54
- ### Log Entry Format
55
-
56
- ```json
57
- {
58
- "@timestamp": "2024-01-15T10:30:00.123Z",
59
- "level": "info",
60
- "level_value": 30,
61
- "message": "User logged in successfully",
62
- "service": {
63
- "name": "auth-service",
64
- "version": "1.2.3",
65
- "environment": "production",
66
- "instance_id": "auth-service-abc123"
67
- },
68
- "request": {
69
- "id": "req-uuid-12345",
70
- "trace_id": "trace-uuid-67890",
71
- "span_id": "span-uuid-11111"
72
- },
73
- "event": {
74
- "type": "user.login",
75
- "outcome": "success"
76
- },
77
- "user": {
78
- "id": "user-123",
79
- "email": "j***@example.com"
80
- },
81
- "http": {
82
- "method": "POST",
83
- "path": "/api/auth/login",
84
- "status_code": 200,
85
- "duration_ms": 145
86
- }
87
- }
88
- ```
89
-
90
- ---
91
-
92
- ## Field Configuration
93
-
94
- ### Custom Fields
95
-
96
- ```yaml
97
- logging:
98
- structured:
99
- custom_fields:
100
- # Business context
101
- tenant:
102
- source: "context.tenant_id"
103
- always_include: true
104
-
105
- feature_flags:
106
- source: "context.active_flags"
107
- include_when: "level <= info"
108
-
109
- # Performance metrics
110
- performance:
111
- include:
112
- - "duration_ms"
113
- - "memory_used"
114
- - "cpu_time"
115
-
116
- # Error details
117
- error:
118
- include_when: "level >= error"
119
- fields:
120
- - "name"
121
- - "message"
122
- - "stack"
123
- - "code"
124
- ```
125
-
126
- ### Field Naming Convention
127
-
128
- ```yaml
129
- logging:
130
- structured:
131
- naming:
132
- # Naming style
133
- style: "snake_case" # or camelCase, kebab-case
134
-
135
- # Namespace separator
136
- separator: "."
137
-
138
- # Reserved prefixes
139
- reserved:
140
- - "@" # Elasticsearch metadata
141
- - "_" # Internal fields
142
- - "ecs." # Elastic Common Schema
143
-
144
- # Field mappings
145
- mappings:
146
- userId: "user.id"
147
- requestId: "request.id"
148
- errorMessage: "error.message"
149
- ```
150
-
151
- ---
152
-
153
- ## Context Propagation
154
-
155
- ### Request Context
156
-
157
- ```yaml
158
- logging:
159
- structured:
160
- context:
161
- # Automatic context capture
162
- auto_capture:
163
- http_request:
164
- include:
165
- - "method"
166
- - "path"
167
- - "query_params"
168
- - "headers.user-agent"
169
- - "headers.x-request-id"
170
- exclude:
171
- - "headers.authorization"
172
- - "headers.cookie"
173
-
174
- user:
175
- include:
176
- - "id"
177
- - "role"
178
- exclude:
179
- - "password"
180
- - "api_key"
181
-
182
- # Context propagation
183
- propagation:
184
- trace_id:
185
- header: "x-trace-id"
186
- generate_if_missing: true
187
-
188
- span_id:
189
- header: "x-span-id"
190
- generate_if_missing: true
191
- ```
192
-
193
- ### Async Context
194
-
195
- ```typescript
196
- // Context management
197
- import { LogContext } from '@proagents/logging';
198
-
199
- // Set context for async operations
200
- LogContext.run({ requestId: 'req-123', userId: 'user-456' }, async () => {
201
- // All logs in this context include requestId and userId
202
- logger.info('Processing started');
203
- await processData();
204
- logger.info('Processing completed');
205
- });
206
- ```
207
-
208
- ---
209
-
210
- ## Log Formatters
211
-
212
- ### JSON Formatter
213
-
214
- ```yaml
215
- logging:
216
- formatters:
217
- json:
218
- # Pretty print in development
219
- pretty:
220
- enabled: "${NODE_ENV !== 'production'}"
221
- indent: 2
222
-
223
- # Escape special characters
224
- escape_unicode: false
225
-
226
- # Include null fields
227
- include_null: false
228
-
229
- # Max depth for nested objects
230
- max_depth: 5
231
-
232
- # Circular reference handling
233
- circular: "replace" # or "error", "ignore"
234
- ```
235
-
236
- ### Output Examples
237
-
238
- ```yaml
239
- logging:
240
- formatters:
241
- # Production (compact JSON)
242
- production:
243
- type: "json"
244
- single_line: true
245
-
246
- # Development (readable)
247
- development:
248
- type: "pretty"
249
- colors: true
250
- timestamp_format: "HH:mm:ss.SSS"
251
-
252
- # Debug (full details)
253
- debug:
254
- type: "json"
255
- pretty: true
256
- include_all: true
257
- ```
258
-
259
- ---
260
-
261
- ## Common Schemas
262
-
263
- ### ECS (Elastic Common Schema)
264
-
265
- ```yaml
266
- logging:
267
- structured:
268
- schema: "ecs"
269
-
270
- ecs:
271
- version: "8.0"
272
-
273
- # Field mappings to ECS
274
- mappings:
275
- timestamp: "@timestamp"
276
- level: "log.level"
277
- message: "message"
278
- service_name: "service.name"
279
- trace_id: "trace.id"
280
- span_id: "span.id"
281
- user_id: "user.id"
282
- http_method: "http.request.method"
283
- http_status: "http.response.status_code"
284
- error_message: "error.message"
285
- error_stack: "error.stack_trace"
286
- ```
287
-
288
- ### OpenTelemetry
289
-
290
- ```yaml
291
- logging:
292
- structured:
293
- schema: "otel"
294
-
295
- otel:
296
- version: "1.0"
297
-
298
- # Resource attributes
299
- resource:
300
- service.name: "${SERVICE_NAME}"
301
- service.version: "${VERSION}"
302
- deployment.environment: "${ENVIRONMENT}"
303
-
304
- # Automatic context from traces
305
- trace_context:
306
- enabled: true
307
- fields:
308
- - "trace_id"
309
- - "span_id"
310
- - "trace_flags"
311
- ```
312
-
313
- ---
314
-
315
- ## Code Examples
316
-
317
- ### JavaScript/TypeScript
318
-
319
- ```typescript
320
- import { createLogger } from '@proagents/logging';
321
-
322
- const logger = createLogger({
323
- name: 'my-service',
324
- level: 'info',
325
- format: 'json',
326
- });
327
-
328
- // Simple log
329
- logger.info('Server started', { port: 3000 });
330
-
331
- // With context
332
- logger.info('User action', {
333
- event: { type: 'purchase', outcome: 'success' },
334
- user: { id: 'user-123' },
335
- order: { id: 'order-456', total: 99.99 },
336
- });
337
-
338
- // Error logging
339
- try {
340
- await processOrder(order);
341
- } catch (error) {
342
- logger.error('Order processing failed', {
343
- error: {
344
- name: error.name,
345
- message: error.message,
346
- stack: error.stack,
347
- },
348
- order: { id: order.id },
349
- });
350
- }
351
- ```
352
-
353
- ### Express Middleware
354
-
355
- ```typescript
356
- import { requestLogger } from '@proagents/logging/express';
357
-
358
- app.use(requestLogger({
359
- // Log request start
360
- logStart: true,
361
-
362
- // Log request end
363
- logEnd: true,
364
-
365
- // Include fields
366
- include: ['method', 'path', 'status', 'duration'],
367
-
368
- // Exclude paths
369
- exclude: ['/health', '/metrics'],
370
-
371
- // Custom field extraction
372
- customFields: (req, res) => ({
373
- user_id: req.user?.id,
374
- tenant_id: req.tenant?.id,
375
- }),
376
- }));
377
- ```
378
-
379
- ---
380
-
381
- ## Commands
382
-
383
- ```bash
384
- # Validate log format
385
- proagents logging validate --format json
386
-
387
- # Convert logs to structured format
388
- proagents logging convert --input app.log --output app.json
389
-
390
- # Query structured logs
391
- proagents logging query --filter 'level:error AND service.name:api'
392
-
393
- # Generate log schema
394
- proagents logging schema --output schema.json
395
- ```
396
-
397
- ---
398
-
399
- ## Best Practices
400
-
401
- 1. **Consistent Schema**: Use the same field names across services
402
- 2. **Include Context**: Add request/trace IDs for correlation
403
- 3. **Avoid Nesting**: Keep structure relatively flat
404
- 4. **Type Consistency**: Same field should have same type
405
- 5. **Meaningful Events**: Use event.type for categorization
406
- 6. **Redact Sensitive Data**: Never log PII or secrets
@@ -1,69 +0,0 @@
1
- # Code Metrics
2
-
3
- This folder contains code quality metrics and reports.
4
-
5
- ## Commands
6
-
7
- - `pa:metrics` - Show current code quality metrics
8
- - `pa:metrics-history` - Show metrics over time
9
- - `pa:coverage` - Show test coverage report
10
- - `pa:coverage-diff` - Show coverage changes
11
-
12
- ## Files
13
-
14
- ```
15
- metrics/
16
- ├── latest.json # Most recent metrics snapshot
17
- ├── history/ # Historical metrics
18
- │ ├── 2024-03-01.json
19
- │ └── 2024-03-15.json
20
- └── README.md
21
- ```
22
-
23
- ## Metrics Format
24
-
25
- ```json
26
- {
27
- "timestamp": "2024-03-06T15:00:00Z",
28
- "generated_by": "Claude:opus-4",
29
- "summary": {
30
- "total_files": 45,
31
- "total_lines": 12500,
32
- "languages": {
33
- "typescript": 10200,
34
- "javascript": 1500,
35
- "css": 800
36
- }
37
- },
38
- "quality": {
39
- "complexity": {
40
- "average": 4.2,
41
- "max": 15,
42
- "high_complexity_files": ["src/utils/parser.ts"]
43
- },
44
- "duplication": {
45
- "percentage": 3.5,
46
- "duplicated_blocks": 12
47
- }
48
- },
49
- "coverage": {
50
- "overall": 82,
51
- "by_module": {
52
- "src/auth": 95,
53
- "src/api": 78,
54
- "src/utils": 65
55
- }
56
- }
57
- }
58
- ```
59
-
60
- ## Thresholds
61
-
62
- Default thresholds (customize in proagents.config.yaml):
63
-
64
- | Metric | Warning | Error |
65
- |--------|---------|-------|
66
- | Coverage | < 70% | < 50% |
67
- | Complexity | > 10 | > 20 |
68
- | File size | > 300 lines | > 500 lines |
69
- | Duplication | > 5% | > 10% |