RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Diff/xin-lai-codespirit-agents ↔ xin-lai-codespirit-cursor-rules-project-structure

Comparison

A · AGENTS.md · xin-lai/CodeSpiritB · Cursor rules · xin-lai/CodeSpirit
What each file covers, counted
DimensionSharedOnly in AOnly in BOverlap
Sections213311%
Commands0200%
Section tags0310%

What each file covers

Sections

2 shared · 13 only in A · 3 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 工作流
  • + API服务层 (14个服务)
  • + 新建 API 服务
  • + 开发 CRUD 功能
  •   获取帮助
  •   与 CodeSpirit 规范集成

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

+174 added−71 removed31 unchanged15.1% identical
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/project-structure.mdc
@@ +1 @@
1---
2description: CodeSpirit 项目结构详细说明 - 完整的项目目录树和组件分类
3globs:
4alwaysApply: false
5---
6 
7# CodeSpirit 项目结构
8 
9## 完整目录树
 
 
 
 
10 
 
 
 
11```
12Src/
13├── ApiServices/ # API服务层
14│ ├── CodeSpirit.AiCardsApi/ # AI卡片API服务
15│ ├── CodeSpirit.ApprovalApi/ # 审批工作流API服务
16│ ├── CodeSpirit.ConfigCenter/ # 配置中心API
17│ ├── CodeSpirit.ContentApi/ # 内容管理API
18│ ├── CodeSpirit.DigitalPartner.Plugins.ExamAnalyst/ # 考试分析插件(AI伙伴工具)
19│ ├── CodeSpirit.ExamApi/ # 考试系统API
20│ ├── CodeSpirit.FileStorageApi/ # 文件存储API
21│ ├── CodeSpirit.IdentityApi/ # 身份认证API
22│ ├── CodeSpirit.MallApi/ # 商城API
23│ ├── CodeSpirit.MessagingApi/ # 消息服务API
24│ ├── CodeSpirit.PartnerApi/ # 伙伴API(AI助手前端)
25│ ├── CodeSpirit.PathfinderAgent/ # Pathfinder代理(AI目标管理代理)
26│ ├── CodeSpirit.PathfinderApi/ # Pathfinder API(AI目标管理)
27│ └── CodeSpirit.SurveyApi/ # 问卷调查API
28├── Components/ # 独立组件库
29│ ├── CodeSpirit.Aggregator/ # 数据聚合器组件
30│ ├── CodeSpirit.AiFormFill/ # AI表单智能填充组件
31│ ├── CodeSpirit.Amis/ # AMIS界面生成引擎
32│ ├── CodeSpirit.Audit/ # 审计追踪组件(含LLM审计)
33│ ├── CodeSpirit.Authorization/ # 权限管理组件(RBAC+ABAC)
34│ ├── CodeSpirit.Caching/ # 分布式缓存组件(多级缓存+分布式锁)
35│ ├── CodeSpirit.Charts/ # 智能图表组件
36│ ├── CodeSpirit.ConfigCenter.Client/ # 配置中心客户端
37│ ├── CodeSpirit.LLM/ # 大语言模型集成组件
38│ ├── CodeSpirit.Localization/ # 多语言本地化组件
39│ ├── CodeSpirit.Messaging/ # 消息队列组件
40│ ├── CodeSpirit.MultiTenant/ # 多租户组件
41│ ├── CodeSpirit.Navigation/ # 导航组件
42│ ├── CodeSpirit.OData/ # OData查询组件
43│ ├── CodeSpirit.PartnerSdk/ # 伙伴SDK(AI助手工具SDK)
44│ ├── CodeSpirit.PathfinderTools/ # Pathfinder工具库
45│ ├── CodeSpirit.PdfGeneration/ # PDF生成组件
46│ ├── CodeSpirit.ScheduledTasks/ # 定时任务组件(分布式调度)
47│ ├── CodeSpirit.Settings/ # 设置管理组件
48│ ├── CodeSpirit.Shared/ # 组件共享库
49│ ├── CodeSpirit.UdlCards/ # UDL卡片组件
50│ └── CodeSpirit.VectorSearch/ # 向量搜索组件(AI语义搜索)
51├── CodeSpirit.AppHost/ # Aspire应用宿主(启动项目)
52├── CodeSpirit.Core/ # 核心框架定义
53├── CodeSpirit.ServiceDefaults/ # 服务默认配置
54├── CodeSpirit.Shared/ # 全局共享库
55└── CodeSpirit.Web/ # Web前端项目
56```
57 
58## 项目分类说明
59 
60### API服务层 (14个服务)
 
