improve-codebase-architecture

Solid

Deep module refactoring using APOSD vocabulary: eliminates shallow modules, reduces information leakage, resolves temporal coupling, and aligns naming with the ubiquitous language. Use when asked to "improve the architecture", "refactor this module", "apply APOSD", or "clean up the design". Works best after domain-model is established. Ported from https://github.com/mattpocock/skills (Matt Pocock).

AI & Automation 1 stars 0 forks Updated 3 days ago MIT

Install

View on GitHub

Quality Score: 80/100

Stars 20%
10
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

Improve this codebase's architecture using principles from *A Philosophy of Software Design* (APOSD) by John Ousterhout. The APOSD module-shape vocabulary this skill names problems with — shallow module, interface, depth, seam, adapter, leverage, locality — is defined in the `codebase-design` skill. Load it when you need the precise definitions or the deepening/design-it-twice procedures. ## Prerequisites 1. Check for `CONTEXT.md` or `UBIQUITOUS_LANGUAGE.md` — load if present. These define the canonical vocabulary for all naming decisions. 2. If neither exists: "Domain model not established. Naming recommendations may not align with ubiquitous language. Run `domain-model` first for best results." ## Scoping Phase Decide *where* to look before you look — deepening a module only pays off where change is frequent, so scope before scanning. 1. If the user named a module, subsystem, or pain point, take it and skip step 2. 2. Otherwise walk back the commit history (`git log --oneline -- <path>`, or repo-wide) and rank paths by change frequency. The hot spots are the candidates; let them pull your attention first. If changes are scattered with no clear hot spot, widen the net. ## Analysis Phase Find the worst offenders first, within the scope set above. Use `references/DEEPENING.md` as a checklist. 1. **Shallow modules** — interfaces that expose more complexity than they abstract. Red flag: method count approaches implementation line count. 2. **Information ...

Details

Author
michaelalber
Repository
michaelalber/ai-toolkit
Created
5 months ago
Last Updated
3 days ago
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category