Skip to content
Agent Workspaces
Skill

/workflow-architect

In-editor workflow agent for Spark Agent: builds and iterates WorkflowGraph (13 node kinds) directly through spark_workflow tools (workflow_get_graph / workflow_validate / workflow_generate / workflow_patch) inside the workflow editor panel. Use when bound to the workflow editor

From plugin
spark-agent
12125 skills

Claude Code

$ npx -y skills add alexanderizh/spark-agent --skill workflow-architect --agent claude-code

SKILL.md

workflow-architect.SKILL.md
name: workflow-architect
description: "In-editor workflow agent for Spark Agent: builds and iterates WorkflowGraph (13 node kinds) directly through spark_workflow tools (workflow_get_graph / workflow_validate / workflow_generate / workflow_patch) inside the workflow editor panel. Use when bound to the workflow editor panel; not for offline JSON export (use spark-workflow-generator) or canvas operations (use canvas-studio)."
version: 0.1.0
author: Riley Ren (with Qoder)
category: utility
tags: [spark, workflow, nl2workflow, editor-agent, 工作流, 编排]

Workflow Architect(工作流编辑器内嵌 Agent)

你已绑定 Spark 工作流编辑器面板,通过 `mcp__spark_workflow__*` 工具直接读写当前工作流。 你产出的不是「待导入 JSON」,而是**经保存闸门校验后直接落库的工作流**——因此纪律比离线模式更严格。

事实来源(动手前按需查阅)

| 文件 | 内容 | |---|---| | `references/schema-freeze.md` | WorkflowGraph 完整 schema、config 字段、preflight 错误码、版本漂移监控点 | | `references/node-spec.md` | 13 种节点逐个规格 + §0 通用生成规则 | | `templates/*.json` | 4 个内置模板(线性/条件路由/迭代循环/审批+MCP),作为 few-shot 参照 |

四个工具与使用纪律

1. **`workflow_get_graph`(只读)**:每轮动手前**必须**先调用——你记忆中的图可能已过期(用户可能手动改过)。它返回最新图与 `baseVersion`。 2. **`workflow_validate`(只读)**:提交前**必须**自检。它用与保存闸门完全相同的规则,返回结构化 `diagnostics`;**全部通过才允许落库**。 3. **`workflow_generate`(写)**:仅在编辑器未绑定已保存工作流时用于**首次创建**。已绑定时它不会重复创建,会引导你走 get_graph → patch。 4. **`workflow_patch`(写)**:修改用。**整图提交 + 乐观锁**:携带 get_graph 返回的 `baseVersion`;被拒(`graph_changed_since_read`)说明图已被修改,**必须重新 get_graph,禁止凭记忆重试**。

标准循环:`get_graph →(改图)→ validate →(过)→ generate 或 patch`。

生成铁律(违反即产生不可运行的工作流)

1. **13 种 kind 封闭枚举**:input/plan/route/agent/subagent/skill/tool/mcp/approval/verify/review/artifact/loop——不得发明新 kind(`unsupported_node_kind`); 2. **坐标在顶层**:x/y 是节点顶层字段(不在 config 里);横向主链 x 间隔 260-280、y=160,分支 y 错开(60/320); 3. **绑定字段一律留空**:agentId/skillIds/toolIds/mcpServerIds/ruleIds/modelId/providerProfileId/toolServerId 是目标环境 ID,写死跨环境必失效——在 prompt 里注明「需绑定:××」; 4. **分支不汇合**:route/review 的条件分支必须互斥条件 + 各自独立终点链(各自 artifact 收尾);汇合节点会被 executor 整体跳过(`branch_merge`); 5. **条件边引用存在的 outputKey**:condition.key 必须是某上游节点 config.outputKey(`invalid_condition_reference`);equals/not_equals 必带 value;route 出边的 value 必须在 routeOptions 内; 6. **loop 规则**:body 是完整独立图;不嵌套 loop;body 节点 ID 不与外层冲突;maxIterations ≤ 50;breakCondition.key 须在 body 的 outputKey 中; 7. **每图恰一个 input 起点、每条链以 artifact 收尾**(官方惯例); 8. **outputKey 全图唯一**(驼峰命名:objective/plan/implementation/verification/deliverable…); 9. **review 裁决节点 prompt 必须限定输出值域**(如「严格只输出 'pass' 或 'retry'」); 10. **tool/mcp 节点**:toolSource='mcp' 或 kind='mcp' 必须有 toolName;toolArgs 字符串值用 `{{key}}` 插值引用上游 outputKey;artifact 的 exportPath 不得含 `..`/绝对路径。

节点 ID 命名:`<kind>-<n>`(如 agent-1)或语义化 kebab-case(如 artifact-deep);边 ID:`e-<from>-<to>`。

修复熔断

`workflow_validate` 连续失败达到 3 次会被**熔断**:本轮不再执行校验,工具直接返回熔断标记。 此时唯一正确的动作:**停止重试**,向用户完整报告最后一份 diagnostics(逐条:path/message),并说明你建议的修复方向,等用户反馈。

与用户协作的边界

  • 修改前先说一句你打算怎么改(增/删/改哪些节点),重大结构调整先征求确认;
  • 落库成功后简要汇报:改了什么、校验结果、工作流当前规模;
  • 绑定字段留空的节点要提醒用户在节点检查器补齐绑定;
  • 用户消息与你的记忆冲突时,以 `workflow_get_graph` 的结果为准。
Read more
@alexanderizh
Ships withspark-agent

面向专业开发与复杂工作的本地优先桌面 Agent 工作台:编排工作流、协作多个 Agent 会话、智能路由模型,并用自定义工具和应用扩展执行能力;每次运行可审查、可接管、可回退。 A free, local-first desktop agent workbench for professional software development and complex work.

Stars on GitHub

Momentum

stars in total
121
Star history of alexanderizh/spark-agent on GitHub, a chart by star-history.com

Other skills on spark-agent.

gitnexus-cli

gitnexus-cli

Use when the user needs to run GitNexus CLI commands like analyze/index a repo, check status, clean the index, generate a wiki,…

gitnexus-guide

gitnexus-guide

Use when the user asks about GitNexus itself — available tools, how to query the knowledge graph, MCP resources, graph schema, or…

More skills from other plugins.

hud

hud

Set up, check, change, preview, or report a problem with the claude-hud status line. Use when the user mentions the HUD or status…

@jarrodwatts@jarrodwattsInstall Skill
paseo

paseo

Paseo reference for managing hosts, projects, workspaces, workspace scripts, agents, schedules, and heartbeats.

paseo6d24k
@getpaseo@getpaseoInstall Skill
10x
Auto-invoked

10x

Personalized audit that teaches the advanced Paradev (formerly Superset) features the user isn't using yet (automations, parallel…

paradev4d16k
@superset-sh@superset-shInstall Skill

Questions about workflow-architect.

Which coding agents can use workflow-architect?
workflow-architect installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.