From f2c4d39abd712fc64a75caaf50980791beaaf559 Mon Sep 17 00:00:00 2001 From: Stefano Fiorini Date: Thu, 23 Apr 2026 16:22:08 -0500 Subject: [PATCH] feat(pi): implement milestone M5 - package surface --- README.md | 27 +++++++++++++++ docs/PI.md | 14 +++++++- package.json | 41 ++++++++++++++++++++++ scripts/verify-pi-resources.sh | 62 ++++++++++++++++++++++++++++++++++ 4 files changed, 143 insertions(+), 1 deletion(-) create mode 100644 package.json create mode 100755 scripts/verify-pi-resources.sh diff --git a/README.md b/README.md index 2941915..dedfa1e 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ Cross-agent skill collection for **Codex**, **Claude Code**, **OpenCode**, and **Cursor**. +Pi package support is also included for the pi-native variants in this repo. + This repo is organized similarly to `obra/superpowers` and is designed to scale to many skills over time. ## Goals @@ -91,3 +93,28 @@ ai-coding-skills/ ## Compatibility Policy Each skill should explicitly document agent compatibility and any prerequisites directly in its own `SKILL.md`. + +## Pi Package + +The repo root now includes a pi package manifest that ships only the pi-specific surface: + +- `skills/*/pi/` for the five supported skill families +- `skills/reviewer-runtime/pi/` +- `docs/PI*.md` +- `scripts/verify-pi-resources.sh` + +Install it into project-local pi settings from this checkout with: + +```bash +pi install -l /absolute/path/to/ai-coding-skills +pi list +``` + +Before publishing or sharing a tarball, run: + +```bash +./scripts/verify-pi-resources.sh +npm pack --dry-run --json +``` + +Additional pi-specific guidance lives in [docs/PI.md](docs/PI.md). diff --git a/docs/PI.md b/docs/PI.md index 674cae5..0f56cf3 100644 --- a/docs/PI.md +++ b/docs/PI.md @@ -42,6 +42,13 @@ V1 uses one repo-level pi package rather than per-skill packages. The package su The package metadata and allowlist live at repo root so `pi install -l /absolute/path/to/ai-coding-skills` works without extra wrapping. +Current manifest shape: + +- package name: `ai-coding-skills-pi` +- discovery keyword: `pi-package` +- `pi.skills`: the five `skills//pi` directories +- `files`: allowlisted to pi skill variants, pi docs, pi reviewer runtime helpers, and `scripts/verify-pi-resources.sh` + ## Install Options ### Local Skill Copy @@ -61,7 +68,12 @@ pi install -l /absolute/path/to/ai-coding-skills pi list ``` -Package details are finalized by the packaging milestone and verified by `scripts/verify-pi-resources.sh` once that script is added in M5. +Verify the package surface before packaging or publishing: + +```bash +./scripts/verify-pi-resources.sh +npm pack --dry-run --json +``` ## Extension Decision diff --git a/package.json b/package.json new file mode 100644 index 0000000..b0063e5 --- /dev/null +++ b/package.json @@ -0,0 +1,41 @@ +{ + "name": "ai-coding-skills-pi", + "version": "0.1.0", + "description": "Pi variants and shared runtime helpers for ai-coding-skills.", + "license": "UNLICENSED", + "private": true, + "keywords": [ + "pi-package", + "agent-skills", + "pi" + ], + "files": [ + "README.md", + "docs/ATLASSIAN.md", + "docs/CREATE-PLAN.md", + "docs/DO-TASK.md", + "docs/IMPLEMENT-PLAN.md", + "docs/README.md", + "docs/TELEGRAM-NOTIFICATIONS.md", + "docs/PI.md", + "docs/PI-RESEARCH.md", + "docs/PI-SUPERPOWERS.md", + "docs/WEB-AUTOMATION.md", + "skills/atlassian/pi", + "skills/create-plan/pi", + "skills/do-task/pi", + "skills/implement-plan/pi", + "skills/web-automation/pi", + "skills/reviewer-runtime/pi", + "scripts/verify-pi-resources.sh" + ], + "pi": { + "skills": [ + "./skills/atlassian/pi", + "./skills/create-plan/pi", + "./skills/do-task/pi", + "./skills/implement-plan/pi", + "./skills/web-automation/pi" + ] + } +} diff --git a/scripts/verify-pi-resources.sh b/scripts/verify-pi-resources.sh new file mode 100755 index 0000000..346a75e --- /dev/null +++ b/scripts/verify-pi-resources.sh @@ -0,0 +1,62 @@ +#!/usr/bin/env bash +set -euo pipefail + +REQUIRED_FILES=( + "docs/PI-RESEARCH.md" + "docs/PI.md" + "docs/PI-SUPERPOWERS.md" + "skills/atlassian/pi/SKILL.md" + "skills/create-plan/pi/SKILL.md" + "skills/create-plan/pi/templates/continuation-runbook.md" + "skills/create-plan/pi/templates/milestone-plan.md" + "skills/create-plan/pi/templates/story-tracker.md" + "skills/do-task/pi/SKILL.md" + "skills/do-task/pi/templates/task-plan.md" + "skills/implement-plan/pi/SKILL.md" + "skills/web-automation/pi/SKILL.md" + "skills/reviewer-runtime/pi/run-review.sh" + "skills/reviewer-runtime/pi/notify-telegram.sh" + "package.json" +) + +for file in "${REQUIRED_FILES[@]}"; do + test -f "$file" +done + +test -x skills/reviewer-runtime/pi/run-review.sh +test -x skills/reviewer-runtime/pi/notify-telegram.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" +done + +! 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 + +node <<'EOF' +const fs = require("fs"); +const pkg = JSON.parse(fs.readFileSync("package.json", "utf8")); + +if (!pkg.pi || !Array.isArray(pkg.pi.skills) || pkg.pi.skills.length !== 5) { + console.error("package.json must define pi.skills with exactly 5 entries"); + process.exit(1); +} + +if (!Array.isArray(pkg.files) || pkg.files.length === 0) { + console.error("package.json must define a non-empty files allowlist"); + process.exit(1); +} + +if (!Array.isArray(pkg.keywords) || !pkg.keywords.includes("pi-package")) { + console.error("package.json must include the pi-package keyword"); + process.exit(1); +} + +console.log("package metadata ok"); +EOF + +echo "pi resources verified"