architecture-design

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Architecture & Design Principles Skill

架构与设计原则Skill

Transform codebases into maintainable, testable, and scalable architectures using Clean Architecture principles, SOLID design patterns, and industry best practices from the Essential Developer methodology.
运用Clean Architecture原则、SOLID设计模式以及Essential Developer方法论中的行业最佳实践,将代码库转化为可维护、可测试且可扩展的架构。

Overview

概述

This skill guides you through a structured 5-step process to:
  1. Analyze Requirements → Identify components, responsibilities, and boundaries
  2. Apply SOLID Principles → Design with SRP, OCP, LSP, ISP, DIP
  3. Define Clean Architecture → Establish layers, boundaries, and dependency rules
  4. Design Testing Strategy → Plan unit tests, integration tests, and test boundaries
  5. Document Decisions → Create Architecture Decision Records (ADRs)
本Skill会引导你通过结构化的5步流程完成以下目标:
  1. 需求分析 → 识别组件、职责与边界
  2. 应用SOLID原则 → 基于SRP、OCP、LSP、ISP、DIP进行设计
  3. 定义Clean Architecture → 确立分层结构、边界与依赖规则
  4. 设计测试策略 → 规划单元测试、集成测试与测试边界
  5. 记录决策 → 创建架构决策记录(ADRs)

When to Use This Skill

适用场景

Use this skill when you need to:
  • Refactor legacy code into clean architecture
  • Design a new feature with proper separation of concerns
  • Review existing architecture for SOLID violations
  • Create testable components with clear boundaries
  • Document architectural decisions
  • Establish dependency injection patterns
  • Plan modular design strategies
在以下场景中可以使用本Skill:
  • 将遗留代码重构为整洁架构
  • 设计具备关注点分离特性的新功能
  • 检查现有架构是否违反SOLID原则
  • 创建边界清晰的可测试组件
  • 记录架构决策
  • 确立依赖注入模式
  • 规划模块化设计策略

Core Philosophy

核心理念

"Good architecture is a byproduct of good team processes and communication"
This skill follows these principles:
  • Framework Independence - Business logic doesn't depend on frameworks
  • Testability - Architecture enables easy testing
  • UI Independence - UI can change without affecting business rules
  • Database Independence - Business rules don't know about the database
  • External Agency Independence - Business rules don't depend on external services
"优秀的架构是良好团队流程与沟通的产物"
本Skill遵循以下原则:
  • 框架无关性 - 业务逻辑不依赖于框架
  • 可测试性 - 架构支持便捷测试
  • UI无关性 - UI变更不会影响业务规则
  • 数据库无关性 - 业务规则不感知数据库的存在
  • 外部服务无关性 - 业务逻辑不依赖于外部服务

The 5-Step Process

5步流程

Step 1: Analyze Requirements

步骤1:需求分析

Objective: Identify components, responsibilities, and architectural boundaries
Actions:
  1. Break down feature into distinct responsibilities
  2. Identify core business logic vs infrastructure concerns
  3. Recognize cross-cutting concerns (logging, analytics, caching)
  4. Map data flow through the system
  5. Identify potential architectural boundaries
Key Questions to Ask:
  • What is the core business logic?
  • What are the external dependencies (network, database, UI)?
  • What needs to be testable in isolation?
  • What components might change independently?
  • What are the inputs and outputs of each component?
Output: Component diagram with clear responsibilities
Reference: See
references/modular_design.md
for component identification patterns

目标:识别组件、职责与架构边界
行动
  1. 将功能拆解为不同的职责模块
  2. 区分核心业务逻辑与基础设施相关关注点
  3. 识别横切关注点(日志、分析、缓存)
  4. 梳理系统内的数据流
  5. 识别潜在的架构边界
关键问题
  • 核心业务逻辑是什么?
  • 存在哪些外部依赖(网络、数据库、UI)?
  • 哪些内容需要独立测试?
  • 哪些组件可能独立变更?
  • 每个组件的输入与输出是什么?
输出:职责清晰的组件图
参考:查看
references/modular_design.md
获取组件识别模式

Step 2: Apply SOLID Principles

步骤2:应用SOLID原则

Objective: Design components following SOLID principles
SOLID Breakdown:
目标:设计符合SOLID原则的组件
SOLID详解

S - Single Responsibility Principle (SRP)

S - 单一职责原则(SRP)

  • Each class/module has one reason to change
  • Separate business logic from infrastructure
  • One responsibility per component
