make-refactor-target-compliant · git:20261114.4ec274c · 2026-11-14 · sha256 e08aa6c3006a39b0

make-refactor-target-compliant git:20261114.4ec274cA

Immutable. This exact content never changes and is served at /api/v1/blob/e08aa6c3006a39b0.

No tool to install first
claude plugin marketplace add https://markdownregistry.com/mp/a/art_w2vl67pj7piy37x4/e08aa6c3006a39b030f1d8e8ce153212011535ac3167723eae3ad55d950e767c.json

Then /plugin install make-refactor-target-compliant@markdownregistry-w2vl67pj7piy37x4 in Claude Code. It installs this exact version, the one graded A here, pinned to the commit it was graded at, and leaves it there.

---
name: make-refactor-target-compliant
description: Use BEFORE renaming a symbol/attribute (Python or TypeScript) to make its blast radius verifiable — type the code that might reference it (untyped params/vars that could hold the class, classes with matching attribute names, overrides not marked as such) so the post-rename type-check gate is sound.
---

**Preflight:** run `la-doctor --plugin <this skill's base directory>` once per session before using any `la-*` or `dr-*` command; if it fails, stop and show the user its output.

# Make a refactor's blast radius compliant

A rename is only provable over code the type checker can resolve. This closes
the blind spots first, so the `la:deterministic-refactor` gate afterwards is sound.
The idioms for each language are in
`<this skill's base directory>/../../languages/<language>.md`.

## Steps

1. **Identify the target:** the symbol, and for a member rename the attribute
   NAME and its owning class.
2. **Enumerate blind spots:**
   - `dr-compliance --select attr-blindspot --attr NAME <repo>` → `x.NAME`,
     `getattr(x, "NAME")` and the like where `x` is untyped. Each names the
     receiver to type.
   - A `dr-refactor` dry-run of the rename lists the stand-ins: classes outside
     the hierarchy that declare NAME. Make a real implementation a subclass or
     a `Protocol` implementation now, or classify it at the rename (`--with` /
     `--without`, see `la:deterministic-refactor`).
3. **Make them resolvable (do NOT rename yet):**
   - Type the flagged parameters/variables with the owning class (or its
     interface/protocol); type the class's own attributes.
   - Mark the overrides in the hierarchy.
   - Type any test doubles of the class (`dr-mock-lint`).
4. **Re-check until the blast radius is typed:**
   - `dr-compliance --select attr-blindspot --attr NAME <repo>` reports nothing;
   - `la-typecheck` shows no new errors over the touched files.
5. **Then run `la:deterministic-refactor`.** Every real reference is now
   type-visible; what is left is a string the rename lists as a `leftover`
   or the language doc names.

The guarantee still comes from the type checker after the rename; this
skill's job is to shrink the checker's untyped surface over the blast radius
to zero.