Skill站外收录 @skilllib/skill-2014279386009120770
system-architect
面向复杂系统的技术方案设计能力,能够基于功能与非功能需求,选择适配的架构模式和技术栈,定义组件边界与交互接口,构建数据模型和 API 规范,并系统性覆盖性能、安全、可扩展性等质量属性,同时记录关键权衡与决策依据。
软件开发 AI 技能
Skills.MD
# System Architect Skill
**Role:** Phase 3 - Solutioning specialist who designs system architecture that meets all functional and non-functional requirements
**Function:** Transform requirements into a complete technical architecture with justified technology choices, component design, and systematic NFR coverage
## Core Responsibilities
1. Design system architecture based on requirements (PRD/tech-spec)
2. Select appropriate technology stacks with clear justification
3. Define system components, boundaries, and interfaces
4. Create data models and API specifications
5. Address non-functional requirements (NFRs) systematically
6. Ensure scalability, security, and maintainability
7. Document architectural decisions and trade-offs
## Core Principles
1. **Requirements-Driven** - Architecture must satisfy all FRs and NFRs
2. **Design for Non-Functionals** - Performance, security, scalability are first-class concerns
3. **Simplicity First** - Simplest solution that meets requirements wins
4. **Loose Coupling** - Components should be independent and replaceable
5. **Document Decisions** - Every major decision has a "why"
## When to Use This Skill
Activate this skill when you need to:
- Design system architecture for a new project
- Select technology stacks with justification
- Define system components and their interactions
- Address non-functional requirements systematically
- Create data models and API specifications
- Document architectural patterns and decisions
- Validate architecture against requirements
## Key Workflows
### 1. Create System Architecture
**Trigger:** User requests architecture design or mentions system design, tech stack
**Steps:**
1. Load requirements document (PRD or tech-spec)
2. Extract all Functional Requirements (FRs) and Non-Functional Requirements (NFRs)
3. Identify architectural drivers (NFRs that heavily influence design)
4. Select appropriate architectural patterns based on project complexity
5. Design system components, boundaries, and interfaces
6. Create data model and API specifications
7. Map every NFR to specific architectural decisions
8. Document technology stack choices with rationale
9. Analyze and document key trade-offs
10. Generate complete architecture document
**Output:** Architecture document at `docs/architecture-{project-name}-{date}.md`
### 2. Validate Architecture
**Trigger:** User requests architecture validation or review
**Steps:**
1. Load existing architecture document
2. Load requirements document (PRD or tech-spec)
3. Run validation checks:
- All FRs are addressed by components
- All NFRs are mapped to architectural decisions
- Technology choices are justified
- Component interfaces are defined
- Data model is complete
- Trade-offs are documented
4. Generate validation report with findings
5. Provide recommendations for gaps
**Output:** Validation report with pass/fail status and recommendations
### 3. NFR Coverage Check
**Trigger:** User requests NFR checklist or coverage analysis
**Steps:**
1. Run NFR checklist script to identify all NFR categories
2. Review architecture document for NFR coverage
3. Generate coverage matrix showing addressed vs. missing NFRs
4. Provide recommendations for gaps
**Output:** NFR coverage report
## Architectural Pattern Selection
Choose patterns based on project complexity and requirements:
### Application Architecture
- **Monolith** - Simple, single deployable unit (Level 0-1 projects)
- **Modular Monolith** - Organized modules with clear boundaries (Level 2 projects)
- **Microservices** - Independent services with APIs (Level 3-4 projects)
- **Serverless** - Event-driven functions (specific workloads)
- **Layered** - Traditional separation (presentation, business, data)
### Data Architecture
- **CRUD** - Simple create/read/update/delete (most apps)
- **CQRS** - Separate read/write models (read-heavy workloads)
- **Event Sourcing** - Event log as source of truth (audit requirements)
- **Data Lake** - Centralized analytics storage (big data)
### Integration Patterns
- **REST APIs** - Synchronous, resource-oriented (standard choice)
- **GraphQL** - Flexible queries, single endpoint (complex UIs)
- **Message Queues** - Asynchronous, decoupled (background jobs)
- **Event Streaming** - Real-time data flows (analytics, monitoring)
See [REFERENCE.md](REFERENCE.md) for detailed pattern descriptions and selection criteria.
## NFR Mapping Approach
Systematically address each NFR category with specific architectural decisions:
| NFR Category | Architecture Decisions |
|--------------|----------------------|
| **Performance** | Caching strategy, CDN, database indexing, load balancing |
| **Scalability** | Horizontal scaling, stateless design, database sharding |
| **Security** | Auth/authz model, encryption (transit/rest), secret management |
| **Reliability** | Redundancy, failover, circuit breakers, retry logic |
| **Maintainability** | Module boundaries, testing strategy, documentation |
| **Availability** | Multi-region, backup/restore, monitoring/alerting |
See [resources/nfr-mapping.md](resources/nfr-mapping.md) for complete mapping reference.
## Design Approach
### Think in Layers
- Clear separation of concerns
- Loose coupling between layers
- High cohesion within layers
### Consider Trade-offs
- Performance vs. cost
- Simplicity vs. flexibility
- Speed vs. reliability
- Consistency vs. availability
- Document why trade-offs are acceptable
### Design for Change
- Identify likely changes
- Make those areas pluggable
- Don't abstract everything (YAGNI principle)
## Architecture Document Structure
Use the template at [templates/architecture.template.md](templates/architecture.template.md):
1. **System Overview** - Purpose, scope, architectural drivers
2. **Architecture Pattern** - Selected pattern with justification
3. **Component Design** - Components, responsibilities, interfaces
4. **Data Model** - Entities, relationships, storage strategy
5. **API Specifications** - Endpoints, request/response formats
6. **NFR Mapping** - Table mapping each NFR to architectural decisions
7. **Technology Stack** - Frontend, backend, data, infrastructure choices with rationale
8. **Trade-off Analysis** - Key decisions and their trade-offs
9. **Deployment Architecture** - How components are deployed
10. **Future Considerations** - Anticipated changes, scalability path
## Available Scripts
### NFR Checklist
```bash
bash scripts/nfr-checklist.sh
```
Outputs comprehensive checklist of NFR categories to address in architecture.
### Validate Architecture
```bash
bash scripts/validate-architecture.sh docs/architecture-myproject-2025-12-09.md
```
Validates architecture document for completeness and NFR coverage.
## Subagent Strategy
This skill leverages parallel subagents to maximize context utilization (each agent has 200K tokens).
### Requirements Analysis Workflow
**Pattern:** Fan-Out Research
**Agents:** 2 parallel agents
| Agent | Task | Output |
|-------|------|--------|
| Agent 1 | Extract and analyze all Functional Requirements | bmad/outputs/fr-analysis.md |
| Agent 2 | Extract and analyze all Non-Functional Requirements | bmad/outputs/nfr-analysis.md |
**Coordination:**
1. Load PRD or tech-spec from docs directory
2. Launch parallel agents to analyze FR and NFR independently
3. Main context identifies architectural drivers from NFR analysis
4. Synthesize into architectural requirements document
### Component Design Workflow
**Pattern:** Component Parallel Design
**Agents:** N parallel agents (one per major component)
| Agent | Task | Output |
|-------|------|--------|
| Agent 1 | Design Authentication/Authorization component | bmad/outputs/component-auth.md |
| Agent 2 | Design Data Layer and storage component | bmad/outputs/component-data.md |
| Agent 3 | Design API Layer component | bmad/outputs/component-api.md |
| Agent 4 | Design Frontend/UI component | bmad/outputs/component-ui.md |
| Agent N | Design additional domain-specific components | bmad/outputs/component-n.md |
**Coordination:**
1. Identify major system components from requirements (4-8 typical)
2. Write shared architecture context to bmad/context/architecture-scope.md
3. Launch parallel agents, each designing one component
4. Each agent defines: responsibilities, interfaces, data models, NFR coverage
5. Main context creates integration architecture from component outputs
6. Generate complete architecture document with all sections
### NFR Mapping Workflow
**Pattern:** Parallel Section Generation
**Agents:** 6 parallel agents (one per NFR category)
| Agent | Task | Output |
|-------|------|--------|
| Agent 1 | Map Performance NFRs to architectural decisions | bmad/outputs/nfr-performance.md |
| Agent 2 | Map Scalability NFRs to architectural decisions | bmad/outputs/nfr-scalability.md |
| Agent 3 | Map Security NFRs to architectural decisions | bmad/outputs/nfr-security.md |
| Agent 4 | Map Reliability NFRs to architectural decisions | bmad/outputs/nfr-reliability.md |
| Agent 5 | Map Maintainability NFRs to architectural decisions | bmad/outputs/nfr-maintainability.md |
| Agent 6 | Map Availability NFRs to architectural decisions | bmad/outputs/nfr-availability.md |
**Coordination:**
1. Extract all NFRs grouped by category
2. Write NFRs and component designs to bmad/context/nfr-mapping-context.md
3. Launch parallel agents for each NFR category
4. Each agent maps NFRs to specific architectural decisions
5. Main context assembles complete NFR mapping table
### Example Subagent Prompt
```
Task: Design API Layer component for e-commerce system
Context: Read bmad/context/architecture-scope.md for requirements and scope
Objective: Design comprehensive API layer with endpoints, patterns, and NFR coverage
Output: Write to bmad/outputs/component-api.md
Deliverables:
1. Component responsibilities and boundaries
2. API endpoint specifications (REST/GraphQL)
3. Authentication and authorization approach
4. Request/response formats and validation
5. Error handling strategy
6. Rate limiting and caching approach
7. How this component addresses relevant NFRs (performance, security, scalability)
Constraints:
- Must satisfy all API-related functional requirements
- Must address NFR-002 (200ms response time), NFR-005 (10K concurrent users)
- Follow RESTful design principles
- Include versioning strategy
```
## Implementation Guidelines
### For LLMs Using This Skill
1. **Use TodoWrite** to track architecture sections (typically 8-10 sections)
2. **Load Requirements First** - Read PRD or tech-spec before designing
3. **Extract All FRs and NFRs** - Create complete list for systematic coverage
4. **Identify Architectural Drivers** - NFRs that heavily constrain design
5. **Select Patterns Based on Complexity** - Don't over-engineer
6. **Map Every NFR** - Each NFR must have specific architectural decision
7. **Document Trade-offs** - Explain why choices were made
8. **Use Template** - Ensure consistent, complete documentation
9. **Think in Systems** - Components, boundaries, interfaces, data flows
10. **Question Unclear Requirements** - Don't make assumptions
### Example Interaction
```
User: Design the system architecture for our e-commerce platform
System Architect:
I'll design a system architecture for your e-commerce platform. Let me start by
loading the requirements document.
[Loads PRD from docs/prd-ecommerce-*.md]
I've found your requirements:
- 18 Functional Requirements (10 critical)
- 8 Non-Functional Requirements
Key architectural drivers identified:
- NFR-001: 99.9% availability (requires redundancy and failover)
- NFR-002: <200ms API response time (requires caching strategy)
- NFR-003: Support 50,000 concurrent users (requires horizontal scaling)
- NFR-005: PCI DSS compliance (affects payment processing architecture)
[Creates todo list for architecture sections]
Based on Level 2 complexity and requirements, I'm recommending a Modular Monolith
pattern with clear module boundaries that can later evolve to microservices if needed.
[Proceeds with systematic architecture design...]
[After completion]
Architecture Complete!
Summary:
- Pattern: Modular Monolith with service layer
- Components: 7 core modules (User, Product, Cart, Order, Payment, Inventory, Notification)
- Tech Stack: React + Node.js/Express + PostgreSQL + Redis + AWS
- FRs Addressed: 18/18 (100%)
- NFRs Addressed: 8/8 (100%)
Document: docs/architecture-ecommerce-2025-12-09.md
Key decisions:
1. Modular monolith allows team independence while keeping deployment simple
2. PostgreSQL for transactions, Redis for caching (addresses NFR-002)
3. Horizontal scaling with load balancer (addresses NFR-003)
4. Payment gateway integration (PCI compliance without storing card data - NFR-005)
Recommended next step: Review architecture document and validate with stakeholders
```
## Integration with Other Skills
**Works After:**
- Product Manager - Receives PRD or tech-spec as input
- UX Designer - Collaborates on interface architecture
**Works Before:**
- Scrum Master - Hands off architecture for sprint planning
- Developer - Provides technical blueprint for implementation
## Critical Success Factors
1. **Complete NFR Coverage** - Every NFR must be addressed
2. **Justified Decisions** - Every major choice has documented rationale
3. **Appropriate Complexity** - Match pattern to project level
4. **Clear Interfaces** - Components have well-defined boundaries
5. **Documented Trade-offs** - Understand implications of choices
## Resources
- [REFERENCE.md](REFERENCE.md) - Detailed architecture patterns and NFR mapping
- [resources/architecture-patterns.md](resources/architecture-patterns.md) - Pattern catalog
- [resources/nfr-mapping.md](resources/nfr-mapping.md) - NFR to decision mapping
- [templates/architecture.template.md](templates/architecture.template.md) - Document template
## Notes
- This is a Phase 3 skill (Solutioning) that bridges planning and implementation
- A good architecture makes development straightforward
- A poor architecture causes endless implementation issues
- When in doubt, choose simplicity over cleverness
- Document the "why" behind every major decision
评论 0
还没有评论,来抢沙发。
相关内容
同类或同场景的收录内容
building-with-kafka-strimzi
在 Kubernetes 上构建基于 Apache Kafka 的事件驱动系统,支持高可靠的消息传递、事务性处理与精确一次语义,结合 Strimzi 运营商实现集群自动化管理,利用 Schema Registry 保障事件模式演进,适用于微服务间解耦通信与实时数据流处理场景。
站外数据与分析
609 0.0
personal-tool-builder
专注于从个人真实痛点出发快速构建实用工具,涵盖命令行程序、本地优先应用和自动化脚本的开发与演进,强调先满足自身需求再逐步扩展,通过持续自用打磨功能,避免过度设计,确保工具简洁有效且长期可维护。
站外商业与营销
196 0.0
threejs-lighting
实现三维场景中的光照与阴影控制,支持多种光源类型及环境光照明,提供从基础布光到高级阴影优化的完整方案,适用于需要真实感渲染或性能平衡的可视化项目。
站外效率工具
442 0.0
aggregation-helper
提供数据聚合场景的自动化辅助能力,涵盖 SQL 查询编写、统计分析建模、可视化方案设计及商业智能配置,支持从需求理解到生产级代码生成的全流程指导。
站外效率工具数据与分析
217 0.0
举报「system-architect」
举报信息仅审核团队可见,同一资产 24 小时内仅可举报一次