mirror of
https://github.com/obra/superpowers.git
synced 2026-05-11 19:49:05 +08:00
Lift drill into evals/ at 013fcb8b7dbefd6d3fa4653493e5d2ec8e7f985b
rsync of obra/drill@013fcb8b7d into superpowers/evals/, excluding .git/, .venv/, results/, .env/, __pycache__/, *.egg-info/, .private-journal/. The drill repo is unaffected by this commit; archival is a separate manual step after this PR merges. Source SHA recorded at evals/.drill-source-sha for divergence detection.
This commit is contained in:
32
evals/bin/skill-called
Executable file
32
evals/bin/skill-called
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env bash
|
||||
# Verify a specific superpowers Skill was invoked at least once.
|
||||
#
|
||||
# Usage: skill-called <skill-name>
|
||||
# Example: skill-called superpowers:systematic-debugging
|
||||
#
|
||||
# Wraps the common case of `tool-arg-match Skill '.skill == "<name>"'` so
|
||||
# scenario YAML doesn't have to embed jq quoting.
|
||||
set -euo pipefail
|
||||
command -v jq >/dev/null || { echo "jq required"; exit 127; }
|
||||
|
||||
SKILL_NAME="$1"
|
||||
FILE="tool_calls.jsonl"
|
||||
|
||||
if [ ! -s "$FILE" ]; then
|
||||
echo "FAIL: tool_calls.jsonl missing or empty"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
COUNT=$(
|
||||
jq -s --arg name "$SKILL_NAME" \
|
||||
'[.[] | select(.tool == "Skill" and (.args.skill // "") == $name)] | length' \
|
||||
"$FILE"
|
||||
)
|
||||
|
||||
if [ "$COUNT" -gt 0 ]; then
|
||||
echo "PASS: Skill($SKILL_NAME) called $COUNT time(s)"
|
||||
exit 0
|
||||
else
|
||||
echo "FAIL: Skill($SKILL_NAME) never called"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user