Add core database support and enhance documentation
- Introduced `MYSQL_CORE_DATABASE` in `.env.example` and `settings.py` for core database configuration. - Added `CoreReadOnlyRepository` for read-only access to the `jinrong_core` database. - Updated `AGENTS.md`, `README.md`, and various documentation files to reflect new agent onboarding processes and project structure. - Revised requirements in `requirements.txt` to include `langgraph` and `langchain-core`. - Enhanced `FLOW.md` with local bootstrap instructions for setting up the core simulation environment. - Added new scripts for database creation and seeding for the core simulation library. - Improved overall documentation for clarity on project architecture and memory management. - Updated `TODO.md` to reflect current development priorities and tasks.
This commit is contained in:
+18
-14
@@ -1,6 +1,7 @@
|
||||
# 服务对象大环境(现状 / As-Is)
|
||||
|
||||
> 来源:`docs/需求拆解/业务场景优先级清单.md`、`docs/需求拆解/用户故事/`
|
||||
> 来源:`docs/需求拆解/业务场景优先级清单.md`、`docs/需求拆解/用户故事/`
|
||||
> **Core 说明:** 生产环境应以真实 Core 为 L0 权威;**本项目无真实 Core**,开发用 `jinrong_core` 模拟库(见 `docs/项目框架设计/Core模拟底座/`)。
|
||||
|
||||
------
|
||||
|
||||
@@ -13,7 +14,7 @@
|
||||
| 内部员工 | 分析、运营、合规 | 问数、报表、抽检会话、协同风控 |
|
||||
| 风控 / 合规官 | 风控专员 | 监测大额/适当性/AML;人工审核,不自动冻户 |
|
||||
|
||||
**Core:** 持仓、流水、交易、正式风险等级、客户-代理人归属的权威来源。
|
||||
**L0 权威来源(本项目):** MySQL `jinrong_core` 模拟库 — 客户、C1~C5、持仓、流水、产品、代理人-客户归属。Agent 代码经 `CoreReadOnlyRepository` **只读 SELECT**,不提供 HTTP Core API。
|
||||
|
||||
------
|
||||
|
||||
@@ -24,26 +25,28 @@
|
||||
- **内部分析**:SQL 或 IT 导表。
|
||||
- **风控**:事后/T+1 发现异常;适当性靠交易前规则;AML 批处理或人工。
|
||||
|
||||
Agent **尚未上线**。
|
||||
Agent **尚未上线**;后端为脚手架 + 模拟数据,无生产接入。
|
||||
|
||||
------
|
||||
|
||||
## 3. 主路径(现状)
|
||||
## 3. 主路径(现状 → 模拟后)
|
||||
|
||||
1. 开户/测评 → Core 写 L0(C1~C5、归属代理人)
|
||||
2. 交易 → Core 流水;交易前适当性(若有)
|
||||
3. 代理人服务 → 查 Core + 口头沟通(无统一 L2 画像库)
|
||||
4. 风控 → 规则/人工台账;合规事后抽检
|
||||
1. 开户/测评 → Core(模拟:`core_customer` + `core_customer_risk`)写 L0
|
||||
2. 交易 → Core 流水(模拟:`core_trade`);交易前适当性(R-02 待实现)
|
||||
3. 同步 → `sync_advisor_rel.py` 写入 agent 库 `customer_advisor_rel`;`sync_neo4j.py` 灌关系图
|
||||
4. 代理人服务 → 查 Core RO + 口头沟通(L2 画像表待业务实现)
|
||||
5. 风控 → 规则/人工台账;合规事后抽检
|
||||
|
||||
------
|
||||
|
||||
## 4. 环境里的关键对象
|
||||
|
||||
| 名称 | 含义 |
|
||||
| --- | --- |
|
||||
| L0 正式档案 | customer_id、C1~C5、年龄、职业、advisor |
|
||||
| 持仓/流水 | 产品、份额、盈亏 |
|
||||
| 代理人-客户归属 | customer_advisor_rel(Core 同步) |
|
||||
| 名称 | 含义 | 本项目存储 |
|
||||
| --- | --- | --- |
|
||||
| L0 正式档案 | customer_id、C1~C5、年龄、职业、advisor | `jinrong_core.core_*` |
|
||||
| 持仓/流水 | 产品、份额、盈亏 | `core_holding` / `core_trade` |
|
||||
| 代理人-客户归属 | 服务关系 | Core 种子 → 同步 `jinrong_agent.customer_advisor_rel` |
|
||||
| Agent 会话/画像/审计 | 平台业务数据 | `jinrong_agent`(11 共用表 + agent 专用表) |
|
||||
|
||||
------
|
||||
|
||||
@@ -51,5 +54,6 @@ Agent **尚未上线**。
|
||||
|
||||
```text
|
||||
痛点:客户看不清持仓与规则;代理人多系统慢、话术易违规;问数靠 SQL;风控感知滞后
|
||||
不能动:正式 C1~C5 仅测评/人工变更;事实账以 Core 为准;监管要求审计与适当性
|
||||
不能动:正式 C1~C5 仅测评/人工变更;事实账以 Core 为准(模拟库亦只读);监管要求审计与适当性
|
||||
模拟边界:不模拟 TA/清算/报盘;种子数据静态净值可接受;Neo4j 由同步脚本维护
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user