pi-upgrade-review
Skill2 starsChanged 24 days agoMITView on GitHub
Review a pi version bump (e.g. 1.4 → 1.5) for breaking changes, per-extension impact with file:line evidence, stale vendored deps, dead model ids, and harness improvement opportunities — report only, the user decides what to fix.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- add-agentSkill
- add-mcp-serverSkill
- add-ruleSkill
- code-reviewSkill
- grill-meSkill
- orchestrateSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 2 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
Run after pi update, after installing a new @earendil-works/pi-coding-agent, or whenever asked "what changed in pi X.Y / does the upgrade …
- Very specific: line 27
Run the gates: npm run check:manifest, npm run test:node, npm run test:bun (say so if Bun is missing), and npm run check:upgrade.
- Very specific: line 29
After approval only: edit the live ~/.pi/agent copies first, re-run the gates, then ./sync.sh live → mirror (rsync --delete, so repo-only …
- Very specific: line 35
Do not run a repo-wide tsc: it floods with pre-existing node_modules errors.
- Very specific: line 39
Do not delete vendored node_modules to clear drift: extension packages declare pi as devDeps for their own typecheck.
- Distinctive: line 42
Never auto-apply fixes found by this review — the report is the deliverable, the user picks the batches.
- Distinctive: line 46
Every bullet under the new release's Breaking Changes is listed with an explicit applies / does-not-apply verdict plus the command that …
- Very specific: line 50
After any approved fix: npm run check:manifest, npm run test:node (and test:bun where available), npm run check:upgrade pass.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
When to Use
Run after pi update, after installing a new @earendil-works/pi-coding-agent, or whenever asked "what changed in pi X.Y / does the upgrade break my harness". Run it before syncing or committing harness changes so the report and the fixes stay separate steps.
Procedure
- Capture the version delta:
pi --versionfor the new version; find the previous version in~/pi-harness/CHANGELOG.mdor the last release you reviewed. Installed changelog:~/.local/lib/node_modules/@earendil-works/pi-coding-agent/CHANGELOG.md. - List release headings and read ONLY the new section:
grep -n '^## \[' CHANGELOG.md | head -5gives the bounds. Read the new release in slices of ≤45 lines, always piped throughcut -c1-400, e.g.sed -n '12,34p' CHANGELOG.md | cut -c1-400. Changelog bullets are multi-KB single lines; unfiltered reads get truncated and lose the middle. - For every bullet under
### Breaking Changes, write the concrete grep that decides whether the harness is exposed and run it:- JSON-Schema-only validation →
rg -n 'Type\.Refine|Type\.BigInt|Type\.Undefined|Type\.Void|Type\.Codec|Type\.Transform|Format\.Set' extensions utils - pi-ai TypeBox re-export removal →
rg -n '\bType\b.*from "@earendil-works/pi-ai"' extensions utils(runtime is mapped inside pi, the published types are not) - keybinding helpers →
rg -n 'keyText|keyHint' pi.execcap/kill changes →rg -n 'pi\.exec\(' -A10setActiveTools→rg -n 'setActiveTools'- MCP OAuth →
rg -n 'clientId|clientName|callbackUrl|clientRegistration' ~/.pi/agent/mcp.json
- JSON-Schema-only validation →
- Typecheck A/B against old and new pi types. pi-harness has no typecheck script, so a raw tsc over an explicit file list is the sanctioned path (never repo-wide). Scratch config:
moduleResolution bundler,allowImportingTsExtensions,strict,skipLibCheck,noEmit; paths for@earendil-works/pi-coding-agent→<pi>/dist/index.d.ts,@earendil-works/pi-ai,pi-tuiandpi-agent-core→<pi>/node_modules/@earendil-works/<pkg>/dist/index.d.ts(nested!),typebox→<pi>/node_modules/typebox/build/index.d.ts; files = the live extensions that import pi packages. Run./node_modules/.bin/tsc -p /tmp/tc/tsconfig.json 2>&1 | grep -v 'node_modules/', then repeat with the paths rewritten to the previous version's vendored copy (extensions/jev-memory/node_modules/@earendil-works/...) and diff: only errors new to the upgraded types are regressions. npm run check:models— resolves every pinned id (settings.json model keys,modelFallback/modelThinkingLevels/modelRouter, harness presets, agent frontmatter) againstpi --list-models. Manual fallback: dumppi --list-models > /tmp/pi-models-<ver>.txtonce and match the provider and model COLUMNS (not substring); confirm each miss withpi --list-models <model>before reporting, because the resolver falls back across providers.npm run check:deps— compares every vendored@earendil-works/*install and declared range under both~/.pi/agent/extensionsand~/pi-harness/extensionstopi --version. A stale local copy wins module resolution, so runtime imports (getAgentDir,CONFIG_DIR_NAME,parseFrontmatter,getMarkdownTheme,StringEnum,keyHint) come from the old pi.- Run the gates:
npm run check:manifest,npm run test:node,npm run test:bun(say so if Bun is missing), andnpm run check:upgrade. - Report, without editing: (1) breaking changes and whether each applies, with the grep evidence; (2) impact table with
file:line+ severity for real breakage; (3) verified-not-affected list with evidence; (4) improvement opportunities from the release's Added section mapped onto harness files; (5) proposed fix batches, one concern per commit. Ask the user which batches to take. - After approval only: edit the live
~/.pi/agentcopies first, re-run the gates, then./sync.shlive → mirror (rsync--delete, so repo-only edits get reverted), verify withcmp, and commit one concern per commit.
Pitfalls
- pi changelog bullets are multi-KB single lines: always
cut -c1-400plus narrowsedranges. rg -ris--replace, not recursive — never bundle it with other short flags.- Do not run a repo-wide tsc: it floods with pre-existing
node_moduleserrors. Raw tsc on an explicit file list is correct here; filternode_modules/and judge first-party errors only. - A scratch tsconfig without
typeboxandpi-agent-corepath mappings reports falseTS2307for extension deps that live in per-extensionnode_modules. - tsc must point at the NESTED
pi-ai/pi-tui/pi-agent-coreunderpi-coding-agent/node_modules, not the top-level global install (onlypi-coding-agentis top-level). - Live
~/.pi/agent/extensions/jev-memory/node_modules/@earendil-workscan be an empty dir while the mirror holds real copies —check:depscovers both roots; keep it that way. - Do not delete vendored
node_modulesto clear drift: extension packages declare pi as devDeps for their own typecheck; bump the range and reinstall instead. - A missing model id is a broken role, not cosmetic: the 1.5 catalog moved to models.dev v2 and retired
meta/muse-spark-1.3while keeping its siblings. sync.shcopies live → mirror with--delete: make every harness edit on the live copy first, then stage only the intended files (live drift lands in the mirror working tree).- Never auto-apply fixes found by this review — the report is the deliverable, the user picks the batches.
Verification
- Every bullet under the new release's Breaking Changes is listed with an explicit applies / does-not-apply verdict plus the command that proved it.
- Each flagged finding cites
file:lineand was confirmed by a command (grep,pi --list-models,npm run check:upgrade, or a tsc A/B where the error is absent on the old types). - The report includes a verified-not-affected section so coverage is visible, not just problems.
- Nothing is edited before the user approves the fix batches.
- After any approved fix:
npm run check:manifest,npm run test:node(andtest:bunwhere available),npm run check:upgradepass;cmpconfirms live and mirror match;git statusshows only the intended files.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

