MCP HubMCP Hub
SKILL·32B4AD

software-design-philosophy

wondelai
업데이트됨 15 days ago
5 조회
2,020
206
2,020
GitHub에서 보기
디자인wordapidesign

정보

이 스킬은 깊은 모듈, 정보 은닉, 전략적 프로그래밍을 강조하여 소프트웨어 복잡성을 관리하는 프레임워크를 제공합니다. 개발자가 설계를 단순화하고, 추상화를 평가하며, 얕은 클래스나 정보 누수 같은 위험 신호를 식별하는 데 도움을 줍니다. 인터페이스를 검토하거나 일반적 접근 방식과 구체적 접근 방식을 논의할 때, 또는 과도한 엔지니어링을 줄여야 할 때 사용하세요.

빠른 설치

Claude Code

추천
기본
npx skills add wondelai/skills -a claude-code
플러그인 명령대체
/plugin add https://github.com/wondelai/skills
Git 클론대체
git clone https://github.com/wondelai/skills.git ~/.claude/skills/software-design-philosophy

Claude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요

문서

A Philosophy of Software Design Framework

A practical framework for managing the fundamental challenge of software engineering: complexity. Apply these principles when designing modules, reviewing APIs, refactoring code, or advising on architecture decisions.

Core Principle

The greatest limitation in writing software is our ability to understand the systems we are creating. Complexity is the enemy: it makes systems hard to understand, hard to modify, and a source of bugs. Evaluate every design decision by asking "Does this increase or decrease the overall complexity of the system?" — the goal is not zero complexity, but minimizing unnecessary complexity and concentrating the necessary kind where it can be managed.

Scoring

Goal: 10/10. When reviewing or creating a design, score it by counting how many of the eight Quick Diagnostic rows it satisfies (≈1.25 points each), then sanity-check against the bands:

  • 9-10 — deep modules with interfaces far simpler than implementations; no information leakage (an implementation can change without touching callers); interface comments capture design intent; design improvement is routine. All eight diagnostics pass.
  • 6-8 — mostly deep, but one or two leaks, shallow classes, or undocumented abstractions. 5-6 diagnostics pass.
  • 3-5 — classitis or temporal decomposition, recurring leakage, comments that only restate code. 2-4 diagnostics pass.
  • ≤2 — tactical-tornado code: shallow modules, pervasive leakage, no design intent recorded. 0-1 diagnostics pass.

Always state the current score, the diagnostic rows that failed, and the specific change each one needs to reach 10/10.

The Software Design Framework

Six principles for managing complexity and producing systems that are easy to understand and modify:

1. Complexity and Its Causes

Core concept: Complexity is anything about a system's structure that makes it hard to understand and modify. It shows three symptoms — change amplification, cognitive load, and unknown unknowns — and has two causes: dependencies and obscurity.

Key insights:

  • Change amplification: a simple change requires edits in many places
  • Cognitive load: a developer must hold too much in mind to make a change
  • Unknown unknowns: it isn't obvious what must change or what information is relevant — the worst symptom
  • Complexity is incremental — it accumulates from hundreds of small decisions ("death by a thousand cuts"), so every decision matters

Code applications:

ContextPatternExample
Change amplificationCentralize shared knowledgeExtract color constants instead of hardcoding #ff0000 in 20 files
Cognitive loadReduce what developers must knowopen(path) instead of requiring buffer size, encoding, lock mode
Unknown unknownsMake dependencies explicitType systems and interfaces surface what a change affects
ObscurityName things preciselynumBytesReceived not n; retryDelayMs not delay

See references/complexity-symptoms.md when you need to name which symptom a codebase has before fixing it — per-symptom recognition tests, the dependency taxonomy (syntactic/semantic/temporal/hidden), the C = Σ(cp·tp) cost formula, and a 10-row red-flag table.

2. Deep vs Shallow Modules

Core concept: The best modules are deep: powerful functionality behind a simple interface. Shallow modules have complex interfaces relative to the functionality they provide — they add complexity rather than hiding it.

