Skip to content

claude/谭聪#36

Open
tancong430481 wants to merge 1 commit into
lights-think:masterfrom
tancong430481:master
Open

claude/谭聪#36
tancong430481 wants to merge 1 commit into
lights-think:masterfrom
tancong430481:master

Conversation

@tancong430481
Copy link
Copy Markdown

完成了哪些能力点

  • P0: 任务执行闭环、Agent 计划与工具执行、意图歧义处理、可恢复执行
  • P1: RAG 权限感知检索与引用溯源、提示词注入防护、工具边界与权限矩阵、敏感字段脱敏
  • P2: 管理后台指标(平均耗时、最近失败、权限拒绝计数)

核心设计思路

  • Planner: 正则提取 SKU(SKU-{code})和意图关键词("只分析"/"审批"/"补货"),不写死业务数据
  • Executor: 模板渲染实现步骤间数据传递;OA 权限运行时校验
  • 脱敏: 移除 vendor_secret/unit_cost_usd,确保结果、事件和审计日志不出现
  • 知识库安全: 文档正文视为不可信数据,避免提示词注入

本地验证结果

  • python scripts/self_check.py — 4 passed
  • python -m pytest -q — 10 passed

已知风险与取舍

  • SKU 识别依赖 SKU- 前缀,非标准格式可能无法提取
  • Token 成本追踪为固定 +1,未做精确分步统计
  • 知识库答案基于余弦相似度 + 文本拼接,无 LLM 摘要能力
  • SQLite 单连接写入在高并发下可能有性能瓶颈

兼容性

全部扩展向后兼容,审计动作使用 README 规定的标准名称(approval.draft.create)。

AI 使用说明

  • 主要 AI:Claude Code / Claude Opus 4
  • 承担工作:全部代码补全、测试验证、文档填写

P0:
- Planner: SKU 提取 + 意图识别 + 确定性工具计划
- Executor: 多步骤执行、入参渲染、错误处理、OA 权限校验、敏感字段脱敏、业务结果汇总
- Worker: 完整 Planner -> Executor 后台流程

P1:
- KnowledgeIndex: 权限感知检索、余弦排序、引用溯源(doc_id/title/source_path/chunk_id)
- 提示词注入检测集成到任务创建路径
- 权限拒绝审计日志(mallory 创建任务等)
- OA 写操作前运行时权限检查
- Run 可见性校验(所有者/管理员)
- 不存在 run 返回 404

P2:
- Dashboard: 平均耗时、最近失败列表、权限拒绝计数
- 验收测试 xfail 标记移除

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant