improve-codebase-architecture
Installation
SKILL.md
Improve Codebase Architecture
Surface architectural friction and propose deepening opportunities — refactors that turn shallow modules into deep ones. The aim is testability and AI-navigability.
This command is informed by the project's domain model and design-vocabulary.md — use those terms exactly in every suggestion.
The domain language in CONTEXT.md gives names to good seams; ADRs in docs/adr/ record decisions this command should not re-litigate.
Process
1. Graph check (optional)
architecture_health flows run a graph_build phase first (phases.py). If you arrive here without a graph, check for graphify-out/graph.json:
- If
graphify-out/graph.jsonexists, tell the user: "代码图谱已就绪(N 个模块),将基于图谱做增强分析。" Then query/code-graph query god-nodesand/code-graph query communitiesto get the global view. Query specific modules as needed via/code-graph query. - If no graph exists, tell the user: "未检测到代码图谱,使用有机探索模式。如需更精确的分析,可先运行
/code-graph build(需要先安装 graphify)。" Then fall back to organic exploration.