Skip to content

fix: replace .ai-team/ references inside migrated file content - #151

Merged
bradygaster merged 1 commit into
devfrom
squad/134-migrate-content-replacement
Feb 27, 2026
Merged

bradygaster merged 1 commit into
devfrom
squad/134-migrate-content-replacement

Conversation

@bradygaster

Copy link
Copy Markdown
Collaborator

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 like routing.md, decisions.md, and agent histories still contain stale .ai-team/ paths after migration.

Changes

  • Added replaceAiTeamReferences(dirPath) — a reusable function (following the scrubEmailsFromDirectory pattern) that walks all .md and .json files in a directory and replaces:
    • .ai-team-templates/ → .squad-templates/
    • .ai-team/ → .squad/
  • Integrated the new function into the --migrate-directory block, running after the email scrub step
  • Logs how many files were updated

Testing

All 95 existing tests pass. The safeRename() function is untouched.

Fixes #134

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
bradygaster merged commit ce548bf into dev Feb 27, 2026
1 check passed
@bradygaster
bradygaster deleted the squad/134-migrate-content-replacement branch February 27, 2026 01:48
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant