Files
beige/启动包/CLAUDE.md三层说明.md
yangqianqian 6a2632da70 baseline: Clover 独立仓库首次基线提交
将 Clover 从上层产品包旧仓库中独立出来,建立专属版本控制。
当前状态=纵切片端到端已打通(登录→选品→出文出图→审核→下载包),
M1文案质量去套路化已验收。此提交作为后续按核销清单逐条修复的基线。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 11:30:22 +08:00

61 lines
1.9 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Clover CLAUDE.md 三层体系说明
> 治理指南 L3 要求 CLAUDE.md 分层。Clover 三层落点如下,开工日按此铺到 Clover 仓库。
## 三层结构
```
~/.claude/CLAUDE.md ← 全局倩倩姐已有agent继承中文/称呼/失败2次规则等
Clover/CLAUDE.md ← 项目级(已落:架构铁律+产品红线+前端红线+源路径)
Clover/backend/CLAUDE.md ← 模块级·后端见下§A
Clover/frontend/CLAUDE.md ← 模块级·前端见下§B
```
覆盖规则子级覆盖父级同名配置不冲突的合并生效。冲突时以架构方案v0.3 + 项目级CLAUDE.md为准。
## A. 模块级·后端 CLAUDE.md开工日放 backend/
```markdown
# Clover 后端模块
## 技术栈
- 语言Python 3.11 / 框架FastAPI + Celery
- 数据库MySQL业务+ MongoDBAI trace+ Redis队列+SSE
- 加密cryptography.fernetFERNET_KEY 走环境变量
## 验证步骤(改完代码必跑)
1. `ruff check .` — 无错误
2. `pytest` — 全通过
3. 契约符合:核对 启动包/API契约.md
## 架构规则
- 路由层不含业务逻辑只做校验→service→格式化
- 所有查询带 workspace_id多租户红线
- key 绝不进 Celery基石B
- 详见 .claude/rules/api.md + db.md
```
## B. 模块级·前端 CLAUDE.md开工日放 frontend/
```markdown
# Clover 前端模块
## 技术栈
- 框架Next.js 14 + TypeScript
- 样式Tailwind / CSS Modules
- 状态4 Store任务/候选/审核/全局)
## 验证步骤
1. `npm run lint` — 无错误
2. `npm run build` — 构建成功
3. DTO 核对 启动包/API契约.md §3
## 红线
- 不展示 Token 余额、不做积分页
- 飞轮隐形,不做自动发布
- 详见 .claude/rules/frontend.md
```
## 开工日操作
全局级已有,项目级已落。开工日只需把 §A/§B 两段分别写入 backend/CLAUDE.md 和 frontend/CLAUDE.md。