PAI is (still) a mess - A proposition #220
Closed
smolcompute
started this conversation in
General
Replies: 1 comment 1 reply
-
|
I think you're absolutely correct here that things are not working in the current system. And I truly appreciate you putting all this effort into finding a solution. I think I am going to do something more drastic that solves all of it in a different way. Check the discussion board for a new post. And thank you again, @smolcompute, for all the effort that you have put into the project so far. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The repo hasn't reached a stable MVP state, and I think the architecture is why. I'd like to propose a workflow that could eliminate a lot of friction going forward.
The problem
The repo is not a sanitized version of Daniel's own PAI. What I suspect happens: Daniel's PAI works as intended, so he keeps building more features into it. Meanwhile, the PAI repo itself never gets to a state of MVP because the two versions do not share a common foundation: instead of public PAI being like Chapter 1 of a book, and Daniel's own PAI being Chapter 1 + 2 (common foundation, with next chapter), public PAI is like chapter 1 with missing pages at random places. The maintainer never actually uses and stress tests public PAI in production and each time PAI gets updated new pages go missing.
Proposition
There is a way for Daniel (and the rest of us) of using the actual public PAI as a shared in production foundation while still extending it. It also happens to make pulling updates from public PAI a lot easier. The trick is to use
~/.claudeas the staging area for multiple sources, i.e., both public PAI and whatever additions and customizations you have made. This way everyone uses the same foundation (like an application binary), zero fork drift, zero merge conflicts.This is what Daniel's (and everyone's) install could look like:
Quick Mental Model
PAIas the shared toolboxKAIas Kai’s unique add-ons or not yet public features,OVERRIDESas the explicit override layer.$PAI_DIR(~/.claude) is the staging area that Claude actually sees.Making it all work together in
~/.claudeThe symlinks in
~/.claudeare created and updated by a script that walks each source with find -type f, then ensure_dir creates real directories in$PAI_DIR; only the files become symlinks. The order of the walks ensures which source wins when there's collisions for a single path.$PAI_REPO/.claude,$KAI_REPO/.claude, then$OVERRIDES_REPO/.claudein that order (KAI overrides PAI; OVERRIDES overrides both).$PAI_DIR, default~/.claude) and symlinks every file; skips exclusions,.git, and.DS_Store.Customizing PAI Without Fork Drift
How to customize a PAI file (e.g.,
settings.jsonor a hook):$PAI_REPO/.claude/...into the identical path under$OVERRIDES_REPO/.claude/....$OVERRIDES_REPO. Leave the original in$PAI_REPOuntouched.Why this works:
$PAI_REPOfirst, then$OVERRIDES_REPO, so any path collision is resolved by the OVERRIDES version (“OVERRIDES wins”).$PAI_DIR, which now points to your OVERRIDES override, while$PAI_REPOstays clean for upstream pulls.When to use this:
$PAI_REPO(config, hooks, skills, etc.).Result
Daniel (like us) is using the public repo in production. He can slowly transition things from KAI to PAI simply by moving the files from one repo to the other. At any moment, it is always very clear which parts of PAI are being overriden (settings.json, CORE/SKILL.md, etc.) and which are absent from PAI and KAI only. Daniel uses the same core PAI as everyone else and is incentivized to treat it as "real", shared infrastructure.
Notes
PRIVATE/.claude/source that is not a repo so never gets pushed to github where you can store skills that contain sensitive information (like memories).Finally, I truly appreciate all the work Daniel is putting into this project. I just see that we are hitting a particular stumbling block that has to do with fork drift between the version the maintainer actually uses in production and the version made publicly available. This is my attempt at a solution and also at a way of making updating one's PAI easy in the future (zero merge conflicts).
Beta Was this translation helpful? Give feedback.
All reactions