improve-codebase-architecture
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):
More from vinvcn/mattpocock-skills-zh-cn
grill-me
围绕 plan 或 design 持续 interview user,直到达成 shared understanding,并逐一解决 decision tree 的每个分支。Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".
113tdd
使用 red-green-refactor loop 做 test-driven development。Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants integration tests, or asks for test-first development.
109grill-with-docs
Grilling session that challenges your plan against the existing domain model, sharpens terminology, and updates documentation (CONTEXT.md, ADRs) inline as decisions crystallise. Use when user wants to stress-test a plan against their project's language and documented decisions.
109diagnose
面向棘手 bug 和性能回退的纪律化 diagnosis loop。Reproduce → minimise → hypothesise → instrument → fix → regression-test. Use when user says "diagnose this" / "debug this", reports a bug, says something is broken/throwing/failing, or describes a performance regression.
107caveman
>
105setup-matt-pocock-skills
Sets up an `## Agent skills` block in AGENTS.md/CLAUDE.md and `docs/agents/` so the engineering skills know this repo's issue tracker (GitHub or local markdown), triage label vocabulary, and domain doc layout. Run before first use of `to-issues`, `to-prd`, `triage`, `diagnose`, `tdd`, `improve-codebase-architecture`, or `zoom-out` — or if those skills appear to be missing context about the issue tracker, triage labels, or domain docs.
105