AGENT SKILL

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

Migrate callers, then delete legacy APIs. Apply when a change introduces a new internal API while callers of the old one still exist.

License 许可
MIT
最近更新
2026-11-15
Stars
★ 2
Forks
0

01 前言 Front Matter

name
principle-migrate-callers-then-delete-legacy-apis
license
MIT
metadata
{ "source": "pstack principle-migrate-callers-then-delete-legacy-apis, MIT, Copyright (c) 2026 Lauren Tan, github.com/cursor/plugins, adapted; checked against pstack 0.15.36 at commit 0bb6f37" }
description
Migrate callers, then delete legacy APIs. Apply when a change introduces a new internal API while callers of the old one still exist.

03 SKILL.md 正文

<!-- Generated by scripts/build.mjs from the sources; edit the source, then run npm run build. -->

Migrate callers, then delete legacy APIs

When a new internal API is the right design, migrate its callers and remove the old one in the same change, instead of keeping a compatibility layer.

The rule.

  • Do not keep an old path only because internal callers still use it.
  • List the callers, migrate them, and delete the old API now.
  • Treat a temporary adapter as exceptional and short-lived, not as architecture.
  • Update tests to assert the new contract; delete tests that only protected the old implementation.

Why. Keeping both paths doubles the ways through the code, slows cleanup, and makes the code feel append-only.

Where it applies. Internal code that your change replaced, within this task. The change is part of a simplification or a refactor, and the project can take a coordinated breaking change. An external caller, or a public interface others depend on, is not yours to break: report it and leave it working. A repair stays within its task; a legacy path outside it is reported, not removed.

Stop when the old API has no callers left and is gone.

04 同仓库更多 Skills

erickb336
erickb336/sage-stack

writing-standard

Write at 80% of Simplified Technical English. Apply to any text an agent writes for a person: messages, reports, specs, findings, reviews, plans.

★ 2
erickb336
erickb336/sage-stack

sage

The state tool of sage mode: records tasks, routes, agent runs, findings, verdicts by head SHA and the user's gates in ~/.claude/sage/<project>/. Use in sage mode for every change of a task's state, and before any merge. Claude Code only.

★ 2
erickb336
erickb336/sage-stack

sage-help

Help with sage: how to set it up, switch sage mode and autopilot, read the board, answer the chief's questions, pick a skill or a principle, fix a run that went wrong, and find where sage keeps its files. The user types /sage:sage-help (or /sage-help) with a question. Load it only when the user types it; do not load it on your own. Claude Code only.

★ 2
erickb336
erickb336/sage-stack

report

The report that every sage agent ends with: STATUS, RESULT, EVIDENCE, FINDINGS, QUESTIONS, NOT VERIFIED, BRANCH. Use at the end of any task that the sage chief of staff gave you. Claude Code only.

★ 2
erickb336
erickb336/sage-stack

remote-control

Set up Remote Control, so that the user can follow, steer and start Claude Code sessions from the Claude app on a phone. It turns Remote Control on for every new session, and it can run a server in a folder (such as ~/workspace) that starts at each login. Use when the user asks to reach sessions or start new ones from a phone, or to set up, check or undo Remote Control. Claude Code only.

★ 2
erickb336
erickb336/sage-stack

readme-guide

Write a project README. Apply when you write, change or review a README of any project, in any language.

★ 2