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,333 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Tool for research question generation
|
|
3
|
+
* Implements prompt-driven research question generation and task tracking
|
|
4
|
+
*/
|
|
5
|
+
import { McpAdrError } from '../types/index.js';
|
|
6
|
+
/**
|
|
7
|
+
* Generate research questions and create research tracking system
|
|
8
|
+
*/
|
|
9
|
+
export async function generateResearchQuestions(args) {
|
|
10
|
+
const { analysisType = 'comprehensive', researchContext, problems, knowledgeGraph, relevantKnowledge, researchQuestions, currentProgress, projectPath = process.cwd(), adrDirectory = 'docs/adrs', } = args;
|
|
11
|
+
try {
|
|
12
|
+
const { correlateProblemKnowledge, findRelevantAdrPatterns, generateContextAwareQuestions, createResearchTaskTracking, } = await import('../utils/research-questions.js');
|
|
13
|
+
switch (analysisType) {
|
|
14
|
+
case 'correlation': {
|
|
15
|
+
if (!problems || !knowledgeGraph) {
|
|
16
|
+
throw new McpAdrError('Problems and knowledge graph are required for correlation analysis', 'INVALID_INPUT');
|
|
17
|
+
}
|
|
18
|
+
const result = await correlateProblemKnowledge(problems, knowledgeGraph);
|
|
19
|
+
return {
|
|
20
|
+
content: [
|
|
21
|
+
{
|
|
22
|
+
type: 'text',
|
|
23
|
+
text: `# Problem-Knowledge Correlation Analysis
|
|
24
|
+
|
|
25
|
+
${result.instructions}
|
|
26
|
+
|
|
27
|
+
## AI Correlation Prompt
|
|
28
|
+
|
|
29
|
+
${result.correlationPrompt}
|
|
30
|
+
|
|
31
|
+
## Next Steps
|
|
32
|
+
|
|
33
|
+
1. **Submit the prompt** to an AI agent for comprehensive correlation analysis
|
|
34
|
+
2. **Parse the JSON response** to get problem-knowledge correlations and research opportunities
|
|
35
|
+
3. **Review knowledge gaps** and prioritize research areas
|
|
36
|
+
4. **Use findings** to generate targeted research questions
|
|
37
|
+
|
|
38
|
+
## Expected Output
|
|
39
|
+
|
|
40
|
+
The AI will provide:
|
|
41
|
+
- **Correlation Analysis**: Statistical analysis of problem-knowledge relationships
|
|
42
|
+
- **Problem Correlations**: Detailed mapping of problems to knowledge elements
|
|
43
|
+
- **Knowledge Gaps**: Identified gaps in the architectural knowledge graph
|
|
44
|
+
- **Research Opportunities**: Prioritized opportunities for research investigation
|
|
45
|
+
- **Recommendations**: Actionable recommendations for research planning
|
|
46
|
+
|
|
47
|
+
## Research Planning Benefits
|
|
48
|
+
|
|
49
|
+
This correlation analysis enables:
|
|
50
|
+
- **Targeted Research**: Focus research on areas with highest impact
|
|
51
|
+
- **Gap Identification**: Discover missing knowledge areas
|
|
52
|
+
- **Priority Setting**: Rank research opportunities by importance
|
|
53
|
+
- **Resource Optimization**: Allocate research resources effectively
|
|
54
|
+
- **Risk Mitigation**: Address high-severity problems through research
|
|
55
|
+
`,
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
case 'relevance': {
|
|
61
|
+
if (!researchContext) {
|
|
62
|
+
throw new McpAdrError('Research context is required for relevance analysis', 'INVALID_INPUT');
|
|
63
|
+
}
|
|
64
|
+
const result = await findRelevantAdrPatterns({
|
|
65
|
+
...researchContext,
|
|
66
|
+
constraints: researchContext.constraints || [],
|
|
67
|
+
timeline: researchContext.timeline || 'Not specified',
|
|
68
|
+
}, adrDirectory);
|
|
69
|
+
return {
|
|
70
|
+
content: [
|
|
71
|
+
{
|
|
72
|
+
type: 'text',
|
|
73
|
+
text: `# Relevant ADR and Pattern Discovery
|
|
74
|
+
|
|
75
|
+
${result.instructions}
|
|
76
|
+
|
|
77
|
+
## AI Relevance Prompt
|
|
78
|
+
|
|
79
|
+
${result.relevancePrompt}
|
|
80
|
+
|
|
81
|
+
## Next Steps
|
|
82
|
+
|
|
83
|
+
1. **Submit the prompt** to an AI agent for relevance analysis
|
|
84
|
+
2. **Parse the JSON response** to get relevant ADRs and patterns
|
|
85
|
+
3. **Review research implications** and constraints
|
|
86
|
+
4. **Use findings** to inform research question generation
|
|
87
|
+
|
|
88
|
+
## Expected Output
|
|
89
|
+
|
|
90
|
+
The AI will provide:
|
|
91
|
+
- **Relevance Analysis**: Statistical analysis of ADR and pattern relevance
|
|
92
|
+
- **Relevant ADRs**: ADRs that directly or indirectly relate to research context
|
|
93
|
+
- **Relevant Patterns**: Architectural patterns applicable to the research
|
|
94
|
+
- **Research Implications**: Constraints, opportunities, dependencies, and conflicts
|
|
95
|
+
- **Research Guidance**: Specific guidance for research approach and methodology
|
|
96
|
+
|
|
97
|
+
## Research Context Benefits
|
|
98
|
+
|
|
99
|
+
This relevance analysis provides:
|
|
100
|
+
- **Informed Research**: Research grounded in existing architectural decisions
|
|
101
|
+
- **Constraint Awareness**: Understanding of limitations and boundaries
|
|
102
|
+
- **Opportunity Recognition**: Identification of improvement opportunities
|
|
103
|
+
- **Conflict Avoidance**: Early identification of potential conflicts
|
|
104
|
+
- **Knowledge Leverage**: Building on existing architectural knowledge
|
|
105
|
+
`,
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
case 'questions': {
|
|
111
|
+
if (!researchContext || !relevantKnowledge) {
|
|
112
|
+
throw new McpAdrError('Research context and relevant knowledge are required for question generation', 'INVALID_INPUT');
|
|
113
|
+
}
|
|
114
|
+
const result = await generateContextAwareQuestions({
|
|
115
|
+
...researchContext,
|
|
116
|
+
constraints: researchContext.constraints || [],
|
|
117
|
+
timeline: researchContext.timeline || 'Not specified',
|
|
118
|
+
}, relevantKnowledge, projectPath);
|
|
119
|
+
return {
|
|
120
|
+
content: [
|
|
121
|
+
{
|
|
122
|
+
type: 'text',
|
|
123
|
+
text: `# Context-Aware Research Question Generation
|
|
124
|
+
|
|
125
|
+
${result.instructions}
|
|
126
|
+
|
|
127
|
+
## AI Question Generation Prompt
|
|
128
|
+
|
|
129
|
+
${result.questionPrompt}
|
|
130
|
+
|
|
131
|
+
## Next Steps
|
|
132
|
+
|
|
133
|
+
1. **Submit the prompt** to an AI agent for comprehensive question generation
|
|
134
|
+
2. **Parse the JSON response** to get structured research questions and plan
|
|
135
|
+
3. **Review research plan** and prioritize questions
|
|
136
|
+
4. **Create research tasks** using the task tracking system
|
|
137
|
+
|
|
138
|
+
## Expected Output
|
|
139
|
+
|
|
140
|
+
The AI will provide:
|
|
141
|
+
- **Research Question Generation**: Metadata and quality metrics for generated questions
|
|
142
|
+
- **Primary Questions**: Core research questions with detailed specifications
|
|
143
|
+
- **Secondary Questions**: Supporting questions for comprehensive coverage
|
|
144
|
+
- **Methodological Questions**: Questions about research approach and methodology
|
|
145
|
+
- **Research Plan**: Phased research plan with timelines and dependencies
|
|
146
|
+
- **Quality Assurance**: Quality control and validation approach
|
|
147
|
+
- **Expected Impact**: Anticipated benefits and outcomes of the research
|
|
148
|
+
|
|
149
|
+
## Research Excellence
|
|
150
|
+
|
|
151
|
+
This question generation ensures:
|
|
152
|
+
- **Comprehensive Coverage**: All aspects of research topic addressed
|
|
153
|
+
- **Actionable Questions**: Questions that can be answered through research
|
|
154
|
+
- **Context Awareness**: Questions tailored to project and architectural context
|
|
155
|
+
- **Priority Guidance**: Clear prioritization for research execution
|
|
156
|
+
- **Quality Standards**: Built-in quality assurance and validation
|
|
157
|
+
`,
|
|
158
|
+
},
|
|
159
|
+
],
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
case 'tracking': {
|
|
163
|
+
if (!researchQuestions) {
|
|
164
|
+
throw new McpAdrError('Research questions are required for task tracking', 'INVALID_INPUT');
|
|
165
|
+
}
|
|
166
|
+
const result = await createResearchTaskTracking(researchQuestions.map(q => ({
|
|
167
|
+
...q,
|
|
168
|
+
complexity: 'medium',
|
|
169
|
+
expectedOutcome: 'Research findings and recommendations',
|
|
170
|
+
successCriteria: ['Clear findings documented', 'Recommendations provided'],
|
|
171
|
+
relatedKnowledge: [],
|
|
172
|
+
resources: [],
|
|
173
|
+
risks: [],
|
|
174
|
+
dependencies: [],
|
|
175
|
+
})), currentProgress);
|
|
176
|
+
return {
|
|
177
|
+
content: [
|
|
178
|
+
{
|
|
179
|
+
type: 'text',
|
|
180
|
+
text: `# Research Task Tracking System
|
|
181
|
+
|
|
182
|
+
${result.instructions}
|
|
183
|
+
|
|
184
|
+
## AI Tracking Prompt
|
|
185
|
+
|
|
186
|
+
${result.trackingPrompt}
|
|
187
|
+
|
|
188
|
+
## Next Steps
|
|
189
|
+
|
|
190
|
+
1. **Submit the prompt** to an AI agent for tracking system creation
|
|
191
|
+
2. **Parse the JSON response** to get comprehensive tracking system
|
|
192
|
+
3. **Implement tracking** in project management tools
|
|
193
|
+
4. **Begin research execution** with regular progress updates
|
|
194
|
+
|
|
195
|
+
## Expected Output
|
|
196
|
+
|
|
197
|
+
The AI will provide:
|
|
198
|
+
- **Research Task Tracking**: Overall tracking metadata and configuration
|
|
199
|
+
- **Research Tasks**: Detailed tasks with progress tracking and dependencies
|
|
200
|
+
- **Milestones**: Key milestones and checkpoints for research phases
|
|
201
|
+
- **Risk Management**: Risk identification and mitigation strategies
|
|
202
|
+
- **Progress Metrics**: Quantitative progress measurements and KPIs
|
|
203
|
+
- **Communication Plan**: Stakeholder communication and reporting framework
|
|
204
|
+
- **Quality Assurance**: Quality control and validation processes
|
|
205
|
+
- **Recommendations**: Process and management improvement recommendations
|
|
206
|
+
|
|
207
|
+
## Research Management
|
|
208
|
+
|
|
209
|
+
This tracking system enables:
|
|
210
|
+
- **Progress Monitoring**: Real-time visibility into research progress
|
|
211
|
+
- **Risk Management**: Proactive identification and mitigation of risks
|
|
212
|
+
- **Resource Planning**: Effective allocation and utilization of resources
|
|
213
|
+
- **Quality Control**: Consistent quality standards and validation
|
|
214
|
+
- **Stakeholder Communication**: Regular updates and transparent reporting
|
|
215
|
+
`,
|
|
216
|
+
},
|
|
217
|
+
],
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
case 'comprehensive': {
|
|
221
|
+
if (!researchContext) {
|
|
222
|
+
throw new McpAdrError('Research context is required for comprehensive analysis', 'INVALID_INPUT');
|
|
223
|
+
}
|
|
224
|
+
// Generate all components for comprehensive research planning
|
|
225
|
+
const relevanceResult = await findRelevantAdrPatterns({
|
|
226
|
+
...researchContext,
|
|
227
|
+
constraints: researchContext.constraints || [],
|
|
228
|
+
timeline: researchContext.timeline || 'Not specified',
|
|
229
|
+
}, adrDirectory);
|
|
230
|
+
return {
|
|
231
|
+
content: [
|
|
232
|
+
{
|
|
233
|
+
type: 'text',
|
|
234
|
+
text: `# Comprehensive Research Question Generation
|
|
235
|
+
|
|
236
|
+
This comprehensive analysis will generate a complete research planning system with questions, tracking, and management.
|
|
237
|
+
|
|
238
|
+
## Research Context
|
|
239
|
+
**Topic**: ${researchContext.topic}
|
|
240
|
+
**Category**: ${researchContext.category}
|
|
241
|
+
**Scope**: ${researchContext.scope}
|
|
242
|
+
**Objectives**: ${researchContext.objectives.join(', ')}
|
|
243
|
+
**Timeline**: ${researchContext.timeline || 'Not specified'}
|
|
244
|
+
|
|
245
|
+
## Comprehensive Workflow
|
|
246
|
+
|
|
247
|
+
### 1. **Relevance Analysis** (First Step)
|
|
248
|
+
Identify relevant ADRs and patterns for the research context.
|
|
249
|
+
|
|
250
|
+
${relevanceResult.instructions}
|
|
251
|
+
|
|
252
|
+
#### Relevance Analysis Prompt
|
|
253
|
+
${relevanceResult.relevancePrompt}
|
|
254
|
+
|
|
255
|
+
### 2. **Research Question Generation** (Second Step)
|
|
256
|
+
Generate context-aware research questions based on relevance analysis:
|
|
257
|
+
\`\`\`json
|
|
258
|
+
{
|
|
259
|
+
"tool": "generate_research_questions",
|
|
260
|
+
"args": {
|
|
261
|
+
"analysisType": "questions",
|
|
262
|
+
"researchContext": ${JSON.stringify(researchContext)},
|
|
263
|
+
"relevantKnowledge": [results from step 1],
|
|
264
|
+
"projectPath": "${projectPath}"
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
\`\`\`
|
|
268
|
+
|
|
269
|
+
### 3. **Task Tracking System** (Third Step)
|
|
270
|
+
Create comprehensive task tracking for research execution:
|
|
271
|
+
\`\`\`json
|
|
272
|
+
{
|
|
273
|
+
"tool": "generate_research_questions",
|
|
274
|
+
"args": {
|
|
275
|
+
"analysisType": "tracking",
|
|
276
|
+
"researchQuestions": [results from step 2]
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
\`\`\`
|
|
280
|
+
|
|
281
|
+
### 4. **Problem Correlation** (Optional Fourth Step)
|
|
282
|
+
If problems are identified, correlate them with knowledge graph:
|
|
283
|
+
\`\`\`json
|
|
284
|
+
{
|
|
285
|
+
"tool": "generate_research_questions",
|
|
286
|
+
"args": {
|
|
287
|
+
"analysisType": "correlation",
|
|
288
|
+
"problems": [identified problems],
|
|
289
|
+
"knowledgeGraph": [project knowledge graph]
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
\`\`\`
|
|
293
|
+
|
|
294
|
+
## Expected Outcomes
|
|
295
|
+
|
|
296
|
+
This comprehensive approach will provide:
|
|
297
|
+
- **Complete Research Framework**: End-to-end research planning and execution
|
|
298
|
+
- **Context-Aware Questions**: Questions tailored to project and architectural context
|
|
299
|
+
- **Systematic Tracking**: Comprehensive task and progress management
|
|
300
|
+
- **Quality Assurance**: Built-in quality control and validation
|
|
301
|
+
- **Risk Management**: Proactive risk identification and mitigation
|
|
302
|
+
- **Stakeholder Communication**: Clear reporting and communication framework
|
|
303
|
+
|
|
304
|
+
## Research Excellence Standards
|
|
305
|
+
|
|
306
|
+
All generated research components follow these principles:
|
|
307
|
+
- **Evidence-Based**: Grounded in architectural decisions and project context
|
|
308
|
+
- **Actionable**: Questions and tasks that can be executed effectively
|
|
309
|
+
- **Measurable**: Clear success criteria and progress metrics
|
|
310
|
+
- **Prioritized**: Ranked by impact, effort, and strategic importance
|
|
311
|
+
- **Quality-Focused**: Built-in quality assurance and validation processes
|
|
312
|
+
|
|
313
|
+
## Implementation Guidance
|
|
314
|
+
|
|
315
|
+
1. **Start with Relevance**: Understand existing architectural context
|
|
316
|
+
2. **Generate Questions**: Create comprehensive, actionable research questions
|
|
317
|
+
3. **Plan Execution**: Develop detailed task tracking and management
|
|
318
|
+
4. **Monitor Progress**: Use tracking system for regular progress updates
|
|
319
|
+
5. **Ensure Quality**: Apply quality assurance throughout research process
|
|
320
|
+
`,
|
|
321
|
+
},
|
|
322
|
+
],
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
default:
|
|
326
|
+
throw new McpAdrError(`Unknown analysis type: ${analysisType}`, 'INVALID_INPUT');
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
catch (error) {
|
|
330
|
+
throw new McpAdrError(`Failed to generate research questions: ${error instanceof Error ? error.message : String(error)}`, 'RESEARCH_QUESTION_ERROR');
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
//# sourceMappingURL=research-question-tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"research-question-tool.js","sourceRoot":"","sources":["../../../src/tools/research-question-tool.ts"],"names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ACJ,CAAC;YAED;gBACE,MAAM,IAAI,WAAW,CAAC,0BAA0B,YAAY,EAAE,EAAE,eAAe,CAAC,CAAC;QACrF,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,WAAW,CACnB,0CAA0C,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,EAClG,yBAAyB,CAC1B,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Tools for rule generation and validation
|
|
3
|
+
* Implements prompt-driven architectural rule management
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Generate architectural rules from ADRs and code patterns
|
|
7
|
+
*/
|
|
8
|
+
export declare function generateRules(args: {
|
|
9
|
+
source?: 'adrs' | 'patterns' | 'both';
|
|
10
|
+
adrDirectory?: string;
|
|
11
|
+
projectPath?: string;
|
|
12
|
+
existingRules?: Array<{
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
description: string;
|
|
16
|
+
}>;
|
|
17
|
+
outputFormat?: 'json' | 'yaml' | 'both';
|
|
18
|
+
}): Promise<any>;
|
|
19
|
+
/**
|
|
20
|
+
* Validate code against architectural rules
|
|
21
|
+
*/
|
|
22
|
+
export declare function validateRules(args: {
|
|
23
|
+
filePath?: string;
|
|
24
|
+
fileContent?: string;
|
|
25
|
+
fileName?: string;
|
|
26
|
+
rules: Array<{
|
|
27
|
+
id: string;
|
|
28
|
+
name: string;
|
|
29
|
+
description: string;
|
|
30
|
+
pattern: string;
|
|
31
|
+
severity: string;
|
|
32
|
+
message: string;
|
|
33
|
+
}>;
|
|
34
|
+
validationType?: 'file' | 'function' | 'component' | 'module';
|
|
35
|
+
reportFormat?: 'summary' | 'detailed' | 'json';
|
|
36
|
+
}): Promise<any>;
|
|
37
|
+
/**
|
|
38
|
+
* Create machine-readable rule set
|
|
39
|
+
*/
|
|
40
|
+
export declare function createRuleSet(args: {
|
|
41
|
+
name: string;
|
|
42
|
+
description?: string;
|
|
43
|
+
adrRules?: any[];
|
|
44
|
+
patternRules?: any[];
|
|
45
|
+
rules?: any[];
|
|
46
|
+
outputFormat?: 'json' | 'yaml' | 'both';
|
|
47
|
+
author?: string;
|
|
48
|
+
}): Promise<any>;
|
|
49
|
+
//# sourceMappingURL=rule-generation-tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rule-generation-tool.d.ts","sourceRoot":"","sources":["../../../src/tools/rule-generation-tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;GAEG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE;IACxC,MAAM,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,MAAM,CAAC;IACtC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,KAAK,CAAC;QACpB,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC,CAAC;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;CACzC,GAAG,OAAO,CAAC,GAAG,CAAC,CA0Nf;AAED;;GAEG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,KAAK,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;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