@nebutra/next-unicorn-skill 1.0.0

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 (119) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/LICENSE +21 -0
  3. package/README.md +316 -0
  4. package/SKILL.md +318 -0
  5. package/dist/analyzer/pattern-catalog.d.ts +35 -0
  6. package/dist/analyzer/pattern-catalog.d.ts.map +1 -0
  7. package/dist/analyzer/pattern-catalog.js +342 -0
  8. package/dist/analyzer/pattern-catalog.js.map +1 -0
  9. package/dist/analyzer/scanner.d.ts +33 -0
  10. package/dist/analyzer/scanner.d.ts.map +1 -0
  11. package/dist/analyzer/scanner.js +302 -0
  12. package/dist/analyzer/scanner.js.map +1 -0
  13. package/dist/auditor/ux-auditor.d.ts +26 -0
  14. package/dist/auditor/ux-auditor.d.ts.map +1 -0
  15. package/dist/auditor/ux-auditor.js +272 -0
  16. package/dist/auditor/ux-auditor.js.map +1 -0
  17. package/dist/checker/peer-dependency-checker.d.ts +62 -0
  18. package/dist/checker/peer-dependency-checker.d.ts.map +1 -0
  19. package/dist/checker/peer-dependency-checker.js +94 -0
  20. package/dist/checker/peer-dependency-checker.js.map +1 -0
  21. package/dist/index.d.ts +78 -0
  22. package/dist/index.d.ts.map +1 -0
  23. package/dist/index.js +325 -0
  24. package/dist/index.js.map +1 -0
  25. package/dist/planner/migration-planner.d.ts +47 -0
  26. package/dist/planner/migration-planner.d.ts.map +1 -0
  27. package/dist/planner/migration-planner.js +144 -0
  28. package/dist/planner/migration-planner.js.map +1 -0
  29. package/dist/pr-creator/git-operations.d.ts +29 -0
  30. package/dist/pr-creator/git-operations.d.ts.map +1 -0
  31. package/dist/pr-creator/git-operations.js +10 -0
  32. package/dist/pr-creator/git-operations.js.map +1 -0
  33. package/dist/pr-creator/platform-client.d.ts +47 -0
  34. package/dist/pr-creator/platform-client.d.ts.map +1 -0
  35. package/dist/pr-creator/platform-client.js +9 -0
  36. package/dist/pr-creator/platform-client.js.map +1 -0
  37. package/dist/pr-creator/pr-description-builder.d.ts +23 -0
  38. package/dist/pr-creator/pr-description-builder.d.ts.map +1 -0
  39. package/dist/pr-creator/pr-description-builder.js +187 -0
  40. package/dist/pr-creator/pr-description-builder.js.map +1 -0
  41. package/dist/pr-creator/pr-executor.d.ts +30 -0
  42. package/dist/pr-creator/pr-executor.d.ts.map +1 -0
  43. package/dist/pr-creator/pr-executor.js +109 -0
  44. package/dist/pr-creator/pr-executor.js.map +1 -0
  45. package/dist/pr-creator/pr-strategy.d.ts +56 -0
  46. package/dist/pr-creator/pr-strategy.d.ts.map +1 -0
  47. package/dist/pr-creator/pr-strategy.js +125 -0
  48. package/dist/pr-creator/pr-strategy.js.map +1 -0
  49. package/dist/schemas/input.schema.d.ts +231 -0
  50. package/dist/schemas/input.schema.d.ts.map +1 -0
  51. package/dist/schemas/input.schema.js +159 -0
  52. package/dist/schemas/input.schema.js.map +1 -0
  53. package/dist/schemas/output.schema.d.ts +2543 -0
  54. package/dist/schemas/output.schema.d.ts.map +1 -0
  55. package/dist/schemas/output.schema.js +199 -0
  56. package/dist/schemas/output.schema.js.map +1 -0
  57. package/dist/scorer/impact-scorer.d.ts +45 -0
  58. package/dist/scorer/impact-scorer.d.ts.map +1 -0
  59. package/dist/scorer/impact-scorer.js +243 -0
  60. package/dist/scorer/impact-scorer.js.map +1 -0
  61. package/dist/security/osv-client.d.ts +72 -0
  62. package/dist/security/osv-client.d.ts.map +1 -0
  63. package/dist/security/osv-client.js +36 -0
  64. package/dist/security/osv-client.js.map +1 -0
  65. package/dist/security/vuln-report-builder.d.ts +18 -0
  66. package/dist/security/vuln-report-builder.d.ts.map +1 -0
  67. package/dist/security/vuln-report-builder.js +141 -0
  68. package/dist/security/vuln-report-builder.js.map +1 -0
  69. package/dist/security/vulnerability-scanner.d.ts +65 -0
  70. package/dist/security/vulnerability-scanner.d.ts.map +1 -0
  71. package/dist/security/vulnerability-scanner.js +140 -0
  72. package/dist/security/vulnerability-scanner.js.map +1 -0
  73. package/dist/updater/changelog-verifier.d.ts +29 -0
  74. package/dist/updater/changelog-verifier.d.ts.map +1 -0
  75. package/dist/updater/changelog-verifier.js +80 -0
  76. package/dist/updater/changelog-verifier.js.map +1 -0
  77. package/dist/updater/registry-client.d.ts +49 -0
  78. package/dist/updater/registry-client.d.ts.map +1 -0
  79. package/dist/updater/registry-client.js +10 -0
  80. package/dist/updater/registry-client.js.map +1 -0
  81. package/dist/updater/update-plan-builder.d.ts +23 -0
  82. package/dist/updater/update-plan-builder.d.ts.map +1 -0
  83. package/dist/updater/update-plan-builder.js +93 -0
  84. package/dist/updater/update-plan-builder.js.map +1 -0
  85. package/dist/updater/update-policy.d.ts +50 -0
  86. package/dist/updater/update-policy.d.ts.map +1 -0
  87. package/dist/updater/update-policy.js +118 -0
  88. package/dist/updater/update-policy.js.map +1 -0
  89. package/dist/updater/update-scorer.d.ts +51 -0
  90. package/dist/updater/update-scorer.d.ts.map +1 -0
  91. package/dist/updater/update-scorer.js +166 -0
  92. package/dist/updater/update-scorer.js.map +1 -0
  93. package/dist/utils/constraint-filter.d.ts +44 -0
  94. package/dist/utils/constraint-filter.d.ts.map +1 -0
  95. package/dist/utils/constraint-filter.js +69 -0
  96. package/dist/utils/constraint-filter.js.map +1 -0
  97. package/dist/utils/serializer.d.ts +17 -0
  98. package/dist/utils/serializer.d.ts.map +1 -0
  99. package/dist/utils/serializer.js +24 -0
  100. package/dist/utils/serializer.js.map +1 -0
  101. package/dist/utils/skill-parser.d.ts +29 -0
  102. package/dist/utils/skill-parser.d.ts.map +1 -0
  103. package/dist/utils/skill-parser.js +175 -0
  104. package/dist/utils/skill-parser.js.map +1 -0
  105. package/dist/verifier/context7.d.ts +48 -0
  106. package/dist/verifier/context7.d.ts.map +1 -0
  107. package/dist/verifier/context7.js +97 -0
  108. package/dist/verifier/context7.js.map +1 -0
  109. package/examples/backend-node/input.json +28 -0
  110. package/examples/backend-node/output.json +343 -0
  111. package/examples/frontend-nextjs/input.json +37 -0
  112. package/examples/frontend-nextjs/output.json +302 -0
  113. package/package.json +79 -0
  114. package/templates/deletion-checklist.md +42 -0
  115. package/templates/migration-plan.md +61 -0
  116. package/templates/prd-template.md +123 -0
  117. package/templates/summary-table.md +28 -0
  118. package/templates/update-plan.md +61 -0
  119. package/templates/vuln-report.md +50 -0
