agentsclimarketplace

Codebase design

Skill joshiujjwal/sdlc-skills-plus/skills/codebase-design

Shared vocabulary and moves for designing deep modules and fighting complexity. Use when designing or improving a module's interface, deciding where a seam goes, making code more testable, or rescuing a "ball of mud". Invest in design every day.From its SKILL.md

Install
npx -y skills add joshiujjwal/sdlc-skills-plus --skill codebase-design

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.6 KB, as published. Nobody here has run it

Codebase Design

Agents accelerate coding — and therefore accelerate entropy. Counter it by caring about design continuously. The goal: deep modules — a lot of functionality behind a simple interface.

Core ideas (shared vocabulary)

  • Deep vs shallow module. Deep = simple interface hiding significant implementation. Shallow = interface as complex as its body (a pass-through). Prefer deep. A shallow wrapper adds cost without hiding anything.
  • Complexity = dependencies + obscurity. It compounds. Notice it accruing.
  • Seam. A place you can substitute behavior without editing the code around it — where tests plug in. Put seams at meaningful boundaries, not arbitrary ones.
  • Information hiding. Each module owns a decision and hides it. Leaking that decision across the interface creates coupling.
  • Design it twice. For any non-trivial interface, sketch two genuinely different designs and compare. The first idea is rarely the best. See DESIGN-IT-TWICE.md.
  • Deepening opportunity. A spot where pulling complexity into a module simplifies all its callers. See DEEPENING.md.

Moves

  1. Pull complexity down. If many callers do the same dance, absorb it behind the interface. Make the common case trivial; let the module handle the hard case.
  2. Define errors out of existence. Design the interface so error conditions can't arise, instead of forcing every caller to handle them.
  3. Make the seam testable. If something is hard to test, the design — not the test — is usually wrong. Add a seam.
  4. Name for the domain. Use the ubiquitous language (domain-modeling).

Rescue a ball of mud

When a codebase is hard to change: scan for the deepest deepening opportunities, rank by payoff, and fix one at a time. Run this periodically, not just at the end.

Rules

  • Don't add a layer that only forwards. Either deepen it or delete it.
  • Optimize for the reader and the next change, not for cleverness.
  • Refactoring is cheap now — fix smells immediately, don't defer tech debt.

Adapted from the codebase-design / improve-codebase-architecture skills in mattpocock/skills (MIT). Credit: Matt Pocock. Deep-module concept: John Ousterhout, A Philosophy of Software Design.

Keep looking

Skills are one crate of 607,533. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.