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,787 +0,0 @@
1
- # Monorepo Setup Walkthrough
2
-
3
- A complete step-by-step guide to setting up a monorepo with ProAgents.
4
-
5
- ---
6
-
7
- ## Scenario
8
-
9
- We're building **TaskFlow**, a task management platform with:
10
- - **Web App** (Next.js)
11
- - **API Server** (Node.js/Express)
12
- - **Mobile App** (React Native)
13
- - **Shared Packages** (Types, Utils, UI Components)
14
-
15
- ---
16
-
17
- ## Step 1: Create Directory Structure
18
-
19
- ```bash
20
- # Create the monorepo root
21
- mkdir taskflow && cd taskflow
22
-
23
- # Initialize git
24
- git init
25
-
26
- # Create the structure
27
- mkdir -p apps/{web,api,mobile}
28
- mkdir -p packages/{types,utils,ui}
29
- mkdir -p shared/.proagents/{standards,rules,templates}
30
- mkdir -p .proagents
31
- ```
32
-
33
- **Result:**
34
- ```
35
- taskflow/
36
- ├── apps/
37
- │ ├── web/
38
- │ ├── api/
39
- │ └── mobile/
40
- ├── packages/
41
- │ ├── types/
42
- │ ├── utils/
43
- │ └── ui/
44
- ├── shared/
45
- │ └── .proagents/
46
- │ ├── standards/
47
- │ ├── rules/
48
- │ └── templates/
49
- └── .proagents/
50
- ```
51
-
52
- ---
53
-
54
- ## Step 2: Initialize Package Manager (pnpm/yarn/npm)
55
-
56
- Using pnpm (recommended for monorepos):
57
-
58
- ```bash
59
- # Initialize pnpm workspace
60
- cat > pnpm-workspace.yaml << 'EOF'
61
- packages:
62
- - 'apps/*'
63
- - 'packages/*'
64
- EOF
65
-
66
- # Initialize root package.json
67
- cat > package.json << 'EOF'
68
- {
69
- "name": "taskflow",
70
- "private": true,
71
- "scripts": {
72
- "dev": "turbo run dev",
73
- "build": "turbo run build",
74
- "test": "turbo run test",
75
- "lint": "turbo run lint"
76
- },
77
- "devDependencies": {
78
- "turbo": "^1.10.0"
79
- }
80
- }
81
- EOF
82
-
83
- # Install dependencies
84
- pnpm install
85
- ```
86
-
87
- ---
88
-
89
- ## Step 3: Initialize ProAgents Workspace
90
-
91
- ```bash
92
- # Create workspace configuration
93
- cat > proagents.workspace.yaml << 'EOF'
94
- # ProAgents Workspace Configuration
95
- # TaskFlow Monorepo
96
-
97
- workspace:
98
- name: "TaskFlow"
99
- description: "Task management platform monorepo"
100
- version: "1.0.0"
101
-
102
- projects:
103
- # Web Application
104
- - name: web
105
- path: ./apps/web
106
- type: web-frontend
107
- framework: nextjs
108
- port: 3000
109
- description: "Next.js web application"
110
-
111
- # API Server
112
- - name: api
113
- path: ./apps/api
114
- type: nodejs
115
- framework: express
116
- port: 4000
117
- description: "Express REST API server"
118
-
119
- # Mobile Application
120
- - name: mobile
121
- path: ./apps/mobile
122
- type: react-native
123
- description: "React Native mobile app"
124
-
125
- # Shared Packages
126
- - name: types
127
- path: ./packages/types
128
- type: library
129
- description: "Shared TypeScript types"
130
-
131
- - name: utils
132
- path: ./packages/utils
133
- type: library
134
- description: "Shared utility functions"
135
-
136
- - name: ui
137
- path: ./packages/ui
138
- type: library
139
- description: "Shared UI components"
140
-
141
- # Shared Configuration
142
- shared:
143
- standards: ./shared/.proagents/standards/
144
- rules: ./shared/.proagents/rules/
145
- templates: ./shared/.proagents/templates/
146
-
147
- # Cross-Project Configuration
148
- cross_project:
149
- dependency_tracking: true
150
- unified_changelog: true
151
- shared_analysis_cache: true
152
- coordinated_deployments: true
153
-
154
- # Deployment Configuration
155
- deployment:
156
- environments:
157
- - name: development
158
- auto_deploy: true
159
- - name: staging
160
- auto_deploy: false
161
- require_approval: true
162
- - name: production
163
- auto_deploy: false
164
- require_approval: true
165
- approval_roles:
166
- - tech_lead
167
- - devops
168
- EOF
169
- ```
170
-
171
- ---
172
-
173
- ## Step 4: Create Shared Standards
174
-
175
- ### 4.1 Coding Standards
176
-
177
- ```bash
178
- cat > shared/.proagents/standards/coding-standards.md << 'EOF'
179
- # TaskFlow Coding Standards
180
-
181
- ## TypeScript
182
- - Strict mode enabled
183
- - No `any` types (use `unknown` instead)
184
- - Explicit return types for functions
185
-
186
- ## Naming Conventions
187
- - Components: PascalCase (e.g., `TaskCard.tsx`)
188
- - Hooks: camelCase with `use` prefix (e.g., `useTaskList.ts`)
189
- - Types/Interfaces: PascalCase with descriptive names
190
- - Files: kebab-case for utilities, PascalCase for components
191
-
192
- ## Import Order
193
- 1. React/Node built-ins
194
- 2. External dependencies
195
- 3. Internal packages (@taskflow/*)
196
- 4. Relative imports
197
- 5. Styles
198
-
199
- ## Code Style
200
- - Max line length: 100 characters
201
- - 2 space indentation
202
- - Single quotes for strings
203
- - Semicolons required
204
- EOF
205
- ```
206
-
207
- ### 4.2 Architecture Rules
208
-
209
- ```bash
210
- cat > shared/.proagents/standards/architecture-rules.md << 'EOF'
211
- # TaskFlow Architecture Rules
212
-
213
- ## Dependency Rules
214
-
215
- ### Apps can import from:
216
- - @taskflow/types (shared types)
217
- - @taskflow/utils (shared utilities)
218
- - @taskflow/ui (shared UI - web and mobile only)
219
-
220
- ### Packages cannot import from:
221
- - apps/* (no app code in packages)
222
- - Each other (unless explicitly declared)
223
-
224
- ## API Patterns
225
-
226
- ### All API calls must:
227
- 1. Go through the API client in @taskflow/utils
228
- 2. Use typed request/response from @taskflow/types
229
- 3. Handle errors consistently
230
-
231
- ## State Management
232
-
233
- - Web: Zustand for global state
234
- - Mobile: Zustand for global state
235
- - API: No state (stateless)
236
-
237
- ## Authentication
238
-
239
- - JWT tokens stored securely
240
- - Refresh token rotation enabled
241
- - Auth context/hooks for all apps
242
- EOF
243
- ```
244
-
245
- ### 4.3 Custom Rules
246
-
247
- ```bash
248
- cat > shared/.proagents/rules/workspace-rules.yaml << 'EOF'
249
- # TaskFlow Workspace Rules
250
-
251
- rules:
252
- # Enforce package boundaries
253
- - id: no-cross-app-imports
254
- type: import
255
- pattern: "apps/*/src/**"
256
- disallow: "apps/*/src/**"
257
- message: "Apps cannot import from other apps directly"
258
- severity: error
259
-
260
- # Require shared types
261
- - id: use-shared-types
262
- type: import
263
- condition: "defines types used across projects"
264
- requires: "import from @taskflow/types"
265
- message: "Shared types must be in @taskflow/types"
266
- severity: warning
267
-
268
- # API versioning
269
- - id: api-versioning
270
- type: pattern
271
- applies_to: "apps/api/src/routes/**"
272
- pattern: "/api/v[0-9]+"
273
- message: "API routes must be versioned"
274
- severity: error
275
- EOF
276
- ```
277
-
278
- ---
279
-
280
- ## Step 5: Initialize Each Project
281
-
282
- ### 5.1 Web App (Next.js)
283
-
284
- ```bash
285
- cd apps/web
286
-
287
- # Initialize Next.js app (or copy existing)
288
- pnpm create next-app . --typescript --tailwind --eslint
289
-
290
- # Create project-specific ProAgents config
291
- mkdir proagents
292
- cat > .proagents/proagents.config.yaml << 'EOF'
293
- # Web App Configuration
294
- # Inherits from workspace, adds project-specific settings
295
-
296
- project:
297
- name: "TaskFlow Web"
298
- type: "web-frontend"
299
- framework: "nextjs"
300
-
301
- extends:
302
- - "../../shared/.proagents/standards"
303
- - "../../shared/.proagents/rules"
304
-
305
- # Project-specific overrides
306
- checkpoints:
307
- after_ui_design: true
308
- after_implementation: true
309
-
310
- testing:
311
- framework: "jest"
312
- coverage_threshold: 80
313
- e2e:
314
- framework: "playwright"
315
-
316
- deployment:
317
- platform: "vercel"
318
- preview_on_pr: true
319
- EOF
320
-
321
- cd ../..
322
- ```
323
-
324
- ### 5.2 API Server (Express)
325
-
326
- ```bash
327
- cd apps/api
328
-
329
- # Initialize package
330
- cat > package.json << 'EOF'
331
- {
332
- "name": "@taskflow/api",
333
- "version": "1.0.0",
334
- "main": "dist/index.js",
335
- "scripts": {
336
- "dev": "tsx watch src/index.ts",
337
- "build": "tsc",
338
- "start": "node dist/index.js",
339
- "test": "jest"
340
- },
341
- "dependencies": {
342
- "express": "^4.18.2",
343
- "@taskflow/types": "workspace:*",
344
- "@taskflow/utils": "workspace:*"
345
- },
346
- "devDependencies": {
347
- "typescript": "^5.0.0",
348
- "tsx": "^4.0.0",
349
- "@types/express": "^4.17.0"
350
- }
351
- }
352
- EOF
353
-
354
- # Create ProAgents config
355
- mkdir proagents
356
- cat > .proagents/proagents.config.yaml << 'EOF'
357
- # API Server Configuration
358
-
359
- project:
360
- name: "TaskFlow API"
361
- type: "nodejs"
362
- framework: "express"
363
-
364
- extends:
365
- - "../../shared/.proagents/standards"
366
- - "../../shared/.proagents/rules"
367
-
368
- # API-specific settings
369
- api:
370
- versioning: "url"
371
- documentation: "openapi"
372
-
373
- security:
374
- require_auth_review: true
375
- scan_dependencies: "daily"
376
-
377
- testing:
378
- framework: "jest"
379
- coverage_threshold: 85
380
- integration_tests: true
381
-
382
- deployment:
383
- platform: "railway"
384
- auto_scale: true
385
- EOF
386
-
387
- cd ../..
388
- ```
389
-
390
- ### 5.3 Mobile App (React Native)
391
-
392
- ```bash
393
- cd apps/mobile
394
-
395
- # Initialize React Native (or use existing)
396
- # npx react-native init TaskFlowMobile --template react-native-template-typescript
397
-
398
- # Create ProAgents config
399
- mkdir proagents
400
- cat > .proagents/proagents.config.yaml << 'EOF'
401
- # Mobile App Configuration
402
-
403
- project:
404
- name: "TaskFlow Mobile"
405
- type: "react-native"
406
-
407
- extends:
408
- - "../../shared/.proagents/standards"
409
- - "../../shared/.proagents/rules"
410
-
411
- # Mobile-specific settings
412
- platforms:
413
- - ios
414
- - android
415
-
416
- testing:
417
- framework: "jest"
418
- coverage_threshold: 75
419
- detox: true
420
-
421
- deployment:
422
- ios:
423
- platform: "app-store-connect"
424
- testflight: true
425
- android:
426
- platform: "google-play"
427
- internal_testing: true
428
- EOF
429
-
430
- cd ../..
431
- ```
432
-
433
- ### 5.4 Shared Packages
434
-
435
- ```bash
436
- # Types package
437
- cd packages/types
438
- cat > package.json << 'EOF'
439
- {
440
- "name": "@taskflow/types",
441
- "version": "1.0.0",
442
- "main": "dist/index.js",
443
- "types": "dist/index.d.ts",
444
- "scripts": {
445
- "build": "tsc"
446
- }
447
- }
448
- EOF
449
-
450
- mkdir src
451
- cat > src/index.ts << 'EOF'
452
- // Task types
453
- export interface Task {
454
- id: string;
455
- title: string;
456
- description?: string;
457
- status: TaskStatus;
458
- priority: TaskPriority;
459
- assigneeId?: string;
460
- createdAt: Date;
461
- updatedAt: Date;
462
- }
463
-
464
- export type TaskStatus = 'todo' | 'in_progress' | 'review' | 'done';
465
- export type TaskPriority = 'low' | 'medium' | 'high' | 'urgent';
466
-
467
- // User types
468
- export interface User {
469
- id: string;
470
- email: string;
471
- name: string;
472
- avatarUrl?: string;
473
- }
474
-
475
- // API types
476
- export interface ApiResponse<T> {
477
- data: T;
478
- meta?: {
479
- page?: number;
480
- total?: number;
481
- };
482
- }
483
-
484
- export interface ApiError {
485
- code: string;
486
- message: string;
487
- details?: Record<string, unknown>;
488
- }
489
- EOF
490
-
491
- cd ../..
492
-
493
- # Utils package
494
- cd packages/utils
495
- cat > package.json << 'EOF'
496
- {
497
- "name": "@taskflow/utils",
498
- "version": "1.0.0",
499
- "main": "dist/index.js",
500
- "scripts": {
501
- "build": "tsc",
502
- "test": "jest"
503
- },
504
- "dependencies": {
505
- "@taskflow/types": "workspace:*"
506
- }
507
- }
508
- EOF
509
-
510
- mkdir src
511
- cat > src/index.ts << 'EOF'
512
- export * from './api-client';
513
- export * from './formatters';
514
- export * from './validators';
515
- EOF
516
-
517
- cat > src/api-client.ts << 'EOF'
518
- import type { ApiResponse, ApiError } from '@taskflow/types';
519
-
520
- const API_BASE_URL = process.env.API_URL || 'http://localhost:4000/api/v1';
521
-
522
- export async function apiRequest<T>(
523
- endpoint: string,
524
- options?: RequestInit
525
- ): Promise<ApiResponse<T>> {
526
- const response = await fetch(`${API_BASE_URL}${endpoint}`, {
527
- ...options,
528
- headers: {
529
- 'Content-Type': 'application/json',
530
- ...options?.headers,
531
- },
532
- });
533
-
534
- if (!response.ok) {
535
- const error: ApiError = await response.json();
536
- throw new Error(error.message);
537
- }
538
-
539
- return response.json();
540
- }
541
- EOF
542
-
543
- cd ../..
544
- ```
545
-
546
- ---
547
-
548
- ## Step 6: Define Cross-Project Dependencies
549
-
550
- ```bash
551
- cat > .proagents/cross-project-deps.json << 'EOF'
552
- {
553
- "version": "1.0",
554
- "dependencies": [
555
- {
556
- "from": "web",
557
- "to": "api",
558
- "type": "api_consumer",
559
- "contract": "openapi",
560
- "description": "Web app consumes REST API"
561
- },
562
- {
563
- "from": "mobile",
564
- "to": "api",
565
- "type": "api_consumer",
566
- "contract": "openapi",
567
- "description": "Mobile app consumes REST API"
568
- },
569
- {
570
- "from": "web",
571
- "to": "types",
572
- "type": "package",
573
- "description": "Web uses shared types"
574
- },
575
- {
576
- "from": "api",
577
- "to": "types",
578
- "type": "package",
579
- "description": "API uses shared types"
580
- },
581
- {
582
- "from": "mobile",
583
- "to": "types",
584
- "type": "package",
585
- "description": "Mobile uses shared types"
586
- }
587
- ],
588
- "deployment_order": [
589
- {
590
- "environment": "production",
591
- "order": ["types", "utils", "ui", "api", "web", "mobile"]
592
- }
593
- ]
594
- }
595
- EOF
596
- ```
597
-
598
- ---
599
-
600
- ## Step 7: Create Unified Changelog
601
-
602
- ```bash
603
- mkdir -p .proagents/changelog
604
-
605
- cat > .proagents/changelog/CHANGELOG.md << 'EOF'
606
- # TaskFlow Changelog
607
-
608
- All notable changes across all projects.
609
-
610
- ## [Unreleased]
611
-
612
- ### Web
613
- - Initial setup
614
-
615
- ### API
616
- - Initial setup
617
-
618
- ### Mobile
619
- - Initial setup
620
-
621
- ---
622
-
623
- ## Format
624
-
625
- Each entry includes:
626
- - **[project]** Change description
627
- - Links to commits/PRs
628
- - Breaking change indicators
629
- EOF
630
- ```
631
-
632
- ---
633
-
634
- ## Step 8: Verify Setup
635
-
636
- ```bash
637
- # Check workspace status
638
- proagents workspace status
639
-
640
- # Expected output:
641
- # ┌─────────────────────────────────────────────────┐
642
- # │ TaskFlow Workspace │
643
- # ├─────────────────────────────────────────────────┤
644
- # │ Projects: 6 │
645
- # │ │
646
- # │ ✓ web (Next.js) apps/web │
647
- # │ ✓ api (Express) apps/api │
648
- # │ ✓ mobile (RN) apps/mobile │
649
- # │ ✓ types (Library) packages/types │
650
- # │ ✓ utils (Library) packages/utils │
651
- # │ ✓ ui (Library) packages/ui │
652
- # │ │
653
- # │ Shared Config: ✓ Loaded │
654
- # │ Dependencies: 5 defined │
655
- # └─────────────────────────────────────────────────┘
656
-
657
- # Validate workspace configuration
658
- proagents workspace validate
659
-
660
- # Check cross-project dependencies
661
- proagents workspace deps --graph
662
- ```
663
-
664
- ---
665
-
666
- ## Step 9: Working with the Monorepo
667
-
668
- ### Start a Cross-Project Feature
669
-
670
- ```bash
671
- # Start a feature that spans multiple projects
672
- proagents feature start "Add task comments" --projects web,api,types
673
-
674
- # ProAgents will:
675
- # 1. Create branches in all affected projects
676
- # 2. Track dependencies between changes
677
- # 3. Coordinate commits and PRs
678
- ```
679
-
680
- ### Run Commands Across Projects
681
-
682
- ```bash
683
- # Build all projects
684
- proagents workspace run build
685
-
686
- # Test specific projects
687
- proagents workspace run test --filter web,api
688
-
689
- # Lint all with shared rules
690
- proagents workspace run lint
691
- ```
692
-
693
- ### Deploy Coordinated Changes
694
-
695
- ```bash
696
- # Deploy to staging (respects deployment order)
697
- proagents workspace deploy staging
698
-
699
- # Deploy order: types → utils → api → web → mobile
700
- ```
701
-
702
- ---
703
-
704
- ## Common Operations
705
-
706
- ### Add a New Package
707
-
708
- ```bash
709
- # Create new shared package
710
- proagents workspace add-package hooks --path packages/hooks
711
-
712
- # This will:
713
- # 1. Create package structure
714
- # 2. Add to workspace config
715
- # 3. Configure with shared standards
716
- ```
717
-
718
- ### Sync Configuration Changes
719
-
720
- ```bash
721
- # After updating shared standards
722
- proagents workspace sync
723
-
724
- # Validates all projects against updated standards
725
- ```
726
-
727
- ### Check for Breaking Changes
728
-
729
- ```bash
730
- # Before merging a feature
731
- proagents workspace check-breaking
732
-
733
- # Reports any cross-project breaking changes
734
- ```
735
-
736
- ---
737
-
738
- ## Troubleshooting
739
-
740
- ### Issue: Package not found
741
-
742
- ```
743
- Error: Cannot find module '@taskflow/types'
744
- ```
745
-
746
- **Solution:**
747
- ```bash
748
- # Rebuild packages
749
- pnpm build --filter @taskflow/types
750
- # Or build all
751
- pnpm build
752
- ```
753
-
754
- ### Issue: Circular dependency detected
755
-
756
- ```
757
- Error: Circular dependency: web → utils → types → web
758
- ```
759
-
760
- **Solution:**
761
- - Review the dependency graph
762
- - Extract shared code to a lower-level package
763
- - Use dependency injection to break cycles
764
-
765
- ### Issue: Workspace config not loading
766
-
767
- ```
768
- Error: proagents.workspace.yaml not found
769
- ```
770
-
771
- **Solution:**
772
- ```bash
773
- # Ensure you're in workspace root
774
- cd /path/to/taskflow
775
-
776
- # Verify file exists
777
- cat proagents.workspace.yaml
778
- ```
779
-
780
- ---
781
-
782
- ## Next Steps
783
-
784
- 1. **Add CI/CD**: Set up GitHub Actions for the monorepo
785
- 2. **Add More Packages**: As needed for shared code
786
- 3. **Configure Environments**: Set up dev, staging, production
787
- 4. **Team Onboarding**: Use this guide to onboard new developers