Skip to content
aposd-reviewing-module-design logo

Skill: aposd-reviewing-module-design

aposd-reviewing-module-design

Assesses existing module and interface design for complexity symptoms: information leakage, shallow interfaces, pass-through layers, and unknown unknowns. Produces a structured assessment — not transformations.

ryanthedev/code-foundations0installs376stars

SKILL.md

Full skill instructions

Skill: aposd-reviewing-module-design

STOP - Systematic Review Required

Run the checklist. The checklist exists because intuition misses structural problems.

Unknown unknowns are highest severity. If it's unclear what code/​info is needed for changes, flag immediately.


Evaluation Checklist

Use this systematic checklist when reviewing code:

1. Complexity Symptoms (Ch2)

SymptomQuestionIf Yes
Change AmplificationDoes a simple change require modifications in many places?Flag dependency problem
Cognitive LoadMust developer know too much to work here?Flag obscurity or leaky abstraction
Unknown UnknownsIs it unclear what code/​info is needed for changes?Highest severity - flag immediately

2. Module Depth (Ch4)

CheckDeep (Good)Shallow (Bad)
Interface vs implementationInterface much simplerInterface rivals implementation
Method countFew, powerful methodsMany, limited methods
Hidden informationHighLow
Common caseSimple to useComplex to use

Red flag: If understanding the interface isn't much simpler than understanding the implementation, the module is shallow.

3. Information Hiding (Ch5)

Red FlagDetectionSeverity
Information LeakageSame knowledge in multiple modulesHigh
Temporal DecompositionStructure mirrors execution order rather than knowledgeMedium
Back-Door LeakageShared knowledge not visible in interfaces but both depend on itHigh
OverexposureCommon use forces learning rare featuresMedium
Silent FailureModule swallows errors, returns defaults, or hides failure states from callersHigh

4. Layer Abstraction (Ch7)

Red FlagDetectionSeverity
Pass-Through MethodMethod only passes arguments to another with same APIHigh
Adjacent Similar AbstractionsFollowing operation through layers, abstractions don't changeHigh
Shallow DecoratorLarge boilerplate, small functionality gainMedium

Test: Follow a single operation through layers. Does the abstraction change with each method call? If not, there's a layer problem.

5. Together/​Apart (Ch9)

Red FlagDetectionSeverity
Conjoined MethodsCan't understand one method without another's implementationHigh
Special-General MixtureGeneral mechanism contains use-case specific codeHigh
Code RepetitionSame code appears in multiple placesMedium
Shallow SplitMethod split resulted in interface ≈ implementationMedium

Together/​Apart Decision Procedure

When evaluating whether code should be combined or separated:

1. Do pieces share information?
   YES → Should probably be together

2. Would combining simplify the interface?
   YES → Should probably be together

3. Is there repeated code?
   YES → Extract shared method (if long snippet, simple signature)

4. Does module mix general-purpose with special-purpose?
   YES → Should be separated

Key principle: Depth > Length. Never sacrifice depth for length.


Depth vs Length Rule

SituationCorrect Action
Long method with clean abstractionKeep together
Short method requiring another's impl to understandCombine them
Method split creating conjoined pairUndo the split
Long method with extractable subtaskExtract subtask only

Test for valid split: Can the pieces be understood independently AND reused separately?


Evaluation Output Format

When reporting findings, use:

## Design Review: [Component Name]

### Critical Issues (Must Address)
- [Red flag]: [Specific location] - [Why it's a problem]

### Moderate Issues (Should Address)
- [Red flag]: [Specific location] - [Why it's a problem]

### Observations (Consider)
- [Pattern noticed] - [Potential concern]

### Positive Patterns
- [What's working well]

Before Flagging a Problem

Before reporting any red flag, validate:

  1. Steel-man check: What's the best argument this design choice is intentional?
  2. Intentional shallowness: Is this an adapter, facade, or decorator where thinness is the point?
  3. Testing seam: Is this "leakage" actually a legitimate dependency injection point?
  4. Abstraction quality: Can callers use this interface correctly without knowing implementation details?

Cross-Module Analysis

Ask before concluding:

  • Are there related modules that should be reviewed together? Classitis often hides across file boundaries.
  • Would combining these modules simplify the overall interface? If yes, flag as potential shallow split.
  • Must callers use these modules in sequence? If yes, possible temporal decomposition.

Pattern Consistency Check

QuestionIf Yes
Is there an existing pattern for this type of problem?Compare approaches
Does this introduce a second way to do the same thing?Flag unless justified
Would a maintainer be surprised by the difference?Requires explicit documentation

Balance: Evaluate patterns on merit, but don't create gratuitous inconsistency. The goal is maintainability, not conformance.


When Principles Conflict

ConflictResolution
Depth vs CohesionPrefer cohesion. A focused shallow module beats a bloated deep one.
Information Hiding vs TestabilityTesting seams (injectable dependencies) are acceptable "leakage"
Simple Interface vs ConfigurabilityReal systems need configuration; penalize only unnecessary complexity

Detailed per-dimension checklists: Read(${CLAUDE_SKILL_DIR}/​checklists.md)


Chain

AfterNext
Issues found, transformation neededRead(${CLAUDE_PLUGIN_ROOT}/​skills/​aposd-simplifying-complexity/​SKILL.md) (transformation vs assessment)
Issues found, plan neededFlag for /​code-foundations:plan
No issuesDone

More skills from ryanthedev

cc-defensive-programming logo
ryanthedev/code-foundations

cc-defensive-programming

Applies Code Complete's defensive programming rules: barricade design, assertion vs error-handling selection, input validation policy, and correctness-vs-robustness strategy for the current context.

376 0
View
cc-pseudocode-programming logo
ryanthedev/code-foundations

cc-pseudocode-programming

Structures routine design through pseudocode-first iteration: clarifies naming and purpose before any code, catches design flaws cheaply, and prevents compile-debug loops on poorly understood routines.

376 0
View
aposd-simplifying-complexity logo
ryanthedev/code-foundations

aposd-simplifying-complexity

Transforms complex code by applying APOSD's pull-complexity-downward principle: resolves error hierarchies, collapses configuration, and moves caller-side logic into modules. Produces edited code, not just assessment.

376 0
View
cc-refactoring-guidance logo
ryanthedev/code-foundations

cc-refactoring-guidance

Guides safe refactoring using Code Complete's fix-first-then-refactor discipline: decides between refactor, rewrite, and fix-first; enforces separate commits; applies small-change rigor to high-error-rate one-liners.

376 0
View
aposd-designing-deep-modules logo
ryanthedev/code-foundations

aposd-designing-deep-modules

Guides module and API design using APOSD principles: generates multiple design alternatives, compares them on information hiding and interface depth, and produces a documented design decision.

376 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View