improve-codebase-architecture

Detect shallow modules, seam placement issues, and locality failures in codebases.

4|Updated Mar 2, 2026
One-click install
npx skills add https://github.com/shushuzn/Rairos --skill improve-codebase-architecture-shushuzn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: improve-codebase-architecture
Source: https://github.com/shushuzn/Rairos/tree/main/skills/improve-codebase-architecture
Command: npx skills add https://github.com/shushuzn/Rairos --skill improve-codebase-architecture-shushuzn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It helps you identify where a codebase has shallow modules, seam leaks, or locality failures so architectural understanding and verification concentrate instead of spreading across callers.

Core Features & Use Cases

  • Deepening opportunity discovery: surfaces candidate refactors where consolidation would improve depth and leverage at the interface.
  • Dependency-aware seam classification: categorizes dependencies (in-process, local-substitutable, remote-but-owned, true-external) to guide safe deepening and testing strategy.
  • Interface-first exploration: drives refactoring thinking using the skill’s glossary (Module, Interface, Seam, Adapter, Depth, Leverage, Locality) so suggestions remain AI-navigable and testable.

Quick Start

Use the improve-codebase-architecture skill to analyze a specific area of Rairos, present deepening candidates, and let you choose which one to drill into next.

Frequently Asked Questions about improve-codebase-architecture

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

FAQPage Schema
How do I identify shallow modules in a Rust monorepo for refactoring?

Identify shallow modules in a Rust monorepo by detecting interface structures that lack depth, analyzing codebase architecture to surface deepening opportunities where consolidation improves leverage and testability at the interface.

What is a seam placement issue in codebase architecture?

A seam placement issue in codebase architecture occurs when dependency boundaries leak locality, spreading verification across callers. Dependency-aware seam classification categorizes in-process, local-substitutable, remote-but-owned, and true-external dependencies to guide safe refactoring.

How do I plan refactoring using ports and adapters to improve module depth?

Plan refactoring using ports and adapters by driving interface-first exploration with defined modules, seams, and adapters. This produces dependency-aware deepening candidates that consolidate shallow modules into deep, testable ones.

Can I use this approach to fix MCP tool runtime contention and monolithic crate boundaries?

Yes, this approach fixes MCP tool runtime contention and monolithic crate boundaries by analyzing specific codebase areas to present deepening candidates, letting you choose which architectural boundary to drill into and refactor next.

When should I not use interface-first deepening for refactoring planning?

Avoid interface-first deepening when architectural understanding already concentrates effectively across callers. If modules possess sufficient depth and no locality failures or seam leaks exist, deepening candidates will not yield meaningful leverage improvements.

What's the best way to structure CLI handlers to avoid shallow module architecture?

Structure CLI handlers by detecting shallow module patterns and applying dependency-aware seam classification. Consolidate handler logic into deep modules using interface-first exploration to ensure testing requirements remain navigable and verifiable.