61 
62**注意**: 项目数量可能随开发进度变化,此处列出当前主要服务。
 
63 
64#### 核心业务系统
65- **IdentityApi**: JWT认证、用户管理、角色权限、部门组织
66- **ExamApi**: 题库管理、考试系统、阅卷、统计分析
67- **SurveyApi**: 问卷设计、数据收集、统计分析
68- **ApprovalApi**: 审批流程、表单流转、工作流引擎
69 
70#### AI 增强系统
71- **AiCardsApi**: AI卡片、智能生成
72- **PartnerApi**: AI伙伴对话前端
73- **DigitalPartner.Plugins.ExamAnalyst**: 考试分析AI插件
74- **PathfinderApi**: AI驱动的目标管理系统
75- **PathfinderAgent**: Pathfinder智能代理
76 
77#### 基础设施服务
78- **ConfigCenter**: 配置中心、动态配置管理
79- **FileStorageApi**: 文件存储、引用计数、生命周期管理
80- **MessagingApi**: 消息服务、通知推送
81- **ContentApi**: 内容管理
82- **MallApi**: 商城系统
83 
84### 核心组件库 (多个组件)
 
85 
86**注意**: 组件数量可能随开发进度变化,此处列出主要组件。
87 
88#### 界面生成
89- **Amis**: 零前端代码CRUD界面生成引擎
90- **UdlCards**: UDL卡片组件库
91- **Navigation**: 智能导航组件
92 
93#### AI 集成
94- **LLM**: 大语言模型统一接口(OpenAI、通义千问、DeepSeek)
95- **AiFormFill**: AI表单智能填充组件
96- **VectorSearch**: 向量搜索、AI语义搜索
97- **PartnerSdk**: AI助手工具开发SDK
98- **PathfinderTools**: Pathfinder工具库
99 
100#### 权限审计
101- **Authorization**: RBAC+ABAC混合权限模型
102- **Audit**: 审计追踪组件(含LLM审计)
103 
104#### 多租户
105- **MultiTenant**: 多租户数据隔离
106- **Localization**: 多语言本地化
107 
108#### 性能优化
109- **Caching**: 多级缓存(L1内存+L2Redis)、分布式锁
110- **ScheduledTasks**: 分布式定时任务调度
111 
112#### 数据处理
113- **Aggregator**: 数据聚合器、字段替换
114- **Charts**: 智能图表、可视化
115- **OData**: OData查询支持
116 
117#### 基础设施
118- **Settings**: 设置管理组件
119- **PdfGeneration**: PDF生成服务
120- **ConfigCenter.Client**: 配置中心客户端
121- **Messaging**: 消息队列、事件总线
122- **Shared**: 组件共享库
123 
124## 典型API项目结构
125 
126```
127CodeSpirit.ExamApi/
128├── Configuration/ # API配置类
129│ └── ExamApiConfiguration.cs
130├── Controllers/ # API控制器
131│ ├── QuestionsController.cs
132│ └── ExamsController.cs
133├── Data/ # 数据访问层
134│ ├── ExamDbContext.cs
135│ ├── MySqlExamDbContext.cs
136│ ├── SqlServerExamDbContext.cs
137│ └── Configurations/ # 实体配置
138├── Dtos/ # 数据传输对象
139│ ├── Question/
140│ │ ├── CreateQuestionDto.cs
141│ │ ├── UpdateQuestionDto.cs
142│ │ └── QuestionDto.cs
143│ └── Exam/
144├── Services/ # 业务服务
145│ ├── IQuestionService.cs
146│ └── QuestionService.cs
147├── MappingProfiles/ # AutoMapper配置
148├── Resources/ # 多语言资源
149│ ├── ExamDisplayResources.cs
150│ ├── ExamDisplay.resx
151│ └── ExamDisplay.en.resx
152├── Migrations/ # 数据库迁移
153│ ├── MySql/
154│ └── SqlServer/
155└── Program.cs # 启动文件(仅2行代码)
156```
157 
158## 开发流程
159 
160### 新建 API 服务
1611. 创建项目并引用 `CodeSpirit.Shared`
1622. 创建 `Configuration/{ApiName}Configuration.cs` 继承 `BaseApiConfiguration`
1633. `Program.cs` 中使用统一启动框架(2行代码)
1644. 创建 DbContext、实体、配置
1655. 创建迁移(MySql 和 SqlServer)
166 
167### 开发 CRUD 功能
1681. 定义实体(Entity)
1692. 创建 DTO(Create/Update/Query/List)
1703. 实现服务(Service)继承 `BaseCRUDService`
1714. 创建控制器(Controller)继承 `ApiControllerBase`
1725. 添加 AutoMapper 配置
1736. 前端自动生成(零前端代码)
 
 
174 
175### 添加多语言
1761. 在 `Resources/` 创建资源文件
1772. DTO 使用 `[Display(ResourceType = typeof(...))]`
1783. 验证使用 `ErrorMessageResourceType`
1794. 异常使用资源键 `throw new BusinessException("Errors.NotFound")`
180 
181## 技术栈对应
182 
183| 功能 | 技术选型 | 对应组件 |
184|------|---------|---------|
185| API开发 | .NET 10 + Aspire | ServiceDefaults, Core |
186| 数据访问 | EF Core 9 | Shared (BaseCRUDService) |
187| 数据库 | MySQL/SQL Server | 多数据库迁移支持 |
188| 缓存 | Redis | Caching 组件 |
189| 消息队列 | RabbitMQ | Messaging 组件 |
190| 权限 | RBAC+ABAC | Authorization 组件 |
191| 审计 | Elasticsearch/GreptimeDB | Audit 组件 |
192| 多租户 | 数据隔离 | MultiTenant 组件 |
193| 多语言 | Resx资源文件 | Localization 组件 |
194| 前端生成 | AMIS | Amis 组件 |
195| AI集成 | OpenAI/通义千问/DeepSeek | LLM, AiFormFill 组件 |
196| 定时任务 | 分布式调度 | ScheduledTasks 组件 |
197 
198## 参考文档
199 
200详细的开发指南请参考:
201- [命名约定规范](mdc:.cursor/rules/naming-conventions.mdc)
202- [API设计规范](mdc:.cursor/rules/api-design.mdc)
203- [统一启动框架](mdc:.cursor/rules/startup-framework.mdc)
204- [依赖注入规范](mdc:.cursor/rules/dependency-injection.mdc)
205 
 
 
 
 
 
 
@@ −1 +1 @@
1−# Copilot instructions
1+---
2+description: CodeSpirit 项目结构详细说明 - 完整的项目目录树和组件分类
3+globs:
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+# CodeSpirit 项目结构
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:
13− 
1411 ```
15−aspire run
12+Src/
13+├── ApiServices/ # API服务层
14+│ ├── CodeSpirit.AiCardsApi/ # AI卡片API服务
15+│ ├── CodeSpirit.ApprovalApi/ # 审批工作流API服务
16+│ ├── CodeSpirit.ConfigCenter/ # 配置中心API
17+│ ├── CodeSpirit.ContentApi/ # 内容管理API
18+│ ├── CodeSpirit.DigitalPartner.Plugins.ExamAnalyst/ # 考试分析插件(AI伙伴工具)
19+│ ├── CodeSpirit.ExamApi/ # 考试系统API
20+│ ├── CodeSpirit.FileStorageApi/ # 文件存储API
21+│ ├── CodeSpirit.IdentityApi/ # 身份认证API
22+│ ├── CodeSpirit.MallApi/ # 商城API
23+│ ├── CodeSpirit.MessagingApi/ # 消息服务API
24+│ ├── CodeSpirit.PartnerApi/ # 伙伴API(AI助手前端)
25+│ ├── CodeSpirit.PathfinderAgent/ # Pathfinder代理(AI目标管理代理)
26+│ ├── CodeSpirit.PathfinderApi/ # Pathfinder API(AI目标管理)
27+│ └── CodeSpirit.SurveyApi/ # 问卷调查API
28+├── Components/ # 独立组件库
29+│ ├── CodeSpirit.Aggregator/ # 数据聚合器组件
30+│ ├── CodeSpirit.AiFormFill/ # AI表单智能填充组件
31+│ ├── CodeSpirit.Amis/ # AMIS界面生成引擎
32+│ ├── CodeSpirit.Audit/ # 审计追踪组件(含LLM审计)
33+│ ├── CodeSpirit.Authorization/ # 权限管理组件(RBAC+ABAC)
34+│ ├── CodeSpirit.Caching/ # 分布式缓存组件(多级缓存+分布式锁)
35+│ ├── CodeSpirit.Charts/ # 智能图表组件
36+│ ├── CodeSpirit.ConfigCenter.Client/ # 配置中心客户端
37+│ ├── CodeSpirit.LLM/ # 大语言模型集成组件
38+│ ├── CodeSpirit.Localization/ # 多语言本地化组件
39+│ ├── CodeSpirit.Messaging/ # 消息队列组件
40+│ ├── CodeSpirit.MultiTenant/ # 多租户组件
41+│ ├── CodeSpirit.Navigation/ # 导航组件
42+│ ├── CodeSpirit.OData/ # OData查询组件
43+│ ├── CodeSpirit.PartnerSdk/ # 伙伴SDK(AI助手工具SDK)
44+│ ├── CodeSpirit.PathfinderTools/ # Pathfinder工具库
45+│ ├── CodeSpirit.PdfGeneration/ # PDF生成组件
46+│ ├── CodeSpirit.ScheduledTasks/ # 定时任务组件(分布式调度)
47+│ ├── CodeSpirit.Settings/ # 设置管理组件
48+│ ├── CodeSpirit.Shared/ # 组件共享库
49+│ ├── CodeSpirit.UdlCards/ # UDL卡片组件
50+│ └── CodeSpirit.VectorSearch/ # 向量搜索组件(AI语义搜索)
51+├── CodeSpirit.AppHost/ # Aspire应用宿主(启动项目)
52+├── CodeSpirit.Core/ # 核心框架定义
53+├── CodeSpirit.ServiceDefaults/ # 服务默认配置
54+├── CodeSpirit.Shared/ # 全局共享库
55+└── CodeSpirit.Web/ # Web前端项目
1656 ```
1757  
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.
58+## 项目分类说明
1959  
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.
60+### API服务层 (14个服务)
2261  
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.
62+**注意**: 项目数量可能随开发进度变化,此处列出当前主要服务。
2563  
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.
64+#### 核心业务系统
65+- **IdentityApi**: JWT认证、用户管理、角色权限、部门组织
66+- **ExamApi**: 题库管理、考试系统、阅卷、统计分析
67+- **SurveyApi**: 问卷设计、数据收集、统计分析
68+- **ApprovalApi**: 审批流程、表单流转、工作流引擎
2869  
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
70+#### AI 增强系统
71+- **AiCardsApi**: AI卡片、智能生成
72+- **PartnerApi**: AI伙伴对话前端
73+- **DigitalPartner.Plugins.ExamAnalyst**: 考试分析AI插件
74+- **PathfinderApi**: AI驱动的目标管理系统
75+- **PathfinderAgent**: Pathfinder智能代理
3376  
34−## Other Aspire MCP tools
77+#### 基础设施服务
78+- **ConfigCenter**: 配置中心、动态配置管理
79+- **FileStorageApi**: 文件存储、引用计数、生命周期管理
80+- **MessagingApi**: 消息服务、通知推送
81+- **ContentApi**: 内容管理
82+- **MallApi**: 商城系统
3583  
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.
84+### 核心组件库 (多个组件)
3885  
39−## Playwright MCP server
86+**注意**: 组件数量可能随开发进度变化,此处列出主要组件。
4087  
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.
88+#### 界面生成
89+- **Amis**: 零前端代码CRUD界面生成引擎
90+- **UdlCards**: UDL卡片组件库
91+- **Navigation**: 智能导航组件
4292  
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:
93+#### AI 集成
94+- **LLM**: 大语言模型统一接口(OpenAI、通义千问、DeepSeek)
95+- **AiFormFill**: AI表单智能填充组件
96+- **VectorSearch**: 向量搜索、AI语义搜索
97+- **PartnerSdk**: AI助手工具开发SDK
98+- **PathfinderTools**: Pathfinder工具库
4599  
46−```
47−dotnet tool install --global dotnet-outdated-tool
48−```
100+#### 权限审计
101+- **Authorization**: RBAC+ABAC混合权限模型
102+- **Audit**: 审计追踪组件(含LLM审计)
49103  
50−## Persistent containers
51−IMPORTANT! Consider avoiding persistent containers early during development to avoid creating state management issues when restarting the app.
104+#### 多租户
105+- **MultiTenant**: 多租户数据隔离
106+- **Localization**: 多语言本地化
52107  
53−## Aspire workload
54−IMPORTANT! The aspire workload is obsolete. You should never attempt to install or use the Aspire workload.
108+#### 性能优化
109+- **Caching**: 多级缓存(L1内存+L2Redis)、分布式锁
110+- **ScheduledTasks**: 分布式定时任务调度
55111  
56−## Official documentation
57−IMPORTANT! Always prefer official documentation when available. The following sites contain the official documentation for Aspire and related components
112+#### 数据处理
113+- **Aggregator**: 数据聚合器、字段替换
114+- **Charts**: 智能图表、可视化
115+- **OData**: OData查询支持
58116  
59−1. https://aspire.dev
60−2. https://learn.microsoft.com/dotnet/aspire
61−3. https://nuget.org (for specific integration package details)
117+#### 基础设施
118+- **Settings**: 设置管理组件
119+- **PdfGeneration**: PDF生成服务
120+- **ConfigCenter.Client**: 配置中心客户端
121+- **Messaging**: 消息队列、事件总线
122+- **Shared**: 组件共享库
62123  
63−## BMAD AI 工作流
124+## 典型API项目结构
64125  
65−本项目已集成 BMAD (Breakthrough Method of Agile AI-Driven Development) 完整工作流,用于结构化的软件开发生命周期管理。
126+```
127+CodeSpirit.ExamApi/
128+├── Configuration/ # API配置类
129+│ └── ExamApiConfiguration.cs
130+├── Controllers/ # API控制器
131+│ ├── QuestionsController.cs
132+│ └── ExamsController.cs
133+├── Data/ # 数据访问层
134+│ ├── ExamDbContext.cs
135+│ ├── MySqlExamDbContext.cs
136+│ ├── SqlServerExamDbContext.cs
137+│ └── Configurations/ # 实体配置
138+├── Dtos/ # 数据传输对象
139+│ ├── Question/
140+│ │ ├── CreateQuestionDto.cs
141+│ │ ├── UpdateQuestionDto.cs
142+│ │ └── QuestionDto.cs
143+│ └── Exam/
144+├── Services/ # 业务服务
145+│ ├── IQuestionService.cs
146+│ └── QuestionService.cs
147+├── MappingProfiles/ # AutoMapper配置
148+├── Resources/ # 多语言资源
149+│ ├── ExamDisplayResources.cs
150+│ ├── ExamDisplay.resx
151+│ └── ExamDisplay.en.resx
152+├── Migrations/ # 数据库迁移
153+│ ├── MySql/
154+│ └── SqlServer/
155+└── Program.cs # 启动文件(仅2行代码)
156+```
66157  
67−### 快速开始
158+## 开发流程
68159  
69−1. **小型任务/Bug 修复** (Quick Flow):
70− - `/quick-spec` - 创建技术规范
71− - `/quick-dev` - 实现变更
72− - `/code-review` - 代码审查
160+### 新建 API 服务
161+1. 创建项目并引用 `CodeSpirit.Shared`
162+2. 创建 `Configuration/{ApiName}Configuration.cs` 继承 `BaseApiConfiguration`
163+3. `Program.cs` 中使用统一启动框架(2行代码)
164+4. 创建 DbContext、实体、配置
165+5. 创建迁移(MySql 和 SqlServer)
73166  
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` - 复盘
167+### 开发 CRUD 功能
168+1. 定义实体(Entity)
169+2. 创建 DTO(Create/Update/Query/List)
170+3. 实现服务(Service)继承 `BaseCRUDService`
171+4. 创建控制器(Controller)继承 `ApiControllerBase`
172+5. 添加 AutoMapper 配置
173+6. 前端自动生成(零前端代码)
83174  
84−### 与 CodeSpirit 规范集成
175+### 添加多语言
176+1. 在 `Resources/` 创建资源文件
177+2. DTO 使用 `[Display(ResourceType = typeof(...))]`
178+3. 验证使用 `ErrorMessageResourceType`
179+4. 异常使用资源键 `throw new BusinessException("Errors.NotFound")`
85180  
86−BMAD 工作流已配置为自动遵循 CodeSpirit 的所有开发规范(位于 `.cursor/rules/`)。在使用 BMAD 时:
181+## 技术栈对应
87182  
88−- PRD 会自动考虑多租户、多数据库、AI 功能等项目特性
89−- 架构设计会遵循依赖注入、缓存策略等规范
90−- Story 实现会应用正确的命名约定、DTO 设计、控制器规范等
91−- 代码审查会执行 CodeSpirit 特定的审查清单
183+| 功能 | 技术选型 | 对应组件 |
184+|------|---------|---------|
185+| API开发 | .NET 10 + Aspire | ServiceDefaults, Core |
186+| 数据访问 | EF Core 9 | Shared (BaseCRUDService) |
187+| 数据库 | MySQL/SQL Server | 多数据库迁移支持 |
188+| 缓存 | Redis | Caching 组件 |
189+| 消息队列 | RabbitMQ | Messaging 组件 |
190+| 权限 | RBAC+ABAC | Authorization 组件 |
191+| 审计 | Elasticsearch/GreptimeDB | Audit 组件 |
192+| 多租户 | 数据隔离 | MultiTenant 组件 |
193+| 多语言 | Resx资源文件 | Localization 组件 |
194+| 前端生成 | AMIS | Amis 组件 |
195+| AI集成 | OpenAI/通义千问/DeepSeek | LLM, AiFormFill 组件 |
196+| 定时任务 | 分布式调度 | ScheduledTasks 组件 |
92197  
93−### 获取帮助
198+## 参考文档
94199  
95−任何时候,输入 `/bmad-help` 可获取上下文相关的指导。
200+详细的开发指南请参考:
201+- [命名约定规范](mdc:.cursor/rules/naming-conventions.mdc)
202+- [API设计规范](mdc:.cursor/rules/api-design.mdc)
203+- [统一启动框架](mdc:.cursor/rules/startup-framework.mdc)
204+- [依赖注入规范](mdc:.cursor/rules/dependency-injection.mdc)
96205  
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) - 项目上下文和规范引用
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack