backend-development-feature-development

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Orchestrate end-to-end feature development from requirements to production deployment:
[Extended thinking: This workflow orchestrates specialized agents through comprehensive feature development phases - from discovery and planning through implementation, testing, and deployment. Each phase builds on previous outputs, ensuring coherent feature delivery. The workflow supports multiple development methodologies (traditional, TDD/BDD, DDD), feature complexity levels, and modern deployment strategies including feature flags, gradual rollouts, and observability-first development. Agents receive detailed context from previous phases to maintain consistency and quality throughout the development lifecycle.]
编排从需求到生产部署的端到端功能开发流程:
[扩展思考:该工作流通过全面的功能开发阶段编排专业Agent——从发现规划到实现、测试和部署。每个阶段都基于之前的输出构建,确保功能交付的连贯性。工作流支持多种开发方法论(传统、TDD/BDD、DDD)、不同的功能复杂程度,以及包括feature flags、渐进式发布和可观测性优先开发在内的现代部署策略。Agent会接收来自之前阶段的详细上下文,以在整个开发生命周期中保持一致性和质量。]

Use this skill when

适用场景

  • Coordinating end-to-end feature delivery across backend, frontend, and data
  • Managing requirements, architecture, implementation, testing, and rollout
  • Planning multi-service changes with deployment and monitoring needs
  • Aligning teams on scope, risks, and success metrics
  • 协调后端、前端和数据团队的端到端功能交付
  • 管理需求、架构、实现、测试和发布流程
  • 规划涉及部署和监控需求的多服务变更
  • 对齐团队的范围、风险和成功指标

Do not use this skill when

不适用场景

  • The task is a small, isolated backend change or bug fix
  • You only need a single specialist task, not a full workflow
  • There is no deployment or cross-team coordination involved
  • 任务是小型、独立的后端变更或Bug修复
  • 仅需要单一专业任务,而非完整工作流
  • 无需部署或跨团队协调

Instructions

操作步骤

  1. Confirm feature scope, success metrics, and constraints.
  2. Select a methodology and define phase outputs.
  3. Orchestrate implementation, testing, and security validation.
  4. Prepare rollout, monitoring, and documentation plans.
  1. 确认功能范围、成功指标和约束条件。
  2. 选择方法论并定义阶段输出内容。
  3. 编排实现、测试和安全验证流程。
  4. 准备发布、监控和文档计划。

Safety

安全注意事项

  • Avoid production changes without approvals and rollback plans.
  • Validate data migrations and feature flags in staging first.
  • 无审批和回滚计划时,避免生产环境变更。
  • 先在预发布环境验证数据迁移和feature flags。

Configuration Options

配置选项

Development Methodology

开发方法论

  • traditional: Sequential development with testing after implementation
  • tdd: Test-Driven Development with red-green-refactor cycles
  • bdd: Behavior-Driven Development with scenario-based testing
  • ddd: Domain-Driven Design with bounded contexts and aggregates
  • traditional: 顺序开发,实现后再进行测试
  • tdd: 测试驱动开发,遵循红-绿-重构周期
  • bdd: 行为驱动开发,基于场景的测试
  • ddd: 领域驱动设计,包含限界上下文和聚合根

Feature Complexity

功能复杂程度

  • simple: Single service, minimal integration (1-2 days)
  • medium: Multiple services, moderate integration (3-5 days)
  • complex: Cross-domain, extensive integration (1-2 weeks)
  • epic: Major architectural changes, multiple teams (2+ weeks)
  • simple: 单一服务,集成度低(1-2天)
  • medium: 多服务,中等集成度(3-5天)
  • complex: 跨领域,高集成度(1-2周)
  • epic: 重大架构变更,涉及多团队(2周以上)

Deployment Strategy

