fix:更新skill和rules

This commit is contained in:
2026-07-01 15:04:53 +08:00
parent 6fa8ecc714
commit f3ae9e6520
10 changed files with 634 additions and 0 deletions
+48
View File
@@ -0,0 +1,48 @@
---
description: 杜康好客 Monorepo 核心规范、事实源与模块边界
alwaysApply: true
---
# 杜康好客 · 项目核心
## Monorepo 布局
- `apps/` — 前端(preV1`h5-user`、`h5-shop`、`h5-partner`、`admin-web`
- `packages/` — `shared-types`、`domain`、`shared-ui`
- `server/dukang-api/` — NestJS 单体 API
- `pages/` — UI 原型(**只读参照**,勿改)
> V2 目标为 Taro 四端(`mini-user` 等),编码以 **当前实际目录** 为准。
## 事实源优先级
1. preV1 联调 → `杜康好客-preV1编码手册.md`
2. PRD / DB / API 权威 → `杜康好客-V2编码手册.md`
3. 协作边界 → `conventions.md`
4. Agent 流程 → `agent.md` + `skills.md`
**禁止**:编码时修改业务规则;需求变更只改 V2 手册。
## 模块边界(硬约束)
- 任一 `apps/*` **禁止** import 其他 app 或 `server/*` 源码
- 后端 Module **禁止** 跨模块直写 Prisma 表,只 inject 对方 `exports` 的 Service
- 新枚举/DTO → `packages/shared-types`;纯规则 → `packages/domain`(无 IO
## 核心业务常量
- 权益额 = `benefit_amount ?? price`
- 核销:0 < amount ≤ min(balance, **500**)
- 订单 Tab`all | pending_pay | pending_ship | pending_receive | completed`
- API`/api/v1`,响应 `{ code, message, data }`
- JWT`actorType` + `actorId` + `clientApp`
## 模块 OWNER
| Owner | App / Module |
|-------|-------------|
| A | h5-user → iam, trade, benefit, analytics |
| B | h5-partner → store |
| C | admin-web → catalog, settlement, ops |
| D | h5-shop → redeem |
| Lead | packages/*, callbacks/, jobs/ |