Skip to content

Commit 0d89b7d

Browse files
committed
improve copilot
1 parent 743eedc commit 0d89b7d

File tree

3 files changed

+29
-9
lines changed

3 files changed

+29
-9
lines changed

src/Templates/Boilerplate/Bit.Boilerplate/.github/copilot-instructions.md

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,18 @@
1616
- **TypeScript**: Type-safe JavaScript development
1717
- **SCSS**: Advanced CSS preprocessing
1818

19+
## Project Structure
20+
- **Server.Api**: Controllers, Mappers, DbContext, Migrations, Components for email templates, action filters, models, SignalR, server's appsettings.json
21+
- **Server.Web**: App.razor and other files to server Blazor Server and pre-rendering.
22+
- **Server.Shared (Also knows as Aspire's ServiceDefaults)**: Common codes shared between Server.Api and Server.Web.
23+
- **Server.AppHost**: Aspire's appsettings and Program.cs
24+
- **Shared**: Dtos, Enums, custom exceptions, shared services, resx files.
25+
- **Tests**: UI and integration tests.
26+
- **Client.Core**: Components, Pages, Layout, Client services, app.ts (TypeScript), app.scss (SCSS), and appsettings.json for the client.
27+
- **Client.Web**: Blazor WebAssembly standalone project.
28+
- **Client.Maui**: .NET MAUI based Blazor Hybrid project.
29+
- **Client.Windows**: Windows forms based Blazor Hybrid project.
30+
1931
## Coding Conventions & Best Practices
2032

2133
1. **Follow the established project structure**: Adhere to the defined layout for consistency.
@@ -31,20 +43,24 @@
3143
12. **Prefer razor.scss files**: Use `.razor.scss` files for component styles instead of inline styles in `.razor` files.
3244
13. **After applying changes, make sure project builds successfully**: Always verify that the project builds without errors after making changes.
3345

34-
### Rules for Using MCP
46+
## Rules
3547

3648
**RULE 1:** If a task (question, code modification or review) involves the use of bit BlazorUI components (e.g., `BitButton`, `BitTooltip`, `BitTextField`),
3749
or refers to `bitplatform`, `bit Bswup`, `bit Butil`, `bit Besql`, or `bit Boilerplate`, or involves UI components without explicitly specifying their UI toolkit,
3850
you **MUST** use the deepwiki's `ask_question` mcp tool to find the correct implementation and usage patterns of `bitfoundation/bitplatform` deep wiki before writing or changing any code.
3951

4052
**End of RULE 1**
4153

42-
**RULE 2:** If a task (question, code modification, or review) involves Microsoft technologies such as C#, F#, ASP.NET Core, Microsoft.Extensions, NuGet, Entity Framework, Blazor or the `dotnet` runtime,
54+
**RULE 3:** If a task (question, code modification, or review) involves Microsoft technologies such as C#, F#, ASP.NET Core, Microsoft.Extensions, NuGet, Entity Framework, Blazor or the `dotnet` runtime,
4355
you **MUST** use the `microsoft.docs.mcp` server to search Microsoft's latest official documentation for detailed and up-to-date information before responding to specific or narrowly defined questions.
4456

45-
**End of RULE 2**
57+
**End of RULE 3**
58+
59+
**RULE 4:** You **MUST** use the read-website-fast's `fetch` mcp tools, to gather information from URLs provided by the user.
60+
61+
**End of RULE 4**
4662

47-
**RULE 3 Command:**
48-
Use Playwright MCP tools like browser_navigate for URLs, browser_click for interactions, and browser_snapshot for page analysis.
63+
**RULE 5:** If the user request is "resume" or "continue" or "try again", check the previous conversation history to see what the next incomplete step in the todo list is. Continue from that step,
64+
and do not hand back control to the user until the entire todo list is complete and all items are checked off. Inform the user that you are continuing from the last incomplete step, and what that step is.
4965

50-
**End of RULE 3**
66+
**End of RULE 5**

src/Templates/Boilerplate/Bit.Boilerplate/.vscode/mcp.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,14 @@
1414
"url": "https://api.githubcopilot.com/mcp/"
1515
},
1616
//#endif
17-
"playwright": {
17+
"read-website-fast": {
1818
"type": "stdio",
19-
"command": "npx",
19+
"command": "docker",
2020
"args": [
21-
"@playwright/mcp@latest"
21+
"run",
22+
"-i",
23+
"--rm",
24+
"mcp/fetch"
2225
]
2326
}
2427
}

src/Templates/Boilerplate/Bit.Boilerplate/.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"liveSassCompile.settings.watchOnLaunch": true,
33
"dotnet.defaultSolution": "Boilerplate.Web.slnf",
44
"dotnet.unitTests.runSettingsPath": "src/Tests/.runsettings",
5+
"chat.tools.autoApprove": true,
56
"github.copilot.chat.codesearch.enabled": true,
67
"csharp.preview.improvedLaunchExperience": true,
78
"explorer.fileNesting.enabled": true,

0 commit comments

Comments
 (0)