You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The installer's repository step in engine/actions.ts hardcodes https://github.com/danielmiessler/PAI.git as the clone source. Users running on a fork (e.g. virtualian/pai) cannot use the installer to populate or update their installation from their own fork — every install/reinstall pulls upstream regardless. This decouples the user's fork-side work from anything reachable via the installer, and silently regresses fork content if reinstall is ever used.
Discovered while investigating regression risk for the cleanup work in #108–#110.
Existing-install update (line 511): git pull origin main — runs against whatever remote is already configured, so this path would respect a fork remote if ~/.claude/.git/ already exists with a fork remote configured. But neither of the creation paths sets up a fork remote.
There is no env var, settings.json field, or CLI flag that overrides the URL. config-gen.ts has a pai.repoUrl field but it's only emitted into the generated settings.json — it is not consumed by engine/actions.ts:runRepository.
Reinstall on a fork silently replaces fork content with upstream. If the user ever reinstalls into a populated ~/.claude/, the fallback init+fetch+checkout path at line 539 will overlay upstream files on top of fork-specific files in ~/.claude/. Files only present in the fork would remain (init doesn't delete), but any file that exists in both (e.g. CLAUDE.md, PAI/Algorithm/v3.7.0.md) would be overwritten with the upstream version.
#108-#110 all share the pattern: the two-root separation declared a clean architecture but the runtime/installer didn't follow through. This issue is the same shape applied to the install source itself. Fork users live in a half-state where the architecture is documented in their fork but the installer cannot reach it.
Summary
The installer's repository step in
engine/actions.tshardcodeshttps://github.com/danielmiessler/PAI.gitas the clone source. Users running on a fork (e.g.virtualian/pai) cannot use the installer to populate or update their installation from their own fork — every install/reinstall pulls upstream regardless. This decouples the user's fork-side work from anything reachable via the installer, and silently regresses fork content if reinstall is ever used.Discovered while investigating regression risk for the cleanup work in #108–#110.
Evidence
Releases/v4.0.3+/.claude/PAI-Install/engine/actions.ts:Three independent code paths, all hardcoding the same upstream URL:
git clone danielmiessler/PAIgit remote add origin danielmiessler/PAIgit pull origin main— runs against whatever remote is already configured, so this path would respect a fork remote if~/.claude/.git/already exists with a fork remote configured. But neither of the creation paths sets up a fork remote.There is no env var, settings.json field, or CLI flag that overrides the URL.
config-gen.tshas apai.repoUrlfield but it's only emitted into the generated settings.json — it is not consumed byengine/actions.ts:runRepository.Impact
install.shon a fresh machine from a fork checkout still clonesdanielmiessler/PAI, not the fork. All fork-specific work (e.g. the two-root separation in Separate PAI installation from CC config: CLAUDE_CONFIG_DIR + PAI_DIR=~/.pai #98/Implement CLAUDE_CONFIG_DIR + PAI_DIR two-root separation #101/Restore CorrectionMode fast-path and loadLatestSynthesis (hotfix) #104/Add CI symbol guard for critical hook files #105/Complete two-root path separation (supersedes #103) #106 invirtualian/pai) is invisible to a fresh install.~/.claude/, the fallback init+fetch+checkout path at line 539 will overlay upstream files on top of fork-specific files in~/.claude/. Files only present in the fork would remain (init doesn't delete), but any file that exists in both (e.g.CLAUDE.md,PAI/Algorithm/v3.7.0.md) would be overwritten with the upstream version.~/.claude/skills/(not~/.pai/skills/), and the installer fills~/.claude/skills/from upstream, fork-side skill modifications are doubly invisible.Reproduction
Suggested fixes (not prescriptive)
PAI_REPO_URL) read at install timepai.repoUrl) — already exists inconfig-gen.ts! Just plumb it through torunRepositoryinstall.sh --repo-url=...)~/.claude/.git/already exists, readgit remote get-url originand preserve it across update operations — don't overwrite with hardcoded upstream URL.Why this is a peer to #108-#110
#108-#110 all share the pattern: the two-root separation declared a clean architecture but the runtime/installer didn't follow through. This issue is the same shape applied to the install source itself. Fork users live in a half-state where the architecture is documented in their fork but the installer cannot reach it.
Related
~/.claude/PAI/mirror tree (installer recreates it via upstream clone — this issue is a contributing cause)~/.claude/skills/from upstream, exacerbating the harness-reads-the-wrong-side problem)