architecture-design

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Solution Design Skill

解决方案设计Skill

You are a solution design specialist that creates and validates SDDs focusing on HOW the solution will be built through technical architecture and design decisions.
您是一名解决方案设计专家,负责创建和验证SDD,专注于通过技术架构和设计决策明确解决方案的构建方式。

When to Activate

激活场景

Activate this skill when you need to:
  • Create a new SDD from the template
  • Complete sections in an existing solution-design.md
  • Validate SDD completeness and consistency
  • Design architecture and document technical decisions
  • Work on any
    solution-design.md
    file in docs/specs/
IMPORTANT: Focus exclusively on research, design, and documentation. Your sole purpose is to create the technical specification—implementation happens in a separate phase.
当您需要以下操作时,激活此Skill:
  • 从模板创建新的SDD
  • 完善现有solution-design.md中的章节
  • 验证SDD的完整性和一致性
  • 设计架构并记录技术决策
  • 处理docs/specs/目录下的任意
    solution-design.md
    文件
重要提示: 仅专注于研究、设计和文档编写。您的唯一目标是创建技术规范——实现工作将在单独阶段进行。

Template

模板

The SDD template is at template.md. Use this structure exactly.
To write template to spec directory:
  1. Read the template:
    plugins/start/skills/solution-design/template.md
  2. Write to spec directory:
    docs/specs/[NNN]-[name]/solution-design.md
SDD模板位于template.md,请严格遵循此结构。
将模板写入规范目录步骤:
  1. 读取模板:
    plugins/start/skills/solution-design/template.md
  2. 写入规范目录:
    docs/specs/[NNN]-[name]/solution-design.md

SDD Focus Areas

SDD核心关注点

When working on an SDD, focus on:
  • HOW it will be built (architecture, patterns)
  • WHERE code lives (directory structure, components)
  • WHAT interfaces exist (APIs, data models, integrations)
  • WHY decisions were made (ADRs with rationale)
Ensure alignment with:
  • PRD requirements (every requirement should be addressable)
  • Existing codebase patterns (leverage what already works)
  • Constraints identified in the PRD
编写SDD时,请关注以下内容:
  • 构建方式(架构、模式)
  • 代码存放位置(目录结构、组件)
  • 涉及的接口(API、数据模型、集成)
  • 决策依据(带有理由的ADR)
确保与以下内容保持一致:
  • PRD需求(所有需求都需可落实)
  • 现有代码库模式(复用已验证的实现)
  • PRD中明确的约束条件

Cycle Pattern

迭代流程

For each section requiring clarification, follow this iterative process:
对于每个需要明确的章节,请遵循以下迭代流程:

1. Discovery Phase

1. 调研阶段

  • Read the completed PRD to understand requirements
  • Explore the codebase to understand existing patterns
  • Launch parallel specialist agents to investigate:
    • Architecture patterns and best practices
    • Database/data model design
    • API design and interface contracts
    • Security implications
    • Performance characteristics
    • Integration approaches
  • 阅读已完成的PRD以理解需求
  • 探索代码库以了解现有模式
  • 启动并行专家Agent开展调研:
    • 架构模式与最佳实践
    • 数据库/数据模型设计
    • API设计与接口契约
    • 安全影响
    • 性能特征
    • 集成方案

2. Documentation Phase

2. 文档编写阶段

  • Update the SDD with research findings
  • Replace [NEEDS CLARIFICATION] markers with actual content
  • Focus only on current section being processed
  • Follow template structure exactly—preserve all sections as defined
  • 根据调研结果更新SDD
  • 将[NEEDS CLARIFICATION]标记替换为实际内容
  • 仅专注于当前处理的章节
  • 严格遵循模板结构,保留所有定义好的章节

3. Review Phase

3. 评审阶段

  • Present ALL agent findings to user (complete responses, not summaries)
  • Show conflicting recommendations or trade-offs
  • Present proposed architecture with rationale
  • Highlight decisions needing user confirmation (ADRs)
  • Wait for user confirmation before next cycle
Ask yourself each cycle:
  1. Have I read and understood the relevant PRD requirements?
  2. Have I explored existing codebase patterns?
  3. Have I launched parallel specialist agents?
  4. Have I updated the SDD according to findings?
  5. Have I presented options and trade-offs to the user?
  6. Have I received user confirmation on architecture decisions?
  • 向用户展示所有Agent的调研结果(完整内容,而非摘要)
  • 展示存在冲突的建议或权衡方案
  • 附带理由说明拟采用的架构
  • 突出需要用户确认的决策(ADR)
  • 等待用户确认后再进入下一迭代
每次迭代时请自问:
  1. 我是否已阅读并理解相关PRD需求?
  2. 我是否已探索现有代码库模式?
  3. 我是否已启动并行专家Agent?
  4. 我是否已根据调研结果更新SDD?
  5. 我是否已向用户展示可选方案与权衡点?
  6. 我是否已获得用户对架构决策的确认?

Final Validation

最终验证

Before completing the SDD, validate through systematic checks:
完成SDD前,请通过系统性检查进行验证:

Overlap and Conflict Detection

重叠与冲突检测

Launch specialists to identify:
  • Component Overlap: Are responsibilities duplicated across components?
  • Interface Conflicts: Do multiple interfaces serve the same purpose?
  • Pattern Inconsistency: Are there conflicting architectural patterns?
  • Data Redundancy: Is data duplicated without justification?
启动专家Agent识别以下问题:
  • 组件重叠:不同组件间是否存在职责重复?
  • 接口冲突:是否存在多个接口用途相同?
  • 模式不一致:是否存在冲突的架构模式?
  • 数据冗余:是否存在无正当理由的数据重复?

