component-flattening-analysis

Detect orphaned root namespace files and generate component flattening plans.

Updated Mar 12, 2026
One-click install
npx skills add https://github.com/alexjcm/agent-skillset --skill component-flattening-analysis-alexjcm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: component-flattening-analysis
Source: https://github.com/alexjcm/agent-skillset/tree/main/skills/arquitecture/component-flattening-analysis
Command: npx skills add https://github.com/alexjcm/agent-skillset --skill component-flattening-analysis-alexjcm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

component flattening analysis to identify and fix component hierarchy issues by detecting orphaned root namespaces and ensuring components exist only as leaf nodes.

Core Features & Use Cases

  • Detect orphaned classes in root namespaces and classify them as domain/shared/mixed.
  • Propose flattening strategies (Consolidate Down, Split Up, Move Shared) and generate actionable refactoring plans.
  • Validate component structure to ensure leaf-node components only and provide step-by-step execution plans.

Quick Start

Analyze your codebase to identify root namespaces with code and generate a flattening plan.

Frequently Asked Questions about component-flattening-analysis

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

FAQPage Schema
How do I detect orphaned classes in root namespaces?

You can detect orphaned classes in root namespaces by analyzing your codebase structure to map nested namespaces and classify orphaned root files as domain, shared, or mixed categories. This process identifies code improperly placed in root namespaces.

What is a component flattening strategy for refactoring nested namespaces?

A component flattening strategy remediates hierarchy issues by applying approaches like Consolidate Down, Split Up, or Move Shared. These strategies generate actionable refactoring plans to ensure components exist only as leaf nodes within nested namespace structures.

How do I enforce leaf-node components in a codebase with nested namespaces?

You enforce leaf-node components by validating your component structure to ensure components exist only as leaf nodes. This requires mapping nested namespaces, detecting root namespaces containing code, and generating an actionable flattening plan.

When do I need to flatten component hierarchies in my architecture?

You need to flatten component hierarchies when your codebase with nested namespaces contains orphaned root namespace files and components that do not exist as leaf nodes. This remediates architectural violations where code improperly resides in root namespaces.

What's the best way to generate a refactoring plan for orphaned root namespace files?

The best way to generate a refactoring plan for orphaned root namespace files is to classify them as domain, shared, or mixed, then apply a flattening strategy such as Consolidate Down, Split Up, or Move Shared to produce an actionable execution plan.

Does component flattening analysis work across multiple projects with nested namespaces?

Yes, component flattening analysis works across multiple projects with nested namespaces by mapping the structure, detecting root namespaces with code, classifying orphaned files, and proposing actionable flattening plans across the analyzed projects.