From b9c61b1c77bb201eed67901af0b7435a37dfb643 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=89=E4=B9=8B=E5=B8=9D=E7=9A=87=E4=BE=A0?= <1239628095@qq.com> Date: Fri, 24 Apr 2026 09:46:55 +0800 Subject: [PATCH] feat: add edict-sanshen skill (Three Departments & Six Ministries workflow) --- src/content/skills-zh/edict-sanshen.md | 63 ++++++++++++++++++ src/content/skills/edict-sanshen.md | 90 ++++++++++++++++++++++++++ 2 files changed, 153 insertions(+) create mode 100644 src/content/skills-zh/edict-sanshen.md create mode 100644 src/content/skills/edict-sanshen.md diff --git a/src/content/skills-zh/edict-sanshen.md b/src/content/skills-zh/edict-sanshen.md new file mode 100644 index 0000000..4856235 --- /dev/null +++ b/src/content/skills-zh/edict-sanshen.md @@ -0,0 +1,63 @@ +--- +slug: edict-sanshen +--- + +## 使用场景 + +- 将复杂任务分解为可管理的子任务,并经过强制规划和审核 +- 多智能体协作,角色分明(规划师、审核官、调度官、执行者) +- 通过强制审核关卡确保执行质量 +- 实时任务追踪,自动生成看板仪表盘 +- 生成审计追踪记录,便于合规和复盘 +- 由专门智能体并行执行独立的子任务 + +## 核心能力 + +- **任务规划(中书省)**:启动规划子智能体,将任务分解为 JSON 结构的子任务计划 +- **强制审核(门下省)**:每个计划都必须经过质量审核子智能体审核;评分低于 80 或有严重问题将触发返工 +- **并行执行(六部)**:按依赖关系分组子任务,通过子智能体并行执行 +- **状态机**:强制执行严格的工作流状态转换(草稿 -> 分拣 -> 规划 -> 审议中 -> 批准 -> 调度中 -> 执行中 -> 审核中 -> 已完成) +- **看板仪表盘**:每次状态变更后自动生成单文件 HTML 看板 +- **奏折归档**:自动为每个已完成的任务生成包含完整时间线的 Markdown 审计记录 + +## 示例 + +``` +用户:"帮我分析季度销售数据并生成报告" + +该 skill 将自动: +1. 创建带有唯一 ID 的旨意(任务记录) +2. 启动中书省(规划师)子智能体,将任务分解为: + - 从 CSV 提取数据 + - 执行统计分析 + - 生成图表 + - 撰写报告 +3. 启动门下省(审核官)子智能体审核计划 +4. 如获批准,调度至六部(执行者)并行处理 +5. 收集结果,生成看板仪表盘和奏折归档 +6. 向用户呈现最终报告 +``` + +## 工作流架构 + +``` +用户(皇上) -> 太子(分拣) -> 中书省(规划) -> 门下省(审核) -> 尚书省(调度) -> 六部(执行) -> 奏折(归档) +``` + +| 角色 | 职责 | +|------|------| +| 皇上 | 提交任务的用户 | +| 太子 | 轻量级分拣 - 区分聊天和旨意 | +| 中书省 | 任务分解与规划 | +| 门下省 | 质量审核与评分(0-100) | +| 尚书省 | 依赖分析与任务调度 | +| 六部 | 子任务并行执行 | + +## 注意事项 + +- 需要 Python 3.x 运行 CLI 脚本 +- 所有脚本位于 `scripts/` 目录 +- 看板仪表盘为零依赖的单 HTML 文件 +- 状态机自动强制执行合法的状态转换 +- 任务完成后,看板仪表盘会自动展示给用户 +- 支持在任何阶段进行用户干预(取消、暂停、恢复、展示看板) diff --git a/src/content/skills/edict-sanshen.md b/src/content/skills/edict-sanshen.md new file mode 100644 index 0000000..ffb3a46 --- /dev/null +++ b/src/content/skills/edict-sanshen.md @@ -0,0 +1,90 @@ +--- +name: edict-sanshen +title: Edict Sanshen (Three Departments & Six Ministries) Workflow +description: Orchestrates complex multi-step tasks using a Three Departments and Six Ministries (Sanshen Liubu) workflow with planning, mandatory audit, parallel execution, and real-time kanban dashboard +source: community +author: MycatQieZi +githubUrl: https://github.com/MycatQieZi/qoderwork-skills/tree/main/edict-sanshen +docsUrl: https://github.com/MycatQieZi/qoderwork-skills/tree/main/edict-sanshen +category: meta +tags: + - workflow + - multi-agent + - orchestration + - planning + - kanban + - audit + - task-management +roles: + - developer + - pm + - executive + - operations +featured: false +popular: false +isOfficial: false +installCommand: | + git clone https://github.com/MycatQieZi/qoderwork-skills.git + cp -r qoderwork-skills/edict-sanshen ~/.qoder/skills/ +date: 2026-04-24 +--- + +## Use Cases + +- Decomposing complex tasks into manageable subtasks with mandatory planning and audit +- Multi-agent collaboration with clear role separation (Planner, Auditor, Dispatcher, Executor) +- Quality assurance through mandatory review gates before execution +- Real-time task tracking with auto-generated kanban dashboard +- Audit trail generation for compliance and retrospectives +- Parallel execution of independent subtasks by specialized agents + +## Core Capabilities + +- **Task Planning (Zhongshu)**: Spawns a planning subagent to decompose tasks into JSON-structured subtask plans +- **Mandatory Audit (Menxia)**: Every plan goes through a quality audit subagent; scores below 80 or critical issues trigger rework +- **Parallel Execution (Liubu)**: Groups subtasks by dependencies and executes them in parallel via subagents +- **State Machine**: Enforces strict workflow transitions (draft -> sorted -> planned -> reviewing -> approved -> dispatching -> executing -> reviewing -> completed) +- **Kanban Dashboard**: Auto-generates a single-file HTML kanban board after every state change +- **Memorial Archive**: Auto-generates Markdown audit trails with full timeline for each completed task + +## Example + +``` +User: "Help me analyze the quarterly sales data and generate a report" + +The skill will automatically: +1. Create an edict (task record) with a unique ID +2. Spawn a Zhongshu (Planner) subagent to break the task into: + - Extract data from CSV + - Perform statistical analysis + - Generate charts + - Write the report +3. Spawn a Menxia (Auditor) subagent to review the plan +4. If approved, dispatch to Liubu (Executors) in parallel +5. Collect results, generate kanban dashboard and memorial archive +6. Present the final report to the user +``` + +## Workflow Architecture + +``` +User (Emperor) -> Taizi (Sort) -> Zhongshu (Plan) -> Menxia (Audit) -> Shangshu (Dispatch) -> Liubu (Execute) -> Memorial (Archive) +``` + +| Role | Responsibility | +|------|---------------| +| Emperor | User who submits tasks | +| Taizi | Lightweight filtering - chat vs edict | +| Zhongshu | Task decomposition and planning | +| Menxia | Quality audit with scoring (0-100) | +| Shangshu | Dependency analysis and dispatch | +| Liubu | Parallel execution of subtasks | + +## Notes + +- Requires Python 3.x for the CLI scripts +- All scripts are located in the `scripts/` directory +- Kanban dashboard is a zero-dependency single HTML file +- State machine enforces legal transitions automatically +- After task completion, the kanban dashboard is automatically presented to the user +- Supports user intervention at any stage (cancel, stop, resume, show dashboard)