Commit Graph

21 Commits

Author SHA1 Message Date
caoxiaozhu
d139a63e64 refactor(server): 意图识别改 LLM 驱动,规则只做闲聊拦截+resume 兜底
规则不再判断'这是哪个业务场景'——那交给 LLM function call。
规则只保留两个不可替代职责:闲聊拦截(省 LLM 成本)、resume 确定性兜底。

- gate_classify 简化:删掉规则匹配门(94 词 CHOICE 匹配)和 ambiguous 提前判断
- 新增 _is_lightweight_off_topic:只拦 greeting+meaningless,不依赖业务关键词
- HANDLER_ONLY 改为 LLM 输出驱动:LLM 返回 query_travel_standard 后转 handler
- 图拓扑简化:gate_classify 只输出 off_topic|resume|model_intent
- 验证:76 passed;复合场景'出差并且报销招待费'→LLM 返回 2 task
2026-06-26 10:19:04 +08:00
caoxiaozhu
992cf71fa1 refactor(server): Phase 1 图拓扑重构 - LangGraph 成为唯一编排者
P1.3-P1.7:把 endpoint 补丁搬进图节点,门控收敛到 gate_classify 单一决策点。

- StewardGraphState 扩展:recent_history/steward_state/gate_decision/gate_scene_id/conversation_id
- 新增 5 个图节点:load_context(读历史+state)/gate_classify(统一门控)/execute_scene_handler/resume_recent_task/pending_flow wrapper
- 图拓扑从 5 节点重构为 10 节点:load_context → gate_classify → {off_topic/handler_only/resume/ambiguous/model_intent} → attach_action_steps
- gate_classify 四步裁决:resume门 → off_topic门 → 规则匹配门 → LLM门
- resume 门控优先于 off_topic,避免'再提交'被误判闲聊
- schema 放宽 planning_source/next_action Literal → str,支持 scene_handler:*/context_resume/answer_only
- endpoint 按 planner 类型分发 build_plan(LangGraph 接 db,legacy 不接)
- 76 passed + 4 场景端到端验证(出差申请/再提交/查差旅标准/闲聊)
2026-06-25 15:44:20 +08:00
caoxiaozhu
54356ba81a refactor(server): scene 注册表骨架 + 统一门控管道设计文档
Phase 1 P1.1-P1.2:为后端门控收口提供声明式场景注册基础设施。

- 新建 scenes/ 目录:gate_rules(GateRule/SceneRoute 枚举)、scene_descriptor(SceneDescriptor dataclass)、scene_registry(SceneRegistry 单例)
- 3 个场景迁入 descriptor:expense_application / reimbursement / query_travel_standard
- __init__.py 的 bootstrap_scenes 在 import 时注册 + 运行时绑定 handler/builder/executor(解决循环 import)
- 查询场景 priority=50 优先于 MODEL_ONLY 场景,确保规则匹配先于 LLM
- 落地 UNIFIED_GATE_PIPELINE.md 架构文档:目标架构 / 验收标准(接入 O(1))/ 3 阶段迁移路径
- 76 passed,scene 注册表未破坏现有代码;与 intent_registry 暂时并存,P1.3-P1.8 会统一迁移
2026-06-25 15:09:16 +08:00
caoxiaozhu
606a88c805 chore: stewardPlanModel 适配注册表动作结构并更新规则表与日志
- stewardPlanModel 适配新的意图注册表动作步骤结构
- 更新交通/通信/差旅等财务规则表,补 2026-06-25 work-log
2026-06-25 11:50:11 +08:00
caoxiaozhu
d321005044 chore: 更新公司通信费规则表与 AI 意图规划/work-log 文档 2026-06-25 10:56:00 +08:00
caoxiaozhu
4d8a606cd6 chore(skills): date-scope development docs 2026-06-25 09:25:28 +08:00
caoxiaozhu
23f7de6cbf chore(skills): add development docs writer 2026-06-25 09:19:37 +08:00
caoxiaozhu
a12c4bea64 chore: 更新公司通信费规则表、work-log 与 superpowers specs 文档 2026-06-24 22:59:10 +08:00
caoxiaozhu
a0f6d9f702 chore: 更新 .env.example、财务规则表与 AI 意图规划开发文档 2026-06-24 21:59:15 +08:00
caoxiaozhu
545b31d32f chore(env): docker-compose 端口与服务配置微调并更新规则表与日志
- docker-compose(.full).yml 与 start.sh 微调端口/服务配置
- AGENTS.md 同步更新协作规范
- 更新交通/通信/差旅等财务规则表,补 2026-06-24 work-log
2026-06-24 12:36:03 +08:00
caoxiaozhu
f9553a6a1a docs: 清理过期计划文档并补全 work-log 与开发/用户文档
- 删除已落地的 improvement-roadmap、superpowers 计划与 ui-mockups 参考稿,删除早期 work-log(2026-05-06~08)
- 新增 2026-05-23 起的 work-log 与 attachment-association-background-job、reimbursement-draft-action-branching 等开发文档及用户文档
- docker-compose(.full).yml 微调服务配置
2026-06-24 10:42:57 +08:00
c2315f68dc fix: 修复 Docker 部署 API 地址与数据库连接问题 2026-05-09 09:29:34 +08:00
adda87a01d feat: add system settings with model connectivity and encrypted storage 2026-05-08 08:56:52 +08:00
b8ba0ea6a0 feat: add auth module with login and access control 2026-05-07 14:34:42 +08:00
2d56bc2889 feat: enhance employee CRUD with search, filters, and security module 2026-05-07 13:48:00 +08:00
c00db75c13 feat: add employee management, backend health check, and UI improvements 2026-05-07 11:50:10 +08:00
a5db09f41e docs: update work log with commit details and problem/solution
- Add commit file changes statistics
- Add Problem/Solution sections
- Add What's Done/Not Done sections

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-06 22:29:02 +08:00
62f7810bd0 docs: restore full work log with commit history
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-06 22:26:59 +08:00
f1dcfcfebf docs: update work log with git commits
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-06 22:25:48 +08:00
04e4b7148c docs: add work log for 2026-05-06
- Fix server/start.sh venv issue on Windows/Git Bash
- Create work-log skill for project documentation
- Add SetupView and routing refactoring

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-06 22:25:01 +08:00
ae63766c91 Add vue-router, login/setup flow and backend logging
Refactor frontend to route-based navigation with vue-router, add
system setup and login pages with API integration. Add structured
logging, access-log middleware and startup lifecycle to FastAPI
backend.
2026-05-06 22:23:42 +08:00