full-stack-orchestration-full-stack-feature

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Use this skill when

什么时候使用此技能

  • Working on full stack orchestration full stack feature tasks or workflows
  • Needing guidance, best practices, or checklists for full stack orchestration full stack feature
  • 处理全栈编排及全栈功能相关任务或工作流时
  • 需要全栈编排及全栈功能相关的指导、最佳实践或检查清单时

Do not use this skill when

什么时候不使用此技能

  • The task is unrelated to full stack orchestration full stack feature
  • You need a different domain or tool outside this scope
  • 任务与全栈编排及全栈功能无关时
  • 需要此范围之外的其他领域或工具时

Instructions

说明

  • Clarify goals, constraints, and required inputs.
  • Apply relevant best practices and validate outcomes.
  • Provide actionable steps and verification.
  • If detailed examples are required, open
    resources/implementation-playbook.md
    .
Orchestrate full-stack feature development across backend, frontend, and infrastructure layers with modern API-first approach:
[Extended thinking: This workflow coordinates multiple specialized agents to deliver a complete full-stack feature from architecture through deployment. It follows API-first development principles, ensuring contract-driven development where the API specification drives both backend implementation and frontend consumption. Each phase builds upon previous outputs, creating a cohesive system with proper separation of concerns, comprehensive testing, and production-ready deployment. The workflow emphasizes modern practices like component-driven UI development, feature flags, observability, and progressive rollout strategies.]
  • 明确目标、约束条件和所需输入。
  • 应用相关最佳实践并验证结果。
  • 提供可执行的步骤和验证方法。
  • 如果需要详细示例,请打开
    resources/implementation-playbook.md
采用现代API优先方法,跨后端、前端和基础设施层编排全栈功能开发:
[扩展思考:此工作流协调多个专业Agent,交付从架构设计到部署的完整全栈功能。它遵循API优先开发原则,确保契约驱动开发,即API规范同时驱动后端实现和前端调用。每个阶段都基于前一阶段的输出构建,创建一个关注点分离恰当、测试全面、可投入生产部署的内聚系统。该工作流强调现代实践,如组件驱动UI开发、功能标志、可观测性和渐进式发布策略。]

Phase 1: Architecture & Design Foundation

阶段1:架构与设计基础

1. Database Architecture Design

1. 数据库架构设计

  • Use Task tool with subagent_type="database-design::database-architect"
  • Prompt: "Design database schema and data models for: $ARGUMENTS. Consider scalability, query patterns, indexing strategy, and data consistency requirements. Include migration strategy if modifying existing schema. Provide both logical and physical data models."
  • Expected output: Entity relationship diagrams, table schemas, indexing strategy, migration scripts, data access patterns
  • Context: Initial requirements and business domain model
  • 使用Task工具,设置subagent_type="database-design::database-architect"
  • 提示语:"为以下需求设计数据库架构和数据模型:$ARGUMENTS。考虑可扩展性、查询模式、索引策略和数据一致性要求。如果修改现有架构,请包含迁移策略。提供逻辑和物理数据模型。"
  • 预期输出:实体关系图、表结构、索引策略、迁移脚本、数据访问模式
  • 上下文:初始需求和业务领域模型

2. Backend Service Architecture

2. 后端服务架构

  • Use Task tool with subagent_type="backend-development::backend-architect"
  • Prompt: "Design backend service architecture for: $ARGUMENTS. Using the database design from previous step, create service boundaries, define API contracts (OpenAPI/GraphQL), design authentication/authorization strategy, and specify inter-service communication patterns. Include resilience patterns (circuit breakers, retries) and caching strategy."
  • Expected output: Service architecture diagram, OpenAPI specifications, authentication flows, caching architecture, message queue design (if applicable)
  • Context: Database schema from step 1, non-functional requirements
  • 使用Task工具,设置subagent_type="backend-development::backend-architect"
  • 提示语:"为以下需求设计后端服务架构:$ARGUMENTS。基于上一步的数据库设计,创建服务边界、定义API契约(OpenAPI/GraphQL)、设计认证/授权策略,并指定服务间通信模式。包含弹性模式(断路器、重试)和缓存策略。"
  • 预期输出:服务架构图、OpenAPI规范、认证流程、缓存架构、消息队列设计(如适用)
  • 上下文:步骤1的数据库架构、非功能需求

3. Frontend Component Architecture

