Enhance suitability assessment and documentation

- Implemented `check_suitability` method in `CoreReadOnlyRepository` for suitability determination based on customer and product risk levels.
- Added `build_suitability_log_row` function in `suitability.py` for mapping suitability check results to `risk_suitability_log`.
- Updated `AGENTS.md`, `ENVIRONMENT.md`, and `FLOW.md` to reflect changes in suitability assessment processes and documentation.
- Revised `FRAMEWORK.md` and `MEMORY.md` to clarify project structure and data flow related to suitability checks.
- Expanded `TODO.md` with tasks related to logging and auditing suitability assessments.
This commit is contained in:
2026-09-07 11:15:30 +08:00
parent 1ddd44a6cb
commit 3fb0ceb334
44 changed files with 7479 additions and 250 deletions
+3 -3
View File
@@ -14,7 +14,7 @@
| 内部员工 | 分析、运营、合规 | 问数、报表、抽检会话、协同风控 |
| 风控 / 合规官 | 风控专员 | 监测大额/适当性/AML;人工审核,不自动冻户 |
**L0 权威来源(本项目):** MySQL `jinrong_core` 模拟库 — 客户、C1~C5、持仓、流水、产品、代理人-客户归属。Agent 代码经 `CoreReadOnlyRepository` **只读 SELECT**,不提供 HTTP Core API。
**L0 权威来源(本项目):** MySQL `jinrong_core` 模拟库 — KYC、正式 C1~C5、C×R 适当性矩阵、持仓、流水、产品(起购/期限)、代理人-客户归属。Agent 经 `CoreReadOnlyRepository` **只读 SELECT**;R-02 计算在 `check_suitability()`,落库契约见表设计/07。
------
@@ -32,7 +32,7 @@ Agent **尚未上线**;后端为脚手架 + 模拟数据,无生产接入。
## 3. 主路径(现状 → 模拟后)
1. 开户/测评 → Core(模拟:`core_customer` + `core_customer_risk`)写 L0
2. 交易 → Core 流水(模拟:`core_trade`);交易前适当性(R-02 待实现)
2. 交易 → Core 流水(模拟:`core_trade`);交易前适当性:`check_suitability` 已实现,风控 service 落 log 待做(R-02)
3. 同步 → `sync_advisor_rel.py` 写入 agent 库 `customer_advisor_rel`;`sync_neo4j.py` 灌关系图
4. 代理人服务 → 查 Core RO + 口头沟通(L2 画像表待业务实现)
5. 风控 → 规则/人工台账;合规事后抽检
@@ -43,7 +43,7 @@ Agent **尚未上线**;后端为脚手架 + 模拟数据,无生产接入。
| 名称 | 含义 | 本项目存储 |
| --- | --- | --- |
| L0 正式档案 | customer_id、C1~C5、年龄、职业、advisor | `jinrong_core.core_*` |
| L0 正式档案 | customer_id、KYC、C1~C5、风评过期、advisor | `jinrong_core.core_customer` / `core_customer_risk` |
| 持仓/流水 | 产品、份额、盈亏 | `core_holding` / `core_trade` |
| 代理人-客户归属 | 服务关系 | Core 种子 → 同步 `jinrong_agent.customer_advisor_rel` |
| Agent 会话/画像/审计 | 平台业务数据 | `jinrong_agent`(11 共用表 + agent 专用表) |