agentleFS
requierequie/endostack/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md

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

Skill4 starsChanged 18 days agoMITView on GitHub

Use when a replacement internal API exists but code still calls the old one. Move all callers over and remove the old API in that same wave, without a compatibility layer, as long as no external user relies on it.

45 other projects use a version of this, 8 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use setup-pstack, poteto-help and 3 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • bnemaSkill

    setup-pstack

    Configure which Pi models pstack uses per role. Detects available provider/model specs and writes pstack's user configuration. Use for /setup-pstack, "configure pstack models", or changing pstack model choices.

    Also in 25 projects that use this

  • ianclearySkill

    poteto-help

    Guides users through pstack setup, /poteto-mode, and picking the skill, playbook, or principle for a task. Type /poteto-help with a question.

    Also in 14 projects that use this

  • tristanphvnSkill

    ketchup-video

    Catch the user up like /keel:ketchup, with a short silent video of slides for what happened and the waiting calls as text under it. Use for /keel:ketchup-video.

    Also in 11 projects that use this

  • JoshueOsunaSkill

    Poteto Mode

    poteto's agent style for concise, detailed responses, deliberate subagents, unslopped prose, simple code, and verified work. Use for poteto, /poteto-mode, or requests to work in this style.

    Also in 3 projects that use this

  • instructureSkill

    ketchup

    Rebuild context after /clear by analyzing uncommitted changes across Canvas LMS and all plugin repositories

    Also in 18 projects that use this

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 45 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If any one fails, a deprecation period may be justified.

    line 19
  2. Distinctive:

    Remove the old API in that same change set.

    line 25

“Common” is measured: kept by at least 6 in 10 of the 45 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Migrate callers, then delete legacy APIs

Replacing an internal API means moving every caller to the replacement and removing the original within one change set or wave, with no shim left over.

When it applies

A new internal API exists and callers of the old one remain. All three preconditions must hold:

  • Nothing outside the project relies on the old API staying compatible.
  • The project can take one coordinated breaking change.
  • The replacement comes out of a simplification or refactor.

If any one fails, a deprecation period may be justified. Say which precondition failed and why.

What to do

  1. Enumerate the callers with a script or codemod, per principle-build-the-lever, so the list is complete and reproducible. A text search misses dynamic dispatch and re-exports; a type-aware search or the compiler's own errors after deleting the old symbol are more reliable.
  2. Migrate every caller.
  3. Remove the old API in that same change set.
  4. Rewrite the tests so they check the new contract, and drop any test whose only job was pinning the old internals (principle-test-behavior-not-implementation).

Legacy APIs are a common home for weaker security. If the old verify_token(token) skipped audience checks and the new verify_token(token, audience) enforces them, every caller left on the old path is still exploitable. Deleting the old function is what closes the hole.

The failure it prevents

Two APIs that live forever, and shims that become permanent debt every new contributor must learn.

Done when

The old API has zero callers and has been removed.

Related: principle-outcome-oriented-execution, principle-test-behavior-not-implementation, principle-build-the-lever.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.