proagents 1.6.17 → 1.6.19

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 (185) hide show
  1. package/.claude/settings.local.json +169 -0
  2. package/.proagents/AGENTS.md +2 -0
  3. package/.proagents/AI_INSTRUCTIONS.md +13 -0
  4. package/.proagents/ANTIGRAVITY.md +2 -0
  5. package/.proagents/BOLT.md +2 -0
  6. package/.proagents/CHATGPT.md +2 -0
  7. package/.proagents/CLAUDE.md +2 -0
  8. package/.proagents/GEMINI.md +2 -0
  9. package/.proagents/GROQ.md +2 -0
  10. package/.proagents/KIRO.md +2 -0
  11. package/.proagents/LOVABLE.md +2 -0
  12. package/.proagents/PROAGENTS.md +2 -0
  13. package/.proagents/REPLIT.md +2 -0
  14. package/.proagents/prompts/00-project-setup.md +878 -0
  15. package/.proagents/prompts/04-planning.md +38 -0
  16. package/.proagents/prompts/12-rnd.md +957 -0
  17. package/.proagents/workflow-modes/entry-modes.md +27 -0
  18. package/.proagents/worklog/_context.template.md +47 -0
  19. package/COMMANDS.md +654 -0
  20. package/README.md +16 -24
  21. package/package.json +2 -7
  22. package/.proagents/ai-models/README.md +0 -141
  23. package/.proagents/ai-models/cost-management.md +0 -362
  24. package/.proagents/ai-models/fallbacks.md +0 -342
  25. package/.proagents/ai-models/model-config.md +0 -318
  26. package/.proagents/ai-models/task-routing.md +0 -503
  27. package/.proagents/ai-training/README.md +0 -155
  28. package/.proagents/ai-training/continuous-learning.md +0 -413
  29. package/.proagents/ai-training/domain-knowledge.md +0 -378
  30. package/.proagents/ai-training/pattern-learning.md +0 -455
  31. package/.proagents/ai-training/training-data.md +0 -337
  32. package/.proagents/ai-training/user-preferences.md +0 -346
  33. package/.proagents/approval-workflows/README.md +0 -146
  34. package/.proagents/approval-workflows/approval-config.md +0 -332
  35. package/.proagents/approval-workflows/approval-stages.md +0 -503
  36. package/.proagents/approval-workflows/emergency-bypass.md +0 -351
  37. package/.proagents/approval-workflows/examples.md +0 -859
  38. package/.proagents/approval-workflows/notifications.md +0 -320
  39. package/.proagents/compliance/README.md +0 -206
  40. package/.proagents/compliance/access-control.md +0 -310
  41. package/.proagents/compliance/audit-logging.md +0 -444
  42. package/.proagents/compliance/compliance-frameworks.md +0 -429
  43. package/.proagents/compliance/reports.md +0 -491
  44. package/.proagents/compliance/retention-policies.md +0 -454
  45. package/.proagents/config-versioning/README.md +0 -120
  46. package/.proagents/config-versioning/changelog.md +0 -300
  47. package/.proagents/config-versioning/rollback.md +0 -283
  48. package/.proagents/config-versioning/versioning.md +0 -330
  49. package/.proagents/contract-testing/README.md +0 -223
  50. package/.proagents/contract-testing/contract-testing.md +0 -614
  51. package/.proagents/contract-testing/pact-integration.md +0 -507
  52. package/.proagents/contract-testing/schema-validation.md +0 -565
  53. package/.proagents/dependency-management/README.md +0 -140
  54. package/.proagents/dependency-management/automation.md +0 -363
  55. package/.proagents/dependency-management/compatibility.md +0 -319
  56. package/.proagents/dependency-management/security-scanning.md +0 -413
  57. package/.proagents/dependency-management/update-policies.md +0 -374
  58. package/.proagents/disaster-recovery/README.md +0 -247
  59. package/.proagents/disaster-recovery/automation.md +0 -366
  60. package/.proagents/disaster-recovery/backup-recovery.md +0 -571
  61. package/.proagents/disaster-recovery/incident-response.md +0 -565
  62. package/.proagents/disaster-recovery/rollback-procedures.md +0 -499
  63. package/.proagents/disaster-recovery/runbooks.md +0 -603
  64. package/.proagents/disaster-recovery/scenarios.md +0 -892
  65. package/.proagents/disaster-recovery/testing.md +0 -438
  66. package/.proagents/environments/README.md +0 -244
  67. package/.proagents/environments/configuration.md +0 -437
  68. package/.proagents/environments/promotion.md +0 -434
  69. package/.proagents/environments/setup.md +0 -420
  70. package/.proagents/examples/README.md +0 -55
  71. package/.proagents/examples/backend-nodejs/README.md +0 -188
  72. package/.proagents/examples/backend-nodejs/complete-conversation.md +0 -601
  73. package/.proagents/examples/backend-nodejs/proagents.config.yaml +0 -415
  74. package/.proagents/examples/backend-nodejs/workflow-example.md +0 -909
  75. package/.proagents/examples/fullstack-nextjs/README.md +0 -155
  76. package/.proagents/examples/fullstack-nextjs/complete-conversation.md +0 -604
  77. package/.proagents/examples/fullstack-nextjs/proagents.config.yaml +0 -287
  78. package/.proagents/examples/fullstack-nextjs/workflow-example.md +0 -553
  79. package/.proagents/examples/mobile-react-native/README.md +0 -171
  80. package/.proagents/examples/mobile-react-native/complete-conversation.md +0 -825
  81. package/.proagents/examples/mobile-react-native/proagents.config.yaml +0 -330
  82. package/.proagents/examples/mobile-react-native/workflow-example.md +0 -723
  83. package/.proagents/examples/web-frontend-react/README.md +0 -125
  84. package/.proagents/examples/web-frontend-react/complete-conversation.md +0 -556
  85. package/.proagents/examples/web-frontend-react/proagents.config.yaml +0 -183
  86. package/.proagents/examples/web-frontend-react/workflow-example.md +0 -603
  87. package/.proagents/existing-projects/README.md +0 -65
  88. package/.proagents/existing-projects/challenges.md +0 -861
  89. package/.proagents/existing-projects/coexistence-mode.md +0 -483
  90. package/.proagents/existing-projects/compatibility-assessment.md +0 -541
  91. package/.proagents/existing-projects/gradual-adoption.md +0 -515
  92. package/.proagents/existing-projects/migration-strategies.md +0 -788
  93. package/.proagents/existing-projects/pattern-reconciliation.md +0 -489
  94. package/.proagents/existing-projects/team-onboarding.md +0 -617
  95. package/.proagents/existing-projects/technical-debt-handling.md +0 -644
  96. package/.proagents/feature-flags/README.md +0 -263
  97. package/.proagents/feature-flags/ab-testing.md +0 -413
  98. package/.proagents/feature-flags/configuration.md +0 -420
  99. package/.proagents/feature-flags/kill-switches.md +0 -444
  100. package/.proagents/feature-flags/rollout-strategies.md +0 -392
  101. package/.proagents/history.log +0 -12
  102. package/.proagents/i18n/README.md +0 -133
  103. package/.proagents/i18n/extraction.md +0 -433
  104. package/.proagents/i18n/tms-integration.md +0 -332
  105. package/.proagents/i18n/translation-workflow.md +0 -413
  106. package/.proagents/i18n/validation.md +0 -355
  107. package/.proagents/logging/README.md +0 -276
  108. package/.proagents/logging/aggregation.md +0 -475
  109. package/.proagents/logging/log-levels.md +0 -376
  110. package/.proagents/logging/sensitive-data.md +0 -423
  111. package/.proagents/logging/structured-logging.md +0 -406
  112. package/.proagents/metrics/README.md +0 -69
  113. package/.proagents/metrics/code-quality-kpis.md +0 -461
  114. package/.proagents/metrics/deployment-metrics.md +0 -517
  115. package/.proagents/metrics/developer-productivity.md +0 -368
  116. package/.proagents/metrics/learning-effectiveness.md +0 -478
  117. package/.proagents/migrations/README.md +0 -77
  118. package/.proagents/migrations/from-claude-projects.md +0 -313
  119. package/.proagents/migrations/from-cursor-rules.md +0 -345
  120. package/.proagents/migrations/from-custom-workflows.md +0 -410
  121. package/.proagents/monitoring/README.md +0 -308
  122. package/.proagents/monitoring/alerting.md +0 -449
  123. package/.proagents/monitoring/dashboards.md +0 -454
  124. package/.proagents/monitoring/health-checks.md +0 -436
  125. package/.proagents/monitoring/metrics.md +0 -434
  126. package/.proagents/multi-project/README.md +0 -170
  127. package/.proagents/multi-project/coordinated-deploy.md +0 -510
  128. package/.proagents/multi-project/cross-project-deps.md +0 -395
  129. package/.proagents/multi-project/unified-changelog.md +0 -477
  130. package/.proagents/multi-project/walkthroughs/monorepo-setup.md +0 -787
  131. package/.proagents/multi-project/workspace-config.md +0 -408
  132. package/.proagents/notifications/README.md +0 -151
  133. package/.proagents/notifications/channels.md +0 -457
  134. package/.proagents/notifications/preferences.md +0 -415
  135. package/.proagents/notifications/routing.md +0 -449
  136. package/.proagents/notifications/scheduling.md +0 -425
  137. package/.proagents/notifications/templates.md +0 -446
  138. package/.proagents/offline-mode/README.md +0 -145
  139. package/.proagents/offline-mode/caching.md +0 -344
  140. package/.proagents/offline-mode/offline-operations.md +0 -312
  141. package/.proagents/offline-mode/queue-specifications.md +0 -679
  142. package/.proagents/offline-mode/sync.md +0 -475
  143. package/.proagents/parallel-features/README.md +0 -85
  144. package/.proagents/parallel-features/conflict-detection.md +0 -226
  145. package/.proagents/parallel-features/dependency-management.md +0 -392
  146. package/.proagents/parallel-features/merge-coordination.md +0 -506
  147. package/.proagents/parallel-features/tracking-system.md +0 -416
  148. package/.proagents/performance/README.md +0 -59
  149. package/.proagents/performance/bundle-analysis.md +0 -375
  150. package/.proagents/performance/load-testing.md +0 -563
  151. package/.proagents/performance/runtime-metrics.md +0 -489
  152. package/.proagents/performance/web-vitals.md +0 -425
  153. package/.proagents/plugins/README.md +0 -139
  154. package/.proagents/plugins/creating-plugins.md +0 -504
  155. package/.proagents/plugins/plugin-api.md +0 -467
  156. package/.proagents/plugins/plugin-registry.md +0 -276
  157. package/.proagents/reporting/README.md +0 -158
  158. package/.proagents/reporting/dashboards.md +0 -366
  159. package/.proagents/reporting/exports.md +0 -524
  160. package/.proagents/reporting/quality-metrics.md +0 -385
  161. package/.proagents/reporting/templates/README.md +0 -56
  162. package/.proagents/reporting/templates/dashboard-config.json +0 -187
  163. package/.proagents/reporting/templates/metrics-queries.md +0 -427
  164. package/.proagents/reporting/templates/react-dashboard.tsx +0 -544
  165. package/.proagents/reporting/templates/widgets.md +0 -451
  166. package/.proagents/reporting/velocity-metrics.md +0 -340
  167. package/.proagents/reverse-engineering/README.md +0 -151
  168. package/.proagents/reverse-engineering/architecture-extraction.md +0 -325
  169. package/.proagents/reverse-engineering/code-analysis.md +0 -377
  170. package/.proagents/reverse-engineering/dependency-mapping.md +0 -567
  171. package/.proagents/reverse-engineering/diagram-generation.md +0 -586
  172. package/.proagents/reverse-engineering/documentation-generation.md +0 -468
  173. package/.proagents/reverse-engineering/pattern-detection.md +0 -569
  174. package/.proagents/reverse-engineering/quality-assessment.md +0 -733
  175. package/.proagents/secrets/README.md +0 -278
  176. package/.proagents/secrets/access-control.md +0 -443
  177. package/.proagents/secrets/rotation.md +0 -403
  178. package/.proagents/secrets/scanning.md +0 -487
  179. package/.proagents/secrets/storage.md +0 -394
  180. package/.proagents/webhooks/README.md +0 -126
  181. package/.proagents/webhooks/endpoints.md +0 -298
  182. package/.proagents/webhooks/events.md +0 -316
  183. package/.proagents/webhooks/payloads.md +0 -325
  184. package/.proagents/webhooks/reliability.md +0 -363
  185. package/.proagents/webhooks/security.md +0 -380