3. 前端组件架构

  • Use Task tool with subagent_type="frontend-mobile-development::frontend-developer"
  • Prompt: "Design frontend architecture and component structure for: $ARGUMENTS. Based on the API contracts from previous step, design component hierarchy, state management approach (Redux/Zustand/Context), routing structure, and data fetching patterns. Include accessibility requirements and responsive design strategy. Plan for Storybook component documentation."
  • Expected output: Component tree diagram, state management design, routing configuration, design system integration plan, accessibility checklist
  • Context: API specifications from step 2, UI/UX requirements
  • 使用Task工具,设置subagent_type="frontend-mobile-development::frontend-developer"
  • 提示语:"为以下需求设计前端架构和组件结构:$ARGUMENTS。基于上一步的API契约,设计组件层级、状态管理方案(Redux/Zustand/Context)、路由结构和数据获取模式。包含可访问性要求和响应式设计策略。规划Storybook组件文档。"
  • 预期输出:组件树图、状态管理设计、路由配置、设计系统集成计划、可访问性检查清单
  • 上下文:步骤2的API规范、UI/UX需求

Phase 2: Parallel Implementation

阶段2:并行实现

4. Backend Service Implementation

4. 后端服务实现

  • Use Task tool with subagent_type="python-development::python-pro" (or "golang-pro"/"nodejs-expert" based on stack)
  • Prompt: "Implement backend services for: $ARGUMENTS. Using the architecture and API specs from Phase 1, build RESTful/GraphQL endpoints with proper validation, error handling, and logging. Implement business logic, data access layer, authentication middleware, and integration with external services. Include observability (structured logging, metrics, tracing)."
  • Expected output: Backend service code, API endpoints, middleware, background jobs, unit tests, integration tests
  • Context: Architecture designs from Phase 1, database schema
  • 使用Task工具,设置subagent_type="python-development::python-pro"(或根据技术栈选择"golang-pro"/"nodejs-expert")
  • 提示语:"为以下需求实现后端服务:$ARGUMENTS。基于阶段1的架构和API规范,构建RESTful/GraphQL端点,包含恰当的验证、错误处理和日志记录。实现业务逻辑、数据访问层、认证中间件以及与外部服务的集成。包含可观测性(结构化日志、指标、追踪)。"
  • 预期输出:后端服务代码、API端点、中间件、后台任务、单元测试、集成测试
  • 上下文:阶段1的架构设计、数据库架构

5. Frontend Implementation

5. 前端实现

  • Use Task tool with subagent_type="frontend-mobile-development::frontend-developer"
  • Prompt: "Implement frontend application for: $ARGUMENTS. Build React/Next.js components using the component architecture from Phase 1. Implement state management, API integration with proper error handling and loading states, form validation, and responsive layouts. Create Storybook stories for components. Ensure accessibility (WCAG 2.1 AA compliance)."
  • Expected output: React components, state management implementation, API client code, Storybook stories, responsive styles, accessibility implementations
  • Context: Component architecture from step 3, API contracts
  • 使用Task工具,设置subagent_type="frontend-mobile-development::frontend-developer"
  • 提示语:"为以下需求实现前端应用:$ARGUMENTS。使用阶段1的组件架构构建React/Next.js组件。实现状态管理、带恰当错误处理和加载状态的API集成、表单验证和响应式布局。为组件创建Storybook用例。确保可访问性(符合WCAG 2.1 AA标准)。"
  • 预期输出:React组件、状态管理实现、API客户端代码、Storybook用例、响应式样式、可访问性实现
  • 上下文:步骤3的组件架构、API契约

6. Database Implementation & Optimization

6. 数据库实现与优化

  • Use Task tool with subagent_type="database-design::sql-pro"
  • Prompt: "Implement and optimize database layer for: $ARGUMENTS. Create migration scripts, stored procedures (if needed), optimize queries identified by backend implementation, set up proper indexes, and implement data validation constraints. Include database-level security measures and backup strategies."
  • Expected output: Migration scripts, optimized queries, stored procedures, index definitions, database security configuration
  • Context: Database design from step 1, query patterns from backend implementation
  • 使用Task工具,设置subagent_type="database-design::sql-pro"
  • 提示语:"为以下需求实现并优化数据库层:$ARGUMENTS。创建迁移脚本、存储过程(如需要)、优化后端实现中识别的查询、设置恰当的索引,并实现数据验证约束。包含数据库级安全措施和备份策略。"
  • 预期输出:迁移脚本、优化后的查询、存储过程、索引定义、数据库安全配置
  • 上下文:步骤1的数据库设计、后端实现中的查询模式

Phase 3: Integration & Testing

