I keep more than one folder of the same project on my machine. One is where I am working. Another is where an agent is working. Sometimes there is a third. Each folder is its own clone, so each one can be edited on its own.
A git worktree looks like the same idea, and I stopped using it for this. The worktrees still belong to one repository, and I end up switching back and forth. When I ask an agent to work that way, sending it back to change an earlier tree is awkward. A second clone is just another folder. The agent opens that folder and edits it.
Then the same local files have to show up in every folder, and they must not be committed.
An HTTP file with the address of my local server and a token. Hooks and skill files the coding agent will only read inside the project. A task file whose paths point at this folder. Notes and a task list for work that is not the product. I want those waiting when I open any clone. I do not want them in the diff, and I do not want to copy them by hand each time I make a new clone.
Copying by hand is how I edit the HTTP file in the agent's folder and forget the one I am using. A shortcut looks like the fix: one real file, seen from every folder. Two things went wrong. Some tools will not follow a shortcut that leaves the project, so the hook file is simply missing. And a shortcut is one file, so a private experiment in one clone shows up in the others immediately.
I keep one private folder as the home of those files. A small tool, beyond-local-file, writes a normal copy into each clone and tells Git to ignore that path. I call that a link: the file is there in the project. On disk it is an ordinary copy. I can edit the private folder, or edit a clone, and the other copies catch up. When I have changed one clone on purpose and the others have moved on as well, that file stays as it is until I pick a version. I do that on a page on my own machine.
That is the case I hit most days. A few clones of one repo. The same local files in each. Nothing extra in the commit.
I use the same setup when the projects are different. One private folder holds the local AI setup for a backend project: hooks, agent rules, editor settings, a task file, and a directory the agent reads and writes. Those are real files inside that project, so a tool that will not look outside the folder can still open them. Another private folder is for this tool itself. Its task list and draft notes stay out of the public repository, and they are in the working folder while I am there.
Stow and chezmoi are the tools I would use for dotfiles in my home directory. This one is for files that belong in the project folders and in none of the commits.
uv tool install beyond-local-file
Top comments (0)