Commit Graph
37 Commits
Author SHA1 Message Date
qiuruiandClaude Sonnet 4.6 d5e8015e04 feat: EventBus Redis Streams 事件总线(fakeredis 测试)
基于 Redis Streams 实现多消费者组事件总线,支持 5 个内置消费者组
(ops-hub/leader-os-base/leader-vision-algo/leader-market/boss),
提供 publish/read_new/ack 核心接口及 task_done/task_failed/version_pass/alert 语义快捷方法。
依赖 fakeredis 实现无服务器测试,pyproject.toml 新增 redis>=5.0 依赖。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 23:25:08 +08:00
qiuruiandClaude Sonnet 4.6 4320d71ec9 fix(daily-tab): safeJson 防护 + Promise.all catch 错误处理
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 23:21:33 +08:00
qiuruiandClaude Sonnet 4.6 0dddc1af11 feat: 新增日报 Tab(时间线 + Boss 决策视图)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 23:18:54 +08:00
qiuruiandClaude Sonnet 4.6 ea9a7e6f23 fix(test): 清理日报测试环境变量泄露 + 移除无效 DB_PATH 设置
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 23:14:43 +08:00
qiuruiandClaude Sonnet 4.6 2b4048a1eb fix(daily-api): DailyReport 单例化 + 补充往返测试
将 _get_daily_db() 每次请求重建实例的模式改为在 make_app 闭包内
初始化一次 _daily_db(与 _queue/_memory 生命周期一致),消除重复 DDL。
新增 test_daily_timeline_with_data 往返测试:写入记录后 GET 能读到。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 23:11:32 +08:00
qiuruiandClaude Sonnet 4.6 34cd02ca56 feat: /api/daily/* 端点(timeline/boss/dates)
新增三个日报 API 端点,从 DailyReport SQLite 读取数据:
- GET /api/daily/timeline?date=YYYY-MM-DD
- GET /api/daily/boss?date=YYYY-MM-DD
- GET /api/daily/dates

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 23:06:27 +08:00
qiuruiandClaude Sonnet 4.6 c869f709dc fix(daily_report): 修复参数名/排序/emoji 三个质量问题
- upsert_boss_summary 参数 date → report_date(契约一致)
- ReportEntry 移除 id 字段(纯输入 DTO,消除语义歧义)
- get_timeline 排序改为 report_hour DESC, id DESC(与索引一致)
- context_for_ops 用 ASCII 标记替换 emoji
- 新增 test_context_for_ops 测试覆盖分支逻辑

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 23:03:01 +08:00
qiuruiandClaude Sonnet 4.6 43f06a6f60 feat: DailyReport append-only 日报存储(timeline + boss_daily 两表)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 22:55:07 +08:00
qiuruiandClaude Sonnet 4.6 b52de60e59 feat: TaskDetail 使用 react-markdown 渲染 summary/discussion,修复乱文本
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 22:49:53 +08:00
qiurui cc70fa4f99 docs: org v2 实施计划(12 Task,TDD,完整代码) 2026-03-09 22:42:22 +08:00
qiuruiandClaude Sonnet 4.6 049812ff7f docs: org v2 设计文档 + org.yaml 组织架构定义
- 事件总线方案(Redis Streams)+ Ops 星形枢纽
- 测试反幻觉门控:TesterAgent 独占 [测试通过] 权限
- 日报双视图:Boss A+C + Ops B时间线
- Agent 评分系统(完成率/质量/自主度/协作)
- 三平台扩展:nRF54L15/ESP32S3/RK-AI
- 前端升级:Markdown 渲染 + 日报 Tab + Visual 模型验证

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 22:32:47 +08:00
qiuruiandClaude Sonnet 4.6 28ed413037 feat: 版本流水线 + 算法组分组重组
tools/version_pipeline.py(新增):
- 并行开发流水线:v1测试时v2已在开发,不等待
- v1测试问题 → v3 backlog(跳一版本,不阻塞v2)
- [版本]/[测试通过]/[测试问题] 标签驱动流水线状态
- pipeline_summary() 注入 agent context,让 agent 知道当前版本状态

algo_vision.py(新增):
- AlgoVisionAgent:视觉算法组基类,rk3566主验证+rk3588可扩展
- _update_version_pipeline():解析版本标签,自动触发下版本开发任务
- _build_context() 注入版本流水线状态

算法组分组:
- 视觉组:algo-antishake → AlgoVisionAgent(Rockchip平台)
- MCU组:algo-position/nav → AlgoMcuAgent(暂缓)

scheduler:_enqueue_vision_algo_cycle() 只调度视觉组,MCU组注释保留

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 21:45:51 +08:00
qiuruiandClaude Sonnet 4.6 bb6e611dab refactor: 算法组分组 - 视觉组(Rockchip)/MCU组(ESP32,暂缓)
新增基类:
- AlgoVisionAgent: 视觉算法组,rk3566(主)+rk3588(可扩展),代码迭代模式
- AlgoMcuAgent: MCU算法组,ESP32/Nordic,当前阶段暂缓

继承关系重组:
- AlgoAntishakeAgent → AlgoVisionAgent(视觉组,主力)
- AlgoPositionAgent  → AlgoMcuAgent(MCU组,暂缓)
- AlgoNavAgent       → AlgoMcuAgent(MCU组,暂缓)

Scheduler 分离:
- _enqueue_vision_algo_cycle(): 只入队视觉算法任务(antishake)
- _enqueue_algo_cycle(): 当前只调视觉组,MCU 组注释保留

设备上下文:
- 视觉组:rk3566(主验证) + rk3588(可选扩展),含完整 SSH 信息
- MCU 组:只显示 ESP32/Nordic 设备,不含 Rockchip 凭据

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 21:42:39 +08:00
qiuruiandClaude Sonnet 4.6 913dc48b9e feat: 算法组自迭代闭环 - 代码项目 + 记忆积累
创建三个算法代码项目(algo-base 子目录):
- antishake/: EIS 防抖,目标 <3px jitter / <16ms 延迟
- positioning/: BLE/UWB 定位,目标 <30cm 精度 / ≥10Hz
- navigation/: GPS/IMU 导航,目标 <2° 姿态 / ≥50Hz

projects.yaml 新增三项配置,路径显式指向各子目录

_enqueue_algo_cycle() 重写:
- project 从 "algo-base"(不存在)改为实际项目名
- type 从 "tech_support" 改为 "code_improve"
- context 明确六步闭环:读记忆→看代码→改代码→rk3566验证→写记忆→定方向

AlgoResearcherAgent system prompt 重写:
- 从纯调研模式改为代码迭代模式
- 每轮必须产出可运行的代码改进
- 三个子类 system prompt 更新:聚焦代码文件路径和目标指标

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 21:35:15 +08:00
qiuruiandClaude Sonnet 4.6 b325d34956 feat: 算法组设备隔离 - 仅使用 rk3566 验证
AlgoResearcherAgent._build_device_context() 覆盖基类,
只暴露 rk3566(orangepi@192.168.123.183)的 SSH 连接信息,
不向算法组传递 rk3588 的凭据和访问方式。

system prompt 明确注明:
- 仅使用 rk3566(低功耗算力代表,1 TOPS NPU)
- 不使用 rk3588(高性能平台,非算法组职责)

三个子类(antishake/position/nav)自动继承此设备隔离逻辑。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 21:27:36 +08:00
qiuruiandClaude Sonnet 4.6 4bc3c5b5ed feat: 24/7 持续运行 - 调研/算法/市场组自动续链
- rtp/net/kernel researcher: system prompt 新增 [后续] 续链输出指令
  每轮调研完成后自动生成下一轮聚焦方向并入队同角色任务
- algo_researcher: 新增 run() 覆盖,解析 [记忆] 写入 ProjectMemory
  + 解析 [后续] 自动入队下轮算法迭代任务
- market_pm: 修复 _extract_market_intelligence 从未被调用的 bug
  新增 run() 覆盖确保情报写入 ProjectMemory,并加入 [后续] 续链指令
- scheduler: 已注册 research_cycle(8h)/algo_cycle(8h)/market_intel(24h) 周期 job
- 测试更新: test_market_pm_system_prompt_has_doc_types 对齐新的系统提示内容

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 21:22:25 +08:00
qiurui 2e04776854 docs: 修正组织架构——三专项调研归属基础技术组 2026-03-09 15:23:41 +08:00
qiurui b6ba0d198c docs: 添加组织架构/人员矩阵;迁移到 /data/company/agents 完成 2026-03-09 15:20:55 +08:00
qiurui 157f2774c6 docs: 刷新全量文档;修复 executor 成功/失败状态判断;添加三专项独立项目 2026-03-09 15:00:34 +08:00
qiuruiandClaude Sonnet 4.6 8a032ae704 config: project_delivery 队列添加缺失 roles,确保 market/research 任务被执行
project_delivery 队列(data/tasks.db)新增:
- market-pm / rtp-researcher / net-researcher / kernel-analyzer
- dev-refactor / dev-embedded(已存在于 DB 但未在 roles 中)

此前 tasks.db 中的调研/洞察任务因 role_filter 过滤而永远 pending。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 14:45:29 +08:00
qiuruiandClaude Sonnet 4.6 35651c57aa config: 添加 rk3566 设备 + 移除 memory-analyze + 添加 os-base 项目
- devices.yaml:新增 rk3566(OrangePi CM4,192.168.123.183,算法默认验证设备),
  rk3566 置于 rk3588 之前(算法任务优先使用 rk3566 验证)
- projects.yaml:移除 memory-analyze,添加 os-base(基础技术组虚拟项目)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 14:27:16 +08:00
qiuruiandClaude Sonnet 4.6 81cdfb88d1 fix: visual_tester 在容器启动时 sys.path 未更新导致 /api/visual/* 路由不注册
docker 启动时 pip install -e 是子进程,不更新当前进程 sys.path,
导致 api.py 的 _HAS_VISUAL=False,visual 路由全部缺失(404)。
修复:pip install 后手动 sys.path.insert("/app/visual-tester/src") 并重试 import。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 14:14:15 +08:00
qiuruiandClaude Sonnet 4.6 15da744bfd feat: add executor routing for research agents + research CLI subcommand
在 _make_agent() 中添加 rtp-researcher / net-researcher / kernel-analyzer 三条路由,
新增 `python scripts/run.py research` 子命令可一键将三项基础技术调研任务入队。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 13:46:52 +08:00
qiuruiandClaude Sonnet 4.6 3059790015 feat: add KernelAnalyzerAgent for kernel scheduling and resource analysis
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 13:40:28 +08:00
qiuruiandClaude Sonnet 4.6 b3e2493412 feat: add NetResearcherAgent for network stack optimization research
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 13:39:36 +08:00
qiuruiandClaude Sonnet 4.6 56c70ba2e1 feat: add market insight dashboard tab (InsightView + goal cards)
- api.ts: 新增 MarketFacts/MarketHistoryItem 接口及 fetchMarketFacts、triggerMarketInsight、fetchMarketHistory 三个 API 函数
- InsightView.tsx: 市场洞察页,包含 GoalCard(运动/适老/AI安全三卡)和洞察任务历史列表
- App.tsx: 新增 insight tab 类型及 InsightView 渲染
- TopBar.tsx: Props 类型扩展 insight,新增「洞察」导航按钮

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 13:39:09 +08:00
qiuruiandClaude Sonnet 4.6 9c9e88f7c4 feat: add market insight API endpoints (facts/trigger/history)
新增三个 market API 端点:GET /api/market/facts(按 goal 前缀分组返回 __market__ facts)、
POST /api/market/trigger/{goal}(入队 market_pm 任务,无效目标返回 400)、
GET /api/market/history(查询最近 10 条 market_pm 任务历史);
make_app() 新增 memory 参数支持注入 ProjectMemory mock,
新增 MarketTriggerResponse Pydantic 模型。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 13:35:47 +08:00
qiuruiandClaude Sonnet 4.6 e91fec95b3 feat: add RtpResearcherAgent for RTP/real-time transport research
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 13:35:04 +08:00
qiuruiandClaude Sonnet 4.6 0b8e84993e feat: update market_pm to use goal-prefixed facts (运动/适老/AI安全)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 13:34:47 +08:00
qiuruiandClaude Sonnet 4.6 ca613e739d feat: add /data/company/algo-base to scan_dirs, remove explicit rockchip paths
- scan_dirs 新增 /data/company/algo-base,自动发现 algo-base 下的项目
- 删除 logodetect-x86 和 ui-tars 条目中的显式 path: 字段,改由 scan_dirs 自动发现
- 更新 logodetect-x86 和 ui-tars 的 description 字段

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 13:31:00 +08:00
qiurui d5ec47cce8 docs: add three-features implementation plan 2026-03-09 13:20:21 +08:00
qiurui af7b863ed3 docs: add three-features design doc (insight page, algo-base migration, research agents) 2026-03-09 13:15:27 +08:00
qiuruiandClaude Sonnet 4.6 f34667d91d feat: inject known model summary into DeveloperAgent device context
在 _build_device_context() 末尾注入 ProjectMemory __env__ 模型摘要,
包括本机 rknn/onnx 路径、各 SSH 设备模型文件、磁盘和已安装包信息;
仅在 env_facts 有数据时生效,无数据时静默跳过。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 12:51:33 +08:00
qiuruiandClaude Sonnet 4.6 5672a98de9 feat: add EnvCollector 24h scheduler job and startup daemon thread
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 12:47:07 +08:00
qiuruiandClaude Sonnet 4.6 e9c68b04b8 feat: add collect-env CLI subcommand with formatted summary
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 12:43:15 +08:00
qiuruiandClaude Sonnet 4.6 54340472ed fix: improve EnvCollector code quality (types, filtering, closure comments)
- [I-1] collect_local 无匹配文件时不写入空字符串 key
- [I-2] run_collection 闭包绑定添加注释,明确避免循环捕获问题
- [I-4] 变量名 l 改为 line,SSH 状态行过滤添加注释
- [m-1] run_collection cfg 参数添加 AgentsConfig 类型注解
- [m-3] collect_device 中 ws 改为 workspace,语义更清晰
- [m-4] 测试文件 DeviceConfig 导入移至顶部,删除函数内重复 import
- [m-5] 测试名称 test_save_requires_env_collector_role 改为
  test_env_collector_role_can_write_env_facts,内容与实现对齐
  (set_fact 无角色限制,权限测试改用 set_goal)
- [I-5] 测试断言改用 .get() 与 I-1 修复后行为保持一致
- [I-6] fake_run 添加 remote_cwd 参数验证

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 12:36:18 +08:00
qiuruiandClaude Sonnet 4.6 802ee8daae feat: add EnvCollector core class with local+SSH collection
- 新增 tools/env_collector.py:EnvCollector 类支持本机环境变量/模型文件扫描 + SSH 设备模型/磁盘/包信息采集;run_collection() 顶层编排函数
- 扩展 WRITE_ROLES 添加 "env-collector",允许写入 __env__ 命名空间
- 新增 tests/test_env_collector.py(8 个测试,全部通过)
- 同步更新 test_project_memory.py 中 WRITE_ROLES 断言

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 12:19:59 +08:00