mcp-ai-agent-guidelines 0.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 +336 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +307 -0
- package/dist/index.js.map +1 -0
- package/dist/prompts/index.d.ts +21 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +504 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/resources/index.d.ts +14 -0
- package/dist/resources/index.d.ts.map +1 -0
- package/dist/resources/index.js +92 -0
- package/dist/resources/index.js.map +1 -0
- package/dist/resources/structured.d.ts +47 -0
- package/dist/resources/structured.d.ts.map +1 -0
- package/dist/resources/structured.js +857 -0
- package/dist/resources/structured.js.map +1 -0
- package/dist/tools/code-hygiene-analyzer.d.ts +7 -0
- package/dist/tools/code-hygiene-analyzer.d.ts.map +1 -0
- package/dist/tools/code-hygiene-analyzer.js +176 -0
- package/dist/tools/code-hygiene-analyzer.js.map +1 -0
- package/dist/tools/config/guidelines-config.d.ts +16 -0
- package/dist/tools/config/guidelines-config.d.ts.map +1 -0
- package/dist/tools/config/guidelines-config.js +236 -0
- package/dist/tools/config/guidelines-config.js.map +1 -0
- package/dist/tools/config/model-config.d.ts +33 -0
- package/dist/tools/config/model-config.d.ts.map +1 -0
- package/dist/tools/config/model-config.js +206 -0
- package/dist/tools/config/model-config.js.map +1 -0
- package/dist/tools/guidelines-validator.d.ts +7 -0
- package/dist/tools/guidelines-validator.d.ts.map +1 -0
- package/dist/tools/guidelines-validator.js +178 -0
- package/dist/tools/guidelines-validator.js.map +1 -0
- package/dist/tools/hierarchical-prompt-builder.d.ts +7 -0
- package/dist/tools/hierarchical-prompt-builder.d.ts.map +1 -0
- package/dist/tools/hierarchical-prompt-builder.js +147 -0
- package/dist/tools/hierarchical-prompt-builder.js.map +1 -0
- package/dist/tools/memory-context-optimizer.d.ts +7 -0
- package/dist/tools/memory-context-optimizer.d.ts.map +1 -0
- package/dist/tools/memory-context-optimizer.js +256 -0
- package/dist/tools/memory-context-optimizer.js.map +1 -0
- package/dist/tools/mermaid-diagram-generator.d.ts +7 -0
- package/dist/tools/mermaid-diagram-generator.d.ts.map +1 -0
- package/dist/tools/mermaid-diagram-generator.js +312 -0
- package/dist/tools/mermaid-diagram-generator.js.map +1 -0
- package/dist/tools/model-compatibility-checker.d.ts +7 -0
- package/dist/tools/model-compatibility-checker.d.ts.map +1 -0
- package/dist/tools/model-compatibility-checker.js +204 -0
- package/dist/tools/model-compatibility-checker.js.map +1 -0
- package/dist/tools/sprint-timeline-calculator.d.ts +7 -0
- package/dist/tools/sprint-timeline-calculator.d.ts.map +1 -0
- package/dist/tools/sprint-timeline-calculator.js +240 -0
- package/dist/tools/sprint-timeline-calculator.js.map +1 -0
- package/package.json +75 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACN,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,0BAA0B,EAC1B,sBAAsB,EACtB,yBAAyB,GACzB,MAAM,oCAAoC,CAAC;AAC5C,iBAAiB;AACjB,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC5D,mBAAmB;AACnB,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,8BAA8B;AAC9B,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AACnF,OA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AAC;AAEH,MAAM,CAAC,iBAAiB,CAAC,yBAAyB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;IACrE,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IAC/B,OAAO,MAAM,WAAW,CAAC,GAAG,CAAC,CAAC;AAC/B,CAAC,CAAC,CAAC;AAEH,2BAA2B;AAC3B,MAAM,CAAC,iBAAiB,CAAC,wBAAwB,EAAE,KAAK,IAAI,EAAE;IAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,EAAE,EAAE,CAAC;AACzC,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,iBAAiB,CAAC,sBAAsB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;IAClE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IACjD,OAAO,MAAM,SAAS,CAAC,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;AAC1C,CAAC,CAAC,CAAC;AAEH,mBAAmB;AACnB,KAAK,UAAU,IAAI;IAClB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,4CAA4C,CAAC,CAAC;AAC7D,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACtB,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;IACtC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACjB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare function listPrompts(): Promise<{
|
|
2
|
+
name: string;
|
|
3
|
+
description: string;
|
|
4
|
+
arguments: {
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
required: boolean;
|
|
8
|
+
}[];
|
|
9
|
+
}[]>;
|
|
10
|
+
type PromptArgs = Record<string, unknown>;
|
|
11
|
+
export declare function getPrompt(name: string, args: PromptArgs): Promise<{
|
|
12
|
+
messages: {
|
|
13
|
+
role: string;
|
|
14
|
+
content: {
|
|
15
|
+
type: string;
|
|
16
|
+
text: string;
|
|
17
|
+
};
|
|
18
|
+
}[];
|
|
19
|
+
}>;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AA6GA,wBAAsB,WAAW;;;;;;;;KAMhC;AAED,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE1C,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU;;;;;;;;GAiD7D"}
|
|
@@ -0,0 +1,504 @@
|
|
|
1
|
+
const prompts = [
|
|
2
|
+
{
|
|
3
|
+
name: "code-analysis-prompt",
|
|
4
|
+
description: "Comprehensive code analysis and review prompt template",
|
|
5
|
+
arguments: [
|
|
6
|
+
{
|
|
7
|
+
name: "codebase",
|
|
8
|
+
description: "The codebase or code snippet to analyze",
|
|
9
|
+
required: true,
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
name: "focus_area",
|
|
13
|
+
description: "Specific area to focus on (security, performance, maintainability)",
|
|
14
|
+
required: false,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: "language",
|
|
18
|
+
description: "Programming language of the code",
|
|
19
|
+
required: false,
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: "hierarchical-task-prompt",
|
|
25
|
+
description: "Structured prompt template for complex task breakdown",
|
|
26
|
+
arguments: [
|
|
27
|
+
{
|
|
28
|
+
name: "task_description",
|
|
29
|
+
description: "The main task to be broken down",
|
|
30
|
+
required: true,
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: "complexity_level",
|
|
34
|
+
description: "Task complexity level (simple, medium, complex)",
|
|
35
|
+
required: false,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: "target_audience",
|
|
39
|
+
description: "Target audience expertise level",
|
|
40
|
+
required: false,
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: "architecture-design-prompt",
|
|
46
|
+
description: "System architecture design and planning prompt",
|
|
47
|
+
arguments: [
|
|
48
|
+
{
|
|
49
|
+
name: "system_requirements",
|
|
50
|
+
description: "System requirements and constraints",
|
|
51
|
+
required: true,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: "scale",
|
|
55
|
+
description: "Expected system scale (small, medium, large)",
|
|
56
|
+
required: false,
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: "technology_stack",
|
|
60
|
+
description: "Preferred or required technology stack",
|
|
61
|
+
required: false,
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "debugging-assistant-prompt",
|
|
67
|
+
description: "Systematic debugging and troubleshooting prompt",
|
|
68
|
+
arguments: [
|
|
69
|
+
{
|
|
70
|
+
name: "error_description",
|
|
71
|
+
description: "Description of the error or issue",
|
|
72
|
+
required: true,
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: "context",
|
|
76
|
+
description: "Additional context about the problem",
|
|
77
|
+
required: false,
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: "attempted_solutions",
|
|
81
|
+
description: "Solutions already attempted",
|
|
82
|
+
required: false,
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: "documentation-generator-prompt",
|
|
88
|
+
description: "Technical documentation generation prompt template",
|
|
89
|
+
arguments: [
|
|
90
|
+
{
|
|
91
|
+
name: "content_type",
|
|
92
|
+
description: "Type of documentation (API, user guide, technical spec)",
|
|
93
|
+
required: true,
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: "target_audience",
|
|
97
|
+
description: "Intended audience for the documentation",
|
|
98
|
+
required: false,
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
name: "existing_content",
|
|
102
|
+
description: "Any existing content to build upon",
|
|
103
|
+
required: false,
|
|
104
|
+
},
|
|
105
|
+
],
|
|
106
|
+
},
|
|
107
|
+
];
|
|
108
|
+
export async function listPrompts() {
|
|
109
|
+
return prompts.map((p) => ({
|
|
110
|
+
name: p.name,
|
|
111
|
+
description: p.description,
|
|
112
|
+
arguments: p.arguments,
|
|
113
|
+
}));
|
|
114
|
+
}
|
|
115
|
+
export async function getPrompt(name, args) {
|
|
116
|
+
const prompt = prompts.find((p) => p.name === name);
|
|
117
|
+
if (!prompt) {
|
|
118
|
+
throw new Error(`Prompt not found: ${name}`);
|
|
119
|
+
}
|
|
120
|
+
// Validate required arguments
|
|
121
|
+
const missingArgs = prompt.arguments
|
|
122
|
+
.filter((arg) => arg.required && !(arg.name in args))
|
|
123
|
+
.map((arg) => arg.name);
|
|
124
|
+
if (missingArgs.length > 0) {
|
|
125
|
+
throw new Error(`Missing required arguments: ${missingArgs.join(", ")}`);
|
|
126
|
+
}
|
|
127
|
+
let content = "";
|
|
128
|
+
switch (name) {
|
|
129
|
+
case "code-analysis-prompt":
|
|
130
|
+
content = generateCodeAnalysisPrompt(args);
|
|
131
|
+
break;
|
|
132
|
+
case "hierarchical-task-prompt":
|
|
133
|
+
content = generateHierarchicalTaskPrompt(args);
|
|
134
|
+
break;
|
|
135
|
+
case "architecture-design-prompt":
|
|
136
|
+
content = generateArchitectureDesignPrompt(args);
|
|
137
|
+
break;
|
|
138
|
+
case "debugging-assistant-prompt":
|
|
139
|
+
content = generateDebuggingAssistantPrompt(args);
|
|
140
|
+
break;
|
|
141
|
+
case "documentation-generator-prompt":
|
|
142
|
+
content = generateDocumentationGeneratorPrompt(args);
|
|
143
|
+
break;
|
|
144
|
+
default:
|
|
145
|
+
throw new Error(`Unknown prompt: ${name}`);
|
|
146
|
+
}
|
|
147
|
+
return {
|
|
148
|
+
messages: [
|
|
149
|
+
{
|
|
150
|
+
role: "user",
|
|
151
|
+
content: {
|
|
152
|
+
type: "text",
|
|
153
|
+
text: content,
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
],
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
function generateCodeAnalysisPrompt(args) {
|
|
160
|
+
const { codebase, focus_area = "general", language = "auto-detect", } = args;
|
|
161
|
+
return `# Code Analysis Request
|
|
162
|
+
|
|
163
|
+
## Context
|
|
164
|
+
You are an expert code reviewer analyzing ${language} code with a focus on ${focus_area} aspects.
|
|
165
|
+
|
|
166
|
+
## Code to Analyze
|
|
167
|
+
\`\`\`${language}
|
|
168
|
+
${codebase}
|
|
169
|
+
\`\`\`
|
|
170
|
+
|
|
171
|
+
## Analysis Requirements
|
|
172
|
+
1. **Code Quality Assessment**
|
|
173
|
+
- Readability and maintainability
|
|
174
|
+
- Code structure and organization
|
|
175
|
+
- Naming conventions and clarity
|
|
176
|
+
|
|
177
|
+
2. **${focus_area === "security" ? "Security Analysis" : focus_area === "performance" ? "Performance Analysis" : "Maintainability Analysis"}**
|
|
178
|
+
${focus_area === "security"
|
|
179
|
+
? "- Identify potential security vulnerabilities\n - Check for input validation issues\n - Review authentication and authorization\n - Analyze data exposure risks"
|
|
180
|
+
: focus_area === "performance"
|
|
181
|
+
? "- Identify performance bottlenecks\n - Analyze algorithm complexity\n - Review resource usage patterns\n - Suggest optimization opportunities"
|
|
182
|
+
: "- Assess code maintainability\n - Check for code duplication\n - Review module coupling\n - Analyze technical debt"}
|
|
183
|
+
|
|
184
|
+
3. **Best Practices Compliance**
|
|
185
|
+
- Language-specific best practices
|
|
186
|
+
- Design pattern usage
|
|
187
|
+
- Error handling implementation
|
|
188
|
+
|
|
189
|
+
## Output Format
|
|
190
|
+
- **Summary**: Brief overview of code quality
|
|
191
|
+
- **Issues Found**: List of specific issues with severity levels
|
|
192
|
+
- **Recommendations**: Actionable improvement suggestions
|
|
193
|
+
- **Code Examples**: Improved code snippets where applicable
|
|
194
|
+
|
|
195
|
+
## Scoring
|
|
196
|
+
Provide an overall score from 1-10 for:
|
|
197
|
+
- Code Quality
|
|
198
|
+
- ${focus_area ? focus_area.charAt(0).toUpperCase() + focus_area.slice(1) : "General"}
|
|
199
|
+
- Best Practices Adherence
|
|
200
|
+
`;
|
|
201
|
+
}
|
|
202
|
+
function generateHierarchicalTaskPrompt(args) {
|
|
203
|
+
const { task_description, complexity_level = "medium", target_audience = "intermediate", } = args;
|
|
204
|
+
return `# Hierarchical Task Breakdown
|
|
205
|
+
|
|
206
|
+
## Context
|
|
207
|
+
Breaking down a ${complexity_level} complexity task for ${target_audience} level audience.
|
|
208
|
+
|
|
209
|
+
## Primary Task
|
|
210
|
+
${task_description}
|
|
211
|
+
|
|
212
|
+
## Requirements
|
|
213
|
+
1. **Hierarchical Structure**
|
|
214
|
+
- Main objective clearly defined
|
|
215
|
+
- Sub-tasks logically organized
|
|
216
|
+
- Dependencies identified
|
|
217
|
+
|
|
218
|
+
2. **Task Granularity**
|
|
219
|
+
${complexity_level === "simple"
|
|
220
|
+
? "- Keep breakdown to 2-3 levels maximum\n - Focus on concrete, actionable steps\n - Minimize complexity"
|
|
221
|
+
: complexity_level === "complex"
|
|
222
|
+
? "- Use 4-5 hierarchical levels\n - Include detailed sub-tasks\n - Consider multiple approaches"
|
|
223
|
+
: "- Use 3-4 hierarchical levels\n - Balance detail with clarity\n - Include alternative paths"}
|
|
224
|
+
|
|
225
|
+
3. **Audience Considerations**
|
|
226
|
+
${target_audience === "beginner"
|
|
227
|
+
? "- Provide detailed explanations\n - Include background information\n - Define technical terms"
|
|
228
|
+
: target_audience === "expert"
|
|
229
|
+
? "- Focus on high-level strategy\n - Assume domain knowledge\n - Highlight critical decision points"
|
|
230
|
+
: "- Balance explanation with efficiency\n - Provide context where needed\n - Include relevant examples"}
|
|
231
|
+
|
|
232
|
+
## Output Structure
|
|
233
|
+
1. **Level 1: Primary Objective**
|
|
234
|
+
- Clear goal statement
|
|
235
|
+
- Success criteria
|
|
236
|
+
- Overall timeline estimate
|
|
237
|
+
|
|
238
|
+
2. **Level 2: Major Components**
|
|
239
|
+
- Key deliverables
|
|
240
|
+
- Resource requirements
|
|
241
|
+
- Risk assessment
|
|
242
|
+
|
|
243
|
+
3. **Level 3: Detailed Tasks**
|
|
244
|
+
- Specific actions
|
|
245
|
+
- Dependencies
|
|
246
|
+
- Time estimates
|
|
247
|
+
|
|
248
|
+
4. **Level 4: Implementation Steps** (if needed)
|
|
249
|
+
- Granular activities
|
|
250
|
+
- Technical details
|
|
251
|
+
- Quality checkpoints
|
|
252
|
+
|
|
253
|
+
## Additional Elements
|
|
254
|
+
- **Dependencies Map**: Visual representation of task relationships
|
|
255
|
+
- **Timeline**: Suggested scheduling with milestones
|
|
256
|
+
- **Resources**: Required tools, knowledge, or personnel
|
|
257
|
+
- **Risks**: Potential challenges and mitigation strategies
|
|
258
|
+
`;
|
|
259
|
+
}
|
|
260
|
+
function generateArchitectureDesignPrompt(args) {
|
|
261
|
+
const { system_requirements, scale = "medium", technology_stack = "flexible", } = args;
|
|
262
|
+
return `# System Architecture Design
|
|
263
|
+
|
|
264
|
+
## Context
|
|
265
|
+
Designing a ${scale}-scale system architecture with ${technology_stack} technology constraints.
|
|
266
|
+
|
|
267
|
+
## System Requirements
|
|
268
|
+
${system_requirements}
|
|
269
|
+
|
|
270
|
+
## Design Constraints
|
|
271
|
+
- **Scale**: ${scale} (affects infrastructure and technology choices)
|
|
272
|
+
- **Technology Stack**: ${technology_stack}
|
|
273
|
+
- **Architecture Type**: ${scale === "small"
|
|
274
|
+
? "Monolithic or Simple Microservices"
|
|
275
|
+
: scale === "large"
|
|
276
|
+
? "Distributed Microservices"
|
|
277
|
+
: "Modular Monolith or Microservices"}
|
|
278
|
+
|
|
279
|
+
## Architecture Analysis Requirements
|
|
280
|
+
|
|
281
|
+
1. **High-Level Architecture**
|
|
282
|
+
- System components and their responsibilities
|
|
283
|
+
- Data flow between components
|
|
284
|
+
- External dependencies and integrations
|
|
285
|
+
|
|
286
|
+
2. **Technology Recommendations**
|
|
287
|
+
${technology_stack === "flexible"
|
|
288
|
+
? "- Suggest appropriate technologies for each component\n - Consider modern best practices\n - Balance proven solutions with innovation"
|
|
289
|
+
: `- Work within ${technology_stack} constraints\n - Optimize for chosen technology stack\n - Identify any limitations or workarounds needed`}
|
|
290
|
+
|
|
291
|
+
3. **Scalability Considerations**
|
|
292
|
+
${scale === "small"
|
|
293
|
+
? "- Simple deployment and maintenance\n - Cost-effective solutions\n - Easy to understand and modify"
|
|
294
|
+
: scale === "large"
|
|
295
|
+
? "- Horizontal scaling capabilities\n - Load balancing strategies\n - Performance optimization\n - Fault tolerance and redundancy"
|
|
296
|
+
: "- Moderate scaling requirements\n - Growth potential\n - Balanced complexity"}
|
|
297
|
+
|
|
298
|
+
## Output Format
|
|
299
|
+
|
|
300
|
+
### 1. Architecture Overview
|
|
301
|
+
- System context diagram
|
|
302
|
+
- High-level component architecture
|
|
303
|
+
- Key architectural decisions and rationale
|
|
304
|
+
|
|
305
|
+
### 2. Component Design
|
|
306
|
+
- Detailed component specifications
|
|
307
|
+
- Interface definitions
|
|
308
|
+
- Data models and schemas
|
|
309
|
+
|
|
310
|
+
### 3. Infrastructure Design
|
|
311
|
+
- Deployment architecture
|
|
312
|
+
- Network topology
|
|
313
|
+
- Security considerations
|
|
314
|
+
|
|
315
|
+
### 4. Implementation Roadmap
|
|
316
|
+
- Development phases
|
|
317
|
+
- Technology setup requirements
|
|
318
|
+
- Testing and deployment strategies
|
|
319
|
+
|
|
320
|
+
### 5. Documentation Artifacts
|
|
321
|
+
- Architecture diagrams (Mermaid format)
|
|
322
|
+
- Technical specifications
|
|
323
|
+
- Deployment guides
|
|
324
|
+
|
|
325
|
+
## Quality Attributes
|
|
326
|
+
Address the following non-functional requirements:
|
|
327
|
+
- **Performance**: Response time and throughput targets
|
|
328
|
+
- **Reliability**: Availability and fault tolerance requirements
|
|
329
|
+
- **Security**: Authentication, authorization, and data protection
|
|
330
|
+
- **Maintainability**: Code organization and documentation standards
|
|
331
|
+
- **Scalability**: Growth and load handling capabilities
|
|
332
|
+
`;
|
|
333
|
+
}
|
|
334
|
+
function generateDebuggingAssistantPrompt(args) {
|
|
335
|
+
const { error_description, context = "", attempted_solutions = "none specified", } = args;
|
|
336
|
+
return `# Debugging Assistant
|
|
337
|
+
|
|
338
|
+
## Problem Description
|
|
339
|
+
${error_description}
|
|
340
|
+
|
|
341
|
+
## Additional Context
|
|
342
|
+
${context || "No additional context provided"}
|
|
343
|
+
|
|
344
|
+
## Previously Attempted Solutions
|
|
345
|
+
${attempted_solutions}
|
|
346
|
+
|
|
347
|
+
## Systematic Debugging Approach
|
|
348
|
+
|
|
349
|
+
### 1. Problem Analysis
|
|
350
|
+
- **Symptom Classification**: Categorize the type of error/issue
|
|
351
|
+
- **Impact Assessment**: Determine scope and severity
|
|
352
|
+
- **Environment Factors**: Consider system, version, and configuration details
|
|
353
|
+
|
|
354
|
+
### 2. Root Cause Investigation
|
|
355
|
+
- **Error Pattern Analysis**: Look for recurring patterns or triggers
|
|
356
|
+
- **Code Path Tracing**: Identify the execution flow leading to the issue
|
|
357
|
+
- **Dependency Review**: Check external dependencies and integrations
|
|
358
|
+
|
|
359
|
+
### 3. Hypothesis Formation
|
|
360
|
+
- **Primary Hypothesis**: Most likely cause based on evidence
|
|
361
|
+
- **Alternative Hypotheses**: Secondary potential causes
|
|
362
|
+
- **Testing Strategy**: How to validate each hypothesis
|
|
363
|
+
|
|
364
|
+
### 4. Solution Development
|
|
365
|
+
- **Immediate Fixes**: Quick solutions to resolve symptoms
|
|
366
|
+
- **Long-term Solutions**: Comprehensive fixes addressing root causes
|
|
367
|
+
- **Prevention Measures**: Steps to avoid similar issues in the future
|
|
368
|
+
|
|
369
|
+
## Debugging Checklist
|
|
370
|
+
|
|
371
|
+
### Information Gathering
|
|
372
|
+
- [ ] Complete error messages and stack traces
|
|
373
|
+
- [ ] Environment details (OS, versions, configurations)
|
|
374
|
+
- [ ] Steps to reproduce the issue
|
|
375
|
+
- [ ] Recent changes or updates
|
|
376
|
+
- [ ] System logs and monitoring data
|
|
377
|
+
|
|
378
|
+
### Analysis Steps
|
|
379
|
+
- [ ] Isolate the problem to specific components
|
|
380
|
+
- [ ] Verify input data and parameters
|
|
381
|
+
- [ ] Check for resource constraints (memory, disk, network)
|
|
382
|
+
- [ ] Review recent code changes
|
|
383
|
+
- [ ] Validate configuration settings
|
|
384
|
+
|
|
385
|
+
### Testing Approach
|
|
386
|
+
- [ ] Create minimal reproduction case
|
|
387
|
+
- [ ] Test in isolated environment
|
|
388
|
+
- [ ] Verify fix effectiveness
|
|
389
|
+
- [ ] Test edge cases and error conditions
|
|
390
|
+
- [ ] Validate no regression introduced
|
|
391
|
+
|
|
392
|
+
## Output Format
|
|
393
|
+
|
|
394
|
+
### 1. Problem Analysis Summary
|
|
395
|
+
- Issue classification and severity
|
|
396
|
+
- Likely root cause(s)
|
|
397
|
+
- Contributing factors
|
|
398
|
+
|
|
399
|
+
### 2. Recommended Solutions
|
|
400
|
+
- Step-by-step resolution instructions
|
|
401
|
+
- Alternative approaches if primary solution fails
|
|
402
|
+
- Required tools or resources
|
|
403
|
+
|
|
404
|
+
### 3. Verification Steps
|
|
405
|
+
- How to confirm the fix works
|
|
406
|
+
- Regression testing recommendations
|
|
407
|
+
- Monitoring suggestions
|
|
408
|
+
|
|
409
|
+
### 4. Prevention Strategy
|
|
410
|
+
- Code improvements to prevent recurrence
|
|
411
|
+
- Process improvements
|
|
412
|
+
- Documentation updates needed
|
|
413
|
+
|
|
414
|
+
## Follow-up Actions
|
|
415
|
+
- Code review recommendations
|
|
416
|
+
- Testing improvements
|
|
417
|
+
- Documentation updates
|
|
418
|
+
- Knowledge sharing with team
|
|
419
|
+
`;
|
|
420
|
+
}
|
|
421
|
+
function generateDocumentationGeneratorPrompt(args) {
|
|
422
|
+
const { content_type, target_audience = "general", existing_content = "", } = args;
|
|
423
|
+
return `# Documentation Generation Request
|
|
424
|
+
|
|
425
|
+
## Documentation Type
|
|
426
|
+
${content_type}
|
|
427
|
+
|
|
428
|
+
## Target Audience
|
|
429
|
+
${target_audience}
|
|
430
|
+
|
|
431
|
+
## Existing Content to Build Upon
|
|
432
|
+
${existing_content || "Starting from scratch"}
|
|
433
|
+
|
|
434
|
+
## Documentation Requirements
|
|
435
|
+
|
|
436
|
+
### 1. Content Structure
|
|
437
|
+
${content_type === "API"
|
|
438
|
+
? "- API Overview and purpose\n- Authentication methods\n- Endpoint documentation with examples\n- Error codes and handling\n- SDK and integration guides"
|
|
439
|
+
: content_type === "user guide"
|
|
440
|
+
? "- Getting started guide\n- Feature walkthrough with screenshots\n- Common use cases and tutorials\n- Troubleshooting section\n- FAQ"
|
|
441
|
+
: content_type === "technical spec"
|
|
442
|
+
? "- System overview and architecture\n- Technical requirements\n- Implementation details\n- Configuration options\n- Performance specifications"
|
|
443
|
+
: "- Clear introduction and purpose\n- Logical content organization\n- Practical examples\n- Reference materials"}
|
|
444
|
+
|
|
445
|
+
### 2. Audience Considerations
|
|
446
|
+
${target_audience === "developers"
|
|
447
|
+
? "- Technical depth and accuracy\n- Code examples and implementations\n- Integration patterns\n- Best practices and gotchas"
|
|
448
|
+
: target_audience === "end-users"
|
|
449
|
+
? "- Clear, jargon-free language\n- Step-by-step instructions\n- Visual aids and screenshots\n- Real-world scenarios"
|
|
450
|
+
: target_audience === "administrators"
|
|
451
|
+
? "- Configuration and setup procedures\n- Maintenance and monitoring guides\n- Security considerations\n- Troubleshooting procedures"
|
|
452
|
+
: "- Balanced technical depth\n- Clear explanations\n- Practical examples\n- Progressive complexity"}
|
|
453
|
+
|
|
454
|
+
### 3. Quality Standards
|
|
455
|
+
- **Clarity**: Information is easy to understand and follow
|
|
456
|
+
- **Completeness**: All necessary information is included
|
|
457
|
+
- **Accuracy**: Technical details are correct and up-to-date
|
|
458
|
+
- **Usability**: Documentation is easy to navigate and search
|
|
459
|
+
|
|
460
|
+
## Output Format
|
|
461
|
+
|
|
462
|
+
### Documentation Structure
|
|
463
|
+
1. **Introduction**
|
|
464
|
+
- Purpose and scope
|
|
465
|
+
- Audience and prerequisites
|
|
466
|
+
- Document organization
|
|
467
|
+
|
|
468
|
+
2. **Main Content**
|
|
469
|
+
${content_type === "API"
|
|
470
|
+
? "- Quick start guide\n - Detailed endpoint documentation\n - Authentication and authorization\n - Error handling\n - Examples and use cases"
|
|
471
|
+
: content_type === "user guide"
|
|
472
|
+
? "- Getting started\n - Core features and functionality\n - Advanced features\n - Troubleshooting\n - Tips and best practices"
|
|
473
|
+
: "- Core concepts\n - Detailed procedures\n - Configuration options\n - Advanced topics\n - Reference materials"}
|
|
474
|
+
|
|
475
|
+
3. **Supporting Materials**
|
|
476
|
+
- Glossary of terms
|
|
477
|
+
- Additional resources
|
|
478
|
+
- Contact information
|
|
479
|
+
- Version history
|
|
480
|
+
|
|
481
|
+
### Content Guidelines
|
|
482
|
+
- Use clear, concise language appropriate for ${target_audience}
|
|
483
|
+
- Include practical examples and code snippets where relevant
|
|
484
|
+
- Provide context and explain the "why" behind procedures
|
|
485
|
+
- Use consistent formatting and terminology
|
|
486
|
+
- Include cross-references and links to related sections
|
|
487
|
+
|
|
488
|
+
### Visual Elements
|
|
489
|
+
- Diagrams for complex concepts (Mermaid format preferred)
|
|
490
|
+
- Screenshots for user interfaces
|
|
491
|
+
- Code blocks with syntax highlighting
|
|
492
|
+
- Tables for reference information
|
|
493
|
+
- Callout boxes for important notes and warnings
|
|
494
|
+
|
|
495
|
+
## Quality Checklist
|
|
496
|
+
- [ ] Content is accurate and up-to-date
|
|
497
|
+
- [ ] Language is appropriate for target audience
|
|
498
|
+
- [ ] Examples are practical and tested
|
|
499
|
+
- [ ] Navigation and structure are logical
|
|
500
|
+
- [ ] All links and references work correctly
|
|
501
|
+
- [ ] Document meets accessibility standards
|
|
502
|
+
`;
|
|
503
|
+
}
|
|
504
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,GAAG;IACf;QACC,IAAI,EAAE,sBAAsB;QAC5B,WAAW,EAAE,wDAAwD;QACrE,SAAS,EAAE;YACV;gBACC,IAAI,EAAE,UAAU;gBAChB,WAAW,EAAE,yCAAyC;gBACtD,QAAQ,EAAE,IAAI;aACd;YACD;gBACC,IAAI,EAAE,YAAY;gBAClB,WAAW,EACV,oEAAoE;gBACrE,QAAQ,EAAE,KAAK;aACf;YACD;gBACC,IAAI,EAAE,UAAU;gBAChB,WAAW,EAAE,kCAAkC;gBAC/C,QAAQ,EAAE,KAAK;aACf;SACD;KACD;IACD;QACC,IAAI,EAAE,0BAA0B;QAChC,WAAW,EAAE,uDAAuD;QACpE,SAAS,EAAE;YACV;gBACC,IAAI,EAAE,kBAAkB;gBACxB,WAAW,EAAE,iCAAiC;gBAC9C,QAAQ,EAAE,IAAI;aACd;YACD;gBACC,IAAI,EAAE,kBAAkB;gBACxB,WAAW,EAAE,iDAAiD;gBAC9D,QAAQ,EAAE,KAAK;aACf;YACD;gBACC,IAAI,EAAE,iBAAiB;gBACvB,WAAW,EAAE,iCAAiC;gBAC9C,QAAQ,EAAE,KAAK;aACf;SACD;KACD;IACD;QACC,IAAI,EAAE,4BAA4B;QAClC,WAAW,EAAE,gDAAgD;QAC7D,SAAS,EAAE;YACV;gBACC,IAAI,EAAE,qBAAqB;gBAC3B,WAAW,EAAE,qCAAqC;gBAClD,QAAQ,EAAE,IAAI;aACd;YACD;gBACC,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,8CAA8C;gBAC3D,QAAQ,EAAE,KAAK;aACf;YACD;gBACC,IAAI,EAAE,kBAAkB;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;;;;EAM5C,YAAY,KAAK,KAAK;QACrB,CAAC,CAAC,wJAAwJ;QAC1J,CAAC,CAAC,YAAY,KAAK,YAAY;YAC9B,CAAC,CAAC,qIAAqI;YACvI,CAAC,CAAC,YAAY,KAAK,gBAAgB;gBAClC,CAAC,CAAC,+IAA+I;gBACjJ,CAAC,CAAC,+GACN;;;EAIC,eAAe,KAAK,YAAY;QAC/B,CAAC,CAAC,2HAA2H;QAC7H,CAAC,CAAC,eAAe,KAAK,WAAW;YAChC,CAAC,CAAC,mHAAmH;YACrH,CAAC,CAAC,eAAe,KAAK,gBAAgB;gBACrC,CAAC,CAAC,oIAAoI;gBACtI,CAAC,CAAC,kGACN;;;;;;;;;;;;;;;;;KAkBG,YAAY,KAAK,KAAK;QACrB,CAAC,CAAC,oJAAoJ;QACtJ,CAAC,CAAC,YAAY,KAAK,YAAY;YAC9B,CAAC,CAAC,qIAAqI;YACvI,CAAC,CAAC,uHACL;;;;;;;;;gDAS8C,eAAe;;;;;;;;;;;;;;;;;;;;CAoB9D,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare function listResources(): Promise<{
|
|
2
|
+
uri: string;
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
mimeType: string;
|
|
6
|
+
}[]>;
|
|
7
|
+
export declare function getResource(uri: string): Promise<{
|
|
8
|
+
contents: {
|
|
9
|
+
uri: string;
|
|
10
|
+
mimeType: string;
|
|
11
|
+
text: string;
|
|
12
|
+
}[];
|
|
13
|
+
}>;
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAqFA,wBAAsB,aAAa;;;;;KAElC;AAED,wBAAsB,WAAW,CAAC,GAAG,EAAE,MAAM;;;;;;GAoB5C"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { renderStructuredToMarkdown, structuredResources, } from "./structured.js";
|
|
2
|
+
const resources = [
|
|
3
|
+
{
|
|
4
|
+
uri: "guidelines://core-development-principles",
|
|
5
|
+
name: "Core Development Principles (Extended)",
|
|
6
|
+
description: "Authoritative links for prompts, sprints, hygiene, Mermaid, memory caching, and model comparisons",
|
|
7
|
+
mimeType: "text/markdown",
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
uri: "guidelines://core-principles",
|
|
11
|
+
name: "Core AI Agent Development Principles",
|
|
12
|
+
description: "Fundamental principles for AI agent development including structured guidelines, timeframes, and best practices",
|
|
13
|
+
mimeType: "text/markdown",
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
uri: "guidelines://prompt-templates",
|
|
17
|
+
name: "Hierarchical Prompt Templates",
|
|
18
|
+
description: "Reusable prompt patterns and templates for various AI agent tasks",
|
|
19
|
+
mimeType: "text/markdown",
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
uri: "guidelines://development-checklists",
|
|
23
|
+
name: "Development Checklists",
|
|
24
|
+
description: "Comprehensive checklists for AI agent development workflows",
|
|
25
|
+
mimeType: "text/markdown",
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
uri: "guidelines://model-selection",
|
|
29
|
+
name: "AI Model Selection Guide",
|
|
30
|
+
description: "Guidelines for selecting appropriate AI models based on task requirements",
|
|
31
|
+
mimeType: "text/markdown",
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
uri: "guidelines://architecture-patterns",
|
|
35
|
+
name: "AI Agent Architecture Patterns",
|
|
36
|
+
description: "Common architectural patterns and best practices for AI agent systems",
|
|
37
|
+
mimeType: "text/markdown",
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
uri: "guidelines://rapid-model-evolution",
|
|
41
|
+
name: "Rapid Model Evolution (Qualitative)",
|
|
42
|
+
description: "Guidance for handling fast-changing model landscapes with adapters, flags, and periodic evals",
|
|
43
|
+
mimeType: "text/markdown",
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
uri: "guidelines://external-references",
|
|
47
|
+
name: "External References (2025)",
|
|
48
|
+
description: "Selected URLs for grounding; fetch live details at runtime and verify specifics",
|
|
49
|
+
mimeType: "text/markdown",
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
uri: "guidelines://mcp-ts-insights",
|
|
53
|
+
name: "MCP TypeScript SDK: Resource & Tool Patterns (Concise)",
|
|
54
|
+
description: "Practical patterns for static/dynamic resources, resource_link usage, and client basics",
|
|
55
|
+
mimeType: "text/markdown",
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
uri: "guidelines://knowledge-base",
|
|
59
|
+
name: "Internal Knowledge Base (Summarized)",
|
|
60
|
+
description: "Offline summaries distilled from public sources for efficient prompting (no external URLs)",
|
|
61
|
+
mimeType: "text/markdown",
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
uri: "guidelines://mcp-advanced-functions",
|
|
65
|
+
name: "MCP Advanced Functions: Resources, Completions, and Notifications",
|
|
66
|
+
description: "Lifecycle management (enable/disable/remove), listChanged notifications, argument completions, and resource_link usage",
|
|
67
|
+
mimeType: "text/markdown",
|
|
68
|
+
},
|
|
69
|
+
];
|
|
70
|
+
export async function listResources() {
|
|
71
|
+
return resources;
|
|
72
|
+
}
|
|
73
|
+
export async function getResource(uri) {
|
|
74
|
+
const resource = resources.find((r) => r.uri === uri);
|
|
75
|
+
if (!resource)
|
|
76
|
+
throw new Error(`Resource not found: ${uri}`);
|
|
77
|
+
// Map guidelines://<id> to structuredResources id
|
|
78
|
+
const id = uri.replace("guidelines://", "");
|
|
79
|
+
const sr = structuredResources.find((r) => r.id === id);
|
|
80
|
+
if (!sr)
|
|
81
|
+
throw new Error(`Unknown resource: ${uri}`);
|
|
82
|
+
const markdown = renderStructuredToMarkdown(sr);
|
|
83
|
+
const json = JSON.stringify(sr, null, 2);
|
|
84
|
+
return {
|
|
85
|
+
contents: [
|
|
86
|
+
{ uri, mimeType: resource.mimeType, text: markdown },
|
|
87
|
+
{ uri: `${uri}#structured`, mimeType: "application/json", text: json },
|
|
88
|
+
],
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
// Long markdown bodies migrated to structured resources to reduce token load
|
|
92
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AACA,OAAO,EACN,0BAA0B,EAC1B,mBAAmB,GACnB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,SAAS,GAAG;IACjB;QACC,GAAG,EAAE,0CAA0C;QAC/C,IAAI,EAAE,wCAAwC;QAC9C,WAAW,EACV,mGAAmG;QACpG,QAAQ,EAAE,eAAe;KACzB;IACD;QACC,GAAG,EAAE,8BAA8B;QACnC,IAAI,EAAE,sCAAsC;QAC5C,WAAW,EACV,iHAAiH;QAClH,QAAQ,EAAE,eAAe;KACzB;IACD;QACC,GAAG,EAAE,+BAA+B;QACpC,IAAI,EAAE,+BAA+B;QACrC,WAAW,EACV,mEAAmE;QACpE,QAAQ,EAAE,eAAe;KACzB;IACD;QACC,GAAG,EAAE,qCAAqC;QAC1C,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,6DAA6D;QAC1E,QAAQ,EAAE,eAAe;KACzB;IACD;QACC,GAAG,EAAE,8BAA8B;QACnC,IAAI,EAAE,0BAA0B;QAChC,WAAW,EACV,2EAA2E;QAC5E,QAAQ,EAAE,eAAe;KACzB;IACD;QACC,GAAG,EAAE,oCAAoC;QACzC,IAAI,EAAE,gCAAgC;QACtC,WAAW,EACV,uEAAuE;QACxE,QAAQ,EAAE,eAAe;KACzB;IACD;QACC,GAAG,EAAE,oCAAoC;QACzC,IAAI,EAAE,qCAAqC;QAC3C,WAAW,EACV,+FAA+F;QAChG,QAAQ,EAAE,eAAe;KACzB;IACD;QACC,GAAG,EAAE,kCAAkC;QACvC,IAAI,EAAE,4BAA4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