mcp-adr-analysis-server 1.1.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 (131) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +608 -0
  3. package/dist/src/index.d.ts +10 -0
  4. package/dist/src/index.d.ts.map +1 -0
  5. package/dist/src/index.js +1722 -0
  6. package/dist/src/index.js.map +1 -0
  7. package/dist/src/prompts/adr-suggestion-prompts.d.ts +24 -0
  8. package/dist/src/prompts/adr-suggestion-prompts.d.ts.map +1 -0
  9. package/dist/src/prompts/adr-suggestion-prompts.js +383 -0
  10. package/dist/src/prompts/adr-suggestion-prompts.js.map +1 -0
  11. package/dist/src/prompts/analysis-prompts.d.ts +24 -0
  12. package/dist/src/prompts/analysis-prompts.d.ts.map +1 -0
  13. package/dist/src/prompts/analysis-prompts.js +489 -0
  14. package/dist/src/prompts/analysis-prompts.js.map +1 -0
  15. package/dist/src/prompts/deployment-analysis-prompts.d.ts +54 -0
  16. package/dist/src/prompts/deployment-analysis-prompts.d.ts.map +1 -0
  17. package/dist/src/prompts/deployment-analysis-prompts.js +712 -0
  18. package/dist/src/prompts/deployment-analysis-prompts.js.map +1 -0
  19. package/dist/src/prompts/environment-analysis-prompts.d.ts +34 -0
  20. package/dist/src/prompts/environment-analysis-prompts.d.ts.map +1 -0
  21. package/dist/src/prompts/environment-analysis-prompts.js +724 -0
  22. package/dist/src/prompts/environment-analysis-prompts.js.map +1 -0
  23. package/dist/src/prompts/index.d.ts +43 -0
  24. package/dist/src/prompts/index.d.ts.map +1 -0
  25. package/dist/src/prompts/index.js +384 -0
  26. package/dist/src/prompts/index.js.map +1 -0
  27. package/dist/src/prompts/research-integration-prompts.d.ts +43 -0
  28. package/dist/src/prompts/research-integration-prompts.d.ts.map +1 -0
  29. package/dist/src/prompts/research-integration-prompts.js +398 -0
  30. package/dist/src/prompts/research-integration-prompts.js.map +1 -0
  31. package/dist/src/prompts/research-question-prompts.d.ts +75 -0
  32. package/dist/src/prompts/research-question-prompts.d.ts.map +1 -0
  33. package/dist/src/prompts/research-question-prompts.js +695 -0
  34. package/dist/src/prompts/research-question-prompts.js.map +1 -0
  35. package/dist/src/prompts/rule-generation-prompts.d.ts +63 -0
  36. package/dist/src/prompts/rule-generation-prompts.d.ts.map +1 -0
  37. package/dist/src/prompts/rule-generation-prompts.js +630 -0
  38. package/dist/src/prompts/rule-generation-prompts.js.map +1 -0
  39. package/dist/src/prompts/security-prompts.d.ts +23 -0
  40. package/dist/src/prompts/security-prompts.d.ts.map +1 -0
  41. package/dist/src/prompts/security-prompts.js +287 -0
  42. package/dist/src/prompts/security-prompts.js.map +1 -0
  43. package/dist/src/resources/index.d.ts +24 -0
  44. package/dist/src/resources/index.d.ts.map +1 -0
  45. package/dist/src/resources/index.js +458 -0
  46. package/dist/src/resources/index.js.map +1 -0
  47. package/dist/src/tools/adr-suggestion-tool.d.ts +40 -0
  48. package/dist/src/tools/adr-suggestion-tool.d.ts.map +1 -0
  49. package/dist/src/tools/adr-suggestion-tool.js +338 -0
  50. package/dist/src/tools/adr-suggestion-tool.js.map +1 -0
  51. package/dist/src/tools/content-masking-tool.d.ts +52 -0
  52. package/dist/src/tools/content-masking-tool.d.ts.map +1 -0
  53. package/dist/src/tools/content-masking-tool.js +206 -0
  54. package/dist/src/tools/content-masking-tool.js.map +1 -0
  55. package/dist/src/tools/deployment-analysis-tool.d.ts +39 -0
  56. package/dist/src/tools/deployment-analysis-tool.d.ts.map +1 -0
  57. package/dist/src/tools/deployment-analysis-tool.js +310 -0
  58. package/dist/src/tools/deployment-analysis-tool.js.map +1 -0
  59. package/dist/src/tools/environment-analysis-tool.d.ts +16 -0
  60. package/dist/src/tools/environment-analysis-tool.d.ts.map +1 -0
  61. package/dist/src/tools/environment-analysis-tool.js +298 -0
  62. package/dist/src/tools/environment-analysis-tool.js.map +1 -0
  63. package/dist/src/tools/research-integration-tool.d.ts +44 -0
  64. package/dist/src/tools/research-integration-tool.d.ts.map +1 -0
  65. package/dist/src/tools/research-integration-tool.js +429 -0
  66. package/dist/src/tools/research-integration-tool.js.map +1 -0
  67. package/dist/src/tools/research-question-tool.d.ts +55 -0
  68. package/dist/src/tools/research-question-tool.d.ts.map +1 -0
  69. package/dist/src/tools/research-question-tool.js +333 -0
  70. package/dist/src/tools/research-question-tool.js.map +1 -0
  71. package/dist/src/tools/rule-generation-tool.d.ts +49 -0
  72. package/dist/src/tools/rule-generation-tool.d.ts.map +1 -0
  73. package/dist/src/tools/rule-generation-tool.js +432 -0
  74. package/dist/src/tools/rule-generation-tool.js.map +1 -0
  75. package/dist/src/types/index.d.ts +531 -0
  76. package/dist/src/types/index.d.ts.map +1 -0
  77. package/dist/src/types/index.js +129 -0
  78. package/dist/src/types/index.js.map +1 -0
  79. package/dist/src/utils/adr-suggestions.d.ts +104 -0
  80. package/dist/src/utils/adr-suggestions.d.ts.map +1 -0
  81. package/dist/src/utils/adr-suggestions.js +228 -0
  82. package/dist/src/utils/adr-suggestions.js.map +1 -0
  83. package/dist/src/utils/cache.d.ts +51 -0
  84. package/dist/src/utils/cache.d.ts.map +1 -0
  85. package/dist/src/utils/cache.js +243 -0
  86. package/dist/src/utils/cache.js.map +1 -0
  87. package/dist/src/utils/config.d.ts +65 -0
  88. package/dist/src/utils/config.d.ts.map +1 -0
  89. package/dist/src/utils/config.js +118 -0
  90. package/dist/src/utils/config.js.map +1 -0
  91. package/dist/src/utils/content-masking.d.ts +79 -0
  92. package/dist/src/utils/content-masking.d.ts.map +1 -0
  93. package/dist/src/utils/content-masking.js +203 -0
  94. package/dist/src/utils/content-masking.js.map +1 -0
  95. package/dist/src/utils/deployment-analysis.d.ts +67 -0
  96. package/dist/src/utils/deployment-analysis.d.ts.map +1 -0
  97. package/dist/src/utils/deployment-analysis.js +263 -0
  98. package/dist/src/utils/deployment-analysis.js.map +1 -0
  99. package/dist/src/utils/environment-analysis.d.ts +76 -0
  100. package/dist/src/utils/environment-analysis.d.ts.map +1 -0
  101. package/dist/src/utils/environment-analysis.js +329 -0
  102. package/dist/src/utils/environment-analysis.js.map +1 -0
  103. package/dist/src/utils/file-system.d.ts +63 -0
  104. package/dist/src/utils/file-system.d.ts.map +1 -0
  105. package/dist/src/utils/file-system.js +189 -0
  106. package/dist/src/utils/file-system.js.map +1 -0
  107. package/dist/src/utils/output-masking.d.ts +45 -0
  108. package/dist/src/utils/output-masking.d.ts.map +1 -0
  109. package/dist/src/utils/output-masking.js +200 -0
  110. package/dist/src/utils/output-masking.js.map +1 -0
  111. package/dist/src/utils/research-documentation.d.ts +58 -0
  112. package/dist/src/utils/research-documentation.d.ts.map +1 -0
  113. package/dist/src/utils/research-documentation.js +438 -0
  114. package/dist/src/utils/research-documentation.js.map +1 -0
  115. package/dist/src/utils/research-integration.d.ts +89 -0
  116. package/dist/src/utils/research-integration.d.ts.map +1 -0
  117. package/dist/src/utils/research-integration.js +432 -0
  118. package/dist/src/utils/research-integration.js.map +1 -0
  119. package/dist/src/utils/research-questions.d.ts +97 -0
  120. package/dist/src/utils/research-questions.d.ts.map +1 -0
  121. package/dist/src/utils/research-questions.js +319 -0
  122. package/dist/src/utils/research-questions.js.map +1 -0
  123. package/dist/src/utils/rule-format.d.ts +76 -0
  124. package/dist/src/utils/rule-format.d.ts.map +1 -0
  125. package/dist/src/utils/rule-format.js +257 -0
  126. package/dist/src/utils/rule-format.js.map +1 -0
  127. package/dist/src/utils/rule-generation.d.ts +86 -0
  128. package/dist/src/utils/rule-generation.d.ts.map +1 -0
  129. package/dist/src/utils/rule-generation.js +330 -0
  130. package/dist/src/utils/rule-generation.js.map +1 -0
  131. package/package.json +71 -0
