diff options
| author | Jesse Vincent <jesse@primeradiant.com> | 2026-05-06 12:24:53 -0700 |
|---|---|---|
| committer | Drew Ritter <drew@primeradiant.com> | 2026-06-16 10:09:43 -0700 |
| commit | 8611a4ea978f5c1971a26fe7fbff260b44a7d855 (patch) | |
| tree | f953e3db617c4d8177eb98d8f2f7c575559ae379 /tests/skill-triggering/run-test.sh | |
| parent | 09046c046b23486e707b0beebb7c6e777b3c426f (diff) | |
tests: remove skill-triggering bash prompts (covered by drill triggering-* scenarios)
Subagent verification confirmed each prompt's intent matches its
corresponding drill scenario's turns[].intent verbatim, and each
scenario has both a deterministic skill-called assertion and a
semantic LLM criterion confirming the matching skill was loaded
(actually a stronger check than the bash test, which only confirms
the skill fires anywhere in the stream).
All 6 prompts deleted. The runner had no remaining prompts to drive,
so run-test.sh and run-all.sh deleted as well.
Diffstat (limited to 'tests/skill-triggering/run-test.sh')
| -rwxr-xr-x | tests/skill-triggering/run-test.sh | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/tests/skill-triggering/run-test.sh b/tests/skill-triggering/run-test.sh deleted file mode 100755 index ba91995..0000000 --- a/tests/skill-triggering/run-test.sh +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/env bash -# Test skill triggering with naive prompts -# Usage: ./run-test.sh <skill-name> <prompt-file> -# -# Tests whether Claude triggers a skill based on a natural prompt -# (without explicitly mentioning the skill) - -set -e - -SKILL_NAME="$1" -PROMPT_FILE="$2" -MAX_TURNS="${3:-3}" - -if [ -z "$SKILL_NAME" ] || [ -z "$PROMPT_FILE" ]; then - echo "Usage: $0 <skill-name> <prompt-file> [max-turns]" - echo "Example: $0 systematic-debugging ./test-prompts/debugging.txt" - exit 1 -fi - -# Get the directory where this script lives (should be tests/skill-triggering) -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -# Get the superpowers plugin root (two levels up from tests/skill-triggering) -PLUGIN_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)" - -TIMESTAMP=$(date +%s) -OUTPUT_DIR="/tmp/superpowers-tests/${TIMESTAMP}/skill-triggering/${SKILL_NAME}" -mkdir -p "$OUTPUT_DIR" - -# Read prompt from file -PROMPT=$(cat "$PROMPT_FILE") - -echo "=== Skill Triggering Test ===" -echo "Skill: $SKILL_NAME" -echo "Prompt file: $PROMPT_FILE" -echo "Max turns: $MAX_TURNS" -echo "Output dir: $OUTPUT_DIR" -echo "" - -# Copy prompt for reference -cp "$PROMPT_FILE" "$OUTPUT_DIR/prompt.txt" - -# Run Claude -LOG_FILE="$OUTPUT_DIR/claude-output.json" -cd "$OUTPUT_DIR" - -echo "Plugin dir: $PLUGIN_DIR" -echo "Running claude -p with naive prompt..." -timeout 300 claude -p "$PROMPT" \ - --plugin-dir "$PLUGIN_DIR" \ - --dangerously-skip-permissions \ - --max-turns "$MAX_TURNS" \ - --output-format stream-json \ - > "$LOG_FILE" 2>&1 || true - -echo "" -echo "=== Results ===" - -# Check if skill was triggered (look for Skill tool invocation) -# In stream-json, tool invocations have "name":"Skill" (not "tool":"Skill") -# Match either "skill":"skillname" or "skill":"namespace:skillname" -SKILL_PATTERN='"skill":"([^"]*:)?'"${SKILL_NAME}"'"' -if grep -q '"name":"Skill"' "$LOG_FILE" && grep -qE "$SKILL_PATTERN" "$LOG_FILE"; then - echo "✅ PASS: Skill '$SKILL_NAME' was triggered" - TRIGGERED=true -else - echo "❌ FAIL: Skill '$SKILL_NAME' was NOT triggered" - TRIGGERED=false -fi - -# Show what skills WERE triggered -echo "" -echo "Skills triggered in this run:" -grep -o '"skill":"[^"]*"' "$LOG_FILE" 2>/dev/null | sort -u || echo " (none)" - -# Show first assistant message -echo "" -echo "First assistant response (truncated):" -grep '"type":"assistant"' "$LOG_FILE" | head -1 | jq -r '.message.content[0].text // .message.content' 2>/dev/null | head -c 500 || echo " (could not extract)" - -echo "" -echo "Full log: $LOG_FILE" -echo "Timestamp: $TIMESTAMP" - -if [ "$TRIGGERED" = "true" ]; then - exit 0 -else - exit 1 -fi |