部署策略

  • direct: Immediate rollout to all users
  • canary: Gradual rollout starting with 5% of traffic
  • feature-flag: Controlled activation via feature toggles
  • blue-green: Zero-downtime deployment with instant rollback
  • a-b-test: Split traffic for experimentation and metrics
  • direct: 立即全量发布给所有用户
  • canary: 渐进式发布,初始流量占比5%
  • feature-flag: 通过功能开关控制激活
  • blue-green: 零停机部署,支持即时回滚
  • a-b-test: 流量拆分用于实验和指标分析

Phase 1: Discovery & Requirements Planning

阶段1:需求发现与规划

  1. Business Analysis & Requirements
    • Use Task tool with subagent_type="business-analytics::business-analyst"
    • Prompt: "Analyze feature requirements for: $ARGUMENTS. Define user stories, acceptance criteria, success metrics, and business value. Identify stakeholders, dependencies, and risks. Create feature specification document with clear scope boundaries."
    • Expected output: Requirements document with user stories, success metrics, risk assessment
    • Context: Initial feature request and business context
  2. Technical Architecture Design
    • Use Task tool with subagent_type="comprehensive-review::architect-review"
    • Prompt: "Design technical architecture for feature: $ARGUMENTS. Using requirements: [include business analysis from step 1]. Define service boundaries, API contracts, data models, integration points, and technology stack. Consider scalability, performance, and security requirements."
    • Expected output: Technical design document with architecture diagrams, API specifications, data models
    • Context: Business requirements, existing system architecture
  3. Feasibility & Risk Assessment
    • Use Task tool with subagent_type="security-scanning::security-auditor"
    • Prompt: "Assess security implications and risks for feature: $ARGUMENTS. Review architecture: [include technical design from step 2]. Identify security requirements, compliance needs, data privacy concerns, and potential vulnerabilities."
    • Expected output: Security assessment with risk matrix, compliance checklist, mitigation strategies
    • Context: Technical design, regulatory requirements
  1. 业务分析与需求梳理
    • 使用Task工具,指定subagent_type="business-analytics::business-analyst"
    • 提示语:"分析以下功能需求:$ARGUMENTS。定义用户故事、验收标准、成功指标和业务价值。识别利益相关者、依赖项和风险。创建具有明确范围边界的功能规格文档。"
    • 预期输出:包含用户故事、成功指标、风险评估的需求文档
    • 上下文:初始功能请求和业务背景
  2. 技术架构设计
    • 使用Task工具,指定subagent_type="comprehensive-review::architect-review"
    • 提示语:"为以下功能设计技术架构:$ARGUMENTS。参考需求:[包含步骤1的业务分析内容]。定义服务边界、API契约、数据模型、集成点和技术栈。考虑可扩展性、性能和安全要求。"
    • 预期输出:包含架构图、API规格、数据模型的技术设计文档
    • 上下文:业务需求、现有系统架构
  3. 可行性与风险评估
    • 使用Task工具,指定subagent_type="security-scanning::security-auditor"
    • 提示语:"评估以下功能的安全影响和风险:$ARGUMENTS。审查架构:[包含步骤2的技术设计内容]。识别安全要求、合规需求、数据隐私问题和潜在漏洞。"
    • 预期输出:包含风险矩阵、合规检查清单、缓解策略的安全评估报告
    • 上下文:技术设计、监管要求

Phase 2: Implementation & Development

