refactor-deepen

Detect shallow modules with complex interfaces and propose consolidation candidates.

4|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/leocosta/octopus --skill refactor-deepen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor-deepen
Source: https://github.com/leocosta/octopus/tree/main/skills/refactor-deepen
Command: npx skills add https://github.com/leocosta/octopus --skill refactor-deepen

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Find shallow modules where interfaces are as complex as their implementations and surface consolidation opportunities to deepen architecture and improve navigability.

Core Features & Use Cases

  • Detects shallow modules and surface consolidation opportunities to improve locality and depth.
  • Presents a numbered candidate list (file/problem/solution/benefits) and then grills the chosen one via doc-align.
  • Supports governance through ADRs and evidence-based decision making for safe refactors.

Quick Start

Scan the target area for shallow modules and generate a ranked list of consolidation candidates.

Frequently Asked Questions about refactor-deepen

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

FAQPage Schema
What are shallow modules in software architecture and why are they a problem?

Detect shallow modules by scanning target areas to find components where interface complexity matches or exceeds implementation complexity. Generate a ranked consolidation candidate list detailing the file, problem, solution, and benefits to strengthen locality and depth.

How do I identify refactor opportunities to deepen shallow modules?

Detect shallow modules by scanning target areas to find components where interface complexity matches or exceeds implementation complexity. Generate a ranked consolidation candidate list detailing the file, problem, solution, and benefits to strengthen locality and depth.

How do I evaluate consolidation candidates for a modular codebase refactor?

Evaluate consolidation candidates by grilling the chosen module via doc-align to enforce a fixed vocabulary. Generate evidence-based decisions and record outcomes through ADRs to ensure safe refactors across modular codebases.

Does code analysis for architecture refactoring require ADRs and a fixed vocabulary?

Yes, architecture refactoring requires ADRs for governance and a fixed vocabulary for consistency. The grilling loop via doc-align uses these constraints to evaluate and rank consolidation candidates for evidence-based decision making.

When should I not use module consolidation to improve codebase navigability?

Avoid module consolidation when strengthening locality and depth is not desirable, or when evidence-based evaluation via doc-align and ADRs cannot validate the refactor. Consolidation targets are limited to modular codebases where shallow modules surface clear benefits.