proagents 1.6.20 → 1.6.21

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 (121) hide show
  1. package/.proagents/custom-commands.yaml +0 -1
  2. package/.proagents/docs/command-details.md +1 -2
  3. package/.proagents/getting-started/ai-training-setup.md +0 -1
  4. package/.proagents/performance/README.md +59 -0
  5. package/.proagents/performance/bundle-analysis.md +375 -0
  6. package/.proagents/performance/load-testing.md +563 -0
  7. package/.proagents/performance/runtime-metrics.md +489 -0
  8. package/.proagents/performance/web-vitals.md +425 -0
  9. package/.proagents/proagents.config.yaml +0 -1
  10. package/.proagents/workflow-modes/entry-modes.md +1 -6
  11. package/lib/commands/init.js +57 -8
  12. package/package.json +1 -1
  13. package/.proagents/api-versioning/README.md +0 -257
  14. package/.proagents/api-versioning/changelog-template.md +0 -225
  15. package/.proagents/api-versioning/deprecation-workflow.md +0 -470
  16. package/.proagents/api-versioning/versioning-strategy.md +0 -291
  17. package/.proagents/automation/README.md +0 -38
  18. package/.proagents/automation/ai-behavior-rules.md +0 -339
  19. package/.proagents/automation/ai-prompt-injection.md +0 -331
  20. package/.proagents/automation/auto-decisions.md +0 -535
  21. package/.proagents/automation/decision-defaults.yaml +0 -317
  22. package/.proagents/cache/README.md +0 -110
  23. package/.proagents/cache/analysis-metadata.json +0 -76
  24. package/.proagents/cache/conventions.json +0 -125
  25. package/.proagents/cache/dependencies.json +0 -85
  26. package/.proagents/cache/features.json +0 -115
  27. package/.proagents/cache/patterns.json +0 -105
  28. package/.proagents/cache/schemas/conventions-schema.json +0 -138
  29. package/.proagents/cache/schemas/dependencies-schema.json +0 -95
  30. package/.proagents/cache/schemas/features-schema.json +0 -104
  31. package/.proagents/cache/schemas/metadata-schema.json +0 -83
  32. package/.proagents/cache/schemas/patterns-schema.json +0 -136
  33. package/.proagents/cache/schemas/structure-schema.json +0 -72
  34. package/.proagents/cache/structure.json +0 -109
  35. package/.proagents/checklists/README.md +0 -261
  36. package/.proagents/checklists/code-quality.md +0 -137
  37. package/.proagents/checklists/code-review.md +0 -148
  38. package/.proagents/checklists/pr-checklist.md +0 -78
  39. package/.proagents/checklists/pre-deployment.md +0 -132
  40. package/.proagents/checklists/pre-implementation.md +0 -80
  41. package/.proagents/checklists/testing.md +0 -120
  42. package/.proagents/checkpoints.json +0 -13
  43. package/.proagents/cicd/README.md +0 -338
  44. package/.proagents/cicd/azure-devops.md +0 -267
  45. package/.proagents/cicd/github-actions.md +0 -375
  46. package/.proagents/cicd/gitlab-ci.md +0 -278
  47. package/.proagents/cicd/jenkins.md +0 -317
  48. package/.proagents/collaboration/README.md +0 -143
  49. package/.proagents/collaboration/roles.md +0 -248
  50. package/.proagents/collaboration/sessions.md +0 -390
  51. package/.proagents/collaboration/sync.md +0 -358
  52. package/.proagents/cost/README.md +0 -48
  53. package/.proagents/cost/cost-template.md +0 -283
  54. package/.proagents/cost/estimation-framework.md +0 -287
  55. package/.proagents/database/README.md +0 -72
  56. package/.proagents/database/examples/001-create-users.sql +0 -129
  57. package/.proagents/database/examples/002-add-preferences.sql +0 -94
  58. package/.proagents/database/examples/003-add-index.sql +0 -105
  59. package/.proagents/database/examples/004-rename-column.sql +0 -122
  60. package/.proagents/database/examples/005-add-foreign-key.sql +0 -142
  61. package/.proagents/database/examples/006-data-migration.sql +0 -196
  62. package/.proagents/database/examples/007-drop-column.sql +0 -163
  63. package/.proagents/database/examples/README.md +0 -89
  64. package/.proagents/database/migration-workflow.md +0 -478
  65. package/.proagents/database/rollback-scripts.md +0 -487
  66. package/.proagents/database/safety-checks.md +0 -447
  67. package/.proagents/git/README.md +0 -68
  68. package/.proagents/git/branch-strategy.md +0 -164
  69. package/.proagents/git/commit-conventions.md +0 -241
  70. package/.proagents/git/pr-workflow.md +0 -286
  71. package/.proagents/git/rollback-procedures.md +0 -416
  72. package/.proagents/ide-integration/README.md +0 -124
  73. package/.proagents/ide-integration/cline-config.md +0 -429
  74. package/.proagents/ide-integration/continue-config.md +0 -380
  75. package/.proagents/ide-integration/cursor-rules.md +0 -280
  76. package/.proagents/ide-integration/github-copilot.md +0 -384
  77. package/.proagents/ide-integration/windsurf-rules.md +0 -314
  78. package/.proagents/integrations/README.md +0 -97
  79. package/.proagents/integrations/pm/README.md +0 -344
  80. package/.proagents/learning/README.md +0 -136
  81. package/.proagents/learning/adaptation.md +0 -305
  82. package/.proagents/learning/data-collection.md +0 -283
  83. package/.proagents/learning/implementation-guide.md +0 -865
  84. package/.proagents/learning/reports.md +0 -306
  85. package/.proagents/mcp/README.md +0 -133
  86. package/.proagents/mcp/context-providers.md +0 -442
  87. package/.proagents/mcp/server-config.md +0 -306
  88. package/.proagents/mcp/tools-definition.md +0 -513
  89. package/.proagents/pm-integration/README.md +0 -151
  90. package/.proagents/pm-integration/asana.md +0 -346
  91. package/.proagents/pm-integration/github-issues.md +0 -308
  92. package/.proagents/pm-integration/gitlab-issues.md +0 -482
  93. package/.proagents/pm-integration/jira.md +0 -364
  94. package/.proagents/pm-integration/linear.md +0 -409
  95. package/.proagents/pm-integration/notion.md +0 -275
  96. package/.proagents/pm-integration/sync-config.md +0 -533
  97. package/.proagents/pm-integration/trello.md +0 -159
  98. package/.proagents/rules/README.md +0 -179
  99. package/.proagents/rules/custom-rules-template.yaml +0 -286
  100. package/.proagents/rules/custom-rules.md +0 -754
  101. package/.proagents/rules/validation-rules-template.yaml +0 -517
  102. package/.proagents/runbooks/README.md +0 -219
  103. package/.proagents/runbooks/dependency-vulnerability.md +0 -505
  104. package/.proagents/runbooks/incident-response.md +0 -451
  105. package/.proagents/runbooks/performance-degradation.md +0 -584
  106. package/.proagents/runbooks/production-debugging.md +0 -489
  107. package/.proagents/sprints/README.md +0 -58
  108. package/.proagents/team/README.md +0 -256
  109. package/.proagents/team/code-ownership.md +0 -306
  110. package/.proagents/team/communication-templates.md +0 -441
  111. package/.proagents/team/handoff-protocol.md +0 -380
  112. package/.proagents/team/ide-setup/README.md +0 -103
  113. package/.proagents/team/ide-setup/cursor.md +0 -276
  114. package/.proagents/team/ide-setup/jetbrains.md +0 -330
  115. package/.proagents/team/ide-setup/neovim.md +0 -640
  116. package/.proagents/team/ide-setup/vscode.md +0 -348
  117. package/.proagents/team/onboarding.md +0 -278
  118. package/.proagents/time-tracking.json +0 -19
  119. package/.proagents/troubleshooting/README.md +0 -730
  120. package/.proagents/troubleshooting/ai-issues.md +0 -601
  121. package/.proagents/troubleshooting/workflow-issues.md +0 -571
