migrar-modulo

Execute safe Laravel modular code moves and renames for Modules/<X>.

Updated May 14, 2024
One-click install
npx skills add https://github.com/wagnerra23/oimpresso.com --skill migrar-modulo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migrar-modulo
Source: https://github.com/wagnerra23/oimpresso.com/tree/main/.claude/skills/migrar-modulo
Command: npx skills add https://github.com/wagnerra23/oimpresso.com --skill migrar-modulo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents broken module migrations in the oimpresso.com Laravel modular architecture by guiding safe moves and renames while avoiding accidental changes to URLs, permissions, pages, and database-backed identifiers.

Core Features & Use Cases

  • Controlled move/rename operations: Use it to execute git mv for module folders or individual controllers (including controller moves inside Modules/<X>/Http/Controllers).
  • Guided drift resolution: Apply the Pattern A approach when SCOPE.md flags drift between origin and destination modules.
  • PHP-only module rename: Apply the Pattern B approach to rename Modules/<X> → Modules/<Y> while keeping the facade stable (URLs/permissions/pages) to reduce blast radius.
  • Hard-earned guardrails: Includes checks and “gotchas” like nWidart cache files, InstallController hardcoded module identifiers, modules_statuses.json updates, and DB system version backfill.

Quick Start

Ask an AI: "Plan and perform the migration to rename Modules/Copiloto to Modules/Jana using PHP-only changes, applying the correct drift/rename pattern, updating composer autoload, caches, InstallController hardcodes, modules_statuses.json, and validating with bin/check-scope.php."

Frequently Asked Questions about migrar-modulo

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

FAQPage Schema
How do I safely rename a Laravel module folder without breaking existing URLs and permissions?

To safely rename a Laravel module folder, use a PHP-only rename approach that keeps system-facing facades stable. This method updates PSR-4 composer autoloads and nWidart caches while preserving URLs and permissions to reduce blast radius.

What is module drift resolution in Laravel and when do I need to migrate controllers?

Module drift resolution in Laravel corrects misaligned code boundaries flagged by SCOPE.md. You need to migrate controllers when drift alerts indicate code exists outside its correct target module boundary, requiring a guided folder move to align the architecture.

How to migrate Laravel module controllers using git mv without causing system errors?

Migrating Laravel module controllers with git mv requires patching InstallController hardcoded identifiers and updating modules_statuses.json. You must also update PSR-4 composer mappings and clear nWidart cache files to prevent system errors.

Does renaming a nWidart module require updating the composer PSR-4 autoload?

Yes, renaming a nWidart module requires updating the composer PSR-4 autoload. You must also clear nWidart cache files, update modules_statuses.json, patch InstallController hardcodes, and optionally backfill database system table versions.

What are the limitations when moving code inside Laravel Modules?

When moving code inside Laravel Modules, limitations include hardcoded identifiers in InstallController and stale nWidart cache files. You must follow ADR 0087/0088 constraints and validate zero drift with bin/check-scope.php to avoid breaking database-backed identifiers.