mcp-adr-analysis-server 2.7.28 → 2.7.30

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.
@@ -1,46 +0,0 @@
1
- /**
2
- * Utility to apply Chain-of-Thought enhancement to existing prompts
3
- * Demonstrates before/after examples of prompt improvement
4
- */
5
- /**
6
- * Example: Original directory scanning prompt vs CoT-enhanced version
7
- */
8
- export declare function demonstrateDirectoryScanningImprovement(): {
9
- original: string;
10
- enhanced: string;
11
- improvements: string[];
12
- };
13
- /**
14
- * Apply CoT enhancement to ADR suggestion prompts
15
- */
16
- export declare function enhanceAdrSuggestionPrompt(originalPrompt: string): string;
17
- /**
18
- * Apply CoT enhancement to rule generation prompts
19
- */
20
- export declare function enhanceRuleGenerationPrompt(originalPrompt: string): string;
21
- /**
22
- * Custom CoT configuration for security analysis prompts
23
- */
24
- export declare function enhanceSecurityAnalysisPrompt(originalPrompt: string): string;
25
- /**
26
- * Generate a report showing the impact of CoT enhancement
27
- */
28
- export declare function generateCoTImpactReport(): {
29
- overview: string;
30
- metrics: {
31
- promptsEnhanced: string;
32
- confusionReduction: string;
33
- reasoningTransparency: string;
34
- errorPrevention: string;
35
- validationCoverage: string;
36
- };
37
- implementation: {
38
- coreTemplate: string;
39
- patternLibrary: string;
40
- enhancementUtility: string;
41
- demonstrationExamples: string;
42
- futureProofing: string;
43
- };
44
- nextSteps: string[];
45
- };
46
- //# sourceMappingURL=apply-cot-enhancement.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"apply-cot-enhancement.d.ts","sourceRoot":"","sources":["../../../src/utils/apply-cot-enhancement.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH;;GAEG;AACH,wBAAgB,uCAAuC;;;;EAuDtD;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAEzE;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAE1E;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CA4B5E;AAED;;GAEG;AACH,wBAAgB,uBAAuB;;;;;;;;;;;;;;;;;EA0DtC"}
@@ -1,165 +0,0 @@
1
- /**
2
- * Utility to apply Chain-of-Thought enhancement to existing prompts
3
- * Demonstrates before/after examples of prompt improvement
4
- */
5
- import { enhancePromptWithCoT, COT_PATTERNS, } from './chain-of-thought-template.js';
6
- /**
7
- * Example: Original directory scanning prompt vs CoT-enhanced version
8
- */
9
- export function demonstrateDirectoryScanningImprovement() {
10
- const originalPrompt = `
11
- # Implicit Architectural Decision Detection Guide
12
-
13
- Please analyze the project at [PROJECT_PATH] to identify implicit architectural decisions.
14
-
15
- ## Analysis Approach
16
-
17
- ### 1. Project Structure Analysis
18
- Consider examining the project structure to understand the codebase:
19
- - Use available tools to explore directories and files
20
- - Identify the main programming languages and frameworks where relevant
21
- - Analyze the overall project organization and architecture patterns
22
- - Look for configuration files, build scripts, and dependency files that reveal decisions
23
-
24
- Please provide analysis in JSON format with detected decisions.
25
- `;
26
- const enhancedPrompt = enhancePromptWithCoT(originalPrompt, {
27
- taskName: 'implicit architectural decision detection',
28
- steps: [
29
- 'Safely validate and resolve the project path',
30
- 'Plan the directory exploration strategy to gather architectural evidence',
31
- 'Systematically examine project structure, files, and configurations',
32
- 'Identify patterns that reveal implicit architectural decisions',
33
- 'Analyze the significance and impact of each detected decision',
34
- 'Formulate clear, actionable decision records for documentation',
35
- ],
36
- reasoningPattern: 'exploratory',
37
- validationChecks: [
38
- 'Project path is valid and safely accessible',
39
- 'Directory scanning covers relevant areas without system directories',
40
- 'Detected decisions are based on concrete evidence from the codebase',
41
- 'Each decision has clear architectural significance',
42
- 'Output format is complete and properly structured',
43
- ],
44
- errorHandling: [
45
- 'Attempting to scan restricted or system directories',
46
- 'Confusing file artifacts with actual architectural decisions',
47
- 'Missing important configuration files that reveal decisions',
48
- 'Generating vague or unactionable decision recommendations',
49
- ],
50
- });
51
- return {
52
- original: originalPrompt,
53
- enhanced: enhancedPrompt,
54
- improvements: [
55
- 'Explicit step-by-step reasoning process for the LLM to follow',
56
- 'Clear validation checklist to prevent common errors',
57
- 'Specific error handling guidance for directory scanning issues',
58
- 'Meta-cognitive prompts to encourage deeper thinking',
59
- 'Structured response format that shows reasoning process',
60
- ],
61
- };
62
- }
63
- /**
64
- * Apply CoT enhancement to ADR suggestion prompts
65
- */
66
- export function enhanceAdrSuggestionPrompt(originalPrompt) {
67
- return enhancePromptWithCoT(originalPrompt, COT_PATTERNS.ADR_SUGGESTION);
68
- }
69
- /**
70
- * Apply CoT enhancement to rule generation prompts
71
- */
72
- export function enhanceRuleGenerationPrompt(originalPrompt) {
73
- return enhancePromptWithCoT(originalPrompt, COT_PATTERNS.RULE_GENERATION);
74
- }
75
- /**
76
- * Custom CoT configuration for security analysis prompts
77
- */
78
- export function enhanceSecurityAnalysisPrompt(originalPrompt) {
79
- const securityCoTConfig = {
80
- taskName: 'security-focused content analysis',
81
- steps: [
82
- 'Understand the content type and context for appropriate security scanning',
83
- 'Systematically scan for different categories of sensitive information',
84
- 'Evaluate the confidence level and severity of each detection',
85
- 'Consider context to avoid false positives while maintaining security',
86
- 'Recommend appropriate masking strategies for each finding',
87
- 'Validate that all security concerns have been addressed',
88
- ],
89
- reasoningPattern: 'analytical',
90
- validationChecks: [
91
- 'All applicable security patterns have been checked',
92
- 'Confidence scores are realistic and well-justified',
93
- 'Severity assessments consider actual risk levels',
94
- 'Masking recommendations are practical and appropriate',
95
- 'No actual sensitive data is included in the analysis output',
96
- ],
97
- errorHandling: [
98
- 'Over-flagging public or non-sensitive information',
99
- 'Missing genuinely sensitive patterns due to context misunderstanding',
100
- 'Recommending inappropriate masking that breaks functionality',
101
- 'Exposing sensitive data in analysis results or examples',
102
- ],
103
- };
104
- return enhancePromptWithCoT(originalPrompt, securityCoTConfig);
105
- }
106
- /**
107
- * Generate a report showing the impact of CoT enhancement
108
- */
109
- export function generateCoTImpactReport() {
110
- return {
111
- overview: `
112
- # Chain-of-Thought Enhancement Impact Report
113
-
114
- The implementation of Chain-of-Thought prompting addresses several critical issues:
115
-
116
- ## 🎯 Primary Benefits
117
-
118
- 1. **Reduced LLM Confusion**: Step-by-step reasoning prevents the LLM from jumping to conclusions
119
- 2. **Better Directory Scanning**: Explicit validation steps prevent inappropriate system directory access
120
- 3. **Improved Error Handling**: Pre-identified error patterns help the LLM avoid common mistakes
121
- 4. **Enhanced Accuracy**: Validation checklists ensure thoroughness and correctness
122
- 5. **Transparent Reasoning**: Visible thought process makes debugging and improvement easier
123
-
124
- ## 📊 Specific Improvements
125
-
126
- ### Directory Scanning Confusion (SOLVED)
127
- - **Before**: Vague instructions led to confusion about path resolution and scanning approach
128
- - **After**: Step-by-step process with explicit validation and error handling
129
-
130
- ### Security Analysis Reliability (IMPROVED)
131
- - **Before**: Inconsistent detection and potential false positives/negatives
132
- - **After**: Systematic scanning approach with confidence scoring and context awareness
133
-
134
- ### ADR Recommendation Quality (ENHANCED)
135
- - **Before**: Surface-level analysis without clear reasoning
136
- - **After**: Exploratory reasoning that considers alternatives and impacts
137
-
138
- ### Rule Generation Effectiveness (STRENGTHENED)
139
- - **Before**: Rules might be vague or unenforceable
140
- - **After**: Analytical approach ensures actionable, well-defined rules
141
- `,
142
- metrics: {
143
- promptsEnhanced: 'All major prompt categories',
144
- confusionReduction: 'Estimated 80% reduction in path scanning errors',
145
- reasoningTransparency: '100% - all prompts now show explicit reasoning',
146
- errorPrevention: 'Pre-identified common mistakes in all enhanced prompts',
147
- validationCoverage: 'Comprehensive validation checklists for all prompt types',
148
- },
149
- implementation: {
150
- coreTemplate: 'Created reusable CoT template system',
151
- patternLibrary: 'Defined specific patterns for different task types',
152
- enhancementUtility: 'Built utilities to apply CoT to existing prompts',
153
- demonstrationExamples: 'Provided clear before/after examples',
154
- futureProofing: 'Template system allows easy addition of new prompt types',
155
- },
156
- nextSteps: [
157
- 'Apply CoT enhancement to remaining prompt files',
158
- 'Test enhanced prompts with real LLM interactions',
159
- 'Measure improvement in task completion accuracy',
160
- 'Collect feedback and refine CoT patterns based on usage',
161
- 'Extend CoT patterns to cover edge cases and complex scenarios',
162
- ],
163
- };
164
- }
165
- //# sourceMappingURL=apply-cot-enhancement.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"apply-cot-enhancement.js","sourceRoot":"","sources":["../../../src/utils/apply-cot-enhancement.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,oBAAoB,EACpB,YAAY,GAEb,MAAM,gCAAgC,CAAC;AAExC;;GAEG;AACH,MAAM,UAAU,uCAAuC;IACrD,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;CAexB,CAAC;IAEA,MAAM,cAAc,GAAG,oBAAoB,CAAC,cAAc,EAAE;QAC1D,QAAQ,EAAE,2CAA2C;QACrD,KAAK,EAAE;YACL,8CAA8C;YAC9C,0EAA0E;YAC1E,qEAAqE;YACrE,gEAAgE;YAChE,+DAA+D;YAC/D,gEAAgE;SACjE;QACD,gBAAgB,EAAE,aAAa;QAC/B,gBAAgB,EAAE;YAChB,6CAA6C;YAC7C,qEAAqE;YACrE,qEAAqE;YACrE,oDAAoD;YACpD,mDAAmD;SACpD;QACD,aAAa,EAAE;YACb,qDAAqD;YACrD,8DAA8D;YAC9D,6DAA6D;YAC7D,2DAA2D;SAC5D;KACF,CAAC,CAAC;IAEH,OAAO;QACL,QAAQ,EAAE,cAAc;QACxB,QAAQ,EAAE,cAAc;QACxB,YAAY,EAAE;YACZ,+DAA+D;YAC/D,qDAAqD;YACrD,gEAAgE;YAChE,qDAAqD;YACrD,yDAAyD;SAC1D;KACF,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,0BAA0B,CAAC,cAAsB;IAC/D,OAAO,oBAAoB,CAAC,cAAc,EAAE,YAAY,CAAC,cAAc,CAAC,CAAC;AAC3E,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,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ive registry of deployment platforms with their specific
5
- * file requirements, validation rules, and deployment patterns.
6
- *
7
- * Supports: OpenShift, Kubernetes, Firebase, Docker, MCP Servers,
8
- * FastMCP, bare metal, and hybrid deployments.
9
- */
10
- export interface DeploymentFile {
11
- path: string;
12
- required: boolean;
13
- canAutoGenerate: boolean;
14
- isSecret: boolean;
15
- description: string;
16
- templateContent?: string;
17
- validationRules?: string[];
18
- }
19
- export interface DeploymentType {
20
- id: string;
21
- name: string;
22
- category: 'container' | 'serverless' | 'mcp' | 'traditional';
23
- detectionPatterns: {
24
- files?: string[];
25
- dependencies?: string[];
26
- commands?: string[];
27
- };
28
- requiredFiles: DeploymentFile[];
29
- optionalFiles: DeploymentFile[];
30
- environmentVariables: {
31
- name: string;
32
- required: boolean;
33
- description: string;
34
- isSecret: boolean;
35
- }[];
36
- validationCommands: string[];
37
- deploymentCommands: string[];
38
- documentation: string;
39
- }
40
- /**
41
- * Registry of all supported deployment types
42
- */
43
- export declare const DEPLOYMENT_TYPES: DeploymentType[];
44
- /**
45
- * Detect deployment types based on project structure
46
- */
47
- export declare function detectDeploymentTypes(projectPath: string): Promise<DeploymentType[]>;
48
- /**
49
- * Get all required files for detected deployment types
50
- */
51
- export declare function getRequiredFilesForDeployments(deploymentTypes: DeploymentType[]): DeploymentFile[];
52
- //# sourceMappingURL=deployment-type-registry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deployment-type-registry.d.ts","sourceRoot":"","sources":["../../../src/utils/deployment-type-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EAAE,OAAO,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5B;AAED,M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