Repository navigation
Honour PI_CODING_AGENT_DIR for the Pi theme and skills - #19621
Closed
ancientastronauttheorist wants to merge 4 commits into
Closed
ancientastronauttheorist wants to merge 4 commits into
ancientastronauttheorist wants to merge 4 commits into
Conversation
omarchy-theme-set-pi always wrote to ~/.pi/agent, so on a machine that points pi elsewhere with PI_CODING_AGENT_DIR the theme and its settings landed where pi never looks. It now follows that variable, as the Claude and Hermes theme syncs follow CLAUDE_CONFIG_DIR and HERMES_HOME. Fixes omacom#13691 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 01490dc)
pi resolves PI_CODING_AGENT_DIR through its own tilde expansion, so a value like ~/.config/pi set somewhere a shell never expands it is one pi reads from $HOME/.config/pi. The script took it literally: a theme switch found no such directory and skipped the sync, and the install-time --activate created a ~ directory under the working directory and themed that instead. Co-Authored-By: Codex Medium <noreply@openai.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 8559e78)
(cherry picked from commit e5f7265)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gr84VuXNHLdS8Sn11pRKL1
Contributor
[Medium impact] This PR appears safe to merge. SummaryPi theme files, activation settings, and skill links now follow
Reviews (1) · Last reviewed commit: "Link Pi's skills into PI_CODING_AGENT_DI..." · Reviewed by Greptile |
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
Fixes #13691. When
PI_CODING_AGENT_DIRpoints pi at a different config directory, Omarchy still wrote pi's theme and skill links into~/.pi/agent, which pi never reads. Other Omarchy code already follows the variable (omarchy-agent-instructions, theomarchy-agent-usage-*collectors). These two places didn't:omarchy-theme-set-piwrites the theme and the--activatesetting into${PI_CODING_AGENT_DIR:-$HOME/.pi/agent}, expanding a leading~the way pi does.omarchy-agent-skills-linklinks pi's skills into the same directory.The theme half is #13693 by @manuaudio, which was verified and marked ready before it was closed to tidy the queue. Its three commits are cherry-picked here unchanged, keeping their authors. Only the
test/clicontext needed resolving, because a nearby claude-theme assertion has changed since. The skills half replaces #13836, which was closed in the belief that quattro already covered it. It doesn't: line 23 ofomarchy-agent-skills-linkhardcoded~/.pi/agent/skills.#16783, a larger refactor of skill linking into a registry, also makes pi's skills follow
PI_CODING_AGENT_DIR. If it lands first, the last commit here can be dropped. The theme fix stands either way.This leaves out
omarchy-upgrade-to-quattro's one-time skill linking. It runs during the upgrade, and getting the variable into that environment is a separate question (see the bot's note on #13691).Verification
./test/clipasses, including the pi theme cases from Sync the Pi theme into PI_CODING_AGENT_DIR when it is set #13693: configured directory, ordinary sync and--activate, a leading~, and the default directory left alone.test/shell.d/provision-user-test.shpasses with a new case. WithPI_CODING_AGENT_DIR="~/pi-work", pi's skills are linked into$HOME/pi-work/skillsand~/.piisn't created. The case fails onquattro'somarchy-agent-skills-link(not ok - pi's skills are linked into PI_CODING_AGENT_DIR) and passes with this change.PI_CODING_AGENT_DIRfirst, asagent-integrate-herdr-test.shdoes, so a caller's own value can't send links outside the temporary home.pi --helpdocuments forPI_CODING_AGENT_DIR("Config directory (default: ~/.pi/agent)").Screenshots
No visible change: it only changes where the pi theme file and skill links are written.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Gr84VuXNHLdS8Sn11pRKL1