Repository navigation
squad files: prune and migration go through the shared-destination check (#52) - #84
Merged
Merged
Conversation
…eck (#52) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 19, 2026
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.
Closes #52.
What remained after #83. The destination check covered only the files an apply writes. Pruning a removed agent, deleting a duplicate and migrating a legacy
worker-*file all unlink paths outside that set. Amode/review.mdlink onto a managed file was therefore left dangling in two cases:allow_remove: truepruned the file;worker-a-b.mdtogrunt-a-b.md.Change (
src/squad-apply.js,applySquad). The files to prune, the duplicates and the migrations are now worked out before anything changes. All of them go throughsharedDestinationstogether with the planned writes. If any of those paths is reached by another loadable agent name, or a directory cannot be listed, the apply is refused ascollisionwith the paths named, and nothing is written or deleted.allow_removestill authorizes dropping a roster entry, not breaking another agent.Documentation. The README gains a short section on the one-file-one-agent rule. It also records the accepted conservative limitation from the issue: a plain
agents -> agentdirectory link loads each file twice under the same id, which would be harmless, but Squad still refuses it.Tests (
tests/regress-squad-files.test.js). Both fail on master:pruning a file another loadable agent links to is refused, allow_remove or not;migrating a legacy worker- file another loadable agent links to is refused: the link keeps its content, and nogrunt-file is written.🤖 Generated with Claude Code