| Dimension | Shared | Only in A | Only in B | Overlap |
|---|---|---|---|---|
| Sections | 1 | 14 | 6 | 5% |
| Commands | 0 | 2 | 0 | 0% |
| Section tags | 0 | 3 | 1 | 0% |
What each file covers
Sections
1 shared · 14 only in A · 6 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 规范集成
- + csproj 项目配置规范
- + SDK 类型选择
- + PropertyGroup 配置规范
- + Web API 项目
- + AppHost 项目
- + 集中式包管理(Central Package Management)
- 获取帮助
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 · 1 only in B- − code-style
- − agent-behaviour
- − docs
- + api
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/csproj.mdc
@@ +1 @@
1---
2description: CodeSpirit 项目配置规范 - 目标框架、SDK类型、集中式包管理
3globs: *.csproj
4alwaysApply: false
5---
6
7# csproj 项目配置规范
8
9## 目标框架
10
11- **必须使用 .NET 10**: `<TargetFramework>net10.0</TargetFramework>`
12- 添加或更新包时,必须与当前解决方案的包版本保持一致
13
14## SDK 类型选择
15
16| 项目类型 | SDK |
17|---------|-----|
18| API 服务 | `Microsoft.NET.Sdk.Web` |
19| 组件库 / 类库 | `Microsoft.NET.Sdk` |
20| AppHost | `Aspire.AppHost.Sdk/13.0.2` |
21
22## PropertyGroup 配置规范
23
24### 通用配置
25
26```xml
27<PropertyGroup>
28 <TargetFramework>net10.0</TargetFramework>
29 <ImplicitUsings>enable</ImplicitUsings>
30</PropertyGroup>
31```
32
33### Web API 项目
34
35```xml
36<PropertyGroup>
37 <TargetFramework>net10.0</TargetFramework>
38 <ImplicitUsings>enable</ImplicitUsings>
39 <Nullable>disable</Nullable>
40 <UserSecretsId>{生成的GUID}</UserSecretsId>
41 <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
42 <DockerfileContext>..\..</DockerfileContext>
43</PropertyGroup>
44```
45
46### AppHost 项目
47
48```xml
49<PropertyGroup>
50 <OutputType>Exe</OutputType>
51 <TargetFramework>net10.0</TargetFramework>
52 <ImplicitUsings>enable</ImplicitUsings>
53 <Nullable>enable</Nullable>
54 <IsAspireHost>true</IsAspireHost>
55</PropertyGroup>
56```
57
58### 测试项目
59
60```xml
61<PropertyGroup>
62 <TargetFramework>net10.0</TargetFramework>
63 <ImplicitUsings>enable</ImplicitUsings>
64 <IsPackable>false</IsPackable>
65</PropertyGroup>
66
67<ItemGroup>
68 <Using Include="Xunit" />
69</ItemGroup>
70```
71
72### 需要生成文档的组件库
73
74```xml
75<PropertyGroup>
76 <GenerateDocumentationFile>true</GenerateDocumentationFile>
77</PropertyGroup>
78```
79
80## 集中式包管理(Central Package Management)
81
82> ✅ **重要**: 项目已启用集中式包管理,所有包版本在 `Directory.Packages.props` 中统一管理
83
84### 包引用规范
85
861. **添加新包时**:
87 - 首先在 `Directory.Packages.props` 中添加 `<PackageVersion Include="PackageName" Version="x.y.z" />`
88 - 然后在项目文件中添加 `<PackageReference Include="PackageName" />`(**不指定 Version**)
89
902. **项目文件中的包引用**:
91 ```xml
92 <!-- ✅ 正确:不指定版本,由 Directory.Packages.props 管理 -->
93 <PackageReference Include="Newtonsoft.Json" />
94
95 <!-- ❌ 错误:不要指定版本 -->
96 <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
97 ```
98
993. **版本覆盖(特殊情况)**:
100 - 仅在必要时使用 `VersionOverride`,并添加注释说明原因
101 - 例如:使用 `Aspire.Microsoft.EntityFrameworkCore.SqlServer` 的项目需要 EF Core 10.0.0
102 ```xml
103 <!-- 注意:Aspire.Microsoft.EntityFrameworkCore.SqlServer 13.0.2 需要 EF Core 10.0.0 -->
104 <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" VersionOverride="10.0.0" />
105 ```
106
1074. **查看所有包版本**:
108 - 查看 `Directory.Packages.props` 文件
109 - 包按功能分类组织(Aspire、EF Core、Extensions 等)
110
111### 核心框架包版本
112
113所有包版本在 `Directory.Packages.props` 中定义,主要版本如下:
114
115| 包类别 | 版本 |
116|--------|------|
117| Aspire.* (大部分) | `13.0.2` |
118| Aspire.Hosting.Elasticsearch | `13.1.0` |
119| Aspire.Elastic.Clients.Elasticsearch | `13.1.0` |
120| Microsoft.Extensions.* | `10.0.0` |
121| Microsoft.AspNetCore.* | `10.0.0` |
122| Microsoft.EntityFrameworkCore.* | `9.0.9` (默认) / `10.0.0` (使用 Aspire EF Core 集成) |
123| Pomelo.EntityFrameworkCore.MySql | `9.0.0` |
124| OpenTelemetry.* | `1.11.1` |
125| StackExchange.Redis | `2.9.32` |
126| Newtonsoft.Json | `13.0.3` |
127| AutoMapper | `13.0.1` |
128| FluentValidation | `11.11.0` |
129| Scrutor | `4.2.2` |
130| LinqKit.Core | `1.2.8` |
131| Polly | `8.5.2` |
132
133### 测试包版本
134
135| 包 | 版本 |
136|---|------|
137| Microsoft.NET.Test.Sdk | `17.13.0` |
138| xunit | `2.9.3` |
139| xunit.runner.visualstudio | `3.0.2` |
140| Moq | `4.20.72` |
141| coverlet.collector | `6.0.4` |
142| Microsoft.EntityFrameworkCore.InMemory | `9.0.9` |
143| FluentAssertions | `7.0.0` |
144| NBomber | `6.2.0-beta.4` |
145
146## 项目引用路径
147
148- 使用相对路径 `..\..\` 格式
149- 路径分隔符使用反斜杠 `\`
150
151### 示例
152
153```xml
154<ItemGroup>
155 <ProjectReference Include="..\..\CodeSpirit.Core\CodeSpirit.Core.csproj" />
156 <ProjectReference Include="..\..\CodeSpirit.Shared\CodeSpirit.Shared.csproj" />
157</ItemGroup>
158```
159
160## 工具包配置
161
162对于仅作为开发工具使用的包,需添加资产限制:
163
164```xml
165<PackageReference Include="Microsoft.EntityFrameworkCore.Tools">
166 <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
167 <PrivateAssets>all</PrivateAssets>
168</PackageReference>
169```
170
171## 迁移文件夹
172
173API 项目如需 EF 迁移,应创建按数据库类型分离的迁移目录:
174
175```xml
176<ItemGroup>
177 <Folder Include="Data\Migrations\MySql\" />
178 <Folder Include="Data\Migrations\SqlServer\" />
179</ItemGroup>
180```
181
182## 传递依赖处理
183
184### 避免冗余引用
185
186以下包通过项目引用传递可用,通常不需要显式引用:
187
188- **通过 `CodeSpirit.Shared` 传递**:
189 - `Newtonsoft.Json`
190 - `Microsoft.EntityFrameworkCore.SqlServer`
191 - `Pomelo.EntityFrameworkCore.MySql`
192 - `LinqKit.Core`
193 - `Microsoft.EntityFrameworkCore`
194 - `RabbitMQ.Client`
195 - `Aspire.RabbitMQ.Client`
196
197- **通过 `CodeSpirit.ServiceDefaults` 传递**:
198 - `Aspire.Seq`
199 - `Aspire.StackExchange.Redis.DistributedCaching`
200
201- **通过 `FrameworkReference` 提供**:
202 - `Microsoft.AspNetCore.Http.Abstractions`(.NET 10)
203 - `Microsoft.AspNetCore.Mvc.Core`(.NET 10)
204
205如果项目确实需要这些包,应添加注释说明原因。
206
207## 禁止事项
208
209- ❌ **不要在 PackageReference 中指定 Version**(使用集中式包管理)
210- ❌ 不要混用不同版本的同一包
211- ❌ 不要使用 `<LangVersion>` 指定语言版本(使用框架默认)
212- ❌ 不要在 PackageReference 中使用浮动版本 (如 `*`)
213- ❌ 不要使用绝对路径引用项目
214- ❌ 不要添加通过传递依赖已可用的包引用(除非有特殊需求)
@@ −1 +1 @@
1−# Copilot instructions
1+---
2+description: CodeSpirit 项目配置规范 - 目标框架、SDK类型、集中式包管理
3+globs: *.csproj
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+# csproj 项目配置规范
48
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.
9+## 目标框架
1010
11−## Running the application
12−To run the application run the following command:
11+- **必须使用 .NET 10**: `<TargetFramework>net10.0</TargetFramework>`
12+- 添加或更新包时,必须与当前解决方案的包版本保持一致
1313
14+## SDK 类型选择
15+
16+| 项目类型 | SDK |
17+|---------|-----|
18+| API 服务 | `Microsoft.NET.Sdk.Web` |
19+| 组件库 / 类库 | `Microsoft.NET.Sdk` |
20+| AppHost | `Aspire.AppHost.Sdk/13.0.2` |
21+
22+## PropertyGroup 配置规范
23+
24+### 通用配置
25+
26+```xml
27+<PropertyGroup>
28+ <TargetFramework>net10.0</TargetFramework>
29+ <ImplicitUsings>enable</ImplicitUsings>
30+</PropertyGroup>
1431 ```
15−aspire run
32+
33+### Web API 项目
34+
35+```xml
36+<PropertyGroup>
37+ <TargetFramework>net10.0</TargetFramework>
38+ <ImplicitUsings>enable</ImplicitUsings>
39+ <Nullable>disable</Nullable>
40+ <UserSecretsId>{生成的GUID}</UserSecretsId>
41+ <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
42+ <DockerfileContext>..\..</DockerfileContext>
43+</PropertyGroup>
1644 ```
1745
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.
46+### AppHost 项目
1947
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.
48+```xml
49+<PropertyGroup>
50+ <OutputType>Exe</OutputType>
51+ <TargetFramework>net10.0</TargetFramework>
52+ <ImplicitUsings>enable</ImplicitUsings>
53+ <Nullable>enable</Nullable>
54+ <IsAspireHost>true</IsAspireHost>
55+</PropertyGroup>
56+```
2257
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.
58+### 测试项目
2559
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.
60+```xml
61+<PropertyGroup>
62+ <TargetFramework>net10.0</TargetFramework>
63+ <ImplicitUsings>enable</ImplicitUsings>
64+ <IsPackable>false</IsPackable>
65+</PropertyGroup>
2866
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
67+<ItemGroup>
68+ <Using Include="Xunit" />
69+</ItemGroup>
70+```
3371
34−## Other Aspire MCP tools
72+### 需要生成文档的组件库
3573
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.
74+```xml
75+<PropertyGroup>
76+ <GenerateDocumentationFile>true</GenerateDocumentationFile>
77+</PropertyGroup>
78+```
3879
39−## Playwright MCP server
80+## 集中式包管理(Central Package Management)
4081
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.
82+> ✅ **重要**: 项目已启用集中式包管理,所有包版本在 `Directory.Packages.props` 中统一管理
4283
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:
84+### 包引用规范
4585
86+1. **添加新包时**:
87+ - 首先在 `Directory.Packages.props` 中添加 `<PackageVersion Include="PackageName" Version="x.y.z" />`
88+ - 然后在项目文件中添加 `<PackageReference Include="PackageName" />`(**不指定 Version**)
89+
90+2. **项目文件中的包引用**:
91+ ```xml
92+ <!-- ✅ 正确:不指定版本,由 Directory.Packages.props 管理 -->
93+ <PackageReference Include="Newtonsoft.Json" />
94+
95+ <!-- ❌ 错误:不要指定版本 -->
96+ <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
97+ ```
98+
99+3. **版本覆盖(特殊情况)**:
100+ - 仅在必要时使用 `VersionOverride`,并添加注释说明原因
101+ - 例如:使用 `Aspire.Microsoft.EntityFrameworkCore.SqlServer` 的项目需要 EF Core 10.0.0
102+ ```xml
103+ <!-- 注意:Aspire.Microsoft.EntityFrameworkCore.SqlServer 13.0.2 需要 EF Core 10.0.0 -->
104+ <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" VersionOverride="10.0.0" />
105+ ```
106+
107+4. **查看所有包版本**:
108+ - 查看 `Directory.Packages.props` 文件
109+ - 包按功能分类组织(Aspire、EF Core、Extensions 等)
110+
111+### 核心框架包版本
112+
113+所有包版本在 `Directory.Packages.props` 中定义,主要版本如下:
114+
115+| 包类别 | 版本 |
116+|--------|------|
117+| Aspire.* (大部分) | `13.0.2` |
118+| Aspire.Hosting.Elasticsearch | `13.1.0` |
119+| Aspire.Elastic.Clients.Elasticsearch | `13.1.0` |
120+| Microsoft.Extensions.* | `10.0.0` |
121+| Microsoft.AspNetCore.* | `10.0.0` |
122+| Microsoft.EntityFrameworkCore.* | `9.0.9` (默认) / `10.0.0` (使用 Aspire EF Core 集成) |
123+| Pomelo.EntityFrameworkCore.MySql | `9.0.0` |
124+| OpenTelemetry.* | `1.11.1` |
125+| StackExchange.Redis | `2.9.32` |
126+| Newtonsoft.Json | `13.0.3` |
127+| AutoMapper | `13.0.1` |
128+| FluentValidation | `11.11.0` |
129+| Scrutor | `4.2.2` |
130+| LinqKit.Core | `1.2.8` |
131+| Polly | `8.5.2` |
132+
133+### 测试包版本
134+
135+| 包 | 版本 |
136+|---|------|
137+| Microsoft.NET.Test.Sdk | `17.13.0` |
138+| xunit | `2.9.3` |
139+| xunit.runner.visualstudio | `3.0.2` |
140+| Moq | `4.20.72` |
141+| coverlet.collector | `6.0.4` |
142+| Microsoft.EntityFrameworkCore.InMemory | `9.0.9` |
143+| FluentAssertions | `7.0.0` |
144+| NBomber | `6.2.0-beta.4` |
145+
146+## 项目引用路径
147+
148+- 使用相对路径 `..\..\` 格式
149+- 路径分隔符使用反斜杠 `\`
150+
151+### 示例
152+
153+```xml
154+<ItemGroup>
155+ <ProjectReference Include="..\..\CodeSpirit.Core\CodeSpirit.Core.csproj" />
156+ <ProjectReference Include="..\..\CodeSpirit.Shared\CodeSpirit.Shared.csproj" />
157+</ItemGroup>
46158 ```
47−dotnet tool install --global dotnet-outdated-tool
48−```
49159
50−## Persistent containers
51−IMPORTANT! Consider avoiding persistent containers early during development to avoid creating state management issues when restarting the app.
160+## 工具包配置
52161
53−## Aspire workload
54−IMPORTANT! The aspire workload is obsolete. You should never attempt to install or use the Aspire workload.
162+对于仅作为开发工具使用的包,需添加资产限制:
55163
56−## Official documentation
57−IMPORTANT! Always prefer official documentation when available. The following sites contain the official documentation for Aspire and related components
164+```xml
165+<PackageReference Include="Microsoft.EntityFrameworkCore.Tools">
166+ <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
167+ <PrivateAssets>all</PrivateAssets>
168+</PackageReference>
169+```
58170
59−1. https://aspire.dev
60−2. https://learn.microsoft.com/dotnet/aspire
61−3. https://nuget.org (for specific integration package details)
171+## 迁移文件夹
62172
63−## BMAD AI 工作流
173+API 项目如需 EF 迁移,应创建按数据库类型分离的迁移目录:
64174
65−本项目已集成 BMAD (Breakthrough Method of Agile AI-Driven Development) 完整工作流,用于结构化的软件开发生命周期管理。
175+```xml
176+<ItemGroup>
177+ <Folder Include="Data\Migrations\MySql\" />
178+ <Folder Include="Data\Migrations\SqlServer\" />
179+</ItemGroup>
180+```
66181
67−### 快速开始
182+## 传递依赖处理
68183
69−1. **小型任务/Bug 修复** (Quick Flow):
70− - `/quick-spec` - 创建技术规范
71− - `/quick-dev` - 实现变更
72− - `/code-review` - 代码审查
184+### 避免冗余引用
73185
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` - 复盘
186+以下包通过项目引用传递可用,通常不需要显式引用:
83187
84−### 与 CodeSpirit 规范集成
188+- **通过 `CodeSpirit.Shared` 传递**:
189+ - `Newtonsoft.Json`
190+ - `Microsoft.EntityFrameworkCore.SqlServer`
191+ - `Pomelo.EntityFrameworkCore.MySql`
192+ - `LinqKit.Core`
193+ - `Microsoft.EntityFrameworkCore`
194+ - `RabbitMQ.Client`
195+ - `Aspire.RabbitMQ.Client`
85196
86−BMAD 工作流已配置为自动遵循 CodeSpirit 的所有开发规范(位于 `.cursor/rules/`)。在使用 BMAD 时:
197+- **通过 `CodeSpirit.ServiceDefaults` 传递**:
198+ - `Aspire.Seq`
199+ - `Aspire.StackExchange.Redis.DistributedCaching`
87200
88−- PRD 会自动考虑多租户、多数据库、AI 功能等项目特性
89−- 架构设计会遵循依赖注入、缓存策略等规范
90−- Story 实现会应用正确的命名约定、DTO 设计、控制器规范等
91−- 代码审查会执行 CodeSpirit 特定的审查清单
201+- **通过 `FrameworkReference` 提供**:
202+ - `Microsoft.AspNetCore.Http.Abstractions`(.NET 10)
203+ - `Microsoft.AspNetCore.Mvc.Core`(.NET 10)
92204
93−### 获取帮助
205+如果项目确实需要这些包,应添加注释说明原因。
94206
95−任何时候,输入 `/bmad-help` 可获取上下文相关的指导。
207+## 禁止事项
96208
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) - 项目上下文和规范引用
209+- ❌ **不要在 PackageReference 中指定 Version**(使用集中式包管理)
210+- ❌ 不要混用不同版本的同一包
211+- ❌ 不要使用 `<LangVersion>` 指定语言版本(使用框架默认)
212+- ❌ 不要在 PackageReference 中使用浮动版本 (如 `*`)
213+- ❌ 不要使用绝对路径引用项目
214+- ❌ 不要添加通过传递依赖已可用的包引用(除非有特殊需求)