Example Violations:
  • ❌ A class that loads data AND presents it
  • ❌ A view controller that makes network requests
  • ❌ A model that knows how to save itself
Example Solutions:
  • ✅ Separate UseCase for business logic
  • ✅ Separate Loader for data fetching
  • ✅ Separate Presenter for view logic
  • 每个类/模块只有一个变更理由
  • 分离业务逻辑与基础设施代码
  • 每个组件对应单一职责
反例
  • ❌ 同时负责加载数据与展示数据的类
  • ❌ 发起网络请求的视图控制器
  • ❌ 知晓自身持久化方式的模型
正例
  • ✅ 用独立的UseCase封装业务逻辑
  • ✅ 用独立的Loader处理数据获取
  • ✅ 用独立的Presenter处理视图逻辑

O - Open/Closed Principle (OCP)

O - 开闭原则(OCP)

  • Open for extension, closed for modification
  • Use protocols/interfaces for abstraction
  • Compose behaviors instead of inheritance
Example Pattern:
swift
// Open for extension via protocols
protocol FeedLoader {
    func load(completion: @escaping (Result<[FeedItem], Error>) -> Void)
}

// Closed for modification - implementations extend behavior
class RemoteFeedLoader: FeedLoader { ... }
class LocalFeedLoader: FeedLoader { ... }
class FallbackFeedLoader: FeedLoader { ... }
  • 对扩展开放,对修改关闭
  • 用协议/接口实现抽象
  • 用组合替代继承
示例模式
swift
// Open for extension via protocols
protocol FeedLoader {
    func load(completion: @escaping (Result<[FeedItem], Error>) -> Void)
}

// Closed for modification - implementations extend behavior
class RemoteFeedLoader: FeedLoader { ... }
class LocalFeedLoader: FeedLoader { ... }
class FallbackFeedLoader: FeedLoader { ... }

L - Liskov Substitution Principle (LSP)

L - 里氏替换原则(LSP)

  • Subtypes must be substitutable for base types
  • Contracts must be honored by implementations
  • No surprising behavior in substitutions
  • 子类必须能够替换基类
  • 实现必须遵守契约
  • 替换后不能出现意外行为

I - Interface Segregation Principle (ISP)

I - 接口隔离原则(ISP)

  • Clients shouldn't depend on interfaces they don't use
  • Create focused, specific interfaces
  • Avoid fat interfaces
Example:
swift
// ❌ Fat interface
protocol DataStore {
    func save(_ data: Data)
    func load() -> Data
    func delete()
    func migrate()
    func backup()
}

// ✅ Segregated interfaces
protocol DataSaver {
    func save(_ data: Data)
}

protocol DataLoader {
    func load() -> Data
}
  • 客户端不应依赖自身未使用的接口
  • 创建专注、具体的接口
  • 避免臃肿接口
示例
swift
// ❌ Fat interface
protocol DataStore {
    func save(_ data: Data)
    func load() -> Data
    func delete()
    func migrate()
    func backup()
}

// ✅ Segregated interfaces
protocol DataSaver {
    func save(_ data: Data)
}

protocol DataLoader {
    func load() -> Data
}

D - Dependency Inversion Principle (DIP)

D - 依赖倒置原则(DIP)

  • High-level modules don't depend on low-level modules
  • Both depend on abstractions
  • Abstractions don't depend on details
Example:
swift
// High-level policy
class FeedViewController {
    private let loader: FeedLoader  // Depends on abstraction
    
    init(loader: FeedLoader) {
        self.loader = loader
    }
}

// Low-level detail
class APIFeedLoader: FeedLoader { ... }
Output: SOLID-compliant component design
Reference: See
references/solid_principles.md
for detailed patterns and anti-patterns

  • 高层模块不依赖低层模块
  • 两者都依赖于抽象
  • 抽象不依赖于细节
示例
swift
// High-level policy
class FeedViewController {
    private let loader: FeedLoader  // Depends on abstraction
    
    init(loader: FeedLoader) {
        self.loader = loader
    }
}

// Low-level detail
class APIFeedLoader: FeedLoader { ... }
输出:符合SOLID原则的组件设计
参考:查看
references/solid_principles.md
获取详细模式与反模式

Step 3: Define Clean Architecture

步骤3:定义Clean Architecture

