Repository navigation
feat: add routing.md to squad export/import functionality - #1129
Merged
bradygaster merged 5 commits intoMay 18, 2026
Merged
Conversation
Include the full routing.md file content in both the SDK-level and CLI-level export/import flows. Previously only structured routing rules (pattern → agent) were extracted; now the complete file with tables, comments, and routing principles is preserved during export and faithfully restored on import. - SDK export: adds routingFile field to ExportBundle - SDK import: prefers raw routingFile over formatted rules - CLI export: includes routing.md content in manifest - CLI import: writes routing.md to .squad/ on import Closes #1123 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds routing.md preservation to Squad export/import flows so full routing context can round-trip alongside existing structured routing data.
Changes:
- Adds
routingFilesupport to SDK sharing export/import bundles. - Adds
routingsupport to CLI export/import manifests. - Adds SDK sharing tests for raw routing content export/import and anonymization.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
packages/squad-sdk/src/sharing/export.ts |
Includes raw .ai-team/routing.md content in exported bundles. |
packages/squad-sdk/src/sharing/import.ts |
Prefers raw routing content when importing routing files. |
packages/squad-cli/src/cli/commands/export.ts |
Adds .squad/routing.md content to CLI export manifests. |
packages/squad-cli/src/cli/commands/import.ts |
Writes imported routing content into the destination squad. |
test/sharing.test.ts |
Adds SDK tests for routing file preservation and anonymization. |
.changeset/add-routing-to-export-import.md |
Records package release notes for SDK and CLI changes. |
Address review feedback: - SDK import: check bundle.routingFile !== undefined (preserves empty files) - CLI import: check manifest.routing !== undefined (same reason) - Add CLI integration test for routing.md export/import round-trip Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Collaborator
Author
|
@copilot resolve the merge conflicts in this pull request |
- Drop redundant 'routing' field; origin/dev already handles routing_md - Use origin/dev's refactored buildManifest/applyManifest with return - Bring in ExportRepoOptions/ImportRepoOptions and repo export/import - Both routing.md round-trip tests pass (14/14) Co-authored-by: bradygaster <41929050+bradygaster@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bradygaster/squad/sessions/a692277d-db4b-42c9-928f-ade11b4a91e0 Co-authored-by: bradygaster <41929050+bradygaster@users.noreply.github.com>
Contributor
Resolved in fcbf2b8. The conflicts were in |
bradygaster
deleted the
bradygaster/squad-1123-add-routing-to-export-import
branch
August 8, 2026 08:38
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
Adds
routing.mdto the Squad export/import functionality so it is included when users export or import their Squad configuration.Previously, only structured routing rules (pattern → agent mappings) were extracted during export. The full
routing.mdfile—including tables, module ownership, comments, and routing principles—was lost. This PR preserves the complete file content during export and restores it faithfully on import.Changes
SDK layer (
packages/squad-sdk/src/sharing/)routingFileoptional field toExportBundleinterface; reads and includes the raw routing.md content (with anonymization support)routingFile(raw content) over formattedroutingRuleswhen writing routing.md on importCLI layer (
packages/squad-cli/src/cli/commands/)routingfield toExportManifest; reads.squad/routing.mdduring exportrouting.mdto.squad/during import; reports routing import in outputTests
Verification
Closes #1123