| Dimension | Shared | Only in A | Only in B | Overlap |
|---|---|---|---|---|
| Sections | 1 | 14 | 2 | 6% |
| Commands | 0 | 2 | 0 | 0% |
| Section tags | 0 | 3 | 0 | 0% |
What each file covers
Sections
1 shared · 14 only in A · 2 only in B- − Copilot instructions
- − General recommendations for working with Aspire
- − Running the application
- − Checking resources
- − Listing integrations
- − Debugging issues
- − Other Aspire MCP tools
- − Playwright MCP server
- − Updating the app host
- − Persistent containers
- − Aspire workload
- − Official documentation
- − BMAD AI 工作流
- − 与 CodeSpirit 规范集成
- + 实体类 (Entity)
- + DTO 类
- 获取帮助
Commands
0 shared · 2 only in A · 0 only in B- − dotnet tool install --global dotnet-outdated-tool
- − dotnet-outdated
Section tags
0 shared · 3 only in A · 0 only in B- − code-style
- − agent-behaviour
- − docs
Line diff
xin-lai/CodeSpirit · AGENTS.md
@@ −1 @@
1# Copilot instructions
2
3This repository is set up to use Aspire. Aspire is an orchestrator for the entire application and will take care of configuring dependencies, building, and running the application. The resources that make up the application are defined in `apphost.cs` including application code and external dependencies.
4
5## General recommendations for working with Aspire
61. Before making any changes always run the apphost using `aspire run` and inspect the state of resources to make sure you are building from a known state.
71. Changes to the _apphost.cs_ file will require a restart of the application to take effect.
82. Make changes incrementally and run the aspire application using the `aspire run` command to validate changes.
93. Use the Aspire MCP tools to check the status of resources and debug issues.
10
11## Running the application
12To run the application run the following command:
13
14```
15aspire run
16```
17
18If there is already an instance of the application running it will prompt to stop the existing instance. You only need to restart the application if code in `apphost.cs` is changed, but if you experience problems it can be useful to reset everything to the starting state.
19
20## Checking resources
21To check the status of resources defined in the app model use the _list resources_ tool. This will show you the current state of each resource and if there are any issues. If a resource is not running as expected you can use the _execute resource command_ tool to restart it or perform other actions.
22
23## Listing integrations
24IMPORTANT! When a user asks you to add a resource to the app model you should first use the _list integrations_ tool to get a list of the current versions of all the available integrations. You should try to use the version of the integration which aligns with the version of the Aspire.AppHost.Sdk. Some integration versions may have a preview suffix. Once you have identified the correct integration you should always use the _get integration docs_ tool to fetch the latest documentation for the integration and follow the links to get additional guidance.
25
26## Debugging issues
27IMPORTANT! Aspire is designed to capture rich logs and telemetry for all resources defined in the app model. Use the following diagnostic tools when debugging issues with the application before making changes to make sure you are focusing on the right things.
28
291. _list structured logs_; use this tool to get details about structured logs.
302. _list console logs_; use this tool to get details about console logs.
313. _list traces_; use this tool to get details about traces.
324. _list trace structured logs_; use this tool to get logs related to a trace
33
34## Other Aspire MCP tools
35
361. _select apphost_; use this tool if working with multiple app hosts within a workspace.
372. _list apphosts_; use this tool to get details about active app hosts.
38
39## Playwright MCP server
40
41The playwright MCP server has also been configured in this repository and you should use it to perform functional investigations of the resources defined in the app model as you work on the codebase. To get endpoints that can be used for navigation using the playwright MCP server use the list resources tool.
42
43## Updating the app host
44The user may request that you update the Aspire apphost. You can do this using the `aspire update` command. This will update the apphost to the latest version and some of the Aspire specific packages in referenced projects, however you may need to manually update other packages in the solution to ensure compatibility. You can consider using the `dotnet-outdated` with the users consent. To install the `dotnet-outdated` tool use the following command:
45
46```
47dotnet tool install --global dotnet-outdated-tool
48```
49
50## Persistent containers
51IMPORTANT! Consider avoiding persistent containers early during development to avoid creating state management issues when restarting the app.
52
53## Aspire workload
54IMPORTANT! The aspire workload is obsolete. You should never attempt to install or use the Aspire workload.
55
56## Official documentation
57IMPORTANT! Always prefer official documentation when available. The following sites contain the official documentation for Aspire and related components
58
591. https://aspire.dev
602. https://learn.microsoft.com/dotnet/aspire
613. https://nuget.org (for specific integration package details)
62
63## BMAD AI 工作流
64
65本项目已集成 BMAD (Breakthrough Method of Agile AI-Driven Development) 完整工作流,用于结构化的软件开发生命周期管理。
66
67### 快速开始
68
691. **小型任务/Bug 修复** (Quick Flow):
70 - `/quick-spec` - 创建技术规范
71 - `/quick-dev` - 实现变更
72 - `/code-review` - 代码审查
73
742. **完整功能开发** (Full Flow):
75 - `/product-brief` - 产品需求简报
76 - `/create-prd` - 创建 PRD
77 - `/create-architecture` - 架构设计
78 - `/create-epics-and-stories` - 拆分为 Epic 和 Story
79 - `/sprint-planning` - Sprint 规划
80 - `/dev-story` - 实现 Story
81 - `/code-review` - 代码审查
82 - `/retrospective` - 复盘
83
84### 与 CodeSpirit 规范集成
85
86BMAD 工作流已配置为自动遵循 CodeSpirit 的所有开发规范(位于 `.cursor/rules/`)。在使用 BMAD 时:
87
88- PRD 会自动考虑多租户、多数据库、AI 功能等项目特性
89- 架构设计会遵循依赖注入、缓存策略等规范
90- Story 实现会应用正确的命名约定、DTO 设计、控制器规范等
91- 代码审查会执行 CodeSpirit 特定的审查清单
92
93### 获取帮助
94
95任何时候,输入 `/bmad-help` 可获取上下文相关的指导。
96
97详细使用指南请参考:
98- **[BMAD 使用教程](Docs/bmad/bmad-tutorial.md)** - 完整的综合教程(推荐新手阅读)
99- [BMAD 工作流指南](Docs/bmad/bmad-workflow-guide.md) - 详细的工作流使用指南
100- [BMAD 团队培训指南](Docs/bmad/bmad-team-guide.md) - 团队培训材料
101- [BMAD 集成技能](.cursor/skills/bmad-integration/SKILL.md) - BMAD 与 CodeSpirit 集成
102- [项目上下文文档](project-context.md) - 项目上下文和规范引用
xin-lai/CodeSpirit · .cursor/rules/naming-conventions.mdc
@@ +1 @@
1---
2description: CodeSpirit 命名约定规范 - 实体、DTO、服务、控制器等命名规则
3globs: *.cs
4alwaysApply: false
5---
6
7# 实体类 (Entity)
8- 命名格式:`{EntityName}` (如 `User`, `Question`)
9- 继承:`AuditableEntityBase<TKey>` 或 `EntityBase<TKey>`
10- 多租户:需租户隔离的实体必须实现 `IMultiTenant` 接口
11
12# DTO 类
13- **创建**: `Create{EntityName}Dto` (如 `CreateUserDto`)
14- **更新**: `Update{EntityName}Dto` (如 `UpdateUserDto`)
15- **查询**: `{EntityName}Dto` 或 `{EntityName}QueryDto`
16- **列表项**: `{EntityName}ListItemDto`
17- **批量导入**: `{EntityName}BatchImportItemDto`
18
19# 服务类
20- **业务服务**: `{EntityName}Service` (如 `UserService`)
21- **接口**: `I{EntityName}Service`
22- **查询服务**: `{EntityName}QueryService`
23- **基础 CRUD**: 继承 `BaseCRUDService<TEntity, TKey, TCreateDto, TUpdateDto, TQueryDto>`
24- **生命周期标记**: 实现 `IScopedDependency` / `ITransientDependency` / `ISingletonDependency`
25
26示例:
27```csharp
28public interface IUserService : IBaseCRUDService<User, long, CreateUserDto, UpdateUserDto, UserQueryDto>
29{
30}
31
32public class UserService : BaseCRUDService<User, long, CreateUserDto, UpdateUserDto, UserQueryDto>,
33 IUserService, IScopedDependency
34{
35}
36```
37
38# 控制器
39- 命名:`{EntityName}Controller` (如 `UsersController`),使用复数形式
40- 路由:`[Route("/[service]/api/[controller]")]` 或具体路由如 `[Route("/exam/api/Questions")]`
41- 继承:项目中的 `ApiControllerBase`
42
43# 配置类
44- API配置:`{ApiName}Configuration` (如 `ExamApiConfiguration`)
45- 实体配置:`{EntityName}Configuration` (如 `UserConfiguration`)
46- 位置:`Configuration` 文件夹
47
48# 资源文件
49- **共享资源**: `SharedResources`, `SharedResources.resx`
50- **显示资源**: `DisplayResources`, `Display.resx`
51- **验证资源**: `ValidationResources`, `Validation.resx`
52- **服务特定**: `{Service}DisplayResources`, `{Service}Display.resx`
53- **多语言**: `*.en.resx` (英文), `*.zh-CN.resx` (中文)
54
55# 常量
56- 类名:`{Module}Constants` (如 `AuthConstants`)
57- 字段:全大写,下划线分隔 (如 `MAX_LOGIN_ATTEMPTS`)
58
59# 事件
60- 命名:`{EntityName}{Action}Event` (如 `UserCreatedEvent`, `OrderCancelledEvent`)
61- 租户感知:继承 `TenantAwareEventBase`
62
@@ −1 +1 @@
1−# Copilot instructions
1+---
2+description: CodeSpirit 命名约定规范 - 实体、DTO、服务、控制器等命名规则
3+globs: *.cs
4+alwaysApply: false
5+---
26
3−This repository is set up to use Aspire. Aspire is an orchestrator for the entire application and will take care of configuring dependencies, building, and running the application. The resources that make up the application are defined in `apphost.cs` including application code and external dependencies.
7+# 实体类 (Entity)
8+- 命名格式:`{EntityName}` (如 `User`, `Question`)
9+- 继承:`AuditableEntityBase<TKey>` 或 `EntityBase<TKey>`
10+- 多租户:需租户隔离的实体必须实现 `IMultiTenant` 接口
411
5−## General recommendations for working with Aspire
6−1. Before making any changes always run the apphost using `aspire run` and inspect the state of resources to make sure you are building from a known state.
7−1. Changes to the _apphost.cs_ file will require a restart of the application to take effect.
8−2. Make changes incrementally and run the aspire application using the `aspire run` command to validate changes.
9−3. Use the Aspire MCP tools to check the status of resources and debug issues.
12+# DTO 类
13+- **创建**: `Create{EntityName}Dto` (如 `CreateUserDto`)
14+- **更新**: `Update{EntityName}Dto` (如 `UpdateUserDto`)
15+- **查询**: `{EntityName}Dto` 或 `{EntityName}QueryDto`
16+- **列表项**: `{EntityName}ListItemDto`
17+- **批量导入**: `{EntityName}BatchImportItemDto`
1018
11−## Running the application
12−To run the application run the following command:
19+# 服务类
20+- **业务服务**: `{EntityName}Service` (如 `UserService`)
21+- **接口**: `I{EntityName}Service`
22+- **查询服务**: `{EntityName}QueryService`
23+- **基础 CRUD**: 继承 `BaseCRUDService<TEntity, TKey, TCreateDto, TUpdateDto, TQueryDto>`
24+- **生命周期标记**: 实现 `IScopedDependency` / `ITransientDependency` / `ISingletonDependency`
1325
14−```
15−aspire run
16−```
26+示例:
27+```csharp
28+public interface IUserService : IBaseCRUDService<User, long, CreateUserDto, UpdateUserDto, UserQueryDto>
29+{
30+}
1731
18−If there is already an instance of the application running it will prompt to stop the existing instance. You only need to restart the application if code in `apphost.cs` is changed, but if you experience problems it can be useful to reset everything to the starting state.
19−
20−## Checking resources
21−To check the status of resources defined in the app model use the _list resources_ tool. This will show you the current state of each resource and if there are any issues. If a resource is not running as expected you can use the _execute resource command_ tool to restart it or perform other actions.
22−
23−## Listing integrations
24−IMPORTANT! When a user asks you to add a resource to the app model you should first use the _list integrations_ tool to get a list of the current versions of all the available integrations. You should try to use the version of the integration which aligns with the version of the Aspire.AppHost.Sdk. Some integration versions may have a preview suffix. Once you have identified the correct integration you should always use the _get integration docs_ tool to fetch the latest documentation for the integration and follow the links to get additional guidance.
25−
26−## Debugging issues
27−IMPORTANT! Aspire is designed to capture rich logs and telemetry for all resources defined in the app model. Use the following diagnostic tools when debugging issues with the application before making changes to make sure you are focusing on the right things.
28−
29−1. _list structured logs_; use this tool to get details about structured logs.
30−2. _list console logs_; use this tool to get details about console logs.
31−3. _list traces_; use this tool to get details about traces.
32−4. _list trace structured logs_; use this tool to get logs related to a trace
33−
34−## Other Aspire MCP tools
35−
36−1. _select apphost_; use this tool if working with multiple app hosts within a workspace.
37−2. _list apphosts_; use this tool to get details about active app hosts.
38−
39−## Playwright MCP server
40−
41−The playwright MCP server has also been configured in this repository and you should use it to perform functional investigations of the resources defined in the app model as you work on the codebase. To get endpoints that can be used for navigation using the playwright MCP server use the list resources tool.
42−
43−## Updating the app host
44−The user may request that you update the Aspire apphost. You can do this using the `aspire update` command. This will update the apphost to the latest version and some of the Aspire specific packages in referenced projects, however you may need to manually update other packages in the solution to ensure compatibility. You can consider using the `dotnet-outdated` with the users consent. To install the `dotnet-outdated` tool use the following command:
45−
32+public class UserService : BaseCRUDService<User, long, CreateUserDto, UpdateUserDto, UserQueryDto>,
33+ IUserService, IScopedDependency
34+{
35+}
4636 ```
47−dotnet tool install --global dotnet-outdated-tool
48−```
4937
50−## Persistent containers
51−IMPORTANT! Consider avoiding persistent containers early during development to avoid creating state management issues when restarting the app.
38+# 控制器
39+- 命名:`{EntityName}Controller` (如 `UsersController`),使用复数形式
40+- 路由:`[Route("/[service]/api/[controller]")]` 或具体路由如 `[Route("/exam/api/Questions")]`
41+- 继承:项目中的 `ApiControllerBase`
5242
53−## Aspire workload
54−IMPORTANT! The aspire workload is obsolete. You should never attempt to install or use the Aspire workload.
43+# 配置类
44+- API配置:`{ApiName}Configuration` (如 `ExamApiConfiguration`)
45+- 实体配置:`{EntityName}Configuration` (如 `UserConfiguration`)
46+- 位置:`Configuration` 文件夹
5547
56−## Official documentation
57−IMPORTANT! Always prefer official documentation when available. The following sites contain the official documentation for Aspire and related components
48+# 资源文件
49+- **共享资源**: `SharedResources`, `SharedResources.resx`
50+- **显示资源**: `DisplayResources`, `Display.resx`
51+- **验证资源**: `ValidationResources`, `Validation.resx`
52+- **服务特定**: `{Service}DisplayResources`, `{Service}Display.resx`
53+- **多语言**: `*.en.resx` (英文), `*.zh-CN.resx` (中文)
5854
59−1. https://aspire.dev
60−2. https://learn.microsoft.com/dotnet/aspire
61−3. https://nuget.org (for specific integration package details)
55+# 常量
56+- 类名:`{Module}Constants` (如 `AuthConstants`)
57+- 字段:全大写,下划线分隔 (如 `MAX_LOGIN_ATTEMPTS`)
6258
63−## BMAD AI 工作流
59+# 事件
60+- 命名:`{EntityName}{Action}Event` (如 `UserCreatedEvent`, `OrderCancelledEvent`)
61+- 租户感知:继承 `TenantAwareEventBase`
6462
65−本项目已集成 BMAD (Breakthrough Method of Agile AI-Driven Development) 完整工作流,用于结构化的软件开发生命周期管理。
66−
67−### 快速开始
68−
69−1. **小型任务/Bug 修复** (Quick Flow):
70− - `/quick-spec` - 创建技术规范
71− - `/quick-dev` - 实现变更
72− - `/code-review` - 代码审查
73−
74−2. **完整功能开发** (Full Flow):
75− - `/product-brief` - 产品需求简报
76− - `/create-prd` - 创建 PRD
77− - `/create-architecture` - 架构设计
78− - `/create-epics-and-stories` - 拆分为 Epic 和 Story
79− - `/sprint-planning` - Sprint 规划
80− - `/dev-story` - 实现 Story
81− - `/code-review` - 代码审查
82− - `/retrospective` - 复盘
83−
84−### 与 CodeSpirit 规范集成
85−
86−BMAD 工作流已配置为自动遵循 CodeSpirit 的所有开发规范(位于 `.cursor/rules/`)。在使用 BMAD 时:
87−
88−- PRD 会自动考虑多租户、多数据库、AI 功能等项目特性
89−- 架构设计会遵循依赖注入、缓存策略等规范
90−- Story 实现会应用正确的命名约定、DTO 设计、控制器规范等
91−- 代码审查会执行 CodeSpirit 特定的审查清单
92−
93−### 获取帮助
94−
95−任何时候,输入 `/bmad-help` 可获取上下文相关的指导。
96−
97−详细使用指南请参考:
98−- **[BMAD 使用教程](Docs/bmad/bmad-tutorial.md)** - 完整的综合教程(推荐新手阅读)
99−- [BMAD 工作流指南](Docs/bmad/bmad-workflow-guide.md) - 详细的工作流使用指南
100−- [BMAD 团队培训指南](Docs/bmad/bmad-team-guide.md) - 团队培训材料
101−- [BMAD 集成技能](.cursor/skills/bmad-integration/SKILL.md) - BMAD 与 CodeSpirit 集成
102−- [项目上下文文档](project-context.md) - 项目上下文和规范引用