Why it works: The interface is the cost a module imposes on the rest of the system; the implementation is the benefit. So a method that is harder to learn than to re-implement yourself is net-negative — depth, not line count, decides whether a module earns its place.

Key insights:

  • Depth = functionality provided / interface complexity imposed (Unix file I/O is deep; thin Java I/O wrappers are shallow)
  • "Classitis": the disease of creating too many small, shallow classes — each interface adds cognitive load
  • Small methods are not inherently good; depth matters more than size
  • The best abstractions hide significant complexity behind a few simple concepts

Code applications:

ContextPatternExample
Deep moduleHide complexity behind simple APIfile.read(path) hides disk blocks, caching, buffering, encoding
Classitis cureMerge related shallow classesRequestParser + RequestValidator + RequestProcessor → one RequestHandler
Interface simplicityFewer parameters, fewer methodsconfig.get(key) with sensible defaults, not 15 constructor parameters

See references/deep-modules.md when judging whether an abstraction pulls its weight — before/after code for the depth ratio, the classitis cure worked out, and case studies (Unix I/O, GC, TCP/IP).

3. Information Hiding and Leakage

Core concept: Each module should encapsulate knowledge not needed by other modules. Information leakage — one design decision reflected in multiple modules — is one of the most important red flags in software design.

Why it works: A decision that lives in one module can change there and nowhere else; the same decision leaked into N modules turns one edit into N edits that no compiler will remind you to make. Hiding is what converts change amplification back into a local change.

Key insights:

  • Temporal decomposition causes leakage: splitting code by when things happen forces shared knowledge across phases — organize by knowledge instead
  • Back-door leakage through data formats, protocols, or shared assumptions is the subtlest form
  • Decorators frequently leak — they expose the decorated interface
  • If two modules share knowledge, merge them or create a new module that encapsulates it

Code applications:

ContextPatternExample
Format leakageCentralize serializationOne module owns JSON encoding/decoding, not json.dumps everywhere
Temporal decompositionOrganize by knowledge, not timeCombine "read config" and "apply config" into one config module
Protocol leakageAbstract transport detailsMessageBus.send(event) hides HTTP vs. gRPC vs. queue

See references/information-hiding.md when a change forces you to edit two modules in lockstep — the four leakage forms with code (interface, back-door, temporal, decorator), five reduction strategies, the HTTP-handling case study, and a detection table.

4. General-Purpose vs Special-Purpose Modules

Core concept: Design modules that are "somewhat general-purpose": an interface general enough to support multiple uses, with an implementation that handles current needs. Ask: "What is the simplest interface that will cover all my current needs?"

Why it works: Counterintuitively, the general interface is usually the simpler one — special-case methods multiply as requirements grow, while one general method absorbs them. The trap is the other direction: generality the current needs don't demand is speculative complexity, paid now for a use case that may never arrive.

Key insights:

  • "Somewhat general-purpose" is the sweet spot between too specific and too generic
  • Push complexity downward: lower-level modules should handle hard cases so upper levels stay simple
  • Configuration parameters often represent a failure to decide — each parameter is complexity pushed onto the caller
  • When in doubt, implement the simpler, more general-purpose approach first

Code applications:

ContextPatternExample
API generalityDesign for the concept, not one use casetext.insert(position, string) instead of text.addBulletPoint()
Reduce configurationDetermine behavior automaticallyAuto-detect file encoding instead of an encoding parameter
Avoid over-specializationOne general method over many specific onesstore(key, value, options) instead of storeUser(), storeProduct(), storeOrder()

See references/general-vs-special.md when choosing how general an interface should be — the "simplest interface for all current needs" test, the configuration-parameter antipattern, and push-complexity-downward worked through.

5. Comments as Design Documentation

Core concept: Comments should describe what is not obvious from the code: design intent, abstraction rationale, invariants, and assumptions. "Good code is self-documenting" is a myth for anything beyond low-level implementation detail.

