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.
- package/LICENSE +21 -0
- package/README.md +608 -0
- package/dist/src/index.d.ts +10 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +1722 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/prompts/adr-suggestion-prompts.d.ts +24 -0
- package/dist/src/prompts/adr-suggestion-prompts.d.ts.map +1 -0
- package/dist/src/prompts/adr-suggestion-prompts.js +383 -0
- package/dist/src/prompts/adr-suggestion-prompts.js.map +1 -0
- package/dist/src/prompts/analysis-prompts.d.ts +24 -0
- package/dist/src/prompts/analysis-prompts.d.ts.map +1 -0
- package/dist/src/prompts/analysis-prompts.js +489 -0
- package/dist/src/prompts/analysis-prompts.js.map +1 -0
- package/dist/src/prompts/deployment-analysis-prompts.d.ts +54 -0
- package/dist/src/prompts/deployment-analysis-prompts.d.ts.map +1 -0
- package/dist/src/prompts/deployment-analysis-prompts.js +712 -0
- package/dist/src/prompts/deployment-analysis-prompts.js.map +1 -0
- package/dist/src/prompts/environment-analysis-prompts.d.ts +34 -0
- package/dist/src/prompts/environment-analysis-prompts.d.ts.map +1 -0
- package/dist/src/prompts/environment-analysis-prompts.js +724 -0
- package/dist/src/prompts/environment-analysis-prompts.js.map +1 -0
- package/dist/src/prompts/index.d.ts +43 -0
- package/dist/src/prompts/index.d.ts.map +1 -0
- package/dist/src/prompts/index.js +384 -0
- package/dist/src/prompts/index.js.map +1 -0
- package/dist/src/prompts/research-integration-prompts.d.ts +43 -0
- package/dist/src/prompts/research-integration-prompts.d.ts.map +1 -0
- package/dist/src/prompts/research-integration-prompts.js +398 -0
- package/dist/src/prompts/research-integration-prompts.js.map +1 -0
- package/dist/src/prompts/research-question-prompts.d.ts +75 -0
- package/dist/src/prompts/research-question-prompts.d.ts.map +1 -0
- package/dist/src/prompts/research-question-prompts.js +695 -0
- package/dist/src/prompts/research-question-prompts.js.map +1 -0
- package/dist/src/prompts/rule-generation-prompts.d.ts +63 -0
- package/dist/src/prompts/rule-generation-prompts.d.ts.map +1 -0
- package/dist/src/prompts/rule-generation-prompts.js +630 -0
- package/dist/src/prompts/rule-generation-prompts.js.map +1 -0
- package/dist/src/prompts/security-prompts.d.ts +23 -0
- package/dist/src/prompts/security-prompts.d.ts.map +1 -0
- package/dist/src/prompts/security-prompts.js +287 -0
- package/dist/src/prompts/security-prompts.js.map +1 -0
- package/dist/src/resources/index.d.ts +24 -0
- package/dist/src/resources/index.d.ts.map +1 -0
- package/dist/src/resources/index.js +458 -0
- package/dist/src/resources/index.js.map +1 -0
- package/dist/src/tools/adr-suggestion-tool.d.ts +40 -0
- package/dist/src/tools/adr-suggestion-tool.d.ts.map +1 -0
- package/dist/src/tools/adr-suggestion-tool.js +338 -0
- package/dist/src/tools/adr-suggestion-tool.js.map +1 -0
- package/dist/src/tools/content-masking-tool.d.ts +52 -0
- package/dist/src/tools/content-masking-tool.d.ts.map +1 -0
- package/dist/src/tools/content-masking-tool.js +206 -0
- package/dist/src/tools/content-masking-tool.js.map +1 -0
- package/dist/src/tools/deployment-analysis-tool.d.ts +39 -0
- package/dist/src/tools/deployment-analysis-tool.d.ts.map +1 -0
- package/dist/src/tools/deployment-analysis-tool.js +310 -0
- package/dist/src/tools/deployment-analysis-tool.js.map +1 -0
- package/dist/src/tools/environment-analysis-tool.d.ts +16 -0
- package/dist/src/tools/environment-analysis-tool.d.ts.map +1 -0
- package/dist/src/tools/environment-analysis-tool.js +298 -0
- package/dist/src/tools/environment-analysis-tool.js.map +1 -0
- package/dist/src/tools/research-integration-tool.d.ts +44 -0
- package/dist/src/tools/research-integration-tool.d.ts.map +1 -0
- package/dist/src/tools/research-integration-tool.js +429 -0
- package/dist/src/tools/research-integration-tool.js.map +1 -0
- package/dist/src/tools/research-question-tool.d.ts +55 -0
- package/dist/src/tools/research-question-tool.d.ts.map +1 -0
- package/dist/src/tools/research-question-tool.js +333 -0
- package/dist/src/tools/research-question-tool.js.map +1 -0
- package/dist/src/tools/rule-generation-tool.d.ts +49 -0
- package/dist/src/tools/rule-generation-tool.d.ts.map +1 -0
- package/dist/src/tools/rule-generation-tool.js +432 -0
- package/dist/src/tools/rule-generation-tool.js.map +1 -0
- package/dist/src/types/index.d.ts +531 -0
- package/dist/src/types/index.d.ts.map +1 -0
- package/dist/src/types/index.js +129 -0
- package/dist/src/types/index.js.map +1 -0
- package/dist/src/utils/adr-suggestions.d.ts +104 -0
- package/dist/src/utils/adr-suggestions.d.ts.map +1 -0
- package/dist/src/utils/adr-suggestions.js +228 -0
- package/dist/src/utils/adr-suggestions.js.map +1 -0
- package/dist/src/utils/cache.d.ts +51 -0
- package/dist/src/utils/cache.d.ts.map +1 -0
- package/dist/src/utils/cache.js +243 -0
- package/dist/src/utils/cache.js.map +1 -0
- package/dist/src/utils/config.d.ts +65 -0
- package/dist/src/utils/config.d.ts.map +1 -0
- package/dist/src/utils/config.js +118 -0
- package/dist/src/utils/config.js.map +1 -0
- package/dist/src/utils/content-masking.d.ts +79 -0
- package/dist/src/utils/content-masking.d.ts.map +1 -0
- package/dist/src/utils/content-masking.js +203 -0
- package/dist/src/utils/content-masking.js.map +1 -0
- package/dist/src/utils/deployment-analysis.d.ts +67 -0
- package/dist/src/utils/deployment-analysis.d.ts.map +1 -0
- package/dist/src/utils/deployment-analysis.js +263 -0
- package/dist/src/utils/deployment-analysis.js.map +1 -0
- package/dist/src/utils/environment-analysis.d.ts +76 -0
- package/dist/src/utils/environment-analysis.d.ts.map +1 -0
- package/dist/src/utils/environment-analysis.js +329 -0
- package/dist/src/utils/environment-analysis.js.map +1 -0
- package/dist/src/utils/file-system.d.ts +63 -0
- package/dist/src/utils/file-system.d.ts.map +1 -0
- package/dist/src/utils/file-system.js +189 -0
- package/dist/src/utils/file-system.js.map +1 -0
- package/dist/src/utils/output-masking.d.ts +45 -0
- package/dist/src/utils/output-masking.d.ts.map +1 -0
- package/dist/src/utils/output-masking.js +200 -0
- package/dist/src/utils/output-masking.js.map +1 -0
- package/dist/src/utils/research-documentation.d.ts +58 -0
- package/dist/src/utils/research-documentation.d.ts.map +1 -0
- package/dist/src/utils/research-documentation.js +438 -0
- package/dist/src/utils/research-documentation.js.map +1 -0
- package/dist/src/utils/research-integration.d.ts +89 -0
- package/dist/src/utils/research-integration.d.ts.map +1 -0
- package/dist/src/utils/research-integration.js +432 -0
- package/dist/src/utils/research-integration.js.map +1 -0
- package/dist/src/utils/research-questions.d.ts +97 -0
- package/dist/src/utils/research-questions.d.ts.map +1 -0
- package/dist/src/utils/research-questions.js +319 -0
- package/dist/src/utils/research-questions.js.map +1 -0
- package/dist/src/utils/rule-format.d.ts +76 -0
- package/dist/src/utils/rule-format.d.ts.map +1 -0
- package/dist/src/utils/rule-format.js +257 -0
- package/dist/src/utils/rule-format.js.map +1 -0
- package/dist/src/utils/rule-generation.d.ts +86 -0
- package/dist/src/utils/rule-generation.d.ts.map +1 -0
- package/dist/src/utils/rule-generation.js +330 -0
- package/dist/src/utils/rule-generation.js.map +1 -0
- package/package.json +71 -0
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI prompts for research integration and findings incorporation
|
|
3
|
+
* Following prompt-driven development approach
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* AI prompt for extracting key topics from research files
|
|
7
|
+
*/
|
|
8
|
+
export function generateResearchTopicExtractionPrompt(researchFiles, existingTopics) {
|
|
9
|
+
return `
|
|
10
|
+
# Research Topic Extraction
|
|
11
|
+
|
|
12
|
+
Please analyze the following research files and extract key topics, findings, and insights that could impact architectural decisions.
|
|
13
|
+
|
|
14
|
+
## Research Files
|
|
15
|
+
${researchFiles
|
|
16
|
+
.map((file, index) => `
|
|
17
|
+
### ${index + 1}. ${file.filename}
|
|
18
|
+
**Last Modified**: ${file.lastModified}
|
|
19
|
+
**Size**: ${file.size} bytes
|
|
20
|
+
|
|
21
|
+
**Content**:
|
|
22
|
+
\`\`\`
|
|
23
|
+
${file.content.slice(0, 2000)}${file.content.length > 2000 ? '\n... (truncated for analysis)' : ''}
|
|
24
|
+
\`\`\`
|
|
25
|
+
`)
|
|
26
|
+
.join('')}
|
|
27
|
+
|
|
28
|
+
${existingTopics
|
|
29
|
+
? `## Previously Identified Topics
|
|
30
|
+
${existingTopics.map(topic => `- ${topic}`).join('\n')}
|
|
31
|
+
`
|
|
32
|
+
: ''}
|
|
33
|
+
|
|
34
|
+
## Extraction Requirements
|
|
35
|
+
|
|
36
|
+
Please identify and extract:
|
|
37
|
+
|
|
38
|
+
### 🔬 **Research Topics**
|
|
39
|
+
- **Technology Evaluations**: New frameworks, libraries, tools, platforms
|
|
40
|
+
- **Performance Studies**: Benchmarks, optimization findings, scalability research
|
|
41
|
+
- **Security Research**: Vulnerability assessments, security best practices
|
|
42
|
+
- **Architecture Patterns**: New patterns, anti-patterns, design approaches
|
|
43
|
+
- **Industry Trends**: Market analysis, adoption trends, future predictions
|
|
44
|
+
- **Best Practices**: Development methodologies, operational practices
|
|
45
|
+
|
|
46
|
+
### 📊 **Research Findings**
|
|
47
|
+
- **Quantitative Results**: Performance metrics, benchmarks, statistics
|
|
48
|
+
- **Qualitative Insights**: Expert opinions, case studies, lessons learned
|
|
49
|
+
- **Comparative Analysis**: Technology comparisons, trade-off analysis
|
|
50
|
+
- **Risk Assessments**: Identified risks, mitigation strategies
|
|
51
|
+
- **Implementation Guidance**: How-to guides, implementation patterns
|
|
52
|
+
|
|
53
|
+
### 🎯 **Architectural Relevance**
|
|
54
|
+
- **Decision Impact**: How findings could affect current or future decisions
|
|
55
|
+
- **Technology Choices**: Implications for technology selection
|
|
56
|
+
- **Design Patterns**: New patterns or pattern modifications
|
|
57
|
+
- **Non-functional Requirements**: Performance, security, scalability impacts
|
|
58
|
+
- **Process Changes**: Development or operational process improvements
|
|
59
|
+
|
|
60
|
+
## Output Format
|
|
61
|
+
|
|
62
|
+
Please provide your analysis in the following JSON format:
|
|
63
|
+
|
|
64
|
+
\`\`\`json
|
|
65
|
+
{
|
|
66
|
+
"extractedTopics": [
|
|
67
|
+
{
|
|
68
|
+
"id": "unique-topic-id",
|
|
69
|
+
"title": "Topic title",
|
|
70
|
+
"category": "technology|performance|security|architecture|process|industry",
|
|
71
|
+
"description": "Detailed topic description",
|
|
72
|
+
"sourceFiles": ["filename1", "filename2"],
|
|
73
|
+
"keyFindings": [
|
|
74
|
+
"specific finding or insight"
|
|
75
|
+
],
|
|
76
|
+
"evidence": [
|
|
77
|
+
"supporting evidence or data points"
|
|
78
|
+
],
|
|
79
|
+
"confidence": 0.0-1.0,
|
|
80
|
+
"relevanceScore": 0.0-1.0,
|
|
81
|
+
"lastUpdated": "YYYY-MM-DD",
|
|
82
|
+
"tags": ["relevant", "tags"]
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"researchSummary": {
|
|
86
|
+
"totalFiles": ${researchFiles.length},
|
|
87
|
+
"topicCount": 0,
|
|
88
|
+
"primaryCategories": ["identified categories"],
|
|
89
|
+
"researchQuality": 0.0-1.0,
|
|
90
|
+
"completeness": 0.0-1.0,
|
|
91
|
+
"actionability": 0.0-1.0
|
|
92
|
+
},
|
|
93
|
+
"keyInsights": [
|
|
94
|
+
{
|
|
95
|
+
"insight": "Major insight or finding",
|
|
96
|
+
"impact": "low|medium|high|critical",
|
|
97
|
+
"category": "technology|performance|security|architecture|process",
|
|
98
|
+
"supportingTopics": ["topic-id-1", "topic-id-2"],
|
|
99
|
+
"actionRequired": true/false,
|
|
100
|
+
"urgency": "low|medium|high|critical"
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"recommendations": [
|
|
104
|
+
"specific recommendations for incorporating these findings"
|
|
105
|
+
],
|
|
106
|
+
"gaps": [
|
|
107
|
+
{
|
|
108
|
+
"area": "research gap area",
|
|
109
|
+
"description": "what's missing",
|
|
110
|
+
"suggestedResearch": "suggested research to fill the gap"
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
\`\`\`
|
|
115
|
+
|
|
116
|
+
## Extraction Guidelines
|
|
117
|
+
|
|
118
|
+
1. **Comprehensive Coverage**: Extract all relevant topics, don't miss important findings
|
|
119
|
+
2. **Accurate Categorization**: Properly categorize topics and findings
|
|
120
|
+
3. **Evidence-Based**: Ensure all findings are supported by evidence
|
|
121
|
+
4. **Relevance Assessment**: Focus on architecturally relevant insights
|
|
122
|
+
5. **Actionable Insights**: Prioritize findings that can lead to concrete actions
|
|
123
|
+
6. **Quality Assessment**: Evaluate the quality and reliability of research
|
|
124
|
+
|
|
125
|
+
Please provide a thorough analysis of the research findings and their architectural implications.
|
|
126
|
+
`;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* AI prompt for evaluating research impact on existing ADRs
|
|
130
|
+
*/
|
|
131
|
+
export function generateResearchImpactEvaluationPrompt(researchTopics, existingAdrs) {
|
|
132
|
+
return `
|
|
133
|
+
# Research Impact Evaluation on Existing ADRs
|
|
134
|
+
|
|
135
|
+
Please analyze how the extracted research findings impact existing Architectural Decision Records and suggest necessary updates.
|
|
136
|
+
|
|
137
|
+
## Research Topics
|
|
138
|
+
${researchTopics
|
|
139
|
+
.map((topic, index) => `
|
|
140
|
+
### ${index + 1}. ${topic.title}
|
|
141
|
+
- **ID**: ${topic.id}
|
|
142
|
+
- **Category**: ${topic.category}
|
|
143
|
+
- **Relevance Score**: ${topic.relevanceScore}
|
|
144
|
+
- **Key Findings**:
|
|
145
|
+
${topic.keyFindings.map(finding => ` - ${finding}`).join('\n')}
|
|
146
|
+
`)
|
|
147
|
+
.join('')}
|
|
148
|
+
|
|
149
|
+
## Existing ADRs
|
|
150
|
+
${existingAdrs
|
|
151
|
+
.map((adr, index) => `
|
|
152
|
+
### ${index + 1}. ${adr.title}
|
|
153
|
+
- **ID**: ${adr.id}
|
|
154
|
+
- **Status**: ${adr.status}
|
|
155
|
+
- **Category**: ${adr.category || 'Unknown'}
|
|
156
|
+
|
|
157
|
+
**Content Preview**:
|
|
158
|
+
\`\`\`
|
|
159
|
+
${adr.content.slice(0, 1000)}${adr.content.length > 1000 ? '\n... (truncated)' : ''}
|
|
160
|
+
\`\`\`
|
|
161
|
+
`)
|
|
162
|
+
.join('')}
|
|
163
|
+
|
|
164
|
+
## Impact Analysis Requirements
|
|
165
|
+
|
|
166
|
+
Please evaluate:
|
|
167
|
+
|
|
168
|
+
### 🔍 **Direct Impact Assessment**
|
|
169
|
+
- **Contradictory Findings**: Research that contradicts existing decisions
|
|
170
|
+
- **Supporting Evidence**: Research that reinforces existing decisions
|
|
171
|
+
- **New Considerations**: Research that introduces new factors to consider
|
|
172
|
+
- **Technology Updates**: New versions, alternatives, or deprecations
|
|
173
|
+
- **Performance Implications**: New performance data or benchmarks
|
|
174
|
+
|
|
175
|
+
### 📈 **Decision Validity**
|
|
176
|
+
- **Still Valid**: Decisions that remain sound despite new research
|
|
177
|
+
- **Needs Review**: Decisions that should be reconsidered
|
|
178
|
+
- **Requires Update**: Decisions that need modification
|
|
179
|
+
- **Should Deprecate**: Decisions that are no longer valid
|
|
180
|
+
- **Needs Superseding**: Decisions that should be replaced
|
|
181
|
+
|
|
182
|
+
### 🎯 **Update Recommendations**
|
|
183
|
+
- **Content Updates**: Specific sections that need modification
|
|
184
|
+
- **Status Changes**: ADRs that need status updates
|
|
185
|
+
- **New Consequences**: Additional consequences to document
|
|
186
|
+
- **Alternative Considerations**: New alternatives to evaluate
|
|
187
|
+
- **Implementation Changes**: Required implementation modifications
|
|
188
|
+
|
|
189
|
+
## Output Format
|
|
190
|
+
|
|
191
|
+
Please provide your analysis in the following JSON format:
|
|
192
|
+
|
|
193
|
+
\`\`\`json
|
|
194
|
+
{
|
|
195
|
+
"impactAnalysis": [
|
|
196
|
+
{
|
|
197
|
+
"adrId": "adr-id",
|
|
198
|
+
"adrTitle": "ADR title",
|
|
199
|
+
"impactLevel": "none|low|medium|high|critical",
|
|
200
|
+
"impactType": "contradictory|supporting|new_considerations|technology_update|performance",
|
|
201
|
+
"affectedSections": ["context", "decision", "consequences", "alternatives"],
|
|
202
|
+
"relatedTopics": ["topic-id-1", "topic-id-2"],
|
|
203
|
+
"findings": [
|
|
204
|
+
"specific research findings that impact this ADR"
|
|
205
|
+
],
|
|
206
|
+
"recommendedAction": "no_action|review|update|deprecate|supersede",
|
|
207
|
+
"urgency": "low|medium|high|critical",
|
|
208
|
+
"confidence": 0.0-1.0,
|
|
209
|
+
"reasoning": "detailed explanation of the impact assessment"
|
|
210
|
+
}
|
|
211
|
+
],
|
|
212
|
+
"updateRecommendations": [
|
|
213
|
+
{
|
|
214
|
+
"adrId": "adr-id",
|
|
215
|
+
"updateType": "content|status|consequences|alternatives|implementation",
|
|
216
|
+
"currentContent": "relevant current content",
|
|
217
|
+
"suggestedContent": "suggested new content",
|
|
218
|
+
"justification": "why this update is needed",
|
|
219
|
+
"researchEvidence": ["supporting research findings"],
|
|
220
|
+
"priority": "low|medium|high|critical"
|
|
221
|
+
}
|
|
222
|
+
],
|
|
223
|
+
"newAdrSuggestions": [
|
|
224
|
+
{
|
|
225
|
+
"title": "Suggested new ADR title",
|
|
226
|
+
"reason": "why a new ADR is needed",
|
|
227
|
+
"triggeringResearch": ["research topics that suggest this ADR"],
|
|
228
|
+
"category": "technology|architecture|security|performance|process",
|
|
229
|
+
"priority": "low|medium|high|critical",
|
|
230
|
+
"relatedAdrs": ["existing ADR IDs that relate to this"]
|
|
231
|
+
}
|
|
232
|
+
],
|
|
233
|
+
"deprecationSuggestions": [
|
|
234
|
+
{
|
|
235
|
+
"adrId": "adr-id-to-deprecate",
|
|
236
|
+
"reason": "why this ADR should be deprecated",
|
|
237
|
+
"supersededBy": "new ADR or approach",
|
|
238
|
+
"migrationPath": "how to transition from old to new",
|
|
239
|
+
"researchEvidence": ["research that supports deprecation"]
|
|
240
|
+
}
|
|
241
|
+
],
|
|
242
|
+
"overallAssessment": {
|
|
243
|
+
"totalAdrsAnalyzed": ${existingAdrs.length},
|
|
244
|
+
"adrsRequiringAction": 0,
|
|
245
|
+
"highImpactFindings": 0,
|
|
246
|
+
"newAdrsNeeded": 0,
|
|
247
|
+
"deprecationsNeeded": 0,
|
|
248
|
+
"researchQuality": 0.0-1.0,
|
|
249
|
+
"actionPriority": "low|medium|high|critical"
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
\`\`\`
|
|
253
|
+
|
|
254
|
+
## Evaluation Guidelines
|
|
255
|
+
|
|
256
|
+
1. **Thorough Analysis**: Evaluate every ADR against every relevant research topic
|
|
257
|
+
2. **Evidence-Based**: Base recommendations on solid research evidence
|
|
258
|
+
3. **Impact Assessment**: Accurately assess the level and type of impact
|
|
259
|
+
4. **Actionable Recommendations**: Provide specific, implementable suggestions
|
|
260
|
+
5. **Priority Guidance**: Help prioritize updates based on impact and urgency
|
|
261
|
+
6. **Migration Planning**: Consider transition paths for significant changes
|
|
262
|
+
|
|
263
|
+
Please provide a comprehensive impact evaluation with clear, actionable recommendations.
|
|
264
|
+
`;
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* AI prompt for suggesting ADR updates and deprecations
|
|
268
|
+
*/
|
|
269
|
+
export function generateAdrUpdateSuggestionPrompt(adrToUpdate, researchFindings, updateType) {
|
|
270
|
+
return `
|
|
271
|
+
# ADR Update Suggestion
|
|
272
|
+
|
|
273
|
+
Please generate specific update suggestions for the following ADR based on research findings.
|
|
274
|
+
|
|
275
|
+
## ADR to Update
|
|
276
|
+
**ID**: ${adrToUpdate.id}
|
|
277
|
+
**Title**: ${adrToUpdate.title}
|
|
278
|
+
**Current Status**: ${adrToUpdate.status}
|
|
279
|
+
|
|
280
|
+
**Current Content**:
|
|
281
|
+
\`\`\`markdown
|
|
282
|
+
${adrToUpdate.content}
|
|
283
|
+
\`\`\`
|
|
284
|
+
|
|
285
|
+
## Research Findings
|
|
286
|
+
${researchFindings
|
|
287
|
+
.map((finding, index) => `
|
|
288
|
+
### Finding ${index + 1}
|
|
289
|
+
**Finding**: ${finding.finding}
|
|
290
|
+
**Impact**: ${finding.impact}
|
|
291
|
+
**Evidence**:
|
|
292
|
+
${finding.evidence.map(ev => `- ${ev}`).join('\n')}
|
|
293
|
+
`)
|
|
294
|
+
.join('')}
|
|
295
|
+
|
|
296
|
+
## Update Type
|
|
297
|
+
${updateType}
|
|
298
|
+
|
|
299
|
+
## Update Requirements
|
|
300
|
+
|
|
301
|
+
Based on the update type, please provide:
|
|
302
|
+
|
|
303
|
+
### **Content Updates**
|
|
304
|
+
- Specific text modifications
|
|
305
|
+
- New sections to add
|
|
306
|
+
- Sections to remove or modify
|
|
307
|
+
- Updated context or decision rationale
|
|
308
|
+
|
|
309
|
+
### **Status Updates**
|
|
310
|
+
- New status recommendation
|
|
311
|
+
- Justification for status change
|
|
312
|
+
- Migration or transition notes
|
|
313
|
+
- Timeline considerations
|
|
314
|
+
|
|
315
|
+
### **Consequences Updates**
|
|
316
|
+
- New positive consequences
|
|
317
|
+
- New negative consequences
|
|
318
|
+
- Modified existing consequences
|
|
319
|
+
- Risk assessments
|
|
320
|
+
|
|
321
|
+
### **Alternatives Updates**
|
|
322
|
+
- New alternatives to consider
|
|
323
|
+
- Updated evaluation of existing alternatives
|
|
324
|
+
- Deprecated alternatives
|
|
325
|
+
- Comparative analysis updates
|
|
326
|
+
|
|
327
|
+
### **Deprecation Suggestions**
|
|
328
|
+
- Deprecation rationale
|
|
329
|
+
- Superseding ADR or approach
|
|
330
|
+
- Migration path
|
|
331
|
+
- Timeline for deprecation
|
|
332
|
+
|
|
333
|
+
## Output Format
|
|
334
|
+
|
|
335
|
+
Please provide your suggestions in the following JSON format:
|
|
336
|
+
|
|
337
|
+
\`\`\`json
|
|
338
|
+
{
|
|
339
|
+
"updateSuggestion": {
|
|
340
|
+
"adrId": "${adrToUpdate.id}",
|
|
341
|
+
"updateType": "${updateType}",
|
|
342
|
+
"priority": "low|medium|high|critical",
|
|
343
|
+
"confidence": 0.0-1.0,
|
|
344
|
+
"estimatedEffort": "low|medium|high",
|
|
345
|
+
"breakingChange": true/false
|
|
346
|
+
},
|
|
347
|
+
"proposedChanges": [
|
|
348
|
+
{
|
|
349
|
+
"section": "title|status|context|decision|consequences|alternatives|implementation",
|
|
350
|
+
"changeType": "add|modify|remove|replace",
|
|
351
|
+
"currentContent": "existing content (if modifying/removing)",
|
|
352
|
+
"proposedContent": "new or modified content",
|
|
353
|
+
"justification": "why this change is needed",
|
|
354
|
+
"researchEvidence": ["supporting research findings"]
|
|
355
|
+
}
|
|
356
|
+
],
|
|
357
|
+
"newContent": {
|
|
358
|
+
"title": "updated title (if changed)",
|
|
359
|
+
"status": "updated status (if changed)",
|
|
360
|
+
"fullContent": "complete updated ADR content in markdown format"
|
|
361
|
+
},
|
|
362
|
+
"migrationGuidance": {
|
|
363
|
+
"impactedSystems": ["systems affected by this change"],
|
|
364
|
+
"requiredActions": ["actions needed to implement this update"],
|
|
365
|
+
"timeline": "suggested timeline for implementation",
|
|
366
|
+
"rollbackPlan": "how to rollback if needed",
|
|
367
|
+
"communicationPlan": "who needs to be notified"
|
|
368
|
+
},
|
|
369
|
+
"qualityChecks": {
|
|
370
|
+
"completeness": 0.0-1.0,
|
|
371
|
+
"clarity": 0.0-1.0,
|
|
372
|
+
"consistency": 0.0-1.0,
|
|
373
|
+
"traceability": 0.0-1.0,
|
|
374
|
+
"issues": ["any quality issues identified"],
|
|
375
|
+
"improvements": ["suggested improvements"]
|
|
376
|
+
},
|
|
377
|
+
"reviewRecommendations": {
|
|
378
|
+
"requiredReviewers": ["stakeholders who should review"],
|
|
379
|
+
"reviewCriteria": ["what to focus on during review"],
|
|
380
|
+
"approvalProcess": "suggested approval process",
|
|
381
|
+
"implementationGates": ["checkpoints before implementation"]
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
\`\`\`
|
|
385
|
+
|
|
386
|
+
## Update Guidelines
|
|
387
|
+
|
|
388
|
+
1. **Preserve Intent**: Maintain the original intent while incorporating new findings
|
|
389
|
+
2. **Clear Justification**: Provide clear reasoning for all changes
|
|
390
|
+
3. **Evidence-Based**: Base all updates on solid research evidence
|
|
391
|
+
4. **Backward Compatibility**: Consider impact on existing implementations
|
|
392
|
+
5. **Quality Maintenance**: Ensure updates maintain or improve ADR quality
|
|
393
|
+
6. **Stakeholder Impact**: Consider impact on all relevant stakeholders
|
|
394
|
+
|
|
395
|
+
Please provide comprehensive, well-justified update suggestions.
|
|
396
|
+
`;
|
|
397
|
+
}
|
|
398
|
+
//# sourceMappingURL=research-integration-prompts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"research-integration-prompts.js","sourceRoot":"","sources":["../../../src/prompts/research-integration-prompts.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,UAAU,qCAAqC,CACnD,aAKE,EACF,cAAyB;IAEzB,OAAO;;;;;;EAMP,aAAa;SACZ,GAAG,CACF,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;MACf,KAAK,GAAG,CAAC,KAAK,IAAI,CAAC,QAAQ;qBACZ,IAAI,CAAC,YAAY;YAC1B,IAAI,CAAC,IAAI;;;;EAInB,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,gCAAgC,CAAC,CAAC,CAAC,EAAE;;CAEjG,CACE;SACA,IAAI,CAAC,EAAE,CAAC;;EAGT,cAAc;QACZ,CAAC,CAAC;EACJ,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;CACrD;QACG,CAAC,CAAC,EACN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAsDoB,aAAa,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCvC,CAAC;AACF,CAAC;AAED;;GAEG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,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC;cACV,KAAK,GAAG,CAAC;eACR,OAAO,CAAC,OAAO;cAChB,OAAO,CAAC,MAAM;;EAE1B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;CACjD,CACE;SACA,IAAI,CAAC,EAAE,CAAC;;;EAGT,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBA2CI,WAAW,CAAC,EAAE;qBACT,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuD9B,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI prompts for research question generation
|
|
3
|
+
* Following prompt-driven development approach
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* AI prompt for correlating problems with knowledge graph
|
|
7
|
+
*/
|
|
8
|
+
export declare function generateProblemKnowledgeCorrelationPrompt(problems: Array<{
|
|
9
|
+
id: string;
|
|
10
|
+
description: string;
|
|
11
|
+
category: string;
|
|
12
|
+
severity: string;
|
|
13
|
+
context: string;
|
|
14
|
+
}>, knowledgeGraph: {
|
|
15
|
+
technologies: any[];
|
|
16
|
+
patterns: any[];
|
|
17
|
+
adrs: any[];
|
|
18
|
+
relationships: any[];
|
|
19
|
+
}): string;
|
|
20
|
+
/**
|
|
21
|
+
* AI prompt for finding relevant ADRs and patterns
|
|
22
|
+
*/
|
|
23
|
+
export declare function generateRelevantAdrPatternPrompt(researchContext: {
|
|
24
|
+
topic: string;
|
|
25
|
+
category: string;
|
|
26
|
+
scope: string;
|
|
27
|
+
objectives: string[];
|
|
28
|
+
}, availableAdrs: Array<{
|
|
29
|
+
id: string;
|
|
30
|
+
title: string;
|
|
31
|
+
content: string;
|
|
32
|
+
status: string;
|
|
33
|
+
}>, availablePatterns: Array<{
|
|
34
|
+
name: string;
|
|
35
|
+
description: string;
|
|
36
|
+
category: string;
|
|
37
|
+
}>): string;
|
|
38
|
+
/**
|
|
39
|
+
* AI prompt for generating context-aware research questions
|
|
40
|
+
*/
|
|
41
|
+
export declare function generateContextAwareResearchQuestionsPrompt(researchContext: {
|
|
42
|
+
topic: string;
|
|
43
|
+
category: string;
|
|
44
|
+
objectives: string[];
|
|
45
|
+
constraints: string[];
|
|
46
|
+
timeline: string;
|
|
47
|
+
}, relevantKnowledge: {
|
|
48
|
+
adrs: any[];
|
|
49
|
+
patterns: any[];
|
|
50
|
+
gaps: any[];
|
|
51
|
+
opportunities: any[];
|
|
52
|
+
}, projectContext: {
|
|
53
|
+
technologies: string[];
|
|
54
|
+
architecture: string;
|
|
55
|
+
domain: string;
|
|
56
|
+
scale: string;
|
|
57
|
+
}): string;
|
|
58
|
+
/**
|
|
59
|
+
* AI prompt for research task tracking and management
|
|
60
|
+
*/
|
|
61
|
+
export declare function generateResearchTaskTrackingPrompt(researchQuestions: Array<{
|
|
62
|
+
id: string;
|
|
63
|
+
question: string;
|
|
64
|
+
type: string;
|
|
65
|
+
priority: string;
|
|
66
|
+
timeline: string;
|
|
67
|
+
methodology: string;
|
|
68
|
+
}>, currentProgress?: Array<{
|
|
69
|
+
questionId: string;
|
|
70
|
+
status: string;
|
|
71
|
+
progress: number;
|
|
72
|
+
findings: string[];
|
|
73
|
+
blockers: string[];
|
|
74
|
+
}>): string;
|
|
75
|
+
//# sourceMappingURL=research-question-prompts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"research-question-prompts.d.ts","sourceRoot":"","sources":["../../../src/prompts/research-question-prompts.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,wBAAgB,yCAAyC,CACvD,QAAQ,EAAE,KAAK,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ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