|
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 | | -- **Bit.BlazorUI**: Primary UI component library |
9 | | - |
10 | | -## Coding Conventions & Best Practices |
11 | | - |
12 | | -1. **Follow the established project structure**: Adhere to the defined layout for consistency. |
13 | | -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. |
14 | | -3. **Embrace Nullable Reference Types**: All new code must be nullable-aware, as nullability is enabled project-wide. |
15 | | -4. **Leverage Dependency Injection**: Register and resolve services using the built-in DI container. |
16 | | -5. **Implement Structured Logging**: Use structured logging for clear, queryable application logs. |
17 | | -6. **Use Async Programming**: Employ `async/await` for I/O-bound operations to prevent blocking threads. |
18 | | -7. **Modern C#**: Write modern, concise, and efficient code by using the latest C# language features, including implicit usings and global using statements. |
19 | | -8. **Prefer razor.cs code-behind files**: Use `.razor.cs` files for component logic instead of @code blocks in `.razor` files. |
20 | | -9. **Prefer razor.css files**: Use `.razor.css` files for component styles instead of inline styles in `.razor` files. |
21 | | -10. **After applying changes, make sure project builds successfully**: Always verify that the project builds without errors after making changes. |
22 | | - |
23 | | -## Rules |
24 | | - |
25 | | -**RULE 1:** If a task (question, code modification or review) involves the use of bit BlazorUI components (e.g., `BitButton`, `BitTooltip`, `BitTextField`), |
26 | | -or refers to `bitplatform`, `bit Bswup`, `bit Butil`, `bit Besql`, or `bit Boilerplate`, or involves UI components without explicitly specifying their UI toolkit, |
27 | | -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. |
28 | | - |
29 | | -**End of RULE 1** |
30 | | - |
31 | | -**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, |
32 | | -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. |
33 | | - |
34 | | -**End of RULE 2** |
35 | | - |
36 | | -**RULE 3:** You **MUST** use the read-website-fast's `fetch` mcp tools, to gather information from URLs provided by the user. |
37 | | - |
38 | | -**End of RULE 3** |
| 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 | +- **Bit.BlazorUI**: Primary UI component library |
| 9 | + |
| 10 | +## Coding Conventions & Best Practices |
| 11 | + |
| 12 | +1. **Follow the established project structure**: Adhere to the defined layout for consistency. |
| 13 | +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. |
| 14 | +3. **Embrace Nullable Reference Types**: All new code must be nullable-aware, as nullability is enabled project-wide. |
| 15 | +4. **Leverage Dependency Injection**: Register and resolve services using the built-in DI container. |
| 16 | +5. **Implement Structured Logging**: Use structured logging for clear, queryable application logs. |
| 17 | +6. **Use Async Programming**: Employ `async/await` for I/O-bound operations to prevent blocking threads. |
| 18 | +7. **Modern C#**: Write modern, concise, and efficient code by using the latest C# language features, including implicit usings and global using statements. |
| 19 | +8. **Prefer razor.cs code-behind files**: Use `.razor.cs` files for component logic instead of @code blocks in `.razor` files. |
| 20 | +9. **Prefer razor.css files**: Use `.razor.css` files for component styles instead of inline styles in `.razor` files. |
| 21 | +10. **After applying changes, make sure project builds successfully**: Always verify that the project builds without errors after making changes. |
| 22 | + |
| 23 | +## Rules |
| 24 | + |
| 25 | +**RULE 1:** If a task (question, code modification or review) involves the use of bit BlazorUI components (e.g., `BitButton`, `BitTooltip`, `BitTextField`), |
| 26 | +or refers to `bitplatform`, `bit Bswup`, `bit Butil`, `bit Besql`, or `bit Boilerplate`, or involves UI components without explicitly specifying their UI toolkit, |
| 27 | +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. |
| 28 | + |
| 29 | +**End of RULE 1** |
| 30 | + |
| 31 | +**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, |
| 32 | +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. |
| 33 | + |
| 34 | +**End of RULE 2** |
| 35 | + |
| 36 | +**RULE 3:** You **MUST** use the read-website-fast's `fetch` mcp tools, to gather information from URLs provided by the user. |
| 37 | + |
| 38 | +**End of RULE 3** |
0 commit comments