@@ -0,0 +1,343 @@
1
+ {
2
+ "recommendedChanges": [
3
+ {
4
+ "currentImplementation": {
5
+ "filePath": "src/middleware/auth.ts",
6
+ "lineRange": { "start": 1, "end": 110 },
7
+ "patternCategory": "custom-auth",
8
+ "confidenceScore": 0.91
9
+ },
10
+ "recommendedLibrary": {
11
+ "name": "passport",
12
+ "version": "0.7.0",
13
+ "license": "MIT",
14
+ "documentationUrl": "https://www.passportjs.org/docs/"
15
+ },
16
+ "domain": "auth-security",
17
+ "impactScores": {
18
+ "scalability": 8,
19
+ "performance": 7,
20
+ "security": 10,
21
+ "maintainability": 9,
22
+ "feature_richness": 9,
23
+ "ux": 5,
24
+ "ui_aesthetics": 3,
25
+ "composite": 7.3
26
+ },
27
+ "migrationRisk": "high",
28
+ "estimatedEffort": 24,
29
+ "adapterStrategy": {
30
+ "wrapperInterface": "AuthMiddleware",
31
+ "legacyCode": "src/middleware/auth.ts",
32
+ "targetLibrary": "passport",
33
+ "description": "Create an AuthMiddleware wrapper that maintains the existing req.user interface while delegating to Passport strategies internally, allowing route-by-route migration"
34
+ },
35
+ "verificationStatus": "verified",
36
+ "verificationNote": "Context7 confirmed passport supports JWT, OAuth2, local strategies, and Express middleware integration"
37
+ },
38
+ {
39
+ "currentImplementation": {
40
+ "filePath": "src/utils/logger.ts",
41
+ "lineRange": { "start": 1, "end": 75 },
42
+ "patternCategory": "custom-logging",
43
+ "confidenceScore": 0.94
44
+ },
45
+ "recommendedLibrary": {
46
+ "name": "pino",
47
+ "version": "8.17.2",
48
+ "license": "MIT",
49
+ "documentationUrl": "https://getpino.io/#/docs/api"
50
+ },
51
+ "domain": "observability",
52
+ "impactScores": {
53
+ "scalability": 8,
54
+ "performance": 10,
55
+ "security": 7,
56
+ "maintainability": 9,
57
+ "feature_richness": 9,
58
+ "ux": 4,
59
+ "ui_aesthetics": 3,
60
+ "composite": 7.1
61
+ },
62
+ "migrationRisk": "low",
63
+ "estimatedEffort": 6,
64
+ "verificationStatus": "verified",
65
+ "verificationNote": "Context7 confirmed pino supports structured JSON logging, log levels, redaction, child loggers, and pino-pretty transport"
66
+ },
67
+ {
68
+ "currentImplementation": {
69
+ "filePath": "src/middleware/validate.ts",
70
+ "lineRange": { "start": 1, "end": 90 },
71
+ "patternCategory": "custom-validation",
72
+ "confidenceScore": 0.87
73
+ },
74
+ "recommendedLibrary": {
75
+ "name": "zod",
76
+ "version": "3.22.4",
77
+ "license": "MIT",
78
+ "documentationUrl": "https://zod.dev"
79
+ },
80
+ "domain": "auth-security",
81
+ "impactScores": {
82
+ "scalability": 7,
83
+ "performance": 8,
84
+ "security": 9,
85
+ "maintainability": 10,
86
+ "feature_richness": 9,
87
+ "ux": 6,
88
+ "ui_aesthetics": 3,
89
+ "composite": 7.4
90
+ },
91
+ "migrationRisk": "low",
92
+ "estimatedEffort": 8,
93
+ "verificationStatus": "verified",
94
+ "verificationNote": "Context7 confirmed zod supports schema inference, transform pipelines, and Express middleware integration"
95
+ },
96
+ {
97
+ "currentImplementation": {
98
+ "filePath": "src/utils/rate-limiter.ts",
99
+ "lineRange": { "start": 1, "end": 60 },
100
+ "patternCategory": "custom-rate-limiting",
101
+ "confidenceScore": 0.83
102
+ },
103
+ "recommendedLibrary": {
104
+ "name": "express-rate-limit",
105
+ "version": "7.1.5",
106
+ "license": "MIT",
107
+ "documentationUrl": "https://github.com/express-rate-limit/express-rate-limit"
108
+ },
109
+ "domain": "auth-security",
110
+ "impactScores": {
111
+ "scalability": 9,
112
+ "performance": 8,
113
+ "security": 9,
114
+ "maintainability": 8,
115
+ "feature_richness": 8,
116
+ "ux": 5,
117
+ "ui_aesthetics": 3,
118
+ "composite": 7.1
119
+ },
120
+ "migrationRisk": "low",
121
+ "estimatedEffort": 4,
122
+ "verificationStatus": "verified",
123
+ "verificationNote": "Context7 confirmed express-rate-limit supports Redis store, sliding window, and per-route configuration"
124
+ },
125
+ {
126
+ "currentImplementation": {
127
+ "filePath": "src/utils/tracing.ts",
128
+ "lineRange": { "start": 1, "end": 130 },
129
+ "patternCategory": "custom-tracing",
130
+ "confidenceScore": 0.79
131
+ },
132
+ "recommendedLibrary": {
133
+ "name": "@opentelemetry/sdk-node",
134
+ "version": "0.48.0",
135
+ "license": "Apache-2.0",
136
+ "documentationUrl": "https://opentelemetry.io/docs/languages/js/"
137
+ },
138
+ "domain": "observability",
139
+ "impactScores": {
140
+ "scalability": 10,
141
+ "performance": 7,
142
+ "security": 6,
143
+ "maintainability": 8,
144
+ "feature_richness": 10,
145
+ "ux": 4,
146
+ "ui_aesthetics": 3,
147
+ "composite": 6.9
148
+ },
149
+ "migrationRisk": "medium",
150
+ "estimatedEffort": 16,
151
+ "adapterStrategy": {
152
+ "wrapperInterface": "TracingProvider",
153
+ "legacyCode": "src/utils/tracing.ts",
154
+ "targetLibrary": "@opentelemetry/sdk-node",
155
+ "description": "Create a TracingProvider wrapper that exposes the existing span/trace API while delegating to OpenTelemetry SDK internally"
156
+ },
157
+ "verificationStatus": "verified",
158
+ "verificationNote": "Context7 confirmed @opentelemetry/sdk-node supports auto-instrumentation for Express, pg, and HTTP"
159
+ },
160
+ {
161
+ "currentImplementation": {
162
+ "filePath": "src/utils/error-handler.ts",
163
+ "lineRange": { "start": 1, "end": 55 },
164
+ "patternCategory": "custom-error-tracking",
165
+ "confidenceScore": 0.76
166
+ },
167
+ "recommendedLibrary": {
168
+ "name": "@sentry/node",
169
+ "version": "7.93.0",
170
+ "license": "MIT",
171
+ "documentationUrl": "https://docs.sentry.io/platforms/node/"
172
+ },
173
+ "domain": "observability",
174
+ "impactScores": {
175
+ "scalability": 8,
176
+ "performance": 7,
177
+ "security": 7,
178
+ "maintainability": 8,
179
+ "feature_richness": 10,
180
+ "ux": 5,
181
+ "ui_aesthetics": 3,
182
+ "composite": 6.9
183
+ },
184
+ "migrationRisk": "low",
185
+ "estimatedEffort": 6,
186
+ "verificationStatus": "verified",
187
+ "verificationNote": "Context7 confirmed @sentry/node supports Express integration, source maps, breadcrumbs, and performance monitoring"
188
+ }
189
+ ],
190
+ "filesToDelete": [
191
+ "src/middleware/auth.ts",
192
+ "src/utils/logger.ts",
193
+ "src/middleware/validate.ts",
194
+ "src/utils/rate-limiter.ts",
195
+ "src/utils/tracing.ts",
196
+ "src/utils/error-handler.ts"
197
+ ],
198
+ "linesSavedEstimate": 520,
199
+ "uxAudit": [
200
+ {
201
+ "category": "accessibility",
202
+ "status": "present",
203
+ "filePaths": [],
204
+ "rationale": "Backend API — accessibility is not applicable to server-side code. API responses use standard HTTP status codes and structured error bodies."
205
+ },
206
+ {
207
+ "category": "error-states",
208
+ "status": "partial",
209
+ "filePaths": ["src/utils/error-handler.ts", "src/middleware/error.ts"],
210
+ "recommendedLibrary": "@sentry/node",
211
+ "rationale": "Custom error handler exists but lacks structured error tracking, alerting, and breadcrumb context. @sentry/node provides comprehensive error monitoring."
212
+ },
213
+ {
214
+ "category": "empty-states",
215
+ "status": "present",
216
+ "filePaths": [],
217
+ "rationale": "Backend API — empty states handled via standard HTTP 204 and empty array responses."
218
+ },
219
+ {
220
+ "category": "loading-states",
221
+ "status": "present",
222
+ "filePaths": [],
223
+ "rationale": "Backend API — loading states are not applicable. Request timeouts and streaming responses are handled at the HTTP layer."
224
+ },
225
+ {
226
+ "category": "form-validation",
227
+ "status": "partial",
228
+ "filePaths": ["src/middleware/validate.ts"],
229
+ "recommendedLibrary": "zod",
230
+ "rationale": "Custom validation middleware exists but lacks type inference and consistent error formatting. Zod provides schema-first validation with TypeScript type inference."
231
+ },
232
+ {
233
+ "category": "performance-feel",
234
+ "status": "partial",
235
+ "filePaths": ["src/utils/tracing.ts"],
236
+ "recommendedLibrary": "@opentelemetry/sdk-node",
237
+ "rationale": "Custom tracing exists but lacks distributed trace context propagation and auto-instrumentation. OpenTelemetry provides vendor-neutral observability."
238
+ },
239
+ {
240
+ "category": "copy-consistency",
241
+ "status": "present",
242
+ "filePaths": [],
243
+ "rationale": "Backend API — copy consistency is handled via structured JSON responses with consistent field naming conventions."
244
+ },
245
+ {
246
+ "category": "design-system-alignment",
247
+ "status": "present",
248
+ "filePaths": [],
249
+ "rationale": "Backend API — design system alignment is not applicable. API follows RESTful conventions with consistent response structure."
250
+ }
251
+ ],
252
+ "migrationPlan": {
253
+ "phases": [
254
+ {
255
+ "phase": 1,
256
+ "name": "Quick Wins — Low Risk",
257
+ "steps": [
258
+ {
259
+ "recommendationIndex": 1,
260
+ "description": "Replace custom logger (src/utils/logger.ts) with pino. Configure structured JSON output, log levels, and redaction for sensitive fields."
261
+ },
262
+ {
263
+ "recommendationIndex": 2,
264
+ "description": "Replace custom validation middleware (src/middleware/validate.ts) with Zod schemas. Create per-route schemas and a generic validation middleware."
265
+ },
266
+ {
267
+ "recommendationIndex": 3,
268
+ "description": "Replace custom rate limiter (src/utils/rate-limiter.ts) with express-rate-limit. Configure per-route limits and Redis store for distributed deployments."
269
+ },
270
+ {
271
+ "recommendationIndex": 5,
272
+ "description": "Replace custom error handler (src/utils/error-handler.ts) with @sentry/node. Configure Express integration, source maps, and environment tagging."
273
+ }
274
+ ]
275
+ },
276
+ {
277
+ "phase": 2,
278
+ "name": "Moderate Refactoring — Medium Risk",
279
+ "steps": [
280
+ {
281
+ "recommendationIndex": 4,
282
+ "description": "Migrate custom tracing (src/utils/tracing.ts) to OpenTelemetry via TracingProvider adapter. Enable auto-instrumentation for Express and pg.",
283
+ "adapterStrategy": {
284
+ "wrapperInterface": "TracingProvider",
285
+ "legacyCode": "src/utils/tracing.ts",
286
+ "targetLibrary": "@opentelemetry/sdk-node",
287
+ "description": "Create a TracingProvider wrapper that exposes the existing span/trace API while delegating to OpenTelemetry SDK internally"
288
+ }
289
+ }
290
+ ]
291
+ },
292
+ {
293
+ "phase": 3,
294
+ "name": "High Risk — Adapter Strategy Required",
295
+ "steps": [
296
+ {
297
+ "recommendationIndex": 0,
298
+ "description": "Migrate custom auth middleware (src/middleware/auth.ts) to Passport via AuthMiddleware adapter. Migrate route-by-route, starting with least-critical endpoints.",
299
+ "adapterStrategy": {
300
+ "wrapperInterface": "AuthMiddleware",
301
+ "legacyCode": "src/middleware/auth.ts",
302
+ "targetLibrary": "passport",
303
+ "description": "Create an AuthMiddleware wrapper that maintains the existing req.user interface while delegating to Passport strategies internally, allowing route-by-route migration"
304
+ }
305
+ }
306
+ ]
307
+ }
308
+ ],
309
+ "deletionChecklist": [
310
+ {
311
+ "filePath": "src/middleware/auth.ts",
312
+ "lineRange": { "start": 1, "end": 110 },
313
+ "reason": "Replaced by passport — custom JWT verification, session handling, and role checking no longer needed"
314
+ },
315
+ {
316
+ "filePath": "src/utils/logger.ts",
317
+ "lineRange": { "start": 1, "end": 75 },
318
+ "reason": "Replaced by pino — custom console.log wrapper and manual JSON formatting no longer needed"
319
+ },
320
+ {
321
+ "filePath": "src/middleware/validate.ts",
322
+ "lineRange": { "start": 1, "end": 90 },
323
+ "reason": "Replaced by zod — custom request body validation and type coercion no longer needed"
324
+ },
325
+ {
326
+ "filePath": "src/utils/rate-limiter.ts",
327
+ "lineRange": { "start": 1, "end": 60 },
328
+ "reason": "Replaced by express-rate-limit — custom in-memory rate limiting with manual cleanup no longer needed"
329
+ },
330
+ {
331
+ "filePath": "src/utils/tracing.ts",
332
+ "lineRange": { "start": 1, "end": 130 },
333
+ "reason": "Replaced by @opentelemetry/sdk-node — custom span tracking and context propagation no longer needed"
334
+ },
335
+ {
336
+ "filePath": "src/utils/error-handler.ts",
337
+ "lineRange": { "start": 1, "end": 55 },
338
+ "reason": "Replaced by @sentry/node — custom error logging and notification no longer needed"
339
+ }
340
+ ],
341
+ "peerDependencyWarnings": []
342
+ }
343
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "projectMetadata": {
3
+ "repoPath": "./my-nextjs-app",
4
+ "languages": ["typescript", "javascript"],
5
+ "packageManagers": ["pnpm"],
6
+ "currentLibraries": {
7
+ "react": "18.2.0",
8
+ "react-dom": "18.2.0",
9
+ "next": "14.1.0",
10
+ "tailwindcss": "3.4.1",
11
+ "typescript": "5.3.3",
12
+ "zod": "3.22.4"
13
+ }
14
+ },
15
+ "optimizationGoals": [
16
+ "Replace hand-rolled i18n with a mature internationalization library",
17
+ "Replace custom date formatting utilities with a standard library",
18
+ "Improve accessibility coverage across all components",
19
+ "Add structured SEO metadata management",
20
+ "Replace custom analytics tracking with a unified solution"
21
+ ],
22
+ "constraints": {
23
+ "licenseAllowlist": ["MIT", "Apache-2.0", "ISC", "BSD-2-Clause", "BSD-3-Clause"],
24
+ "excludedLibraries": ["moment"],
25
+ "maxDependencyCount": 80
26
+ },
27
+ "priorityFocusAreas": ["i18n", "seo", "ux-completeness"],
28
+ "impactWeights": {
29
+ "scalability": 0.15,
30
+ "performance": 0.15,
31
+ "security": 0.1,
32
+ "maintainability": 0.2,
33
+ "feature_richness": 0.15,
34
+ "ux": 0.15,
35
+ "ui_aesthetics": 0.1
36
+ }
37
+ }
@@ -0,0 +1,302 @@
1
+ {
2
+ "recommendedChanges": [
3
+ {
4
+ "currentImplementation": {
5
+ "filePath": "src/utils/i18n.ts",
6
+ "lineRange": { "start": 1, "end": 85 },
7
+ "patternCategory": "custom-i18n",
8
+ "confidenceScore": 0.92
9
+ },
10
+ "recommendedLibrary": {
11
+ "name": "next-intl",
12
+ "version": "3.9.0",
13
+ "license": "MIT",
14
+ "documentationUrl": "https://next-intl-docs.vercel.app"
15
+ },
16
+ "domain": "i18n",
17
+ "impactScores": {
18
+ "scalability": 9,
19
+ "performance": 8,
20
+ "security": 5,
21
+ "maintainability": 9,
22
+ "feature_richness": 10,
23
+ "ux": 8,
24
+ "ui_aesthetics": 6,
25
+ "composite": 8.1
26
+ },
27
+ "migrationRisk": "low",
28
+ "estimatedEffort": 12,
29
+ "verificationStatus": "verified",
30
+ "verificationNote": "Context7 confirmed next-intl supports App Router, RSC, and ICU message syntax"
31
+ },
32
+ {
33
+ "currentImplementation": {
34
+ "filePath": "src/utils/date-helpers.ts",
35
+ "lineRange": { "start": 1, "end": 120 },
36
+ "patternCategory": "custom-date-formatting",
37
+ "confidenceScore": 0.88
38
+ },
39
+ "recommendedLibrary": {
40
+ "name": "date-fns",
41
+ "version": "3.3.1",
42
+ "license": "MIT",
43
+ "documentationUrl": "https://date-fns.org/docs"
44
+ },
45
+ "domain": "i18n",
46
+ "impactScores": {
47
+ "scalability": 7,
48
+ "performance": 8,
49
+ "security": 5,
50
+ "maintainability": 9,
51
+ "feature_richness": 9,
52
+ "ux": 6,
53
+ "ui_aesthetics": 5,
54
+ "composite": 7.2
55
+ },
56
+ "migrationRisk": "low",
57
+ "estimatedEffort": 6,
58
+ "verificationStatus": "verified",
59
+ "verificationNote": "Context7 confirmed date-fns v3 supports tree-shaking and locale-aware formatting"
60
+ },
61
+ {
62
+ "currentImplementation": {
63
+ "filePath": "src/components/SEOHead.tsx",
64
+ "lineRange": { "start": 1, "end": 65 },
65
+ "patternCategory": "custom-seo-meta",
66
+ "confidenceScore": 0.85
67
+ },
68
+ "recommendedLibrary": {
69
+ "name": "next-seo",
70
+ "version": "6.4.0",
71
+ "license": "MIT",
72
+ "documentationUrl": "https://github.com/garmeeh/next-seo"
73
+ },
74
+ "domain": "seo",
75
+ "impactScores": {
76
+ "scalability": 7,
77
+ "performance": 6,
78
+ "security": 4,
79
+ "maintainability": 8,
80
+ "feature_richness": 9,
81
+ "ux": 5,
82
+ "ui_aesthetics": 4,
83
+ "composite": 6.4
84
+ },
85
+ "migrationRisk": "low",
86
+ "estimatedEffort": 4,
87
+ "verificationStatus": "verified",
88
+ "verificationNote": "Context7 confirmed next-seo supports JSON-LD, Open Graph, and Twitter cards"
89
+ },
90
+ {
91
+ "currentImplementation": {
92
+ "filePath": "src/lib/analytics.ts",
93
+ "lineRange": { "start": 1, "end": 95 },
94
+ "patternCategory": "custom-analytics",
95
+ "confidenceScore": 0.78
96
+ },
97
+ "recommendedLibrary": {
98
+ "name": "posthog-js",
99
+ "version": "1.96.0",
100
+ "license": "MIT",
101
+ "documentationUrl": "https://posthog.com/docs"
102
+ },
103
+ "domain": "growth-hacking",
104
+ "impactScores": {
105
+ "scalability": 9,
106
+ "performance": 7,
107
+ "security": 7,
108
+ "maintainability": 8,
109
+ "feature_richness": 10,
110
+ "ux": 6,
111
+ "ui_aesthetics": 4,
112
+ "composite": 7.4
113
+ },
114
+ "migrationRisk": "medium",
115
+ "estimatedEffort": 16,
116
+ "adapterStrategy": {
117
+ "wrapperInterface": "AnalyticsProvider",
118
+ "legacyCode": "src/lib/analytics.ts",
119
+ "targetLibrary": "posthog-js",
120
+ "description": "Create an AnalyticsProvider wrapper that abstracts the tracking API, allowing gradual migration from custom analytics to PostHog"
121
+ },
122
+ "verificationStatus": "verified",
123
+ "verificationNote": "Context7 confirmed posthog-js supports event tracking, feature flags, and session recording"
124
+ },
125
+ {
126
+ "currentImplementation": {
127
+ "filePath": "src/components/ui/FormField.tsx",
128
+ "lineRange": { "start": 15, "end": 90 },
129
+ "patternCategory": "custom-form-validation",
130
+ "confidenceScore": 0.82
131
+ },
132
+ "recommendedLibrary": {
133
+ "name": "react-hook-form",
134
+ "version": "7.49.3",
135
+ "license": "MIT",
136
+ "documentationUrl": "https://react-hook-form.com"
137
+ },
138
+ "domain": "ux-completeness",
139
+ "impactScores": {
140
+ "scalability": 7,
141
+ "performance": 9,
142
+ "security": 6,
143
+ "maintainability": 8,
144
+ "feature_richness": 9,
145
+ "ux": 9,
146
+ "ui_aesthetics": 6,
147
+ "composite": 7.9
148
+ },
149
+ "migrationRisk": "medium",
150
+ "estimatedEffort": 20,
151
+ "adapterStrategy": {
152
+ "wrapperInterface": "FormWrapper",
153
+ "legacyCode": "src/components/ui/FormField.tsx",
154
+ "targetLibrary": "react-hook-form",
155
+ "description": "Create a FormWrapper component that provides the same props API while delegating to react-hook-form internally"
156
+ },
157
+ "verificationStatus": "verified",
158
+ "verificationNote": "Context7 confirmed react-hook-form supports Zod resolver integration and uncontrolled components"
159
+ }
160
+ ],
161
+ "filesToDelete": [
162
+ "src/utils/i18n.ts",
163
+ "src/utils/date-helpers.ts",
164
+ "src/components/SEOHead.tsx",
165
+ "src/lib/analytics.ts",
166
+ "src/components/ui/FormField.tsx"
167
+ ],
168
+ "linesSavedEstimate": 455,
169
+ "uxAudit": [
170
+ {
171
+ "category": "accessibility",
172
+ "status": "partial",
173
+ "filePaths": ["src/components/ui/Button.tsx", "src/components/ui/Modal.tsx"],
174
+ "recommendedLibrary": "react-aria",
175
+ "rationale": "Some components lack ARIA attributes and keyboard navigation support. react-aria provides accessible primitives with built-in ARIA patterns."
176
+ },
177
+ {
178
+ "category": "error-states",
179
+ "status": "partial",
180
+ "filePaths": ["src/app/error.tsx"],
181
+ "recommendedLibrary": "react-error-boundary",
182
+ "rationale": "Only a global error boundary exists. Individual component error boundaries are missing. react-error-boundary provides granular error handling with retry support."
183
+ },
184
+ {
185
+ "category": "empty-states",
186
+ "status": "missing",
187
+ "filePaths": [],
188
+ "recommendedLibrary": "react-content-loader",
189
+ "rationale": "No empty state components found. Lists and data views should show meaningful empty states. react-content-loader provides customizable placeholder illustrations."
190
+ },
191
+ {
192
+ "category": "loading-states",
193
+ "status": "partial",
194
+ "filePaths": ["src/components/ui/Spinner.tsx"],
195
+ "recommendedLibrary": "react-loading-skeleton",
196
+ "rationale": "Only a basic spinner exists. Skeleton loading states improve perceived performance. react-loading-skeleton provides animated skeleton placeholders."
197
+ },
198
+ {
199
+ "category": "form-validation",
200
+ "status": "partial",
201
+ "filePaths": ["src/components/ui/FormField.tsx"],
202
+ "recommendedLibrary": "react-hook-form",
203
+ "rationale": "Custom form validation lacks consistent error display and field-level validation. react-hook-form with Zod resolver provides declarative validation with excellent UX."
204
+ },
205
+ {
206
+ "category": "performance-feel",
207
+ "status": "missing",
208
+ "filePaths": [],
209
+ "recommendedLibrary": "framer-motion",
210
+ "rationale": "No transition animations or optimistic updates detected. framer-motion provides layout animations and exit transitions that improve perceived performance."
211
+ },
212
+ {
213
+ "category": "copy-consistency",
214
+ "status": "missing",
215
+ "filePaths": [],
216
+ "recommendedLibrary": "next-intl",
217
+ "rationale": "Hardcoded strings found across components. No centralized copy management. next-intl provides message catalogs with type-safe access."
218
+ },
219
+ {
220
+ "category": "design-system-alignment",
221
+ "status": "present",
222
+ "filePaths": ["src/components/ui/Button.tsx", "src/components/ui/Card.tsx", "src/components/ui/Input.tsx"],
223
+ "rationale": "Tailwind CSS with consistent component patterns detected. Design system alignment is adequate."
224
+ }
225
+ ],
226
+ "migrationPlan": {
227
+ "phases": [
228
+ {
229
+ "phase": 1,
230
+ "name": "Quick Wins — Low Risk",
231
+ "steps": [
232
+ {
233
+ "recommendationIndex": 0,
234
+ "description": "Replace custom i18n utility (src/utils/i18n.ts) with next-intl. Set up message files, configure middleware, and update all t() call sites."
235
+ },
236
+ {
237
+ "recommendationIndex": 1,
238
+ "description": "Replace custom date formatting (src/utils/date-helpers.ts) with date-fns. Update all date formatting call sites to use date-fns format functions."
239
+ },
240
+ {
241
+ "recommendationIndex": 2,
242
+ "description": "Replace custom SEO component (src/components/SEOHead.tsx) with next-seo. Configure default SEO and per-page overrides."
243
+ }
244
+ ]
245
+ },
246
+ {
247
+ "phase": 2,
248
+ "name": "Moderate Refactoring — Medium Risk",
249
+ "steps": [
250
+ {
251
+ "recommendationIndex": 3,
252
+ "description": "Migrate custom analytics (src/lib/analytics.ts) to PostHog via AnalyticsProvider adapter. Gradually replace direct tracking calls.",
253
+ "adapterStrategy": {
254
+ "wrapperInterface": "AnalyticsProvider",
255
+ "legacyCode": "src/lib/analytics.ts",
256
+ "targetLibrary": "posthog-js",
257
+ "description": "Create an AnalyticsProvider wrapper that abstracts the tracking API, allowing gradual migration from custom analytics to PostHog"
258
+ }
259
+ },
260
+ {
261
+ "recommendationIndex": 4,
262
+ "description": "Migrate custom form validation (src/components/ui/FormField.tsx) to react-hook-form via FormWrapper adapter. Update forms one at a time.",
263
+ "adapterStrategy": {
264
+ "wrapperInterface": "FormWrapper",
265
+ "legacyCode": "src/components/ui/FormField.tsx",
266
+ "targetLibrary": "react-hook-form",
267
+ "description": "Create a FormWrapper component that provides the same props API while delegating to react-hook-form internally"
268
+ }
269
+ }
270
+ ]
271
+ }
272
+ ],
273
+ "deletionChecklist": [
274
+ {
275
+ "filePath": "src/utils/i18n.ts",
276
+ "lineRange": { "start": 1, "end": 85 },
277
+ "reason": "Replaced by next-intl — custom translation function and locale map no longer needed"
278
+ },
279
+ {
280
+ "filePath": "src/utils/date-helpers.ts",
281
+ "lineRange": { "start": 1, "end": 120 },
282
+ "reason": "Replaced by date-fns — custom date formatting utilities no longer needed"
283
+ },
284
+ {
285
+ "filePath": "src/components/SEOHead.tsx",
286
+ "lineRange": { "start": 1, "end": 65 },
287
+ "reason": "Replaced by next-seo — custom SEO head component no longer needed"
288
+ },
289
+ {
290
+ "filePath": "src/lib/analytics.ts",
291
+ "lineRange": { "start": 1, "end": 95 },
292
+ "reason": "Replaced by posthog-js — custom analytics tracking no longer needed after adapter migration"
293
+ },
294
+ {
295
+ "filePath": "src/components/ui/FormField.tsx",
296
+ "lineRange": { "start": 15, "end": 90 },
297
+ "reason": "Replaced by react-hook-form — custom form validation logic no longer needed after adapter migration"
298
+ }
299
+ ],
300
+ "peerDependencyWarnings": []
301
+ }
302
+ }