Files
group_xinghuo_jinrong/AGENTS.md
T
zhanghongyu_0626 2945108f66 feat(kb): Enhance knowledge base with new collections and search functionality
- Added new configuration for knowledge base root directory in `.env.example` and `settings.py`.
- Implemented `find_products` method in `CoreReadOnlyRepository` for fuzzy product search based on user queries.
- Introduced `search_cs_knowledge` function in `rag_service.py` to facilitate semantic search across new `fin_*` collections.
- Updated document parsing to support Markdown and YAML front-matter for knowledge base entries.
- Created multiple new FAQ and policy documents in the `data/kb_collections` directory to enrich the knowledge base.

This update significantly improves the knowledge retrieval capabilities for customer service interactions, ensuring more relevant and accurate responses.
2026-09-09 20:00:06 +08:00

2.4 KiB
Raw Blame History

Agent

无上下文时先读 docs/memory/MEMORY.md §0 交接清单(5 分钟了解仓库地图、bootstrap、禁止项、下一步)。

阅读顺序

顺序 文件 何时
1 docs/memory/MEMORY.md 每次任务
2 docs/memory/TODO.md 取当前待办
3 docs/memory/REQUIREMENTS.md 对照场景 ID(F/C/A/D/R)
4 docs/memory/FRAMEWORK.md 分层、选型、实现状态表
5 docs/memory/FLOW.md 端到端链路 + §0 bootstrap
6 docs/memory/ENVIRONMENT.md As-Is;Core 为模拟库

原文与深度文档

  • 业务需求:docs/需求拆解/
  • 代销平台 API 契约: docs/项目框架设计/接口契约-代销平台API-v0.1.md(canonical 路径 · 命名 · Agent 迁移表)
  • 行情 Phase B(草案): docs/项目框架设计/接口契约-代销平台API-v0.2-行情扩展草案.md · docs/项目框架设计/C-05-行情数据源选型对比.md
  • 表结构 SQL:docs/项目框架设计/表设计/
  • 技术选型 / JWT:docs/项目框架设计/技术选型和版本/
  • Core 模拟底座:docs/项目框架设计/Core模拟底座/
  • 业务记忆分层:docs/业务记忆管理/业务记忆管理手册.md

代码入口

app/main.py               # FastAPI:AL-09 已集成(宿主 TraceMiddleware + 模块 audit/trace + auth/chat/risk/simulate)
app/api/auth.py           # Mock 登录;JWT 统一走 auth_service.issue_dev_token
app/api/auth_adapter.py   # S2 接缝:module_auth_from_host(宿主 AuthContext → 模块 AuthContext)
app/api/chat.py           # 对话:POST "" + sessions 三端点(B)+ POST /stream SSE(C)
app/api/deps.py           # 模块鉴权工厂(Bearer 优先,dev debug 头兜底)+ 归属断言
app/gateway/              # 宿主 Wave 0 鉴权四件套(与 deps 双栈并存;模块禁止 import)
app/service/auth_service.py     # Auth SDK:JWT 验签/吊销/签发
app/config/settings.py    # 双库 + risk_* 阈值 + JWT(issuer/audience 统一)
app/repository/core_ro.py # Core 只读 + check_suitability(R-02)
scripts/core/reset.ps1    # 本地灌 Core 模拟库

当前分支: merger · 测试基线: python -m pytest → 730 passed, 0 skipped

技术选型硬阀门见 MEMORY 第 3、7 节。Cursor 以 .cursor/rules/project-memory.mdc 为准。