Why it works: Code can only ever record what it does — never why this approach over the alternatives, or what it silently assumes. That rationale is the most perishable information in a system: it lives only in the author's head and is gone the moment they move on, so a comment is the single chance to capture it.

Key insights:

  • Four types: interface comments (most important — they define the abstraction), data structure member comments, implementation comments, cross-module comments
  • Write comments first (comment-driven design) to clarify thinking before code
  • Don't repeat what the code makes clear; keep comments next to the code they describe and update them together
  • If a comment is hard to write, the design may be too complex

Code applications:

ContextPatternExample
Interface commentDescribe the abstraction, not the implementation"Returns the widget closest to position, or null if none within threshold"
Data structure commentExplain invariants"List is sorted by priority descending; ties broken by insertion order"
Implementation commentExplain why, not what"// Binary search: list is always sorted, can hold 100k+ items"
Cross-module commentLink related decisions"// This timeout must match the retry interval in RetryPolicy.java"

See references/comments-as-design.md when writing or reviewing comments and unsure what belongs in one — the four comment types with examples, the comment-driven-design procedure, and the rebuttal to the self-documenting-code myth.

6. Strategic vs Tactical Programming

Core concept: Tactical programming gets features working quickly and accumulates complexity with each shortcut. Strategic programming invests 10-20% extra effort in good design, treating every change as an opportunity to improve structure.

Why it works: Tactical speed is borrowed: each shortcut makes future changes harder, while the strategic investment compounds — strategically designed systems are faster to work with within months.

Key insights:

  • Tactical tornado: a developer who ships fast but leaves wreckage — celebrated short-term, destructive long-term
  • Your primary job is a great design that happens to work, not working code that happens to have a design
  • Startups need strategic programming most — early shortcuts compound into crippling debt as the team grows
  • Every change is an investment opportunity: leave the code a little better; refactoring is part of every feature, not a special event

Code applications:

ContextPatternExample
Tactical trapResist quick-and-dirty fixesDon't add a boolean parameter for "just this one special case"
Strategic investmentImprove structure during feature workRefactor an awkward module interface while adding the feature
Design reviewsEvaluate structure, not just correctnessAsk "does this make the system simpler?" not just "does it work?"

See references/strategic-programming.md when deciding how much design effort a change deserves, or making the case for it — the 10-20% investment math, the tactical-tornado pattern, and why startups need strategic programming most.

Common Mistakes

MistakeWhy It FailsFix
Creating too many small classesClassitis adds interfaces without depth; each boundary is cognitive overheadMerge related shallow classes into deeper modules
Splitting modules by temporal order"Read, then process, then write" forces shared knowledge across modulesGroup code that shares knowledge into one module
Exposing implementation in interfacesCallers depend on internals; changes propagateDesign interfaces around abstractions; hide formats and protocols
Treating comments as optionalDesign intent and assumptions are lost; newcomers guess wrongWrite interface comments first; maintain with the code
Configuration parameters for everythingA parameter offloaded to the caller is a decision you declined to make (see §4)Determine behavior automatically; provide sensible defaults
Quick-and-dirty tactical fixesShortcuts compound until the system is unworkableInvest 10-20% extra; treat every change as a design opportunity
Pass-through methodsA method that only forwards its arguments to another adds an interface but no functionalityMerge the pass-through into the caller or the callee
Designing for specific use casesSpecial-purpose interfaces accumulate special casesAsk: simplest interface covering all current needs?

Quick Diagnostic

QuestionIf NoAction
Can you describe each module in one sentence?Modules do too much or lack purposeSplit into coherent, describable responsibilities
Are interfaces simpler than implementations?Modules are shallow — complexity leaks outwardHide more; merge shallow classes into deeper ones
Can you change an implementation without affecting callers?Information is leaking across boundariesEncapsulate the leaked knowledge in one module
Do interface comments describe the abstraction?Design intent lost; module will be misusedDocument what the module promises, not how it works
Is design discussion part of code reviews?Reviews catch bugs but not complexity growthAdd "does this reduce complexity?" to review criteria
Does each module hide an important design decision?Modules organized around code, not informationReorganize so each module owns specific knowledge
Can a newcomer understand module boundaries without reading implementations?Abstractions undocumented or leakyImprove interface comments; simplify interfaces
Are you spending 10-20% of time on design improvement?Debt accumulates with every featureInclude design improvement in every PR

