bmad-performance-optimization

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

BMAD Performance Optimization Skill

BMAD性能优化Skill

When to Invoke

调用时机

Trigger this skill when the user:
  • Reports latency, throughput, or resource regressions.
  • Requests load/performance testing guidance or results interpretation.
  • Needs to set or validate performance budgets and SLAs.
  • Wants to plan scaling strategies ahead of a launch or marketing event.
  • Asks how to tune code, queries, caching, or infrastructure for speed.
If the user only needs to implement a specific optimization already defined, delegate to
bmad-development-execution
.
当用户出现以下情况时触发此Skill:
  • 反馈延迟、吞吐量或资源退化问题时。
  • 请求负载/性能测试指导或结果解读时。
  • 需要设置或验证性能预算与SLA时。
  • 需在产品发布或营销活动前规划扩容策略时。
  • 询问如何调优代码、查询、缓存或基础设施以提升速度时。
如果用户仅需实施已明确的特定优化方案,可委托给
bmad-development-execution

Mission

核心目标

Deliver actionable insights, testing strategies, and prioritized optimizations that keep the product within agreed performance budgets while balancing cost and complexity.
提供可落地的洞察、测试策略及优先级优化方案,在平衡成本与复杂度的同时,确保产品符合既定性能预算。

Inputs Required

所需输入

  • Current architecture diagrams and deployment topology.
  • Observability data: metrics dashboards, traces, profiling dumps, load test reports.
  • Performance requirements (SLAs/SLOs, budgets, target response times).
  • Workload assumptions and peak usage scenarios.
Gather missing telemetry by coordinating with
bmad-observability-readiness
if instrumentation is lacking.
  • 当前架构图与部署拓扑。
  • 可观测性数据:指标仪表盘、链路追踪、性能分析快照、负载测试报告。
  • 性能要求(SLA/SLO、性能预算、目标响应时间)。
  • 工作负载假设与峰值使用场景。
若缺少必要的监控 instrumentation,可协调
bmad-observability-readiness
补充缺失的遥测数据。

Outputs

输出成果

  • Performance brief summarizing current state, key bottlenecks, and risks.
  • Benchmark and load test plan aligning tools, scenarios, and success criteria.
  • Optimization backlog ranked by impact vs. effort with owner and verification plan.
  • Updated performance budget recommendations or SLO adjustments when necessary.
  • 性能简报:总结当前状态、关键瓶颈及风险。
  • 基准与负载测试方案:明确测试工具、场景及成功标准。
  • 优化待办清单:按影响/投入比排序,明确负责人与验证方案。
  • 必要时更新性能预算建议或调整SLO。

Process

执行流程

  1. Validate inputs and ensure instrumentation coverage. Escalate gaps to observability skill.
  2. Analyze telemetry to pinpoint hotspots (CPU, memory, I/O, DB, network, frontend paint times).
  3. Assess architecture decisions for scalability (caching, asynchronous workflows, data partitioning).
  4. Define performance goals and acceptance thresholds with stakeholders.
  5. Create load/benchmark plans covering baseline, stress, soak, and spike scenarios.
  6. Recommend optimizations across code, database, infrastructure, and CDN layers.
  7. Produce backlog with measurable acceptance criteria and regression safeguards.
  1. 验证输入信息,确保监控覆盖完整。若存在缺口,提交给可观测性Skill处理。
  2. 分析遥测数据,定位性能热点(CPU、内存、I/O、数据库、网络、前端渲染时间)。
  3. 评估架构决策的可扩展性(缓存、异步工作流、数据分片)。
  4. 与利益相关方共同确定性能目标与验收阈值。
  5. 制定负载/基准测试方案,涵盖基准测试、压力测试、耐久性测试与峰值测试场景。
  6. 针对代码、数据库、基础设施及CDN层提出优化建议。
  7. 生成待办清单,包含可量化的验收标准与回归防护措施。

Quality Gates

质量门禁

  • Recommendations trace back to observed data or projected workloads.
  • Each backlog item includes measurement approach (before/after metrics).
  • Performance budgets and SLAs updated or reaffirmed.
  • Risks communicated when goals require major architectural change.
  • 优化建议需基于观测数据或预测工作负载。
  • 每个待办项需包含衡量方法(优化前后指标对比)。
  • 更新或重新确认性能预算与SLA。
  • 若目标需要重大架构变更,需同步相关风险。

Error Handling

错误处理

  • If telemetry contradicts assumptions, schedule hypothesis-driven experiments rather than guessing.
  • Flag when performance targets are unrealistic within constraints; propose trade-offs.
  • When required tooling is unavailable, document blockers and coordinate with observability & dev skills.
  • 若遥测数据与假设不符,需开展基于假设的实验,而非主观猜测。
  • 若性能目标在现有约束下不切实际,需标记并提出权衡方案。
  • 若所需工具不可用,需记录阻塞点并协调可观测性与开发Skill解决。