-
company-service.js:company.json 加 ownerId(无 SQL 表,纯 JSON 字段);create() 接收 ownerId;list({ user }) 按传入用户过滤,不传就不过滤(company-heartbeat-service.js 等 系统内部巡检要看全部公司);新增 canAccessCompany(company, user) 作为全仓库唯一一份 归属判据(admin 不过滤,判负一律 404 不是 403,不暴露"这个 id 存在只是不是你的")。 company.js 用 router.param('companyId', ...) 统一收口(约 50 条路由,含 okrPath() 系列 动态路由)。graph-run.js 的两个挂载点参数形状不一样,设计阶段的描述不准确,实现时才 发现:companyRouter 唯一路由是 /:companyId/graph-runs 直接查;主 router 全部路由是 /:id/...,:id 指的是 run 不是公司,改成先查 run 的 company_id 再判断,run 不存在或 公司不是你的统一回"run 不存在"。devloop.js 用 :pid 反查 company_id;POST /projects 单独校验 body 里的 company_id(放在基本字段校验之后,避免归属检查打乱输入校验的错误 优先级);GET /projects 按归属过滤列表。 okr.js 最终没有按原计划接入 companyId 归属校验——实现前查证发现 OkrDashboard.vue 挂载的 /okr 页面全站没有任何导航入口指向它,是个孤儿页面,给访问不到的页面建"选公司" 前端交互不划算,改成 requireAdmin(跟 dream.js 同款),先堵住直接拼 URL 看到跨公司 聚合数据的口子。真正在用的公司级 OKR(company.js 的 /:id/okr)已随 company.js 一起隔离。 存量数据迁移:scripts/backfill-company-owner.js(npm run backfill:company-owner), 两家存量公司已划给种子账号,幂等验证过。 8 个既有测试文件用的公司 id 都是从没真正建过的字符串标签,挂锁后集体 404——新增共享 helper server/tests/helpers/ensure-test-company.js 修复;两处原有的"跳过已有 company.json 的目录,那是真公司"防御逻辑,判据从"有没有 company.json"改成"ownerId 是不是 -1 这个测试专用标记",否则新出现的测试夹具会被误判成真公司永远不清理。 验证:真实 curl 走过(admin 看到全部存量公司、新用户看到空列表、新用户拼 URL 访问 别人的公司 404、新建公司 ownerId 精确落在创建者、admin 和创建者都看得到其他人看不到); 全量 vitest 1427 passed,3 个无关既有失败不受影响。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
-
system/templates/ 已在 28 号文档的合并里并入 system/agents/,「模板」作为独立 数据概念已经消失;确认后手工 CRUD 页面(创建/改名/删除骨架、触发生成与训练、 传 skill 文件、provision)也已经没人用,一并下线: - 前端:删 AppNav「Templates」菜单项、/templates 路由、TemplateAgents.vue - 后端:company.js 删掉只服务于该页面的写接口(PATCH/DELETE/POST /templates、 generate/train/skills-upload/provision/files 系列),保留 GET /templates (CompanyDashboard 招聘弹窗和 CLI `company templates` 命令仍依赖它列出可招角色) - CLI:bin/lemon.js 删 `template create`/`template train`(调用的是被删接口) - 修正两处过时注释(company-service.js / graph-service.js):不再声称 buildAgentDefinitionBrief 有两个调用方,/hire 是唯一派单点 - work-layer-body-paths.test.js 同步更新断言(2 处调用方 → 1 处) Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
-
## 一、W7「零边图」不是待办 —— 它早修了,是注释在骗人 `company-service.js` 的判据注释仍写着「判据用**有没有边**」,并留着一段 「已知残留:单 org node 的最小图没有边,判据③不生效……真跑到那一步再看」。 **那个残留在 `58a2865`(08-17)就修掉了**:`orgGraphMembership` 现在的主判据是 `authored_by='planner'` 的节点存在(「orggraph-planning 提交过一张图」的直接证据, 零边也认),边数降为存量行的回落判据;守卫 `company-hire-org-layer.test.js` 的 `CO_ZEROEDGE` + `W7-fix` 两条盯着。 注释没跟着改,于是它把读的人**引向一个已经修好的缺陷**去重修一遍 —— 我就是这么被 带偏的:读到那段注释就没再往 `orgGraphMembership` 里跟,还据此往待办清单里写了一条。 这是「指路牌失效」那一族,和 CLAUDE.md 死链同型,只是方向相反(那边指向不存在的东西, 这边描述已不存在的洞)。 判据的措辞也改了:**「成型」的判据在 graph-service.orgGraphMembership(),不在这里**, 免得下一个人照注释理解。P3B 文档与 docs/README.md 的对应条目一并更正。 ## 二、还上「真实路径 smoke 进 CI」那笔欠账的一半(27-P3/P4 §十 硬规矩 2) 原话是「凡是靠注入点验的能力,都要有一条真实路径的 smoke 进 CI 才算验收完成 —— 这条欠账仍未还」。此前唯一走真实路径的 `scripts/real-pm-smoke.js` 要真 API 额度、 人工跑、而且验的是 DevLoop 不是图执行。 做法是把「真 LLM」和「真代码路径」拆开:**只把最外层的 CLI 子进程换成 fixture 回放**, setAgentExecutor / setPlanWorkGraph 一个都不调。链路完整走 advanceOne → defaultAgentExecutor → AgentManager → ClaudeCliProtocol → onAcpEvent → 落盘 → readNodeProduct → settleNode → spendBudget → 边界守卫。 三条断言各盯一处**假 executor 天然绕开**的接线: · ① mock/files 真的落到节点产物目录(假 executor 直接 return,这一环整个不存在) · ② token 用量真的从 session/result.usage 数进预算 —— **就是 §六 验收 10 卡了两轮的那一维** · ③ boundaryGuardApplicable 在这条路径上为真(注入假 executor 时它恒为假, 那条唯一有实际后果的分支实际零覆盖);带反向对照,注入后必须变假 反向验过:断掉①的落盘、断掉②的累加,对应用例分别变红。 为此改了一处 mock:session/result 的 usage 原来硬编码 {input:0,output:0}, 现在 fixture 可指定(缺省仍是 0,既有 fixture 行为一个字不变)。 **不改这一处,token 那一维在 CI 里永远产不出数** —— 验收 10 当初就是卡在这儿。 **没还清的部分写在文档里,别当成还清了**:真 LLM 仍进不了 CI; subgraph 那一支(defaultPlanWorkGraph)仍只有注入式覆盖; 多节点 / 回退边 / 熔断没进这条 smoke,它只推一个节点。 afterAll 清掉真实链路建出的公司态目录(gitignore 挡着不进库,但留着会让别的 用例遍历 system/agents/ 时多扫一份)。 全量:139 文件 / 1295 测试全绿。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
-
设计见 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>
-
测试 786/786 全绿(76 文件,起点 760/72),未改任何既有断言。 ## 本轮三件新东西,全部经真 CLI 验证 W12 补完 · 失败原因四环打通 - 引擎自判的失败(executor 抛异常、边界越界、子 run 无归因)现在也落 graph_run_nodes.fail_reason,不再只有 agent 归因产出的才有值 - 概览 tab 展示「[引擎判定] boundary_escape」+ 终端样式 excerpt, 取不到 fail_reason 时回落 output_excerpt,并标明来源 - 真跑实查:两行 fail_reason='boundary_escape' 都在库里, 产生→传递→落库→读回四环在真 CLI 下走通 W13 · 运行态文件根治(守卫误判的根因) - 17 个 todo.md / plan.md / scheduled_tasks.json git rm --cached + gitignore; 源码(agent.md/config.json/soul.md/tools.md)一个未碰,模板本体仍跟踪 - _registry.json 的 usedCount 挪进已忽略的 data/template-usage.json - 真跑验收:整轮(agent-creator、Master 各一次真 CLI、3 次 hire)结束时 worktree git status 与基线逐字相同,_registry.json 零 diff 单步进度感 · 真 CLI 一个节点 3-7 分钟 - 画布卡片秒表 + 详情面板常驻条「运行中 2m40s · 最近事件 …(2m40s 前)」 - 不做假进度条:引擎不知道 agent 还要多久 - 顺手修 NodeDetailPanel 不跟 SSE 走(否则秒表也不会动) W9 失败上下文进提示词、W10 跨层地址两半、W11 Hot Swap 显式告警同批完成。 ## 真跑结论:链路更长,但「work 节点 → success」仍未跑到 走到:orggraph-planning 落图自雇 → agent-creator 补定义 → workgraph-planning 真跑规划 + **先雇后提交**(W5/W6 再次成立)→ 子 run 起来 → work 节点 RUNNING → 7m19s 后 fail。两层原因叠加,都与 W1-W14 无关: 1. **新缺陷**:agent-manager.js:324 把 idleTimeoutMs 硬编码 120s, readme-writer 通读源码静默超 2 分钟被掐死(动笔前就死了)。 同进程 ClaudeCliProtocol 早把自己的 idle 上限放到 24h, stream-executor 的 JSDoc 默认值写的是 30 分钟 —— 这里把两者都压掉一个数量级; 且 ...options 透传的 idleTimeoutMs 会被下一行覆盖,调用方无法覆写。 2. **并行 agent 污染**:retrain-watchdog 每 5 分钟唤起的 Master 在同一工作树里 改了两个源文件,被守卫 git status 差集算到该节点头上 → 额外署 boundary_escape。 这是 W3「拦不住」第 5 条第一次真实发生。 顺带记一笔:这一轮任务是 **LemonBoss 自己的 Master 自主下的单**, 走的正是 POST /api/company/:id/tasks,它还自行诊断出了上面那个 idle timeout 并动手改(引用了未定义的常量,是坏的)。 ## 已知未修(下一轮) - idleTimeoutMs 硬编码 120s —— 「work 节点 → success」跑不通的唯一技术原因 - W7 在**零边最小图**上失效:判据③要求存在 active org_graph_edges, 零边图上三条判据全落空,work 层本体被写进 org_graph_nodes。 服务层那 9 例测试造的都是有边的成型图,正好绕开这个形状 - 前端 ACTIVE_RUN 含 blocked、后端 ACTIVE_ROOT_RUN_STATUS 不含: 一家公司只要失败过一次,控制台上就再也下不了第二个任务(后端其实放行) - 真跑期间工作树里不能有第二个 agent 活动,否则守卫判罚不可信 —— 应写进真跑规程 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
-
真 CLI 冒烟(worktree 隔离,PORT 3010)九轮来首次把 work 节点跑起来: orggraph-planning 真跑 3 分钟自主裁成单 org node 零边图 → workgraph-planning 第 1 轮产出合法图 → **自己按 Step 6 把 brd-planning / planner-validator 雇进公司** (W5/W6 核心验收成立,且 W7 判据生效、两者都没写进 org_graph_nodes)→ 第一个 work 节点 brd-planning 真起 CLI 子进程,产出 brd.md / contract.json / attempt-0.json 全部落在 run 目录内。图内预算仅 2 次调用 / 13998 tokens(上限 15)。 W5/W6 · workgraph-planning 自雇:撤掉「你不招人也不辞人」,Step 6 加招聘环节, 写死「先雇、再提交图」的顺序,给出失败分级与幂等要求 W7 · work 层招聘不写 org_graph_nodes:按 type 与 work graph 骨架点名两条判据区分层级, P2 「hire org 角色 → org graph 出现该节点」的语义保持不变 W8 · 控制台「规划组织结构」按钮(抽成 ReplanOrgGraphButton.vue,带过渡态与秒表), 接 POST /:companyId/org-graph/replan(该端点此前无任何前端调用方); 新增 fixtures/devloop-mock/orggraph-planning.json W12 · 节点失败留痕:node.output 带 output_excerpt、新增 node.error 事件。 真跑当场救场——守卫误判那条归因正是靠它才查得出来, 换成之前看到的只有「节点 fail、无原因、无痕迹」 测试 753/753 全绿(71 文件,起点 736/68)。 已知未修(下一轮):子 run 转终态不回写父 node_run 导致任务永久卡死; applyBoundaryGuard 用整仓 git diff 判归属会把并行 agent 的写算到当前节点头上; W12 的 fail_reason 未落库(概览 tab 仍为空);POST /:cid/tasks 无前端调用方。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
-
■ 前端路由遮蔽(既有 bug,被 P2 的 T8 暴露) web/src/router/index.js: CompanyAgentChat 的 path 是 /:id/agents/:agentId? —— agentId 可选,导致它抢占 /:id/agents,而导航栏「Team」正是指向这个地址。 结果 CompanyDashboard 的团队 tab(连同 P2 新增的 Org Graph 区块)完全不可达, 点 Team 打开的一直是 AgentChat。改为 :agentId 必填。 ■ Org Graph 空边时凭空画出流程链(P2 T8 的 bug) 0 条 forward 边时所有节点入度都是 0,全部落进拓扑序且 degraded=false, 模板照常在节点间渲染 → 箭头,凭空捏造出一条并不存在的流转顺序。 P0 迁移进来的存量公司(有节点无边)全部中招。新增 orgGraphNoEdges 判定: 这种情况只平铺、不画箭头,并明确提示「尚未定义流转顺序」。 ■ create() 仍在建 goals/ 目录(我在 OKR 正名 74ea1ff 里的遗漏) company-service.js 的 subdirs 列表没跟着 goals→okr 一起改,新建公司仍然产出 goals/ 空目录。改为 okr/。 ■ test-company-e2e.js 从「第 4 个断言就崩」修到 114/114 全绿 该脚本长期整体失效,HEAD 版本同样全断言失败。四类问题: 1. 路径过期:data/{id}/ → data/companies/{id}/;data/templates/ → system/templates/;data/agents/master → system/agents/master 2. Phase 4 用 ceo 模板测「骨架是否完整复制」——但 system/templates/ceo/ 只有 plan.md + todo.md,没有 agent.md/soul.md/config.json,测不出东西,且缺 config.json 就没有 type='cxo',company.ceo 也标不上。改用同为 cxo 且文件 完整的 coo。(ceo 模板本身的残缺是另一个待补的问题) 3. 断言停留在 P1 之前:P1 虚拟引用(226489d)之后 agent.md 不再物理拷贝, 改为 config.json.systemAgentRef + company-context.md。按新模型改写 4. 断言停留在 T5b 之前:模板不存在时返回 hired_from_base 而非 training 顺带记录一个设计缺口(未改,仅在测试注释里说明):system/templates/base/ 目前只有 agent.md + config.json,所以 base 继承出的骨架不含 soul.md / identity.md / tools.md / todo.md,也不含 AgentScaffold 的标准子目录结构 (memory/short-term、knowledge、workspace 等)。这些依赖 agent-creator 填充。 另删除 OKR 迁移的 *.bak-goals 备份目录及其 .gitignore 规则。 验证:npm run test:unit 676 全绿;test-company-e2e 114/114;web:build 通过; Chrome 实机确认 Team tab 可达、空边提示正确。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
-
用 9 个并行 agent 按「文件独占」划分实现 P2 的 T1-T9(T0 已于 2255f09 完成)。 详见 docs/todo/system-design/27-p2-org-graph.md §五。 阶段 A · 数据层 - graph-db.js: org_graph_nodes 加 status/reports_to_node_id(PRAGMA 探测后 ALTER, 幂等);全量唯一索引换成 WHERE status='active' 的部分索引,使「fire 后重新 hire 同角色」可行;org_graph_edges 重建为执行流边(condition/edge_kind/status) - graph-service.js: ensureOrgGraphNodeIndex 同步改建部分索引,且 upsertOrgGraphNode 的 ON CONFLICT 必须写成 ON CONFLICT(company_id, role_name) WHERE status='active' —— SQLite 的冲突目标要与部分索引谓词逐字对应,否则整条 INSERT 直接失效 - org-graph-service.js(新): validateGraph 四项校验 + writeGraph/patchGraph/ getGraph/removeNode,事务化,节点软删除级联失效相关边 - routes/company.js: 四个端点 POST/PATCH/GET /org-graph + POST /org-graph/replan; /create 接入自动招聘 orggraph-planning + 异步触发(失败降级为空壳公司); /fire 接入节点软删除 阶段 B · 自动生成 - system/org-graph-templates/{dev,content,ops}.json + README:三张三段式骨架 (规划→执行→验收,验收失败回退到执行节点),角色名遵循 {domain}-{职能} - system/templates/orggraph-planning/:新 system agent(type='meta-bootstrap'), 含 §4.1 八步工作流 - company-service.js: 模板不存在时从 system/templates/base/ 元 agent 继承骨架 (自动带 RESEARCH→PLAN→EXECUTE→VERIFY 四段式)+ agent-creator 填充, 新建 agent scope='company'。这是 27-E2E §八bis 元 agent 继承的落地点 阶段 C · 展示 - CompanyDashboard.vue: 组织流程拓扑链渲染 + 空态降级 + 环深度保护 并行编排中发现并修复的三处(均不在原任务划分内): - AppNav.vue 建公司表单缺 goal 输入框 —— T0 只改了后端,前端表单没同步, company-goal 实际传不进来。这是上一轮 T0 的遗漏 - graph-seed-service.js 会把 type='meta-bootstrap' 的 orggraph-planning 塞回 org graph,与 hire() 的 guard 不一致 - graph-agent-p1-acceptance.test.js: hire 未知角色的返回从 needs_training 改为 hired_from_base(T5b 的行为变更),断言同步 验证(独立复核,非 agent 自述): - npm run test:unit 676 passed / 63 files(基线 652,+24 为新增的 org-graph 用例) - npm run web:build 通过 - 三个模板 JSON 实跑 validateGraph 全部通过;四类非法图各自被对应 rule 拒绝; writeGraph→getGraph→removeNode 级联验证通过(删中间节点后 3 条边全部失效) Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
-
起因:逐条比对 27-REQ 的原话与 P2 v0.4,发现四处偏离,其中两处是设计悄悄 改变了原意。本次修正并落定。 代码(P2 §五 T0): - company.json 新增 goal 字段(company-goal),create({id,name,goal,description}) - POST /api/company/create 与 update() 同步支持 - 修的是一个实打实的遗漏:R-6 原话是"写入 company 的目标和描述"(两个字段), 而 create() 一直只有 description。orggraph-planning 规划流水线的主依据本该是 company-goal,此前根本拿不到。 文档定案(R-13): - R-13.1 goal 三层递归:company-goal / task-goal / subagent-goal,与"验收逐层 递归"对应。澄清 R-12 说的"唯一的那个 goal"其实是 task-goal;三个验收 agent 保持通用不按层级拆分。记录一处待定:subagent-goal 按执行者命名,与另两个的 作用域命名轴不一致(按轴应为 subtask-goal)。 - R-13.2 公司类型完全由 orggraph-planning 推断 —— 这条**推翻了我自己记的一个 缺陷**:审计时我把"不加 type 枚举字段"记为擅自偏离原话,实际那正是所需, 当前设计无需改动。 - R-13.3 新 agent 从 system/templates/base 元 agent 继承骨架(自动带四段式 RESEARCH→PLAN→EXECUTE→VERIFY)+ agent-creator 填充,而非直接走 needs_training 全量培养;新建一律 scope='company';innovator 训练是可选后置步骤。 这是 R-9.2"所有 node agent 由元 agent 继承生成"在 P2 的落地点(新增 T5b)。 - R-13.4 org graph 强制单入口,原 open question 关闭。 顺带修掉 P2 的一处内部不一致:§六 承诺"提供手动触发 orggraph-planning 的端点" 给存量公司补图,但 §四.3 API 表和 §五 任务表都没有。已补 POST …/org-graph/replan。 另更正 R-11 中"代码层未执行"的过期表述——OKR 正名已于 74ea1ff 实施完毕。 回归:npm run test:unit 652 例全绿。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> -
四处写 _registry.json 的地方都用 JSON.stringify(registry, null, 2) 直接落盘, 不带末尾换行。文件在仓库里是带换行的,导致任何一次 hire()/depositTemplate()/ 模板增删改之后,git diff 都会多出一行 "\ No newline at end of file" 的噪音, 把真实的数据变更淹掉。 写入点: - company-service.js:374 depositTemplate() - company-service.js:824 _updateTemplateUsedCount() - routes/company.js:86 PATCH /templates/:templateId - routes/company.js:120 DELETE /templates/:templateId 同时提交一次真实的运行时数据变更:qa-judge usedCount 7 → 8。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
-
hire() now checks system_agents (source_kind='template') before provisioning a new company agent: if the role has a shared template row, skip copying agent.md and instead let AgentManager.getAgentConfig()/PromptBuilder.build() resolve the prompt from the shared legacy_path at call time, with per-company context assembled from a new company-context.md. Roles without a template row (including the 6 ids that exist in both system/agents/ and system/templates/, e.g. evolver-youtube-crawler) fall back to the existing full-copy behavior unchanged. - server/services/graph-service.js (new): lookupSharedAgentMd(), upsertOrgGraphNode() - server/services/company-service.js: hire() reference-mode branch, _provisionReferenceAgent() - server/src/core/agent-manager.js: getAgentConfig() resolves prompt/companyContextPath - server/src/core/prompt-builder.js: build() concatenates company-context.md - unit + integration tests covering all 6 acceptance criteria from docs/todo/system-design/27-p1-virtual-reference.md §6, including a regression test against the real idearun:evolver-youtube-crawler naming-collision case Full regression suite (587 tests) passes; independent adversarial review found 0 blocking/major issues. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
-
Fixed 4 hidden bugs where path.join(DATA_ROOT, "system", ...) was used instead of direct path.resolve to root-level system/: - agent-chat.js: billing log scan (line 804) and agent list scan (line 909) - company-service.js: TEMPLATES_DIR and GLOBAL_AGENTS_DIR constants - heartbeat-service.js: system agents scan directory These were missed because they used path.join with a variable (DATA_ROOT) rather than the literal string "data/system" that sed caught.
-
…ictly enforce empty shell company creation
-
- System agents: 只保留 master (data/system/agents/master) - Templates: 所有可复用 agent 模板 (data/system/templates/) - Companies: 公司创建时自动部署 5 个元 Agent (innovator/hunter/digester/evolver/agent-creator) 路径修复: - agent-chat.js: /list 扫描路径修正 (system/agents + companies/*/agents) - agent-manager.js: 动态 agent 查找路径修正 - skill-config-loader.js: 修正 agents root - pipeline-service.js: pipelines 输出到 companies/{id}/pipelines/ - billing.log: 移至 companies/{id}/logs/ 下 Skills 标准化: - 所有 template agent 建立 .claude/skills/main_skill/SKILL.md - company-service._copyTemplate() 新增 .claude/ 目录复制 - innovator SKILL.md v3.0: 移除旧 l3-hunt/l2-digest 命名 - 清理重复 agent_creator, 统一为 agent-creator 清理: - 移除 data/agents, data/workspace, data/logs, data/goals 旧目录 - 清除所有未使用的 DATA_DIR 声明 - 清除 template 中的 conversations/logs/memory 运行态数据
-
- Add Company Overview tab as default landing page - Show company info: status, uptime, agent count, heartbeat status - Start/Stop company buttons (activate/deactivate all agent heartbeats) - Per-agent heartbeat controls: interval dropdown, start/stop buttons - Backend APIs: GET status, POST start/shutdown, PUT/POST agent heartbeat - Track startedAt timestamp for uptime calculation - Update CEO agent.md with mandatory 5-step startup workflow - Fix company nav to default to overview tab
-
- scaffoldNewAgent: create agent skeleton via AgentScaffold directly - depositTemplate: benchmark gating (≥95) + auto-deposit to templates/ - hireWithTraining: full flow (template lookup → scaffold fallback) - Company route: /hire uses hireWithTraining, new /deposit-template endpoint - E2E test: 69/69 passed (Phase 1 + Phase 2)
-
- CompanyService: CRUD (create/get/list/update/shutdown) - Agent Hiring Pipeline: template lookup → copy → context injection - Template registry (_registry.json) with CEO and qa-judge initial templates - resolveAgentDir(companyId, agentId) unified agent directory resolution - Company REST API routes (/api/company/*) - E2E test: 46/46 passed