Objective: Establish clear architectural layers with proper dependency flow
The Clean Architecture Layers:
plaintext
┌─────────────────────────────────────────┐
│          Presentation Layer             │
│    (UI, ViewModels, Presenters)        │
└─────────────────┬───────────────────────┘
                  │ depends on
┌─────────────────▼───────────────────────┐
│         Domain/Business Layer           │
│      (Use Cases, Entities, Rules)      │
└─────────────────┬───────────────────────┘
                  │ depends on
┌─────────────────▼───────────────────────┐
│         Infrastructure Layer            │
│   (Network, Database, Framework Code)  │
└─────────────────────────────────────────┘
Dependency Rule: Source code dependencies point inward only
Key Patterns:
  1. Use Cases (Interactors)
    • Contain business rules
    • Orchestrate data flow
    • Independent of UI and frameworks
  2. Boundaries (Protocols/Interfaces)
    • Define contracts between layers
    • Enable testability and flexibility
    • Invert dependencies
  3. Adapters
    • Convert data between layers
    • Implement boundary protocols
    • Handle framework-specific code
  4. Composition Root
    • Wire dependencies together
    • Configure the object graph
    • Keep business logic clean
Example Structure:
plaintext
Feature/
├── Domain/
│   ├── UseCases/
│   │   └── LoadFeedUseCase.swift
│   ├── Entities/
│   │   └── FeedItem.swift
│   └── Boundaries/
│       └── FeedLoader.swift
├── Infrastructure/
│   ├── Network/
│   │   └── RemoteFeedLoader.swift
│   └── Cache/
│       └── LocalFeedLoader.swift
└── Presentation/
    ├── Views/
    │   └── FeedViewController.swift
    └── Presenters/
        └── FeedPresenter.swift
Output: Layered architecture with clear boundaries
Reference: See
references/clean_architecture.md
for detailed layer definitions

目标:确立具备合理依赖流向的清晰架构分层
Clean Architecture分层
plaintext
┌─────────────────────────────────────────┐
│          表现层             │
│    (UI、ViewModels、Presenters)        │
└─────────────────┬───────────────────────┘
                  │ 依赖于
┌─────────────────▼───────────────────────┐
│         领域/业务层           │
│      (Use Cases、Entities、规则)      │
└─────────────────┬───────────────────────┘
                  │ 依赖于
┌─────────────────▼───────────────────────┐
│         基础设施层            │
│   (网络、数据库、框架代码)  │
└─────────────────────────────────────────┘
依赖规则:源代码依赖仅能向内指向
核心模式
  1. Use Cases(交互器)
    • 包含业务规则
    • 编排数据流
    • 独立于UI与框架
  2. 边界(Protocols/Interfaces)
    • 定义层间契约
    • 支持可测试性与灵活性
    • 实现依赖倒置
  3. 适配器
    • 处理层间数据转换
    • 实现边界协议
    • 处理框架特定代码
  4. 组合根
    • 组装依赖关系
    • 配置对象图
    • 保持业务逻辑的纯净
示例结构
plaintext
Feature/
├── Domain/
│   ├── UseCases/
│   │   └── LoadFeedUseCase.swift
│   ├── Entities/
│   │   └── FeedItem.swift
│   └── Boundaries/
│       └── FeedLoader.swift
├── Infrastructure/
│   ├── Network/
│   │   └── RemoteFeedLoader.swift
│   └── Cache/
│       └── LocalFeedLoader.swift
└── Presentation/
    ├── Views/
    │   └── FeedViewController.swift
    └── Presenters/
        └── FeedPresenter.swift
输出:边界清晰的分层架构
参考:查看
references/clean_architecture.md
获取详细分层定义

Step 4: Design Testing Strategy

步骤4:设计测试策略

Objective: Plan comprehensive testing at all architectural layers
Testing Pyramid:
plaintext
        ┌──────────┐
        │    UI    │ Few - End to End
        ├──────────┤
        │Integration│ Some - Integration
        ├──────────┤
        │   Unit   │ Many - Fast & Isolated
        └──────────┘
Testing Boundaries:
  1. Domain Layer Testing (Unit Tests)
    • Test use cases in isolation
    • Mock all dependencies
    • Fast, reliable, independent
  2. Infrastructure Layer Testing (Integration Tests)
    • Test adapters with real dependencies
    • Test network, database, etc.
    • May be slower, still valuable
  3. Presentation Layer Testing (Unit Tests)
    • Test presenters/view models in isolation
    • Mock use cases and boundaries
    • Verify UI logic without UI framework
