mcpField
P
principle-migrate-callers-then-delete-legacy-apis

principle-migrate-callers-then-delete-legacy-apis

github.com/backnotpropDevelopment3.1k5.8k installsUpdated today
Repository

About principle-migrate-callers-then-delete-legacy-apis

This pstack principle guides refactors where backward compatibility is not required and coordinated breaking changes are acceptable. It recommends migrating callers and tests to the new contract before deleting legacy APIs and implementation-detail tests.

Key features

  1. 01Migrate callers to the new API
  2. 02Test the new contract
  3. 03Remove legacy APIs
  4. 04Delete implementation-detail tests

Use cases

  1. 01Simplify an API without external compatibility needs
  2. 02Coordinate breaking changes across a project
  3. 03Replace tests tied to pre-refactor internals

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/backnotprop/pstack --skill principle-migrate-callers-then-delete-legacy-apis

After installing, type/principle-migrate-callers-then-delete-legacy-apisin Claude Code to confirm it loaded.

Details

From the project README

Migrate Callers Then Delete Legacy APIs

  • Update tests to assert the new contract, and delete tests that only protect pre-refactor implementation details

When this applies:

  • No external users depend on backward compatibility
  • The project can absorb coordinated breaking changes
  • The new API is part of a simplification or refactor initiative

Comments

Markdown supported