From harness-flow
Entry point for HF workflow family: determines whether to direct-invoke a leaf skill or route-first via hf-workflow-router based on user intent, evidence state, and execution mode.
How this skill is triggered — by the user, by Claude, or both
Slash command
/harness-flow:using-hf-workflowThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
HF workflow family 的 **public shell**。帮助你决定:
HF workflow family 的 public shell。帮助你决定:
direct invoke:当前节点已明确,直接进入 leaf skillroute-first:阶段/profile/证据不稳定,交给 hf-workflow-router本 skill 是 public entry,不是 runtime handoff。不替代 router 的 authoritative routing。
本 skill 融合以下已验证方法。每个方法在 Workflow 中有对应的落地步骤。
| 方法 | 核心原则 | 来源 | 落地步骤 |
|---|---|---|---|
| Front Controller Pattern | 作为统一入口点,解析用户意图后分发到对应处理节点 | GoF 设计模式 / Martin Fowler, "Patterns of Enterprise Application Architecture" | 步骤 1 — 判断 entry vs recovery;步骤 7 — 正确结束 |
| Evidence-Based Dispatch | 通过读取 feature progress.md 与工件状态判断 entry vs recovery | 项目化实践(HF 核心约定) | 步骤 1 — entry vs runtime recovery;步骤 4 — direct invoke 判断 |
| Separation of Concerns | 入口层只负责意图识别和分发,不做 authoritative routing 或状态修改 | 项目化实践(分层架构原则) | 步骤 7 — 只输出两类结果 |
适用:
/hf-spec、/hf-build、/hf-review 等命令意图auto mode 但还没确定交给哪个节点不适用:已在 leaf skill 内部 → 继续当前 skill;需要 authoritative routing → 直接交给 hf-workflow-router。
若问题仍在产品 thesis/wedge/probe 层面 → 仍由当前 public entry 统一分流,但目标 leaf 应是 hf-product-discovery,而不是再引入第二个 public shell。
若已产出 docs/insights/*-spec-bridge.md 且目标是 formal spec/design/tasks → 可进入 coding family。
hf-release 是 release-tier 独立 skill(v0.4.0 引入,ADR-004),不进 coding family / discovery family 主链,不进 hf-workflow-router 的 transition map。本 entry shell 在 entry bias 表加它一行只用于"用户表达切版本意图时直接 direct invoke",不是把它纳入 runtime FSM。
entry(用本 skill):新会话、高层意图、命令 bias、direct vs route 选择。
runtime recovery(交给 router):review/gate 刚完成、evidence 冲突、需切支线、需消费 gate 结论 → hf-workflow-router。
归到以下之一:新需求、product discovery、继续推进、review-only、gate-only、当前任务实现、规格相关、hotfix、increment、closeout、Execution Mode 偏好。
用户说 auto mode/自动执行/不用等我确认 → 视为 Execution Mode 偏好,不是新 Profile,不是跳过 approval 的理由,不是 direct invoke 的充分条件。随 handoff 带给下游。
同时满足才可:节点已明确、请求属于该 skill 职责、工件存在可读、无 route/stage/profile 冲突、Execution Mode 偏好已传递。任一不满足 → route-first 交给 router。
如果当前只差 1 个关键事实就能稳定判断 direct invoke vs route-first,先问 1 个最小判别问题,再继续;不要为了这 1 个缺口展开整套 intake,也不要过早假设答案。
适用信号:
不适用:
以上任一命中时,不做入口层小问答,直接 route-first 交给 hf-workflow-router。
| 用户意图 | 可优先尝试 | 不明确时回退 |
|---|---|---|
| 产品发现 / thesis / wedge / probe | hf-product-discovery | hf-workflow-router |
| 规格澄清/修订 | hf-specify | hf-workflow-router |
| UI / 前端 / 页面 / 交互 / 视觉 设计(规格已批准含 UI surface) | hf-ui-design | hf-workflow-router |
| 当前活跃任务实现 | hf-test-driven-dev;若明确要求 fresh implementer subagent 且 task eligibility 已由工件证明,可 direct invoke hf-subagent-driven-dev;若请求含 auto / 自动执行 / 不用确认,优先 hf-ultrawork 承接 build session loop | hf-workflow-router |
| review/gate 请求 | 具体 review/gate skill(含 hf-ui-review) | hf-workflow-router |
| closeout/finalize | hf-completion-gate / hf-finalize | hf-workflow-router |
| 线上问题修复 | hf-hotfix | hf-workflow-router |
| 范围/验收/约束变化 | hf-increment | hf-workflow-router |
| 切版本 / 出 release / 打 tag / 发版本号 | hf-release(direct invoke,不 route-first;本 skill 与 router 解耦,ADR-004 D3) | 候选 feature 还没 workflow-closeout → hf-finalize |
| Execution Mode = auto 且当前不在 review/gate 节点 + 满足 fast lane direct invoke 条件 | hf-ultrawork(v0.6 起;direct invoke fast lane skill,不绕过 review / gate / approval 工件落盘 / Hard Gates;按 ADR-009 D2) | route/stage/profile 不清 → hf-workflow-router |
/hf-* 命令是高频意图的薄包装,不拥有独立路由权——一律先经过本 skill 解析,再决定 direct invoke 还是交给 router:
| 命令 | 主意图 | 偏向 direct invoke 的节点 | 不确定时回退 |
|---|---|---|---|
/hf-spec [topic] | 规格澄清 / 修订 / 入口 | hf-specify | hf-workflow-router |
/hf-build [task-id] | 当前活跃任务实现;带 auto / 自动执行 时表示连续 build session | hf-test-driven-dev;subagent eligibility 已证明时可为 hf-subagent-driven-dev;auto 时 hf-ultrawork | hf-workflow-router |
/hf-review [spec|design|tasks|test|code|trace|regression|completion] | review / gate 请求 | 具体 review / gate 节点 | hf-workflow-router |
/hf-closeout [task-id] | 完成判断 + 收尾 | hf-completion-gate(gate 未跑)/ hf-finalize(gate 已通过) | hf-workflow-router |
命令规则:
输出只有两类:1) 明确进入合法 leaf skill;2) 明确交给 hf-workflow-router。不在这里展开 transition map、做 review recovery、或把 using-hf-workflow 写进 handoff。
如果结论是 direct invoke,不要只报出目标 skill 名就停下。要在同一回复里进入该 leaf skill 的最小 kickoff:继续执行它的第一步,补最少必要 intake / scope check / preflight,而不是再多等一轮"要不要继续"。
如果结论是 route-first,只说明为什么不能 direct invoke,然后立即转交 hf-workflow-router。不要提前替 router 做业务分析,也不要混入 leaf skill 的启动内容。
唯一确定下一步时用 3 行编号格式:
Entry Classification:direct invoke 或 route-firstTarget Skill:canonical skill 名Why:1-2 条最关键证据3 行快路径用于先给路由结论,不是整轮响应的全部内容。
direct invoke 时,3 行之后继续追加目标 leaf skill 的最小 kickoff,规则如下:
hf-product-discovery、hf-specify、hf-hotfix、hf-increment 这类本来就以 intake 开场的 skill,紧接着给出最小问题集或默认假设route-first 时,不回放 entry matrix、不重讲分层历史、不展开不相关的备选;只说明"为什么不能 direct invoke"然后立即转交。
using-hf-workflow 写成完整状态机Next Action Or Recommended Skillhf-product-discovery 的前提下仍发明第二个 product public shell| 文件 | 用途 |
|---|---|
hf-workflow-router/SKILL.md | authoritative runtime routing |
hf-workflow-router/references/workflow-shared-conventions.md | progress schema / verdict 词表 / record_path 语义 / <kind> allowlist 等运行时约定 |
横切行为基线(所有 HF 节点共同遵守,无需外部引用):
当前 pack 已提供 hf-product-discovery 作为 discovery leaf;本 skill 继续作为唯一 public entry,不再引入第二个 product public shell。
| 借口 | 反驳 / Hard rule |
|---|---|
| "我知道下一步是哪个 leaf skill,直接 invoke。" | Workflow stop rule: 路径不确定 / 证据冲突时必须经 hf-workflow-router;越过 router 会绕开 evidence-based recovery。 |
| "聊天上下文里我已经记得状态了。" | Hard Gates: 状态从 on-disk artifacts 恢复,不依赖 chat memory;记忆 ≠ evidence。 |
| "新会话直接 /build。" | Workflow stop rule: 新会话 family discovery 必须从 using-hf-workflow 开始,再决定 bias。 |
direct invoke 时已在同一轮进入 target leaf skill 的最小 kickoffhf-workflow-routernpx claudepluginhub hujianbest/harness-flow --plugin harness-flowRuntime authority for HF workflow routing: decides profile, execution mode, workspace isolation, canonical node, branch cuts (hotfix/increment), and review dispatch based on disk artifact evidence.
Classifies user requests and routes them to the correct handler based on status gate, workflow mode, and intent analysis. Used as the main entry point before dispatching orchestratorX.
Routes feature requests to the appropriate workflow agent (express/standard/deep) based on complexity analysis, supports recovery from interrupted workflows, and initializes environment paths.