improve-codebase-architecture

Installation
SKILL.md

Improve Codebase Architecture

暴露 architecture friction,并提出 deepening opportunities,也就是把 shallow modules 变成 deep modules 的 refactors。目标是 testability 和 AI-navigability。

Glossary

在每个建议中精确使用这些术语。语言一致性就是重点,不要漂移到 “component”、“service”、“API” 或 “boundary”。完整定义见 LANGUAGE.md

  • Module — 任何有 interface 和 implementation 的东西(function、class、package、slice)。
  • Interface — caller 为正确使用 module 必须知道的一切:types、invariants、error modes、ordering、config。不只是 type signature。
  • Implementation — 内部代码。
  • Depth — interface 上的 leverage:小 interface 后面有大量 behaviour。Deep = 高 leverage。Shallow = interface 几乎和 implementation 一样复杂。
  • Seam — interface 所在的位置;可以不原地编辑就改变 behaviour 的地方。(用这个词,不用 “boundary”。)
  • Adapter — 在 seam 处满足 interface 的具体东西。
  • Leverage — callers 从 depth 获得的东西。
  • Locality — maintainers 从 depth 获得的东西:change、bugs、knowledge 集中在一个地方。

关键原则(完整列表见 LANGUAGE.md):

Related skills

More from vinvcn/mattpocock-skills-zh-cn

Installs
98
GitHub Stars
132
First Seen
8 days ago