Files
digital-psychology/.ai/domain/boundary-rules.md
T
jackyu66gitandCursor 27f27a1cb2 docs: freeze WAVE0 domain foundation and contract governance
Mark WAVE0 FROZEN CANDIDATE for Human Review; docs + .ai domain/product only — no apps or migrations.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 16:20:11 +08:00

240 lines
4.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.
# Bounded Context Boundary Rules
> Wave 0 · **P0 资产** · AI / Engineer 只读;变更须 Architect + Human
> 运行时权威副本:`.ai/domain/boundary-rules.md`
Status: `Draft`Human Review 后 Frozen
---
## 如何读
- **owns**:该 BC **唯一写权威**(修改入口)。
- **does_not_own**:明示禁止「顺手改」。
- **allowed**:允许的依赖(多为读或经门面)。
- **forbidden**:禁止的依赖(含跨 BC 写支付/会员等)。
违反本文件 = Reviewer **BLOCK**(架构回归)。
---
## Admin_Auth_Audit
```yaml
Admin_Auth_Audit:
owns:
- AdminAccount
- AdminSession
- AuditLog
does_not_own:
- UserStatus
- MembershipPlan
- Entitlement
allowed:
- Admin_RBAC.read
forbidden:
- Payment.write
- C端业务聚合根的隐式写入
```
## Admin_RBAC
```yaml
Admin_RBAC:
owns:
- AdminRole
- AdminPermission
does_not_own:
- User
- Profile
- Membership
allowed:
- Admin_Auth_Audit.write_audit
forbidden:
- Payment
- Membership.write
- DeviceAuth.user_token_issue
```
## Identity_Profile
```yaml
Identity_Profile:
owns:
- User
- Profile
- DeviceIdentity
- UserStatus
- BehaviorSnapshot
- PsychologicalTagSet
does_not_own:
- MembershipPlan
- Entitlement
- Order
- Payment
- RedemptionCode
allowed:
- Analytics_OpsB.read
forbidden:
- Payment
- Membership.write
```
## Membership_Orders
```yaml
Membership_Orders:
owns:
- MembershipPlan
- Entitlement
- Membership
- Order
- DeepAccess
- RedemptionCode
- Payment # mock 今;真支付适配器后置,仍归本 BC
does_not_own:
- UserStatus
- AdminRole
- FilterRule
allowed:
- Identity_Profile.read
forbidden:
- Ask_Ops.write_prompt
- Content_Safety.rule_mutate_via_order
```
## Analytics_OpsB
```yaml
Analytics_OpsB:
owns:
- AnalyticsSession
- AnalyticsEvent
does_not_own:
- User
- Membership
allowed:
- Identity_Profile.read_ids_only
forbidden:
- Payment
- 采集 PII 正文(生日/问答全文等)
```
## Ops_Content
```yaml
Ops_Content:
owns:
- HomeTool
- ScalePublishState
does_not_own:
- Scale 题目正文编辑器(未开 ECR 前禁止扩张)
allowed:
- Explore_Reports.publish_gate
forbidden:
- Community
- Payment
```
## Account_Risk
```yaml
Account_Risk:
owns:
- RiskFlag
- BanRecord
does_not_own:
- MembershipPlan
allowed:
- Identity_Profile.UserStatus.transition # 经明确应用服务
- Admin_Auth_Audit.write_audit
forbidden:
- Payment.refund_silent
```
## Content_Safety
```yaml
Content_Safety:
owns:
- FilterRule
- ModerationCase
- BlockPolicy
- CrisisEvent
- CrisisPolicy
does_not_own:
- Membership
- Payment
- AdminRole
allowed:
- Identity_Profile.read
- Ask_Ops.read_session_meta
forbidden:
- Membership.write
- Payment
```
## Ask_Ops
```yaml
Ask_Ops:
owns:
- AskSessionView
- QualityFeedback
- HandoffCase
- SystemPrompt
- KnowledgeSource
- KnowledgeChunk
- ToolDefinition
does_not_own:
- Payment
- MembershipPlan
- UserStatus
allowed:
- Identity_Profile.read
- Content_Safety.evaluate
forbidden:
- Payment
- Membership.write
- Admin_RBAC.write
```
## Ops_CMS_NoUGC
```yaml
Ops_CMS_NoUGC:
owns:
- Banner
- FeedSlot
- ScheduledPublication
does_not_own:
- UGC Post
- CommentGraph
- TrustScore
allowed:
- Admin_RBAC.check
forbidden:
- Community
- 用户生成内容入库为主路径
```
## Community
```yaml
Community:
status: Forbidden
owns: []
note: feature-map UGC 广场 [No];开启须 L3 ADR + 新 Capability
```
---
## 反模式(禁止)
```text
AskService → load User → update Membership → charge Payment
UserService.updateMembership()
Content_Safety 直接改 Entitlement
Ops_CMS 引入「用户帖子」表却声称 NoUGC
```