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,695 @@
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 function generateProblemKnowledgeCorrelationPrompt(problems, knowledgeGraph) {
9
+ return `
10
+ # Problem-Knowledge Graph Correlation Analysis
11
+
12
+ Please analyze the following problems and correlate them with the architectural knowledge graph to identify research opportunities and knowledge gaps.
13
+
14
+ ## Identified Problems
15
+ ${problems
16
+ .map((problem, index) => `
17
+ ### Problem ${index + 1}: ${problem.description}
18
+ **ID**: ${problem.id}
19
+ **Category**: ${problem.category}
20
+ **Severity**: ${problem.severity}
21
+ **Context**: ${problem.context}
22
+ `)
23
+ .join('')}
24
+
25
+ ## Architectural Knowledge Graph
26
+ ### Technologies
27
+ ${knowledgeGraph.technologies.map(tech => `- **${tech.name}**: ${tech.description || 'No description'}`).join('\n')}
28
+
29
+ ### Patterns
30
+ ${knowledgeGraph.patterns.map(pattern => `- **${pattern.name}**: ${pattern.description || 'No description'}`).join('\n')}
31
+
32
+ ### ADRs
33
+ ${knowledgeGraph.adrs.map(adr => `- **${adr.title}**: ${adr.status}`).join('\n')}
34
+
35
+ ### Relationships
36
+ ${knowledgeGraph.relationships.map(rel => `- ${rel.source} → ${rel.target} (${rel.type})`).join('\n')}
37
+
38
+ ## Correlation Analysis Requirements
39
+
40
+ Please identify correlations and research opportunities:
41
+
42
+ ### 🔍 **Problem-Knowledge Correlations**
43
+ - **Direct Correlations**: Problems directly related to known technologies/patterns
44
+ - **Indirect Correlations**: Problems that may be influenced by architectural decisions
45
+ - **Missing Knowledge**: Problems that reveal gaps in the knowledge graph
46
+ - **Pattern Conflicts**: Problems caused by conflicting architectural patterns
47
+ - **Technology Limitations**: Problems stemming from technology constraints
48
+
49
+ ### 📊 **Knowledge Gap Analysis**
50
+ - **Unexplored Technologies**: Technologies mentioned in problems but not in knowledge graph
51
+ - **Missing Patterns**: Architectural patterns that could address problems
52
+ - **Incomplete ADRs**: Decisions that need more research or documentation
53
+ - **Relationship Gaps**: Missing connections between architectural elements
54
+ - **Context Deficiencies**: Areas where more contextual knowledge is needed
55
+
56
+ ### 🎯 **Research Opportunity Identification**
57
+ - **High-Impact Research**: Research that could solve multiple problems
58
+ - **Quick Wins**: Research with immediate applicability
59
+ - **Strategic Research**: Long-term research for architectural evolution
60
+ - **Risk Mitigation**: Research to address high-severity problems
61
+ - **Innovation Opportunities**: Research for competitive advantage
62
+
63
+ ## Output Format
64
+
65
+ Please provide your analysis in the following JSON format:
66
+
67
+ \`\`\`json
68
+ {
69
+ "correlationAnalysis": {
70
+ "totalProblems": ${problems.length},
71
+ "correlatedProblems": 0,
72
+ "uncorrelatedProblems": 0,
73
+ "knowledgeGraphCoverage": 0.0-1.0,
74
+ "analysisConfidence": 0.0-1.0
75
+ },
76
+ "problemCorrelations": [
77
+ {
78
+ "problemId": "problem-id",
79
+ "problemDescription": "problem description",
80
+ "correlationType": "direct|indirect|missing|conflict|limitation",
81
+ "relatedKnowledge": [
82
+ {
83
+ "type": "technology|pattern|adr|relationship",
84
+ "name": "knowledge element name",
85
+ "relevance": 0.0-1.0,
86
+ "relationship": "causes|affects|solves|relates_to"
87
+ }
88
+ ],
89
+ "knowledgeGaps": [
90
+ "specific knowledge gaps identified"
91
+ ],
92
+ "researchOpportunities": [
93
+ "specific research opportunities"
94
+ ]
95
+ }
96
+ ],
97
+ "knowledgeGaps": [
98
+ {
99
+ "gapType": "technology|pattern|decision|relationship|context",
100
+ "description": "detailed gap description",
101
+ "impact": "low|medium|high|critical",
102
+ "relatedProblems": ["problem-ids"],
103
+ "suggestedResearch": "specific research suggestion",
104
+ "priority": "low|medium|high|critical"
105
+ }
106
+ ],
107
+ "researchOpportunities": [
108
+ {
109
+ "id": "research-opportunity-id",
110
+ "title": "research opportunity title",
111
+ "description": "detailed description",
112
+ "category": "technology|architecture|performance|security|process",
113
+ "impact": "low|medium|high|critical",
114
+ "effort": "low|medium|high",
115
+ "timeline": "short_term|medium_term|long_term",
116
+ "addressedProblems": ["problem-ids"],
117
+ "requiredKnowledge": ["knowledge areas needed"],
118
+ "expectedOutcomes": ["expected research outcomes"],
119
+ "priority": "low|medium|high|critical"
120
+ }
121
+ ],
122
+ "recommendations": [
123
+ {
124
+ "type": "immediate|short_term|long_term",
125
+ "recommendation": "specific recommendation",
126
+ "rationale": "why this recommendation is important",
127
+ "expectedBenefit": "expected benefit",
128
+ "implementation": "how to implement"
129
+ }
130
+ ]
131
+ }
132
+ \`\`\`
133
+
134
+ ## Analysis Guidelines
135
+
136
+ 1. **Systematic Correlation**: Analyze each problem against all knowledge elements
137
+ 2. **Gap Identification**: Clearly identify what knowledge is missing
138
+ 3. **Priority Assessment**: Rank research opportunities by impact and feasibility
139
+ 4. **Actionable Insights**: Provide specific, implementable research suggestions
140
+ 5. **Evidence-Based**: Base correlations on clear evidence and reasoning
141
+
142
+ Please provide comprehensive problem-knowledge correlation analysis.
143
+ `;
144
+ }
145
+ /**
146
+ * AI prompt for finding relevant ADRs and patterns
147
+ */
148
+ export function generateRelevantAdrPatternPrompt(researchContext, availableAdrs, availablePatterns) {
149
+ return `
150
+ # Relevant ADR and Pattern Discovery
151
+
152
+ Please analyze the research context and identify relevant ADRs and patterns that should inform the research approach.
153
+
154
+ ## Research Context
155
+ **Topic**: ${researchContext.topic}
156
+ **Category**: ${researchContext.category}
157
+ **Scope**: ${researchContext.scope}
158
+ **Objectives**: ${researchContext.objectives.join(', ')}
159
+
160
+ ## Available ADRs
161
+ ${availableAdrs
162
+ .map((adr, index) => `
163
+ ### ADR ${index + 1}: ${adr.title}
164
+ **ID**: ${adr.id}
165
+ **Status**: ${adr.status}
166
+ **Content Preview**:
167
+ \`\`\`
168
+ ${adr.content.slice(0, 500)}${adr.content.length > 500 ? '...' : ''}
169
+ \`\`\`
170
+ `)
171
+ .join('')}
172
+
173
+ ## Available Patterns
174
+ ${availablePatterns
175
+ .map((pattern, index) => `
176
+ ### Pattern ${index + 1}: ${pattern.name}
177
+ **Category**: ${pattern.category}
178
+ **Description**: ${pattern.description}
179
+ `)
180
+ .join('')}
181
+
182
+ ## Relevance Analysis Requirements
183
+
184
+ Please identify relevant elements for the research:
185
+
186
+ ### 🎯 **ADR Relevance Analysis**
187
+ - **Direct Relevance**: ADRs that directly address the research topic
188
+ - **Contextual Relevance**: ADRs that provide important context
189
+ - **Constraint Relevance**: ADRs that impose constraints on research
190
+ - **Outcome Relevance**: ADRs that could be affected by research outcomes
191
+ - **Historical Relevance**: ADRs that show evolution of related decisions
192
+
193
+ ### 🔍 **Pattern Relevance Analysis**
194
+ - **Applicable Patterns**: Patterns directly applicable to research topic
195
+ - **Related Patterns**: Patterns in similar domains or categories
196
+ - **Alternative Patterns**: Patterns that offer different approaches
197
+ - **Emerging Patterns**: New patterns that could be relevant
198
+ - **Anti-Patterns**: Patterns to avoid based on research topic
199
+
200
+ ### 📊 **Research Implications**
201
+ - **Research Constraints**: Limitations imposed by existing ADRs/patterns
202
+ - **Research Opportunities**: Gaps or improvements identified
203
+ - **Research Dependencies**: Prerequisites from existing decisions/patterns
204
+ - **Research Conflicts**: Potential conflicts with existing architecture
205
+ - **Research Synergies**: Opportunities to leverage existing knowledge
206
+
207
+ ## Output Format
208
+
209
+ Please provide your analysis in the following JSON format:
210
+
211
+ \`\`\`json
212
+ {
213
+ "relevanceAnalysis": {
214
+ "researchTopic": "${researchContext.topic}",
215
+ "totalAdrsAnalyzed": ${availableAdrs.length},
216
+ "totalPatternsAnalyzed": ${availablePatterns.length},
217
+ "relevantAdrsFound": 0,
218
+ "relevantPatternsFound": 0,
219
+ "analysisConfidence": 0.0-1.0
220
+ },
221
+ "relevantAdrs": [
222
+ {
223
+ "adrId": "adr-id",
224
+ "title": "ADR title",
225
+ "relevanceType": "direct|contextual|constraint|outcome|historical",
226
+ "relevanceScore": 0.0-1.0,
227
+ "relevanceReason": "why this ADR is relevant",
228
+ "researchImplications": [
229
+ "specific implications for research"
230
+ ],
231
+ "keyInsights": [
232
+ "key insights from this ADR"
233
+ ],
234
+ "constraints": [
235
+ "constraints this ADR imposes"
236
+ ],
237
+ "opportunities": [
238
+ "opportunities this ADR reveals"
239
+ ]
240
+ }
241
+ ],
242
+ "relevantPatterns": [
243
+ {
244
+ "patternName": "pattern name",
245
+ "category": "pattern category",
246
+ "relevanceType": "applicable|related|alternative|emerging|anti_pattern",
247
+ "relevanceScore": 0.0-1.0,
248
+ "relevanceReason": "why this pattern is relevant",
249
+ "applicability": "how this pattern applies to research",
250
+ "considerations": [
251
+ "important considerations for this pattern"
252
+ ],
253
+ "adaptations": [
254
+ "how pattern might need to be adapted"
255
+ ]
256
+ }
257
+ ],
258
+ "researchImplications": {
259
+ "constraints": [
260
+ {
261
+ "type": "technical|business|regulatory|architectural",
262
+ "description": "constraint description",
263
+ "source": "ADR or pattern that imposes constraint",
264
+ "impact": "how this affects research approach"
265
+ }
266
+ ],
267
+ "opportunities": [
268
+ {
269
+ "type": "improvement|innovation|optimization|integration",
270
+ "description": "opportunity description",
271
+ "source": "ADR or pattern that reveals opportunity",
272
+ "potential": "potential value of this opportunity"
273
+ }
274
+ ],
275
+ "dependencies": [
276
+ {
277
+ "dependency": "what the research depends on",
278
+ "source": "ADR or pattern that creates dependency",
279
+ "criticality": "low|medium|high|critical"
280
+ }
281
+ ],
282
+ "conflicts": [
283
+ {
284
+ "conflict": "potential conflict description",
285
+ "source": "ADR or pattern that creates conflict",
286
+ "resolution": "suggested conflict resolution approach"
287
+ }
288
+ ]
289
+ },
290
+ "researchGuidance": [
291
+ {
292
+ "guidanceType": "approach|methodology|focus|caution",
293
+ "guidance": "specific guidance for research",
294
+ "rationale": "reasoning behind this guidance",
295
+ "priority": "low|medium|high|critical"
296
+ }
297
+ ]
298
+ }
299
+ \`\`\`
300
+
301
+ ## Analysis Guidelines
302
+
303
+ 1. **Comprehensive Review**: Analyze all ADRs and patterns for relevance
304
+ 2. **Relevance Scoring**: Provide quantitative relevance assessments
305
+ 3. **Implication Analysis**: Clearly identify research implications
306
+ 4. **Practical Guidance**: Offer actionable research guidance
307
+ 5. **Conflict Identification**: Identify potential conflicts early
308
+ 6. **Opportunity Recognition**: Highlight research opportunities
309
+
310
+ Please provide thorough relevance analysis for informed research planning.
311
+ `;
312
+ }
313
+ /**
314
+ * AI prompt for generating context-aware research questions
315
+ */
316
+ export function generateContextAwareResearchQuestionsPrompt(researchContext, relevantKnowledge, projectContext) {
317
+ return `
318
+ # Context-Aware Research Question Generation
319
+
320
+ Please generate specific, actionable research questions based on the research context, relevant knowledge, and project context.
321
+
322
+ ## Research Context
323
+ **Topic**: ${researchContext.topic}
324
+ **Category**: ${researchContext.category}
325
+ **Timeline**: ${researchContext.timeline}
326
+ **Objectives**: ${researchContext.objectives.join(', ')}
327
+ **Constraints**: ${researchContext.constraints.join(', ')}
328
+
329
+ ## Relevant Knowledge
330
+ ### Relevant ADRs
331
+ ${relevantKnowledge.adrs.map(adr => `- **${adr.title}**: ${adr.relevanceReason}`).join('\n')}
332
+
333
+ ### Relevant Patterns
334
+ ${relevantKnowledge.patterns.map(pattern => `- **${pattern.patternName}**: ${pattern.relevanceReason}`).join('\n')}
335
+
336
+ ### Knowledge Gaps
337
+ ${relevantKnowledge.gaps.map(gap => `- **${gap.description}** (${gap.impact} impact)`).join('\n')}
338
+
339
+ ### Research Opportunities
340
+ ${relevantKnowledge.opportunities.map(opp => `- **${opp.title}**: ${opp.description}`).join('\n')}
341
+
342
+ ## Project Context
343
+ **Technologies**: ${projectContext.technologies.join(', ')}
344
+ **Architecture**: ${projectContext.architecture}
345
+ **Domain**: ${projectContext.domain}
346
+ **Scale**: ${projectContext.scale}
347
+
348
+ ## Research Question Generation Requirements
349
+
350
+ Please generate research questions in these categories:
351
+
352
+ ### 🎯 **Primary Research Questions**
353
+ - **Core Questions**: Fundamental questions that address main objectives
354
+ - **Hypothesis Questions**: Questions that can be tested with specific hypotheses
355
+ - **Comparative Questions**: Questions comparing different approaches or solutions
356
+ - **Evaluation Questions**: Questions about effectiveness or performance
357
+ - **Implementation Questions**: Questions about practical implementation
358
+
359
+ ### 🔍 **Secondary Research Questions**
360
+ - **Context Questions**: Questions about environmental or situational factors
361
+ - **Constraint Questions**: Questions about limitations and boundaries
362
+ - **Risk Questions**: Questions about potential risks and mitigation
363
+ - **Scalability Questions**: Questions about growth and adaptation
364
+ - **Integration Questions**: Questions about system integration
365
+
366
+ ### 📊 **Methodological Questions**
367
+ - **Approach Questions**: Questions about research methodology
368
+ - **Measurement Questions**: Questions about metrics and evaluation criteria
369
+ - **Validation Questions**: Questions about result validation
370
+ - **Timeline Questions**: Questions about research phases and milestones
371
+ - **Resource Questions**: Questions about required resources and expertise
372
+
373
+ ## Output Format
374
+
375
+ Please provide your research questions in the following JSON format:
376
+
377
+ \`\`\`json
378
+ {
379
+ "researchQuestionGeneration": {
380
+ "researchTopic": "${researchContext.topic}",
381
+ "generatedAt": "ISO-8601-timestamp",
382
+ "totalQuestions": 0,
383
+ "questionCategories": 0,
384
+ "contextAlignment": 0.0-1.0,
385
+ "actionability": 0.0-1.0
386
+ },
387
+ "primaryQuestions": [
388
+ {
389
+ "id": "question-id",
390
+ "question": "specific research question",
391
+ "type": "core|hypothesis|comparative|evaluation|implementation",
392
+ "priority": "critical|high|medium|low",
393
+ "complexity": "low|medium|high",
394
+ "timeline": "short_term|medium_term|long_term",
395
+ "objectives": ["objectives this question addresses"],
396
+ "hypothesis": "testable hypothesis (if applicable)",
397
+ "expectedOutcome": "expected research outcome",
398
+ "successCriteria": ["criteria for successful answer"],
399
+ "relatedKnowledge": ["relevant ADRs, patterns, or gaps"],
400
+ "methodology": "suggested research methodology",
401
+ "resources": ["required resources or expertise"],
402
+ "risks": ["potential research risks"],
403
+ "dependencies": ["dependencies on other questions or research"]
404
+ }
405
+ ],
406
+ "secondaryQuestions": [
407
+ {
408
+ "id": "question-id",
409
+ "question": "specific research question",
410
+ "type": "context|constraint|risk|scalability|integration",
411
+ "priority": "high|medium|low",
412
+ "complexity": "low|medium|high",
413
+ "timeline": "short_term|medium_term|long_term",
414
+ "relatedPrimary": ["primary question IDs this supports"],
415
+ "context": "why this question is important",
416
+ "approach": "suggested approach to answer",
417
+ "deliverables": ["expected deliverables"]
418
+ }
419
+ ],
420
+ "methodologicalQuestions": [
421
+ {
422
+ "id": "question-id",
423
+ "question": "specific research question",
424
+ "type": "approach|measurement|validation|timeline|resource",
425
+ "importance": "critical|high|medium|low",
426
+ "phase": "planning|execution|validation|reporting",
427
+ "guidance": "guidance for addressing this question",
428
+ "considerations": ["important considerations"]
429
+ }
430
+ ],
431
+ "researchPlan": {
432
+ "phases": [
433
+ {
434
+ "phase": "phase name",
435
+ "duration": "estimated duration",
436
+ "questions": ["question IDs for this phase"],
437
+ "deliverables": ["expected deliverables"],
438
+ "milestones": ["key milestones"],
439
+ "dependencies": ["dependencies for this phase"]
440
+ }
441
+ ],
442
+ "criticalPath": ["question IDs on critical path"],
443
+ "parallelTracks": [
444
+ {
445
+ "track": "track name",
446
+ "questions": ["question IDs that can be researched in parallel"]
447
+ }
448
+ ],
449
+ "riskMitigation": [
450
+ {
451
+ "risk": "identified research risk",
452
+ "mitigation": "mitigation strategy",
453
+ "contingency": "contingency plan"
454
+ }
455
+ ]
456
+ },
457
+ "qualityAssurance": {
458
+ "validationApproach": "how to validate research results",
459
+ "peerReview": "peer review strategy",
460
+ "documentation": "documentation requirements",
461
+ "knowledgeSharing": "knowledge sharing plan"
462
+ },
463
+ "expectedImpact": {
464
+ "immediateImpact": "immediate benefits from research",
465
+ "longTermImpact": "long-term benefits",
466
+ "architecturalImpact": "impact on architecture",
467
+ "businessImpact": "business value created",
468
+ "riskReduction": "risks mitigated by research"
469
+ }
470
+ }
471
+ \`\`\`
472
+
473
+ ## Question Generation Guidelines
474
+
475
+ 1. **Specific and Actionable**: Questions should be specific enough to guide research
476
+ 2. **Context-Aware**: Questions should reflect project and architectural context
477
+ 3. **Testable**: Questions should be answerable through research methods
478
+ 4. **Prioritized**: Questions should be ranked by importance and impact
479
+ 5. **Interconnected**: Questions should build on each other logically
480
+ 6. **Realistic**: Questions should be achievable within constraints
481
+
482
+ Please generate comprehensive, context-aware research questions.
483
+ `;
484
+ }
485
+ /**
486
+ * AI prompt for research task tracking and management
487
+ */
488
+ export function generateResearchTaskTrackingPrompt(researchQuestions, currentProgress) {
489
+ return `
490
+ # Research Task Tracking and Management
491
+
492
+ Please analyze the research questions and current progress to create a comprehensive research task tracking system.
493
+
494
+ ## Research Questions
495
+ ${researchQuestions
496
+ .map((q, index) => `
497
+ ### Question ${index + 1}: ${q.question}
498
+ **ID**: ${q.id}
499
+ **Type**: ${q.type}
500
+ **Priority**: ${q.priority}
501
+ **Timeline**: ${q.timeline}
502
+ **Methodology**: ${q.methodology}
503
+ `)
504
+ .join('')}
505
+
506
+ ${currentProgress
507
+ ? `## Current Progress
508
+ ${currentProgress
509
+ .map((p, index) => `
510
+ ### Progress ${index + 1}: ${p.questionId}
511
+ **Status**: ${p.status}
512
+ **Progress**: ${p.progress}%
513
+ **Findings**: ${p.findings.join(', ')}
514
+ **Blockers**: ${p.blockers.join(', ')}
515
+ `)
516
+ .join('')}`
517
+ : ''}
518
+
519
+ ## Task Tracking Requirements
520
+
521
+ Please create a comprehensive tracking system:
522
+
523
+ ### 📋 **Task Breakdown**
524
+ - **Research Tasks**: Specific tasks for each research question
525
+ - **Subtasks**: Detailed subtasks with clear deliverables
526
+ - **Dependencies**: Task dependencies and sequencing
527
+ - **Milestones**: Key milestones and checkpoints
528
+ - **Deliverables**: Expected outputs for each task
529
+
530
+ ### 📊 **Progress Tracking**
531
+ - **Status Tracking**: Current status of each task
532
+ - **Progress Metrics**: Quantitative progress measurements
533
+ - **Timeline Tracking**: Actual vs. planned timelines
534
+ - **Resource Utilization**: Resource allocation and usage
535
+ - **Quality Metrics**: Quality indicators and assessments
536
+
537
+ ### 🎯 **Management Framework**
538
+ - **Priority Management**: Dynamic priority adjustment
539
+ - **Risk Management**: Risk identification and mitigation
540
+ - **Blocker Resolution**: Blocker identification and resolution
541
+ - **Communication Plan**: Progress reporting and updates
542
+ - **Decision Points**: Key decision points and criteria
543
+
544
+ ## Output Format
545
+
546
+ Please provide your tracking system in the following JSON format:
547
+
548
+ \`\`\`json
549
+ {
550
+ "researchTaskTracking": {
551
+ "projectName": "Research Task Tracking",
552
+ "createdAt": "ISO-8601-timestamp",
553
+ "totalQuestions": ${researchQuestions.length},
554
+ "totalTasks": 0,
555
+ "estimatedDuration": "estimated total duration",
556
+ "trackingVersion": "1.0"
557
+ },
558
+ "researchTasks": [
559
+ {
560
+ "taskId": "task-id",
561
+ "questionId": "related question ID",
562
+ "taskName": "specific task name",
563
+ "description": "detailed task description",
564
+ "type": "literature_review|experiment|analysis|prototype|validation",
565
+ "priority": "critical|high|medium|low",
566
+ "status": "not_started|in_progress|blocked|completed|cancelled",
567
+ "progress": 0-100,
568
+ "estimatedEffort": "estimated effort in hours/days",
569
+ "actualEffort": "actual effort spent",
570
+ "startDate": "planned start date",
571
+ "endDate": "planned end date",
572
+ "actualStartDate": "actual start date",
573
+ "actualEndDate": "actual end date",
574
+ "assignee": "responsible person",
575
+ "dependencies": ["task IDs this depends on"],
576
+ "blockers": [
577
+ {
578
+ "blocker": "blocker description",
579
+ "severity": "low|medium|high|critical",
580
+ "resolution": "resolution approach",
581
+ "owner": "responsible for resolution"
582
+ }
583
+ ],
584
+ "deliverables": [
585
+ {
586
+ "deliverable": "deliverable name",
587
+ "type": "document|prototype|analysis|presentation",
588
+ "status": "not_started|in_progress|completed",
589
+ "dueDate": "deliverable due date"
590
+ }
591
+ ],
592
+ "resources": [
593
+ {
594
+ "resource": "required resource",
595
+ "type": "person|tool|data|access",
596
+ "status": "available|requested|unavailable"
597
+ }
598
+ ],
599
+ "findings": [
600
+ {
601
+ "finding": "research finding",
602
+ "confidence": 0.0-1.0,
603
+ "impact": "low|medium|high|critical",
604
+ "date": "finding date"
605
+ }
606
+ ],
607
+ "notes": [
608
+ {
609
+ "note": "progress note",
610
+ "date": "note date",
611
+ "author": "note author"
612
+ }
613
+ ]
614
+ }
615
+ ],
616
+ "milestones": [
617
+ {
618
+ "milestoneId": "milestone-id",
619
+ "name": "milestone name",
620
+ "description": "milestone description",
621
+ "targetDate": "target completion date",
622
+ "actualDate": "actual completion date",
623
+ "status": "upcoming|in_progress|completed|delayed",
624
+ "criteria": ["completion criteria"],
625
+ "relatedTasks": ["task IDs"],
626
+ "deliverables": ["milestone deliverables"]
627
+ }
628
+ ],
629
+ "riskManagement": [
630
+ {
631
+ "riskId": "risk-id",
632
+ "risk": "risk description",
633
+ "category": "technical|resource|timeline|quality|external",
634
+ "probability": "low|medium|high",
635
+ "impact": "low|medium|high|critical",
636
+ "mitigation": "mitigation strategy",
637
+ "contingency": "contingency plan",
638
+ "owner": "risk owner",
639
+ "status": "identified|mitigating|resolved|realized"
640
+ }
641
+ ],
642
+ "progressMetrics": {
643
+ "overallProgress": 0-100,
644
+ "completedTasks": 0,
645
+ "inProgressTasks": 0,
646
+ "blockedTasks": 0,
647
+ "onTrackTasks": 0,
648
+ "delayedTasks": 0,
649
+ "budgetUtilization": 0.0-1.0,
650
+ "qualityScore": 0.0-1.0
651
+ },
652
+ "communicationPlan": {
653
+ "reportingFrequency": "daily|weekly|biweekly|monthly",
654
+ "stakeholders": [
655
+ {
656
+ "stakeholder": "stakeholder name",
657
+ "role": "stakeholder role",
658
+ "reportingLevel": "summary|detailed|full"
659
+ }
660
+ ],
661
+ "reportingFormat": "dashboard|document|presentation|meeting",
662
+ "escalationCriteria": ["criteria for escalation"],
663
+ "communicationChannels": ["communication methods"]
664
+ },
665
+ "qualityAssurance": {
666
+ "reviewProcess": "peer review process",
667
+ "validationCriteria": ["validation criteria"],
668
+ "documentationStandards": "documentation requirements",
669
+ "knowledgeCapture": "knowledge capture approach"
670
+ },
671
+ "recommendations": [
672
+ {
673
+ "type": "process|resource|timeline|quality",
674
+ "recommendation": "specific recommendation",
675
+ "rationale": "reasoning behind recommendation",
676
+ "implementation": "how to implement",
677
+ "priority": "critical|high|medium|low"
678
+ }
679
+ ]
680
+ }
681
+ \`\`\`
682
+
683
+ ## Tracking Guidelines
684
+
685
+ 1. **Comprehensive Coverage**: Track all aspects of research progress
686
+ 2. **Actionable Metrics**: Use metrics that drive action and decisions
687
+ 3. **Regular Updates**: Design for frequent progress updates
688
+ 4. **Risk Awareness**: Proactively identify and manage risks
689
+ 5. **Quality Focus**: Maintain quality standards throughout research
690
+ 6. **Communication**: Ensure effective stakeholder communication
691
+
692
+ Please create a comprehensive research task tracking and management system.
693
+ `;
694
+ }
695
+ //# sourceMappingURL=research-question-prompts.js.map