Files
digital-psychology/.ai/product/feature-spec/life-rhythm.md
T
jackyu66gitandCursor bd22d9dddd feat: P1 合盘/星座/问答与测测完整设计包及模拟器取证工具
落地 synastry/star/ask API 与 H5 页面,补齐 cece-frontend-re complete-design 证据文档,并加入 Android 模拟器截图抓取脚本。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 11:37:53 +08:00

177 lines
4.3 KiB
Markdown
Raw 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.
# Feature Spec: 身心节律
> Status: `Active`(设计)· Map: `2.7 身心节律 [P2]`= `2.5 身心探索` 产品化主入口)· Phase: `P2`
> 规范:[../feature-design.md](../feature-design.md) · 队列:[P2-BACKLOG.md](P2-BACKLOG.md)
> 竞品对照:命理体系之生活向(能力同构,禁止算命/流年吉凶叙事)
---
## 1. 功能定义
| 字段 | 内容 |
|---|---|
| Name | 身心节律 |
| Purpose | 基于出生信息给出五行/体质倾向隐喻与作息·饮食·运动等生活建议 |
| Business Goal | 差异化护城河(数字性格 × 身心);导流节气陪伴与会员 |
| In | Out |
|---|---|
| 元素平衡、体质倾向、本周生活建议 | 流年吉凶、改命、疗效/治病承诺 |
| 与节气生活联动 | 八字/紫微作恐吓主标题 |
| GrowthReport 或 Constitution 聚合 | 医疗诊断 |
**与 2.5** 本 Spec 为身心探索的**唯一产品化主入口**;map 上 2.5 保留能力描述,入口文案统一「身心节律」。
---
## 2. 用户价值
1. **为何需要:** 想知道如何按自己的节奏安排生活,而不只是性格标签。
2. **完成后获得:** 节律概览、元素倾向、今日/本周生活建议;深度版含分维习惯方案。
3. **为何付费:** 完整习惯方案与长期节律计划。
---
## 3. 用户角色
| Actor | 能力 |
|---|---|
| Visitor+档案 | 基础节律报告 |
| DeepAccess/VIP | detail |
| 无档案 | 引导建档 |
---
## 4. 用户流程
```text
/rhythm 或探索入口
确认 Profile
生成节律报告(元素 · 倾向 · 生活建议)
基础 summary → 深度 detail(会员/深度版)
CTA:节气陪伴 / 问答「生活节奏」/ 分享
```
---
## 5. 页面设计
| 路由 | 页面 |
|---|---|
| `/rhythm` | LifeRhythmPageP2 draft |
| `/companion` | 节气联动出口 |
| `/reports/:id` | type=rhythm 详情 |
```text
/rhythm
├── Empty / Loading / Error
├── Normal(基础节律 + 生活建议)
└── Locked
```
---
## 6. 页面状态规范
| 状态 | UI |
|---|---|
| Loading | 分析中 |
| Empty | 无档案引导 |
| Error | 重试 |
| Normal | 维度 + 本周建议 |
| Locked | 深度版 CTA |
---
## 7. Business Rules
| ID | Rule |
|---|---|
| R1 | 绑定 Profilebirth_date 必填 |
| R2 | 确定性引擎(可参考遗留 yangsheng 思路,**新代码进 monorepo** |
| R3 | summary/detail 权益同画像(Membership DeepAccess |
| R4 | **禁止**:疗效、改善疾病、流年吉凶、改命、算命 |
| R5 | 推荐用语:体质倾向、生活建议、节律、平衡 |
| R6 | 可展示五行隐喻,须标注探索/非医疗 |
| R7 | 与星象性格、个人画像内容可互相链,不互相覆盖主路径 |
---
## 8. 数据模型影响
| 项 | 说明 |
|---|---|
| `growth_reports.type` | `rhythm` / `life_rhythm` |
| 或 Constitution 专用表 | 若需独立聚合,实现时 ADR |
| 禁止 | `luck_score`、病名诊断字段 |
---
## 9. API 需求(草案)
| Method | Path | 意图 |
|---|---|---|
| POST | `/api/v1/reports/rhythm` | profile_id → 报告 |
| GET | `/api/v1/reports/{id}` | 复用 |
| GET | `/api/v1/solar-terms/today` | 页内联动展示(已有) |
---
## 10. 权限设计
| 能力 | 有档案 | 深度权益 |
|---|---|---|
| summary | ✓ | ✓ |
| detail | ✗ | ✓ |
---
## 11. 埋点
| Event | 触发 |
|---|---|
| `rhythm_started` | 开始生成 |
| `rhythm_completed` | 基础结果 |
| `deep_access_clicked` | surface=rhythm |
| `rhythm_to_companion` | 去节气 |
---
## 12. 测试验收标准
**Given** 有生日档案
**When** 生成身心节律
**Then** 含生活建议;无「吉凶」「疗效」「算命」
**Given** 无权益
**When** GET detail
**Then** 剥离
**Given** 文案审查
**When** 扫 summary+detail
**Then** 符合 lexicon
---
## 13. AI 开发前检查
- [x] Spec 齐全 · 与 2.5 关系已写清
- [x] lexicon LifeRhythm
- [ ] OpenAPI/erd(编码时)
---
## 14. Implementation Notes
| 项 | 内容 |
|---|---|
| 复用 | ReportRich · membership · companion 节气 · 立项中医体质方向 |
| 参考勿迁 | 根目录 `yangsheng.html` 仅思路参考 |
| Packages | `internal/rhythm` · `LifeRhythmPage` `/rhythm` |
| 实现 | `POST /reports/rhythm` · OpenAPI 已登记 |
| 编码顺序 | P2-BACKLOG 切片 2 Done |