[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79SM7SXAK8S5X4JEBJT7CPZ":3,"skill-same:01M79SM7SXAK8S5X4JEBJT7CPZ":57},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":14,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":46},"01M79SM7SXAK8S5X4JEBJT7CPZ","codebase-design",null,"Shared vocabulary for designing deep modules. Invoke when designing or improving a module's interface, finding deepening opportunities, deciding where a seam goes, or making code more testable — \"is this the right seam\", \"design this interface\", \"why does this feel shallow\".","dannybrown37\u002Fskill-tree","dannybrown37","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F28059438?v=4","01M79SKVHAKWQH9VF0G6KQRZZ2","Danny Brown","01M79SKVJ1X8VHPTK7MKMHBRD2",0,"MIT","https:\u002F\u002Fgithub.com\u002Fdannybrown37\u002Fskill-tree\u002Fblob\u002Fmain\u002Fskills\u002Fcodebase-design\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: codebase-design\ndescription: \"Shared vocabulary for designing deep modules. Invoke when designing or improving a module's interface, finding deepening opportunities, deciding where a seam goes, or making code more testable — \\\"is this the right seam\\\", \\\"design this interface\\\", \\\"why does this feel shallow\\\".\"\nuser-invocable: true\ndisable-model-invocation: true\nallowed-tools: Read, Grep, Glob, Bash\n---\n\n# Codebase Design\n\nDesign **deep modules**: a lot of behaviour behind a small interface, placed at a clean seam,\ntestable through that interface. Use this language and these principles wherever code is being\ndesigned or restructured. The aim is leverage for callers, locality for maintainers, and\ntestability for everyone.\n\n## Glossary\n\nUse these terms exactly: don't substitute \"component,\" \"service,\" \"API,\" or \"boundary.\"\nConsistent language is the whole point.\n\n**Module**: anything with an interface and an implementation. Deliberately scale-agnostic: a\nfunction, class, package, or tier-spanning slice. _Avoid_: unit, component, service.\n\n**Interface**: everything a caller must know to use the module correctly: the type signature,\nbut also invariants, ordering constraints, error modes, required configuration, and performance\ncharacteristics. _Avoid_: API, signature (too narrow, they refer only to the type-level surface).\n\n**Implementation**: what's inside a module, its body of code. Distinct from **Adapter**: a thing\ncan be a small adapter with a large implementation (a Postgres repo) or a large adapter with a\nsmall implementation (an in-memory fake). Reach for \"adapter\" when the seam is the topic;\n\"implementation\" otherwise.\n\n**Depth**: leverage at the interface. The amount of behaviour a caller (or test) can exercise\nper unit of interface they have to learn. A module is **deep** when a large amount of behaviour\nsits behind a small interface, **shallow** when the interface is nearly as complex as the\nimplementation.\n\n**Seam** _(Michael Feathers)_: a place where you can alter behaviour without editing in that\nplace; the *location* at which a module's interface lives. Where to put the seam is its own\ndesign decision, distinct from what goes behind it. _Avoid_: boundary (overloaded with DDD's\nbounded context).\n\n**Adapter**: a concrete thing that satisfies an interface at a seam. Describes *role* (what slot\nit fills), not substance (what's inside).\n\n**Leverage**: what callers get from depth. More capability per unit of interface they learn. One\nimplementation pays back across N call sites and M tests.\n\n**Locality**: what maintainers get from depth. Change, bugs, knowledge, and verification\nconcentrate in one place rather than spreading across callers. Fix once, fixed everywhere.\n\n## Deep vs shallow\n\n**Deep module** = small interface + lots of implementation:\n\n```\n┌─────────────────────┐\n│   Small Interface   │  ← Few methods, simple params\n├─────────────────────┤\n│                     │\n│  Deep Implementation│  ← Complex logic hidden\n│                     │\n└─────────────────────┘\n```\n\n**Shallow module** = large interface + little implementation (avoid):\n\n```\n┌─────────────────────────────────┐\n│       Large Interface           │  ← Many methods, complex params\n├─────────────────────────────────┤\n│  Thin Implementation            │  ← Just passes through\n└─────────────────────────────────┘\n```\n\nWhen designing an interface, ask:\n\n- Can I reduce the number of methods?\n- Can I simplify the parameters?\n- Can I hide more complexity inside?\n\n## Principles\n\n- **Depth is a property of the interface, not the implementation.** A deep module can be\n  internally composed of small, mockable, swappable parts; they just aren't part of the\n  interface. A module can have **internal seams** (private to its implementation, used by its\n  own tests) as well as the **external seam** at its interface.\n- **The deletion test.** Imagine deleting the module. If complexity vanishes, it was a\n  pass-through. If complexity reappears across N callers, it was earning its keep.\n- **The interface is the test surface.** Callers and tests cross the same seam. If you want to\n  test *past* the interface, the module is probably the wrong shape.\n- **One adapter means a hypothetical seam. Two adapters means a real one.** Don't introduce a\n  seam unless something actually varies across it.\n\n## Designing for testability\n\nGood interfaces make testing natural:\n\n1. **Accept dependencies, don't create them.**\n\n   ```typescript\n   \u002F\u002F Testable\n   function processOrder(order, paymentGateway) {}\n\n   \u002F\u002F Hard to test\n   function processOrder(order) {\n     const gateway = new StripeGateway();\n   }\n   ```\n\n2. **Return results, don't produce side effects.**\n\n   ```typescript\n   \u002F\u002F Testable\n   function calculateDiscount(cart): Discount {}\n\n   \u002F\u002F Hard to test\n   function applyDiscount(cart): void {\n     cart.total -= discount;\n   }\n   ```\n\n3. **Small surface area.** Fewer methods = fewer tests needed. Fewer params = simpler test\n   setup.\n\n## Relationships\n\n- A **Module** has exactly one **Interface** (the surface it presents to callers and tests).\n- **Depth** is a property of a **Module**, measured against its **Interface**.\n- A **Seam** is where a **Module**'s **Interface** lives.\n- An **Adapter** sits at a **Seam** and satisfies the **Interface**.\n- **Depth** produces **Leverage** for callers and **Locality** for maintainers.\n\n## Rejected framings\n\n- **Depth as ratio of implementation-lines to interface-lines** (Ousterhout): rewards padding\n  the implementation. We use depth-as-leverage instead.\n- **\"Interface\" as the TypeScript `interface` keyword or a class's public methods**: too narrow:\n  interface here includes every fact a caller must know.\n- **\"Boundary\"**: overloaded with DDD's bounded context. Say **seam** or **interface**.\n\n## Going deeper\n\n- **Deepening a cluster given its dependencies**, see\n  [references\u002FDEEPENING.md](references\u002FDEEPENING.md): dependency categories, seam discipline,\n  and replace-don't-layer testing.\n- **Exploring alternative interfaces**, see\n  [references\u002FDESIGN-IT-TWICE.md](references\u002FDESIGN-IT-TWICE.md): spin up parallel agents to\n  design the interface several radically different ways, then compare on depth, locality, and\n  seam placement.\n","# Codebase Design\n\nDesign **deep modules**: a lot of behaviour behind a small interface, placed at a clean seam,\ntestable through that interface. Use this language and these principles wherever code is being\ndesigned or restructured. The aim is leverage for callers, locality for maintainers, and\ntestability for everyone.\n\n## Glossary\n\nUse these terms exactly: don't substitute \"component,\" \"service,\" \"API,\" or \"boundary.\"\nConsistent language is the whole point.\n\n**Module**: anything with an interface and an implementation. Deliberately scale-agnostic: a\nfunction, class, package, or tier-spanning slice. _Avoid_: unit, component, service.\n\n**Interface**: everything a caller must know to use the module correctly: the type signature,\nbut also invariants, ordering constraints, error modes, required configuration, and performance\ncharacteristics. _Avoid_: API, signature (too narrow, they refer only to the type-level surface).\n\n**Implementation**: what's inside a module, its body of code. Distinct from **Adapter**: a thing\ncan be a small adapter with a large implementation (a Postgres repo) or a large adapter with a\nsmall implementation (an in-memory fake). Reach for \"adapter\" when the seam is the topic;\n\"implementation\" otherwise.\n\n**Depth**: leverage at the interface. The amount of behaviour a caller (or test) can exercise\nper unit of interface they have to learn. A module is **deep** when a large amount of behaviour\nsits behind a small interface, **shallow** when the interface is nearly as complex as the\nimplementation.\n\n**Seam** _(Michael Feathers)_: a place where you can alter behaviour without editing in that\nplace; the *location* at which a module's interface lives. Where to put the seam is its own\ndesign decision, distinct from what goes behind it. _Avoid_: boundary (overloaded with DDD's\nbounded context).\n\n**Adapter**: a concrete thing that satisfies an interface at a seam. Describes *role* (what slot\nit fills), not substance (what's inside).\n\n**Leverage**: what callers get from depth. More capability per unit of interface they learn. One\nimplementation pays back across N call sites and M tests.\n\n**Locality**: what maintainers get from depth. Change, bugs, knowledge, and verification\nconcentrate in one place rather than spreading across callers. Fix once, fixed everywhere.\n\n## Deep vs shallow\n\n**Deep module** = small interface + lots of implementation:\n\n```\n┌─────────────────────┐\n│   Small Interface   │  ← Few methods, simple params\n├─────────────────────┤\n│                     │\n│  Deep Implementation│  ← Complex logic hidden\n│                     │\n└─────────────────────┘\n```\n\n**Shallow module** = large interface + little implementation (avoid):\n\n```\n┌─────────────────────────────────┐\n│       Large Interface           │  ← Many methods, complex params\n├─────────────────────────────────┤\n│  Thin Implementation            │  ← Just passes through\n└─────────────────────────────────┘\n```\n\nWhen designing an interface, ask:\n\n- Can I reduce the number of methods?\n- Can I simplify the parameters?\n- Can I hide more complexity inside?\n\n## Principles\n\n- **Depth is a property of the interface, not the implementation.** A deep module can be\n  internally composed of small, mockable, swappable parts; they just aren't part of the\n  interface. A module can have **internal seams** (private to its implementation, used by its\n  own tests) as well as the **external seam** at its interface.\n- **The deletion test.** Imagine deleting the module. If complexity vanishes, it was a\n  pass-through. If complexity reappears across N callers, it was earning its keep.\n- **The interface is the test surface.** Callers and tests cross the same seam. If you want to\n  test *past* the interface, the module is probably the wrong shape.\n- **One adapter means a hypothetical seam. Two adapters means a real one.** Don't introduce a\n  seam unless something actually varies across it.\n\n## Designing for testability\n\nGood interfaces make testing natural:\n\n1. **Accept dependencies, don't create them.**\n\n   ```typescript\n   \u002F\u002F Testable\n   function processOrder(order, paymentGateway) {}\n\n   \u002F\u002F Hard to test\n   function processOrder(order) {\n     const gateway = new StripeGateway();\n   }\n   ```\n\n2. **Return results, don't produce side effects.**\n\n   ```typescript\n   \u002F\u002F Testable\n   function calculateDiscount(cart): Discount {}\n\n   \u002F\u002F Hard to test\n   function applyDiscount(cart): void {\n     cart.total -= discount;\n   }\n   ```\n\n3. **Small surface area.** Fewer methods = fewer tests needed. Fewer params = simpler test\n   setup.\n\n## Relationships\n\n- A **Module** has exactly one **Interface** (the surface it presents to callers and tests).\n- **Depth** is a property of a **Module**, measured against its **Interface**.\n- A **Seam** is where a **Module**'s **Interface** lives.\n- An **Adapter** sits at a **Seam** and satisfies the **Interface**.\n- **Depth** produces **Leverage** for callers and **Locality** for maintainers.\n\n## Rejected framings\n\n- **Depth as ratio of implementation-lines to interface-lines** (Ousterhout): rewards padding\n  the implementation. We use depth-as-leverage instead.\n- **\"Interface\" as the TypeScript `interface` keyword or a class's public methods**: too narrow:\n  interface here includes every fact a caller must know.\n- **\"Boundary\"**: overloaded with DDD's bounded context. Say **seam** or **interface**.\n\n## Going deeper\n\n- **Deepening a cluster given its dependencies**, see\n  [references\u002FDEEPENING.md](references\u002FDEEPENING.md): dependency categories, seam discipline,\n  and replace-don't-layer testing.\n- **Exploring alternative interfaces**, see\n  [references\u002FDESIGN-IT-TWICE.md](references\u002FDESIGN-IT-TWICE.md): spin up parallel agents to\n  design the interface several radically different ways, then compare on depth, locality, and\n  seam placement.\n",{"name":5,"description":7,"allowed-tools":24,"user-invocable":25,"disable-model-invocation":25},"Read, Grep, Glob, Bash",true,"main","aec70683dacdf9512d27e04a1e04069bbd199b5e","skills\u002Fcodebase-design","https:\u002F\u002Fgithub.com\u002Fdannybrown37\u002Fskill-tree","https:\u002F\u002Fgithub.com\u002Fdannybrown37","dannybrown.dev","Software Engineer","2026-11-12 15:25:14",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":25},[36,39,42],{"tool":37,"command":38},"npx","npx skills add dannybrown37\u002Fskill-tree --skill codebase-design",{"tool":40,"command":41},"bunx","bunx skills add dannybrown37\u002Fskill-tree --skill codebase-design",{"tool":43,"command":44},"pnpm","pnpm dlx skills add dannybrown37\u002Fskill-tree --skill codebase-design","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdannybrown37\u002Fskill-tree\u002Fblob\u002Fmain\u002Fskills\u002Fcodebase-design\u002FSKILL.md",[47,53],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"references\u002FDEEPENING.md","REFERENCE","参考文档",2568,"https:\u002F\u002Fgithub.com\u002Fdannybrown37\u002Fskill-tree\u002Fblob\u002Fmain\u002Fskills\u002Fcodebase-design\u002Freferences\u002FDEEPENING.md",{"path":54,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":55,"sourceHtmlUrl":56},"references\u002FDESIGN-IT-TWICE.md",2969,"https:\u002F\u002Fgithub.com\u002Fdannybrown37\u002Fskill-tree\u002Fblob\u002Fmain\u002Fskills\u002Fcodebase-design\u002Freferences\u002FDESIGN-IT-TWICE.md",[58,65,72,79,86,93],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M79SQ7Z4DXMYJECV1NTEP9WY","wait-what","Stop. Your plan\u002Fidea did not land. Re-pitch it.","https:\u002F\u002Fgithub.com\u002Fdannybrown37\u002Fskill-tree\u002Fblob\u002Fmain\u002Fskills\u002Fwait-what\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M79SQ4WQB5YZ7Q2A87JVR219","verify","Verify before answering whether something works, still passes, is gone, is used, or is correct — and whenever the user says \"can you confirm\", \"are you sure\", \"did that actually work\", or reports something is \"still\" broken. Produces the answer plus the evidence that would have falsified it. A failed GitHub Actions run is skill-tree:debug-ci instead.","https:\u002F\u002Fgithub.com\u002Fdannybrown37\u002Fskill-tree\u002Fblob\u002Fmain\u002Fskills\u002Fverify\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M79SQ0GKSM5891DKPXE8J7TZ","ui-designer","Design or restyle a web UI — landing pages, dashboards, docs sites, app chrome — or when the user asks why a site \"looks generic\", \"looks like a template\", or wants it to feel intentional. A running list of design lessons learned, applied as rules rather than suggestions.","https:\u002F\u002Fgithub.com\u002Fdannybrown37\u002Fskill-tree\u002Fblob\u002Fmain\u002Fskills\u002Fui-designer\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M79SPVN5C0XYAXWBH9HD1YF1","two-axis-review","Two-axis review of changes since a fixed point (commit, tag, HEAD~N, or default HEAD~1): Standards (does the code follow this repo's conventions?) and Spec (does the code do what it should?). Axes run as parallel sub-agents so neither masks the other. Use when the user says \"review against the spec\", \"does this follow our conventions\", \"standards and spec review\", or \"two-axis review\". Not a correctness bug hunt — that's the built-in `\u002Fcode-review`.","https:\u002F\u002Fgithub.com\u002Fdannybrown37\u002Fskill-tree\u002Fblob\u002Fmain\u002Fskills\u002Ftwo-axis-review\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M79SPRT8GV1RPQ2VVR9K08BB","tui-screenshots","Use for generating or refreshing TUI screenshots for docs — \"regenerate the screenshots\", \"the README screenshots are stale\". Drives a Textual\u002FTUI app headlessly and exports SVG. Not for reading a user's screenshot — that is `screenshot`.","https:\u002F\u002Fgithub.com\u002Fdannybrown37\u002Fskill-tree\u002Fblob\u002Fmain\u002Fskills\u002Ftui-screenshots\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M79SPNVJQ0WNWH7PBEM5Y463","to-tickets","Break a spec, plan, or conversation into tracer-bullet vertical-slice tickets with blocking edges — \"turn this into tickets\", \"break this down\", \"what's the work?\". Pairs with skill-tree:to-spec upstream and skill-tree:handoff downstream.","https:\u002F\u002Fgithub.com\u002Fdannybrown37\u002Fskill-tree\u002Fblob\u002Fmain\u002Fskills\u002Fto-tickets\u002FSKILL.md",[],[]]