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.
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.
For creating new module/API design; not for assessing existing designs (use aposd-reviewing-module-design) or routine-level design (use cc-routine-and-class-design).
Stronger alternatives
This repository is archived — consider an actively maintained alternative.
Files included with this skill beyond the listing page.
skill mdSKILL.md4,839 B
docsSUMMARY.md394 B
History
First seen on skills.sh
First recorded snapshot · 5 installs
SKILL.md
Skill: aposd-designing-deep-modules
Before Implementing — the design-it-twice gate
Never implement your first design. Generate 2-3 radically different approaches, compare them, then implement.
Design-It-Twice Workflow
BEFORE implementing any module:
1. DEFINE - What are you designing? (class, API, service)
2. GENERATE - 2-3 RADICALLY different approaches
3. SKETCH - Rough outline each (important methods only, no implementation)
4. COMPARE - List pros/cons, especially ease of use for callers
5. EVALUATE - Is there a clear winner or hybrid?
6. VERIFY - Does chosen design pass depth evaluation?
7. IMPLEMENT - Only then write the code
If none attractive: Use identified problems to drive a new iteration of step 2.
Depth Evaluation
Metric
Deep (Good)
Shallow (Bad)
Interface size
Few methods
Many methods
Method reusability
Multiple use cases
Single use case
Hidden information
High
Low
Caller cognitive load
Low
High
Common case
Simple
Complex
Exemplar: Unix file I/O - 5 methods hide hundreds of thousands of lines of implementation.
Three Questions Framework
Ask these when designing interfaces:
Question
Purpose
Red Flag Answer
"What is the simplest interface that covers all current needs?"
Minimize method count
"I need many methods"
"In how many situations will this method be used?"