v2.5 INSTALL.ts wizard overwrites correct version in settings.json with hardcoded "2.4"
Summary
After following the v2.5 upgrade instructions in Releases/v2.5/README.md, the PAI banner and statusline both display "PAI v2.4" instead of "PAI v2.5".
The root cause is two hardcoded version strings in Releases/v2.5/.claude/INSTALL.ts that were not bumped from 2.4 to 2.5. The wizard generates a fresh settings.json that overwrites the correct version shipped in the release template.
When This Occurs
The upgrade instructions in Releases/v2.5/README.md are:
# Step 1: Backup
mv ~/.claude ~/.claude-v2.4-backup
# Step 2: Install v2.5
cp -r .claude ~/
# Step 3: Run the wizard
cd ~/.claude && bun run INSTALL.ts
After Step 2, ~/.claude/settings.json is a copy of Releases/v2.5/.claude/settings.json, which correctly contains:
"pai": {
"repoUrl": "github.com/danielmiessler/PAI",
"version": "2.5" // ← correct
}
After Step 3, the wizard calls generateSettingsJson() (Releases/v2.5/.claude/INSTALL.ts:291) which builds a complete new settings object from scratch and writes it to ~/.claude/settings.json via writeFileSync (line 553), fully replacing the file. This generated object contains two stale version references:
- Line 298:
"paiVersion": "2.4"— top-level field, should be"2.5" - Line 333:
"version": "2.4"— inside thepaiobject, should be"2.5"
The wizard then prints "PAI v2.5 installed successfully!" (line 598) — so the UI text is correct, but the data it wrote is not.
How The Version Reaches The Display
Two independent display paths both read from the same source:
- Banner (
~/.claude/skills/PAI/Tools/Banner.ts:123):paiVersion = settings.pai?.version || "2.0" - Statusline (
~/.claude/statusline-command.sh:61):PAI_VERSION=$(jq -r '.pai.version // "—"' "$SETTINGS_FILE")
Both read pai.version from ~/.claude/settings.json, so the wizard's incorrect write propagates everywhere.
Steps to Reproduce
- Follow "Upgrading from v2.4" in
Releases/v2.5/README.md(steps 1-3) - Run
paior observe the statusline - Version displays as "PAI v2.4"
Expected
Version displays as "PAI v2.5"
Fix
Two lines in Releases/v2.5/.claude/INSTALL.ts:
- "paiVersion": "2.4",
+ "paiVersion": "2.5",
- "version": "2.4"
+ "version": "2.5"