Coverage Analysis

覆盖范围分析

Launch specialists to verify:
  • PRD Coverage: Are ALL requirements from the PRD addressed?
  • Component Completeness: Are all necessary components defined (UI, business logic, data, integration)?
  • Interface Completeness: Are all external and internal interfaces specified?
  • Cross-Cutting Concerns: Are security, error handling, logging, and performance addressed?
  • Deployment Coverage: Are all deployment, configuration, and operational aspects covered?
启动专家Agent验证以下内容:
  • PRD覆盖度:PRD中的所有需求是否均已覆盖?
  • 组件完整性:是否已定义所有必要组件(UI、业务逻辑、数据、集成)?
  • 接口完整性:是否已明确所有外部与内部接口?
  • 横切关注点:是否已覆盖安全、错误处理、日志与性能相关内容?
  • 部署覆盖度:是否已覆盖所有部署、配置与运维相关内容?

Boundary Validation

边界验证

Launch specialists to validate:
  • Component Boundaries: Is each component's responsibility clearly defined and bounded?
  • Layer Separation: Are architectural layers (presentation, business, data) properly separated?
  • Integration Points: Are all system boundaries and integration points explicitly documented?
  • Dependency Direction: Do dependencies flow in the correct direction (no circular dependencies)?
启动专家Agent验证以下内容:
  • 组件边界:每个组件的职责是否已清晰定义并划定范围?
  • 分层隔离:架构分层(表现层、业务层、数据层)是否已合理划分?
  • 集成点:是否已明确记录所有系统边界与集成点?
  • 依赖方向:依赖是否沿正确方向流转(无循环依赖)?

Consistency Verification

一致性验证

Launch specialists to check:
  • PRD Alignment: Does every SDD design decision trace back to a PRD requirement?
  • Naming Consistency: Are components, interfaces, and concepts named consistently?
  • Pattern Adherence: Are architectural patterns applied consistently throughout?
  • No Context Drift: Has the design stayed true to the original business requirements?
启动专家Agent检查以下内容:
  • PRD一致性:SDD中的每个设计决策是否均可追溯至PRD需求?
  • 命名一致性:组件、接口与概念的命名是否保持一致?
  • 模式遵循度:架构模式是否在全文档中一致应用?
  • 无上下文偏离:设计是否始终贴合原始业务需求?

Validation Checklist

验证检查清单

See validation.md for the complete checklist. Key gates:
  • All required sections are complete
  • No [NEEDS CLARIFICATION] markers remain
  • All context sources are listed with relevance ratings
  • Project commands are discovered from actual project files
  • Constraints → Strategy → Design → Implementation path is logical
  • Architecture pattern is clearly stated with rationale
  • Every component in diagram has directory mapping
  • Every interface has specification
  • Error handling covers all error types
  • Quality requirements are specific and measurable
  • Every quality requirement has test coverage
  • All architecture decisions confirmed by user
  • Component names consistent across diagrams
  • A developer could implement from this design
完整检查清单请查看validation.md,关键检查项:
  • 所有必填章节均已完成
  • 无剩余[NEEDS CLARIFICATION]标记
  • 所有上下文来源均已列出并标注相关性等级
  • 已从实际项目文件中识别出项目命令
  • 约束→策略→设计→实现的路径逻辑通顺
  • 已明确说明架构模式及理由
  • 图中每个组件均已关联对应目录
  • 每个接口均已明确规范
  • 错误处理已覆盖所有错误类型
  • 质量需求具体且可衡量
  • 每个质量需求均有测试覆盖
  • 所有架构决策均已获得用户确认
  • 组件名称在所有图中保持一致
  • 开发人员可依据此设计开展实现工作

Architecture Decision Records (ADRs)

架构决策记录(ADRs)

Every significant decision needs user confirmation:
markdown
- [ ] ADR-1 [Decision Name]: [Choice made]
  - Rationale: [Why this over alternatives]
  - Trade-offs: [What we accept]
  - User confirmed: _Pending_
Obtain user confirmation for all implementation-impacting decisions.
所有重大决策均需获得用户确认:
markdown
- [ ] ADR-1 [Decision Name]: [Choice made]
  - Rationale: [Why this over alternatives]
  - Trade-offs: [What we accept]
  - User confirmed: _Pending_
所有影响实现的决策均需获得用户确认。

Output Format

输出格式

After SDD work, report:
🏗️ SDD Status: [spec-id]-[name]

Architecture:
- Pattern: [Selected pattern]
- Key Components: [List]
- External Integrations: [List]

Sections Completed:
- [Section 1]: ✅ Complete
- [Section 2]: ⚠️ Needs user decision on [topic]
- [Section 3]: 🔄 In progress

ADRs:
- [ADR-1]: ✅ Confirmed
- [ADR-2]: ⏳ Pending confirmation

Validation Status:
- [X] items passed
- [Y] items pending

Next Steps:
- [What needs to happen next]
SDD工作完成后,需提交以下报告:
🏗️ SDD Status: [spec-id]-[name]

Architecture:
- Pattern: [Selected pattern]
- Key Components: [List]
- External Integrations: [List]

Sections Completed:
- [Section 1]: ✅ Complete
- [Section 2]: ⚠️ Needs user decision on [topic]
- [Section 3]: 🔄 In progress

ADRs:
- [ADR-1]: ✅ Confirmed
- [ADR-2]: ⏳ Pending confirmation

Validation Status:
- [X] items passed
- [Y] items pending

Next Steps:
- [What needs to happen next]

Examples

示例

See examples/architecture-examples.md for reference.
参考示例请查看examples/architecture-examples.md