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,125 +0,0 @@
1
- # Web Frontend React Example
2
-
3
- Complete walkthrough of ProAgents workflow for a React web application.
4
-
5
- ---
6
-
7
- ## Overview
8
-
9
- This example demonstrates how to use ProAgents to build features in a React single-page application. It covers the full development lifecycle from requirements to deployment.
10
-
11
- ---
12
-
13
- ## Project Type
14
-
15
- - **Framework:** React 18+
16
- - **Language:** TypeScript
17
- - **Styling:** Tailwind CSS
18
- - **State Management:** Zustand
19
- - **Testing:** Vitest + React Testing Library
20
-
21
- ---
22
-
23
- ## Files in This Example
24
-
25
- | File | Description |
26
- |------|-------------|
27
- | [workflow-example.md](./workflow-example.md) | Step-by-step workflow phases |
28
- | [complete-conversation.md](./complete-conversation.md) | Full AI conversation example |
29
- | [proagents.config.yaml](./proagents.config.yaml) | Project-specific configuration |
30
-
31
- ---
32
-
33
- ## What You'll Learn
34
-
35
- ### 1. Project Analysis
36
- - How ProAgents analyzes React component structure
37
- - Pattern recognition for hooks, context, and state
38
- - Identifying existing UI component libraries
39
-
40
- ### 2. UI Design Integration
41
- - Converting Figma designs to React components
42
- - Design token extraction and application
43
- - Component specification from wireframes
44
-
45
- ### 3. Implementation
46
- - Following existing project conventions
47
- - Creating reusable components
48
- - State management patterns
49
- - TypeScript type safety
50
-
51
- ### 4. Testing
52
- - Unit tests for components and hooks
53
- - Integration tests for user flows
54
- - Accessibility testing
55
-
56
- ---
57
-
58
- ## Quick Start
59
-
60
- ```bash
61
- # Copy configuration to your React project
62
- cp proagents.config.yaml /path/to/your/react-project/
63
-
64
- # Start a new feature
65
- proagents feature start "Add user profile page"
66
- ```
67
-
68
- ---
69
-
70
- ## Example Feature: User Dashboard
71
-
72
- The complete-conversation.md shows building a user dashboard with:
73
- - Dashboard layout component
74
- - Stats widgets
75
- - Recent activity feed
76
- - User preferences panel
77
-
78
- ---
79
-
80
- ## Key Patterns Demonstrated
81
-
82
- ### Component Structure
83
- ```
84
- src/
85
- ├── components/
86
- │ ├── ui/ # Reusable UI components
87
- │ ├── features/ # Feature-specific components
88
- │ └── layouts/ # Page layouts
89
- ├── hooks/ # Custom hooks
90
- ├── stores/ # Zustand stores
91
- └── types/ # TypeScript types
92
- ```
93
-
94
- ### Testing Approach
95
- - Component tests with React Testing Library
96
- - Hook tests with renderHook
97
- - Integration tests for user journeys
98
- - 80% coverage target
99
-
100
- ---
101
-
102
- ## Configuration Highlights
103
-
104
- ```yaml
105
- # From proagents.config.yaml
106
- project:
107
- type: "web-frontend"
108
- framework: "react"
109
-
110
- testing:
111
- framework: "vitest"
112
- coverage_threshold: 80
113
-
114
- checkpoints:
115
- after_design: true # Review UI before coding
116
- before_deployment: true # Final review
117
- ```
118
-
119
- ---
120
-
121
- ## Related Resources
122
-
123
- - [React Scaffolding Template](../../scaffolding/react/)
124
- - [UI Design Integration](../../ui-integration/)
125
- - [Testing Standards](../../testing-standards/)
@@ -1,556 +0,0 @@
1
- # Complete Conversation Example: React Feature
2
-
3
- An example of the actual AI-user conversation when building a feature.
4
-
5
- ---
6
-
7
- ## Starting Point
8
-
9
- **User has:** Existing React + TypeScript project with React Query and Tailwind.
10
-
11
- **Goal:** Add a notifications system with real-time updates.
12
-
13
- ---
14
-
15
- ## The Conversation
16
-
17
- ### User Initiates
18
-
19
- ```
20
- User: I need to add a notifications feature to my app. Users should see
21
- their notifications in a dropdown, mark them as read, and get real-time
22
- updates when new notifications arrive.
23
- ```
24
-
25
- ### AI Response: Initialization
26
-
27
- ```
28
- AI: I'll help you build a notifications feature. Let me start by analyzing
29
- your codebase to understand the existing patterns.
30
-
31
- Creating feature branch: feature/notifications
32
-
33
- [Running Analysis...]
34
-
35
- ──────────────────────────────────────────────────────────
36
- Codebase Analysis Complete
37
- ──────────────────────────────────────────────────────────
38
-
39
- Tech Stack Detected:
40
- • React 18.2 + TypeScript 5.0
41
- • React Query 4.x (TanStack Query)
42
- • React Router 6.x
43
- • Tailwind CSS 3.x
44
- • Socket.io-client (for real-time)
45
-
46
- Existing Patterns Found:
47
- • Feature-based folder structure (src/features/*)
48
- • Custom hooks pattern (useAuth, useApi)
49
- • Centralized API client (src/services/apiClient.ts)
50
- • Toast notifications for feedback (using react-hot-toast)
51
-
52
- Relevant Existing Code:
53
- • WebSocket setup: src/services/socket.ts
54
- • User type: src/types/User.ts
55
- • Auth context: src/features/auth/AuthContext.tsx
56
- • Dropdown component: src/components/common/Dropdown.tsx
57
-
58
- Do you want me to proceed with requirements gathering, or would you like
59
- to modify any checkpoints for this feature?
60
- ```
61
-
62
- ### User Confirms
63
-
64
- ```
65
- User: Looks good. Let's proceed.
66
- ```
67
-
68
- ### AI: Requirements Phase
69
-
70
- ```
71
- AI: Based on your request, here are the requirements I've captured:
72
-
73
- ──────────────────────────────────────────────────────────
74
- Feature Requirements: Notifications System
75
- ──────────────────────────────────────────────────────────
76
-
77
- User Stories:
78
- 1. As a user, I want to see a notification bell with unread count
79
- 2. As a user, I want to view my notifications in a dropdown
80
- 3. As a user, I want to mark notifications as read
81
- 4. As a user, I want to receive real-time notification updates
82
- 5. As a user, I want to click a notification to navigate to related content
83
-
84
- Functional Requirements:
85
- ┌─────────────────────────────────────────────────────────┐
86
- │ • Display notification bell icon in header │
87
- │ • Show unread notification count badge │
88
- │ • Dropdown list with notification items │
89
- │ • Mark single notification as read │
90
- │ • Mark all notifications as read │
91
- │ • Real-time updates via WebSocket │
92
- │ • Link notifications to related resources │
93
- │ • Notification types: info, success, warning, error │
94
- │ • Maximum 50 notifications in dropdown (paginated) │
95
- └─────────────────────────────────────────────────────────┘
96
-
97
- Technical Requirements:
98
- • Use existing WebSocket infrastructure (socket.ts)
99
- • Follow React Query patterns for data fetching
100
- • Use existing Dropdown component as base
101
- • Add notification event types to socket listeners
102
-
103
- API Endpoints Needed:
104
- • GET /api/notifications - List notifications
105
- • POST /api/notifications/:id/read - Mark as read
106
- • POST /api/notifications/read-all - Mark all as read
107
-
108
- I have a few clarifying questions:
109
-
110
- 1. Should notifications persist after being read, or be removed?
111
- [ ] Keep for 30 days [ ] Remove after reading [ ] User preference
112
-
113
- 2. What notification types are needed?
114
- [ ] Comments [ ] Mentions [ ] Task updates [ ] System alerts
115
-
116
- 3. Should there be a "View all" page, or just the dropdown?
117
- [ ] Dropdown only [ ] Dropdown + Full page
118
- ```
119
-
120
- ### User Answers
121
-
122
- ```
123
- User:
124
- 1. Keep for 30 days
125
- 2. All of those types
126
- 3. Dropdown + Full page for viewing history
127
- ```
128
-
129
- ### AI: UI Design Phase
130
-
131
- ```
132
- AI: Let me create the UI specification based on your existing design patterns.
133
-
134
- ──────────────────────────────────────────────────────────
135
- UI Design Specification
136
- ──────────────────────────────────────────────────────────
137
-
138
- 1. Notification Bell (Header)
139
- ┌─────────────────────────────────────────────────────────┐
140
- │ Before existing user menu: │
141
- │ │
142
- │ 🔔 │
143
- │ (3) ← Red badge showing unread count │
144
- │ │
145
- │ States: │
146
- │ • No notifications: bell outline, no badge │
147
- │ • Has unread: bell filled, red badge with count │
148
- │ • Badge max: "9+" for counts > 9 │
149
- └─────────────────────────────────────────────────────────┘
150
-
151
- 2. Notification Dropdown
152
- ┌─────────────────────────────────────────────────────────┐
153
- │ Notifications Mark all read ──────── │
154
- ├─────────────────────────────────────────────────────────┤
155
- │ ┌─────────────────────────────────────────────────────┐ │
156
- │ │ 💬 John commented on your task 2 min ago │ │
157
- │ │ "Looks great! Let me review..." │ │
158
- │ └─────────────────────────────────────────────────────┘ │
159
- │ ┌─────────────────────────────────────────────────────┐ │
160
- │ │ 📋 Task "Deploy API" was completed 1 hour ago │ │
161
- │ │ Marked complete by Sarah │ │
162
- │ └─────────────────────────────────────────────────────┘ │
163
- │ ┌─────────────────────────────────────────────────────┐ │
164
- │ │ @ You were mentioned in #general 3 hours ago│ │
165
- │ │ @you check out this feature... │ │
166
- │ └─────────────────────────────────────────────────────┘ │
167
- ├─────────────────────────────────────────────────────────┤
168
- │ View all notifications → │
169
- └─────────────────────────────────────────────────────────┘
170
-
171
- Visual States:
172
- • Unread: bg-blue-50, left blue border
173
- • Read: bg-white, no border
174
- • Hover: bg-gray-50
175
-
176
- 3. Full Notifications Page
177
- ┌─────────────────────────────────────────────────────────┐
178
- │ Notifications │
179
- │ │
180
- │ Filter: [All ▼] [Unread only □] Mark all read │
181
- ├─────────────────────────────────────────────────────────┤
182
- │ │
183
- │ Today │
184
- │ ─────────────────────────────────────── │
185
- │ • Notification item 1 │
186
- │ • Notification item 2 │
187
- │ │
188
- │ Yesterday │
189
- │ ─────────────────────────────────────── │
190
- │ • Notification item 3 │
191
- │ │
192
- │ Older │
193
- │ ─────────────────────────────────────── │
194
- │ • Notification item 4 │
195
- │ │
196
- │ [Load more] │
197
- └─────────────────────────────────────────────────────────┘
198
-
199
- Does this match your vision? Any changes needed before I plan the
200
- implementation?
201
- ```
202
-
203
- ### User Approves
204
-
205
- ```
206
- User: Perfect, that's exactly what I want. Proceed with implementation.
207
- ```
208
-
209
- ### AI: Implementation Planning
210
-
211
- ```
212
- AI: Here's the implementation plan:
213
-
214
- ──────────────────────────────────────────────────────────
215
- Implementation Plan
216
- ──────────────────────────────────────────────────────────
217
-
218
- Files to Create:
219
- src/features/notifications/
220
- ├── index.ts # Public exports
221
- ├── types.ts # Notification types
222
- ├── components/
223
- │ ├── NotificationBell.tsx # Bell icon with badge
224
- │ ├── NotificationDropdown.tsx # Dropdown container
225
- │ ├── NotificationItem.tsx # Single notification
226
- │ ├── NotificationList.tsx # List of notifications
227
- │ └── NotificationFilters.tsx # Filter controls
228
- ├── hooks/
229
- │ ├── useNotifications.ts # Fetch notifications
230
- │ ├── useMarkAsRead.ts # Mark read mutation
231
- │ ├── useNotificationSocket.ts # Real-time listener
232
- │ └── useUnreadCount.ts # Unread count
233
- ├── pages/
234
- │ └── NotificationsPage.tsx # Full page view
235
- └── services/
236
- └── notificationsApi.ts # API functions
237
-
238
- Files to Modify:
239
- • src/components/layout/Header.tsx # Add bell icon
240
- • src/services/socket.ts # Add notification events
241
- • src/App.tsx # Add notifications route
242
- • src/types/index.ts # Export notification types
243
-
244
- Implementation Order:
245
- 1. types.ts - Define notification interfaces
246
- 2. notificationsApi.ts - API functions
247
- 3. socket.ts - Add event listeners
248
- 4. useNotifications.ts, useMarkAsRead.ts - Data hooks
249
- 5. useNotificationSocket.ts - Real-time hook
250
- 6. NotificationItem.tsx - Individual notification
251
- 7. NotificationList.tsx - List component
252
- 8. NotificationDropdown.tsx - Dropdown with list
253
- 9. NotificationBell.tsx - Bell with badge
254
- 10. Header.tsx - Integrate bell
255
- 11. NotificationFilters.tsx - Filter controls
256
- 12. NotificationsPage.tsx - Full page
257
- 13. App.tsx - Add route
258
- 14. Tests
259
-
260
- Estimated complexity: Medium
261
- Files affected: 14 new, 4 modified
262
-
263
- Starting implementation now...
264
- ```
265
-
266
- ### AI: Implementation (Abbreviated)
267
-
268
- ```
269
- AI: Creating the notification system...
270
-
271
- ✓ Created types.ts
272
- ──────────────────────────────────────────────────────────
273
- // src/features/notifications/types.ts
274
-
275
- export type NotificationType =
276
- | 'comment'
277
- | 'mention'
278
- | 'task_update'
279
- | 'system';
280
-
281
- export interface Notification {
282
- id: string;
283
- type: NotificationType;
284
- title: string;
285
- message: string;
286
- read: boolean;
287
- createdAt: string;
288
- link?: string;
289
- actor?: {
290
- id: string;
291
- name: string;
292
- avatarUrl?: string;
293
- };
294
- }
295
-
296
- export interface NotificationsResponse {
297
- notifications: Notification[];
298
- total: number;
299
- unreadCount: number;
300
- }
301
- ──────────────────────────────────────────────────────────
302
-
303
- ✓ Created notificationsApi.ts
304
- ✓ Updated socket.ts with notification events
305
- ✓ Created useNotifications.ts
306
- ✓ Created useMarkAsRead.ts
307
- ✓ Created useNotificationSocket.ts
308
-
309
- Creating components...
310
-
311
- ✓ Created NotificationItem.tsx
312
- ──────────────────────────────────────────────────────────
313
- // src/features/notifications/components/NotificationItem.tsx
314
-
315
- interface NotificationItemProps {
316
- notification: Notification;
317
- onMarkAsRead: (id: string) => void;
318
- }
319
-
320
- export const NotificationItem: FC<NotificationItemProps> = ({
321
- notification,
322
- onMarkAsRead,
323
- }) => {
324
- const navigate = useNavigate();
325
-
326
- const handleClick = () => {
327
- if (!notification.read) {
328
- onMarkAsRead(notification.id);
329
- }
330
- if (notification.link) {
331
- navigate(notification.link);
332
- }
333
- };
334
-
335
- const icon = getNotificationIcon(notification.type);
336
-
337
- return (
338
- <button
339
- onClick={handleClick}
340
- className={cn(
341
- 'w-full text-left p-3 flex gap-3 hover:bg-gray-50 transition',
342
- !notification.read && 'bg-blue-50 border-l-2 border-blue-500'
343
- )}
344
- >
345
- <span className="text-lg">{icon}</span>
346
- <div className="flex-1 min-w-0">
347
- <p className="font-medium text-gray-900 truncate">
348
- {notification.title}
349
- </p>
350
- <p className="text-sm text-gray-600 truncate">
351
- {notification.message}
352
- </p>
353
- <p className="text-xs text-gray-400 mt-1">
354
- {formatRelativeTime(notification.createdAt)}
355
- </p>
356
- </div>
357
- </button>
358
- );
359
- };
360
- ──────────────────────────────────────────────────────────
361
-
362
- ✓ Created NotificationList.tsx
363
- ✓ Created NotificationDropdown.tsx
364
- ✓ Created NotificationBell.tsx
365
-
366
- ✓ Updated Header.tsx
367
- ──────────────────────────────────────────────────────────
368
- // Added to header before user menu:
369
-
370
- <NotificationBell />
371
- ──────────────────────────────────────────────────────────
372
-
373
- ✓ Created NotificationsPage.tsx
374
- ✓ Updated App.tsx with route
375
-
376
- Implementation complete. Running tests...
377
- ```
378
-
379
- ### AI: Testing Phase
380
-
381
- ```
382
- AI: Running tests for the notifications feature...
383
-
384
- ──────────────────────────────────────────────────────────
385
- Test Results
386
- ──────────────────────────────────────────────────────────
387
-
388
- Unit Tests:
389
- ✓ NotificationItem renders correctly (32ms)
390
- ✓ NotificationItem shows unread state (28ms)
391
- ✓ NotificationItem calls onMarkAsRead on click (45ms)
392
- ✓ NotificationBell shows badge with count (38ms)
393
- ✓ NotificationBell hides badge when count is 0 (35ms)
394
- ✓ NotificationDropdown shows notifications (52ms)
395
- ✓ NotificationDropdown handles mark all read (48ms)
396
- ✓ useNotifications fetches data correctly (42ms)
397
- ✓ useMarkAsRead invalidates cache on success (55ms)
398
-
399
- Integration Tests:
400
- ✓ Full notification flow works end-to-end (234ms)
401
- ✓ Real-time updates appear in dropdown (312ms)
402
-
403
- Coverage Report:
404
- • Statements: 94%
405
- • Branches: 88%
406
- • Functions: 92%
407
- • Lines: 94%
408
-
409
- All 11 tests passed.
410
- ```
411
-
412
- ### AI: Code Review
413
-
414
- ```
415
- AI: Running code review...
416
-
417
- ──────────────────────────────────────────────────────────
418
- Code Review Results
419
- ──────────────────────────────────────────────────────────
420
-
421
- ✅ Follows project conventions
422
- • Feature-based structure ✓
423
- • TypeScript strict mode ✓
424
- • React Query patterns ✓
425
- • Tailwind styling ✓
426
-
427
- ✅ No security issues detected
428
- • No XSS vulnerabilities
429
- • Proper input sanitization
430
- • WebSocket events validated
431
-
432
- ✅ Accessibility
433
- • Proper ARIA labels
434
- • Keyboard navigation works
435
- • Focus management correct
436
-
437
- ✅ Performance
438
- • No unnecessary re-renders
439
- • Proper memoization
440
- • Efficient socket handling
441
-
442
- ⚠️ Suggestions (non-blocking):
443
- • Consider adding error boundary for dropdown
444
- • Could add skeleton loading state
445
-
446
- Ready for deployment.
447
- ```
448
-
449
- ### AI: Final Summary
450
-
451
- ```
452
- AI: Feature implementation complete!
453
-
454
- ──────────────────────────────────────────────────────────
455
- Notifications Feature Summary
456
- ──────────────────────────────────────────────────────────
457
-
458
- Created Files: 14
459
- ├── src/features/notifications/
460
- │ ├── index.ts
461
- │ ├── types.ts
462
- │ ├── components/
463
- │ │ ├── NotificationBell.tsx
464
- │ │ ├── NotificationDropdown.tsx
465
- │ │ ├── NotificationItem.tsx
466
- │ │ ├── NotificationList.tsx
467
- │ │ └── NotificationFilters.tsx
468
- │ ├── hooks/
469
- │ │ ├── useNotifications.ts
470
- │ │ ├── useMarkAsRead.ts
471
- │ │ ├── useNotificationSocket.ts
472
- │ │ └── useUnreadCount.ts
473
- │ ├── pages/
474
- │ │ └── NotificationsPage.tsx
475
- │ └── services/
476
- │ └── notificationsApi.ts
477
-
478
- Modified Files: 4
479
- ├── src/components/layout/Header.tsx
480
- ├── src/services/socket.ts
481
- ├── src/App.tsx
482
- └── src/types/index.ts
483
-
484
- Test Coverage: 94%
485
-
486
- Ready to commit and create PR?
487
- ```
488
-
489
- ### User Confirms Commit
490
-
491
- ```
492
- User: Yes, commit and create the PR.
493
- ```
494
-
495
- ### AI: Git Operations
496
-
497
- ```
498
- AI: Creating commit and pull request...
499
-
500
- ──────────────────────────────────────────────────────────
501
- Git Operations
502
- ──────────────────────────────────────────────────────────
503
-
504
- $ git add .
505
- $ git commit -m "feat(notifications): add notifications system
506
-
507
- - Add notification bell with unread count badge
508
- - Add notification dropdown with real-time updates
509
- - Add mark as read functionality
510
- - Add full notifications page with filters
511
- - Integrate WebSocket for real-time notifications
512
- - Add comprehensive tests (94% coverage)
513
-
514
- Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>"
515
-
516
- $ git push origin feature/notifications
517
-
518
- Pull request created:
519
- https://github.com/user/app/pull/142
520
-
521
- PR Title: feat(notifications): add notifications system
522
-
523
- PR Description:
524
- ## Summary
525
- - Adds notification bell icon in header with unread count
526
- - Dropdown showing recent notifications
527
- - Full notifications page with filtering
528
- - Real-time updates via WebSocket
529
- - Mark as read functionality
530
-
531
- ## Test Plan
532
- - [x] Unit tests (11 passing)
533
- - [x] Manual testing of dropdown
534
- - [x] Real-time updates verified
535
- - [x] Mobile responsive checked
536
-
537
- 🤖 Generated with Claude Code
538
-
539
- ──────────────────────────────────────────────────────────
540
-
541
- Feature complete! The PR is ready for review.
542
- ```
543
-
544
- ---
545
-
546
- ## Key Takeaways
547
-
548
- This conversation demonstrated:
549
-
550
- 1. **Automatic Analysis** - AI analyzed existing patterns before suggesting implementation
551
- 2. **Clarifying Questions** - AI asked specific questions when requirements were ambiguous
552
- 3. **Visual Design** - ASCII wireframes for approval before coding
553
- 4. **Incremental Progress** - User saw progress at each step
554
- 5. **Following Patterns** - Used existing project conventions throughout
555
- 6. **Complete Testing** - Tests written and run automatically
556
- 7. **Clean Commits** - Proper commit message with description