Key Testing Patterns:
Test Doubles:
  • Stubs: Provide canned answers
  • Spies: Record calls for verification
  • Mocks: Verify behavior expectations
  • Fakes: Working implementations for testing
Example Test Structure:
swift
class LoadFeedUseCaseTests: XCTestCase {
    func test_load_deliversItemsOnLoaderSuccess() {
        let (sut, loader) = makeSUT()
        let items = [makeItem(), makeItem()]
        
        expect(sut, toCompleteWith: .success(items), when: {
            loader.complete(with: items)
        })
    }
    
    func test_load_deliversErrorOnLoaderFailure() {
        let (sut, loader) = makeSUT()
        
        expect(sut, toCompleteWith: .failure(anyError()), when: {
            loader.complete(with: anyError())
        })
    }
    
    // MARK: - Helpers
    
    private func makeSUT() -> (sut: LoadFeedUseCase, loader: LoaderSpy) {
        let loader = LoaderSpy()
        let sut = LoadFeedUseCase(loader: loader)
        return (sut, loader)
    }
}
Testing Strategies:
  • Test behavior, not implementation
  • Test one thing at a time
  • Use descriptive test names
  • Arrange, Act, Assert pattern
  • Extract helper methods for clarity
Output: Comprehensive testing strategy document
Reference: See
references/testing_strategies.md
for patterns and best practices

目标:为所有架构层规划全面的测试方案
测试金字塔
plaintext
        ┌──────────┐
        │    UI    │ 少量 - 端到端测试
        ├──────────┤
        │集成测试│ 部分 - 集成测试
        ├──────────┤
        │   单元测试   │ 大量 - 快速且独立
        └──────────┘
测试边界
  1. 领域层测试(单元测试)
    • 独立测试Use Cases
    • 模拟所有依赖
    • 快速、可靠、独立
  2. 基础设施层测试(集成测试)
    • 结合真实依赖测试适配器
    • 测试网络、数据库等
    • 可能速度较慢,但仍具备价值
  3. 表现层测试(单元测试)
    • 独立测试Presenter/ViewModel
    • 模拟Use Cases与边界
    • 在不依赖UI框架的情况下验证UI逻辑
核心测试模式
测试替身
  • 桩(Stubs):提供预设响应
  • 间谍(Spies):记录调用用于验证
  • 模拟(Mocks):验证行为预期
  • 伪实现(Fakes):用于测试的可用实现
示例测试结构
swift
class LoadFeedUseCaseTests: XCTestCase {
    func test_load_deliversItemsOnLoaderSuccess() {
        let (sut, loader) = makeSUT()
        let items = [makeItem(), makeItem()]
        
        expect(sut, toCompleteWith: .success(items), when: {
            loader.complete(with: items)
        })
    }
    
    func test_load_deliversErrorOnLoaderFailure() {
        let (sut, loader) = makeSUT()
        
        expect(sut, toCompleteWith: .failure(anyError()), when: {
            loader.complete(with: anyError())
        })
    }
    
    // MARK: - Helpers
    
    private func makeSUT() -> (sut: LoadFeedUseCase, loader: LoaderSpy) {
        let loader = LoaderSpy()
        let sut = LoadFeedUseCase(loader: loader)
        return (sut, loader)
    }
}
测试策略
  • 测试行为而非实现
  • 每次只测试一个点
  • 使用描述性的测试名称
  • 遵循Arrange、Act、Assert模式
  • 提取辅助方法提升可读性
输出:全面的测试策略文档
参考:查看
references/testing_strategies.md
获取模式与最佳实践

Step 5: Document Decisions

步骤5:记录决策

Objective: Create clear architectural documentation and decision records
Architecture Decision Records (ADRs):
Document key architectural decisions using this format:
markdown
undefined
目标:创建清晰的架构文档与决策记录
架构决策记录(ADRs)
使用以下格式记录关键架构决策:
markdown
undefined

ADR-001: Use Protocol-Based Dependency Injection

ADR-001: 使用基于协议的依赖注入

Status

状态

Accepted
已接受

Context

背景

We need a way to decouple high-level business logic from low-level infrastructure details while maintaining testability and flexibility.
我们需要一种方式来解耦高层业务逻辑与低层基础设施细节,同时保持可测试性与灵活性。

Decision

决策

