Files
aiagent/misc/issues_open.json
renjianbo beff3fac8d fix: delete agent 500 error + dynamic personality + deployment guide
- Fix delete agent 500: clean up FK records (agent_llm_logs, permissions,
  schedules, executions, team_members) and unbind goals/tasks before delete
- Remove hardcoded personality templates in Android, replace with dynamic
  system prompt generation from name + description
- Set promptSectionsEnabled=false to bypass PromptComposer for personality
- Add Tencent Cloud Linux deployment guide (Docker Compose)
- Accumulated backend service updates, frontend UI fixes, Android app changes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-29 01:17:21 +08:00

2 lines
33 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[{"id":84,"url":"http://101.43.95.130:3001/api/v1/repos/admin/aiagent/issues/66","html_url":"http://101.43.95.130:3001/admin/aiagent/issues/66","number":66,"user":{"id":1,"login":"admin","login_name":"","source_id":0,"full_name":"","email":"263303411@qq.com","avatar_url":"http://101.43.95.130:3001/avatars/9f89f41683d9730fc0abe566f120891a","html_url":"http://101.43.95.130:3001/admin","language":"zh-CN","is_admin":true,"last_login":"2026-04-30T00:13:32+08:00","created":"2025-12-19T11:20:47+08:00","restricted":false,"active":true,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":0,"following_count":0,"starred_repos_count":0,"username":"admin"},"original_author":"","original_author_id":0,"title":"[知识进化] 知识进化仪表盘 — 知识图谱/进化历史/效果度量","body":"## 目标\n前端页面可视化展示知识自进化的全过程让用户看到平台在变聪明。\n\n## 页面模块\n\n### 1. 知识增长曲线\n- 知识条目数量随时间增长\n- 按类别分布bug_fix/best_practice/optimization\n- 知识被检索次数排行\n\n### 2. 进化历史时间线\n- 展示每次自动优化:瓶颈发现 → 优化方案 → 应用 → 效果对比\n- 展示每次策略调整:反馈触发 → 策略更新 → 下次准确率\n\n### 3. 效果度量\n- Agent 成功率趋势(进化前 vs 进化后)\n- 平均响应时间趋势\n- 用户满意度趋势\n- 知识复用率\n\n### 4. 知识图谱\n- D3/vis.js 可视化知识之间的关系\n- 节点:知识条目,边:引用/相似/演化关系\n\n## 新增文件\n- frontend/src/views/KnowledgeEvolution.vue\n- frontend/src/stores/knowledge.ts\n- 路由:/knowledge-evolution","ref":"","assets":[],"labels":[],"milestone":null,"assignee":null,"assignees":null,"state":"open","is_locked":false,"comments":0,"created_at":"2026-05-10T15:32:20+08:00","updated_at":"2026-05-10T15:32:20+08:00","closed_at":null,"due_date":null,"time_estimate":0,"pull_request":null,"repository":{"id":27,"name":"aiagent","owner":"admin","full_name":"admin/aiagent"},"pin_order":0},{"id":83,"url":"http://101.43.95.130:3001/api/v1/repos/admin/aiagent/issues/65","html_url":"http://101.43.95.130:3001/admin/aiagent/issues/65","number":65,"user":{"id":1,"login":"admin","login_name":"","source_id":0,"full_name":"","email":"263303411@qq.com","avatar_url":"http://101.43.95.130:3001/avatars/9f89f41683d9730fc0abe566f120891a","html_url":"http://101.43.95.130:3001/admin","language":"zh-CN","is_admin":true,"last_login":"2026-04-30T00:13:32+08:00","created":"2025-12-19T11:20:47+08:00","restricted":false,"active":true,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":0,"following_count":0,"starred_repos_count":0,"username":"admin"},"original_author":"","original_author_id":0,"title":"[知识进化] 新工具自动发现与集成 — 监控市场,自动学习接入","body":"## 目标\n当平台新增工具或外部工具市场发布新工具时系统自动发现、评估、集成。\n\n## 发现渠道\n- 平台内:工具市场上新(已有 tools 表)\n- 外部GitHub trending / MCP 工具市场 / API 发布\n- 用户请求:\"能不能接一个XX工具\"(计入需求池)\n\n## 自动评估\n- 读取工具描述/API 文档\n- LLM 分析:这个工具能解决平台当前哪些痛点?\n- 匹配度评分(结合平台现有 Agent/工作流场景)\n- 生成集成方案(需要的 adapter、参数映射\n\n## 自动集成\n- 匹配度 \u003e 80%:自动生成 tool adapter 代码\n- 生成测试用例\n- 注册为 builtin tool\n- 通知管理员确认后上线\n\n## 新增文件\n- backend/app/services/tool_discovery.py\n- backend/app/tools/auto_adapter.py\n- Celery 定时每6小时扫描一次","ref":"","assets":[],"labels":[],"milestone":null,"assignee":null,"assignees":null,"state":"open","is_locked":false,"comments":0,"created_at":"2026-05-10T15:32:20+08:00","updated_at":"2026-05-10T15:32:20+08:00","closed_at":null,"due_date":null,"time_estimate":0,"pull_request":null,"repository":{"id":27,"name":"aiagent","owner":"admin","full_name":"admin/aiagent"},"pin_order":0},{"id":82,"url":"http://101.43.95.130:3001/api/v1/repos/admin/aiagent/issues/64","html_url":"http://101.43.95.130:3001/admin/aiagent/issues/64","number":64,"user":{"id":1,"login":"admin","login_name":"","source_id":0,"full_name":"","email":"263303411@qq.com","avatar_url":"http://101.43.95.130:3001/avatars/9f89f41683d9730fc0abe566f120891a","html_url":"http://101.43.95.130:3001/admin","language":"zh-CN","is_admin":true,"last_login":"2026-04-30T00:13:32+08:00","created":"2025-12-19T11:20:47+08:00","restricted":false,"active":true,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":0,"following_count":0,"starred_repos_count":0,"username":"admin"},"original_author":"","original_author_id":0,"title":"[知识进化] 用户反馈学习 — 点踩/修改后自动调整 Agent 策略","body":"## 目标\n用户对 Agent 输出点踩或手动修改后,系统自动学习,不在同样场景犯同样错误。\n\n## 反馈信号采集\n- 点踩thumbs down\n- 手动修改 Agent 输出后保存\n- 用户说\"不对\"\"重新来\"\"换个方式\"\n- 同一问题反复问(暗示上次回答不满)\n- Task 被驳回approval rejected\n\n## 学习机制\n- 收集 (输入, 输出, 反馈) 三元组\n- 聚类相似场景embedding 相似度)\n- 生成策略调整:避免产生类似被否定的输出\n- 更新 Agent system prompt追加反例\n- 或在知识库中记录\"这种场景不要这样做\"\n\n## 策略调整方式\n- 追加 negative examples 到 prompt\n- 调整 Agent 的 temperature踩多→降温\n- 替换使用的工具链\n- 推荐更换模型\n\n## 新增文件\n- backend/app/services/feedback_learner.py\n- backend/app/models/feedback_record.py\n- Celery 定时:每天汇总反馈,生成策略调整建议","ref":"","assets":[],"labels":[],"milestone":null,"assignee":null,"assignees":null,"state":"open","is_locked":false,"comments":0,"created_at":"2026-05-10T15:32:19+08:00","updated_at":"2026-05-10T15:32:19+08:00","closed_at":null,"due_date":null,"time_estimate":0,"pull_request":null,"repository":{"id":27,"name":"aiagent","owner":"admin","full_name":"admin/aiagent"},"pin_order":0},{"id":81,"url":"http://101.43.95.130:3001/api/v1/repos/admin/aiagent/issues/63","html_url":"http://101.43.95.130:3001/admin/aiagent/issues/63","number":63,"user":{"id":1,"login":"admin","login_name":"","source_id":0,"full_name":"","email":"263303411@qq.com","avatar_url":"http://101.43.95.130:3001/avatars/9f89f41683d9730fc0abe566f120891a","html_url":"http://101.43.95.130:3001/admin","language":"zh-CN","is_admin":true,"last_login":"2026-04-30T00:13:32+08:00","created":"2025-12-19T11:20:47+08:00","restricted":false,"active":true,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":0,"following_count":0,"starred_repos_count":0,"username":"admin"},"original_author":"","original_author_id":0,"title":"[知识进化] 工作流自动优化 — 瓶颈节点自动调整 DAG 结构","body":"## 目标\n检测到瓶颈后系统自动生成优化方案供用户确认。\n\n## 优化策略\n| 瓶颈类型 | 自动优化方案 |\n|---------|------------|\n| 单节点耗时长 | 拆分为多个并行子节点 |\n| 频繁失败 | 增加前置校验节点 + 重试逻辑 |\n| LLM Token 过高 | 增加摘要/压缩节点 |\n| 依赖链过长 | 分析可并行化的节点,重组 DAG |\n| 空转等待 | 增加缓存节点,跳过重复计算 |\n\n## 工作流\n1. bottleneck_detector 识别瓶颈\n2. optimization_engine 生成优化方案DAG diff\n3. 通过飞书/站内通知用户确认\n4. 用户确认后自动应用(创建新版本工作流)\n5. A/B 对比新旧工作流效果\n\n## 新增文件\n- backend/app/services/workflow_optimizer.py\n- 前端优化方案预览页DAG 对比视图)","ref":"","assets":[],"labels":[],"milestone":null,"assignee":null,"assignees":null,"state":"open","is_locked":false,"comments":0,"created_at":"2026-05-10T15:32:19+08:00","updated_at":"2026-05-10T15:32:19+08:00","closed_at":null,"due_date":null,"time_estimate":0,"pull_request":null,"repository":{"id":27,"name":"aiagent","owner":"admin","full_name":"admin/aiagent"},"pin_order":0},{"id":80,"url":"http://101.43.95.130:3001/api/v1/repos/admin/aiagent/issues/62","html_url":"http://101.43.95.130:3001/admin/aiagent/issues/62","number":62,"user":{"id":1,"login":"admin","login_name":"","source_id":0,"full_name":"","email":"263303411@qq.com","avatar_url":"http://101.43.95.130:3001/avatars/9f89f41683d9730fc0abe566f120891a","html_url":"http://101.43.95.130:3001/admin","language":"zh-CN","is_admin":true,"last_login":"2026-04-30T00:13:32+08:00","created":"2025-12-19T11:20:47+08:00","restricted":false,"active":true,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":0,"following_count":0,"starred_repos_count":0,"username":"admin"},"original_author":"","original_author_id":0,"title":"[知识进化] 工作流瓶颈自动检测 — 统计分析节点耗时/失败率","body":"## 目标\n自动分析工作流执行数据发现经常卡住的节点给出优化建议。\n\n## 检测指标\n- 节点平均耗时P50/P95/P99\n- 节点失败率\n- 节点重试率\n- 节点间等待时间\n- 资源消耗LLM token 用量、工具调用次数)\n\n## 瓶颈判定规则\n- 某节点 P95 耗时 \u003e 所有节点平均 P95 的 3 倍 → 瓶颈节点\n- 某节点失败率 \u003e 20% → 问题节点\n- 某节点工具调用次数 \u003e 10 → 效率低下\n\n## 输出\n- 瓶颈节点列表(按严重程度排序)\n- 优化建议(拆分子任务 / 更换模型 / 增加超时 / 添加重试)\n\n## 新增文件\n- backend/app/services/bottleneck_detector.py\n- Celery 定时:每天凌晨分析昨日数据\n- 前端:工作流详情页新增瓶颈分析 tab","ref":"","assets":[],"labels":[],"milestone":null,"assignee":null,"assignees":null,"state":"open","is_locked":false,"comments":0,"created_at":"2026-05-10T15:32:18+08:00","updated_at":"2026-05-10T15:32:18+08:00","closed_at":null,"due_date":null,"time_estimate":0,"pull_request":null,"repository":{"id":27,"name":"aiagent","owner":"admin","full_name":"admin/aiagent"},"pin_order":0},{"id":79,"url":"http://101.43.95.130:3001/api/v1/repos/admin/aiagent/issues/61","html_url":"http://101.43.95.130:3001/admin/aiagent/issues/61","number":61,"user":{"id":1,"login":"admin","login_name":"","source_id":0,"full_name":"","email":"263303411@qq.com","avatar_url":"http://101.43.95.130:3001/avatars/9f89f41683d9730fc0abe566f120891a","html_url":"http://101.43.95.130:3001/admin","language":"zh-CN","is_admin":true,"last_login":"2026-04-30T00:13:32+08:00","created":"2025-12-19T11:20:47+08:00","restricted":false,"active":true,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":0,"following_count":0,"starred_repos_count":0,"username":"admin"},"original_author":"","original_author_id":0,"title":"[知识进化] 知识检索增强 — Agent 执行前自动检索相关知识","body":"## 目标\n每个 Agent 执行任务前,自动从知识库检索相关经验,注入到 system prompt 或 context 中。\n\n## 实现方案\n- AgentRuntime.run() 执行前触发 pre_execute hook\n- 用用户输入 + 任务描述做语义检索RAG\n- 检索到相关知识条目后,拼接到 system prompt 末尾\n- 检索结果附带相似度分数,低于阈值的不注入\n\n## 配置项\n- knowledge_retrieval_enabled: bool默认true\n- knowledge_top_k: int默认3\n- knowledge_min_score: float默认0.7\n\n## 修改文件\n- backend/app/agent_runtime/core.py — 添加 pre_execute hook\n- backend/app/services/knowledge_retriever.py — 向量检索服务\n- Agent 配置页新增知识增强开关","ref":"","assets":[],"labels":[],"milestone":null,"assignee":null,"assignees":null,"state":"open","is_locked":false,"comments":0,"created_at":"2026-05-10T15:32:18+08:00","updated_at":"2026-05-10T15:32:18+08:00","closed_at":null,"due_date":null,"time_estimate":0,"pull_request":null,"repository":{"id":27,"name":"aiagent","owner":"admin","full_name":"admin/aiagent"},"pin_order":0},{"id":78,"url":"http://101.43.95.130:3001/api/v1/repos/admin/aiagent/issues/60","html_url":"http://101.43.95.130:3001/admin/aiagent/issues/60","number":60,"user":{"id":1,"login":"admin","login_name":"","source_id":0,"full_name":"","email":"263303411@qq.com","avatar_url":"http://101.43.95.130:3001/avatars/9f89f41683d9730fc0abe566f120891a","html_url":"http://101.43.95.130:3001/admin","language":"zh-CN","is_admin":true,"last_login":"2026-04-30T00:13:32+08:00","created":"2025-12-19T11:20:47+08:00","restricted":false,"active":true,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":0,"following_count":0,"starred_repos_count":0,"username":"admin"},"original_author":"","original_author_id":0,"title":"[知识进化] 经验自动沉淀管道 — LLM 提取关键经验 → RAG 入库","body":"## 目标\n从执行日志中自动提取可复用的知识让一个 Agent 踩过的坑所有 Agent 都能避开。\n\n## 管道流程\nAgent执行日志 → 筛选高质量执行success=True + user_feedback\u003e=4→ LLM 提取经验(做了什么、怎么做的、为什么成功、注意事项)→ 结构化知识条目 → Embedding → RAG 向量库 → 原始日志关联(可回溯)\n\n## 知识条目结构\n- title: 一句话标题(如\"处理MySQL 死锁的重试策略\"\n- category: bug_fix / best_practice / workaround / optimization\n- tags: [\"mysql\", \"deadlock\", \"retry\"]\n- situation: 什么场景下遇到的问题\n- solution: 怎么解决的\n- caveats: 注意事项\n- source_execution_ids: [原始执行ID]\n\n## 新增文件\n- backend/app/services/knowledge_extractor.py\n- backend/app/models/knowledge_entry.py\n- Celery 定时任务:每小时运行一次提取管道","ref":"","assets":[],"labels":[],"milestone":null,"assignee":null,"assignees":null,"state":"open","is_locked":false,"comments":0,"created_at":"2026-05-10T15:32:18+08:00","updated_at":"2026-05-10T15:32:18+08:00","closed_at":null,"due_date":null,"time_estimate":0,"pull_request":null,"repository":{"id":27,"name":"aiagent","owner":"admin","full_name":"admin/aiagent"},"pin_order":0},{"id":77,"url":"http://101.43.95.130:3001/api/v1/repos/admin/aiagent/issues/59","html_url":"http://101.43.95.130:3001/admin/aiagent/issues/59","number":59,"user":{"id":1,"login":"admin","login_name":"","source_id":0,"full_name":"","email":"263303411@qq.com","avatar_url":"http://101.43.95.130:3001/avatars/9f89f41683d9730fc0abe566f120891a","html_url":"http://101.43.95.130:3001/admin","language":"zh-CN","is_admin":true,"last_login":"2026-04-30T00:13:32+08:00","created":"2025-12-19T11:20:47+08:00","restricted":false,"active":true,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":0,"following_count":0,"starred_repos_count":0,"username":"admin"},"original_author":"","original_author_id":0,"title":"[知识进化] Agent 执行日志结构化提取","body":"## 目标\n将每个 Agent 的每次执行结构化为可分析的数据。\n\n## 结构化字段\n- agent_id / agent_name / agent_version\n- goal_id / task_id关联上下文\n- input: 用户输入完整文本\n- output: Agent 输出完整文本\n- tool_chain: [{tool_name, input, output, duration_ms}]\n- llm_calls: [{model, prompt_tokens, completion_tokens, duration_ms}]\n- success: bool\n- error_message: str\n- user_feedback: {rating, comment}\n- latency_ms: 总耗时\n\n## 技术方案\n- AgentRuntime.run() 返回值扩展为 ExecutionLog\n- 写入独立表 agent_execution_logs\n- 异步写入Celery task\n\n## 新增文件\n- backend/app/models/agent_execution_log.py\n- backend/app/services/execution_logger.py\n- Alembic 迁移","ref":"","assets":[],"labels":[],"milestone":null,"assignee":null,"assignees":null,"state":"open","is_locked":false,"comments":0,"created_at":"2026-05-10T15:32:18+08:00","updated_at":"2026-05-10T15:32:18+08:00","closed_at":null,"due_date":null,"time_estimate":0,"pull_request":null,"repository":{"id":27,"name":"aiagent","owner":"admin","full_name":"admin/aiagent"},"pin_order":0},{"id":76,"url":"http://101.43.95.130:3001/api/v1/repos/admin/aiagent/issues/58","html_url":"http://101.43.95.130:3001/admin/aiagent/issues/58","number":58,"user":{"id":1,"login":"admin","login_name":"","source_id":0,"full_name":"","email":"263303411@qq.com","avatar_url":"http://101.43.95.130:3001/avatars/9f89f41683d9730fc0abe566f120891a","html_url":"http://101.43.95.130:3001/admin","language":"zh-CN","is_admin":true,"last_login":"2026-04-30T00:13:32+08:00","created":"2025-12-19T11:20:47+08:00","restricted":false,"active":true,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":0,"following_count":0,"starred_repos_count":0,"username":"admin"},"original_author":"","original_author_id":0,"title":"[数字分身] 数字分身管理页面 — 创建/训练/授权/审计","body":"## 目标\n前端页面用户管理自己的数字分身查看训练进度配置授权等级审计决策历史。\n\n## 页面功能\n### 1. 分身概览\n- 当前阶段(观察/影子/代理/自主)\n- 各场景准确率卡片\n- 行为数据统计(观察了多少条数据)\n\n### 2. 训练中心\n- 启动/暂停行为学习\n- 影子模式开关\n- 场景解锁状态\n\n### 3. 授权配置\n- L0-L4 授权矩阵配置\n- 场景化授权规则\n\n### 4. 审计日志\n- 所有代理决策列表\n- 用户确认/驳回记录\n- 决策回溯\n\n## 新增文件\n- frontend/src/views/DigitalTwin.vue\n- frontend/src/stores/digital-twin.ts\n- 路由:/digital-twin","ref":"","assets":[],"labels":[],"milestone":null,"assignee":null,"assignees":null,"state":"open","is_locked":false,"comments":0,"created_at":"2026-05-10T15:28:07+08:00","updated_at":"2026-05-10T15:28:07+08:00","closed_at":null,"due_date":null,"time_estimate":0,"pull_request":null,"repository":{"id":27,"name":"aiagent","owner":"admin","full_name":"admin/aiagent"},"pin_order":0},{"id":75,"url":"http://101.43.95.130:3001/api/v1/repos/admin/aiagent/issues/57","html_url":"http://101.43.95.130:3001/admin/aiagent/issues/57","number":57,"user":{"id":1,"login":"admin","login_name":"","source_id":0,"full_name":"","email":"263303411@qq.com","avatar_url":"http://101.43.95.130:3001/avatars/9f89f41683d9730fc0abe566f120891a","html_url":"http://101.43.95.130:3001/admin","language":"zh-CN","is_admin":true,"last_login":"2026-04-30T00:13:32+08:00","created":"2025-12-19T11:20:47+08:00","restricted":false,"active":true,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":0,"following_count":0,"starred_repos_count":0,"username":"admin"},"original_author":"","original_author_id":0,"title":"[数字分身] 决策授权体系 — 低风险自动执行,高风险举手","body":"## 目标\n建立分层授权体系让数字分身在合适的风险等级下自主决策。\n\n## 授权等级\n| 等级 | 风险 | 示例 | 需要确认 |\n|------|------|------|---------|\n| L0 完全自主 | 零风险 | 格式化代码、修正拼写 | 否 |\n| L1 自动+通知 | 低风险 | 合并小PR、回复常规邮件 | 否(通知) |\n| L2 建议+确认 | 中风险 | 修改API接口、调整配置 | 是(一键确认) |\n| L3 举手 | 高风险 | 修改数据库schema、涉及资金 | 是(详细审批) |\n| L4 禁止 | 极高风险 | 删除生产数据、修改权限 | 始终禁止 |\n\n## 技术方案\n- 每个操作预定义风险等级(可配置)\n- 数字分身执行前检查授权矩阵\n- 需要确认时通过飞书/站内发送确认卡片\n- 所有决策记录审计日志\n\n## 新增文件\n- backend/app/models/auth_matrix.py\n- backend/app/services/auth_gate.py","ref":"","assets":[],"labels":[],"milestone":null,"assignee":null,"assignees":null,"state":"open","is_locked":false,"comments":0,"created_at":"2026-05-10T15:28:07+08:00","updated_at":"2026-05-10T15:28:07+08:00","closed_at":null,"due_date":null,"time_estimate":0,"pull_request":null,"repository":{"id":27,"name":"aiagent","owner":"admin","full_name":"admin/aiagent"},"pin_order":0},{"id":74,"url":"http://101.43.95.130:3001/api/v1/repos/admin/aiagent/issues/56","html_url":"http://101.43.95.130:3001/admin/aiagent/issues/56","number":56,"user":{"id":1,"login":"admin","login_name":"","source_id":0,"full_name":"","email":"263303411@qq.com","avatar_url":"http://101.43.95.130:3001/avatars/9f89f41683d9730fc0abe566f120891a","html_url":"http://101.43.95.130:3001/admin","language":"zh-CN","is_admin":true,"last_login":"2026-04-30T00:13:32+08:00","created":"2025-12-19T11:20:47+08:00","restricted":false,"active":true,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":0,"following_count":0,"starred_repos_count":0,"username":"admin"},"original_author":"","original_author_id":0,"title":"[数字分身] 需求评估代理 — 拉历史数据给工时预估","body":"## 目标\n用户说\"这个需求评估一下\",数字分身拉取历史类似需求数据,给出工时预估和风险提示。\n\n## 输入\n- 需求描述(自然语言)\n- 需求类型(功能/修复/优化)\n- 涉及模块\n\n## 输出\n- 预估工时基于历史同类需求的P50/P90\n- 历史类似需求列表及实际工时\n- 风险提示(涉及模块复杂度、依赖方数量)\n- 建议方案(分阶段/简化方案/参考实现)\n\n## 技术方案\n- 从 Gitea Issue / 执行历史中提取需求→工时映射\n- LLM 语义匹配需求相似度\n- 统计模型给出工时区间\n\n## 新增文件\n- backend/app/services/requirement_estimator.py\n- 前端:需求评估输入页","ref":"","assets":[],"labels":[],"milestone":null,"assignee":null,"assignees":null,"state":"open","is_locked":false,"comments":0,"created_at":"2026-05-10T15:28:06+08:00","updated_at":"2026-05-10T15:28:06+08:00","closed_at":null,"due_date":null,"time_estimate":0,"pull_request":null,"repository":{"id":27,"name":"aiagent","owner":"admin","full_name":"admin/aiagent"},"pin_order":0},{"id":73,"url":"http://101.43.95.130:3001/api/v1/repos/admin/aiagent/issues/55","html_url":"http://101.43.95.130:3001/admin/aiagent/issues/55","number":55,"user":{"id":1,"login":"admin","login_name":"","source_id":0,"full_name":"","email":"263303411@qq.com","avatar_url":"http://101.43.95.130:3001/avatars/9f89f41683d9730fc0abe566f120891a","html_url":"http://101.43.95.130:3001/admin","language":"zh-CN","is_admin":true,"last_login":"2026-04-30T00:13:32+08:00","created":"2025-12-19T11:20:47+08:00","restricted":false,"active":true,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":0,"following_count":0,"starred_repos_count":0,"username":"admin"},"original_author":"","original_author_id":0,"title":"[数字分身] 代码评审代理 — \"这个PR你看下\" 自主审核","body":"## 目标\n用户说\"这个PR你看下\",数字分身自动完成代码审核,标注问题,给出合入建议。\n\n## 输入\n- PR URL (Gitea API)\n- PR diff 内容\n- 关联 Issue 上下文\n\n## 输出\n- 审核意见列表(按严重程度排序)\n - 阻塞:安全漏洞、数据丢失风险\n - 建议:性能问题、可读性改进\n - 赞赏:好的实现模式\n- 合入建议Approve / Request Changes / Comment\n- 审核摘要3句话\n\n## 技术方案\n- 利用用户历史审核指纹(偏好权重)指导审核重点\n- 使用 parse_test_result_file + create_gitea_issue 工具链\n- 审核结果作为 PR comment 回写 Gitea\n\n## 新增文件\n- backend/app/services/code_review_agent.py\n- backend/app/tools/code_review_tools.py\n- 前端PR审核页面","ref":"","assets":[],"labels":[],"milestone":null,"assignee":null,"assignees":null,"state":"open","is_locked":false,"comments":0,"created_at":"2026-05-10T15:28:06+08:00","updated_at":"2026-05-10T15:28:06+08:00","closed_at":null,"due_date":null,"time_estimate":0,"pull_request":null,"repository":{"id":27,"name":"aiagent","owner":"admin","full_name":"admin/aiagent"},"pin_order":0},{"id":72,"url":"http://101.43.95.130:3001/api/v1/repos/admin/aiagent/issues/54","html_url":"http://101.43.95.130:3001/admin/aiagent/issues/54","number":54,"user":{"id":1,"login":"admin","login_name":"","source_id":0,"full_name":"","email":"263303411@qq.com","avatar_url":"http://101.43.95.130:3001/avatars/9f89f41683d9730fc0abe566f120891a","html_url":"http://101.43.95.130:3001/admin","language":"zh-CN","is_admin":true,"last_login":"2026-04-30T00:13:32+08:00","created":"2025-12-19T11:20:47+08:00","restricted":false,"active":true,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":0,"following_count":0,"starred_repos_count":0,"username":"admin"},"original_author":"","original_author_id":0,"title":"[数字分身] 影子模式执行引擎 — 生成建议不执行,对比人类决策","body":"## 目标\n在代理执行之前先以影子模式运行生成建议但不自动执行与人类实际决策对比计算准确率。\n\n## 核心逻辑\n用户触发操作 → 数字分身同步生成建议 → 建议仅对用户可见(影子)→ 用户实际操作 vs 影子建议 → 对比记录 → 准确率达标(如 \u003e90%)→ 解锁代理模式\n\n## 影子模式场景\n| 场景 | 影子动作 | 对比维度 |\n|------|---------|---------|\n| PR审核 | 生成审核意见 | 相同问题是否被指出 |\n| 邮件回复 | 草拟回复 | 意图是否一致 |\n| 需求评估 | 给出工时 | 偏差是否在20%内 |\n\n## 准确率仪表\n- 每个场景独立计算影子准确率\n- 准确率 \u003e 90% 持续 2 周 → 自动解锁代理模式\n- 准确率 \u003c 70% → 回退到观察模式\n\n## 新增文件\n- backend/app/services/shadow_executor.py\n- backend/app/models/shadow_comparison.py\n- 前端:数字分身页面新增影子准确率卡片","ref":"","assets":[],"labels":[],"milestone":null,"assignee":null,"assignees":null,"state":"open","is_locked":false,"comments":0,"created_at":"2026-05-10T15:28:05+08:00","updated_at":"2026-05-10T15:28:05+08:00","closed_at":null,"due_date":null,"time_estimate":0,"pull_request":null,"repository":{"id":27,"name":"aiagent","owner":"admin","full_name":"admin/aiagent"},"pin_order":0},{"id":71,"url":"http://101.43.95.130:3001/api/v1/repos/admin/aiagent/issues/53","html_url":"http://101.43.95.130:3001/admin/aiagent/issues/53","number":53,"user":{"id":1,"login":"admin","login_name":"","source_id":0,"full_name":"","email":"263303411@qq.com","avatar_url":"http://101.43.95.130:3001/avatars/9f89f41683d9730fc0abe566f120891a","html_url":"http://101.43.95.130:3001/admin","language":"zh-CN","is_admin":true,"last_login":"2026-04-30T00:13:32+08:00","created":"2025-12-19T11:20:47+08:00","restricted":false,"active":true,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":0,"following_count":0,"starred_repos_count":0,"username":"admin"},"original_author":"","original_author_id":0,"title":"[数字分身] 行为指纹模型 — 向量化 + 偏好权重学习","body":"## 目标\n将原始行为日志转化为可量化的用户\"数字指纹\"。\n\n## 技术方案\n\n### 1. 行为序列向量化\n- 使用 embedding 模型将行为序列转为向量\n- 行为:{action, context, decision, timestamp} → sentence → embedding\n- 存储到向量数据库pgvector 或 Qdrant\n\n### 2. 偏好权重模型\n- 从决策历史中提取用户偏好权重\n- 示例PR审核权重 = {security: 0.4, performance: 0.3, readability: 0.2, style: 0.1}\n- 使用 Bradley-Terry 模型或简单频率统计\n\n### 3. 决策规则提取\n- 从历史决策中提取 if-then 规则\n- 示例IF 改动文件\u003e10 AND 无测试 THEN 要求补充测试\n\n## 新增文件\n- backend/app/models/user_fingerprint.py\n- backend/app/services/fingerprint_engine.py\n- 定时任务:每周更新指纹模型","ref":"","assets":[],"labels":[],"milestone":null,"assignee":null,"assignees":null,"state":"open","is_locked":false,"comments":0,"created_at":"2026-05-10T15:28:05+08:00","updated_at":"2026-05-10T15:28:05+08:00","closed_at":null,"due_date":null,"time_estimate":0,"pull_request":null,"repository":{"id":27,"name":"aiagent","owner":"admin","full_name":"admin/aiagent"},"pin_order":0},{"id":70,"url":"http://101.43.95.130:3001/api/v1/repos/admin/aiagent/issues/52","html_url":"http://101.43.95.130:3001/admin/aiagent/issues/52","number":52,"user":{"id":1,"login":"admin","login_name":"","source_id":0,"full_name":"","email":"263303411@qq.com","avatar_url":"http://101.43.95.130:3001/avatars/9f89f41683d9730fc0abe566f120891a","html_url":"http://101.43.95.130:3001/admin","language":"zh-CN","is_admin":true,"last_login":"2026-04-30T00:13:32+08:00","created":"2025-12-19T11:20:47+08:00","restricted":false,"active":true,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":0,"following_count":0,"starred_repos_count":0,"username":"admin"},"original_author":"","original_author_id":0,"title":"[数字分身] 合同/文档审查代理 — 对照历史,标记风险条款","body":"## 目标\n用户上传合同或文档数字分身对照历史审查记录自动标记风险条款和异常变更。\n\n## 输入\n- 合同/文档文件PDF/Word\n- 审查上下文(合同类型、对手方、金额范围)\n\n## 输出\n- 风险条款列表(按风险等级排序)\n - 🔴 高风险:违约责任不对等、无限担保\n - 🟡 中风险:付款条件模糊、验收标准不明确\n - 🟢 低风险:格式问题、标点错误\n- 对比历史同类合同的差异\n- 修改建议(引用历史合同中的条款作为参考)\n\n## 技术方案\n- PDF/Word 文本提取PyMuPDF + python-docx\n- 条款级 diff对比历史合同库\n- 风险规则库(用户可配置)\n- 结合用户历史审查偏好\n\n## 新增文件\n- `backend/app/services/document_review_agent.py`\n- `backend/app/tools/document_tools.py` — `extract_pdf`, `extract_docx`, `compare_clauses`","ref":"","assets":[],"labels":[],"milestone":null,"assignee":null,"assignees":null,"state":"open","is_locked":false,"comments":0,"created_at":"2026-05-10T15:26:59+08:00","updated_at":"2026-05-10T15:26:59+08:00","closed_at":null,"due_date":null,"time_estimate":0,"pull_request":null,"repository":{"id":27,"name":"aiagent","owner":"admin","full_name":"admin/aiagent"},"pin_order":0},{"id":66,"url":"http://101.43.95.130:3001/api/v1/repos/admin/aiagent/issues/48","html_url":"http://101.43.95.130:3001/admin/aiagent/issues/48","number":48,"user":{"id":1,"login":"admin","login_name":"","source_id":0,"full_name":"","email":"263303411@qq.com","avatar_url":"http://101.43.95.130:3001/avatars/9f89f41683d9730fc0abe566f120891a","html_url":"http://101.43.95.130:3001/admin","language":"zh-CN","is_admin":true,"last_login":"2026-04-30T00:13:32+08:00","created":"2025-12-19T11:20:47+08:00","restricted":false,"active":true,"prohibit_login":false,"location":"","website":"","description":"","visibility":"public","followers_count":0,"following_count":0,"starred_repos_count":0,"username":"admin"},"original_author":"","original_author_id":0,"title":"[数字分身] 用户行为数据采集器 — 四大观察维度","body":"## 目标\n让天工观察用户的日常工作模式建立行为基线。\n\n## 四大观察维度\n\n### 1. 邮件处理模式\n- 采集:邮件分类逻辑(哪些先回、哪些已读不回、哪些转发)\n- 采集:回复风格(正式/简洁/模板化)\n- 采集响应时间分布紧急30分钟、普通当天、低优先级3天\n\n### 2. 代码审核模式\n- 采集PR 审核关注点(安全 \u003e 性能 \u003e 可读性?)\n- 采集:审核评论风格(直接修改/提建议/问问题)\n- 采集:合入标准(测试覆盖率/CI通过/至少1个approve\n\n### 3. 文档撰写风格\n- 采集:文档结构偏好(先结论后分析/先背景后方案)\n- 采集:语言风格指纹(用词习惯、句式长度、图表偏好)\n\n### 4. 决策历史关联\n- 采集:决策输入(什么信息触发决策)→ 决策过程(查了哪些数据)→ 决策结果\n- 构建决策依赖图\n\n## 技术方案\n- 新增 `UserBehaviorLog` 模型user_id, category, action, context, result, timestamp\n- 各业务端点埋点采集(非侵入式 middleware\n- 飞书/邮件/PR 通过 webhook 回调写入\n\n## 产出\n- `backend/app/models/user_behavior.py` — 行为日志模型\n- `backend/app/services/behavior_collector.py` — 采集服务\n- Alembic 迁移","ref":"","assets":[],"labels":[],"milestone":null,"assignee":null,"assignees":null,"state":"open","is_locked":false,"comments":0,"created_at":"2026-05-10T15:25:10+08:00","updated_at":"2026-05-10T15:25:10+08:00","closed_at":null,"due_date":null,"time_estimate":0,"pull_request":null,"repository":{"id":27,"name":"aiagent","owner":"admin","full_name":"admin/aiagent"},"pin_order":0}]