feat(M3): Shared-source generator for agent variants
This commit is contained in:
@@ -21,7 +21,6 @@ REQUIRED_FILES=(
|
||||
"skills/reviewer-runtime/pi/run-review.sh"
|
||||
"skills/reviewer-runtime/pi/notify-telegram.sh"
|
||||
"scripts/install-pi-package.sh"
|
||||
"scripts/sync-pi-package-skills.sh"
|
||||
"pi-package/skills/atlassian/SKILL.md"
|
||||
"pi-package/skills/create-plan/SKILL.md"
|
||||
"pi-package/skills/do-task/SKILL.md"
|
||||
@@ -39,13 +38,13 @@ done
|
||||
test -x skills/reviewer-runtime/pi/run-review.sh
|
||||
test -x skills/reviewer-runtime/pi/notify-telegram.sh
|
||||
test -x scripts/install-pi-package.sh
|
||||
test -x scripts/sync-pi-package-skills.sh
|
||||
find skills/web-automation/pi/scripts -type f -print -quit | grep -q .
|
||||
find skills/atlassian/pi/scripts -type f -print -quit | grep -q .
|
||||
|
||||
for file in skills/create-plan/pi/SKILL.md skills/do-task/pi/SKILL.md skills/implement-plan/pi/SKILL.md; do
|
||||
grep -q 'docs/PI-SUPERPOWERS.md' "$file"
|
||||
grep -q 'docs/PI-COMMON-REVIEWER.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"
|
||||
@@ -54,11 +53,13 @@ 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
|
||||
grep -q 'Reviewer CLI | codex \\| claude \\| cursor \\| opencode \\| pi' skills/do-task/pi/templates/task-plan.md
|
||||
|
||||
grep -q 'pi-package/skills/atlassian/scripts' skills/atlassian/pi/SKILL.md
|
||||
grep -q 'pi-package/skills/web-automation/scripts' skills/web-automation/pi/SKILL.md
|
||||
# shellcheck disable=SC2016
|
||||
grep -q 'local checkout package install keeps the runtime in `pi-package/skills/<skill>/scripts`' docs/PI.md
|
||||
|
||||
grep -q 'install-pi-package.sh --global' docs/PI.md
|
||||
@@ -81,6 +82,8 @@ for family in atlassian create-plan do-task implement-plan web-automation; do
|
||||
diff -qr \
|
||||
--exclude '.DS_Store' \
|
||||
--exclude 'node_modules' \
|
||||
--exclude '.generated-manifest.json' \
|
||||
--exclude 'package.json' \
|
||||
"$source_dir" "$mirror_dir" >/dev/null
|
||||
|
||||
while IFS= read -r -d '' source_path; do
|
||||
@@ -93,10 +96,14 @@ for family in atlassian create-plan do-task implement-plan web-automation; do
|
||||
-mindepth 1 -print0)
|
||||
done
|
||||
|
||||
! grep -nE 'update_plan|plan mode|sub-agent|subagents' \
|
||||
# SC2251: restructured to avoid ! outside condition
|
||||
if grep -nE 'update_plan|plan mode|sub-agent|subagents' \
|
||||
skills/create-plan/pi/SKILL.md \
|
||||
skills/do-task/pi/SKILL.md \
|
||||
skills/implement-plan/pi/SKILL.md
|
||||
skills/implement-plan/pi/SKILL.md; then
|
||||
echo "Error: pi SKILL.md files must not contain Codex-specific terms" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
node <<'EOF'
|
||||
const fs = require("fs");
|
||||
@@ -129,7 +136,7 @@ for (const requiredFile of [
|
||||
"pi-package/skills",
|
||||
"docs/PI-COMMON-REVIEWER.md",
|
||||
"scripts/install-pi-package.sh",
|
||||
"scripts/sync-pi-package-skills.sh",
|
||||
"scripts/generate-skills.mjs",
|
||||
]) {
|
||||
if (!pkg.files.includes(requiredFile)) {
|
||||
console.error(`package.json files must include ${requiredFile}`);
|
||||
|
||||
Reference in New Issue
Block a user