feature: track managed artifact lifecycle and clean obsolete paths on upgrade

Đang mở
#2,232 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
30/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
cli, devtools

Hướng nghiên cứu

Start by reading the existing squad upgrade migration and TEMPLATE_MANIFEST, then inspect the versioned layout manifest proposal in #670 and the related migration issues #2047 and #1126. Map how managed artifacts are identified, migrated, and tested before choosing an implementation approach. Done means versioned fixtures cover safe migration, preservation and reporting of unknown files, dry-run output, verification before removal, and idempotent repeated upgrades.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

wave:1-next wave1:P2

Problem

An upgraded Squad repository can retain artifacts from older layouts that a fresh squad init no longer creates. Stale skills or instructions can still be discovered and influence agent behavior, while the repository remains structurally different from a fresh install.

In one observed upgrade, the existing repository retained 21 folders and 24 tracked files under .copilot/skills, while a fresh init had no .copilot/skills directory. The installed upgrade migration only moves legacy skill names listed in TEMPLATE_MANIFEST; other entries are intentionally left behind to avoid deleting user content. This protects unknown files, but leaves old Squad artifacts and user-added skills indistinguishable in a deprecated location.

Expected behavior

Squad should track the lifecycle of artifacts it manages, rather than relying on filesystem comparisons or broad deletion. A machine-readable manifest could record each artifact's ownership, introduced version, canonical location, migration target, and retirement policy.

During squad upgrade, Squad should:

  • Identify known Squad-managed artifacts that are obsolete, moved, or need refresh.
  • Migrate managed content to the canonical location, verify the destination, then remove the old managed copy.
  • Preserve unknown or user-owned content and report conflicts instead of guessing.
  • Make --dry-run list planned moves, updates, and removals, with the reason for each.
  • Converge idempotently, so repeated upgrades do not leave managed artifacts drifting between layouts.

Acceptance criteria

  • A legacy-install fixture with versioned managed files upgrades to the current canonical layout without leaving obsolete managed copies.
  • A fixture with unknown or user-owned files at a deprecated path preserves them and reports the unresolved content.
  • A dry run reports every planned artifact action without changing files.
  • Upgrade verifies successful migration before removing a managed source file.
  • Re-running upgrade produces no further changes.

This is distinct from #2047, which covers stale .squad/templates/skills and workflow snapshots, and builds on the versioned layout manifest proposal in #670. #1126 covers a prior skills-path migration, but not lifecycle tracking and safe retirement of artifacts from older layouts.

Ngôn ngữ chính
TypeScript
Star
3.4k
Fork
516
Merge trung bình
1 ngày 15 giờ
Pull request đã merge (30 ngày)
116

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của github/squad

Tất cả issue của github/squad

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.