阶段3:集成与测试

7. API Contract Testing

7. API契约测试

  • Use Task tool with subagent_type="test-automator"
  • Prompt: "Create contract tests for: $ARGUMENTS. Implement Pact/Dredd tests to validate API contracts between backend and frontend. Create integration tests for all API endpoints, test authentication flows, validate error responses, and ensure proper CORS configuration. Include load testing scenarios."
  • Expected output: Contract test suites, integration tests, load test scenarios, API documentation validation
  • Context: API implementations from Phase 2
  • 使用Task工具,设置subagent_type="test-automator"
  • 提示语:"为以下需求创建契约测试:$ARGUMENTS。实现Pact/Dredd测试以验证前后端之间的API契约。为所有API端点创建集成测试,测试认证流程、验证错误响应,并确保恰当的CORS配置。包含负载测试场景。"
  • 预期输出:契约测试套件、集成测试、负载测试场景、API文档验证
  • 上下文:阶段2的API实现

8. End-to-End Testing

8. 端到端测试

  • Use Task tool with subagent_type="test-automator"
  • Prompt: "Implement E2E tests for: $ARGUMENTS. Create Playwright/Cypress tests covering critical user journeys, cross-browser compatibility, mobile responsiveness, and error scenarios. Test feature flags integration, analytics tracking, and performance metrics. Include visual regression tests."
  • Expected output: E2E test suites, visual regression baselines, performance benchmarks, test reports
  • Context: Frontend and backend implementations from Phase 2
  • 使用Task工具,设置subagent_type="test-automator"
  • 提示语:"为以下需求实现端到端测试:$ARGUMENTS。创建Playwright/Cypress测试,覆盖关键用户旅程、跨浏览器兼容性、移动端响应性和错误场景。测试功能标志集成、分析跟踪和性能指标。包含视觉回归测试。"
  • 预期输出:端到端测试套件、视觉回归基准、性能基准、测试报告
  • 上下文:阶段2的前端和后端实现

9. Security Audit & Hardening

9. 安全审计与加固

  • Use Task tool with subagent_type="security-auditor"
  • Prompt: "Perform security audit for: $ARGUMENTS. Review API security (authentication, authorization, rate limiting), check for OWASP Top 10 vulnerabilities, audit frontend for XSS/CSRF risks, validate input sanitization, and review secrets management. Provide penetration testing results and remediation steps."
  • Expected output: Security audit report, vulnerability assessment, remediation recommendations, security headers configuration
  • Context: All implementations from Phase 2
  • 使用Task工具,设置subagent_type="security-auditor"
  • 提示语:"为以下需求执行安全审计:$ARGUMENTS。审查API安全性(认证、授权、速率限制)、检查OWASP Top 10漏洞、审计前端XSS/CSRF风险、验证输入清理,并审查密钥管理。提供渗透测试结果和修复步骤。"
  • 预期输出:安全审计报告、漏洞评估、修复建议、安全头配置
  • 上下文:阶段2的所有实现

Phase 4: Deployment & Operations

阶段4:部署与运维

10. Infrastructure & CI/CD Setup

10. 基础设施与CI/CD设置

  • Use Task tool with subagent_type="deployment-engineer"
  • Prompt: "Setup deployment infrastructure for: $ARGUMENTS. Create Docker containers, Kubernetes manifests (or cloud-specific configs), implement CI/CD pipelines with automated testing gates, setup feature flags (LaunchDarkly/Unleash), and configure monitoring/alerting. Include blue-green deployment strategy and rollback procedures."
  • Expected output: Dockerfiles, K8s manifests, CI/CD pipeline configs, feature flag setup, IaC templates (Terraform/CloudFormation)
  • Context: All implementations and tests from previous phases
  • 使用Task工具,设置subagent_type="deployment-engineer"
  • 提示语:"为以下需求设置部署基础设施:$ARGUMENTS。创建Docker容器、Kubernetes清单(或云特定配置)、实现带自动化质量门的CI/CD流水线、设置功能标志(LaunchDarkly/Unleash),并配置监控/告警。包含蓝绿部署策略和回滚流程。"
  • 预期输出:Dockerfile、K8s清单、CI/CD流水线配置、功能标志设置、IaC模板(Terraform/CloudFormation)
  • 上下文:之前阶段的所有实现和测试

11. Observability & Monitoring