We will use protocol-based dependency injection throughout the codebase. All dependencies will be injected through initializers, and abstractions will be defined as Swift protocols.
我们将在整个代码库中使用基于协议的依赖注入。所有依赖都将通过初始化器注入,抽象将以Swift协议的形式定义。

Consequences

影响

Positive

积极影响

  • Enables easy unit testing with test doubles
  • Allows runtime composition of different implementations
  • Follows Dependency Inversion Principle
  • Makes dependencies explicit and clear
  • 支持使用测试替身进行便捷的单元测试
  • 允许在运行时组合不同实现
  • 遵循依赖倒置原则
  • 使依赖关系清晰可见

Negative

消极影响

  • More protocols to maintain
  • Requires composition root configuration
  • Initial learning curve for team members
  • 需要维护更多协议
  • 需要配置组合根
  • 团队成员存在学习曲线

Alternatives Considered

备选方案

  1. Service Locator pattern - Rejected due to hidden dependencies
  2. Property injection - Rejected due to optional dependencies
  3. Concrete types - Rejected due to tight coupling

**Documentation Requirements**:

1. **Architecture Overview**
   - System context diagram
   - Component diagram
   - Layer relationships

2. **Component Documentation**
   - Purpose and responsibilities
   - Dependencies and boundaries
   - Usage examples

3. **Design Patterns Used**
   - Which patterns and why
   - Implementation examples
   - Trade-offs considered

4. **Testing Strategy**
   - What gets tested and how
   - Test organization
   - Mock/stub strategies

**Output**: Complete architectural documentation

**Reference**: See `examples/` for real-world examples

---
  1. 服务定位器模式 - 因依赖隐藏被否决
  2. 属性注入 - 因依赖可选被否决
  3. 具体类型 - 因耦合过紧被否决

**文档要求**:

1. **架构概述**
   - 系统上下文图
   - 组件图
   - 分层关系

2. **组件文档**
   - 用途与职责
   - 依赖与边界
   - 使用示例

3. **所用设计模式**
   - 使用的模式及原因
   - 实现示例
   - 考虑的权衡

4. **测试策略**
   - 测试内容与方式
   - 测试组织
   - 模拟/桩策略

**输出**:完整的架构文档

**参考**:查看`examples/`获取真实示例

---

Best Practices

最佳实践

DO ✅

建议✅

  • Separate business logic from infrastructure
  • Depend on abstractions, not concretions
  • Make dependencies explicit through injection
  • Write tests for all business logic
  • Keep components small and focused
  • Document significant decisions
  • Use composition over inheritance
  • Design for testability from the start
  • 分离业务逻辑与基础设施
  • 依赖抽象而非具体实现
  • 通过注入使依赖关系显式化
  • 为所有业务逻辑编写测试
  • 保持组件小巧且专注
  • 记录重要决策
  • 优先使用组合而非继承
  • 从设计之初就考虑可测试性

DON'T ❌

避免❌

  • Let business logic depend on frameworks
  • Use singletons for dependency management
  • Skip testing because "it's too hard"
  • Mix presentation and business logic
  • Create god classes with multiple responsibilities
  • Couple modules tightly together
  • Ignore the Single Responsibility Principle
  • Make untestable components

  • 让业务逻辑依赖于框架
  • 使用单例管理依赖
  • 以"测试太难"为借口跳过测试
  • 混合表现层与业务逻辑
  • 创建具备多重职责的上帝类
  • 使模块间耦合过紧
  • 忽略单一职责原则
  • 创建不可测试的组件

Common Architectural Patterns

常见架构模式

This skill supports various architectural patterns:
  1. Clean Architecture (Recommended)
    • Clear separation of concerns
    • Dependency rule: inward only
    • Framework independence
  2. Hexagonal Architecture (Ports & Adapters)
    • Business logic at the center
    • Ports define boundaries
    • Adapters implement ports
  3. MVVM (Model-View-ViewModel)
    • Separation of UI and logic
    • Testable view models
    • Data binding support
  4. MVC (Model-View-Controller)
    • Traditional separation
    • Can be combined with Clean Architecture
    • Controller as composition root
Reference: See
examples/generic/
for pattern implementations

