shim-discipline

Create backward-compatibility shims for relocated Python modules.

Updated Oct 9, 2025
One-click install
npx skills add https://github.com/Siamese001/Agentic-Workflow --skill shim-discipline
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shim-discipline
Source: https://github.com/Siamese001/Agentic-Workflow/tree/main/.windsurf/skills/shim-discipline
Command: npx skills add https://github.com/Siamese001/Agentic-Workflow --skill shim-discipline

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents breaking changes and undocumented shims when Python modules are moved or renamed, ensuring backward compatibility and maintainable code.

Core Features & Use Cases

  • Automated Shim Creation: Guides the creation of backward-compatibility shims when canonical module locations change.
  • Contract Enforcement: Ensures all shims adhere to a strict template, including deprecation notices and expiry dates.
  • Use Case: Before moving a core utility module, run this Skill to ensure a proper shim is created at the old location, preventing downstream applications from breaking unexpectedly.

Quick Start

Use the shim-discipline skill to create a shim for the module relocation.

Frequently Asked Questions about shim-discipline

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I maintain backward compatibility when renaming a Python module?

To maintain backward compatibility when renaming a Python module, you create a shim at the old import path. This ensures downstream applications continue functioning without breaking unexpectedly during code evolution.

What is a shim in Python module management?

A shim in Python module management is a backward-compatibility stub placed at an old import path. It redirects imports to the new canonical module location, preventing breaking changes when code is relocated or renamed.

How do I enforce a strict template for backward compatibility stubs?

You enforce a strict template for backward compatibility stubs by applying consistent shim discipline. This ensures all stubs include required documentation like deprecation notices and expiry dates for auditable code maintenance.

When do I need to create a shim during Python code refactoring?

You need to create a shim during Python code refactoring when relocating or renaming canonical modules. This prevents undocumented changes and maintains consumer compatibility by stabilizing the module import path.

Does this approach to module relocation work for any Python project?

This approach to module relocation works for Python projects needing import path stability and auditable code evolution. It manages the creation and documentation of shims to enforce backward compatibility.

What is the best way to prevent undocumented shims when moving code?

The best way to prevent undocumented shims when moving code is to enforce shim discipline. This manages shim creation and updates using a strict template, ensuring all backward-compatibility stubs are properly documented.