improve-codebase-architecture

Analyze codebase modules for shallow interfaces and output prioritized deepening candidates.

32|5|Updated Oct 6, 2024
One-click install
npx skills add https://github.com/gilesknap/tpi-k3s-ansible --skill improve-codebase-architecture-gilesknap
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: improve-codebase-architecture
Source: https://github.com/gilesknap/tpi-k3s-ansible/tree/main/.claude/skills/improve-codebase-architecture
Command: npx skills add https://github.com/gilesknap/tpi-k3s-ansible --skill improve-codebase-architecture-gilesknap

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Surface shallow modules and surface deepening opportunities to improve architecture, refactor tightly-coupled areas, and enhance testability and AI-navigability.

Core Features & Use Cases

  • Read domain glossary (CONTEXT.md) and ADRs to identify friction points between modules.
  • Propose candidate deepening opportunities with problem, solution, and benefits, including locality and leverage considerations.
  • Present an interactive grilling loop (grill-with-docs) to refine candidates and maintain ADR alignment.

Quick Start

Use the Agent tool with subagent_type Explore to walk the codebase and surface deepening opportunities.

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 deepening opportunities to improve codebase architecture and testability?

Codebase architecture deepening opportunities are identified by analyzing modules for shallow interfaces and friction points. The tool reads domain vocabulary and ADR decisions to surface concrete candidates with problem, solution, and benefits for design review.

What is the best way to refactor tightly-coupled modules to enhance testability and AI-navigability?

Refactoring tightly-coupled modules requires surfacing shallow interfaces and proposing seams with adapters. This tool analyzes domain glossaries and architecture decisions to output a prioritized list of impacted files and rationale for improving testability and AI-navigability.

How do I use domain vocabulary and ADRs to find shallow modules in my codebase?

To find shallow modules, the tool reads CONTEXT.md for domain vocabulary and ADRs to identify friction points between modules. It then proposes deepening candidates with locality and leverage considerations to align refactoring with existing architecture decisions.

Can I refine architecture refactoring candidates interactively to maintain ADR alignment?

Yes, you can refine architecture refactoring candidates interactively. The tool features a grilling loop that uses documentation to challenge and refine proposed deepening opportunities, ensuring they maintain alignment with your ADR decisions during design review.

What does a deepening candidate output include when analyzing codebase modularity?

A deepening candidate output for codebase modularity includes the problem, solution, and benefits. It provides a prioritized list featuring specific files, impacted modules, identified seams and adapters, and rationale suitable for design review.

When should I not use automated deepening analysis for my codebase architecture?

Automated deepening analysis requires existing CONTEXT.md and ADR documentation to function effectively. You should not use it if your codebase lacks a domain glossary or architecture decision records, as the tool relies on these to identify friction points and propose refactoring candidates.