Repository navigation
fix: replace .ai-team/ references inside migrated file content - #151
Merged
Merged
Conversation
During --migrate-directory, after renaming directories and scrubbing emails, walk all .md and .json files inside .squad/ and replace .ai-team/ and .ai-team-templates/ path references with their .squad/ equivalents. Adds reusable replaceAiTeamReferences() function following the same pattern as scrubEmailsFromDirectory(). Fixes #134 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
bradygaster
added a commit
that referenced
this pull request
Feb 27, 2026
…ses, squad-pr port issues Session: 2026-02-27T01:40-issue-cleanup-and-porting Requested by: Brady Changes: - Logged Fenster orchestration: #134 content replacement fix, PR #151 merged, 95/95 tests pass - Logged McManus orchestration: Closed #146, #145, #139 with community guidance - Logged Keaton orchestration: Filed 4 squad-pr blocking issues (#548–551) - Merged 2 inbox decisions: Fenster content replacement, User directive (remove squad-main-guard.yml) - Deleted merged inbox files - Propagated cross-agent updates to McManus and Keaton history.md
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.
Summary
During
--migrate-directory, the command renames.ai-team/→.squad/and scrubs emails, but does not replace.ai-team/path references inside the migrated files themselves. This means files likerouting.md,decisions.md, and agent histories still contain stale.ai-team/paths after migration.Changes
replaceAiTeamReferences(dirPath)— a reusable function (following thescrubEmailsFromDirectorypattern) that walks all.mdand.jsonfiles in a directory and replaces:.ai-team-templates/→.squad-templates/.ai-team/→.squad/--migrate-directoryblock, running after the email scrub stepTesting
All 95 existing tests pass. The
safeRename()function is untouched.Fixes #134