Files
digital-psychology/.ai/domain/domain-map.md
T
jackyu66gitandCursor 93227d3316 feat(ECR-020): QualityFeedback 问答质量反馈并 Closed
新增 ask_quality_feedback、运营/C端评分 API 与 admin-h5 问答反馈区;禁改消息/UGC/真支付。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 23:02:13 +08:00

66 lines
3.0 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.
# Domain Map — 冻结(P1 工程真源)
变更本文件或 ERD 需简短 ADR。词汇:[../domain.md](../domain.md) · ERD[erd.md](erd.md) · API`proto/openapi.yaml` · Go 边界:[../architecture/go-services.md](../architecture/go-services.md)
---
## Bounded Contexts
| Context | Aggregates | P1 | Owner package |
|---|---|---|---|
| Identity | User, Session, DeviceIdentity | Yes | `internal/service/user` |
| Profile | Profile | Yes | `internal/service/profile` |
| Discovery | Portrait, Scale, ScaleResult, GrowthReport | Yes | `portrait`, `scale`, `report` |
| Relation | RelationInsight | Yes **必做** | `relation` |
| Ask | AskThread, AskMessage, AskQuota | Demo(规则引擎) | `ask` |
| Companion | Mood, SolarTerm | P2 | `internal/companion` · `/solar-terms/today` · `/moods` |
| StarProfile | StarProfile report | P2 | `internal/star` · `POST /reports/star` |
| LifeRhythm | LifeRhythm / Constitution | P2 | `internal/rhythm` · `POST /reports/rhythm` |
| ImageCard | ImageCard draw + deck | P2 | `internal/imagecard` · `/image-cards/*` |
| Memory | MemoryItem | P2/P3 | `memory` |
| Commerce | Subscription, Membership, Order, Payment, DeepAccess | Yes mock | `order`, `membership` |
| Consult | — | P3 | — |
---
## Ops Platform Bounded ContextsWave 0 Draft
> 详细 owns/forbidden[`boundary-rules.md`](boundary-rules.md) · 词表:[`glossary.yaml`](glossary.yaml) · 实体:[`entity-catalog.md`](entity-catalog.md)
> 归档:`docs/WAVE0/domain/` · Capability`docs/WAVE0/capability/ops-capability-map.md`
> **不修改**上方 P1 不变量;Ops BC 实现须独立 ECR。
| Context | Capability | Status |
|---|---|---|
| Admin_Auth_Audit | AdminGovernance | Shipped Ops-A |
| Admin_RBAC | AdminGovernance | Draft → ECR-013A |
| Analytics_OpsB | GrowthInsights / UserIntelligence(read) | Shipped Ops-B |
| Ops_Content | ExploreConfig (partial) | Shipped Ops-C |
| Account_Risk | AccountLifecycle | Spec via ECR-013BIdentity_Profile owns UserStatus |
| Content_Safety | ContentSafety · CrisisCare | ContentSafety **ECR-019**FilterRule);CrisisCare Draft |
| Ask_Ops | AskOperations · AICoreConfig | AskOperations **ECR-017/020**AICoreConfig Draft |
| Ops_CMS_NoUGC | OpsCMS | Draft |
| Community | — | **Forbidden** |
---
## Context diagram
```
Identity → Profile → Discovery(Portrait/Scale/GrowthReport)
↘ RelationInsight ← P1 双引擎
↘ Ask (+ Memory later)
↘ Companion
Commerce(DeepAccess/Membership)
```
---
## Invariants
1. GrowthReport 完整字段仅当 Membership active **或** DeepAccess 存在。
2. Ask 必须绑定 `profile_id`Self 或 Other)。
3. RelationInsight 引用两个 Profile;禁止无档案的「合婚」式空算。
4. 客户端不可信任本地「已深度版」标志。
5. 档案表不存吉凶列;**报告 JSON payload 允许**运势分/匹配指数(如 `fortune.daily.score``love_index`)。