• 设计见 docs/done/system-design/28-agent-registry-unification.md。
    
    改造前 Agent 本体散在三处(system/agents/ 11 个、system/templates/ 50 个、
    data/companies/{id}/agents/ 17 个),同一个 AgentScaffold 被三个 baseDir 实例化。
    后果是同一角色在 N 家公司下有 N 份互不相干的副本,模板更新不会同步;
    org-coder / org-planner 这类走 hireFromBaseMetaAgent 造出来的本体
    legacy_path 指回自己公司目录,永远无法被第二家公司复用。
    
    本次:
    - G1 单一注册表:system/templates/ 整体并入 system/agents/,base → _base。
      7 个同名 id 逐个裁决,被丢弃的一份归档到 docs/_archive/ 而非删除。
      source_kind(template/global_agent/company_hired) → origin(builtin/created)。
    - G2 运行态下沉:CLI 的 cwd 从本体根改为 system/agents/{aid}/{cid}/{taskId}/。
      memory / conversations 落公司态 {aid}/{cid}/,按公司隔离不串。
      sessionPool 的 key 含 (companyId, taskId),两家公司调同一 agent 不复用会话。
    - G2b 产物不下沉:交付物仍落 data/companies/{cid}/,system/agents/ 只留运行痕迹。
      写入边界按链路分叉——graph 节点走节点私有目录(被 indexNodeOutputs 索引),
      chat 走公司 workspace,同一提示词里不再出现两条互斥指令。
    - G3 公司只存引用:data/companies/{id}/agents/ 删除,新增 company_agents 关联表。
      不复用 org_graph_nodes——后者是执行流图,work 层本体被雇时不写它,天生覆盖不全。
    - G4 缺则创建:本体缺失时从 _base 复制骨架进 system/agents/{id}/,
      agent-creator 填 agent.md/soul.md 后才从 draft 转 active(哨兵判据,
      骨架未填时哨兵仍在,不许被 hire)。产物即刻是全系统可复用的本体。
    
    新增 server/services/agent-locator.js 收编原先散在 6 处的寻址逻辑。
    
    边界守卫(graph-engine)的豁免从「本体根上五个文件名」放宽为整棵 system/agents/:
    新本体的骨架本来就要进 git,gitignore 挡不住 ?? system/agents/{newId}/,
    旧判据会把一个真正成功的招聘节点判成 boundary_escape fail。
    
    存量迁移见 scripts/migrate-agent-registry.js(幂等,备份到 data/_migration-backup-*)。
    
    真 Claude CLI E2E 已验证:新建公司 → orggraph-planning 自动规划 →
    自动招聘 org-planner/org-coder/org-validator 三节点流水线;
    data/companies/{cid}/agents/ 不存在,company_agents 4 行,
    system_agents 56→56(零新建私有本体,纯复用),git status 零增量。
    
    Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
    yibo authored
     
    Browse Dir »

  • 按 docs/README.md 既有约定(done/ 放「已实现/当前有效」),把两份已落地的
    阶段设计文档移入 done/system-design/:
    
    - 27-p1-virtual-reference.md  P1 虚拟引用寻址,commit 226489d
    - 27-p2-org-graph.md          P2 Org Graph,70a4727 + f20d0d8,真实建公司端到端验证过
    
    用 git mv 保留历史(R098 / R087)。移动断掉的 33 处相对链接已全部修复:
    moved 文件内的出向链接改 ../../todo/system-design/,todo/ 下 6 个文件的入向链接
    改 ../../done/system-design/。全 docs/ 扫描无断链。
    
    README 此前严重过时——只列了 2 份 27 文档,实际已有 11 份。本次补全 todo/ 表格,
    每份标注状态与作用(总纲 / 需求源头 / 命名规范 / 端到端 / 参考场景 /
    P3+P4 已实现 / 验收契约 / P4 设计中),并在 done/ 表格补上 P1、P2 两行。
    
    ■ 刻意没有移动 27-p3-p4-work-graph-console.md
    它虽然已实现(c3abf4a),但文档正被另一进程持续修改(工作区 M 状态)。
    移动会打断它的编辑路径,等它收尾后再归档。
    
    ■ 三份文件的链接修复留在工作区未提交
    27-naming-conventions.md / 27-p3-p4-work-graph-console.md / 27-requirement.md
    里,我的链接修复与另一进程的在途编辑混在同一文件中,单独拆分风险大于收益。
    工作区内容是正确的(链接已指向新路径),会随它下次提交一并带上。
    
    Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
    yibo authored
     
    Browse Dir »

  • - New docs/README.md indexes the tree: done/ (shipped features + reference manuals),
      todo/ (current focus — Graph Agent architecture), todo/future/ (deprioritized
      roadmaps: FDE pipeline todo list, stale v1.1 milestones, harness engineering
      proposal — orthogonal to the Graph Agent work, not blocking it)
    - Move completed/reference docs into docs/done/ (LEMONBOSS-SYSTEM-DESIGN, architecture-v5,
      claude-code-cron, open-api-manual, qa_judge_req, task_timeline_design, user-guides/,
      system-design/01-26 minus the three moved to todo/future/) — verified against actual
      code (qa-judge template, Task Timeline route/service/view) before filing as done
    - Fix the two TOC links in LEMONBOSS-SYSTEM-DESIGN.md that would otherwise point at the
      old paths after the move
    - docs/todo/system-design/27-graph-agent-architecture.md: add the P2 Org Graph doc link
      in the roadmap table and 关联文档 section
    - Add docs/todo/system-design/27-p2-org-graph.md (P2 requirements & design, drafted in
      parallel while P0/P1 landed)
    
    Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
    yibo authored
     
    Browse Dir »