dynamic-workflow-mode
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDynamic Workflow Mode
动态工作流模式
Use this skill when a coding agent can generate or adapt a task-local harness instead of only following a static command flow. The goal is to turn dynamic workflow mode into a disciplined system: temporary harnesses for one-off work, shared skill extraction for repeated work, and observable control pane checkpoints for teams.
当编码Agent可以生成或适配任务专属工具包,而非仅遵循静态命令流程时,可使用此技能。目标是将动态工作流模式转化为一套规范化系统:用于一次性工作的临时工具包、用于重复工作的共享技能提取,以及面向团队的可观测控制面板检查点。
When To Activate
激活场景
- The user mentions dynamic workflows, custom harnesses, harness-per-task, adaptive workflows, or Claude Code dynamic workflow mode.
- A task needs a custom loop, evaluator, crawler, fixture generator, watcher, or local dashboard.
- Multiple agents need the same repeatable process but the process is not yet captured as a shared skill.
- A workflow needs durable handoff artifacts, eval evidence, or operator approval before merge.
- 用户提及动态工作流、自定义工具包、单任务专属工具包、自适应工作流或Claude Code动态工作流模式。
- 任务需要自定义循环、评估器、爬虫、测试数据生成器、监控器或本地仪表盘。
- 多个Agent需要执行相同的可重复流程,但该流程尚未被提炼为共享技能。
- 工作流在合并前需要持久化的交接工件、评估证据或操作员审批。
Core Contract
核心约定
Dynamic workflow mode should produce a task-local harness only when the harness is cheaper and safer than manually driving the same steps. The harness must have:
- Objective: the outcome it owns and the outcome it explicitly does not own.
- Inputs: files, URLs, prompts, data sources, credentials policy, and user-provided constraints.
- Outputs: commits, reports, screenshots, status files, or control pane snapshots.
- Eval: at least one pass/fail check tied to the task, not only "it ran".
- Handoff: a short artifact that tells the next operator what happened, what is blocked, and how to resume.
只有当任务专属工具包比手动执行相同步骤更经济、更安全时,动态工作流模式才应生成该工具包。工具包必须包含:
- 目标:它负责达成的结果,以及明确不负责的结果。
- 输入:文件、URL、提示词、数据源、凭证策略和用户提供的约束条件。
- 输出:提交记录、报告、截图、状态文件或控制面板快照。
- 评估:至少一个与任务绑定的通过/失败检查,而非仅检查“是否运行”。
- 交接:一份简短的工件,告知下一位操作员已完成的工作、阻塞点以及恢复方式。
Dynamic Harness Decision Tree
动态工具包决策树
- One-shot task: keep it inline. Do not invent a harness.
- Repeated task with changing inputs: create a task-local harness and keep it under a temp or project-local working area.
- Repeated task across teammates or repos: extract the pattern into a shared skill.
- Task with external state, queueing, or approvals: add control pane visibility before adding more automation.
- Task with safety risk: add an eval gate and a human merge gate before autonomous execution.
- 一次性任务:直接内联处理,无需创建工具包。
- 输入可变的重复任务:创建任务专属工具包,并将其保存在临时或项目本地工作区下。
- 跨团队成员或仓库的重复任务:将该模式提炼为共享技能。
- 涉及外部状态、队列或审批的任务:在添加更多自动化前,先增加控制面板可见性。
- 存在安全风险的任务:在自动执行前添加评估关卡和人工合并关卡。
Task-Local Harness Template
任务专属工具包模板
Use this structure before writing code:
markdown
undefined编写代码前请使用以下结构:
markdown
undefinedDynamic Workflow Harness
动态工作流工具包
Objective:
- Ship:
- Do not ship:
Inputs:
- Repo or workspace:
- External systems:
- Credentials policy:
Loop:
- Discover current state.
- Generate or update the smallest useful artifact.
- Run eval checks.
- Record status and handoff.
- Stop on failed gate, unclear ownership, or unsafe external action.
Eval:
- Command:
- Expected pass signal:
- Failure owner:
Handoff:
- Status:
- Evidence:
- Next action:
undefined目标:
- 交付:
- 不交付:
输入:
- 仓库或工作区:
- 外部系统:
- 凭证策略:
循环:
- 发现当前状态。
- 生成或更新最小可用工件。
- 运行评估检查。
- 记录状态和交接信息。
- 遇到失败关卡、所有权不明确或不安全的外部操作时停止。
评估:
- 命令:
- 预期通过信号:
- 失败负责人:
交接:
- 状态:
- 证据:
- 下一步操作:
undefinedShared Skill Extraction
共享技能提取
Promote a task-local harness into a shared skill only when at least two of these are true:
- The same workflow appears in multiple sessions, repos, teams, or launches.
- The workflow needs specific language, tool, or safety sequencing.
- Failures repeat because operators skip a gate or lose context.
- The workflow has a stable input/output contract.
- The workflow benefits from a control pane, status board, or team handoff.
When extracting, write the skill first in . Add command shims only if a legacy slash-entry surface is still required.
skills/<name>/SKILL.md仅当满足以下至少两个条件时,才可将任务专属工具包升级为共享技能:
- 同一工作流出现在多个会话、仓库、团队或发布流程中。
- 工作流需要特定的语言、工具或安全序列。
- 由于操作员跳过关卡或丢失上下文导致失败重复发生。
- 工作流具有稳定的输入/输出约定。
- 工作流可从控制面板、状态看板或团队交接中获益。
提取技能时,请先在中编写技能内容。仅当仍需要兼容旧版斜杠入口时,才添加命令垫片。
skills/<name>/SKILL.mdControl Pane Checkpoints
控制面板检查点
Dynamic workflow mode becomes team-usable when it exposes state. Record these checkpoints whenever the task spans more than one session:
- Plan: objective, owner, acceptance criteria, and risky external systems.
- Queue: work items, assigned agent role, branch/worktree, and dependency edges.
- Run: active harness, current loop step, recent eval result, and token/cost signal if available.
- Gate: test results, browser screenshots, security review, and merge readiness.
- Handoff: what is done, what failed, what needs a human decision.
If the repo has ECC2 state enabled, prefer adding or reading checkpoints through the ECC control pane or state-store-backed scripts instead of scattering untracked notes.
当任务跨多个会话时,动态工作流模式需暴露状态才能供团队使用。请记录以下检查点:
- 计划:目标、负责人、验收标准和存在风险的外部系统。
- 队列:工作项、分配的Agent角色、分支/工作树以及依赖关系。
- 运行:当前激活的工具包、当前循环步骤、最近的评估结果,以及可用的令牌/成本信号。
- 关卡:测试结果、浏览器截图、安全评审和合并就绪状态。
- 交接:已完成的工作、失败的内容、需要人工决策的事项。
如果仓库已启用ECC2状态,请优先通过ECC控制面板或基于状态存储的脚本添加或读取检查点,而非分散记录未追踪的笔记。
Eval Gates
评估关卡
Every dynamic harness needs a task-specific eval. Pick the cheapest reliable gate:
| Work Type | Eval Gate |
|---|---|
| Code feature | Focused test, lint, coverage, and one integration path |
| UI/control pane | Browser smoke with screenshot and overflow/error checks |
| Agent workflow | Fixture transcript or seeded work item with expected routing |
| Research/content | Source-neutral brief, claim checklist, and publish-ready outline |
| Integration | Dry-run command, config validation, and no-secret scan |
Do not claim a dynamic workflow is reusable until the eval can be rerun by another teammate.
每个动态工具包都需要针对任务的专属评估。选择成本最低且可靠的关卡:
| 工作类型 | 评估关卡 |
|---|---|
| 代码功能 | 聚焦测试、代码检查、覆盖率检查以及一条集成路径验证 |
| UI/控制面板 | 浏览器冒烟测试,附带截图及溢出/错误检查 |
| Agent工作流 | 测试用例记录或带有预期路由的种子工作项 |
| 研究/内容 | 来源中立的摘要、主张核对清单及可发布的大纲 |
| 集成 | 空运行命令、配置验证及无敏感信息扫描 |
只有当其他团队成员可重新运行评估时,才可声称该动态工作流具备可复用性。
Anti-Patterns
反模式
- Generating scripts that hide the real decision logic from the operator.
- Treating dynamic workflow mode as permission to skip tests.
- Creating one-off docs when a shared skill or status artifact is the real product.
- Running multiple agents without ownership, merge gate, or conflict policy.
- Letting raw private research data leak into public docs.
- 生成对操作员隐藏真实决策逻辑的脚本。
- 将动态工作流模式视为跳过测试的许可。
- 当实际需要的是共享技能或状态工件时,却创建一次性文档。
- 在没有明确所有权、合并关卡或冲突策略的情况下运行多个Agent。
- 让原始私有研究数据泄露到公开文档中。
Output Standard
输出标准
Finish with:
- The harness or skill path.
- The eval commands and results.
- The control pane or handoff artifact path.
- The next reusable extraction candidate.
完成工作后需提供:
- 工具包或技能路径。
- 评估命令及结果。
- 控制面板或交接工件路径。
- 下一个可复用提取候选对象。