阶段2:功能实现与开发

  1. Backend Services Implementation
    • Use Task tool with subagent_type="backend-architect"
    • Prompt: "Implement backend services for: $ARGUMENTS. Follow technical design: [include architecture from step 2]. Build RESTful/GraphQL APIs, implement business logic, integrate with data layer, add resilience patterns (circuit breakers, retries), implement caching strategies. Include feature flags for gradual rollout."
    • Expected output: Backend services with APIs, business logic, database integration, feature flags
    • Context: Technical design, API contracts, data models
  2. Frontend Implementation
    • Use Task tool with subagent_type="frontend-mobile-development::frontend-developer"
    • Prompt: "Build frontend components for: $ARGUMENTS. Integrate with backend APIs: [include API endpoints from step 4]. Implement responsive UI, state management, error handling, loading states, and analytics tracking. Add feature flag integration for A/B testing capabilities."
    • Expected output: Frontend components with API integration, state management, analytics
    • Context: Backend APIs, UI/UX designs, user stories
  3. Data Pipeline & Integration
    • Use Task tool with subagent_type="data-engineering::data-engineer"
    • Prompt: "Build data pipelines for: $ARGUMENTS. Design ETL/ELT processes, implement data validation, create analytics events, set up data quality monitoring. Integrate with product analytics platforms for feature usage tracking."
    • Expected output: Data pipelines, analytics events, data quality checks
    • Context: Data requirements, analytics needs, existing data infrastructure
  1. 后端服务实现
    • 使用Task工具,指定subagent_type="backend-architect"
    • 提示语:"实现以下后端服务:$ARGUMENTS。遵循技术设计:[包含步骤2的架构内容]。构建RESTful/GraphQL API,实现业务逻辑,集成数据层,添加弹性模式(断路器、重试),实现缓存策略。集成feature flags用于渐进式发布。"
    • 预期输出:包含API、业务逻辑、数据库集成、feature flags的后端服务
    • 上下文:技术设计、API契约、数据模型
  2. 前端实现
    • 使用Task工具,指定subagent_type="frontend-mobile-development::frontend-developer"
    • 提示语:"为以下功能构建前端组件:$ARGUMENTS。与后端API集成:[包含步骤4的API端点]。实现响应式UI、状态管理、错误处理、加载状态和分析跟踪。集成feature flags以支持A/B测试能力。"
    • 预期输出:包含API集成、状态管理、分析功能的前端组件
    • 上下文:后端API、UI/UX设计、用户故事
  3. 数据管道与集成
    • 使用Task工具,指定subagent_type="data-engineering::data-engineer"
    • 提示语:"为以下功能构建数据管道:$ARGUMENTS。设计ETL/ELT流程,实现数据验证,创建分析事件,设置数据质量监控。与产品分析平台集成以跟踪功能使用情况。"
    • 预期输出:数据管道、分析事件、数据质量检查机制
    • 上下文:数据需求、分析需求、现有数据基础设施

Phase 3: Testing & Quality Assurance

阶段3:测试与质量保障

  1. Automated Test Suite
    • Use Task tool with subagent_type="unit-testing::test-automator"
    • Prompt: "Create comprehensive test suite for: $ARGUMENTS. Write unit tests for backend: [from step 4] and frontend: [from step 5]. Add integration tests for API endpoints, E2E tests for critical user journeys, performance tests for scalability validation. Ensure minimum 80% code coverage."
    • Expected output: Test suites with unit, integration, E2E, and performance tests
    • Context: Implementation code, acceptance criteria, test requirements
  2. Security Validation
    • Use Task tool with subagent_type="security-scanning::security-auditor"
    • Prompt: "Perform security testing for: $ARGUMENTS. Review implementation: [include backend and frontend from steps 4-5]. Run OWASP checks, penetration testing, dependency scanning, and compliance validation. Verify data encryption, authentication, and authorization."
    • Expected output: Security test results, vulnerability report, remediation actions
    • Context: Implementation code, security requirements
  3. Performance Optimization
    • Use Task tool with subagent_type="application-performance::performance-engineer"
    • Prompt: "Optimize performance for: $ARGUMENTS. Analyze backend services: [from step 4] and frontend: [from step 5]. Profile code, optimize queries, implement caching, reduce bundle sizes, improve load times. Set up performance budgets and monitoring."
    • Expected output: Performance improvements, optimization report, performance metrics
    • Context: Implementation code, performance requirements
  1. 自动化测试套件
    • 使用Task工具,指定subagent_type="unit-testing::test-automator"
    • 提示语:"为以下功能创建全面的测试套件:$ARGUMENTS。为后端:[步骤4内容]和前端:[步骤5内容]编写单元测试。添加API端点集成测试、关键用户旅程端到端测试、可扩展性验证性能测试。确保最低80%的代码覆盖率。"
    • 预期输出:包含单元测试、集成测试、端到端测试和性能测试的测试套件
    • 上下文:实现代码、验收标准、测试需求
  2. 安全验证
    • 使用Task工具,指定subagent_type="security-scanning::security-auditor"
    • 提示语:"为以下功能执行安全测试:$ARGUMENTS。审查实现:[包含步骤4-5的后端和前端内容]。运行OWASP检查、渗透测试、依赖扫描和合规验证。验证数据加密、身份认证和授权机制。"
    • 预期输出:安全测试结果、漏洞报告、修复措施
    • 上下文:实现代码、安全要求
  3. 性能优化
    • 使用Task工具,指定subagent_type="application-performance::performance-engineer"
    • 提示语:"优化以下功能的性能:$ARGUMENTS。分析后端服务:[步骤4内容]和前端:[步骤5内容]。分析代码性能、优化查询、实现缓存、减小包体积、提升加载速度。设置性能预算和监控机制。"
    • 预期输出:性能优化成果、优化报告、性能指标
    • 上下文:实现代码、性能要求