Further Reading

For the complete methodology with detailed examples:

About the Author

John Ousterhout is the Bosack Lerner Professor of Computer Science at Stanford and the creator of the Tcl scripting language and Tk toolkit. He developed A Philosophy of Software Design from his Stanford CS 190 course, distilling decades of systems-building experience into principles that apply across languages and scales.

GitHub 저장소

wondelai/skills
경로: plugins/code-craftsmanship/skills/software-design-philosophy
0
agent-skillsai-skillsbusinessclaude-codeclaude-code-marketplaceclaude-code-plugin
FAQ

자주 묻는 질문

software-design-philosophy Skill이란 무엇인가요?

software-design-philosophy은(는) wondelai이(가) 만든 Claude Skill입니다. Skill은 Claude가 필요할 때 불러오는 지침과 리소스를 묶어 추가 프롬프트 없이 software-design-philosophy 관련 작업을 수행할 수 있게 합니다.

software-design-philosophy은(는) 어떻게 설치하나요?

이 페이지의 설치 명령을 사용하세요. software-design-philosophy을(를) Claude Code 플러그인으로 추가하거나 저장소를 skills 디렉터리에 복제한 다음 Claude를 다시 시작해 Skill을 불러옵니다.

software-design-philosophy은(는) 어떤 카테고리에 속하나요?

software-design-philosophy은(는) 디자인 카테고리에 속합니다.

software-design-philosophy은(는) 무료로 사용할 수 있나요?

네. software-design-philosophy은(는) AIMCP에 등록되어 있으며 무료로 설치할 수 있습니다.

연관 스킬

executing-plans
디자인

executing-plans 스킬은 검토 체크포인트가 포함된 통제된 배치로 실행할 완전한 구현 계획이 있을 때 사용합니다. 이 스킬은 계획을 불러와 비판적으로 검토한 후, 소규모 배치(기본값 3개 작업)로 작업을 실행하면서 각 배치 사이에 진행 상황을 아키텍트 검토를 위해 보고합니다. 이를 통해 내재된 품질 관리 체크포인트를 갖춘 체계적인 구현이 보장됩니다.

스킬 보기
requesting-code-review
디자인

이 스킬은 코드 변경 사항을 요구 사항에 따라 분석하기 위해 코드 리뷰어 하위 에이전트를 호출합니다. 작업 완료 후, 주요 기능 구현 후, 또는 메인 브랜치에 병합하기 전에 사용해야 합니다. 이 리뷰는 현재 구현체와 원래 계획을 비교하여 문제를 조기에 발견하는 데 도움이 됩니다.

스킬 보기
connect-mcp-server
디자인

이 스킬은 개발자들이 HTTP, stdio 또는 SSE 전송 방식을 통해 MCP 서버를 Claude Code에 연결하는 포괄적인 가이드를 제공합니다. GitHub, Notion 및 사용자 정의 API와 같은 외부 서비스를 통합하기 위한 설치, 구성, 인증 및 보안을 다룹니다. MCP 통합 설정, 외부 도구 구성 또는 Claude의 모델 컨텍스트 프로토콜 작업 시 활용하세요.

스킬 보기
web-cli-teleport
디자인

이 스킬은 작업 분석을 기반으로 개발자가 Claude Code 웹 인터페이스와 CLI 인터페이스 중 선택할 수 있도록 돕고, 두 환경 간 원활한 세션 텔레포트를 가능하게 합니다. 웹, CLI 또는 모바일 환경 전환 시 세션 상태와 컨텍스트를 관리하여 워크플로를 최적화합니다. 다양한 단계에서 서로 다른 도구가 필요한 복잡한 프로젝트에 사용하세요.

스킬 보기