Skip to content

Commit 486341a

Browse files
authored
feat(infra): add github copilot instructions to repository #11130 (#11131)
1 parent 1f48257 commit 486341a

File tree

5 files changed

+96
-1
lines changed

5 files changed

+96
-1
lines changed

.github/copilot-instructions.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# GitHub Copilot Instructions
2+
3+
## Key Technologies
4+
5+
- **C# 13.0**
6+
- **ASP.NET Core 9.0**
7+
- **Blazor**: Component-based web UI framework
8+
- **.NET MAUI Blazor Hybrid**: Cross-platform app development
9+
- **ASP.NET Core Identity**: Authentication and authorization
10+
- **Entity Framework Core**: Data access
11+
- **SignalR**: Real-time communication
12+
- **Hangfire**: Background job processing
13+
- **OData**: Advanced querying capabilities
14+
- **Bit.BlazorUI**: Primary UI component library
15+
- **Microsoft.Extensions.AI**: AI integration
16+
- **TypeScript**: Type-safe JavaScript development
17+
- **SCSS**: Advanced CSS preprocessing
18+
19+
## Coding Conventions & Best Practices
20+
21+
1. **Follow the established project structure**: Adhere to the defined layout for consistency.
22+
2. **Use Bit.BlazorUI Components**: Prioritize using components from the Bit.BlazorUI library over generic HTML to ensure UI consistency and leverage built-in features.
23+
3. **Embrace Nullable Reference Types**: All new code must be nullable-aware, as nullability is enabled project-wide.
24+
4. **Leverage Dependency Injection**: Register and resolve services using the built-in DI container.
25+
5. **Implement Structured Logging**: Use structured logging for clear, queryable application logs.
26+
6. **Adhere to Security Best Practices**: Implement robust authentication and authorization patterns.
27+
7. **Use Async Programming**: Employ `async/await` for I/O-bound operations to prevent blocking threads.
28+
8. **Modern C#**: Write modern, concise, and efficient code by using the latest C# language features, including implicit usings and global using statements.
29+
10. **Respect .editorconfig**: Adhere to the `.editorconfig` file for consistent code style across all IDEs.
30+
11. **Prefer razor.cs code-behind files**: Use `.razor.cs` files for component logic instead of @code blocks in `.razor` files.
31+
12. **Prefer razor.scss files**: Use `.razor.scss` files for component styles instead of inline styles in `.razor` files.
32+
13. **After applying changes, make sure project builds successfully**: Always verify that the project builds without errors after making changes.
33+
34+
### Rules for Using MCP
35+
36+
**RULE 1:** If a task (question, code modification or review) involves the use of bit BlazorUI components (e.g., `BitButton`, `BitTooltip`, `BitTextField`),
37+
or refers to `bitplatform`, `bit Bswup`, `bit Butil`, `bit Besql`, or `bit Boilerplate`, or involves UI components without explicitly specifying their UI toolkit,
38+
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.
39+
40+
**End of RULE 1**
41+
42+
**RULE 2 Command:**
43+
Use Playwright MCP tools like browser_navigate for URLs, browser_click for interactions, and browser_snapshot for page analysis.
44+
45+
**End of RULE 2**

.vscode/extensions.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"recommendations": [
3+
"GitHub.copilot",
4+
"glenn2223.live-sass",
5+
"GitHub.copilot-chat",
6+
"ms-dotnettools.csharp",
7+
"ms-dotnettools.csdevkit",
8+
"ms-dotnettools.dotnet-maui",
9+
"ms-azuretools.vscode-docker",
10+
"DominicVonk.vscode-resx-editor",
11+
"ms-vscode-remote.remote-containers",
12+
"ms-dotnettools.blazorwasm-companion",
13+
"ms-dotnettools.vscode-dotnet-runtime"
14+
]
15+
}

.vscode/mcp.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"servers": {
3+
"DeepWiki": {
4+
"type": "sse",
5+
"url": "https://mcp.deepwiki.com/mcp"
6+
},
7+
"microsoft.docs.mcp": {
8+
"type": "http",
9+
"url": "https://learn.microsoft.com/api/mcp"
10+
},
11+
"github": {
12+
"type": "http",
13+
"url": "https://api.githubcopilot.com/mcp/"
14+
},
15+
"playwright": {
16+
"type": "stdio",
17+
"command": "npx",
18+
"args": [
19+
"@playwright/mcp@latest"
20+
]
21+
}
22+
}
23+
}

.vscode/settings.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"liveSassCompile.settings.watchOnLaunch": true,
3+
"github.copilot.chat.codesearch.enabled": true,
4+
"csharp.preview.improvedLaunchExperience": true,
5+
"explorer.fileNesting.enabled": true,
6+
"explorer.fileNesting.patterns": {
7+
"*.resx": "$(capture).*.resx",
8+
"*.razor": "$(capture).*.razor, $(capture).razor.cs, $(capture).razor.scss",
9+
"*.scss": "$(capture).*.scss, $(capture).css, $(capture).css.map",
10+
"*.json": "$(capture).*.json, $(capture).*.json"
11+
}
12+
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
### Rules for Using MCP
3535

36-
**RULE 1:** If a task (question or code modification) involves the use of bit BlazorUI components (e.g., `BitButton`, `BitTooltip`, `BitTextField`),
36+
**RULE 1:** If a task (question, code modification or review) involves the use of bit BlazorUI components (e.g., `BitButton`, `BitTooltip`, `BitTextField`),
3737
or refers to `bitplatform`, `bit Bswup`, `bit Butil`, `bit Besql`, or `bit Boilerplate`, or involves UI components without explicitly specifying their UI toolkit,
3838
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.
3939

0 commit comments

Comments
 (0)