Phase 4: Deployment & Monitoring

阶段4:部署与监控

  1. Deployment Strategy & Pipeline
    • Use Task tool with subagent_type="deployment-strategies::deployment-engineer"
    • Prompt: "Prepare deployment for: $ARGUMENTS. Create CI/CD pipeline with automated tests: [from step 7]. Configure feature flags for gradual rollout, implement blue-green deployment, set up rollback procedures. Create deployment runbook and rollback plan."
    • Expected output: CI/CD pipeline, deployment configuration, rollback procedures
    • Context: Test suites, infrastructure requirements, deployment strategy
  2. Observability & Monitoring
    • Use Task tool with subagent_type="observability-monitoring::observability-engineer"
    • Prompt: "Set up observability for: $ARGUMENTS. Implement distributed tracing, custom metrics, error tracking, and alerting. Create dashboards for feature usage, performance metrics, error rates, and business KPIs. Set up SLOs/SLIs with automated alerts."
    • Expected output: Monitoring dashboards, alerts, SLO definitions, observability infrastructure
    • Context: Feature implementation, success metrics, operational requirements
  3. Documentation & Knowledge Transfer
    • Use Task tool with subagent_type="documentation-generation::docs-architect"
    • Prompt: "Generate comprehensive documentation for: $ARGUMENTS. Create API documentation, user guides, deployment guides, troubleshooting runbooks. Include architecture diagrams, data flow diagrams, and integration guides. Generate automated changelog from commits."
    • Expected output: API docs, user guides, runbooks, architecture documentation
    • Context: All previous phases' outputs
  1. 部署策略与流水线
    • 使用Task工具,指定subagent_type="deployment-strategies::deployment-engineer"
    • 提示语:"为以下功能准备部署:$ARGUMENTS。创建包含自动化测试的CI/CD流水线:[步骤7内容]。配置feature flags用于渐进式发布,实现蓝绿部署,设置回滚流程。创建部署手册和回滚计划。"
    • 预期输出:CI/CD流水线、部署配置、回滚流程
    • 上下文:测试套件、基础设施需求、部署策略
  2. 可观测性与监控
    • 使用Task工具,指定subagent_type="observability-monitoring::observability-engineer"
    • 提示语:"为以下功能设置可观测性:$ARGUMENTS。实现分布式追踪、自定义指标、错误跟踪和告警。创建功能使用情况、性能指标、错误率和业务KPI的仪表盘。设置SLO/SLI及自动化告警。"
    • 预期输出:监控仪表盘、告警规则、SLO定义、可观测性基础设施
    • 上下文:功能实现、成功指标、运维要求
  3. 文档与知识转移
    • 使用Task工具,指定subagent_type="documentation-generation::docs-architect"
    • 提示语:"为以下功能生成全面文档:$ARGUMENTS。创建API文档、用户指南、部署指南、故障排查手册。包含架构图、数据流图和集成指南。从提交记录自动生成变更日志。"
    • 预期输出:API文档、用户指南、操作手册、架构文档
    • 上下文:所有前序阶段的输出内容

