project-customization-mcp 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 +373 -0
- package/build/index.d.ts +1 -0
- package/build/index.js +29 -0
- package/build/index.js.map +1 -0
- package/build/prompts.d.ts +30 -0
- package/build/prompts.js +98 -0
- package/build/prompts.js.map +1 -0
- package/build/resources.d.ts +47 -0
- package/build/resources.js +173 -0
- package/build/resources.js.map +1 -0
- package/build/server.d.ts +12 -0
- package/build/server.js +288 -0
- package/build/server.js.map +1 -0
- package/build/tools.d.ts +23 -0
- package/build/tools.js +133 -0
- package/build/tools.js.map +1 -0
- package/build/types.d.ts +62 -0
- package/build/types.js +5 -0
- package/build/types.js.map +1 -0
- package/build/utils/bestPractices.d.ts +16 -0
- package/build/utils/bestPractices.js +230 -0
- package/build/utils/bestPractices.js.map +1 -0
- package/build/utils/fileHandler.d.ts +46 -0
- package/build/utils/fileHandler.js +144 -0
- package/build/utils/fileHandler.js.map +1 -0
- package/build/utils/logger.d.ts +20 -0
- package/build/utils/logger.js +42 -0
- package/build/utils/logger.js.map +1 -0
- package/build/utils/projectScanner.d.ts +26 -0
- package/build/utils/projectScanner.js +182 -0
- package/build/utils/projectScanner.js.map +1 -0
- package/build/utils/validator.d.ts +115 -0
- package/build/utils/validator.js +120 -0
- package/build/utils/validator.js.map +1 -0
- package/package.json +50 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
# Project Customization MCP
|
|
2
|
+
|
|
3
|
+
An MCP (Model Context Protocol) server that automates project customization by analyzing your codebase and generating configuration files based on industry best practices.
|
|
4
|
+
|
|
5
|
+
**Platform-agnostic**: Works with any IDE, editor, or AI tool that supports the Model Context Protocol (VS Code, JetBrains, Cursor, Claude, etc.)
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
### 🔍 Intelligent Project Analysis
|
|
10
|
+
|
|
11
|
+
- **Auto-detect project type**: Node.js, Python, .NET, and more
|
|
12
|
+
- **Framework recognition**: React, Vue, Next.js, Angular, FastAPI, Django, etc.
|
|
13
|
+
- **Language detection**: TypeScript, JavaScript, Python, C#, Go, Ruby, Java, etc.
|
|
14
|
+
- **Structure scanning**: Analyzes file organization and project layout
|
|
15
|
+
- **Gap detection**: Identifies missing customization files
|
|
16
|
+
|
|
17
|
+
### 📝 Automated File Generation
|
|
18
|
+
|
|
19
|
+
- **Customization instructions** - Creates project-specific guidelines
|
|
20
|
+
- **README updates** - Generates comprehensive documentation
|
|
21
|
+
- **Best practices** - Applies industry standards to your project
|
|
22
|
+
- **Recommendations** - Suggests improvements for your codebase
|
|
23
|
+
|
|
24
|
+
### 🎯 Tools
|
|
25
|
+
|
|
26
|
+
- `analyze_project` - Scan project and detect frameworks/languages
|
|
27
|
+
- `generate_copilot_instructions` - Create customization files
|
|
28
|
+
- `update_readme` - Generate or enhance README
|
|
29
|
+
- `get_customization_recommendations` - Get actionable suggestions
|
|
30
|
+
|
|
31
|
+
### 📚 Resources
|
|
32
|
+
|
|
33
|
+
- **Project Metadata** - Project type, frameworks, languages
|
|
34
|
+
- **Project Structure** - Directory organization and file tree
|
|
35
|
+
- **Current Guidelines** - Existing customization files
|
|
36
|
+
- **README** - Current documentation
|
|
37
|
+
|
|
38
|
+
### 💬 Prompt Templates
|
|
39
|
+
|
|
40
|
+
- **analyze-and-customize** - Full workflow (analyze → generate → update)
|
|
41
|
+
- **generate-instructions-only** - Create just the instruction file
|
|
42
|
+
- **review-and-improve** - Review existing customizations
|
|
43
|
+
|
|
44
|
+
## Installation
|
|
45
|
+
|
|
46
|
+
### Option 1: Using npx (Recommended - No Installation Needed)
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"mcpServers": {
|
|
51
|
+
"project-customization": {
|
|
52
|
+
"command": "npx",
|
|
53
|
+
"args": ["-y", "project-customization-mcp"]
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Option 2: Global npm Installation
|
|
60
|
+
|
|
61
|
+
```powershell
|
|
62
|
+
npm install -g project-customization-mcp
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Then configure:
|
|
66
|
+
|
|
67
|
+
```json
|
|
68
|
+
{
|
|
69
|
+
"mcpServers": {
|
|
70
|
+
"project-customization": {
|
|
71
|
+
"command": "project-customization-mcp"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Option 3: Local Installation
|
|
78
|
+
|
|
79
|
+
```powershell
|
|
80
|
+
npm install project-customization-mcp
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Configure with relative path:
|
|
84
|
+
|
|
85
|
+
```json
|
|
86
|
+
{
|
|
87
|
+
"mcpServers": {
|
|
88
|
+
"project-customization": {
|
|
89
|
+
"command": "node",
|
|
90
|
+
"args": ["./node_modules/project-customization-mcp/build/index.js"]
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Configuration
|
|
97
|
+
|
|
98
|
+
### VS Code / Cursor / Other IDE
|
|
99
|
+
|
|
100
|
+
1. Open MCP configuration (varies by IDE):
|
|
101
|
+
- VS Code: `Ctrl+Shift+P` → "MCP: Open User Configuration"
|
|
102
|
+
- Or edit manually in settings
|
|
103
|
+
|
|
104
|
+
2. Add server config (use Option 1, 2, or 3 above)
|
|
105
|
+
|
|
106
|
+
3. Restart IDE or reload window
|
|
107
|
+
|
|
108
|
+
### Claude / Other Clients
|
|
109
|
+
|
|
110
|
+
Refer to your client's MCP configuration documentation and add the server using one of the installation options above.
|
|
111
|
+
|
|
112
|
+
## Usage
|
|
113
|
+
|
|
114
|
+
### Quick Start: Free-form Chat
|
|
115
|
+
|
|
116
|
+
Open your IDE's chat and type:
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
Analyze my project and set up customization based on best practices
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
The server will:
|
|
123
|
+
|
|
124
|
+
1. ✅ Analyze your project structure
|
|
125
|
+
2. ✅ Detect frameworks and languages
|
|
126
|
+
3. ✅ Generate `.github/copilot-instructions.md` (if missing)
|
|
127
|
+
4. ✅ Update README with guidelines
|
|
128
|
+
5. ✅ Provide improvement recommendations
|
|
129
|
+
|
|
130
|
+
### Using Prompts (Slash Commands)
|
|
131
|
+
|
|
132
|
+
If your client supports prompt templates:
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
/project-customization.analyze-and-customize
|
|
136
|
+
/project-customization.generate-instructions-only
|
|
137
|
+
/project-customization.review-and-improve
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Add Resources to Context
|
|
141
|
+
|
|
142
|
+
Add project context to your chat:
|
|
143
|
+
|
|
144
|
+
- "Add Context" or similar option
|
|
145
|
+
- Select "MCP Resources"
|
|
146
|
+
- Choose: Project Metadata, Project Structure, Guidelines, README
|
|
147
|
+
|
|
148
|
+
### Manual Tool Invocation
|
|
149
|
+
|
|
150
|
+
Ask your AI to use specific tools:
|
|
151
|
+
|
|
152
|
+
- "Use the analyze_project tool on my project"
|
|
153
|
+
- "Generate customization instructions for my React app"
|
|
154
|
+
- "Update my README with coding guidelines"
|
|
155
|
+
|
|
156
|
+
## How It Works
|
|
157
|
+
|
|
158
|
+
```
|
|
159
|
+
Your Code
|
|
160
|
+
↓
|
|
161
|
+
analyze_project (scans structure, detects type/frameworks)
|
|
162
|
+
↓
|
|
163
|
+
Project Analysis (type, frameworks, languages, issues)
|
|
164
|
+
↓
|
|
165
|
+
generate_copilot_instructions (creates customization file)
|
|
166
|
+
↓
|
|
167
|
+
update_readme (adds guidelines and setup instructions)
|
|
168
|
+
↓
|
|
169
|
+
get_customization_recommendations (suggests improvements)
|
|
170
|
+
↓
|
|
171
|
+
Generated Files + Recommendations
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
## Example: React TypeScript Project
|
|
175
|
+
|
|
176
|
+
### Input
|
|
177
|
+
|
|
178
|
+
```
|
|
179
|
+
"Analyze my React TypeScript project and set up customization"
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Generated Files
|
|
183
|
+
|
|
184
|
+
**`.github/copilot-instructions.md`:**
|
|
185
|
+
|
|
186
|
+
```markdown
|
|
187
|
+
# Project Guidelines
|
|
188
|
+
|
|
189
|
+
## Overview
|
|
190
|
+
|
|
191
|
+
- **Type**: Node.js
|
|
192
|
+
- **Framework**: React
|
|
193
|
+
- **Language**: TypeScript
|
|
194
|
+
|
|
195
|
+
## Code Style
|
|
196
|
+
|
|
197
|
+
- Use functional components with hooks
|
|
198
|
+
- Maintain strict TypeScript (no `any`)
|
|
199
|
+
- ESLint + Prettier for formatting
|
|
200
|
+
- camelCase for variables/functions, PascalCase for components
|
|
201
|
+
|
|
202
|
+
## Structure
|
|
203
|
+
|
|
204
|
+
- src/components - React components
|
|
205
|
+
- src/pages - Page components
|
|
206
|
+
- src/utils - Utilities
|
|
207
|
+
- src/hooks - Custom hooks
|
|
208
|
+
- src/types - TypeScript types
|
|
209
|
+
|
|
210
|
+
[... more guidelines ...]
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
**`README.md`** (updated with):
|
|
214
|
+
|
|
215
|
+
- Project description
|
|
216
|
+
- Prerequisites and setup
|
|
217
|
+
- Installation commands
|
|
218
|
+
- Development guidelines
|
|
219
|
+
- Best practices for the framework
|
|
220
|
+
|
|
221
|
+
### Recommendations Provided
|
|
222
|
+
|
|
223
|
+
- "Enable strict TypeScript mode"
|
|
224
|
+
- "Add unit testing framework"
|
|
225
|
+
- "Configure git hooks for commits"
|
|
226
|
+
- "Set up CI/CD pipeline"
|
|
227
|
+
|
|
228
|
+
## Customization
|
|
229
|
+
|
|
230
|
+
The server comes with sensible defaults for common frameworks. To customize for your team:
|
|
231
|
+
|
|
232
|
+
1. Fork/clone the repository
|
|
233
|
+
2. Edit `src/utils/bestPractices.ts`:
|
|
234
|
+
- Modify `generateCopilotInstructions()` for your standards
|
|
235
|
+
- Adjust `generateReadmeContent()` for your format
|
|
236
|
+
- Customize `generateRecommendations()` for your priorities
|
|
237
|
+
|
|
238
|
+
3. Build: `npm run build`
|
|
239
|
+
4. Publish: `npm publish` (or use locally with path)
|
|
240
|
+
|
|
241
|
+
## Supported Project Types
|
|
242
|
+
|
|
243
|
+
| Type | Status |
|
|
244
|
+
| ------------- | ------------------ |
|
|
245
|
+
| Node.js / npm | ✅ Full Support |
|
|
246
|
+
| TypeScript | ✅ Full Support |
|
|
247
|
+
| React | ✅ Full Support |
|
|
248
|
+
| Vue.js | ✅ Full Support |
|
|
249
|
+
| Next.js | ✅ Full Support |
|
|
250
|
+
| Python | ✅ Full Support |
|
|
251
|
+
| .NET | ✅ Full Support |
|
|
252
|
+
| Other | ✅ Generic Support |
|
|
253
|
+
|
|
254
|
+
## Architecture
|
|
255
|
+
|
|
256
|
+
```
|
|
257
|
+
src/
|
|
258
|
+
├── index.ts # Server startup
|
|
259
|
+
├── server.ts # MCP setup & registration
|
|
260
|
+
├── tools.ts # Tool implementations
|
|
261
|
+
├── resources.ts # Resource providers
|
|
262
|
+
├── prompts.ts # Prompt templates
|
|
263
|
+
├── types.ts # TypeScript types
|
|
264
|
+
└── utils/
|
|
265
|
+
├── fileHandler.ts # File I/O
|
|
266
|
+
├── projectScanner.ts # Project analysis
|
|
267
|
+
├── bestPractices.ts # Customization templates
|
|
268
|
+
├── validator.ts # Input validation
|
|
269
|
+
└── logger.ts # Logging
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
## Development
|
|
273
|
+
|
|
274
|
+
### Prerequisites
|
|
275
|
+
|
|
276
|
+
- Node.js 16+
|
|
277
|
+
- npm or yarn
|
|
278
|
+
|
|
279
|
+
### Setup
|
|
280
|
+
|
|
281
|
+
```powershell
|
|
282
|
+
git clone https://github.com/yourusername/project-customization-mcp.git
|
|
283
|
+
cd project-customization-mcp
|
|
284
|
+
npm install
|
|
285
|
+
npm run build
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
### Development Mode
|
|
289
|
+
|
|
290
|
+
```powershell
|
|
291
|
+
npm run dev
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
### Build for Production
|
|
295
|
+
|
|
296
|
+
```powershell
|
|
297
|
+
npm run build
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
## Contributing
|
|
301
|
+
|
|
302
|
+
Contributions welcome! Areas for enhancement:
|
|
303
|
+
|
|
304
|
+
- [ ] Support for more languages/frameworks
|
|
305
|
+
- [ ] Custom organization templates
|
|
306
|
+
- [ ] Integration with CI/CD systems
|
|
307
|
+
- [ ] Linting and formatting configuration generation
|
|
308
|
+
- [ ] Test setup automation
|
|
309
|
+
- [ ] Documentation generators
|
|
310
|
+
|
|
311
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
312
|
+
|
|
313
|
+
## Troubleshooting
|
|
314
|
+
|
|
315
|
+
### Server not connecting
|
|
316
|
+
|
|
317
|
+
1. Check MCP configuration syntax
|
|
318
|
+
2. Verify command path is correct
|
|
319
|
+
3. Ensure `build/index.js` exists (run `npm run build`)
|
|
320
|
+
4. Check IDE logs for errors
|
|
321
|
+
|
|
322
|
+
### Tools not appearing
|
|
323
|
+
|
|
324
|
+
1. Reload IDE window
|
|
325
|
+
2. Restart IDE completely
|
|
326
|
+
3. Verify MCP server is running (check IDE status)
|
|
327
|
+
4. Check server logs for errors
|
|
328
|
+
|
|
329
|
+
### File permissions
|
|
330
|
+
|
|
331
|
+
- Ensure write access to project directory
|
|
332
|
+
- Check that `.github/` directory can be created
|
|
333
|
+
|
|
334
|
+
## FAQ
|
|
335
|
+
|
|
336
|
+
**Q: Will this modify my existing files?**
|
|
337
|
+
A: By default, it creates new files or updates README by appending. Existing instructions are backed up.
|
|
338
|
+
|
|
339
|
+
**Q: What if my project is not detected correctly?**
|
|
340
|
+
A: Check for standard configuration files (package.json, pyproject.toml, etc.). You can also provide hints through chat context.
|
|
341
|
+
|
|
342
|
+
**Q: Can I use this for multiple projects?**
|
|
343
|
+
A: Yes! Configure once and use with any project. It auto-detects project type.
|
|
344
|
+
|
|
345
|
+
**Q: Is this IDE-specific?**
|
|
346
|
+
A: No! It's a standard MCP server. Works with any MCP-compatible client.
|
|
347
|
+
|
|
348
|
+
**Q: Can I customize the guidelines?**
|
|
349
|
+
A: Yes! Fork the repo and edit `bestPractices.ts` for your organization's standards.
|
|
350
|
+
|
|
351
|
+
## License
|
|
352
|
+
|
|
353
|
+
MIT License - See [LICENSE](LICENSE) file
|
|
354
|
+
|
|
355
|
+
## Support
|
|
356
|
+
|
|
357
|
+
- 📖 [GitHub Wiki](https://github.com/yourusername/project-customization-mcp/wiki)
|
|
358
|
+
- 🐛 [Report Issues](https://github.com/yourusername/project-customization-mcp/issues)
|
|
359
|
+
- 💬 [Discussions](https://github.com/yourusername/project-customization-mcp/discussions)
|
|
360
|
+
|
|
361
|
+
## Roadmap
|
|
362
|
+
|
|
363
|
+
- [ ] Web-based configuration UI
|
|
364
|
+
- [ ] Organization-specific templates library
|
|
365
|
+
- [ ] Linter/formatter configuration generation
|
|
366
|
+
- [ ] Test framework setup automation
|
|
367
|
+
- [ ] Git hooks generation (Husky, etc.)
|
|
368
|
+
- [ ] Pre-commit configuration
|
|
369
|
+
- [ ] EditorConfig generation
|
|
370
|
+
|
|
371
|
+
---
|
|
372
|
+
|
|
373
|
+
**Made for the Model Context Protocol** | Works with any MCP-compatible client
|
package/build/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/build/index.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
2
|
+
import { setupMcpServer } from './server.js';
|
|
3
|
+
import { logger } from './utils/logger.js';
|
|
4
|
+
/**
|
|
5
|
+
* Main entry point for the MCP server
|
|
6
|
+
* Sets up stdio transport and starts the server
|
|
7
|
+
*/
|
|
8
|
+
async function main() {
|
|
9
|
+
try {
|
|
10
|
+
logger.info('Starting VS Code Customization MCP Server...');
|
|
11
|
+
// Initialize server with tools, resources, and prompts
|
|
12
|
+
const server = setupMcpServer();
|
|
13
|
+
// Set up stdio transport for local communication with VS Code
|
|
14
|
+
const transport = new StdioServerTransport();
|
|
15
|
+
// Connect server to transport
|
|
16
|
+
await server.connect(transport);
|
|
17
|
+
logger.info('MCP Server is running and ready to accept connections');
|
|
18
|
+
}
|
|
19
|
+
catch (error) {
|
|
20
|
+
logger.error('Fatal error starting MCP server', error);
|
|
21
|
+
process.exit(1);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
// Start the server
|
|
25
|
+
main().catch((error) => {
|
|
26
|
+
console.error('Unhandled error:', error);
|
|
27
|
+
process.exit(1);
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C;;;GAGG;AACH,KAAK,UAAU,IAAI;IACjB,IAAI,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,8CAA8C,CAAC,CAAC;QAE5D,uDAAuD;QACvD,MAAM,MAAM,GAAG,cAAc,EAAE,CAAC;QAEhC,8DAA8D;QAC9D,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;QAE7C,8BAA8B;QAC9B,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAEhC,MAAM,CAAC,IAAI,CAAC,uDAAuD,CAAC,CAAC;IACvE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,CAAC,KAAK,CAAC,iCAAiC,EAAE,KAAK,CAAC,CAAC;QACvD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,mBAAmB;AACnB,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC;IACzC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prompt templates for MCP server
|
|
3
|
+
* Pre-built prompts to guide the customization workflow
|
|
4
|
+
*/
|
|
5
|
+
export interface PromptTemplate {
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
arguments?: PromptArgument[];
|
|
9
|
+
}
|
|
10
|
+
export interface PromptArgument {
|
|
11
|
+
name: string;
|
|
12
|
+
description: string;
|
|
13
|
+
required?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Available prompt templates
|
|
17
|
+
*/
|
|
18
|
+
export declare const PROMPT_TEMPLATES: PromptTemplate[];
|
|
19
|
+
/**
|
|
20
|
+
* Get prompt content by name
|
|
21
|
+
*/
|
|
22
|
+
export declare function getPromptContent(promptName: string): string;
|
|
23
|
+
/**
|
|
24
|
+
* Get all prompt templates
|
|
25
|
+
*/
|
|
26
|
+
export declare function getAllPrompts(): PromptTemplate[];
|
|
27
|
+
/**
|
|
28
|
+
* Validate prompt name
|
|
29
|
+
*/
|
|
30
|
+
export declare function isValidPromptName(name: string): boolean;
|
package/build/prompts.js
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prompt templates for MCP server
|
|
3
|
+
* Pre-built prompts to guide the customization workflow
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Available prompt templates
|
|
7
|
+
*/
|
|
8
|
+
export const PROMPT_TEMPLATES = [
|
|
9
|
+
{
|
|
10
|
+
name: 'analyze-and-customize',
|
|
11
|
+
description: 'Comprehensive prompt to analyze a VS Code project and set up customization files (instructions, README, guidelines)',
|
|
12
|
+
arguments: [
|
|
13
|
+
{
|
|
14
|
+
name: 'projectPath',
|
|
15
|
+
description: 'Path to the project to analyze and customize',
|
|
16
|
+
required: false,
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: 'generate-instructions-only',
|
|
22
|
+
description: 'Generate only the Copilot custom instructions file based on project analysis',
|
|
23
|
+
arguments: [
|
|
24
|
+
{
|
|
25
|
+
name: 'projectPath',
|
|
26
|
+
description: 'Path to the project',
|
|
27
|
+
required: false,
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: 'review-and-improve',
|
|
33
|
+
description: 'Review existing project customizations and suggest improvements',
|
|
34
|
+
arguments: [
|
|
35
|
+
{
|
|
36
|
+
name: 'projectPath',
|
|
37
|
+
description: 'Path to the project',
|
|
38
|
+
required: false,
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
];
|
|
43
|
+
/**
|
|
44
|
+
* Get prompt content by name
|
|
45
|
+
*/
|
|
46
|
+
export function getPromptContent(promptName) {
|
|
47
|
+
switch (promptName) {
|
|
48
|
+
case 'analyze-and-customize':
|
|
49
|
+
return `You are a VS Code customization expert. Your task is to analyze the provided project and help customize it for optimal Copilot experience.
|
|
50
|
+
|
|
51
|
+
Use the following tools in sequence:
|
|
52
|
+
1. First, analyze the project using the \`analyze_project\` tool to understand its structure, type, and current customization status
|
|
53
|
+
2. Review the analysis results to identify gaps and opportunities
|
|
54
|
+
3. Generate Copilot custom instructions using the \`generate_copilot_instructions\` tool
|
|
55
|
+
4. Update or create a README with guidelines using the \`update_readme\` tool
|
|
56
|
+
5. Explain what was done and provide recommendations for further improvements
|
|
57
|
+
|
|
58
|
+
The goal is to establish a solid foundation of project customization that will improve developer experience when using Copilot.`;
|
|
59
|
+
case 'generate-instructions-only':
|
|
60
|
+
return `You are a VS Code customization expert focused on Copilot instructions.
|
|
61
|
+
|
|
62
|
+
Your task:
|
|
63
|
+
1. Analyze the project using the \`analyze_project\` tool
|
|
64
|
+
2. Generate appropriate Copilot custom instructions using the \`generate_copilot_instructions\` tool
|
|
65
|
+
3. Provide a summary of what instructions were created and why they're important for this project
|
|
66
|
+
|
|
67
|
+
Focus on creating clear, actionable guidelines that reflect the project's technology stack and best practices.`;
|
|
68
|
+
case 'review-and-improve':
|
|
69
|
+
return `You are a code quality and customization expert.
|
|
70
|
+
|
|
71
|
+
Your task:
|
|
72
|
+
1. Analyze the project using the \`analyze_project\` tool
|
|
73
|
+
2. Get customization recommendations using the \`get_customization_recommendations\` tool
|
|
74
|
+
3. Review existing customization files (README, instructions) by reading the project resources
|
|
75
|
+
4. Provide detailed recommendations for:
|
|
76
|
+
- What customization improvements are needed
|
|
77
|
+
- How to enhance existing guidelines
|
|
78
|
+
- Best practices that aren't yet documented
|
|
79
|
+
- Potential issues or gaps in the current setup
|
|
80
|
+
|
|
81
|
+
Be constructive and provide actionable advice.`;
|
|
82
|
+
default:
|
|
83
|
+
return `Unknown prompt: ${promptName}`;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Get all prompt templates
|
|
88
|
+
*/
|
|
89
|
+
export function getAllPrompts() {
|
|
90
|
+
return PROMPT_TEMPLATES;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Validate prompt name
|
|
94
|
+
*/
|
|
95
|
+
export function isValidPromptName(name) {
|
|
96
|
+
return PROMPT_TEMPLATES.some((p) => p.name === name);
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=prompts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAcH;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAqB;IAChD;QACE,IAAI,EAAE,uBAAuB;QAC7B,WAAW,EACT,qHAAqH;QACvH,SAAS,EAAE;YACT;gBACE,IAAI,EAAE,aAAa;gBACnB,WAAW,EAAE,8CAA8C;gBAC3D,QAAQ,EAAE,KAAK;aAChB;SACF;KACF;IACD;QACE,IAAI,EAAE,4BAA4B;QAClC,WAAW,EAAE,8EAA8E;QAC3F,SAAS,EAAE;YACT;gBACE,IAAI,EAAE,aAAa;gBACnB,WAAW,EAAE,qBAAqB;gBAClC,QAAQ,EAAE,KAAK;aAChB;SACF;KACF;IACD;QACE,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EAAE,iEAAiE;QAC9E,SAAS,EAAE;YACT;gBACE,IAAI,EAAE,aAAa;gBACnB,WAAW,EAAE,qBAAqB;gBAClC,QAAQ,EAAE,KAAK;aAChB;SACF;KACF;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,UAAkB;IACjD,QAAQ,UAAU,EAAE,CAAC;QACnB,KAAK,uBAAuB;YAC1B,OAAO;;;;;;;;;gIASmH,CAAC;QAE7H,KAAK,4BAA4B;YAC/B,OAAO;;;;;;;+GAOkG,CAAC;QAE5G,KAAK,oBAAoB;YACvB,OAAO;;;;;;;;;;;;+CAYkC,CAAC;QAE5C;YACE,OAAO,mBAAmB,UAAU,EAAE,CAAC;IAC3C,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAC5C,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resource providers for MCP server
|
|
3
|
+
* Exposes project data as resources that Copilot can access
|
|
4
|
+
*/
|
|
5
|
+
export interface Resource {
|
|
6
|
+
uri: string;
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
mimeType: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class ResourceProviders {
|
|
12
|
+
/**
|
|
13
|
+
* Get project metadata resource
|
|
14
|
+
*/
|
|
15
|
+
static getProjectMetadataResource(projectPath?: string): Promise<Resource & {
|
|
16
|
+
content: string;
|
|
17
|
+
}>;
|
|
18
|
+
/**
|
|
19
|
+
* Get project structure resource
|
|
20
|
+
*/
|
|
21
|
+
static getProjectStructureResource(projectPath?: string): Promise<Resource & {
|
|
22
|
+
content: string;
|
|
23
|
+
}>;
|
|
24
|
+
/**
|
|
25
|
+
* Get current customization guidelines resource
|
|
26
|
+
*/
|
|
27
|
+
static getGuidelinesResource(projectPath?: string): Promise<Resource & {
|
|
28
|
+
content: string;
|
|
29
|
+
}>;
|
|
30
|
+
/**
|
|
31
|
+
* Get README resource
|
|
32
|
+
*/
|
|
33
|
+
static getReadmeResource(projectPath?: string): Promise<Resource & {
|
|
34
|
+
content: string;
|
|
35
|
+
}>;
|
|
36
|
+
/**
|
|
37
|
+
* List all available resources
|
|
38
|
+
*/
|
|
39
|
+
static listResources(): Promise<Resource[]>;
|
|
40
|
+
/**
|
|
41
|
+
* Get resource by URI
|
|
42
|
+
*/
|
|
43
|
+
static getResource(uri: string, projectPath?: string): Promise<{
|
|
44
|
+
content: string;
|
|
45
|
+
mimeType: string;
|
|
46
|
+
}>;
|
|
47
|
+
}
|