11. 可观测性与监控

  • Use Task tool with subagent_type="deployment-engineer"
  • Prompt: "Implement observability stack for: $ARGUMENTS. Setup distributed tracing (OpenTelemetry), configure application metrics (Prometheus/DataDog), implement centralized logging (ELK/Splunk), create dashboards for key metrics, and define SLIs/SLOs. Include alerting rules and on-call procedures."
  • Expected output: Observability configuration, dashboard definitions, alert rules, runbooks, SLI/SLO definitions
  • Context: Infrastructure setup from step 10
  • 使用Task工具,设置subagent_type="deployment-engineer"
  • 提示语:"为以下需求实现可观测性栈:$ARGUMENTS。设置分布式追踪(OpenTelemetry)、配置应用指标(Prometheus/DataDog)、实现集中式日志(ELK/Splunk)、创建关键指标仪表盘,并定义SLI/SLO。包含告警规则和随叫随到流程。"
  • 预期输出:可观测性配置、仪表盘定义、告警规则、运行手册、SLI/SLO定义
  • 上下文:步骤10的基础设施设置

12. Performance Optimization

12. 性能优化

  • Use Task tool with subagent_type="performance-engineer"
  • Prompt: "Optimize performance across stack for: $ARGUMENTS. Analyze and optimize database queries, implement caching strategies (Redis/CDN), optimize frontend bundle size and loading performance, setup lazy loading and code splitting, and tune backend service performance. Include before/after metrics."
  • Expected output: Performance improvements, caching configuration, CDN setup, optimized bundles, performance metrics report
  • Context: Monitoring data from step 11, load test results
  • 使用Task工具,设置subagent_type="performance-engineer"
  • 提示语:"为以下需求优化全栈性能:$ARGUMENTS。分析并优化数据库查询、实现缓存策略(Redis/CDN)、优化前端包大小和加载性能、设置懒加载和代码分割,并调优后端服务性能。包含优化前后的指标对比。"
  • 预期输出:性能改进方案、缓存配置、CDN设置、优化后的包、性能指标报告
  • 上下文:步骤11的监控数据、负载测试结果

Configuration Options

配置选项

  • stack
    : Specify technology stack (e.g., "React/FastAPI/PostgreSQL", "Next.js/Django/MongoDB")
  • deployment_target
    : Cloud platform (AWS/GCP/Azure) or on-premises
  • feature_flags
    : Enable/disable feature flag integration
  • api_style
    : REST or GraphQL
  • testing_depth
    : Comprehensive or essential
  • compliance
    : Specific compliance requirements (GDPR, HIPAA, SOC2)
  • stack
    :指定技术栈(例如:"React/FastAPI/PostgreSQL"、"Next.js/Django/MongoDB")
  • deployment_target
    :云平台(AWS/GCP/Azure)或本地部署
  • feature_flags
    :启用/禁用功能标志集成
  • api_style
    :REST或GraphQL
  • testing_depth
    :全面或基础
  • compliance
    :特定合规要求(GDPR、HIPAA、SOC2)

Success Criteria

成功标准

  • All API contracts validated through contract tests
  • Frontend and backend integration tests passing
  • E2E tests covering critical user journeys
  • Security audit passed with no critical vulnerabilities
  • Performance metrics meeting defined SLOs
  • Observability stack capturing all key metrics
  • Feature flags configured for progressive rollout
  • Documentation complete for all components
  • CI/CD pipeline with automated quality gates
  • Zero-downtime deployment capability verified
  • 所有API契约通过契约测试验证
  • 前后端集成测试通过
  • 端到端测试覆盖关键用户旅程
  • 安全审计通过,无严重漏洞
  • 性能指标符合定义的SLO
  • 可观测性栈捕获所有关键指标
  • 配置功能标志以支持渐进式发布
  • 所有组件的文档完整
  • 带自动化质量门的CI/CD流水线
  • 验证具备零停机部署能力

Coordination Notes

协调注意事项

  • Each phase builds upon outputs from previous phases
  • Parallel tasks in Phase 2 can run simultaneously but must converge for Phase 3
  • Maintain traceability between requirements and implementations
  • Use correlation IDs across all services for distributed tracing
  • Document all architectural decisions in ADRs
  • Ensure consistent error handling and API responses across services
Feature to implement: $ARGUMENTS
  • 每个阶段都基于前一阶段的输出构建
  • 阶段2中的并行任务可同时运行,但必须在阶段3汇合
  • 保持需求与实现之间的可追溯性
  • 在所有服务中使用关联ID进行分布式追踪
  • 在ADR中记录所有架构决策
  • 确保跨服务的错误处理和API响应一致
待实现功能:$ARGUMENTS