跳到正文
cccskills
免费在 GitHub 公开

refactor-break-compat

Use when modernizing APIs, removing compat shims, killing feature flags, or rewriting a subsystem cleanly. Not for additive refactors that must preserve the old path.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(2)

  • SKILL.md4.7 KB
  • agents/openai.yaml181 B

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Breaking refactors

Contract

FieldBound contract
TriggerModernizing APIs, removing compat shims, killing feature flags, rewriting a subsystem cleanly.
AuthorityHuman-gated: requires explicit human invocation, previewing target and consequence before any irreversible deletion; otherwise reversible local: writes only VCS-tracked refactor targets; rollback is version control. No remote mutation.
Side effectDeletes compat/adapter/flag code and rewrites every caller and test wholesale; local-delete-unrecoverable.
DoneZero-residue grep, all callers on new contract, tests green on new behavior (exit 0).

Refusals

  • Additive refactors that keep the old path: rejected. This skill demolishes the old path. Use a regular refactor if the old path must survive.
  • Shipping the intermediate state (half old, half new): rejected. Finish or revert to the version-control baseline.
  • Widening scope beyond the demolition manifest: rejected. Do not widen scope to resolve a finding.

Inputs

  • Old API surface (required): the compat shims, legacy adapters, feature flags, version gates, and backward-compatible interfaces to demolish.
  • New API surface (required): the target contract every caller must adopt.
  • Scope (optional): file or module boundaries; when omitted, the blast-radius map determines scope.

Procedure

  1. Map the blast radius. Enumerate every file, module, and caller of the old shape using ast-grep or rg. This is the demolition manifest. Done when: the demolition manifest is complete.
  2. Preview and confirm the demolition. Present the demolition manifest and the consequences to the user: every file and caller that will be deleted or rewritten, which tests will change, and which flags or config will be removed. Wait for explicit human confirmation. Do not proceed without it. Done when: the user confirms the demolition.
  3. Delete the old path. Remove compat layers, adapters, legacy branches, and flags used only by the old path. Do not delete a flag that also controls the replacement or another live path. No commenting out. Delete. Done when: the old path is deleted from every file in the manifest.
  4. Rewrite every caller to the new contract. Migrate all references from step 1. After each batch, run the strongest static enumerator the project has (compiler or typechecker, including opt-in: mypy, pyright, tsc --checkJs, Sorbet). Never sufficient alone: no static pass sees reflective, dynamically dispatched, string-constructed, or generated references, nor code excluded from the build. Enumerate those by hand and name them in the report. Done when: every caller in the manifest is on the new contract and the static enumerator passes.
  5. Rewrite tests to the new truth. Update assertions to the new behavior. Delete tests whose entire purpose was the old behavior. Add tests for the new contract where coverage is now thin. Done when: tests assert the new behavior and the old-behavior tests are deleted.
  6. Exterminate ghosts. Grep for string references, config keys, env vars, doc links, error messages, and import paths naming the old API. Zero survivors. Done when: the grep returns nothing.
  7. Strip dead weight. Remove imports, packages, dependencies, types, and dead files that only the old path needed. Done when: no dead weight from the old path remains.
  8. Verify zero residue. A search for every old symbol, flag, and format name returns nothing. If it returns anything, return to step 4. Done when: the zero-residue search returns nothing.

Failure and recovery

  • Residue remains: old references survive in code, tests, docs, or config after step 8. Report the survivors and stop with exit 1 (residue). Do not widen scope beyond the demolition manifest.
  • Build or tests broken: migration incomplete, callers or assertions not yet on the new shape. Fix forward if within scope; if scope is exhausted, report the exact blockers and stop.
  • Migration stalled: codebase is half old, half new. Finish or revert to version-control baseline; never ship the intermediate state.

Partial results are never reported as success. If any failure class triggers, the done predicate does not hold.

Output

A migration report with blast-radius manifest, deleted artifacts list, caller-migration checklist, test-rewrite summary, zero-residue verification result, and final exit code (0 = clean demolition, 1 = residue, 2 = broken build, 3 = stalled migration), ordered as listed.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Use when explaining System V AMD64, ARM AAPCS, RISC-V psABI, stack frames, variadic calls, or FFI register rules. Not for the Rust FFI binding layer: use rust-ffi.

中文简介正在准备中。当前显示原文说明。

OutlineDriven/odin-claude-plugin372026年9月29日 更新

Use when configuring ADC sampling time, DMA-driven ADC, calibration, or DAC channel setup on bare-metal MCUs. Not for the DMA stream itself: use dma-baremetal.

中文简介正在准备中。当前显示原文说明。

OutlineDriven/odin-claude-plugin372026年9月29日 更新

af-xdp

免费

Use when creating AF_XDP sockets, configuring UMEM and XSK rings, writing an XDP redirect program, or choosing copy versus zero-copy mode. Not for full kernel bypass: use dpdk.

中文简介正在准备中。当前显示原文说明。

OutlineDriven/odin-claude-plugin372026年9月29日 更新

Use when a completed session needs an agent-environment retrospective. Not for an engineering retrospective from telemetry: use engineering-retrospective.

中文简介正在准备中。当前显示原文说明。

OutlineDriven/odin-claude-plugin372026年9月29日 更新

Use when a redacted, trimmed agent transcript must be appended to a GitHub PR or issue body, with human approval and preview. Not for automated or model-initiated insertion.

中文简介正在准备中。当前显示原文说明。

OutlineDriven/odin-claude-plugin372026年9月29日 更新

agents-md

免费

Use when a repo needs agent setup, AGENTS.md added or made lean, CLAUDE.md audited, or agent instructions scored or pruned. Not for remote, credential, publish, deploy, or irreversible changes.

中文简介正在准备中。当前显示原文说明。

OutlineDriven/odin-claude-plugin372026年9月29日 更新

查看 OutlineDriven 的全部技能

报告此技能的问题