agentleFS
nuttakulsvnuttakulsv/think-like/skills/ousterhout/SKILL.md

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".

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
  1. Distinctive:

    Not affiliated with or endorsed by John Ousterhout.

    line 22
  2. Distinctive:

    Pull complexity downward: If either the module or its callers must handle something, make the module do it, so it's done once.

    line 36
  3. Distinctive:

    Write the interface comment first: If it's hard to describe simply, the design is wrong.

    line 39
  4. Distinctive:

    Write in the user's language.

    line 47

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

  1. 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).
  2. 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.
  3. 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.
  4. Pull complexity downward. If either the module or its callers must handle something, make the module do it, so it's done once.
  5. 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).
  6. Design it twice. Sketch at least two different interfaces for anything important, compare, then choose.
  7. 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 code
  • Depth table: module → interface size → functionality hidden → shallow/deep
  • Leakage: knowledge duplicated across modules
  • Proposal: 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: UploadService and FileManager forward every call with renamed parameters (shallow). StorageAdapter hides S3 details well (deep).

Leakage: allowed MIME types are listed in the controller and again in FileManager.

Proposal: merge UploadService and FileManager into one Uploads module 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

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.