improve-codebase-architecture

Analyze repository docs and caller paths to identify testable seams.

5|Updated May 21, 2026
One-click install
npx skills add https://github.com/TrebuchetDynamics/pi-package-goal --skill improve-codebase-architecture-trebuchetdynamics
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: improve-codebase-architecture
Source: https://github.com/TrebuchetDynamics/pi-package-goal/tree/main/skills/improve-codebase-architecture
Command: npx skills add https://github.com/TrebuchetDynamics/pi-package-goal --skill improve-codebase-architecture-trebuchetdynamics

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you identify architectural friction in a codebase and turn vague refactoring ideas into evidence-backed opportunities for deeper seams, better testability, and higher-leverage modules.

Core Features & Use Cases

  • Evidence-backed architecture deepening: builds candidates from repo study, caller paths, validation/test evidence, and the deletion test to distinguish shallow pass-throughs from valuable seams.
  • Seam- and test-surface-first guidance: focuses on designing the right interface so tests and callers cross the same seam.
  • Dependency-shape classification: classifies deepening strategy as in-process, local-substitutable, ports & adapters, or mock to ensure adapters match reality.
  • Architecture review report generation: produces an HTML report with before/after diagrams using the repo’s domain vocabulary and durable ADR constraints.

Quick Start

Generate an evidence-backed architecture deepening review for the current repository and ask which candidate you should explore 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 and improve codebase architecture for better testability?

Improving codebase architecture involves analyzing repository docs, caller paths, and validation evidence to distinguish shallow pass-throughs from valuable seams. This process identifies testable boundaries and classifies dependency shapes to ensure adapters match reality.

What is the deletion test for refactoring and how does it guide interface design?

The deletion test is a confidence rubric applied during architecture review to verify module value. It guides interface design by ensuring tests and callers cross the same seam, preventing premature interface proposals and focusing on high-leverage deepening.

How do I generate an architecture review report with before and after diagrams for refactoring?

Generating an architecture review report requires producing a verifiable HTML document with before and after diagrams. This report uses the repository's domain vocabulary and durable ADR constraints to visualize evidence-backed deepening opportunities.

Can I use this architecture review approach for ports and adapters refactoring?

Yes, this architecture review approach supports ports and adapters refactoring by classifying deepening strategies as in-process, local-substitutable, ports and adapters, or mock. This classification ensures your dependency shape matches reality during interface design.

When should I not use evidence-based architecture deepening for refactoring?

Evidence-based architecture deepening is not appropriate when you need to propose interfaces prematurely or lack sufficient validation evidence. This approach requires analyzing existing repository docs and caller paths, making it unsuitable for greenfield projects without modular codebases.