@@ -0,0 +1,712 @@
1
+ /**
2
+ * AI prompts for deployment completion analysis
3
+ * Following prompt-driven development approach
4
+ */
5
+ /**
6
+ * AI prompt for identifying deployment tasks from ADRs
7
+ */
8
+ export function generateDeploymentTaskIdentificationPrompt(adrFiles, todoContent) {
9
+ return `
10
+ # Deployment Task Identification from ADRs
11
+
12
+ Please analyze the following ADRs and todo content to identify deployment-related tasks and requirements.
13
+
14
+ ## ADR Files
15
+ ${adrFiles
16
+ .map((adr, index) => `
17
+ ### ADR ${index + 1}: ${adr.title}
18
+ **ID**: ${adr.id}
19
+ **Status**: ${adr.status}
20
+
21
+ **Content**:
22
+ \`\`\`markdown
23
+ ${adr.content.slice(0, 1200)}${adr.content.length > 1200 ? '\n... (truncated)' : ''}
24
+ \`\`\`
25
+ `)
26
+ .join('')}
27
+
28
+ ${todoContent
29
+ ? `## Todo Content
30
+ \`\`\`markdown
31
+ ${todoContent.slice(0, 1500)}${todoContent.length > 1500 ? '\n... (truncated)' : ''}
32
+ \`\`\`
33
+ `
34
+ : ''}
35
+
36
+ ## Task Identification Requirements
37
+
38
+ Please identify deployment-related tasks in these categories:
39
+
40
+ ### 🚀 **Infrastructure Deployment**
41
+ - **Environment Setup**: Development, staging, production environments
42
+ - **Resource Provisioning**: Servers, databases, storage, networking
43
+ - **Configuration Management**: Environment variables, secrets, configs
44
+ - **Security Setup**: SSL certificates, firewalls, access controls
45
+ - **Monitoring Setup**: Logging, metrics, alerting, observability
46
+
47
+ ### 📦 **Application Deployment**
48
+ - **Build Processes**: Compilation, bundling, optimization
49
+ - **Container Deployment**: Docker builds, registry pushes, orchestration
50
+ - **Service Deployment**: Microservices, APIs, web applications
51
+ - **Database Deployment**: Schema migrations, data seeding, backups
52
+ - **Static Asset Deployment**: CDN setup, asset optimization
53
+
54
+ ### 🔄 **CI/CD Pipeline**
55
+ - **Pipeline Configuration**: Build, test, deploy workflows
56
+ - **Automation Setup**: Automated testing, deployment triggers
57
+ - **Quality Gates**: Code quality, security scans, performance tests
58
+ - **Rollback Mechanisms**: Blue-green deployment, canary releases
59
+ - **Integration Testing**: End-to-end testing, integration validation
60
+
61
+ ### 🔧 **Operational Tasks**
62
+ - **Health Checks**: Service health monitoring, readiness probes
63
+ - **Performance Tuning**: Load balancing, caching, optimization
64
+ - **Backup & Recovery**: Data backup, disaster recovery procedures
65
+ - **Documentation**: Deployment guides, runbooks, troubleshooting
66
+ - **Training**: Team training, knowledge transfer
67
+
68
+ ## Output Format
69
+
70
+ Please provide your analysis in the following JSON format:
71
+
72
+ \`\`\`json
73
+ {
74
+ "deploymentTaskAnalysis": {
75
+ "totalAdrsAnalyzed": ${adrFiles.length},
76
+ "deploymentTasksFound": 0,
77
+ "taskCategories": 0,
78
+ "analysisConfidence": 0.0-1.0,
79
+ "completenessScore": 0.0-1.0
80
+ },
81
+ "identifiedTasks": [
82
+ {
83
+ "taskId": "task-id",
84
+ "taskName": "specific deployment task name",
85
+ "description": "detailed task description",
86
+ "category": "infrastructure|application|cicd|operational",
87
+ "subcategory": "specific subcategory",
88
+ "priority": "critical|high|medium|low",
89
+ "complexity": "low|medium|high",
90
+ "estimatedEffort": "estimated effort in hours/days",
91
+ "dependencies": ["task dependencies"],
92
+ "sourceAdr": "ADR ID that defines this task",
93
+ "sourceSection": "specific section in ADR",
94
+ "deploymentPhase": "planning|development|testing|staging|production|maintenance",
95
+ "automatable": true/false,
96
+ "verificationCriteria": [
97
+ "specific criteria to verify task completion"
98
+ ],
99
+ "expectedOutcome": "expected result of task completion",
100
+ "riskLevel": "low|medium|high|critical",
101
+ "blockers": ["potential blockers or prerequisites"],
102
+ "resources": [
103
+ {
104
+ "type": "person|tool|service|infrastructure",
105
+ "description": "required resource description",
106
+ "availability": "available|required|unknown"
107
+ }
108
+ ]
109
+ }
110
+ ],
111
+ "deploymentPhases": [
112
+ {
113
+ "phase": "phase name",
114
+ "description": "phase description",
115
+ "tasks": ["task IDs in this phase"],
116
+ "duration": "estimated phase duration",
117
+ "prerequisites": ["phase prerequisites"],
118
+ "deliverables": ["phase deliverables"],
119
+ "successCriteria": ["criteria for phase completion"]
120
+ }
121
+ ],
122
+ "deploymentDependencies": [
123
+ {
124
+ "dependencyType": "technical|business|external|regulatory",
125
+ "description": "dependency description",
126
+ "impact": "how this affects deployment",
127
+ "mitigation": "mitigation strategy",
128
+ "owner": "responsible party"
129
+ }
130
+ ],
131
+ "riskAssessment": [
132
+ {
133
+ "risk": "deployment risk description",
134
+ "probability": "low|medium|high",
135
+ "impact": "low|medium|high|critical",
136
+ "category": "technical|operational|business|security",
137
+ "mitigation": "risk mitigation strategy",
138
+ "contingency": "contingency plan"
139
+ }
140
+ ],
141
+ "recommendations": [
142
+ {
143
+ "type": "process|tooling|training|documentation",
144
+ "recommendation": "specific recommendation",
145
+ "rationale": "reasoning behind recommendation",
146
+ "implementation": "how to implement",
147
+ "priority": "critical|high|medium|low"
148
+ }
149
+ ]
150
+ }
151
+ \`\`\`
152
+
153
+ ## Analysis Guidelines
154
+
155
+ 1. **Comprehensive Review**: Analyze all ADRs for deployment implications
156
+ 2. **Task Granularity**: Identify specific, actionable deployment tasks
157
+ 3. **Dependency Mapping**: Clearly identify task dependencies and sequencing
158
+ 4. **Risk Assessment**: Evaluate deployment risks and mitigation strategies
159
+ 5. **Verification Focus**: Define clear completion criteria for each task
160
+ 6. **Automation Potential**: Identify tasks suitable for automation
161
+
162
+ Please provide comprehensive deployment task identification and analysis.
163
+ `;
164
+ }
165
+ /**
166
+ * AI prompt for analyzing CI/CD logs and status
167
+ */
168
+ export function generateCiCdAnalysisPrompt(cicdLogs, pipelineConfig, deploymentTasks) {
169
+ return `
170
+ # CI/CD Pipeline Analysis and Status Assessment
171
+
172
+ Please analyze the following CI/CD logs and pipeline configuration to assess deployment progress and identify issues.
173
+
174
+ ## CI/CD Logs
175
+ \`\`\`
176
+ ${cicdLogs.slice(0, 2000)}${cicdLogs.length > 2000 ? '\n... (truncated for analysis)' : ''}
177
+ \`\`\`
178
+
179
+ ${pipelineConfig
180
+ ? `## Pipeline Configuration
181
+ \`\`\`
182
+ ${pipelineConfig.slice(0, 1000)}${pipelineConfig.length > 1000 ? '\n... (truncated)' : ''}
183
+ \`\`\`
184
+ `
185
+ : ''}
186
+
187
+ ${deploymentTasks
188
+ ? `## Deployment Tasks Context
189
+ ${deploymentTasks
190
+ .map(task => `
191
+ - **${task.taskName}** (${task.category}): ${task.verificationCriteria.join(', ')}
192
+ `)
193
+ .join('')}
194
+ `
195
+ : ''}
196
+
197
+ ## Analysis Requirements
198
+
199
+ Please analyze the CI/CD pipeline for:
200
+
201
+ ### 🔍 **Pipeline Status Analysis**
202
+ - **Build Status**: Success, failure, in-progress, pending
203
+ - **Test Results**: Unit tests, integration tests, end-to-end tests
204
+ - **Quality Gates**: Code coverage, security scans, performance tests
205
+ - **Deployment Status**: Environment deployments, rollout progress
206
+ - **Error Analysis**: Failed steps, error messages, root causes
207
+
208
+ ### 📊 **Progress Assessment**
209
+ - **Completion Percentage**: Overall pipeline progress
210
+ - **Phase Progress**: Individual phase completion status
211
+ - **Time Analysis**: Execution times, bottlenecks, delays
212
+ - **Resource Utilization**: CPU, memory, storage usage
213
+ - **Throughput Metrics**: Build frequency, success rate, lead time
214
+
215
+ ### 🚨 **Issue Identification**
216
+ - **Failed Steps**: Specific failures and error messages
217
+ - **Performance Issues**: Slow steps, resource constraints
218
+ - **Quality Issues**: Test failures, coverage gaps, security vulnerabilities
219
+ - **Configuration Issues**: Misconfigurations, missing dependencies
220
+ - **Infrastructure Issues**: Environment problems, connectivity issues
221
+
222
+ ### 🎯 **Recommendations**
223
+ - **Immediate Actions**: Critical issues requiring immediate attention
224
+ - **Optimization Opportunities**: Performance improvements, efficiency gains
225
+ - **Quality Improvements**: Test coverage, security enhancements
226
+ - **Process Improvements**: Workflow optimizations, automation opportunities
227
+
228
+ ## Output Format
229
+
230
+ Please provide your analysis in the following JSON format:
231
+
232
+ \`\`\`json
233
+ {
234
+ "cicdAnalysis": {
235
+ "analysisTimestamp": "ISO-8601-timestamp",
236
+ "pipelineStatus": "success|failure|in_progress|pending|unknown",
237
+ "overallProgress": 0-100,
238
+ "analysisConfidence": 0.0-1.0,
239
+ "logEntriesAnalyzed": 0
240
+ },
241
+ "pipelineStages": [
242
+ {
243
+ "stageName": "stage name",
244
+ "status": "success|failure|in_progress|pending|skipped",
245
+ "progress": 0-100,
246
+ "startTime": "ISO-8601-timestamp",
247
+ "endTime": "ISO-8601-timestamp",
248
+ "duration": "duration in seconds",
249
+ "steps": [
250
+ {
251
+ "stepName": "step name",
252
+ "status": "success|failure|in_progress|pending|skipped",
253
+ "duration": "duration in seconds",
254
+ "output": "relevant output or error message",
255
+ "exitCode": "exit code if applicable"
256
+ }
257
+ ]
258
+ }
259
+ ],
260
+ "testResults": {
261
+ "unitTests": {
262
+ "total": 0,
263
+ "passed": 0,
264
+ "failed": 0,
265
+ "skipped": 0,
266
+ "coverage": 0.0-1.0
267
+ },
268
+ "integrationTests": {
269
+ "total": 0,
270
+ "passed": 0,
271
+ "failed": 0,
272
+ "skipped": 0
273
+ },
274
+ "e2eTests": {
275
+ "total": 0,
276
+ "passed": 0,
277
+ "failed": 0,
278
+ "skipped": 0
279
+ }
280
+ },
281
+ "qualityGates": [
282
+ {
283
+ "gateName": "quality gate name",
284
+ "status": "passed|failed|pending",
285
+ "threshold": "threshold value",
286
+ "actualValue": "actual measured value",
287
+ "description": "gate description"
288
+ }
289
+ ],
290
+ "deploymentStatus": [
291
+ {
292
+ "environment": "environment name",
293
+ "status": "deployed|deploying|failed|pending",
294
+ "version": "deployed version",
295
+ "deploymentTime": "ISO-8601-timestamp",
296
+ "healthStatus": "healthy|unhealthy|unknown",
297
+ "issues": ["any deployment issues"]
298
+ }
299
+ ],
300
+ "issues": [
301
+ {
302
+ "severity": "critical|high|medium|low|info",
303
+ "category": "build|test|quality|deployment|infrastructure",
304
+ "issue": "issue description",
305
+ "location": "where the issue occurred",
306
+ "errorMessage": "specific error message",
307
+ "suggestedFix": "suggested resolution",
308
+ "impact": "impact on deployment"
309
+ }
310
+ ],
311
+ "performanceMetrics": {
312
+ "totalDuration": "total pipeline duration",
313
+ "buildTime": "build phase duration",
314
+ "testTime": "test phase duration",
315
+ "deploymentTime": "deployment phase duration",
316
+ "resourceUsage": {
317
+ "cpu": "CPU usage percentage",
318
+ "memory": "memory usage",
319
+ "storage": "storage usage"
320
+ }
321
+ },
322
+ "recommendations": [
323
+ {
324
+ "priority": "critical|high|medium|low",
325
+ "category": "performance|quality|reliability|security",
326
+ "recommendation": "specific recommendation",
327
+ "rationale": "reasoning behind recommendation",
328
+ "implementation": "how to implement",
329
+ "expectedBenefit": "expected improvement"
330
+ }
331
+ ]
332
+ }
333
+ \`\`\`
334
+
335
+ ## Analysis Guidelines
336
+
337
+ 1. **Comprehensive Log Analysis**: Parse all relevant log entries
338
+ 2. **Status Determination**: Accurately assess current pipeline status
339
+ 3. **Issue Identification**: Identify and categorize all issues
340
+ 4. **Performance Analysis**: Evaluate pipeline performance and efficiency
341
+ 5. **Actionable Recommendations**: Provide specific, implementable suggestions
342
+ 6. **Context Awareness**: Consider deployment task context when available
343
+
344
+ Please provide thorough CI/CD pipeline analysis and status assessment.
345
+ `;
346
+ }
347
+ /**
348
+ * AI prompt for calculating deployment progress
349
+ */
350
+ export function generateDeploymentProgressCalculationPrompt(deploymentTasks, cicdStatus, environmentStatus) {
351
+ return `
352
+ # Deployment Progress Calculation
353
+
354
+ Please calculate the overall deployment progress based on task status, CI/CD pipeline status, and environment status.
355
+
356
+ ## Deployment Tasks
357
+ ${deploymentTasks
358
+ .map((task, index) => `
359
+ ### Task ${index + 1}: ${task.taskName}
360
+ **ID**: ${task.taskId}
361
+ **Status**: ${task.status}
362
+ **Progress**: ${task.progress}%
363
+ **Category**: ${task.category}
364
+ **Priority**: ${task.priority}
365
+ `)
366
+ .join('')}
367
+
368
+ ${cicdStatus
369
+ ? `## CI/CD Pipeline Status
370
+ \`\`\`json
371
+ ${JSON.stringify(cicdStatus, null, 2)}
372
+ \`\`\`
373
+ `
374
+ : ''}
375
+
376
+ ${environmentStatus
377
+ ? `## Environment Status
378
+ \`\`\`json
379
+ ${JSON.stringify(environmentStatus, null, 2)}
380
+ \`\`\`
381
+ `
382
+ : ''}
383
+
384
+ ## Progress Calculation Requirements
385
+
386
+ Please calculate deployment progress considering:
387
+
388
+ ### 📊 **Task-Based Progress**
389
+ - **Weighted Progress**: Weight tasks by priority and complexity
390
+ - **Category Progress**: Progress by deployment category
391
+ - **Critical Path**: Progress of critical path tasks
392
+ - **Dependency Impact**: How dependencies affect overall progress
393
+ - **Completion Criteria**: Task-specific completion verification
394
+
395
+ ### 🔄 **Pipeline Progress**
396
+ - **Build Progress**: Compilation, testing, packaging
397
+ - **Quality Progress**: Code quality, security, performance checks
398
+ - **Deployment Progress**: Environment deployments, rollouts
399
+ - **Verification Progress**: Health checks, smoke tests, validation
400
+ - **Rollback Readiness**: Rollback mechanisms and procedures
401
+
402
+ ### 🌐 **Environment Progress**
403
+ - **Infrastructure Readiness**: Environment provisioning and configuration
404
+ - **Service Health**: Application and service health status
405
+ - **Data Migration**: Database migrations and data consistency
406
+ - **Integration Status**: Service integration and connectivity
407
+ - **Performance Validation**: Performance benchmarks and SLA compliance
408
+
409
+ ## Output Format
410
+
411
+ Please provide your calculation in the following JSON format:
412
+
413
+ \`\`\`json
414
+ {
415
+ "deploymentProgress": {
416
+ "calculationTimestamp": "ISO-8601-timestamp",
417
+ "overallProgress": 0-100,
418
+ "progressConfidence": 0.0-1.0,
419
+ "estimatedCompletion": "ISO-8601-timestamp",
420
+ "deploymentPhase": "planning|development|testing|staging|production|completed"
421
+ },
422
+ "categoryProgress": {
423
+ "infrastructure": 0-100,
424
+ "application": 0-100,
425
+ "cicd": 0-100,
426
+ "operational": 0-100
427
+ },
428
+ "taskProgress": [
429
+ {
430
+ "taskId": "task-id",
431
+ "taskName": "task name",
432
+ "status": "not_started|in_progress|completed|blocked|failed",
433
+ "progress": 0-100,
434
+ "weight": 0.0-1.0,
435
+ "contributionToOverall": 0-100,
436
+ "blockers": ["current blockers"],
437
+ "nextSteps": ["immediate next steps"],
438
+ "estimatedCompletion": "ISO-8601-timestamp"
439
+ }
440
+ ],
441
+ "criticalPath": {
442
+ "tasks": ["task IDs on critical path"],
443
+ "progress": 0-100,
444
+ "bottlenecks": ["current bottlenecks"],
445
+ "riskFactors": ["factors that could delay completion"]
446
+ },
447
+ "milestones": [
448
+ {
449
+ "milestone": "milestone name",
450
+ "status": "pending|in_progress|completed|at_risk",
451
+ "progress": 0-100,
452
+ "targetDate": "ISO-8601-timestamp",
453
+ "actualDate": "ISO-8601-timestamp",
454
+ "dependencies": ["milestone dependencies"]
455
+ }
456
+ ],
457
+ "qualityMetrics": {
458
+ "codeQuality": 0-100,
459
+ "testCoverage": 0-100,
460
+ "securityCompliance": 0-100,
461
+ "performanceTargets": 0-100,
462
+ "documentationCompleteness": 0-100
463
+ },
464
+ "riskAssessment": {
465
+ "overallRisk": "low|medium|high|critical",
466
+ "scheduleRisk": "low|medium|high|critical",
467
+ "qualityRisk": "low|medium|high|critical",
468
+ "technicalRisk": "low|medium|high|critical",
469
+ "riskFactors": [
470
+ {
471
+ "risk": "risk description",
472
+ "impact": "potential impact",
473
+ "probability": "low|medium|high",
474
+ "mitigation": "mitigation strategy"
475
+ }
476
+ ]
477
+ },
478
+ "recommendations": [
479
+ {
480
+ "priority": "critical|high|medium|low",
481
+ "type": "acceleration|quality|risk_mitigation|resource",
482
+ "recommendation": "specific recommendation",
483
+ "rationale": "reasoning behind recommendation",
484
+ "implementation": "how to implement",
485
+ "expectedImpact": "expected impact on progress"
486
+ }
487
+ ],
488
+ "nextActions": [
489
+ {
490
+ "action": "immediate action required",
491
+ "owner": "responsible party",
492
+ "deadline": "action deadline",
493
+ "priority": "critical|high|medium|low",
494
+ "dependencies": ["action dependencies"]
495
+ }
496
+ ]
497
+ }
498
+ \`\`\`
499
+
500
+ ## Calculation Guidelines
501
+
502
+ 1. **Weighted Progress**: Consider task priority, complexity, and impact
503
+ 2. **Dependency Awareness**: Account for task dependencies and sequencing
504
+ 3. **Quality Integration**: Include quality metrics in progress calculation
505
+ 4. **Risk Consideration**: Factor in risks and potential delays
506
+ 5. **Realistic Estimation**: Provide realistic completion estimates
507
+ 6. **Actionable Insights**: Generate specific, actionable recommendations
508
+
509
+ Please provide comprehensive deployment progress calculation and analysis.
510
+ `;
511
+ }
512
+ /**
513
+ * AI prompt for verifying completion with outcome rules
514
+ */
515
+ export function generateCompletionVerificationPrompt(deploymentTasks, outcomeRules, actualOutcomes) {
516
+ return `
517
+ # Deployment Completion Verification with Outcome Rules
518
+
519
+ Please verify deployment completion by comparing actual outcomes against expected outcome rules and verification criteria.
520
+
521
+ ## Deployment Tasks with Verification Criteria
522
+ ${deploymentTasks
523
+ .map((task, index) => `
524
+ ### Task ${index + 1}: ${task.taskName}
525
+ **ID**: ${task.taskId}
526
+ **Status**: ${task.status}
527
+ **Expected Outcome**: ${task.expectedOutcome}
528
+ **Verification Criteria**:
529
+ ${task.verificationCriteria.map(criteria => `- ${criteria}`).join('\n')}
530
+ `)
531
+ .join('')}
532
+
533
+ ## Outcome Rules
534
+ ${outcomeRules
535
+ .map((rule, index) => `
536
+ ### Rule ${index + 1}: ${rule.description}
537
+ **ID**: ${rule.ruleId}
538
+ **Verification Method**: ${rule.verificationMethod}
539
+ **Criteria**:
540
+ ${rule.criteria.map(criteria => `- ${criteria}`).join('\n')}
541
+ `)
542
+ .join('')}
543
+
544
+ ${actualOutcomes
545
+ ? `## Actual Outcomes
546
+ ${actualOutcomes
547
+ .map((outcome, index) => `
548
+ ### Outcome ${index + 1}: ${outcome.taskId}
549
+ **Outcome**: ${outcome.outcome}
550
+ **Timestamp**: ${outcome.timestamp}
551
+ **Evidence**:
552
+ ${outcome.evidence.map(evidence => `- ${evidence}`).join('\n')}
553
+ `)
554
+ .join('')}
555
+ `
556
+ : ''}
557
+
558
+ ## Verification Requirements
559
+
560
+ Please verify completion by analyzing:
561
+
562
+ ### ✅ **Criteria Verification**
563
+ - **Task Completion**: Verify each task meets its completion criteria
564
+ - **Outcome Validation**: Compare actual outcomes against expected outcomes
565
+ - **Rule Compliance**: Ensure all outcome rules are satisfied
566
+ - **Evidence Assessment**: Evaluate the quality and completeness of evidence
567
+ - **Quality Standards**: Verify quality standards and acceptance criteria
568
+
569
+ ### 🔍 **Compliance Assessment**
570
+ - **Functional Requirements**: All functional requirements implemented
571
+ - **Non-Functional Requirements**: Performance, security, reliability standards met
572
+ - **Business Rules**: Business logic and rules properly implemented
573
+ - **Technical Standards**: Code quality, architecture, and design standards
574
+ - **Operational Requirements**: Monitoring, logging, and maintenance capabilities
575
+
576
+ ### 📊 **Success Metrics**
577
+ - **Performance Metrics**: Response times, throughput, resource utilization
578
+ - **Quality Metrics**: Test coverage, defect rates, code quality scores
579
+ - **Reliability Metrics**: Uptime, error rates, recovery times
580
+ - **Security Metrics**: Vulnerability assessments, compliance scores
581
+ - **User Experience**: Usability, accessibility, satisfaction metrics
582
+
583
+ ## Output Format
584
+
585
+ Please provide your verification in the following JSON format:
586
+
587
+ \`\`\`json
588
+ {
589
+ "completionVerification": {
590
+ "verificationTimestamp": "ISO-8601-timestamp",
591
+ "overallCompletion": true/false,
592
+ "completionPercentage": 0-100,
593
+ "verificationConfidence": 0.0-1.0,
594
+ "verificationMethod": "automated|manual|hybrid"
595
+ },
596
+ "taskVerification": [
597
+ {
598
+ "taskId": "task-id",
599
+ "taskName": "task name",
600
+ "completed": true/false,
601
+ "completionPercentage": 0-100,
602
+ "verificationStatus": "verified|failed|pending|partial",
603
+ "criteriaResults": [
604
+ {
605
+ "criteria": "verification criteria",
606
+ "status": "met|not_met|partial|unknown",
607
+ "evidence": "supporting evidence",
608
+ "confidence": 0.0-1.0
609
+ }
610
+ ],
611
+ "outcomeVerification": {
612
+ "expectedOutcome": "expected outcome",
613
+ "actualOutcome": "actual outcome",
614
+ "outcomeMatch": true/false,
615
+ "variance": "description of any variance",
616
+ "acceptability": "acceptable|unacceptable|requires_review"
617
+ },
618
+ "issues": [
619
+ {
620
+ "issue": "issue description",
621
+ "severity": "critical|high|medium|low",
622
+ "impact": "impact on completion",
623
+ "resolution": "suggested resolution"
624
+ }
625
+ ]
626
+ }
627
+ ],
628
+ "ruleCompliance": [
629
+ {
630
+ "ruleId": "rule-id",
631
+ "description": "rule description",
632
+ "compliant": true/false,
633
+ "complianceLevel": 0-100,
634
+ "verificationResults": [
635
+ {
636
+ "criteria": "rule criteria",
637
+ "result": "passed|failed|partial|not_applicable",
638
+ "evidence": "supporting evidence",
639
+ "notes": "additional notes"
640
+ }
641
+ ],
642
+ "violations": [
643
+ {
644
+ "violation": "violation description",
645
+ "severity": "critical|high|medium|low",
646
+ "remediation": "remediation steps"
647
+ }
648
+ ]
649
+ }
650
+ ],
651
+ "qualityAssessment": {
652
+ "functionalCompleteness": 0-100,
653
+ "performanceCompliance": 0-100,
654
+ "securityCompliance": 0-100,
655
+ "reliabilityScore": 0-100,
656
+ "maintainabilityScore": 0-100,
657
+ "usabilityScore": 0-100,
658
+ "overallQuality": 0-100
659
+ },
660
+ "successMetrics": [
661
+ {
662
+ "metric": "metric name",
663
+ "target": "target value",
664
+ "actual": "actual value",
665
+ "status": "met|not_met|exceeded|unknown",
666
+ "variance": "variance from target",
667
+ "trend": "improving|stable|declining"
668
+ }
669
+ ],
670
+ "completionGaps": [
671
+ {
672
+ "gap": "completion gap description",
673
+ "impact": "low|medium|high|critical",
674
+ "category": "functional|performance|security|quality|operational",
675
+ "remediation": "steps to address gap",
676
+ "effort": "estimated effort to close gap",
677
+ "priority": "critical|high|medium|low"
678
+ }
679
+ ],
680
+ "recommendations": [
681
+ {
682
+ "type": "completion|quality|performance|security|operational",
683
+ "recommendation": "specific recommendation",
684
+ "rationale": "reasoning behind recommendation",
685
+ "implementation": "implementation steps",
686
+ "priority": "critical|high|medium|low",
687
+ "timeline": "recommended timeline"
688
+ }
689
+ ],
690
+ "signOffStatus": {
691
+ "readyForSignOff": true/false,
692
+ "requiredApprovals": ["required approvals"],
693
+ "pendingItems": ["items pending completion"],
694
+ "riskAssessment": "overall risk level",
695
+ "goLiveRecommendation": "go|no_go|conditional"
696
+ }
697
+ }
698
+ \`\`\`
699
+
700
+ ## Verification Guidelines
701
+
702
+ 1. **Objective Assessment**: Base verification on measurable criteria and evidence
703
+ 2. **Comprehensive Coverage**: Verify all aspects of deployment completion
704
+ 3. **Risk-Based Evaluation**: Prioritize critical and high-risk areas
705
+ 4. **Evidence-Based**: Require concrete evidence for completion claims
706
+ 5. **Quality Focus**: Ensure quality standards are met, not just functionality
707
+ 6. **Stakeholder Perspective**: Consider all stakeholder requirements and expectations
708
+
709
+ Please provide thorough deployment completion verification and assessment.
710
+ `;
711
+ }
712
+ //# sourceMappingURL=deployment-analysis-prompts.js.map