refactor-architecture

Restructure AICP packages and inter-module dependencies without changing observable behavior.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/cyberpunk042/devops-expert-local-ai --skill refactor-architecture-cyberpunk042
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor-architecture
Source: https://github.com/cyberpunk042/devops-expert-local-ai/tree/main/.claude/skills/refactor-architecture
Command: npx skills add https://github.com/cyberpunk042/devops-expert-local-ai --skill refactor-architecture-cyberpunk042

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Restructures AICP at the package and inter-module level to reduce coupling, move responsibilities between packages, split oversized modules, and fix layering violations without changing observable behavior.

Core Features & Use Cases

  • Enables high-scope architectural refactors across core packages with a formal behavior-preservation contract.
  • Supports staged migration, risk containment, and comprehensive testing to prevent regressions.
  • Helps address architecture debt identified by architecture-review or quality-audit with a clear scope and rollback plan.

Quick Start

Instruct the system to load the refactor-architecture skill and begin the 4-step workflow.

Frequently Asked Questions about refactor-architecture

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

FAQPage Schema
How do I refactor package architecture without changing observable behavior?

To restructure packages without changing behavior, enforce an explicit behavior-preservation contract and verify full test and lint pass at each step. This approach reduces coupling and fixes layering violations safely.

What is the best way to fix layering violations in a codebase?

Fixing layering violations involves moving responsibilities between packages and splitting oversized modules. This Skill stages migrations with multiple commits to contain risk and prevent regressions during the architectural restructure.

How do I migrate core packages across inter-module dependencies safely?

Safely migrating core package dependencies requires a staged migration with multiple commits. This Skill contains risk by verifying full test and lint pass at each step, ensuring architectural debt is addressed without breaking behavior.

Can I use this architecture refactor approach for major architectural debt?

Yes, this approach applies to major architectural debt in core packages. When layering issues, cross-package responsibilities, or duplication create fragility, it enforces a behavior-preservation contract and implements a clear rollback plan.

When should I not use a staged migration for codebase refactoring?

Staged migration for codebase refactoring targets major architectural debt. Avoid it for minor package adjustments or when lacking comprehensive tests, as the workflow depends on full test and lint verification at each step to prevent regressions.