本Skill支持多种架构模式:
  1. Clean Architecture(推荐)
    • 清晰的关注点分离
    • 依赖规则:仅向内指向
    • 框架无关
  2. 六边形架构(端口与适配器)
    • 业务逻辑位于核心
    • 端口定义边界
    • 适配器实现端口
  3. MVVM(Model-View-ViewModel)
    • UI与逻辑分离
    • 可测试的ViewModel
    • 支持数据绑定
  4. MVC(Model-View-Controller)
    • 传统分离模式
    • 可与Clean Architecture结合使用
    • 控制器作为组合根
参考:查看
examples/generic/
获取模式实现

Integration with Requirements Engineering

与需求工程的集成

This skill works seamlessly with the Requirements Engineering Skill:
  1. Start with requirements → Use Cases → BDD scenarios
  2. Apply this skill → Architecture → Component design
  3. Implement → Following architectural patterns
  4. Test → Using defined testing strategy

本Skill可与需求工程Skill无缝协作:
  1. 从需求出发 → 生成Use Cases → 编写BDD场景
  2. 应用本Skill → 设计架构 → 组件设计
  3. 实现 → 遵循架构模式
  4. 测试 → 使用既定测试策略

Language-Specific Guidance

语言特定指导

Swift/iOS

Swift/iOS

  • Use protocols for abstractions
  • Leverage Swift's value types
  • Apply Composition Root pattern in AppDelegate/SceneDelegate
  • Use dependency injection containers if needed
Reference: See
examples/swift/
for Swift-specific patterns
  • 使用协议实现抽象
  • 利用Swift的值类型特性
  • 在AppDelegate/SceneDelegate中应用组合根模式
  • 必要时使用依赖注入容器
参考:查看
examples/swift/
获取Swift特定模式

Generic/Agnostic

通用/语言无关

  • Apply SOLID principles universally
  • Use interfaces/traits/protocols depending on language
  • Adapt patterns to language features
  • Maintain Clean Architecture layers
Reference: See
examples/generic/
for language-agnostic examples

  • 通用应用SOLID原则
  • 根据语言特性使用接口/ trait/协议
  • 适配模式以匹配语言特性
  • 保持Clean Architecture分层
参考:查看
examples/generic/
获取语言无关示例

References

参考资料

Inside the
references/
directory, you'll find:
  • clean_architecture.md - Clean Architecture layers and rules
  • solid_principles.md - Detailed SOLID explanations with examples
  • design_patterns.md - Common patterns (Adapter, Decorator, Composite, Null Object, etc.)
  • null_object_pattern.md - Null Object Pattern in detail with testing examples
  • command_query_separation.md - CQS principle for cache design
  • dependency_management.md - DI patterns and strategies
  • testing_strategies.md - Testing patterns and best practices
  • modular_design.md - Module organization and boundaries
Inside the
examples/
directory:
  • swift/ - Real implementations from Essential Feed
  • generic/ - Language-agnostic examples

references/
目录中,你可以找到:
  • clean_architecture.md - Clean Architecture分层与规则
  • solid_principles.md - SOLID详细解释与示例
  • design_patterns.md - 常见模式(适配器、装饰器、组合、空对象等)
  • null_object_pattern.md - 空对象模式详解与测试示例
  • command_query_separation.md - 用于缓存设计的CQS原则
  • dependency_management.md - 依赖注入模式与策略
  • testing_strategies.md - 测试模式与最佳实践
  • modular_design.md - 模块组织与边界
examples/
目录中:
  • swift/ - 来自Essential Feed的真实实现
  • generic/ - 语言无关示例

Output Format

输出格式

When applying this skill, provide:
  1. Component Analysis - Identified components and responsibilities
  2. SOLID Review - Applied principles with rationale
  3. Architecture Diagram - Layers and dependencies (Mermaid)
  4. Testing Strategy - Test structure and coverage plan
  5. ADRs - Key decisions documented
  6. Implementation Guide - Step-by-step refactoring or implementation plan

应用本Skill时,需提供以下内容:
  1. 组件分析 - 已识别的组件与职责
  2. SOLID审查 - 已应用的原则与理由
  3. 架构图 - 分层与依赖关系(Mermaid格式)
  4. 测试策略 - 测试结构与覆盖计划
  5. ADRs - 已记录的关键决策
  6. 实现指南 - 分步重构或实现计划

Credits

致谢

Based on the Essential Developer's proven architecture methodology:

基于Essential Developer经过验证的架构方法论:

Version History

版本历史

  • 1.0.0 - Initial release with 5-step process
  • 1.0.0 - 初始版本,包含5步流程