已合并
refactor(ops-direct-invoke): 重构为 skill 驱动的多角色编排工作流,支持算子仓继承与静默模式 #5
refactor(ops-direct-invoke): 重构为 skill 驱动的多角色编排工作流,支持算子仓继承与静默模式 #5
已合并
xutianze创建于 5 天前
xutianze
xutianze成员
5 天前

描述

本次重构将 ops-direct-invoke 插件的工作流实现从「静态 agents + workflows 目录」模型改为 skill 驱动的多角色编排模型,借鉴面向对象设计思想,将通用工作流沉淀为 CANNBot 维护的「基类」,各算子仓作为「子类」继承编排流程、仅覆写与自身耦合的领域知识,达到一套核心流程服务所有算子仓、消除重复建设的目的。

主要变更

  • 角色重构:由 4 个角色(ascendc-kernel-architect / design-reviewer / developer / reviewer)扩展为 6 个专业角色(architect、developer、developer-code、developer-test、developer-doc、QA),PM 主 Agent 只调度不执行,执行与验收职责分离。
  • 工作流引擎化:删除旧 workflows/ 静态目录,新增 16 个子 skill:
    • ops-direct-invoke-workflow:统一流程编排(阶段 0-7、CP0-CP5 检查点、任务回退、静默模式)
    • ops-direct-invoke-workflow-maintain:维护红线与 SOLID 设计约束看护
    • plugin-experience-summary / plugin-perf-iteration / plugin-pr-submit:可插拔流程插件,frontmatter 声明挂载点、init 注册到 .cannbot/settings.json,自闭环可单独触发
    • repo-build-guide / repo-coding-rules / repo-knowledge / repo-op-templates / repo-test-develop:仓库领域知识
    • workflow-cp0 ~ workflow-cp5:各检查点验收 skill
    • workflow-doc-templates / workflow-agent-permissions:文档模板与权限管理
  • 跨平台权限守卫:旧 hooks(hooks.json / run-hook.cmd / session-start-ops-direct)替换为按角色写权限隔离的 permission-guard hooks,覆盖 claude / codex / dsh / opencode / trae 五类 CLI(dsh 提供可选部署级 Cordis 守卫插件)。
  • 配置统一与静默模式:运行时配置收敛到 .cannbot/settings.json 唯一权威(工作流模式、插件注册与启用状态、问卷状态);新增静默模式(--mode silent 完全无人值守,支持会话内「开启/关闭静默模式」切换与权限预检)。
  • init.sh 重写为 constructor 模式:装配 .cannbot/permissions、权限 hook、.cannbot/settings.json、依赖仓 clone 到 .cannbot/example/init.sh 提供算子仓接入范例。
  • 安装一致性:install-helper 不再声明 installSkills / externalRepos,改由 init.sh 完成装配;dependency_validator.py 增强 DG-11 校验,支持从 agents/*.md frontmatter 解析 skill 白名单。

测试

我们在 CannBench 官方任务集上完成 53 个算子的全量实现与评测(方案名 direct-invoke@Claude deepseek-v4-flash),标准集用例通过率 98.8%、隐藏集 95.5%,总分 7383.64,平均加速比标准集 0.53、隐藏集 0.85。

文档更新

  • 新增 plugins-official/ops-direct-invoke/README.md:设计思想、知识分层、角色与流程概览、设计约束、静默模式说明

类型标签

流水线故障排查

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 xutianze 的贡献)
xutianzexutianze成员
5 天前 创建了 pull request,commit a693401a
xutianzexutianze成员
5 天前 update merge request[project id: 10708627, iid: 5, commit_id: 62064b388be6a744c313ae9f41942b645ed311b5] virtual merging success
xutianzexutianze成员
5 天前 推送  2 个提交:a693401a-1 commit from branch masterdfe61c5f-Merge remote-tracking branch 'upstream/master' into feat/ops-direct-invoke-skill-workflow
xutianzexutianze成员
5 天前 update merge request[project id: 10708627, iid: 5, commit_id: 0b2ce88674291d7400ff1dd01f9d5868221a2e97] virtual merging success
CANN-robotCANN-robot成员
5 天前 添加了label:cann-cla/yes
CANN-robotCANN-robot成员
5 天前 添加了label:stat/needs-squash
CANN-robot
CANN-robot成员
5 天前 评论:

Thanks for your pull-request.
The full list of commands accepted by me can be found at here.
You can get sig-info at here.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
For more, you also can visit HICANN.


PR Approval Progress

Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
repo-cann/cannbot 汤平川, 宋恺 (2/2) 汤平川 (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

xutianze, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
xutianzexutianze成员
5 天前 修改了pull request 的描述
xutianze
xutianze成员
5 天前 评论:

compile

likedislike
xutianzexutianze成员
5 天前 update merge request[project id: 10708627, iid: 5, commit_id: d2cca3dc4ba187c30779b87eb0b7d970cafb2a6a] virtual merging success
CANN-robot
CANN-robot成员
5 天前 评论:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robot成员
5 天前 添加了label:ci-pipeline-running
此处折叠了7条事件消息 查看更多
CANN-robotCANN-robot成员
5 天前 删除了label:ci-pipeline-passed
CANN-robot
CANN-robot成员
5 天前 评论:

Notification

This pull request has been changed(code update) or closed, so removes the following label(s): ci-pipeline-passed.

likedislike
xutianzexutianze成员
5 天前 update merge request[project id: 10708627, iid: 5, commit_id: 1cd52794dba8b93205441193ac2553b1afd9ec82] virtual merging success
xutianzexutianze成员
5 天前 强制推送  1 个提交:e018a715-feat(ops-direct-invoke): 迁移 skill 驱动的多角色编排工作流,支持源码与 npm 双模式安装
xutianzexutianze成员
5 天前 update merge request[project id: 10708627, iid: 5, commit_id: 79a2988aa09e8ca0a00d28ea8ede7e886ffa2604] virtual merging success
CANN-robotCANN-robot成员
5 天前 删除了label:cann-cla/yes
CANN-robotCANN-robot成员
5 天前 删除了label:stat/needs-squash
CANN-robot
CANN-robot成员
5 天前 评论:

Notification

This pull request has been changed(code update) or closed, so removes the following label(s): stat/needs-squash.

likedislike
CANN-robotCANN-robot成员
5 天前 添加了label:cann-cla/yes
xutianze
xutianze成员
5 天前 评论:

compile

likedislike
xutianzexutianze成员
5 天前 update merge request[project id: 10708627, iid: 5, commit_id: 76a46a755df4a9bfe85a3a11c35925de508baaa7] virtual merging success
CANN-robot
CANN-robot成员
5 天前 评论:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robot成员
5 天前 添加了label:ci-pipeline-running
CANN-robotCANN-robot成员
5 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
5 天前 添加了label:ci-pipeline-passed
CANN-robotCANN-robot成员
5 天前 添加了label:approved
TangPC
TangPC成员
5 天前 评论:

/lgtm
/approve

likedislike
songkai111成员
5 天前 评论:

/lgtm

likedislike
CANN-robotCANN-robot成员
5 天前 添加了label:lgtm
CANN-robotCANN-robot成员
5 天前 合入了pull request