SuperAPI AI 工具集

create-harness-spec

编程与开发

查看项目

更新于 10-15 22:12

技能介绍

用途:把 Hedera 功能想法逐步追问、澄清为 hedera-harness 可运行的完整 recipe,包含 PRD、recipe 文件、validators 与可选阶段。目标为 hedera-harness schemaVersion 3。

主要能力:先加载共享词汇(读取 ../harness-spec-anatomy/SKILL.md 与其 GLOSSARY.md,并严格使用其中术语);定位 recipe 所在 .harness/ 目录;通过追问协议(优先 /grilling,否则用内联协议)确认共识后再写文件;生成 .harness/prd.md(或 .harness/prds/ 下按增量分文件)、.harness/spec.yaml、.harness/validators/static.json 与 yarn.json;按需加入 SMOKE / EVALUATE / CHAIN 阶段。

使用方式:recipe 位于已脚手架化应用的 .harness/ 内。无 .harness/ 时用 hedera-harness init 就地接管;无应用时用 hedera-harness init <dir>(可选 --template <name>)。已有 spec.yaml 需检查 schemaVersion,缺失、1 或 2 时改写为 v3(hedera-harness migrate 已移除)。优先复制随附骨架:cp -r "$(npm root -g)/hedera-harness/skeletons/project-harness/." .harness/。spec.yaml 必填 schemaVersion: 3、name、description 及含名为 install 命令的 baseline,其余默认项保持注释;除非用户要 Cursor,否则省略 agent:。不要添加 skills: 列表,改为在 PRD 中提及相关 Hedera 服务。启用 SMOKE 时在项目根执行 yarn add -D playwright(或 npm/pnpm 等价命令);CHAIN 无需项目安装。

完成标准:先运行 hedera-harness doctor .harness/spec.yaml --recipe-only,再运行 bash <path-to>/harness-spec-anatomy/scripts/check-spec.sh <project-root>;check-spec.sh 退出干净即完成。随后可交接 /review-harness-spec,再运行 hedera-harness run .harness/spec.yaml --max-attempts 3 或 yarn harness:run。

限制:不要在用户确认共识前写文件;不要对 template.json 做断言;不要断言 skills;v1/v2 recipe 不可视为可加载;安装、智能体鉴权与阶段宿主前置条件参见 harness README,由 hedera-harness doctor(不带 --recipe-only)检查。