pi-allium-port/smoke/test-elicit.sh

40 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
set -uo pipefail
# Smoke test: /skill:elicit loads and the model responds with elicitation methodology
# Expects: the response references scoping, entities, or asks discovery questions
cd "$(dirname "$0")/.."
MODEL="Qwen3.6-35B-A3B-MXFP4_MOE.gguf"
TIMEOUT=180
echo "=== elicit: invoking pi ==="
output=$(timeout "$TIMEOUT" pi -p --no-session --model "$MODEL" \
"/skill:elicit I want to specify a simple counter that increments and resets. What are the first questions you would ask? Keep it under 100 words." 2>&1)
rc=$?
if [ $rc -ne 0 ]; then
echo " FAIL: pi exited with code $rc"
echo "$output" | tail -20
exit 1
fi
if [ -z "$output" ]; then
echo " FAIL: empty response"
exit 1
fi
echo "$output"
echo ""
# Check the response is relevant to elicitation
if echo "$output" | grep -iqE 'scope|boundar|entit|actor|specif|question|what.*system|who.*user'; then
echo " PASS: response contains elicitation-relevant content"
exit 0
else
echo " FAIL: response does not appear to follow elicitation methodology"
exit 1
fi