一键导入
verify-build
Build a verification script that defines "done" for a parent task or project phase. Creates a .sh script and attaches it via tx auto verify set.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Build a verification script that defines "done" for a parent task or project phase. Creates a .sh script and attaches it via tx auto verify set.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Turn a design spec into an explicit tx task graph with `tx decompose`, then refine the graph using normal tx task and dependency primitives.
Generate a detailed design document via `tx doc add design`. Covers architecture, interfaces, data model, invariants, failure modes, verification, and testing strategy. References plan via file path instead of embedding. Plan lives in ~/.claude/plans/<name>.md. Reads companion PRD automatically to map EARS requirements to invariants. Output lands in specs/design/<name>.md.
Generate a system overview spec via `tx doc add overview`. Produces an architectural overview covering problem, scope, components, data flows, and non-goals. References plan via file path instead of embedding. Plan lives in ~/.claude/plans/<name>.md. Output lands in specs/<name>.md with tx-managed frontmatter.
Generate a detailed Product Requirements Document via `tx doc add prd`. Uses EARS requirement syntax with traceable IDs, acceptance criteria, and non-functional requirements. References plan via file path instead of embedding. Plan lives in ~/.claude/plans/<name>.md. Designed to be created alongside a companion `/design-doc`. Output lands in specs/prd/<name>.md.
Internal closed-loop skill: drive CLI/API/MCP to 100% shape parity (same service methods) AND behaviour parity (same response shapes). Uses ESLint rules tx/require-surface-parity + tx/interface-parity. NOT shipped to tx users.
Generate a system-level design document via `tx doc add design`. Covers cross-cutting architecture, service boundaries, data flows, scalability, and deployment topology. References plan via file path instead of embedding. Plan lives in ~/.claude/plans/<name>.md. Use for system-wide or multi-domain designs rather than feature-scoped subsystem docs.
| name | verify-build |
| description | Build a verification script that defines "done" for a parent task or project phase. Creates a .sh script and attaches it via tx auto verify set. |
| disable-model-invocation | true |
| argument-hint | ["task-id"] |
Creates a .sh script that defines machine-checkable "done" criteria for a parent task or project phase. The primary use case: attach a verification gate to a parent task so agents (and humans) can machine-check whether a phase is complete before moving on.
Ask the user:
Based on the user's definition of done, create a .sh script at .tx/verify/<name>.sh.
The most common parent task check — verify all subtasks have been completed:
#!/usr/bin/env bash
set -euo pipefail
PARENT_ID="${1:-tx-xxxxxx}" # pass as arg or hard-code
CHILDREN=$(tx dep children "$PARENT_ID" --json 2>/dev/null)
TOTAL=$(echo "$CHILDREN" | jq 'length')
INCOMPLETE=$(echo "$CHILDREN" | jq '[.[] | select(.status != "done")] | length')
if [ "$INCOMPLETE" -gt 0 ]; then
echo "FAIL: $INCOMPLETE of $TOTAL child tasks not done" >&2
echo "$CHILDREN" | jq -r '.[] | select(.status != "done") | " - \(.id): \(.title) [\(.status)]"' >&2
exit 1
fi
echo "PASS: All $TOTAL children of $PARENT_ID are done"
#!/usr/bin/env bash
set -euo pipefail
PARENT_ID="${1:-tx-xxxxxx}"
PASS=0; FAIL=0
check() {
local desc="$1"; shift
if "$@" >/dev/null 2>&1; then
PASS=$((PASS+1))
echo " PASS: $desc"
else
FAIL=$((FAIL+1))
echo " FAIL: $desc" >&2
fi
}
# Check all children done
INCOMPLETE=$(tx dep children "$PARENT_ID" --json 2>/dev/null | jq '[.[] | select(.status != "done")] | length')
if [ "$INCOMPLETE" -eq 0 ]; then
PASS=$((PASS+1)); echo " PASS: All children done"
else
FAIL=$((FAIL+1)); echo " FAIL: $INCOMPLETE children not done" >&2
fi
# Check tests pass
check "Tests pass" bun run test:unit
# Check typecheck
check "Typecheck clean" bun run typecheck
echo "$PASS passed, $FAIL failed"
[ "$FAIL" -eq 0 ]
For richer verification data (use with --schema for machine validation):
#!/usr/bin/env bash
set -euo pipefail
PARENT_ID="${1:-tx-xxxxxx}"
CHILDREN=$(tx dep children "$PARENT_ID" --json 2>/dev/null)
TOTAL=$(echo "$CHILDREN" | jq 'length')
DONE=$(echo "$CHILDREN" | jq '[.[] | select(.status == "done")] | length')
INCOMPLETE=$((TOTAL - DONE))
# Output structured JSON for schema validation
cat <<ENDJSON
{
"total": $TOTAL,
"done": $DONE,
"incomplete": $INCOMPLETE,
"passed": $([ "$INCOMPLETE" -eq 0 ] && echo "true" || echo "false")
}
ENDJSON
[ "$INCOMPLETE" -eq 0 ]
#!/usr/bin/env bash
set -euo pipefail
DOC_COUNT=$(find specs -name "*.yaml" -type f | wc -l | tr -d ' ')
echo "Found $DOC_COUNT docs"
if [ "$DOC_COUNT" -lt 10 ]; then
echo "FAIL: Need at least 10 docs, found $DOC_COUNT" >&2
exit 1
fi
echo "PASS: Docs phase complete ($DOC_COUNT docs)"
#!/usr/bin/env bash
set -euo pipefail
bunx --bun vitest run test/integration/ --reporter=json 2>/dev/null | jq -e '.numFailedTests == 0'
#!/usr/bin/env bash
set -euo pipefail
bun run typecheck && bun run build && echo "PASS: Build clean"
#!/usr/bin/env bash
set -euo pipefail
curl -sf http://localhost:3456/health | jq -e '.status == "ok"'
After creating the script, make it executable and attach it to the parent task:
chmod +x .tx/verify/<name>.sh
tx auto verify set <parent-task-id> ".tx/verify/<name>.sh"
Optional: attach a JSON schema to validate structured output from the script:
tx auto verify set <parent-task-id> ".tx/verify/<name>.sh" --schema ".tx/verify/<name>.schema.json"
Example schema (.tx/verify/<name>.schema.json):
{
"required": ["total", "done", "incomplete", "passed"],
"properties": {
"total": { "type": "number" },
"done": { "type": "number" },
"incomplete": { "type": "number" },
"passed": { "type": "boolean" }
}
}
If no task ID was provided, ask which parent task to attach it to.
Run the verification to confirm it works:
tx auto verify run <parent-task-id>
tx auto verify run <parent-task-id> --json # machine-readable output
tx auto verify run <parent-task-id> --timeout 600 # longer timeout for heavy checks
Show the user the output and ask if adjustments are needed.
tx auto verify set <id> <command> [--schema <path>] # Attach verify script
tx auto verify show <id> # Inspect what's attached
tx auto verify run <id> [--timeout <seconds>] [--json] # Execute and check
tx auto verify clear <id> # Remove verify script
The parent task verification pattern fits into the agent loop like this:
# Agent completes all subtasks, then verifies the parent
PARENT_ID="tx-abc123"
# Work on children...
for child in $(tx dep children "$PARENT_ID" --json | jq -r '.[].id'); do
# ... agent works on each child, calls tx done $child
done
# Gate: only mark parent done if verification passes
if tx auto verify run "$PARENT_ID"; then
tx done "$PARENT_ID"
else
echo "Parent verification failed — check remaining work"
fi
set -euo pipefail at the top.tx/verify/ directory (create if needed).tx/config.toml or via --timeout)${var:1:-1}, &>>, associative arrays (declare -A), |&, coproc, mapfile, declare -n