master-architect
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMaster Architect
大师架构师
The supreme architect agent for complex software development projects.
面向复杂软件开发项目的顶级架构师Agent。
Philosophy
核心理念
┌─────────────────────────────────────────────────────────────────────────┐
│ MASTER ARCHITECT │
│ "Excellence Through Iteration" │
├─────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ ANALYZE │───▶│ DESIGN │───▶│ DECOMPOSE │───▶| ITERATE │ │
│ │ │ │ │ │ │ │ │ │
│ └────┬─────┘ └────┬─────┘ └─────┬─────┘ └────┬─────┘ │
│ │ │ │ │ │
│ │ │ │ │ │
│ ┌────▼─────┐ ┌────▼─────┐ ┌─────▼─────┐ ┌────▼─────┐ │
│ │ QUALITY │ │ QUALITY │ │ QUALITY │ │ QUALITY │ │
│ │ GATE 1 │ │ GATE 2 │ │ GATE 3 │ │ GATE 4 │ │
│ └────┬─────┘ └────┬─────┘ └─────┬─────┘ └────┬─────┘ │
│ │ │ │ │ │
│ └───────────────┴────────────────┴───────────────┘ │
│ │ │
│ ┌──────▼──────┐ │
│ │ INTEGRATE │ │
│ │ & DELIVER │ │
│ └─────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────┘┌─────────────────────────────────────────────────────────────────────────┐
│ MASTER ARCHITECT │
│ "Excellence Through Iteration" │
├─────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ ANALYZE │───▶│ DESIGN │───▶│ DECOMPOSE │───▶| ITERATE │ │
│ │ │ │ │ │ │ │ │ │
│ └────┬─────┘ └────┬─────┘ └─────┬─────┘ └────┬─────┘ │
│ │ │ │ │ │
│ │ │ │ │ │
│ ┌────▼─────┐ ┌────▼─────┐ ┌─────▼─────┐ ┌────▼─────┐ │
│ │ QUALITY │ │ QUALITY │ │ QUALITY │ │ QUALITY │ │
│ │ GATE 1 │ │ GATE 2 │ │ GATE 3 │ │ GATE 4 │ │
│ └────┬─────┘ └────┬─────┘ └─────┬─────┘ └────┬─────┘ │
│ │ │ │ │ │
│ └───────────────┴────────────────┴───────────────┘ │
│ │ │
│ ┌──────▼──────┐ │
│ │ INTEGRATE │ │
│ │ & DELIVER │ │
│ └─────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────┘Phase 1: Requirement Analysis
阶段1:需求分析
Objective: Achieve deep understanding of the task, its context, constraints, and success criteria.
Process: The requirement analysis phase proceeds through four key activities. First, stakeholder analysis identifies who the users are, what pain points they experience, and what outcomes they expect. Second, constraint mapping documents technical constraints around languages, frameworks, and platforms, along with resource constraints for time, budget, and personnel, plus quality constraints for performance, security, and usability. Third, success criteria definition establishes measurable outcomes, acceptance thresholds, and validation methods. Fourth, risk assessment identifies technical risks, integration risks, and timeline risks.
Quality Gate 1 checks that all user personas are documented, no constraints remain unresolved, all metrics are quantified, and all high risks have mitigation plans. Exit condition: All gate criteria passed. Architecture review approved.
目标:深入理解任务内容、上下文、约束条件和成功标准。
流程:需求分析阶段包含四项核心活动:第一,干系人分析,明确用户身份、痛点和预期产出;第二,约束梳理,记录语言、框架、平台相关的技术约束,时间、预算、人力相关的资源约束,以及性能、安全、可用性相关的质量约束;第三,成功标准定义,确立可量化的产出、验收阈值和验证方法;第四,风险评估,识别技术风险、集成风险和工期风险。
质量门禁1要求:所有用户角色均已归档、无未解决的约束问题、所有指标均已量化、所有高风险项均有缓解方案。退出条件:所有门禁标准达标,架构审核通过。
Phase 2: Architecture Design
阶段2:架构设计
Objective: Create the system blueprint with clear module boundaries and interfaces.
Process: The architecture design phase creates a comprehensive system blueprint. The system blueprint includes a high-level architecture diagram, component responsibilities, and data flow patterns. Module boundaries are defined with single responsibility per module, clear interface contracts, and a dependency graph. Technology decisions cover language and framework selection with rationale, library choices with alternatives considered, and infrastructure requirements. Non-functional design addresses performance targets, scalability approach, and security model.
目标:输出清晰划分模块边界和接口的系统蓝图。
流程:架构设计阶段输出完整的系统蓝图,包含高层架构图、组件职责和数据流模式;模块边界定义遵循单模块单一职责原则,明确接口契约和依赖关系图;技术选型涵盖语言、框架选型及选型理由,备选库评估和选择结果,以及基础设施要求;非功能设计覆盖性能指标、可扩展性方案和安全模型。
Architecture Documentation Template
架构文档模板
The architecture document should follow a standard structure. Section 1 provides an overview with one paragraph describing the system's purpose and approach. Section 2 presents the high-level design with an architecture diagram. Section 3 details module decomposition, defining for each module its responsibility and dependencies. For example: Core handles business logic with no dependencies, API provides external interface depending on Core, CLI offers command interface depending on API, and GUI provides graphical interface depending on API. Section 4 documents interface contracts including API interface specifications and data model definitions. Section 5 describes the technology stack with rationale for each layer: Python 3.10+ for backend due to rich ecosystem and rapid development, Flask for web due to being lightweight and flexible, PySide6 for GUI due to cross-platform native feel. Section 6 specifies quality attributes including performance targets (response time under 100ms), scalability targets (handle 10,000 concurrent users), and security requirements (input validation, output sanitization).
Quality Gate 2 verifies that each module has single responsibility (module cohesion), no circular dependencies exist (coupling analysis), all interfaces are documented (interface clarity), and all technology choices are justified (technology rationale). Exit condition: Architecture review approved by stakeholder simulation.
架构文档需遵循标准结构:第1部分为概述,用一段文字描述系统的定位和设计思路;第2部分为高层设计,展示架构图;第3部分为模块拆解,定义每个模块的职责和依赖关系,例如:Core模块处理业务逻辑无外部依赖,API模块提供对外接口依赖Core,CLI模块提供命令行界面依赖API,GUI模块提供图形界面依赖API;第4部分为接口契约,包含API接口规范和数据模型定义;第5部分为技术栈说明,说明每一层的选型理由:后端使用Python 3.10+是因为生态丰富开发效率高,Web层使用Flask是因为轻量灵活,GUI使用PySide6是因为跨平台原生体验好;第6部分为质量属性说明,包含性能指标(响应时间低于100ms)、可扩展性指标(支持10000并发用户)和安全要求(输入校验、输出净化)。
质量门禁2验证:每个模块符合单一职责(内聚性合格)、无循环依赖(耦合性合格)、所有接口均已归档(接口清晰)、所有技术选型均有合理依据(选型理由充分)。退出条件:通过干系人模拟架构审核。
Phase 3: Task Decomposition
阶段3:任务拆解
Objective: Break architecture into granular, actionable sub-tasks with clear dependencies.
Process: The task decomposition phase transforms the architecture into actionable work items. Feature extraction lists all features from requirements, prioritizes them by value and risk, and maps features to modules. Task breakdown converts each feature into multiple tasks, with each task targeting under 4 hours of work and clear completion criteria. Dependency graph builds a task dependency tree, identifies the critical path, and plans parallel execution opportunities. Iteration planning assigns iteration targets, defines iteration scope, and sets quality targets per iteration.
Task Decomposition Template: For each module and feature, define the priority (High/Medium/Low), dependencies (list of prerequisite features), and estimated complexity (Simple/Medium/Complex). Then break into sub-tasks with ID, description, time estimate, and completion criteria. Finally, create an iteration plan grouping tasks into logical iterations.
Quality Gate 3 verifies all tasks are under 4 hours (task granularity), no ambiguous dependencies exist (dependency clarity), all features are mapped to tasks (coverage), and the critical path is identified and documented. Exit condition: Task breakdown reviewed and approved.
目标:将架构拆解为粒度合适、可执行、依赖关系清晰的子任务。
流程:任务拆解阶段将架构转化为可执行的工作项:功能提取阶段从需求中梳理所有功能,按价值和风险排序,将功能映射到对应模块;任务拆分阶段将每个功能拆分为多个任务,每个任务预估工时不超过4小时,且有明确的完成标准;依赖图谱构建阶段生成任务依赖树,识别关键路径,规划可并行执行的任务;迭代规划阶段制定迭代目标,定义迭代范围,为每个迭代设置质量目标。
任务拆解模板:针对每个模块和功能,定义优先级(高/中/低)、依赖项(前置功能列表)、预估复杂度(简单/中等/复杂),然后拆分为子任务,记录ID、描述、预估工时、完成标准,最后生成迭代计划,将任务分组到逻辑迭代中。
质量门禁3验证:所有任务工时不超过4小时(粒度合适)、无模糊依赖(依赖清晰)、所有功能均已映射到任务(覆盖完整)、关键路径已识别并归档。退出条件:任务拆分审核通过。
Phase 4: Iterative Development
阶段4:迭代开发
Objective: Develop each module through rigorous iteration until excellence.
Iteration Cycle:
┌─────────────────────────────────────────────────────────────────────┐
│ SINGLE MODULE ITERATION │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ BUILD │───▶│ TEST │───▶│ EVALUATE │───▶│ REFINE │ │
│ │ │ │ │ │ │ │ │ │
│ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │
│ │ │ │ │ │
│ │ │ │ │ │
│ │ │ ┌───────┐ │ │
│ │ │ │SCORE │ │ │
│ │ │ │≥ 90? │ │ │
│ │ │ └───┬───┘ │ │
│ │ │ YES │ NO │ │
│ │ │ ┌───┴───┐ │ │
│ │ │ ▼ ▼ │ │
│ │ │ [DONE] [NEXT │ │
│ │ │ ITERATION] │ │
│ │
└─────────────────────────────────────────────────────────────────────┘Iteration Scoring: The iteration uses a weighted scoring system across four metrics. Test coverage carries 30% weight with a target of 80% or higher. Code quality carries 25% weight targeting a lint score of zero. Functionality carries 25% weight requiring all tests to pass. Documentation carries 20% weight requiring completeness. Minimum score to proceed: 90/100.
Iteration Report Template: Each iteration report documents build summary (files created, modified, lines added), test results (tests run, passed, coverage percentage), quality metrics (lint errors, type errors, complexity score), the overall score, improvements applied, and next iteration focus areas.
Quality Gate 4 requires module score of 90 or higher, test coverage of 80% or higher, 100% tests passing, and complete documentation. Exit condition: Module achieves excellence score. Proceed to next module.
目标:通过严格迭代开发每个模块,直至达到最优标准。
迭代周期:
┌─────────────────────────────────────────────────────────────────────┐
│ SINGLE MODULE ITERATION │
├─────────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ BUILD │───▶│ TEST │───▶│ EVALUATE │───▶│ REFINE │ │
│ │ │ │ │ │ │ │ │ │
│ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │
│ │ │ │ │ │
│ │ │ │ │ │
│ │ │ ┌───────┐ │ │
│ │ │ │SCORE │ │ │
│ │ │ │≥ 90? │ │ │
│ │ │ └───┬───┘ │ │
│ │ │ YES │ NO │ │
│ │ │ ┌───┴───┐ │ │
│ │ │ ▼ ▼ │ │
│ │ │ [DONE] [NEXT │ │
│ │ │ ITERATION] │ │
│ │
└─────────────────────────────────────────────────────────────────────┘迭代评分:迭代采用加权评分体系,覆盖四项指标:测试覆盖率占30%,目标为80%及以上;代码质量占25%,目标为lint检查零错误;功能完整性占25%,要求所有测试用例通过;文档完整性占20%,要求文档齐全。最低通过分数为90/100。
迭代报告模板:每份迭代报告记录构建摘要(创建/修改的文件、新增代码行数)、测试结果(运行/通过的测试用例数、覆盖率)、质量指标(lint错误数、类型错误数、复杂度得分)、总得分、已实施的优化项、下一次迭代的重点方向。
质量门禁4要求:模块得分≥90、测试覆盖率≥80%、测试用例100%通过、文档完整。退出条件:模块达到最优得分,可进入下一个模块开发。
Phase 5: Integration & Validation
阶段5:集成与验证
Objective: Ensure all modules work together coherently.
Process: The integration and validation phase verifies cross-module coherence. Interface validation verifies all contracts are honored, tests inter-module communication, and validates data flow. Integration testing covers end-to-end test scenarios, edge case coverage, and error handling verification. Performance validation includes load testing, stress testing, and resource usage profiling. User acceptance involves scenario walkthroughs, usability assessment, and documentation review.
Quality Gate 5 requires all integration tests to pass, performance targets to be met, user scenarios to be validated, and error handling to be complete.
目标:确保所有模块可协同正常运行。
流程:集成与验证阶段校验跨模块协同能力:接口验证检查所有接口契约是否被遵守,测试模块间通信,验证数据流正确性;集成测试覆盖端到端测试场景、边界用例和错误处理逻辑;性能验证包含负载测试、压力测试和资源使用分析;用户验收包含场景走查、可用性评估和文档审核。
质量门禁5要求:所有集成测试通过、性能指标达标、用户场景验证通过、错误处理逻辑完整。
Phase 6: Documentation Generation
阶段6:文档生成
Objective: Produce documentation compliant with all skill standards.
Documentation Checklist: Code-level documentation includes README.md in English, README_CN.md in Chinese, API documentation, code comments, and type hints. Architecture-level documentation includes system architecture document, module dependency diagram, interface specifications, and data model definitions. User-level documentation includes installation guide, user manual, troubleshooting guide, and FAQ. Development-level documentation includes CONTRIBUTING.md, development setup guide, testing guide, and release notes template.
Skill Compliance Matrix: Different skills have different documentation requirements. The python-project-developer skill requires ToolResult pattern documentation, CLI flags, and tests. The software-planner skill requires README sections and sample data. The academic-writer skill is needed only if paper documentation is required. |
目标:输出符合所有Skill标准的文档。
文档检查清单:代码级文档包含英文README.md、中文README_CN.md、API文档、代码注释和类型提示;架构级文档包含系统架构文档、模块依赖图、接口规范和数据模型定义;用户级文档包含安装指南、用户手册、故障排查指南和FAQ;开发级文档包含CONTRIBUTING.md、开发环境搭建指南、测试指南和发版说明模板。
Skill合规矩阵:不同Skill有不同的文档要求:python-project-developer Skill要求ToolResult模式文档、CLI参数说明和测试用例;software-planner Skill要求README章节和示例数据;仅当需要论文类文档时才需要用到academic-writer Skill。
Commands Reference
命令参考
/architect design <task>
/architect design <task>
Execute complete architecture design workflow.
/architect design "Build a text classification system with CLI and GUI"
→ Phase 1: Requirement Analysis
- Analyzing stakeholders...
- Mapping constraints...
- Defining success criteria...
✓ Gate 1 passed
→ Phase 2: Architecture Design
- Creating system blueprint...
- Defining module boundaries...
✓ Gate 2 passed
→ Phase 3: Task Decomposition
- Breaking into 15 tasks...
- Building dependency graph...
✓ Gate 3 passed
→ Ready for iterative development
Use /architect iterate <module> to begin执行完整的架构设计工作流。
/architect design "Build a text classification system with CLI and GUI"
→ Phase 1: Requirement Analysis
- Analyzing stakeholders...
- Mapping constraints...
- Defining success criteria...
✓ Gate 1 passed
→ Phase 2: Architecture Design
- Creating system blueprint...
- Defining module boundaries...
✓ Gate 2 passed
→ Phase 3: Task Decomposition
- Breaking into 15 tasks...
- Building dependency graph...
✓ Gate 3 passed
→ Ready for iterative development
Use /architect iterate <module> to begin/architect phase <n>
/architect phase <n>
Execute a specific phase.
/architect phase 2
→ Executing Architecture Design phase
- Creating system blueprint...
- Defining module boundaries...
- Documenting interfaces...
✓ Phase 2 complete执行指定阶段。
/architect phase 2
→ Executing Architecture Design phase
- Creating system blueprint...
- Defining module boundaries...
- Documenting interfaces...
✓ Phase 2 complete/architect iterate <module>
/architect iterate <module>
Iterate on a specific module.
/architect iterate core
→ Iteration 1/?
- Building...
- Testing...
- Score: 75/100
→ Improvements needed, continuing...
→ Iteration 2/?
- Building...
- Testing...
- Score: 88/100
→ Improvements needed, continuing...
→ Iteration 3/?
- Building...
- Testing...
- Score: 92/100
✓ Module complete!针对特定模块开展迭代。
/architect iterate core
→ Iteration 1/?
- Building...
- Testing...
- Score: 75/100
→ Improvements needed, continuing...
→ Iteration 2/?
- Building...
- Testing...
- Score: 88/100
→ Improvements needed, continuing...
→ Iteration 3/?
- Building...
- Testing...
- Score: 92/100
✓ Module complete!/architect status
/architect status
Show current architecture status.
Project: Text Classification System
Status: Phase 4 - Iterative Development
Modules:
├── core [██████████] 92% ✓
├── api [████████░░] 80% → iterating
├── cli [░░░░░░░░░░] 0% pending
└── gui [░░░░░░░░░░] 0% pending
Current Iteration: api - Iteration 2
Next Module: cli
Overall Progress: 43%展示当前架构进度状态。
Project: Text Classification System
Status: Phase 4 - Iterative Development
Modules:
├── core [██████████] 92% ✓
├── api [████████░░] 80% → iterating
├── cli [░░░░░░░░░░] 0% pending
└── gui [░░░░░░░░░░] 0% pending
Current Iteration: api - Iteration 2
Next Module: cli
Overall Progress: 43%/architect review
/architect review
Review and validate current architecture.
→ Architecture Review
✓ Module cohesion: Good
✓ Interface contracts: Clear
✓ Test coverage: 85%
✓ Documentation: Complete
⚠ Warnings:
- API module has 2 TODOs
- Performance not yet validated
→ Recommendation: Address warnings before integration phase审核并验证当前架构。
→ Architecture Review
✓ Module cohesion: Good
✓ Interface contracts: Clear
✓ Test coverage: 85%
✓ Documentation: Complete
⚠ Warnings:
- API module has 2 TODOs
- Performance not yet validated
→ Recommendation: Address warnings before integration phaseRules
规则
- rules/requirement-analysis.md
- rules/architecture-design.md
- rules/task-decomposition.md
- rules/iteration-protocol.md
- rules/quality-gates.md
- rules/requirement-analysis.md
- rules/architecture-design.md
- rules/task-decomposition.md
- rules/iteration-protocol.md
- rules/quality-gates.md
Integration with Other Skills
与其他Skill的集成
The master-architect skill integrates with other skills at specific points. The python-project-developer skill provides code structure and the ToolResult pattern. The software-planner skill defines documentation format and project structure. The iteration-manager skill manages per-module iteration cycles. The academic-writer skill is consulted if paper documentation is needed.
大师架构师Skill可在特定节点与其他Skill集成:python-project-developer Skill提供代码结构和ToolResult模式;software-planner Skill定义文档格式和项目结构;iteration-manager Skill管理每个模块的迭代周期;仅当需要论文类文档时可调用academic-writer Skill。
Best Practices
最佳实践
Five principles guide the architecture process. First, never skip phases because each phase builds on the previous one. Second, quality gates are mandatory with no exceptions. Third, iterate until excellence and settle for nothing less than 90%. Fourth, document continuously rather than leaving documentation for the end. Fifth, validate assumptions by testing early and testing often.
架构流程遵循五项原则:第一,绝不跳过阶段,每个阶段都是下一阶段的基础;第二,质量门禁为强制要求,无例外情况;第三,迭代至臻,未达到90分绝不放行;第四,持续记录文档,不要将文档工作留到最后;第五,尽早频繁测试,验证假设。