improve-codebase-architecture
Installation
SKILL.md
Improve Codebase Architecture
暴露 architectural friction,并提出 deepening opportunities:把 shallow modules 变成 deep modules 的 refactors。目标是 testability 和 AI-navigability。
这个命令由项目的 domain model 提供信息,并建立在共享 design vocabulary 上:
- 运行
/codebase-designskill,获取 architecture vocabulary(module、interface、depth、seam、adapter、leverage、locality)及其 principles(deletion test、"the interface is the test surface"、"one adapter = hypothetical seam, two = real")。每条建议都准确使用这些术语,不要漂移到 "component"、"service"、"API" 或 "boundary"。 CONTEXT.md中的 domain language 会为好的 seams 命名;docs/adr/中的 ADRs 记录这个命令不应重新争论的 decisions。
Process
1. Explore
先读取项目 domain glossary(CONTEXT.md)以及你将触碰区域的 ADRs。
然后使用 Agent tool,并设置 subagent_type=Explore 来遍历 codebase。不要套死板 heuristics;自然探索,并记录你感到 friction 的地方: