ousterhout
Skill2 starsChanged 42 days agoMITView on GitHub
John Ousterhout's "A Philosophy of Software Design": fight complexity with deep modules (simple interface, lots of functionality behind it), information hiding, and strategic rather than tactical programming. Use when designing or reviewing modules, classes, APIs, services, or refactors; when a change touches too many files; or when code is full of shallow pass-through layers. Triggers: "think like Ousterhout", "deep module", "philosophy of software design", "too many layers", "design review", "คิดแบบเอาสเตอร์เฮาต์", "ลดความซับซ้อน", "ออกแบบ module".
In this repository25 other files it gives its agents.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Not affiliated with or endorsed by John Ousterhout.
- Distinctive: line 36
Pull complexity downward: If either the module or its callers must handle something, make the module do it, so it's done once.
- Distinctive: line 39
Write the interface comment first: If it's hard to describe simply, the design is wrong.
- Distinctive: line 47
Write in the user's language.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Think like Ousterhout
Stanford professor, creator of Tcl and co-designer of the Raft consensus algorithm. His book defines complexity by its symptoms (change amplification, cognitive load, unknown unknowns) and argues the main weapon against it is modules whose interfaces are much simpler than what they do.
Not affiliated with or endorsed by John Ousterhout. Built from his book and talks listed below.
When to use
- Designing a new module, service boundary, class, or public API
- A small feature required edits in many files
- Code review where layers mostly forward calls to the next layer
- Error handling is spread across every caller
Method
- Name the symptoms you see: change amplification (one change → many edits), cognitive load (how much a developer must know to use it), unknown unknowns (what you'd only find out by breaking it).
- Measure depth. For each module: how much does the interface ask callers to know, versus how much functionality does it provide? Shallow modules (big interface, little behavior) are the target.
- Look for information leakage: the same knowledge (a file format, an ordering rule, a retry policy) encoded in two places. Pull it into one module.
- Pull complexity downward. If either the module or its callers must handle something, make the module do it, so it's done once.
- Define errors out of existence where possible: change semantics so the error case can't happen or becomes a normal case (delete of a missing key succeeds; substring past the end returns empty).
- Design it twice. Sketch at least two different interfaces for anything important, compare, then choose.
- Write the interface comment first. If it's hard to describe simply, the design is wrong.
Output
Symptoms:which of the three, with concrete examples from the codeDepth table:module → interface size → functionality hidden → shallow/deepLeakage:knowledge duplicated across modulesProposal:the deeper design (two alternatives compared briefly), and errors defined away- Write in the user's language.
Anti-patterns
- Pass-through methods and classes that add a layer but no abstraction
- "Classitis": many tiny classes each needing to be understood
- Exposing configuration knobs instead of picking good defaults
- Tactical patches that make today's ticket easy and tomorrow's harder
Example (illustration)
User: Review our file upload code:
UploadController → UploadService → FileManager → StorageAdapter → S3Client.Symptoms: adding a size limit took edits in four classes (change amplification).
Depth table:
UploadServiceandFileManagerforward every call with renamed parameters (shallow).StorageAdapterhides S3 details well (deep).Leakage: allowed MIME types are listed in the controller and again in
FileManager.Proposal: merge
UploadServiceandFileManagerinto oneUploadsmodule with one method,store(stream, profile), owning limits, type checks and naming. Alternative B (validation in controller) compared and rejected: every new endpoint would repeat it. Missing-file deletes become no-ops, which removes four try/catch blocks in callers.
Sources
- John Ousterhout, A Philosophy of Software Design (2nd ed., 2021): https://web.stanford.edu/~ouster/cgi-bin/book.php
- John Ousterhout, "A Philosophy of Software Design", talk at Google, 2018: https://www.youtube.com/watch?v=bmSAYlu0NcY
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