@@ -1,603 +0,0 @@
1
- # React Web Frontend Workflow Example
2
-
3
- A complete walkthrough of building a feature using ProAgents workflow.
4
-
5
- ---
6
-
7
- ## Scenario
8
-
9
- **Feature:** Add a user profile page with edit functionality
10
- **Project:** Existing React + TypeScript + React Query application
11
-
12
- ---
13
-
14
- ## Phase 0: Initialization
15
-
16
- ### Start Feature
17
-
18
- ```
19
- User: pa:feature "User Profile Page"
20
- ```
21
-
22
- ### Context Gathered
23
-
24
- ```markdown
25
- Project: react-app
26
- Type: Web Frontend (React)
27
- Branch: feature/user-profile
28
-
29
- Feature: User Profile Page
30
- - Display user information
31
- - Edit profile form
32
- - Avatar upload
33
- ```
34
-
35
- ---
36
-
37
- ## Phase 1: Codebase Analysis
38
-
39
- ### Analysis Results
40
-
41
- ```markdown
42
- ## Codebase Analysis Summary
43
-
44
- ### Tech Stack
45
- - React 18.2
46
- - TypeScript 5.0
47
- - React Query 4.x
48
- - React Router 6.x
49
- - Tailwind CSS
50
-
51
- ### Directory Structure
52
- src/
53
- ├── components/common/ # Button, Input, Card, Modal
54
- ├── features/
55
- │ └── auth/ # Existing auth feature
56
- ├── hooks/ # useAuth, useApi
57
- ├── services/ # apiClient configured
58
- └── types/ # User type exists
59
-
60
- ### Existing Patterns
61
- - Feature-based organization
62
- - React Query for server state
63
- - React Hook Form for forms
64
- - Tailwind for styling
65
-
66
- ### Related Code
67
- - User type: src/types/User.ts
68
- - Auth hook: src/hooks/useAuth.ts
69
- - API client: src/services/apiClient.ts
70
- ```
71
-
72
- ---
73
-
74
- ## Phase 2: Requirements
75
-
76
- ### Feature Requirements
77
-
78
- ```markdown
79
- ## User Profile Page Requirements
80
-
81
- ### User Stories
82
- 1. As a user, I want to view my profile information
83
- 2. As a user, I want to edit my profile details
84
- 3. As a user, I want to upload a new avatar
85
-
86
- ### Functional Requirements
87
- - Display user: name, email, bio, avatar
88
- - Edit form with validation
89
- - Avatar upload (max 5MB, jpg/png)
90
- - Success/error notifications
91
-
92
- ### Technical Requirements
93
- - Use existing React Query patterns
94
- - Follow feature-based structure
95
- - Add to existing user types
96
-
97
- ### API Endpoints
98
- - GET /api/users/me - Get current user
99
- - PUT /api/users/me - Update user
100
- - POST /api/users/me/avatar - Upload avatar
101
- ```
102
-
103
- ---
104
-
105
- ## Phase 3: UI Design
106
-
107
- ### Design Specification
108
-
109
- ```markdown
110
- ## Profile Page Design
111
-
112
- ### Layout
113
- ┌────────────────────────────────┐
114
- │ Header │
115
- ├────────────────────────────────┤
116
- │ ┌──────┐ │
117
- │ │Avatar│ John Doe │
118
- │ └──────┘ john@example.com │
119
- │ [Edit Profile] │
120
- ├────────────────────────────────┤
121
- │ Bio │
122
- │ ───────────────────────── │
123
- │ Lorem ipsum dolor sit amet... │
124
- ├────────────────────────────────┤
125
- │ Account Details │
126
- │ ───────────────────────── │
127
- │ Member since: Jan 2024 │
128
- │ Last login: 2 hours ago │
129
- └────────────────────────────────┘
130
-
131
- ### Edit Modal
132
- ┌────────────────────────────────┐
133
- │ Edit Profile [X]│
134
- ├────────────────────────────────┤
135
- │ Name: [________________] │
136
- │ Bio: [________________] │
137
- │ [________________] │
138
- │ Avatar: [Choose File] │
139
- │ │
140
- │ [Cancel] [Save] │
141
- └────────────────────────────────┘
142
-
143
- ### Tokens Used
144
- - Colors: bg-white, text-gray-900, text-gray-600
145
- - Spacing: p-6, gap-4
146
- - Border: rounded-lg, border-gray-200
147
- ```
148
-
149
- ---
150
-
151
- ## Phase 4: Implementation Plan
152
-
153
- ### File Plan
154
-
155
- ```markdown
156
- ## Files to Create
157
-
158
- src/features/profile/
159
- ├── index.ts # Public exports
160
- ├── ProfilePage.tsx # Main page component
161
- ├── components/
162
- │ ├── ProfileHeader.tsx # Avatar + name section
163
- │ ├── ProfileDetails.tsx # Bio + details
164
- │ ├── EditProfileModal.tsx # Edit form modal
165
- │ └── AvatarUpload.tsx # Avatar upload component
166
- ├── hooks/
167
- │ ├── useProfile.ts # Get profile data
168
- │ └── useUpdateProfile.ts # Update profile mutation
169
- ├── services/
170
- │ └── profileApi.ts # API functions
171
- └── types.ts # Profile-specific types
172
-
173
- ## Files to Modify
174
- - src/App.tsx # Add route
175
- - src/components/common/index.ts # Export if new components
176
- ```
177
-
178
- ### Implementation Order
179
-
180
- ```markdown
181
- 1. Create types.ts
182
- 2. Create profileApi.ts
183
- 3. Create useProfile.ts and useUpdateProfile.ts
184
- 4. Create ProfileHeader.tsx
185
- 5. Create ProfileDetails.tsx
186
- 6. Create AvatarUpload.tsx
187
- 7. Create EditProfileModal.tsx
188
- 8. Create ProfilePage.tsx
189
- 9. Add route to App.tsx
190
- 10. Write tests
191
- ```
192
-
193
- ---
194
-
195
- ## Phase 5: Implementation
196
-
197
- ### Step 1: Types
198
-
199
- ```typescript
200
- // src/features/profile/types.ts
201
- export interface ProfileData {
202
- id: string;
203
- name: string;
204
- email: string;
205
- bio: string;
206
- avatarUrl: string;
207
- createdAt: string;
208
- lastLoginAt: string;
209
- }
210
-
211
- export interface UpdateProfileDto {
212
- name?: string;
213
- bio?: string;
214
- }
215
-
216
- export interface UploadAvatarResponse {
217
- avatarUrl: string;
218
- }
219
- ```
220
-
221
- ### Step 2: API Service
222
-
223
- ```typescript
224
- // src/features/profile/services/profileApi.ts
225
- import { apiClient } from '@/services/apiClient';
226
- import type { ProfileData, UpdateProfileDto, UploadAvatarResponse } from '../types';
227
-
228
- export const profileApi = {
229
- getProfile: () =>
230
- apiClient.get<ProfileData>('/users/me'),
231
-
232
- updateProfile: (data: UpdateProfileDto) =>
233
- apiClient.put<ProfileData>('/users/me', data),
234
-
235
- uploadAvatar: (file: File) => {
236
- const formData = new FormData();
237
- formData.append('avatar', file);
238
- return apiClient.post<UploadAvatarResponse>('/users/me/avatar', formData, {
239
- headers: { 'Content-Type': 'multipart/form-data' },
240
- });
241
- },
242
- };
243
- ```
244
-
245
- ### Step 3: Hooks
246
-
247
- ```typescript
248
- // src/features/profile/hooks/useProfile.ts
249
- import { useQuery } from '@tanstack/react-query';
250
- import { profileApi } from '../services/profileApi';
251
-
252
- export function useProfile() {
253
- return useQuery({
254
- queryKey: ['profile'],
255
- queryFn: profileApi.getProfile,
256
- });
257
- }
258
-
259
- // src/features/profile/hooks/useUpdateProfile.ts
260
- import { useMutation, useQueryClient } from '@tanstack/react-query';
261
- import { profileApi } from '../services/profileApi';
262
- import type { UpdateProfileDto } from '../types';
263
-
264
- export function useUpdateProfile() {
265
- const queryClient = useQueryClient();
266
-
267
- return useMutation({
268
- mutationFn: (data: UpdateProfileDto) => profileApi.updateProfile(data),
269
- onSuccess: () => {
270
- queryClient.invalidateQueries({ queryKey: ['profile'] });
271
- },
272
- });
273
- }
274
- ```
275
-
276
- ### Step 4-7: Components
277
-
278
- ```typescript
279
- // src/features/profile/components/ProfileHeader.tsx
280
- import type { FC } from 'react';
281
- import type { ProfileData } from '../types';
282
-
283
- interface ProfileHeaderProps {
284
- profile: ProfileData;
285
- onEditClick: () => void;
286
- }
287
-
288
- export const ProfileHeader: FC<ProfileHeaderProps> = ({
289
- profile,
290
- onEditClick,
291
- }) => {
292
- return (
293
- <div className="flex items-center gap-4 p-6 bg-white rounded-lg shadow">
294
- <img
295
- src={profile.avatarUrl}
296
- alt={profile.name}
297
- className="w-24 h-24 rounded-full object-cover"
298
- />
299
- <div className="flex-1">
300
- <h1 className="text-2xl font-bold text-gray-900">{profile.name}</h1>
301
- <p className="text-gray-600">{profile.email}</p>
302
- <button
303
- onClick={onEditClick}
304
- className="mt-2 px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700"
305
- >
306
- Edit Profile
307
- </button>
308
- </div>
309
- </div>
310
- );
311
- };
312
- ```
313
-
314
- ```typescript
315
- // src/features/profile/components/EditProfileModal.tsx
316
- import { useState } from 'react';
317
- import type { FC } from 'react';
318
- import { useForm } from 'react-hook-form';
319
- import { Modal } from '@/components/common';
320
- import { useUpdateProfile } from '../hooks/useUpdateProfile';
321
- import type { ProfileData, UpdateProfileDto } from '../types';
322
-
323
- interface EditProfileModalProps {
324
- profile: ProfileData;
325
- isOpen: boolean;
326
- onClose: () => void;
327
- }
328
-
329
- export const EditProfileModal: FC<EditProfileModalProps> = ({
330
- profile,
331
- isOpen,
332
- onClose,
333
- }) => {
334
- const { register, handleSubmit, formState: { errors } } = useForm<UpdateProfileDto>({
335
- defaultValues: {
336
- name: profile.name,
337
- bio: profile.bio,
338
- },
339
- });
340
-
341
- const updateProfile = useUpdateProfile();
342
-
343
- const onSubmit = async (data: UpdateProfileDto) => {
344
- await updateProfile.mutateAsync(data);
345
- onClose();
346
- };
347
-
348
- return (
349
- <Modal isOpen={isOpen} onClose={onClose} title="Edit Profile">
350
- <form onSubmit={handleSubmit(onSubmit)} className="space-y-4">
351
- <div>
352
- <label className="block text-sm font-medium text-gray-700">
353
- Name
354
- </label>
355
- <input
356
- {...register('name', { required: 'Name is required' })}
357
- className="mt-1 block w-full rounded-md border-gray-300 shadow-sm"
358
- />
359
- {errors.name && (
360
- <p className="mt-1 text-sm text-red-600">{errors.name.message}</p>
361
- )}
362
- </div>
363
-
364
- <div>
365
- <label className="block text-sm font-medium text-gray-700">
366
- Bio
367
- </label>
368
- <textarea
369
- {...register('bio')}
370
- rows={4}
371
- className="mt-1 block w-full rounded-md border-gray-300 shadow-sm"
372
- />
373
- </div>
374
-
375
- <div className="flex justify-end gap-2">
376
- <button
377
- type="button"
378
- onClick={onClose}
379
- className="px-4 py-2 border rounded-md"
380
- >
381
- Cancel
382
- </button>
383
- <button
384
- type="submit"
385
- disabled={updateProfile.isPending}
386
- className="px-4 py-2 bg-blue-600 text-white rounded-md"
387
- >
388
- {updateProfile.isPending ? 'Saving...' : 'Save'}
389
- </button>
390
- </div>
391
- </form>
392
- </Modal>
393
- );
394
- };
395
- ```
396
-
397
- ### Step 8: Main Page
398
-
399
- ```typescript
400
- // src/features/profile/ProfilePage.tsx
401
- import { useState } from 'react';
402
- import { useProfile } from './hooks/useProfile';
403
- import { ProfileHeader } from './components/ProfileHeader';
404
- import { ProfileDetails } from './components/ProfileDetails';
405
- import { EditProfileModal } from './components/EditProfileModal';
406
- import { Spinner } from '@/components/common';
407
-
408
- export function ProfilePage() {
409
- const [isEditOpen, setIsEditOpen] = useState(false);
410
- const { data: profile, isLoading, error } = useProfile();
411
-
412
- if (isLoading) return <Spinner />;
413
- if (error) return <div>Error loading profile</div>;
414
- if (!profile) return null;
415
-
416
- return (
417
- <div className="max-w-2xl mx-auto py-8 px-4">
418
- <ProfileHeader
419
- profile={profile}
420
- onEditClick={() => setIsEditOpen(true)}
421
- />
422
-
423
- <ProfileDetails profile={profile} />
424
-
425
- <EditProfileModal
426
- profile={profile}
427
- isOpen={isEditOpen}
428
- onClose={() => setIsEditOpen(false)}
429
- />
430
- </div>
431
- );
432
- }
433
- ```
434
-
435
- ### Step 9: Add Route
436
-
437
- ```typescript
438
- // In src/App.tsx - Add route
439
- import { ProfilePage } from '@/features/profile';
440
-
441
- <Route path="/profile" element={<ProfilePage />} />
442
- ```
443
-
444
- ---
445
-
446
- ## Phase 6: Testing
447
-
448
- ### Unit Tests
449
-
450
- ```typescript
451
- // src/features/profile/components/ProfileHeader.test.tsx
452
- import { render, screen } from '@testing-library/react';
453
- import userEvent from '@testing-library/user-event';
454
- import { ProfileHeader } from './ProfileHeader';
455
-
456
- const mockProfile = {
457
- id: '1',
458
- name: 'John Doe',
459
- email: 'john@example.com',
460
- bio: 'Developer',
461
- avatarUrl: '/avatar.jpg',
462
- createdAt: '2024-01-01',
463
- lastLoginAt: '2024-01-15',
464
- };
465
-
466
- describe('ProfileHeader', () => {
467
- it('renders user information', () => {
468
- render(<ProfileHeader profile={mockProfile} onEditClick={vi.fn()} />);
469
-
470
- expect(screen.getByText('John Doe')).toBeInTheDocument();
471
- expect(screen.getByText('john@example.com')).toBeInTheDocument();
472
- });
473
-
474
- it('calls onEditClick when edit button clicked', async () => {
475
- const onEditClick = vi.fn();
476
- render(<ProfileHeader profile={mockProfile} onEditClick={onEditClick} />);
477
-
478
- await userEvent.click(screen.getByRole('button', { name: /edit/i }));
479
-
480
- expect(onEditClick).toHaveBeenCalled();
481
- });
482
- });
483
- ```
484
-
485
- ### Integration Tests
486
-
487
- ```typescript
488
- // src/features/profile/__tests__/ProfilePage.test.tsx
489
- import { render, screen, waitFor } from '@testing-library/react';
490
- import userEvent from '@testing-library/user-event';
491
- import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
492
- import { ProfilePage } from '../ProfilePage';
493
-
494
- // Mock API
495
- vi.mock('../services/profileApi');
496
-
497
- describe('ProfilePage', () => {
498
- const queryClient = new QueryClient();
499
-
500
- it('displays profile and allows editing', async () => {
501
- render(
502
- <QueryClientProvider client={queryClient}>
503
- <ProfilePage />
504
- </QueryClientProvider>
505
- );
506
-
507
- // Wait for profile to load
508
- await waitFor(() => {
509
- expect(screen.getByText('John Doe')).toBeInTheDocument();
510
- });
511
-
512
- // Open edit modal
513
- await userEvent.click(screen.getByRole('button', { name: /edit/i }));
514
-
515
- // Verify modal opened
516
- expect(screen.getByRole('dialog')).toBeInTheDocument();
517
- });
518
- });
519
- ```
520
-
521
- ---
522
-
523
- ## Phase 6.5: Code Review
524
-
525
- ### Self-Review Checklist
526
-
527
- ```markdown
528
- ✅ Code follows project conventions
529
- ✅ TypeScript types properly defined
530
- ✅ React Query patterns followed
531
- ✅ Error handling implemented
532
- ✅ Loading states handled
533
- ✅ Accessible (labels, roles)
534
- ✅ Tests written
535
- ✅ No console.logs
536
- ```
537
-
538
- ---
539
-
540
- ## Phase 7: Documentation
541
-
542
- ### Component Documentation
543
-
544
- ```typescript
545
- /**
546
- * ProfilePage - User profile view and edit functionality
547
- *
548
- * @description Main page component for viewing and editing user profile.
549
- * Uses React Query for data fetching and caching.
550
- *
551
- * @example
552
- * // Add to router
553
- * <Route path="/profile" element={<ProfilePage />} />
554
- */
555
- ```
556
-
557
- ---
558
-
559
- ## Phase 8: Deployment
560
-
561
- ### Pre-Deployment Checklist
562
-
563
- ```markdown
564
- ✅ All tests passing
565
- ✅ Build succeeds
566
- ✅ No linting errors
567
- ✅ Staging tested
568
- ✅ Code reviewed
569
- ```
570
-
571
- ### Git Commands
572
-
573
- ```bash
574
- git add .
575
- git commit -m "feat(profile): add user profile page
576
-
577
- - Add profile view with header and details
578
- - Add edit profile modal
579
- - Add avatar upload functionality
580
- - Add React Query hooks for data fetching
581
- - Add unit and integration tests
582
-
583
- Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>"
584
-
585
- git push origin feature/user-profile
586
- ```
587
-
588
- ---
589
-
590
- ## Summary
591
-
592
- This example demonstrated the complete ProAgents workflow for a React frontend feature:
593
-
594
- 1. **Initialization** - Created feature branch and gathered context
595
- 2. **Analysis** - Understood existing patterns and conventions
596
- 3. **Requirements** - Defined user stories and technical requirements
597
- 4. **UI Design** - Created wireframes and design specifications
598
- 5. **Planning** - Mapped files and implementation order
599
- 6. **Implementation** - Built feature following existing patterns
600
- 7. **Testing** - Wrote unit and integration tests
601
- 8. **Review** - Self-reviewed against checklist
602
- 9. **Documentation** - Added code documentation
603
- 10. **Deployment** - Prepared for merge and deploy
@@ -1,65 +0,0 @@
1
- # Existing Project Integration
2
-
3
- Guide for integrating ProAgents into existing codebases.
4
-
5
- ---
6
-
7
- ## Overview
8
-
9
- Existing projects face unique challenges when adopting ProAgents:
10
-
11
- 1. **Inconsistent Patterns** - Mixed conventions across the codebase
12
- 2. **Technical Debt** - Legacy code, missing tests, outdated dependencies
13
- 3. **Partial Documentation** - Missing or outdated docs
14
- 4. **Team Resistance** - Existing workflows and processes
15
- 5. **Gradual Migration** - Can't change everything at once
16
- 6. **Tool Conflicts** - Existing automation and CI/CD
17
-
18
- This guide addresses each challenge with practical solutions.
19
-
20
- ---
21
-
22
- ## Quick Start for Existing Projects
23
-
24
- ```bash
25
- # Initialize with existing project mode
26
- pa:init --existing
27
-
28
- # Run compatibility assessment first
29
- pa:assess-compatibility
30
-
31
- # Generate adoption plan
32
- pa:adoption-plan
33
- ```
34
-
35
- ---
36
-
37
- ## Files in This Section
38
-
39
- | File | Description |
40
- |------|-------------|
41
- | `README.md` | This overview |
42
- | `challenges.md` | Detailed challenge analysis |
43
- | `compatibility-assessment.md` | Assess project compatibility |
44
- | `gradual-adoption.md` | Step-by-step adoption strategy |
45
- | `pattern-reconciliation.md` | Reconcile existing vs recommended patterns |
46
- | `technical-debt-handling.md` | Handle existing technical debt |
47
- | `team-onboarding.md` | Onboard team to ProAgents |
48
- | `migration-strategies.md` | Migration approaches |
49
- | `coexistence-mode.md` | Run alongside existing workflows |
50
-
51
- ---
52
-
53
- ## Adoption Phases
54
-
55
- ```
56
- Phase 1: Assessment (Non-invasive)
57
-
58
- Phase 2: Configuration (Adapt to project)
59
-
60
- Phase 3: Pilot (Single feature)
61
-
62
- Phase 4: Gradual Rollout (More features)
63
-
64
- Phase 5: Full Integration (Team-wide)
65
- ```