Repository navigation
docs: document .local-backup customization backups in squad upgrade - #1843
Conversation
`squad upgrade` has backed up locally customized Squad-owned files to `<file>.local-backup` for a while, and #1709 extended that to workflow files, but the behavior was never documented outside .squad/decisions.md. Adds a section to the self-upgrade feature docs covering: - which files are covered (squad.agent.md + managed workflows) - how to restore from a backup - version stamps are stripped before comparison, so a version-only diff does not trigger a spurious backup - only the most recent backup is kept per file - backups are not gitignored - --dry-run previews the squad.agent.md backup only; it returns before workflow files are processed Also cross-references the behavior from the `squad upgrade` row in the CLI reference for discoverability. Docs-only, no changeset required. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2af08ff0-56a4-43e4-903b-3153c0910a13
🟢 Impact Analysis — PR #1843Risk tier: 🟢 LOW 📊 Summary
🎯 Risk Factors
📦 Modules Affecteddocs (2 files)
This report is generated automatically for every PR. See #733 for details. |
🛫 PR Readiness Check
PR Scope: 🔧 Infrastructure
|
| Status | Check | Details |
|---|---|---|
| ✅ | Single commit | 1 commit — clean history |
| ✅ | Not in draft | Ready for review |
| ✅ | Branch up to date | Up to date with dev |
| ❌ | Copilot review | No Copilot review yet — it may still be processing |
| ✅ | Changeset present | No source files changed — changeset not required |
| ✅ | Scope clean | No .squad/ or docs/proposals/ files |
| ✅ | No merge conflicts | No merge conflicts |
| ✅ | Copilot threads resolved | No Copilot review threads |
| ❌ | CI passing | 1 check(s) still running |
Files Changed (2 files, +27 −1)
| File | +/− |
|---|---|
docs/src/content/docs/features/self-upgrade.md |
+26 −0 |
docs/src/content/docs/reference/cli.md |
+1 −1 |
Total: +27 −1
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
There was a problem hiding this comment.
🟢 Approval recommended
The changes are docs-only, consistent with the current implementation, and introduce no functional risk.
Pull request overview
Documents squad upgrade’s behavior of backing up locally customized Squad-owned files to <file>.local-backup (including workflows), improving user discoverability and recovery guidance during upgrades.
Changes:
- Adds a new “Your Customizations Are Backed Up” subsection explaining what gets backed up, how to restore, and important edge cases (version-stamp comparison, single-backup overwrite, and untracked-file behavior).
- Adds a one-line CLI reference cross-note on
squad upgradeto surface the backup behavior where users browse commands.
File summaries
| File | Description |
|---|---|
| docs/src/content/docs/features/self-upgrade.md | Adds a dedicated subsection describing .local-backup behavior, examples, and dry-run limitations. |
| docs/src/content/docs/reference/cli.md | Adds a brief note to the squad upgrade command entry about .local-backup backups for customized files. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| ⚠ squad-ci.yml has local customizations — backed up to squad-ci.yml.local-backup | ||
| ``` | ||
|
|
||
| To restore your version, copy the backup back over the refreshed file: |
Why
Follow-up from this morning's PR triage sweep. I audited the 16 merged PRs for doc drift; most were clean, but one real gap surfaced.
squad upgradebacks up locally customized Squad-owned files to<file>.local-backupbefore overwriting them — and #1709 (merged this morning) extended that behavior to workflow files. That behavior was only ever recorded in.squad/decisions.md. It appeared nowhere in user-facing docs, so a user who customizedsquad.agent.mdor a Squad-managed workflow would see their file silently replaced and have no documented way to know a backup existed.What changed
docs/src/content/docs/features/self-upgrade.md— new Your Customizations Are Backed Up subsection under Auto-Refresh Repo Templates:.github/agents/squad.agent.mdand the Squad-managed workflowsupgrade.ts:250-253)upgrade.ts:261,:473)--dry-runpreviews thesquad.agent.mdbackup only — it returns atupgrade.ts:1137, beforewriteWorkflowFileruns, so customized workflows are not flaggeddocs/src/content/docs/reference/cli.md— one-line cross-reference on thesquad upgraderow for discoverability.Verification
Every claim was traced to source rather than inferred:
--dry-runis a real flagcli-entry.ts:413upgrade.ts:250-253upgrade.ts:262-263upgrade.ts:474upgrade.ts:1137.local-backupnot in.gitignoregit grep— no matchI initially wrote that
--dry-runshows all files that would be backed up, then found the early return at:1137and corrected it. The doc now says what the code actually does.Follow-up worth considering (not in this PR)
*.local-backupisn't in.gitignore, andensureGitignore()inupgrade.tsdoesn't add it. Since backups land in.github/workflows/, a carelessgit add -Awould commit them. Adding the entry is a one-liner in product source — it needs a changeset and is out of scope for a docs PR, so I've documented the sharp edge instead. Happy to open a separate issue if you want it fixed.Notes
changelog-gateonly applies topackages/*/src/)--skip-repo-upgradeuntouched — out of scope, but flagging it since it admits the flag may not exist