AGENT SKILL

trove-principle-migrate-then-delete

Migrate Callers Then Delete Legacy APIs — when introducing a new internal API while old callers exist, migrate every caller and delete the old API in the same refactor wave instead of leaving a compatibility layer. Use when replacing an internal API, function, or module that has no external dependents.

License 许可
MIT
所属仓库
bravew/trove
最近更新
2026-11-12
Stars
★ 10
Forks
1

01 前言 Front Matter

name
trove-principle-migrate-then-delete
metadata
{ "trove-category": "code", "trove-category-label": "Code" }
description
Migrate Callers Then Delete Legacy APIs — when introducing a new internal API while old callers exist, migrate every caller and delete the old API in the same refactor wave instead of leaving a compatibility layer. Use when replacing an internal API, function, or module that has no external dependents.
when_to_use
migrate callers; remove the legacy api; no compatibility shim
user-invocable
true

02 资源文件 1

03 SKILL.md 正文

<!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly --> <!-- Regenerate: bun run build:skills -->

Principle: Migrate Callers Then Delete Legacy APIs

For an internal API with no external consumers, migrate and delete in one wave. Don't leave a compatibility shim behind "for safety" — the shim becomes permanent.

  1. Inventory every caller of the old API.
  2. Migrate them to the new one.
  3. Delete the old API in the same change, including tests that protected its pre-refactor implementation details.

The result feels append-only: there is one way to do the thing, not two. This is the core discipline behind the workspace's in-flight migrations (Vue→React, Lambda→jobs). For external/published APIs, normal deprecation rules still apply.

04 同仓库更多 Skills