#!/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" # shellcheck disable=SC2016 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 # shellcheck disable=SC2016 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 ' <<<"$PI_HELP" grep -q -- '--print, -p' <<<"$PI_HELP" grep -q -- '--tools, -t ' <<<"$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 # SC2251: restructured to avoid ! outside condition if rg -n 'update_plan|plan mode|sub-agent|subagents' "${WORKFLOW_FILES[@]}"; then echo "Error: pi workflow SKILL.md files must not contain Codex-specific terms" >&2 exit 1 fi echo "pi workflow skill docs verified"