improve-codebase-architecture
Find evidence-based, active-change architecture improvements using shared design and domain-modeling guidance. Use when a user wants to reduce architectural friction, deepen a module, or make a current change safer, more testable, and easier to navigate.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- improve-codebase-architecture
- description
- Find evidence-based, active-change architecture improvements using shared design and domain-modeling guidance. Use when a user wants to reduce architectural friction, deepen a module, or make a current change safer, more testable, and easier to navigate.
02 资源文件 1
- 参考文档agents/openai.yaml131 B
03 SKILL.md 正文
Improve Codebase Architecture
Surface demonstrated architectural friction and propose narrowly scoped improvements that make the active change safer, more testable, and easier to navigate. Prefer a small, justified deepening opportunity over a speculative redesign.
Shared Guidance
codebase-design is the canonical source for architecture vocabulary, dependency categories, deepening, and alternative design. domain-modeling is the canonical source for domain language, glossary selection (GLOSSARY.md or CONTEXT.md), and ADR practices. Use their terms and formats rather than copying or redefining them here.
Both are companion guidance, not a precondition. If either is unavailable, continue with the project's existing language and decisions; state the missing context and do not invent a replacement glossary or document format.
Process
1. Scope to Active Change
Start with the code, defect, feature, or review concern currently being changed. Identify:
- The intended observable outcome and callers affected
- Demonstrated friction, such as repeated change across files, an unsafe seam, a failing test, or an unclear ownership path
- The smallest architectural improvement that would reduce that friction now
Apply YAGNI: do not recommend abstraction, extension points, generalized frameworks, or broad reorganization for hypothetical future use. A candidate needs evidence from the active change, not merely an aesthetically preferable structure.
2. Explore
Read the relevant domain glossary and ADRs before judging names, ownership, or decisions. Follow domain-modeling when it is available; otherwise read existing project documents without creating or rewriting them.
Explore the affected code and its callers. Note only friction tied to the active change:
- Where does understanding one concept require bouncing between many small modules?
- Where are modules shallow — interface nearly as complex as the implementation?
- Where have pure functions been extracted just for testability, but the real bugs hide in how they're called (no locality)?
- Where do tightly-coupled modules leak across their seams?
- Which parts of the codebase are untested, or hard to test through their current interface?
Use the codebase-design deletion test for suspected shallow modules when that guidance is available. Do not treat a theoretical deletion result as sufficient evidence without a current change problem.
3. Present Candidates
Default to a concise Markdown or chat response. Present a numbered list of only the candidates justified by current friction. For each candidate:
- Files — which files/modules are involved
- Problem — why the current architecture is causing friction
- Solution — plain English description of what would change
- Benefits — how the change improves the active path, testability, and, when applicable, locality or leverage
- Scope — why the recommendation is the smallest useful change and what is intentionally deferred
- Recommendation strength —
Strong,Worth exploring, orSpeculative
End with a Top recommendation: the candidate to tackle first and why.
Use the project's domain terms and codebase-design vocabulary when available. If an ADR conflicts with a candidate, surface it only when demonstrated friction warrants reconsideration; otherwise respect the decision. Do not propose an interface before the user selects a candidate.
4. Explore a Selected Candidate
Discuss the design tree with the user: constraints, dependencies, the seam, what remains hidden, and which tests should survive. Use codebase-design for alternative interfaces when appropriate.
If a term needs clarification or a durable decision emerges, follow domain-modeling. Ask before writing or modifying project documentation. Never commit, push, install dependencies, or mutate external systems without separate authorization.
Optional HTML Report
Produce HTML only when the user explicitly requests an HTML report and authorizes writing it. Keep it a standalone, offline-safe artifact: embed no remote assets, make no network requests, and do not open a browser or the generated file automatically. Report the written path and retain the concise Markdown/chat summary.
04 同仓库更多 Skills
ui-ux-pro-max
UI/UX design intelligence for web and mobile. Local database with 79 searchable styles (88 catalog entries), 192 color palettes, 74 font pairings, 192 product types, 119 UX guidelines, 105 curated icon entries, 17 GSAP motion presets, and 25 chart types across 22 stacks (React, Next.js, Vue, Nuxt, Svelte, Astro, SwiftUI, React Native, Flutter, Tailwind, shadcn/ui, Jetpack Compose, Angular, Laravel, JavaFX, WPF, WinUI, Avalonia, Uno Platform, UWP, Three.js, and HTML/CSS). Use when designing, building, or reviewing UI: pages, components, color schemes, typography, layout, accessibility, animation, or data visualization.
figma-mcp
Implement or compare UI against Figma designs using an available Figma MCP integration. Use for Figma-backed implementation, design-token extraction, or visual-parity gap analysis; Figma MCP access is optional and must already be configured by the user.
domain-modeling
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing GLOSSARY.md or CONTEXT.md, or recording or editing an ADR.
codebase-design
Provide the shared vocabulary and discipline for designing deep modules with clear interfaces and seams. Use when a user wants to design or improve a module, find deepening opportunities, choose a seam, or make code more testable and AI-navigable.
test-coverage-review
MUST invoke to review whether added or updated tests cover code changes in a diff. Checks new logic, branches, error paths, and regression risk, producing a change-to-test matrix. Use requirements-to-tests-traceability for acceptance-criteria mapping and orchestrated-review for bundled reviews.
test-correctness-review
MUST invoke to review whether tests are valid, correctly implemented, and prove the behavior they claim. Checks setup, execution, mocks, and assertions for false-confidence risks. Use test-coverage-review for changed-code coverage and requirements-to-tests-traceability for requirement mapping.