Dynamic workflow mode

From aaione/everything-claude-code-zh · View interactive version

Dynamic workflow mode is an AI agent skill from the GitHub repository aaione/everything-claude-code-zh. 为 Claude dynamic workflow mode 和其他自适应智能体 harness 设计 task-local harnesses、eval gates 和 reusable skill extraction。

How to use this skill

Skill file

Dynamic Workflow Mode

当 coding agent 可以生成或调整任务本地 harness,而不是只跟随静态命令流时,使用此技能。目标是把 dynamic workflow mode 变成有纪律的系统:一次性工作的临时 harness、重复工作的 shared skill extraction,以及团队可观察的 control pane checkpoints。

何时激活

核心合同

只有当 task-local harness 比手动驱动同样步骤更便宜、更安全时,dynamic workflow mode 才应生成它。harness 必须包含:

Dynamic Harness 决策树

  1. One-shot task:保持 inline。不要发明 harness。
  2. Repeated task with changing inputs:创建 task-local harness,并放在临时或项目本地工作区。
  3. Repeated task across teammates or repos:把模式提取成 shared skill。
  4. Task with external state, queueing, or approvals:先添加 control pane 可见性,再添加更多自动化。
  5. Task with safety risk:在 autonomous execution 前添加 eval gate 和 human merge gate。

Task-Local Harness 模板

写代码前使用此结构:

# Dynamic Workflow Harness

Objective:
- Ship:
- Do not ship:

Inputs:
- Repo or workspace:
- External systems:
- Credentials policy:

Loop:
1. Discover current state.
2. Generate or update the smallest useful artifact.
3. Run eval checks.
4. Record status and handoff.
5. Stop on failed gate, unclear ownership, or unsafe external action.

Eval:
- Command:
- Expected pass signal:
- Failure owner:

Handoff:
- Status:
- Evidence:
- Next action:

Shared Skill Extraction

只有至少满足以下两项,才把 task-local harness 提升为 shared skill:

提取时,先在 skills/<name>/SKILL.md 中写 skill。只有仍需要 legacy slash-entry surface 时才添加 command shims。

Control Pane Checkpoints

当 dynamic workflow mode 暴露状态时,团队才可用。任务跨越一个以上 session 时记录这些 checkpoints:

如果 repo 已启用 ECC2 state,优先通过 ECC control pane 或 state-store-backed scripts 添加或读取 checkpoints,不要散落未追踪 notes。

Eval Gates

每个 dynamic harness 都需要 task-specific eval。选择最便宜可靠的 gate:

| 工作类型 | Eval Gate |

| --- | --- |

| Code feature | Focused test、lint、coverage 和一个 integration path |

| UI/control pane | Browser smoke,带 screenshot 和 overflow/error checks |

| Agent workflow | Fixture transcript 或 seeded work item,带 expected routing |

| Research/content | Source-neutral brief、claim checklist 和 publish-ready outline |

| Integration | Dry-run command、config validation 和 no-secret scan |

在 eval 可被另一个队友重跑之前,不要声称 dynamic workflow 可复用。

反模式

输出标准

结束时包含:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.