feat: add uwf skill bootstrap subcommand, update BOOTSTRAP.md to use it

This commit is contained in:
2026-05-28 10:32:25 +00:00
parent 647f40bdd5
commit abe516f739
5 changed files with 54 additions and 8 deletions
+8
View File
@@ -19,6 +19,7 @@ import { cmdSetup, cmdSetupInteractive } from "./commands/setup.js";
import {
cmdSkillAdapter,
cmdSkillAuthor,
cmdSkillBootstrap,
cmdSkillDeveloper,
cmdSkillList,
cmdSkillUser,
@@ -516,6 +517,13 @@ skill
console.log(cmdSkillUser());
});
skill
.command("bootstrap")
.description("Print the bootstrap skill YAML for Hermes agents")
.action(() => {
console.log(cmdSkillBootstrap());
});
skill
.command("list")
.description("List all available skill names")
+2 -1
View File
@@ -1,11 +1,12 @@
export {
generateBootstrapReference as cmdSkillBootstrap,
generateAdapterReference as cmdSkillAdapter,
generateAuthorReference as cmdSkillAuthor,
generateDeveloperReference as cmdSkillDeveloper,
generateUserReference as cmdSkillUser,
} from "@uncaged/workflow-util";
const SKILL_NAMES = ["user", "author", "developer", "adapter"] as const;
const SKILL_NAMES = ["user", "author", "developer", "adapter", "bootstrap"] as const;
export function cmdSkillList(): ReadonlyArray<string> {
return [...SKILL_NAMES];
@@ -0,0 +1,39 @@
export function generateBootstrapReference(): string {
return `---
name: uwf
description: "Uncaged Workflow (uwf) — YAML 状态机工作流引擎。任务涉及 workflow 时加载此 skill。"
tags: [workflow, uwf, uncaged]
triggers:
- uwf
- workflow
- 工作流
---
# uwf (Uncaged Workflow)
YAML 状态机工作流引擎。当用户提到「workflow」「工作流」时,指的是 **uwf workflow**(YAML 定义的状态机),不是 Hermes skill。用 \`uwf\` CLI 操作,不要混淆。
## 首次使用
运行以下命令获取完整用法:
\`\`\`bash
uwf skill user # 用户使用手册(CLI 命令、thread 生命周期)
uwf skill author # workflow 编写指南(role 定义、graph 路由、schema)
\`\`\`
## 快速参考
\`\`\`bash
uwf workflow list # 查看已注册 workflow
uwf workflow add <file.yaml> # 注册 workflow
uwf thread start <workflow> -p "prompt" # 创建 thread
uwf thread exec <thread-id> -c 10 # 执行最多 10 步
uwf thread list # 查看所有 thread
\`\`\`
## 示例 workflow
参考项目 \`examples/\` 目录下的 YAML 文件(analyze-topic、debate、solve-issue)。
`;
}
+1
View File
@@ -1,4 +1,5 @@
export { generateActorReference } from "./actor-reference.js";
export { generateBootstrapReference } from "./bootstrap-reference.js";
export { generateAdapterReference } from "./adapter-reference.js";
export { generateArchitectureReference } from "./architecture-reference.js";
export { generateAuthorReference } from "./author-reference.js";