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 @@
|
|
|
1
|
+
{"version":3,"file":"environment-analysis-prompts.js","sourceRoot":"","sources":["../../../src/prompts/environment-analysis-prompts.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,UAAU,qCAAqC,CACnD,gBAIE,EACF,gBAAwB;IAExB,OAAO;;;;;;EAMP,gBAAgB;SACf,GAAG,CACF,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;MACf,KAAK,GAAG,CAAC,KAAK,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,IAAI;;EAE7C,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,IAA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;;CAElF,CACE;SACA,IAAI,CAAC,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBA6CY,QAAQ,CAAC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqIrC,CAAC;AACF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mCAAmC,CACjD,kBAAuB,EACvB,YAAiB,EACjB,iBAA4B;IAE5B,OAAO;;;;;;;EAOP,IAAI,CAAC,SAAS,CAAC,kBAAkB,EAAE,IAAI,EAAE,CAAC,CAAC;;;;;EAK3C,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;;;EAIrC,iBAAiB;QACf,CAAC,CAAC;EACJ,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;CAC9D;QACG,CAAC,CAAC,EACN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiLC,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Prompts for ADR Analysis Server
|
|
3
|
+
* Pre-written templates that help users accomplish specific tasks
|
|
4
|
+
*/
|
|
5
|
+
export interface PromptTemplate {
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
arguments: Array<{
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
required: boolean;
|
|
12
|
+
}>;
|
|
13
|
+
template: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Goal specification prompt for project analysis
|
|
17
|
+
*/
|
|
18
|
+
export declare const goalSpecificationPrompt: PromptTemplate;
|
|
19
|
+
/**
|
|
20
|
+
* Action confirmation prompt for file operations
|
|
21
|
+
*/
|
|
22
|
+
export declare const actionConfirmationPrompt: PromptTemplate;
|
|
23
|
+
/**
|
|
24
|
+
* Ambiguity resolution prompt for unclear requirements
|
|
25
|
+
*/
|
|
26
|
+
export declare const ambiguityResolutionPrompt: PromptTemplate;
|
|
27
|
+
/**
|
|
28
|
+
* Custom rule definition prompt for architectural rules
|
|
29
|
+
*/
|
|
30
|
+
export declare const customRuleDefinitionPrompt: PromptTemplate;
|
|
31
|
+
/**
|
|
32
|
+
* Baseline analysis prompt for existing projects
|
|
33
|
+
*/
|
|
34
|
+
export declare const baselineAnalysisPrompt: PromptTemplate;
|
|
35
|
+
/**
|
|
36
|
+
* Secret prevention guidance prompt
|
|
37
|
+
*/
|
|
38
|
+
export declare const secretPreventionPrompt: PromptTemplate;
|
|
39
|
+
/**
|
|
40
|
+
* All available prompts
|
|
41
|
+
*/
|
|
42
|
+
export declare const allPrompts: PromptTemplate[];
|
|
43
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/prompts/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,KAAK,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,QAAQ,EAAE,OAAO,CAAC;KACnB,CAAC,CAAC;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,cA6CrC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,EAAE,cAkDtC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,cAwDvC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,0BAA0B,EAAE,cA8DxC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,cAgEpC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,cAmEpC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,cAAc,EAOtC,CAAC"}
|
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Prompts for ADR Analysis Server
|
|
3
|
+
* Pre-written templates that help users accomplish specific tasks
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Goal specification prompt for project analysis
|
|
7
|
+
*/
|
|
8
|
+
export const goalSpecificationPrompt = {
|
|
9
|
+
name: 'goal_specification',
|
|
10
|
+
description: 'Specify project goals and requirements for comprehensive analysis',
|
|
11
|
+
arguments: [
|
|
12
|
+
{
|
|
13
|
+
name: 'project_type',
|
|
14
|
+
description: 'Type of project (web, mobile, api, library, tool, etc.)',
|
|
15
|
+
required: false,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: 'target_audience',
|
|
19
|
+
description: 'Target audience or users of the project',
|
|
20
|
+
required: false,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'scale_requirements',
|
|
24
|
+
description: 'Expected scale and performance requirements',
|
|
25
|
+
required: false,
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
template: `# Project Goal Specification
|
|
29
|
+
|
|
30
|
+
Please help me define clear goals and requirements for this project analysis.
|
|
31
|
+
|
|
32
|
+
## Project Context
|
|
33
|
+
{{#if project_type}}
|
|
34
|
+
**Project Type**: {{project_type}}
|
|
35
|
+
{{/if}}
|
|
36
|
+
{{#if target_audience}}
|
|
37
|
+
**Target Audience**: {{target_audience}}
|
|
38
|
+
{{/if}}
|
|
39
|
+
{{#if scale_requirements}}
|
|
40
|
+
**Scale Requirements**: {{scale_requirements}}
|
|
41
|
+
{{/if}}
|
|
42
|
+
|
|
43
|
+
## Questions to Consider
|
|
44
|
+
|
|
45
|
+
1. **Primary Purpose**: What is the main purpose of this project?
|
|
46
|
+
2. **Key Features**: What are the core features or capabilities?
|
|
47
|
+
3. **Technical Constraints**: Are there any specific technical requirements or constraints?
|
|
48
|
+
4. **Quality Attributes**: What quality attributes are most important (performance, security, maintainability, etc.)?
|
|
49
|
+
5. **Integration Requirements**: Does this project need to integrate with other systems?
|
|
50
|
+
6. **Deployment Environment**: Where will this project be deployed?
|
|
51
|
+
|
|
52
|
+
Please provide detailed answers to help guide the architectural analysis and recommendations.`,
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Action confirmation prompt for file operations
|
|
56
|
+
*/
|
|
57
|
+
export const actionConfirmationPrompt = {
|
|
58
|
+
name: 'action_confirmation',
|
|
59
|
+
description: 'Confirm actions before writing files to disk',
|
|
60
|
+
arguments: [
|
|
61
|
+
{
|
|
62
|
+
name: 'action',
|
|
63
|
+
description: 'Description of the action to be performed',
|
|
64
|
+
required: true,
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: 'files',
|
|
68
|
+
description: 'List of files that will be affected (JSON array)',
|
|
69
|
+
required: true,
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: 'preview',
|
|
73
|
+
description: 'Preview of changes to be made',
|
|
74
|
+
required: false,
|
|
75
|
+
},
|
|
76
|
+
],
|
|
77
|
+
template: `# Action Confirmation Required
|
|
78
|
+
|
|
79
|
+
## Proposed Action
|
|
80
|
+
{{action}}
|
|
81
|
+
|
|
82
|
+
## Files to be Modified/Created
|
|
83
|
+
{{#each files}}
|
|
84
|
+
- **{{this.path}}** ({{this.action}})
|
|
85
|
+
{{#if this.description}}
|
|
86
|
+
Description: {{this.description}}
|
|
87
|
+
{{/if}}
|
|
88
|
+
{{/each}}
|
|
89
|
+
|
|
90
|
+
{{#if preview}}
|
|
91
|
+
## Preview of Changes
|
|
92
|
+
\`\`\`
|
|
93
|
+
{{preview}}
|
|
94
|
+
\`\`\`
|
|
95
|
+
{{/if}}
|
|
96
|
+
|
|
97
|
+
## Confirmation Required
|
|
98
|
+
|
|
99
|
+
⚠️ **Important**: This action will modify files on your local file system.
|
|
100
|
+
|
|
101
|
+
Please confirm:
|
|
102
|
+
- [ ] I have reviewed the proposed changes
|
|
103
|
+
- [ ] I understand which files will be modified
|
|
104
|
+
- [ ] I want to proceed with this action
|
|
105
|
+
|
|
106
|
+
**Type 'CONFIRM' to proceed or 'CANCEL' to abort.**`,
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* Ambiguity resolution prompt for unclear requirements
|
|
110
|
+
*/
|
|
111
|
+
export const ambiguityResolutionPrompt = {
|
|
112
|
+
name: 'ambiguity_resolution',
|
|
113
|
+
description: 'Resolve ambiguities in project analysis or requirements',
|
|
114
|
+
arguments: [
|
|
115
|
+
{
|
|
116
|
+
name: 'context',
|
|
117
|
+
description: 'Context where ambiguity was detected',
|
|
118
|
+
required: true,
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
name: 'ambiguous_items',
|
|
122
|
+
description: 'List of ambiguous items that need clarification',
|
|
123
|
+
required: true,
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: 'suggestions',
|
|
127
|
+
description: 'Suggested interpretations or options',
|
|
128
|
+
required: false,
|
|
129
|
+
},
|
|
130
|
+
],
|
|
131
|
+
template: `# Ambiguity Resolution Required
|
|
132
|
+
|
|
133
|
+
## Context
|
|
134
|
+
{{context}}
|
|
135
|
+
|
|
136
|
+
## Items Requiring Clarification
|
|
137
|
+
|
|
138
|
+
{{#each ambiguous_items}}
|
|
139
|
+
### {{@index}}. {{this.item}}
|
|
140
|
+
**Issue**: {{this.issue}}
|
|
141
|
+
{{#if this.impact}}
|
|
142
|
+
**Impact**: {{this.impact}}
|
|
143
|
+
{{/if}}
|
|
144
|
+
|
|
145
|
+
{{#if this.options}}
|
|
146
|
+
**Possible Interpretations**:
|
|
147
|
+
{{#each this.options}}
|
|
148
|
+
- {{this}}
|
|
149
|
+
{{/each}}
|
|
150
|
+
{{/if}}
|
|
151
|
+
|
|
152
|
+
{{/each}}
|
|
153
|
+
|
|
154
|
+
{{#if suggestions}}
|
|
155
|
+
## Suggested Resolutions
|
|
156
|
+
{{suggestions}}
|
|
157
|
+
{{/if}}
|
|
158
|
+
|
|
159
|
+
## Next Steps
|
|
160
|
+
|
|
161
|
+
Please provide clarification for the ambiguous items above. Your input will help ensure accurate analysis and appropriate architectural recommendations.
|
|
162
|
+
|
|
163
|
+
For each item, please specify:
|
|
164
|
+
1. Your preferred interpretation
|
|
165
|
+
2. Any additional context or constraints
|
|
166
|
+
3. Priority level (high/medium/low)`,
|
|
167
|
+
};
|
|
168
|
+
/**
|
|
169
|
+
* Custom rule definition prompt for architectural rules
|
|
170
|
+
*/
|
|
171
|
+
export const customRuleDefinitionPrompt = {
|
|
172
|
+
name: 'custom_rule_definition',
|
|
173
|
+
description: 'Define custom architectural rules and validation criteria',
|
|
174
|
+
arguments: [
|
|
175
|
+
{
|
|
176
|
+
name: 'rule_category',
|
|
177
|
+
description: 'Category of rule (architectural, coding, security, performance, documentation)',
|
|
178
|
+
required: true,
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
name: 'existing_rules',
|
|
182
|
+
description: 'Existing rules in the project (JSON array)',
|
|
183
|
+
required: false,
|
|
184
|
+
},
|
|
185
|
+
],
|
|
186
|
+
template: `# Custom Rule Definition
|
|
187
|
+
|
|
188
|
+
## Rule Category
|
|
189
|
+
{{rule_category}}
|
|
190
|
+
|
|
191
|
+
{{#if existing_rules}}
|
|
192
|
+
## Existing Rules
|
|
193
|
+
{{#each existing_rules}}
|
|
194
|
+
- **{{this.name}}**: {{this.description}}
|
|
195
|
+
- Pattern: \`{{this.pattern}}\`
|
|
196
|
+
- Severity: {{this.severity}}
|
|
197
|
+
{{/each}}
|
|
198
|
+
{{/if}}
|
|
199
|
+
|
|
200
|
+
## Rule Definition Template
|
|
201
|
+
|
|
202
|
+
Please define your custom rule using the following structure:
|
|
203
|
+
|
|
204
|
+
\`\`\`json
|
|
205
|
+
{
|
|
206
|
+
"name": "Rule Name",
|
|
207
|
+
"description": "Clear description of what this rule enforces",
|
|
208
|
+
"type": "{{rule_category}}",
|
|
209
|
+
"severity": "info|warning|error|critical",
|
|
210
|
+
"pattern": "regex or glob pattern to match",
|
|
211
|
+
"message": "Message to display when rule is violated",
|
|
212
|
+
"examples": {
|
|
213
|
+
"valid": ["example of valid code/structure"],
|
|
214
|
+
"invalid": ["example of invalid code/structure"]
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
\`\`\`
|
|
218
|
+
|
|
219
|
+
## Guidelines
|
|
220
|
+
|
|
221
|
+
1. **Be Specific**: Rules should be clear and unambiguous
|
|
222
|
+
2. **Provide Examples**: Include both valid and invalid examples
|
|
223
|
+
3. **Consider Impact**: Choose appropriate severity levels
|
|
224
|
+
4. **Test Patterns**: Ensure regex/glob patterns work correctly
|
|
225
|
+
|
|
226
|
+
## Common Rule Types
|
|
227
|
+
|
|
228
|
+
- **Naming Conventions**: File/function/variable naming patterns
|
|
229
|
+
- **Structure Rules**: Directory organization requirements
|
|
230
|
+
- **Dependency Rules**: Allowed/forbidden dependencies
|
|
231
|
+
- **Security Rules**: Security best practices enforcement
|
|
232
|
+
- **Performance Rules**: Performance-related constraints`,
|
|
233
|
+
};
|
|
234
|
+
/**
|
|
235
|
+
* Baseline analysis prompt for existing projects
|
|
236
|
+
*/
|
|
237
|
+
export const baselineAnalysisPrompt = {
|
|
238
|
+
name: 'baseline_analysis',
|
|
239
|
+
description: 'Generate comprehensive baseline analysis for existing projects',
|
|
240
|
+
arguments: [
|
|
241
|
+
{
|
|
242
|
+
name: 'project_path',
|
|
243
|
+
description: 'Path to the project directory',
|
|
244
|
+
required: true,
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
name: 'focus_areas',
|
|
248
|
+
description: 'Specific areas to focus on (comma-separated)',
|
|
249
|
+
required: false,
|
|
250
|
+
},
|
|
251
|
+
],
|
|
252
|
+
template: `# Baseline Analysis Request
|
|
253
|
+
|
|
254
|
+
## Project Information
|
|
255
|
+
**Project Path**: {{project_path}}
|
|
256
|
+
{{#if focus_areas}}
|
|
257
|
+
**Focus Areas**: {{focus_areas}}
|
|
258
|
+
{{/if}}
|
|
259
|
+
|
|
260
|
+
## Analysis Scope
|
|
261
|
+
|
|
262
|
+
This baseline analysis will examine your existing project to provide:
|
|
263
|
+
|
|
264
|
+
### 🔍 **Technology Stack Analysis**
|
|
265
|
+
- Programming languages and frameworks
|
|
266
|
+
- Databases and data storage
|
|
267
|
+
- Cloud services and infrastructure
|
|
268
|
+
- Development and deployment tools
|
|
269
|
+
|
|
270
|
+
### 🏗️ **Architectural Pattern Detection**
|
|
271
|
+
- Design patterns and architectural styles
|
|
272
|
+
- Code organization and structure
|
|
273
|
+
- Communication patterns
|
|
274
|
+
- Testing strategies
|
|
275
|
+
|
|
276
|
+
### 📊 **Quality Assessment**
|
|
277
|
+
- Code quality metrics
|
|
278
|
+
- Best practices adherence
|
|
279
|
+
- Technical debt identification
|
|
280
|
+
- Security considerations
|
|
281
|
+
|
|
282
|
+
### 📋 **ADR Discovery**
|
|
283
|
+
- Existing architectural decisions
|
|
284
|
+
- Implicit decisions in code
|
|
285
|
+
- Missing decision documentation
|
|
286
|
+
|
|
287
|
+
### ✅ **Action Items Generation**
|
|
288
|
+
- Priority improvements
|
|
289
|
+
- Missing components
|
|
290
|
+
- Recommended next steps
|
|
291
|
+
|
|
292
|
+
## Expected Outputs
|
|
293
|
+
|
|
294
|
+
1. **Comprehensive Analysis Report**
|
|
295
|
+
2. **Technology Inventory**
|
|
296
|
+
3. **Pattern Assessment**
|
|
297
|
+
4. **Generated/Updated todo.md**
|
|
298
|
+
5. **Architectural Recommendations**
|
|
299
|
+
|
|
300
|
+
Please confirm to proceed with the baseline analysis.`,
|
|
301
|
+
};
|
|
302
|
+
/**
|
|
303
|
+
* Secret prevention guidance prompt
|
|
304
|
+
*/
|
|
305
|
+
export const secretPreventionPrompt = {
|
|
306
|
+
name: 'secret_prevention_guidance',
|
|
307
|
+
description: 'Proactive guidance to prevent secret exposure in code and documentation',
|
|
308
|
+
arguments: [
|
|
309
|
+
{
|
|
310
|
+
name: 'content_type',
|
|
311
|
+
description: 'Type of content being created (code, documentation, configuration)',
|
|
312
|
+
required: true,
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
name: 'target_location',
|
|
316
|
+
description: 'Where the content will be stored/committed',
|
|
317
|
+
required: false,
|
|
318
|
+
},
|
|
319
|
+
],
|
|
320
|
+
template: `# 🔒 Secret Prevention Guidance
|
|
321
|
+
|
|
322
|
+
## Content Type
|
|
323
|
+
{{content_type}}
|
|
324
|
+
|
|
325
|
+
{{#if target_location}}
|
|
326
|
+
## Target Location
|
|
327
|
+
{{target_location}}
|
|
328
|
+
{{/if}}
|
|
329
|
+
|
|
330
|
+
## ⚠️ Security Checklist
|
|
331
|
+
|
|
332
|
+
Before proceeding, please verify that your content does NOT contain:
|
|
333
|
+
|
|
334
|
+
### 🔑 **API Keys & Tokens**
|
|
335
|
+
- [ ] API keys (AWS, Google, GitHub, etc.)
|
|
336
|
+
- [ ] Access tokens or bearer tokens
|
|
337
|
+
- [ ] OAuth client secrets
|
|
338
|
+
- [ ] Service account keys
|
|
339
|
+
|
|
340
|
+
### 🔐 **Credentials**
|
|
341
|
+
- [ ] Passwords or passphrases
|
|
342
|
+
- [ ] Database connection strings with credentials
|
|
343
|
+
- [ ] Private keys or certificates
|
|
344
|
+
- [ ] SSH keys
|
|
345
|
+
|
|
346
|
+
### 🌐 **URLs & Endpoints**
|
|
347
|
+
- [ ] Internal URLs or IP addresses
|
|
348
|
+
- [ ] Database connection URLs with credentials
|
|
349
|
+
- [ ] Private service endpoints
|
|
350
|
+
|
|
351
|
+
### 📧 **Personal Information**
|
|
352
|
+
- [ ] Email addresses (unless public)
|
|
353
|
+
- [ ] Phone numbers
|
|
354
|
+
- [ ] Personal names in sensitive contexts
|
|
355
|
+
|
|
356
|
+
## 🛡️ Best Practices
|
|
357
|
+
|
|
358
|
+
1. **Use Environment Variables**: Store secrets in .env files (add to .gitignore)
|
|
359
|
+
2. **Use Secret Management**: Leverage tools like HashiCorp Vault, AWS Secrets Manager
|
|
360
|
+
3. **Use Placeholders**: Replace actual values with \`<YOUR_API_KEY>\` or \`\${API_KEY}\`
|
|
361
|
+
4. **Review Before Commit**: Always review changes before committing
|
|
362
|
+
|
|
363
|
+
## 🚨 If Secrets Are Detected
|
|
364
|
+
|
|
365
|
+
If you need to include sensitive information:
|
|
366
|
+
1. Use configuration templates with placeholders
|
|
367
|
+
2. Document required environment variables
|
|
368
|
+
3. Provide setup instructions without actual values
|
|
369
|
+
4. Consider using secret scanning tools
|
|
370
|
+
|
|
371
|
+
**Proceed only after confirming no secrets are present.**`,
|
|
372
|
+
};
|
|
373
|
+
/**
|
|
374
|
+
* All available prompts
|
|
375
|
+
*/
|
|
376
|
+
export const allPrompts = [
|
|
377
|
+
goalSpecificationPrompt,
|
|
378
|
+
actionConfirmationPrompt,
|
|
379
|
+
ambiguityResolutionPrompt,
|
|
380
|
+
customRuleDefinitionPrompt,
|
|
381
|
+
baselineAnalysisPrompt,
|
|
382
|
+
secretPreventionPrompt,
|
|
383
|
+
];
|
|
384
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/prompts/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAaH;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAmB;IACrD,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,mEAAmE;IAChF,SAAS,EAAE;QACT;YAC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AAM,CAAC,MAAM,UAAU,GAAqB;IAC1C,uBAAuB;IACvB,wBAAwB;IACxB,yBAAyB;IACzB,0BAA0B;IAC1B,sBAAsB;IACtB,sBAAsB;CACvB,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
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 declare function generateResearchTopicExtractionPrompt(researchFiles: Array<{
|
|
9
|
+
filename: string;
|
|
10
|
+
content: string;
|
|
11
|
+
lastModified: string;
|
|
12
|
+
size: number;
|
|
13
|
+
}>, existingTopics?: string[]): string;
|
|
14
|
+
/**
|
|
15
|
+
* AI prompt for evaluating research impact on existing ADRs
|
|
16
|
+
*/
|
|
17
|
+
export declare function generateResearchImpactEvaluationPrompt(researchTopics: Array<{
|
|
18
|
+
id: string;
|
|
19
|
+
title: string;
|
|
20
|
+
category: string;
|
|
21
|
+
keyFindings: string[];
|
|
22
|
+
relevanceScore: number;
|
|
23
|
+
}>, existingAdrs: Array<{
|
|
24
|
+
id: string;
|
|
25
|
+
title: string;
|
|
26
|
+
status: string;
|
|
27
|
+
content: string;
|
|
28
|
+
category?: string;
|
|
29
|
+
}>): string;
|
|
30
|
+
/**
|
|
31
|
+
* AI prompt for suggesting ADR updates and deprecations
|
|
32
|
+
*/
|
|
33
|
+
export declare function generateAdrUpdateSuggestionPrompt(adrToUpdate: {
|
|
34
|
+
id: string;
|
|
35
|
+
title: string;
|
|
36
|
+
content: string;
|
|
37
|
+
status: string;
|
|
38
|
+
}, researchFindings: Array<{
|
|
39
|
+
finding: string;
|
|
40
|
+
evidence: string[];
|
|
41
|
+
impact: string;
|
|
42
|
+
}>, updateType: 'content' | 'status' | 'consequences' | 'alternatives' | 'deprecation'): string;
|
|
43
|
+
//# sourceMappingURL=research-integration-prompts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"research-integration-prompts.d.ts","sourceRoot":"","sources":["../../../src/prompts/research-integration-prompts.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,wBAAgB,qCAAqC,CACnD,aAAa,EAAE,KAAK,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC,EACF,cAAc,CAAC,EAAE,MAAM,EAAE,GACxB,MAAM,CA2HR;AAED;;GAEG;AACH,wBAAgB,sCAAsC,CACpD,cAAc,EAAE,KAAK,CAAC;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC,EACF,YAAY,EAAE,KAAK,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC,GACD,MAAM,CA0IR;AAED;;GAEG;AACH,wBAAgB,iCAAiC,CAC/C,WAAW,EAAE;IACX,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB,EACD,gBAAgB,EAAE,KAAK,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC,EACF,UAAU,EAAE,SAAS,GAAG,QAAQ,GAAG,cAAc,GAAG,cAAc,GAAG,aAAa,GACjF,MAAM,CAkIR"}
|