@@ -1,478 +0,0 @@
1
- # Database Migration Workflow
2
-
3
- Safe and reliable database schema changes.
4
-
5
- ---
6
-
7
- ## Overview
8
-
9
- Database migrations should be:
10
- - **Versioned** - Track all changes
11
- - **Reversible** - Always have rollback
12
- - **Tested** - Verify before production
13
- - **Documented** - Clear change history
14
-
15
- ---
16
-
17
- ## Migration File Structure
18
-
19
- ```
20
- /migrations/
21
- ├── 001_initial_schema.sql
22
- ├── 002_add_users_table.sql
23
- ├── 003_add_user_email_index.sql
24
- ├── 004_add_preferences_column.sql
25
- ├── rollback/
26
- │ ├── 001_rollback.sql
27
- │ ├── 002_rollback.sql
28
- │ ├── 003_rollback.sql
29
- │ └── 004_rollback.sql
30
- └── seeds/
31
- ├── development.sql
32
- └── test.sql
33
- ```
34
-
35
- ---
36
-
37
- ## Migration Naming Convention
38
-
39
- ```
40
- [VERSION]_[ACTION]_[DESCRIPTION].sql
41
-
42
- Examples:
43
- 001_create_users_table.sql
44
- 002_add_email_to_users.sql
45
- 003_create_orders_table.sql
46
- 004_add_index_on_users_email.sql
47
- 005_alter_users_add_preferences.sql
48
- 006_drop_legacy_table.sql
49
- ```
50
-
51
- ---
52
-
53
- ## Creating Migrations
54
-
55
- ### New Table
56
-
57
- ```sql
58
- -- migrations/001_create_users_table.sql
59
-
60
- -- Up Migration
61
- CREATE TABLE users (
62
- id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
63
- email VARCHAR(255) NOT NULL UNIQUE,
64
- name VARCHAR(255) NOT NULL,
65
- created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
66
- updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
67
- );
68
-
69
- CREATE INDEX idx_users_email ON users(email);
70
-
71
- -- Record migration
72
- INSERT INTO schema_migrations (version, applied_at)
73
- VALUES ('001', NOW());
74
- ```
75
-
76
- ```sql
77
- -- migrations/rollback/001_rollback.sql
78
-
79
- -- Down Migration
80
- DROP TABLE IF EXISTS users;
81
-
82
- DELETE FROM schema_migrations WHERE version = '001';
83
- ```
84
-
85
- ### Add Column
86
-
87
- ```sql
88
- -- migrations/002_add_user_preferences.sql
89
-
90
- -- Up Migration
91
- ALTER TABLE users
92
- ADD COLUMN preferences JSONB DEFAULT '{}';
93
-
94
- INSERT INTO schema_migrations (version, applied_at)
95
- VALUES ('002', NOW());
96
- ```
97
-
98
- ```sql
99
- -- migrations/rollback/002_rollback.sql
100
-
101
- -- Down Migration
102
- ALTER TABLE users
103
- DROP COLUMN IF EXISTS preferences;
104
-
105
- DELETE FROM schema_migrations WHERE version = '002';
106
- ```
107
-
108
- ### Add Index
109
-
110
- ```sql
111
- -- migrations/003_add_created_at_index.sql
112
-
113
- -- Up Migration (CONCURRENTLY for zero-downtime)
114
- CREATE INDEX CONCURRENTLY idx_users_created_at
115
- ON users(created_at);
116
-
117
- INSERT INTO schema_migrations (version, applied_at)
118
- VALUES ('003', NOW());
119
- ```
120
-
121
- ```sql
122
- -- migrations/rollback/003_rollback.sql
123
-
124
- -- Down Migration
125
- DROP INDEX IF EXISTS idx_users_created_at;
126
-
127
- DELETE FROM schema_migrations WHERE version = '003';
128
- ```
129
-
130
- ### Data Migration
131
-
132
- ```sql
133
- -- migrations/004_backfill_user_status.sql
134
-
135
- -- Up Migration
136
- -- First, add the column
137
- ALTER TABLE users ADD COLUMN status VARCHAR(20);
138
-
139
- -- Then, backfill existing data
140
- UPDATE users SET status = 'active' WHERE status IS NULL;
141
-
142
- -- Finally, add constraint
143
- ALTER TABLE users ALTER COLUMN status SET NOT NULL;
144
- ALTER TABLE users ALTER COLUMN status SET DEFAULT 'active';
145
-
146
- INSERT INTO schema_migrations (version, applied_at)
147
- VALUES ('004', NOW());
148
- ```
149
-
150
- ---
151
-
152
- ## Migration Safety Rules
153
-
154
- ### Risk Assessment
155
-
156
- | Change Type | Risk Level | Approach |
157
- |-------------|------------|----------|
158
- | Add table | Low | Standard migration |
159
- | Add column (nullable) | Low | Standard migration |
160
- | Add column (NOT NULL) | Medium | Add nullable → backfill → add constraint |
161
- | Add index | Low-Medium | Use CONCURRENTLY |
162
- | Drop column | Medium | Verify no dependencies |
163
- | Drop table | High | Multiple approvals |
164
- | Rename column | High | Expand-contract pattern |
165
- | Change data type | High | Create new column, migrate |
166
-
167
- ### Safety Checklist
168
-
169
- ```markdown
170
- ## Migration Safety Checklist
171
-
172
- - [ ] Reviewed by DBA or senior dev
173
- - [ ] Tested on copy of production data
174
- - [ ] Rollback script created and tested
175
- - [ ] Estimated execution time acceptable
176
- - [ ] Lock time acceptable (for ALTER)
177
- - [ ] Disk space sufficient
178
- - [ ] Backup taken before execution
179
- - [ ] Monitoring alerts configured
180
- - [ ] Rollback procedure documented
181
- ```
182
-
183
- ---
184
-
185
- ## Zero-Downtime Migrations
186
-
187
- ### Expand-Contract Pattern
188
-
189
- For breaking changes (rename, type change):
190
-
191
- **Phase 1: Expand**
192
- ```sql
193
- -- Add new column
194
- ALTER TABLE users ADD COLUMN email_new VARCHAR(255);
195
-
196
- -- Copy existing data
197
- UPDATE users SET email_new = email;
198
-
199
- -- Add constraint
200
- ALTER TABLE users ALTER COLUMN email_new SET NOT NULL;
201
- CREATE UNIQUE INDEX idx_users_email_new ON users(email_new);
202
- ```
203
-
204
- **Phase 2: Migrate Application**
205
- ```javascript
206
- // Update app to write to both columns
207
- user.email = value;
208
- user.email_new = value;
209
-
210
- // Then update to read from new column
211
- const email = user.email_new;
212
- ```
213
-
214
- **Phase 3: Contract**
215
- ```sql
216
- -- Remove old column (after app fully migrated)
217
- ALTER TABLE users DROP COLUMN email;
218
-
219
- -- Rename new column (optional)
220
- ALTER TABLE users RENAME COLUMN email_new TO email;
221
- ```
222
-
223
- ### Adding NOT NULL Column
224
-
225
- ```sql
226
- -- Step 1: Add nullable column
227
- ALTER TABLE users ADD COLUMN phone VARCHAR(20);
228
-
229
- -- Step 2: Backfill in batches
230
- DO $$
231
- DECLARE
232
- batch_size INT := 1000;
233
- total_rows INT;
234
- BEGIN
235
- SELECT COUNT(*) INTO total_rows FROM users WHERE phone IS NULL;
236
-
237
- WHILE total_rows > 0 LOOP
238
- UPDATE users
239
- SET phone = 'unknown'
240
- WHERE id IN (
241
- SELECT id FROM users WHERE phone IS NULL LIMIT batch_size
242
- );
243
-
244
- SELECT COUNT(*) INTO total_rows FROM users WHERE phone IS NULL;
245
- COMMIT;
246
- END LOOP;
247
- END $$;
248
-
249
- -- Step 3: Add constraint
250
- ALTER TABLE users ALTER COLUMN phone SET NOT NULL;
251
- ALTER TABLE users ALTER COLUMN phone SET DEFAULT 'unknown';
252
- ```
253
-
254
- ---
255
-
256
- ## Running Migrations
257
-
258
- ### Development
259
-
260
- ```bash
261
- # Using a migration tool (example: migrate)
262
- migrate -path ./migrations -database "postgres://..." up
263
-
264
- # Rollback last migration
265
- migrate -path ./migrations -database "postgres://..." down 1
266
-
267
- # Go to specific version
268
- migrate -path ./migrations -database "postgres://..." goto 3
269
- ```
270
-
271
- ### Staging
272
-
273
- ```bash
274
- # Always take backup first
275
- pg_dump -h staging-db -d myapp > backup_$(date +%Y%m%d).sql
276
-
277
- # Run migrations
278
- migrate -path ./migrations -database "$STAGING_DB_URL" up
279
-
280
- # Verify
281
- psql -h staging-db -d myapp -c "SELECT * FROM schema_migrations;"
282
- ```
283
-
284
- ### Production
285
-
286
- ```markdown
287
- ## Production Migration Checklist
288
-
289
- ### Before
290
- - [ ] Migration tested on staging
291
- - [ ] Migration tested on production data copy
292
- - [ ] Backup completed
293
- - [ ] Rollback script ready
294
- - [ ] Maintenance window scheduled (if needed)
295
- - [ ] Team notified
296
- - [ ] Monitoring dashboard open
297
-
298
- ### Execute
299
- - [ ] Run migration
300
- - [ ] Monitor for errors
301
- - [ ] Check query performance
302
- - [ ] Verify application works
303
-
304
- ### After
305
- - [ ] Confirm success
306
- - [ ] Update documentation
307
- - [ ] Notify team
308
- ```
309
-
310
- ---
311
-
312
- ## ORM Migrations
313
-
314
- ### Prisma
315
-
316
- ```javascript
317
- // prisma/schema.prisma
318
- model User {
319
- id String @id @default(uuid())
320
- email String @unique
321
- name String
322
- createdAt DateTime @default(now())
323
- }
324
- ```
325
-
326
- ```bash
327
- # Create migration
328
- npx prisma migrate dev --name add_users_table
329
-
330
- # Apply to production
331
- npx prisma migrate deploy
332
-
333
- # Reset (development only)
334
- npx prisma migrate reset
335
- ```
336
-
337
- ### TypeORM
338
-
339
- ```typescript
340
- // migrations/1234567890-CreateUsersTable.ts
341
- export class CreateUsersTable1234567890 implements MigrationInterface {
342
- public async up(queryRunner: QueryRunner): Promise<void> {
343
- await queryRunner.query(`
344
- CREATE TABLE users (
345
- id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
346
- email VARCHAR(255) NOT NULL UNIQUE
347
- )
348
- `);
349
- }
350
-
351
- public async down(queryRunner: QueryRunner): Promise<void> {
352
- await queryRunner.query(`DROP TABLE users`);
353
- }
354
- }
355
- ```
356
-
357
- ```bash
358
- # Generate migration
359
- npm run typeorm migration:generate -- -n CreateUsersTable
360
-
361
- # Run migrations
362
- npm run typeorm migration:run
363
-
364
- # Revert
365
- npm run typeorm migration:revert
366
- ```
367
-
368
- ### Knex
369
-
370
- ```javascript
371
- // migrations/001_create_users.js
372
- exports.up = function(knex) {
373
- return knex.schema.createTable('users', table => {
374
- table.uuid('id').primary().defaultTo(knex.raw('gen_random_uuid()'));
375
- table.string('email').notNullable().unique();
376
- table.timestamps(true, true);
377
- });
378
- };
379
-
380
- exports.down = function(knex) {
381
- return knex.schema.dropTable('users');
382
- };
383
- ```
384
-
385
- ```bash
386
- # Run migrations
387
- npx knex migrate:latest
388
-
389
- # Rollback
390
- npx knex migrate:rollback
391
- ```
392
-
393
- ---
394
-
395
- ## Migration Testing
396
-
397
- ```markdown
398
- ## Migration Test Plan
399
-
400
- ### Unit Test
401
- - [ ] Up migration syntax valid
402
- - [ ] Down migration syntax valid
403
- - [ ] Migration is idempotent
404
-
405
- ### Integration Test
406
- - [ ] Run on empty database
407
- - [ ] Run on database with existing data
408
- - [ ] Rollback works correctly
409
- - [ ] Application works after migration
410
-
411
- ### Performance Test
412
- - [ ] Measure execution time
413
- - [ ] Check lock duration
414
- - [ ] Monitor resource usage
415
- ```
416
-
417
- ### Test Script
418
-
419
- ```bash
420
- #!/bin/bash
421
- # test-migration.sh
422
-
423
- # Setup test database
424
- createdb test_migrations
425
-
426
- # Run all migrations
427
- migrate -path ./migrations -database "postgres://localhost/test_migrations" up
428
-
429
- # Run tests
430
- npm run test:db
431
-
432
- # Rollback all
433
- migrate -path ./migrations -database "postgres://localhost/test_migrations" down -all
434
-
435
- # Cleanup
436
- dropdb test_migrations
437
- ```
438
-
439
- ---
440
-
441
- ## Configuration
442
-
443
- ```yaml
444
- # proagents.config.yaml
445
- database:
446
- migrations:
447
- path: "./migrations"
448
- tool: "migrate" # migrate, prisma, typeorm, knex
449
-
450
- safety:
451
- require_rollback: true
452
- require_review: true
453
- auto_backup: true
454
- test_on_copy: true
455
-
456
- risk_levels:
457
- drop_table: "high"
458
- drop_column: "medium"
459
- add_index: "low"
460
- add_column: "low"
461
-
462
- approvals:
463
- high_risk: ["dba", "tech-lead"]
464
- medium_risk: ["senior-dev"]
465
- low_risk: ["any-dev"]
466
- ```
467
-
468
- ---
469
-
470
- ## Commands
471
-
472
- | Command | Description |
473
- |---------|-------------|
474
- | `pa:migration-create [name]` | Create new migration |
475
- | `pa:migration-run` | Run pending migrations |
476
- | `pa:migration-rollback` | Rollback last migration |
477
- | `pa:migration-status` | Show migration status |
478
- | `pa:migration-test` | Test migration |