verify
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseVerify
Verify
.skilly/verify.json.skilly/verify.jsonUsage
用法
sh
node .agents/skills/verify/scripts/verify.mjs <stage> # run the stage
node .agents/skills/verify/scripts/verify.mjs <stage> --steps # resolved steps as JSON, runs nothingWorks from anywhere in the Consumer. Exit 0 passed, 2 config or usage error, anything else is the failing step's code.
sh
node .agents/skills/verify/scripts/verify.mjs <stage> # 运行该阶段
node .agents/skills/verify/scripts/verify.mjs <stage> --steps # 输出解析后的步骤为 JSON,不运行任何内容从 Consumer 中的任何位置均可运行。退出码 0 表示通过,2 表示配置或用法错误,其他值为失败步骤的退出码。
Config
配置
json
{
"budgetTicket": "https://github.com/owner/repo/issues/1",
"stages": {
"commit": { "budgetSeconds": 10, "steps": [{ "name": "lint-staged", "run": "npx lint-staged", "why": "the reason this step exists" }] },
"push": { "extends": "commit", "budgetSeconds": 120, "steps": [] },
"ci": { "extends": "push", "budgetSeconds": 600, "steps": [] },
"nightly": { "tier": "product", "budgetSeconds": 1800, "steps": [{ "name": "e2e", "run": "npm run e2e", "target": "e2e" }] }
}
}extendspushcommitA budget warns and never fails. A gate that fails on slowness teaches you to bypass the gate, and the bypass outlives the slowness. says where a stage that outgrew its budget gets split.
budgetTicketjson
{
"budgetTicket": "https://github.com/owner/repo/issues/1",
"stages": {
"commit": { "budgetSeconds": 10, "steps": [{ "name": "lint-staged", "run": "npx lint-staged", "why": "the reason this step exists" }] },
"push": { "extends": "commit", "budgetSeconds": 120, "steps": [] },
"ci": { "extends": "push", "budgetSeconds": 600, "steps": [] },
"nightly": { "tier": "product", "budgetSeconds": 1800, "steps": [{ "name": "e2e", "run": "npm run e2e", "target": "e2e" }] }
}
}extendspushcommitbudget(预算)只发出警告,不会导致失败。如果 gate 因为运行缓慢而失败,会教会你绕过 gate,而这种绕过会比缓慢本身更持久。 指明了超出预算的阶段将如何拆分。
budgetTicketTier
Tier(层级)
tier.skilly/config.jsonsandboxsandboxtoolproducttiertiertier.skilly/config.jsonsandboxsandboxtoolproducttiertierTarget
Target(目标)
A step's is a path relative to the repo root; missing, the step is skipped. That is how one stage list fits repos that do not all have an or a Dockerfile.
targete2e/步骤的 是相对于仓库根目录的路径;如果缺失,则跳过该步骤。这样,同一份阶段列表就能适配那些并非都有 目录或 Dockerfile 的仓库。
targete2e/Adding a check
添加检查
One step in , never a line in a hook or a workflow. Give it a : it prints the moment the step goes red, when the reader is least likely to go looking for it.
.skilly/verify.jsonwhy在 中添加一个步骤,绝不要写成 hook 或 workflow 中的一行。给它一个 :当步骤变红时,阅读者最不可能主动去找原因,而这一说明会在那一刻打印出来。
.skilly/verify.jsonwhy