agentleFS
dvy1987dvy1987/agent-loom/.agents/skills/api-deprecation-and-migration/SKILL.md

api-deprecation-and-migration

Skill4 starsChanged 3 months agoMITView on GitHub

Deprecate APIs, features, or systems safely — announce, migrate consumers, sunset on a timeline, and document alternatives. Load when removing an old API, migrating users between implementations, sunsetting a feature, or the user asks about deprecation policy, migration guides, or breaking changes. Not for deleting dead code with zero consumers (use code-simplification). Distinct from meta `deprecate-skill` (skill library retirement).

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    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:

    After deadline: return structured errors on old surface.

    line 51
  2. Distinctive:

    Delete code; update changelog.

    line 55
  3. Distinctive:

    No changes — citation audit passed.

    line 141

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

API Deprecation and Migration

Code is a liability. Deprecation removes systems that no longer earn their keep; migration moves consumers safely to replacements.

Hard Rules

  • Replacement before removal — working alternative with docs and migration path.
  • Default advisory — warnings and timelines; compulsory only for security or unsustainable cost.
  • Quantify consumers — usage metrics, client lists, or repo search before dates.
  • Hyrum's Law — undocumented behavior will be depended on; plan for stragglers.
  • Telemetry on migration — track who still calls deprecated surfaces.

Workflow

Step 1 — Deprecation decision

Answer: unique value remaining? consumer count? replacement ready? migration cost vs maintenance cost?

Step 2 — Announce

Publish notice: what, why, timeline, replacement, migration guide link, contact.

Step 3 — Migrate

Provide codemods, dual-write/read periods, feature flags, or versioned endpoints as appropriate.

Step 4 — Sunset

After deadline: return structured errors on old surface; keep read-only tombstone period if needed.

Step 5 — Remove and document

Delete code; update changelog; postmortem on straggler pain for next time.


Advisory vs compulsory

TypeWhenMechanism
AdvisoryStable old path, low riskDocs + warnings + metrics
CompulsorySecurity, blocking progressHard deadline + tooling + support

When NOT to use

  • Internal dead code with zero callers (delete with tests)
  • Retiring a skill from agent-loom library (deprecate-skill instead)

Gotchas

  • Announcing without migration guide guarantees support churn.
  • Breaking changes in patch versions destroy trust.
  • Dual-write without reconciliation causes data drift.
  • "We'll remove it someday" with no metric never happens.

Common Rationalizations

ExcuseReality
"Nobody uses the old API"Check logs — Hyrum's Law says otherwise.
"Just delete it"Forced migrations without notice become incidents.
"We'll support both forever"Two systems = double security and cognitive cost.
"Migration guide is enough"Tooling and deadlines drive completion.
"Breaking change in minor is fine"Semver exists so clients can plan.

Output Format

## Deprecation plan — [surface]

Consumers: [count/evidence]
Replacement: [link]
Type: [advisory/compulsory]
Timeline: [dates]
Migration: [steps/tooling]
Removal criteria: [metric or date]

Examples

<examples> <example> <input>"Remove REST v1 `/users` in favor of v2."</input> <output>90-day advisory → `Sunset` header → v1 returns 410 with link; codemod for internal clients; dashboard on v1 traffic.</output> </example> </examples>

Verification

  • Replacement documented and production-proven
  • Consumer impact quantified
  • Timeline and notice published
  • Migration tooling or guide available
  • Telemetry proves traffic at zero before code removal

Red Flags

  • Sunset announced without working replacement and docs
  • Breaking change shipped in patch or minor version
  • Dual-write path has no reconciliation or drift checks
  • Deprecation timeline set without consumer usage evidence

Prune Log

Last pruned: 2026-07-04

  • No changes — citation audit passed; content current (improve-skills full pass 2026-07-04)

Impact Report

Surface: [name] | Consumers: [N]
Type: [advisory/compulsory] | Sunset: [date]
Migration: [ready/partial]

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.