ARTICLE DETAIL

资讯详情

深耕网站建设、视觉设计与SEO优化的一线实战洞察。

OmX 研究型专家评估面:researcher / dependency-expert / explore 的角色边界与交接回归覆盖

OmX 研究型专家评估面:researcher / dependency-expert / explore 的角色边界与交接回归覆盖 OmX 研究型专家评估面researcher / dependency-expert / explore 的角色边界与交接回归覆盖【免费下载链接】oh-my-codexOmX - Oh My codeX: Your codex is not alone. Add hooks, agent teams, HUDs, and so much more.项目地址: https://gitcode.com/GitHub_Trending/oh/oh-my-codex本文基于仓库文档 docs/qa/research-specialist-eval-surface-2026-04-18.md 展开对应 issue #1712「为 researcher、dependency-expert、explore 三个专家角色建立更清晰的边界与交接回归覆盖」。文章以该验证面为骨架结合 OmX 团队编排源码、提示词契约与测试用例说明这三个角色在路由、排班staffing与输出契约三个层面如何被系统性地测试与保障。导读在 OmX 的多 Agent 团队编排omx team中谁来做、做什么、产出长什么样是三个必须同时稳定的问题本地代码库探查该由explore承担外部文档与已选技术栈研究该由researcher承担依赖选型与升级评估该由dependency-expert承担。本文介绍的评估面eval surface用三类回归测试把这条边界钉死路由启发式测试、交接排班测试、角色输出契约测试。读完本文你将掌握这三个角色的职责划分依据、底层关键词路由与排班逻辑以及如何在本地复跑整套验证命令。这个验证面在保证什么根据原文档该验证面2026-04-18issue #1712从四个层面锁定三个专家角色的行为代表性路由夹具routing fixtures存在覆盖explore、researcher、dependency-expert单角色场景以及explore researcher、explore dependency-expert混合场景。混合场景专门验证本地探查 外部研究/依赖评估同时出现时的分流顺序。角色输出契约检查role output-contract checksresearcher必须保留 source URLs、官方文档优先偏好、版本说明语言必须停留在已选技术栈的文档/行为问题上而不是默默滑向依赖对比。dependency-expert必须保留候选对比、维护/许可证/风险语言拥有 adopt采用/ upgrade升级/ replace替换/ migrate迁移决策权并把已选技术栈文档问题交还给researcher。explore必须保持本地、只读输出绝对路径与文件关系指引拥有仓库本地事实并把外部文档/依赖建议向上交接。执行交接排班handoff staffing混合车道场景必须同时分配两条 lane避免只派一个角色造成的信息断链。刻意非目标non-goals不新增 benchmark 框架、不做线上网页质量评分、不引入额外 runtime/e2e 基建全部复用现有测试面。这意味着该验证面是低成本、可回归的契约层而不是重型的端到端评测系统。当前回归面一览原文档给出三个回归面对应三个测试文件与覆盖内容回归面文件仓库根相对路径覆盖内容路由启发式src/team/tests/role-router.test.ts本地探查、已选技术研究、依赖评估以及本地使用 升级混合提示的直接角色路由执行交接排班src/team/tests/followup-planner.test.tsexplore researcher、explore dependency-expert混合车道排班夹具角色输出契约src/hooks/tests/prompt-guidance-wave-two.test.ts三个专家角色的提示词级输出形态与边界检查验证命令本地可复跑原文档给出两条命令可在仓库根目录直接执行npm run build node --test dist/team/__tests__/role-router.test.js dist/team/__tests__/followup-planner.test.js dist/hooks/__tests__/prompt-guidance-wave-two.test.js注意第二条命令运行的是编译产物dist/目录下的.js因此必须先执行npm run build完成 TypeScript 编译。这样验证面与实际发布路径保持一致避免源码测试通过、打包后行为漂移的假阴性。第一层路由启发式 —— role-router 如何分流路由层位于 src/team/role-router.ts对外暴露routeTaskToRole(taskSubject, taskDescription, phase, fallbackRole)返回RoleRouterResult含role、confidencehigh/medium/low、reason。三个专家角色由一组专用判定函数按固定优先级决定。判定函数的优先级链在routeTaskToRole内src/team/role-router.ts先处理 build-fix / debug 意图然后依次检查isLocalExplorationTask(text)→explorehighisImplementationHeavyDependencyTask(text)→ 走 fallback 实现车道medium防止把实现替换工作误判给 dependency-expertisDependencyEvaluationTask(text)→dependency-experthighisResearchTask(text)→researcherhigh其余再按 docs / design / cleanup / review / verification 等意图与关键词计分兜底注意第 2 步的防误判设计如果任务同时命中依赖信号、实现意图与依赖实现信号如 adapter、call sites、imports、wire且包含 adopt/migrate/replace/upgrade 等动作词、却不包含assess/choose/compare/evaluate/options/recommend/select/trade-offs 等评估词则判定为实现密集的依赖替换工作交给 fallback 实现车道而非 dependency-expert。对应测试夹具见 src/team/tests/role-router.test.tsReplace auth SDK integration。三个角色的信号词exploreLOCAL_EXPLORATION_VERBcheck、find、locate、map、search、trace、understand、which files...LOCAL_EXPLORATION_SUBJECTfile、symbol、repo、path、usage、relationship、wiring、flow、local...或LOCAL_USAGE_DISCOVERYcall sites、how we use、integration points、our usage...。典型夹具Map which files and symbols implement the local session refresh flow in this repo → explorerole-router.test.ts。researcherRESEARCH_SIGNALofficial docs、upstream docs、api docs、release notes、versioning、compatibility、researchRESEARCH_VERB或CHOSEN_TECH_RESEARCH_SIGNALapi、framework、library、sdk、service、tool、vendorCHOSEN_TECH_RESEARCH_NEEDbest way、behavior、how to、in the wild、parameter、what does、why does...。两个关键夹具仅凭 best way to use this framework feature expected behavior 这类不含显式 docs 关键词的已选技术问题也能路由到 researcherrole-router.test.tsCheck how we use this SDK today and whether we should upgrade it 这类本地使用 升级决策任务则优先路由到 explorerole-router.test.ts。dependency-expertDEPENDENCY_EVALUATION_SIGNALdependency、package、sdk、library、framework、npm、pypi、license、maintenance、download stats、migration path、vendor 评估动词adopt、assess、choose、compare、evaluate、recommend、replace、select、swap、upgrade或评估语境candidate、comparison、risk、trade-offs...。夹具Compare npm packages for maintenance, license compatibility, migration path, and download stats → dependency-expertrole-router.test.ts。其余保障设计角色名安全校验SAFE_ROLE_PATTERN /^[a-z][a-z0-9-]*$/loadRolePrompt拒绝路径穿越如../../../etc/passwd、大写、含点角色名见 role-router.test.ts。listAvailableRoles只扫描.md文件并按文件名去扩展名排序测试同时保证不会把*-AGENTS指令文件暴露为角色。路由确定性相同输入必得相同输出测试覆盖于 role-router.test.ts。关键词计分兜底同类别命中 ≥2 个关键词为 high、恰好 1 个为 medium、0 个则依赖 phase 语境或 fallbackRole 且为 low。第二层交接排班 —— followup-planner 如何组队路由层解决单个任务给谁排班层解决混合任务该同时派哪些 lane。核心实现在 src/team/followup-planner.ts 的buildFollowupStaffingPlan(mode, task, availableAgentTypes, options)。排班结构对于team模式workerCount ≥ 2时分配质量车道test-engineer / verifier / quality-reviewerworkerCount ≥ 3时调用pickSpecialistRole分配专家支持车道workerCount ≥ 4时扩展主实现车道容量。pickSpecialistRole与路由层采用同一套信号词判定wantsExplore、wantsDependencyExpert、wantsResearcher并用chooseDistinctAvailableRole确保混合任务选出的专家角色与主角色互斥避免同一人同时干两条互相矛盾的 lane。混合车道的三个测试夹具对应 src/team/tests/followup-planner.test.tsexplore researcherFind which files implement session refresh in the repo, then research the official docs and version compatibility notes for the auth SDK → 主 lane 为 explorereason 含primary专家 lane 为 researcherreason 含specialist见 followup-planner.test.ts。explore dependency-expert对比迁移Map which local packages currently handle logging, then compare replacement npm packages for license risk, maintenance, and migration path → 主 lane explore、专家 lane dependency-expert见 followup-planner.test.ts。explore dependency-expert本地使用 升级Check how we use this SDK today and whether we should upgrade it → 同样 explore 主、dependency-expert 专家见 followup-planner.test.ts。三个夹具的共同点凡涉及仓库本地事实的任务explore 永远先于外部评估角色——这正呼应了输出契约中explore 拥有 repo-local facts把外部文档/依赖建议向上交接的边界。启动提示与验证计划排班结果同时生成launchHints与verificationPlan。team 模式启动命令为omx team N:fallbackRole taskskill 形态$team ...Ralph 模式为omx ralph task验证计划固定 3 个检查点强调交付 lane 并行 独立验证 lane 在关闭前捕获新鲜证据。测试还验证了通过codexHomeOverride注入.omx-config.json的agentReasoning可对特定角色如 architect覆写推理档位为xhigh见 followup-planner.test.ts。第三层输出契约 —— prompt 级边界检查排班与路由解决谁来做输出契约解决做出来长什么样。该层由 src/hooks/tests/prompt-guidance-wave-two.test.ts 驱动通过loadSurface读取prompts/*.md并对三个角色提示词做正则断言。契约名单WAVE_TWO_CONTRACTS定义于 src/hooks/prompt-guidance-contract.ts除researcher、explore外还包含 architect、critic、debugger、test-engineer、code-reviewer、quality-reviewer。researcher 契约prompts/researcher.md工作流要求classify the request先分类请求、按authoritative docs structure收敛到smallest set of pages、在文档锚定之后再给examples that add value、保留source-reference evidence。引用纪律OSS 证据必须用org/reposha:path:line格式且never a moving branch禁止引用移动分支输出契约必须包含OSS Reference Implementations小节。范围守卫already chosen technology只研究已选技术栈repo-local usage必须转交explorepackage/SDK adoption必须转交dependency-expert。输出要素source URL、Prefer official documentation、Version compatibility or version uncertainty is noted when relevant/### Version Note、version/date certainty。dependency-expert 契约prompts/dependency-expert.md候选要求at least two credible candidates至少两个可信候选评估要素覆盖license requirements|license sources、release and commit activity|adoption/download signals、Risks。决策权与边界必须明确adoption, upgrade, replacement, or migration decision采用/升级/替换/迁移决策归它所有同时把已选技术栈的文档问题route it to researcher。explore 契约prompts/explore.md输出形态ALL paths are absolute所有路径绝对化、Relationships between files/patterns explained解释文件/模式间关系。行为边界Read-only、repo-local facts only遇到依赖推荐时report that handoff upward向上交接不自行做外部评估。契约测试同时验证各提示词都带 grounded-evidence 措辞如 researcher 的citation sufficiency、explore 的answer is grounded从提示词源头约束证据充分才下结论。如何扩展这套评估面从源码结构看扩展新角色边界遵循三步模式路由层在 src/team/role-router.ts 增加信号正则与判定函数并在routeTaskToRole的优先级链中插入位置在 role-router.test.ts 补正例与负例尤其是看似该角色、实则不属于的对抗性用例如实现密集的替换任务。排班层在 src/team/followup-planner.ts 的pickSpecialistRole中扩展wants*判定并在 followup-planner.test.ts 补主 lane 专家 lane混合夹具。契约层更新 prompts/researcher.md、prompts/dependency-expert.md、prompts/explore.md 中对应的输出契约措辞并在 prompt-guidance-wave-two.test.ts 补正则断言。小结这个评估面是 OmX 团队编排中专家角色纪律的可执行化路由启发式保证任务流向正确角色交接排班保证混合任务不缺 lane输出契约保证每个角色的产出形态与边界措辞不漂移。三者共同回答 issue #1712 的核心问题——如何让researcher、dependency-expert、explore在协同工作时既各司其职、又正确交接而不是互相越界或静默滑向对方职责。对希望在自己的 Agent 编排中复刻这套边界回归面的开发者上述三个测试文件与提示词文件即是可直接对照的模板。【免费下载链接】oh-my-codexOmX - Oh My codeX: Your codex is not alone. Add hooks, agent teams, HUDs, and so much more.项目地址: https://gitcode.com/GitHub_Trending/oh/oh-my-codex创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考
返回列表