Files
ai-coding-skills/scripts/verify-pi-workflows.sh
T
2026-04-23 19:13:22 -05:00

49 lines
1.9 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
WORKFLOW_FILES=(
"skills/create-plan/pi/SKILL.md"
"skills/do-task/pi/SKILL.md"
"skills/implement-plan/pi/SKILL.md"
)
# These terms cover the Codex-only constructs explicitly called out by the plan.
# Expand this deny-list if later pi workflow ports introduce new harness-specific tokens.
for file in "${WORKFLOW_FILES[@]}"; do
test -f "$file"
grep -q 'docs/PI-SUPERPOWERS.md' "$file"
grep -q 'Reviewer CLI: `codex`, `claude`, `cursor`, `opencode`, `pi`, or `skip`' "$file"
grep -q 'pi --no-session --no-skills --no-prompt-templates --no-extensions --no-context-files' "$file"
grep -q -- '--tools read,grep,find,ls -p' "$file"
grep -q 'pi --list-models \[search\]' "$file"
done
grep -q 'reviewer model is configured independently' docs/PI-COMMON-REVIEWER.md
grep -q 'provider-qualified model IDs' docs/PI-COMMON-REVIEWER.md
grep -q 'MUST NOT include `write`, `edit`, or `bash`' docs/PI-COMMON-REVIEWER.md
if command -v pi >/dev/null 2>&1; then
PI_HELP=$(pi --help 2>&1)
grep -q -- '--model <pattern>' <<<"$PI_HELP"
grep -q -- '--print, -p' <<<"$PI_HELP"
grep -q -- '--tools, -t <tools>' <<<"$PI_HELP"
grep -q -- '--no-session' <<<"$PI_HELP"
grep -q -- '--no-skills' <<<"$PI_HELP"
grep -q -- '--no-prompt-templates' <<<"$PI_HELP"
grep -q -- '--no-extensions' <<<"$PI_HELP"
grep -q -- '--no-context-files' <<<"$PI_HELP"
fi
test -f skills/create-plan/pi/templates/continuation-runbook.md
test -f skills/create-plan/pi/templates/milestone-plan.md
test -f skills/create-plan/pi/templates/story-tracker.md
test -f skills/do-task/pi/templates/task-plan.md
grep -q 'Reviewer CLI | codex \\| claude \\| cursor \\| opencode \\| pi' skills/do-task/pi/templates/task-plan.md
test -x skills/reviewer-runtime/pi/run-review.sh
test -x skills/reviewer-runtime/pi/notify-telegram.sh
! rg -n 'update_plan|plan mode|sub-agent|subagents' "${WORKFLOW_FILES[@]}"
echo "pi workflow skill docs verified"