agentleFS
lstmemerylstmemery/skills/skills/codebase-design/SKILL.md

codebase-design

Skill1 starsChanged 8 days agoMITView on GitHub

Design module interfaces and test seams; find deepening opportunities or consult the shared design vocabulary.

194 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use setup-ts-deep-modules, decision-mapping and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • liufeng1976Skill

    setup-ts-deep-modules

    Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.

    Also in 43 projects that use this

  • FabienDehopreSkill

    decision-mapping

    Turn a loose idea into a sequenced map of investigation tickets, then drive them to resolution one at a time.

    Also in 8 projects that use this

  • RoentekSkill

    loop-me

    Grill me about specs for the workflows I want to build, within this workspace.

    Also in 55 projects that use this

  • LesaniSkill

    writing-beats

    Shape an article as a journey of beats, choose-your-own-adventure style. The user picks a starting beat from the raw material, you write only that beat, then offer options for where to pivot next, beat by beat, until the article reaches a natural end. Use when the user has raw material and wants to assemble it as a narrative rather than an argument.

    Also in 58 projects that use this

  • AWSSkill

    to-questionnaire

    Turn a decision you can't fully answer into a questionnaire for someone else to fill in.

    Also in 90 projects that use this

  • LesaniSkill

    writing-shape

    Take a markdown file of raw material and shape it into an article through a conversational session — drafting candidate openings, growing the piece paragraph by paragraph, arguing about format (lists, tables, callouts, quotes) at each step. Use when the user has a pile of notes, fragments, or a rough draft and wants help turning it into something publishable.

    Also in 58 projects that use this

  • +1 more from Lesani

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 181 edited versions we read keep these.

  • 5

    Distinctive

    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:

    Use these architecture terms consistently.

    line 15
  2. Distinctive:

    Deletion test: if deleting a module makes complexity vanish, it was a pass-through.

    line 37
  3. Distinctive:

    When these terms need a concrete illustration, read EXAMPLES.md for depth diagrams and dependency-injection examples.

    line 53
  4. Distinctive:

    When deepening a cluster, read DEEPENING.md to classify dependencies, choose adapters, and replace obsolete tests at the new interface.

    line 55
  5. Distinctive:

    When comparing alternative interfaces for a chosen candidate, read DESIGN-IT-TWICE.md for contrasting designs and a recommendation.

    line 57

“Common” is measured: kept by at least 6 in 10 of the 181 edited versions of this file we could read. “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

Codebase Design

Design deep modules: substantial behavior behind a small interface, at a seam that lets callers and tests exercise that behavior. This is a shared reference, not a separate interview or implementation workflow. Use the project's CONTEXT.md for domain names and respect the relevant ADRs.

Vocabulary

Use these architecture terms consistently; avoid substituting component, service, unit, API, signature, or boundary when you mean the concepts below.

  • Module: an interface and its implementation, at any scale: function, class, package, or tier-spanning slice.
  • Interface: the module's complete caller-facing surface: types, invariants, ordering, error modes, configuration, and performance characteristics. It is broader than a language's interface declaration or public methods.
  • Implementation: the code inside a module. This describes substance; adapter describes its role at a seam.
  • Depth: behavior exercisable per unit of interface a caller must learn. A deep module hides substantial behavior; a shallow module exposes nearly as much complexity as its implementation. Count leverage, not code lines.
  • Seam: a place to alter behavior without editing there; the location of a module's interface. Its placement is a separate design choice from its contents.
  • Adapter: a concrete thing satisfying an interface at a seam.
  • Leverage: capability gained per unit of interface learned, reused across callers and tests.
  • Locality: change, bugs, knowledge, and verification concentrated in one place.

Principles

  • Deletion test: if deleting a module makes complexity vanish, it was a pass-through. If complexity spreads across callers, it was earning its keep.
  • Depth belongs to the interface. A deep module may contain small encapsulated submodules; callers need not learn their interfaces.
  • The interface is the consumer's test surface. Consumer contract tests use the same seam as callers. Tests of an encapsulated submodule's own contract at its own seam are also legitimate. Reject assertions about wiring, field copies, forwarding, defaults, mock echoes, or source text: they describe implementation.
  • One adapter is a hypothetical seam; two make a real one. Introduce a port only when concrete variation justifies it, such as production and test adapters.
  • Keep the caller's burden small. Reduce methods and parameters, make dependencies explicit, and keep computation results observable. Hide complexity where doing so increases leverage and locality.

Choose the needed reference

  • When these terms need a concrete illustration, read EXAMPLES.md for depth diagrams and dependency-injection examples.
  • When deepening a cluster, read DEEPENING.md to classify dependencies, choose adapters, and replace obsolete tests at the new interface.
  • When comparing alternative interfaces for a chosen candidate, read DESIGN-IT-TWICE.md for contrasting designs and a recommendation.

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.