Execution Parameters

执行参数

Required Parameters

必填参数

  • --feature: Feature name and description
  • --methodology: Development approach (traditional|tdd|bdd|ddd)
  • --complexity: Feature complexity level (simple|medium|complex|epic)
  • --feature: 功能名称与描述
  • --methodology: 开发方法论(traditional|tdd|bdd|ddd)
  • --complexity: 功能复杂程度(simple|medium|complex|epic)

Optional Parameters

可选参数

  • --deployment-strategy: Deployment approach (direct|canary|feature-flag|blue-green|a-b-test)
  • --test-coverage-min: Minimum test coverage threshold (default: 80%)
  • --performance-budget: Performance requirements (e.g., <200ms response time)
  • --rollout-percentage: Initial rollout percentage for gradual deployment (default: 5%)
  • --feature-flag-service: Feature flag provider (launchdarkly|split|unleash|custom)
  • --analytics-platform: Analytics integration (segment|amplitude|mixpanel|custom)
  • --monitoring-stack: Observability tools (datadog|newrelic|grafana|custom)
  • --deployment-strategy: 部署策略(direct|canary|feature-flag|blue-green|a-b-test)
  • --test-coverage-min: 最低测试覆盖率阈值(默认:80%)
  • --performance-budget: 性能要求(例如:<200ms响应时间)
  • --rollout-percentage: 渐进式部署初始流量占比(默认:5%)
  • --feature-flag-service: Feature flag提供商(launchdarkly|split|unleash|custom)
  • --analytics-platform: 分析平台集成(segment|amplitude|mixpanel|custom)
  • --monitoring-stack: 可观测性工具(datadog|newrelic|grafana|custom)

Success Criteria

成功标准

  • All acceptance criteria from business requirements are met
  • Test coverage exceeds minimum threshold (80% default)
  • Security scan shows no critical vulnerabilities
  • Performance meets defined budgets and SLOs
  • Feature flags configured for controlled rollout
  • Monitoring and alerting fully operational
  • Documentation complete and approved
  • Successful deployment to production with rollback capability
  • Product analytics tracking feature usage
  • A/B test metrics configured (if applicable)
  • 满足业务需求中的所有验收标准
  • 测试覆盖率超过最低阈值(默认80%)
  • 安全扫描无严重漏洞
  • 性能符合定义的预算和SLO
  • 已配置feature flags用于可控发布
  • 监控和告警完全可用
  • 文档完整并通过审批
  • 成功部署到生产环境且具备回滚能力
  • 产品分析已跟踪功能使用情况
  • 已配置A/B测试指标(如适用)

Rollback Strategy

回滚策略

If issues arise during or after deployment:
  1. Immediate feature flag disable (< 1 minute)
  2. Blue-green traffic switch (< 5 minutes)
  3. Full deployment rollback via CI/CD (< 15 minutes)
  4. Database migration rollback if needed (coordinate with data team)
  5. Incident post-mortem and fixes before re-deployment
Feature description: $ARGUMENTS
如果在部署期间或之后出现问题:
  1. 立即禁用feature flag(<1分钟)
  2. 切换蓝绿流量(<5分钟)
  3. 通过CI/CD执行全量部署回滚(<15分钟)
  4. 如有需要,回滚数据库迁移(与数据团队协调)
  5. 进行事件复盘并修复问题后再重新部署
功能描述:$ARGUMENTS