mirror of
https://github.com/wshobson/agents.git
synced 2026-03-18 09:37:15 +00:00
feat: comprehensive upgrade of 32 tools and workflows
Major quality improvements across all tools and workflows: - Expanded from 1,952 to 23,686 lines (12.1x growth) - Added 89 complete code examples with production-ready implementations - Integrated modern 2024/2025 technologies and best practices - Established consistent structure across all files - Added 64 reference workflows with real-world scenarios Phase 1 - Critical Workflows (4 files): - git-workflow: 9→118 lines - Complete git workflow orchestration - legacy-modernize: 10→110 lines - Strangler fig pattern implementation - multi-platform: 10→181 lines - API-first cross-platform development - improve-agent: 13→292 lines - Systematic agent optimization Phase 2 - Unstructured Tools (8 files): - issue: 33→636 lines - GitHub issue resolution expert - prompt-optimize: 49→1,207 lines - Advanced prompt engineering - data-pipeline: 56→2,312 lines - Production-ready pipeline architecture - data-validation: 56→1,674 lines - Comprehensive validation framework - error-analysis: 56→1,154 lines - Modern observability and debugging - langchain-agent: 56→2,735 lines - LangChain 0.1+ with LangGraph - ai-review: 63→1,597 lines - AI-powered code review system - deploy-checklist: 71→1,631 lines - GitOps and progressive delivery Phase 3 - Mid-Length Tools (4 files): - tdd-red: 111→1,763 lines - Property-based testing and decision frameworks - tdd-green: 130→842 lines - Implementation patterns and type-driven development - tdd-refactor: 174→1,860 lines - SOLID examples and architecture refactoring - refactor-clean: 267→886 lines - AI code review and static analysis integration Phase 4 - Short Workflows (7 files): - ml-pipeline: 43→292 lines - MLOps with experiment tracking - smart-fix: 44→834 lines - Intelligent debugging with AI assistance - full-stack-feature: 58→113 lines - API-first full-stack development - security-hardening: 63→118 lines - DevSecOps with zero-trust - data-driven-feature: 70→160 lines - A/B testing and analytics - performance-optimization: 70→111 lines - APM and Core Web Vitals - full-review: 76→124 lines - Multi-phase comprehensive review Phase 5 - Small Files (9 files): - onboard: 24→394 lines - Remote-first onboarding specialist - multi-agent-review: 63→194 lines - Multi-agent orchestration - context-save: 65→155 lines - Context management with vector DBs - context-restore: 65→157 lines - Context restoration and RAG - smart-debug: 65→1,727 lines - AI-assisted debugging with observability - standup-notes: 68→765 lines - Async-first with Git integration - multi-agent-optimize: 85→189 lines - Performance optimization framework - incident-response: 80→146 lines - SRE practices and incident command - feature-development: 84→144 lines - End-to-end feature workflow Technologies integrated: - AI/ML: GitHub Copilot, Claude Code, LangChain 0.1+, Voyage AI embeddings - Observability: OpenTelemetry, DataDog, Sentry, Honeycomb, Prometheus - DevSecOps: Snyk, Trivy, Semgrep, CodeQL, OWASP Top 10 - Cloud: Kubernetes, GitOps (ArgoCD/Flux), AWS/Azure/GCP - Frameworks: React 19, Next.js 15, FastAPI, Django 5, Pydantic v2 - Data: Apache Spark, Airflow, Delta Lake, Great Expectations All files now include: - Clear role statements and expertise definitions - Structured Context/Requirements sections - 6-8 major instruction sections (tools) or 3-4 phases (workflows) - Multiple complete code examples in various languages - Modern framework integrations - Real-world reference implementations
This commit is contained in:
@@ -1,75 +1,160 @@
|
||||
---
|
||||
model: sonnet
|
||||
---
|
||||
# Data-Driven Feature Development
|
||||
|
||||
Build data-driven features with integrated pipelines and ML capabilities using specialized agents:
|
||||
Build features guided by data insights, A/B testing, and continuous measurement using specialized agents for analysis, implementation, and experimentation.
|
||||
|
||||
[Extended thinking: This workflow orchestrates data scientists, data engineers, backend architects, and AI engineers to build features that leverage data pipelines, analytics, and machine learning. Each agent contributes their expertise to create a complete data-driven solution.]
|
||||
[Extended thinking: This workflow orchestrates a comprehensive data-driven development process from initial data analysis and hypothesis formulation through feature implementation with integrated analytics, A/B testing infrastructure, and post-launch analysis. Each phase leverages specialized agents to ensure features are built based on data insights, properly instrumented for measurement, and validated through controlled experiments. The workflow emphasizes modern product analytics practices, statistical rigor in testing, and continuous learning from user behavior.]
|
||||
|
||||
## Phase 1: Data Analysis and Design
|
||||
## Phase 1: Data Analysis and Hypothesis Formation
|
||||
|
||||
### 1. Data Requirements Analysis
|
||||
### 1. Exploratory Data Analysis
|
||||
- Use Task tool with subagent_type="data-scientist"
|
||||
- Prompt: "Analyze data requirements for: $ARGUMENTS. Identify data sources, required transformations, analytics needs, and potential ML opportunities."
|
||||
- Output: Data analysis report, feature engineering requirements, ML feasibility
|
||||
- Prompt: "Perform exploratory data analysis for feature: $ARGUMENTS. Analyze existing user behavior data, identify patterns and opportunities, segment users by behavior, and calculate baseline metrics. Use modern analytics tools (Amplitude, Mixpanel, Segment) to understand current user journeys, conversion funnels, and engagement patterns."
|
||||
- Output: EDA report with visualizations, user segments, behavioral patterns, baseline metrics
|
||||
|
||||
### 2. Data Pipeline Architecture
|
||||
- Use Task tool with subagent_type="data-engineer"
|
||||
- Prompt: "Design data pipeline architecture for: $ARGUMENTS. Include ETL/ELT processes, data storage, streaming requirements, and integration with existing systems based on data scientist's analysis."
|
||||
- Output: Pipeline architecture, technology stack, data flow diagrams
|
||||
### 2. Business Hypothesis Development
|
||||
- Use Task tool with subagent_type="business-analyst"
|
||||
- Context: Data scientist's EDA findings and behavioral patterns
|
||||
- Prompt: "Formulate business hypotheses for feature: $ARGUMENTS based on data analysis. Define clear success metrics, expected impact on key business KPIs, target user segments, and minimum detectable effects. Create measurable hypotheses using frameworks like ICE scoring or RICE prioritization."
|
||||
- Output: Hypothesis document, success metrics definition, expected ROI calculations
|
||||
|
||||
## Phase 2: Backend Integration
|
||||
### 3. Statistical Experiment Design
|
||||
- Use Task tool with subagent_type="data-scientist"
|
||||
- Context: Business hypotheses and success metrics
|
||||
- Prompt: "Design statistical experiment for feature: $ARGUMENTS. Calculate required sample size for statistical power, define control and treatment groups, specify randomization strategy, and plan for multiple testing corrections. Consider Bayesian A/B testing approaches for faster decision making. Design for both primary and guardrail metrics."
|
||||
- Output: Experiment design document, power analysis, statistical test plan
|
||||
|
||||
### 3. API and Service Design
|
||||
## Phase 2: Feature Architecture and Analytics Design
|
||||
|
||||
### 4. Feature Architecture Planning
|
||||
- Use Task tool with subagent_type="backend-architect"
|
||||
- Prompt: "Design backend services to support data-driven feature: $ARGUMENTS. Include APIs for data ingestion, analytics endpoints, and ML model serving based on pipeline architecture."
|
||||
- Output: Service architecture, API contracts, integration patterns
|
||||
- Context: Business requirements and experiment design
|
||||
- Prompt: "Design feature architecture for: $ARGUMENTS with A/B testing capability. Include feature flag integration (LaunchDarkly, Split.io, or Optimizely), gradual rollout strategy, circuit breakers for safety, and clean separation between control and treatment logic. Ensure architecture supports real-time configuration updates."
|
||||
- Output: Architecture diagrams, feature flag schema, rollout strategy
|
||||
|
||||
### 4. Database and Storage Design
|
||||
- Use Task tool with subagent_type="database-optimizer"
|
||||
- Prompt: "Design optimal database schema and storage strategy for: $ARGUMENTS. Consider both transactional and analytical workloads, time-series data, and ML feature stores."
|
||||
- Output: Database schemas, indexing strategies, storage recommendations
|
||||
|
||||
## Phase 3: ML and AI Implementation
|
||||
|
||||
### 5. ML Pipeline Development
|
||||
- Use Task tool with subagent_type="ml-engineer"
|
||||
- Prompt: "Implement ML pipeline for: $ARGUMENTS. Include feature engineering, model training, validation, and deployment based on data scientist's requirements."
|
||||
- Output: ML pipeline code, model artifacts, deployment strategy
|
||||
|
||||
### 6. AI Integration
|
||||
- Use Task tool with subagent_type="ai-engineer"
|
||||
- Prompt: "Build AI-powered features for: $ARGUMENTS. Integrate LLMs, implement RAG if needed, and create intelligent automation based on ML engineer's models."
|
||||
- Output: AI integration code, prompt engineering, RAG implementation
|
||||
|
||||
## Phase 4: Implementation and Optimization
|
||||
|
||||
### 7. Data Pipeline Implementation
|
||||
### 5. Analytics Instrumentation Design
|
||||
- Use Task tool with subagent_type="data-engineer"
|
||||
- Prompt: "Implement production data pipelines for: $ARGUMENTS. Include real-time streaming, batch processing, and data quality monitoring based on all previous designs."
|
||||
- Output: Pipeline implementation, monitoring setup, data quality checks
|
||||
- Context: Feature architecture and success metrics
|
||||
- Prompt: "Design comprehensive analytics instrumentation for: $ARGUMENTS. Define event schemas for user interactions, specify properties for segmentation and analysis, design funnel tracking and conversion events, plan cohort analysis capabilities. Implement using modern SDKs (Segment, Amplitude, Mixpanel) with proper event taxonomy."
|
||||
- Output: Event tracking plan, analytics schema, instrumentation guide
|
||||
|
||||
### 8. Performance Optimization
|
||||
- Use Task tool with subagent_type="performance-engineer"
|
||||
- Prompt: "Optimize data processing and model serving performance for: $ARGUMENTS. Focus on query optimization, caching strategies, and model inference speed."
|
||||
- Output: Performance improvements, caching layers, optimization report
|
||||
### 6. Data Pipeline Architecture
|
||||
- Use Task tool with subagent_type="data-engineer"
|
||||
- Context: Analytics requirements and existing data infrastructure
|
||||
- Prompt: "Design data pipelines for feature: $ARGUMENTS. Include real-time streaming for live metrics (Kafka, Kinesis), batch processing for detailed analysis, data warehouse integration (Snowflake, BigQuery), and feature store for ML if applicable. Ensure proper data governance and GDPR compliance."
|
||||
- Output: Pipeline architecture, ETL/ELT specifications, data flow diagrams
|
||||
|
||||
## Phase 5: Testing and Deployment
|
||||
## Phase 3: Implementation with Instrumentation
|
||||
|
||||
### 9. Comprehensive Testing
|
||||
- Use Task tool with subagent_type="test-automator"
|
||||
- Prompt: "Create test suites for data pipelines and ML components: $ARGUMENTS. Include data validation tests, model performance tests, and integration tests."
|
||||
- Output: Test suites, data quality tests, ML monitoring tests
|
||||
### 7. Backend Implementation
|
||||
- Use Task tool with subagent_type="backend-engineer"
|
||||
- Context: Architecture design and feature requirements
|
||||
- Prompt: "Implement backend for feature: $ARGUMENTS with full instrumentation. Include feature flag checks at decision points, comprehensive event tracking for all user actions, performance metrics collection, error tracking and monitoring. Implement proper logging for experiment analysis."
|
||||
- Output: Backend code with analytics, feature flag integration, monitoring setup
|
||||
|
||||
### 10. Production Deployment
|
||||
### 8. Frontend Implementation
|
||||
- Use Task tool with subagent_type="frontend-engineer"
|
||||
- Context: Backend APIs and analytics requirements
|
||||
- Prompt: "Build frontend for feature: $ARGUMENTS with analytics tracking. Implement event tracking for all user interactions, session recording integration if applicable, performance metrics (Core Web Vitals), and proper error boundaries. Ensure consistent experience between control and treatment groups."
|
||||
- Output: Frontend code with analytics, A/B test variants, performance monitoring
|
||||
|
||||
### 9. ML Model Integration (if applicable)
|
||||
- Use Task tool with subagent_type="ml-engineer"
|
||||
- Context: Feature requirements and data pipelines
|
||||
- Prompt: "Integrate ML models for feature: $ARGUMENTS if needed. Implement online inference with low latency, A/B testing between model versions, model performance tracking, and automatic fallback mechanisms. Set up model monitoring for drift detection."
|
||||
- Output: ML pipeline, model serving infrastructure, monitoring setup
|
||||
|
||||
## Phase 4: Pre-Launch Validation
|
||||
|
||||
### 10. Analytics Validation
|
||||
- Use Task tool with subagent_type="data-engineer"
|
||||
- Context: Implemented tracking and event schemas
|
||||
- Prompt: "Validate analytics implementation for: $ARGUMENTS. Test all event tracking in staging, verify data quality and completeness, validate funnel definitions, ensure proper user identification and session tracking. Run end-to-end tests for data pipeline."
|
||||
- Output: Validation report, data quality metrics, tracking coverage analysis
|
||||
|
||||
### 11. Experiment Setup
|
||||
- Use Task tool with subagent_type="platform-engineer"
|
||||
- Context: Feature flags and experiment design
|
||||
- Prompt: "Configure experiment infrastructure for: $ARGUMENTS. Set up feature flags with proper targeting rules, configure traffic allocation (start with 5-10%), implement kill switches, set up monitoring alerts for key metrics. Test randomization and assignment logic."
|
||||
- Output: Experiment configuration, monitoring dashboards, rollout plan
|
||||
|
||||
## Phase 5: Launch and Experimentation
|
||||
|
||||
### 12. Gradual Rollout
|
||||
- Use Task tool with subagent_type="deployment-engineer"
|
||||
- Prompt: "Deploy data-driven feature to production: $ARGUMENTS. Include pipeline orchestration, model deployment, monitoring, and rollback strategies."
|
||||
- Output: Deployment configurations, monitoring dashboards, operational runbooks
|
||||
- Context: Experiment configuration and monitoring setup
|
||||
- Prompt: "Execute gradual rollout for feature: $ARGUMENTS. Start with internal dogfooding, then beta users (1-5%), gradually increase to target traffic. Monitor error rates, performance metrics, and early indicators. Implement automated rollback on anomalies."
|
||||
- Output: Rollout execution, monitoring alerts, health metrics
|
||||
|
||||
### 13. Real-time Monitoring
|
||||
- Use Task tool with subagent_type="observability-engineer"
|
||||
- Context: Deployed feature and success metrics
|
||||
- Prompt: "Set up comprehensive monitoring for: $ARGUMENTS. Create real-time dashboards for experiment metrics, configure alerts for statistical significance, monitor guardrail metrics for negative impacts, track system performance and error rates. Use tools like Datadog, New Relic, or custom dashboards."
|
||||
- Output: Monitoring dashboards, alert configurations, SLO definitions
|
||||
|
||||
## Phase 6: Analysis and Decision Making
|
||||
|
||||
### 14. Statistical Analysis
|
||||
- Use Task tool with subagent_type="data-scientist"
|
||||
- Context: Experiment data and original hypotheses
|
||||
- Prompt: "Analyze A/B test results for: $ARGUMENTS. Calculate statistical significance with confidence intervals, check for segment-level effects, analyze secondary metrics impact, investigate any unexpected patterns. Use both frequentist and Bayesian approaches. Account for multiple testing if applicable."
|
||||
- Output: Statistical analysis report, significance tests, segment analysis
|
||||
|
||||
### 15. Business Impact Assessment
|
||||
- Use Task tool with subagent_type="business-analyst"
|
||||
- Context: Statistical analysis and business metrics
|
||||
- Prompt: "Assess business impact of feature: $ARGUMENTS. Calculate actual vs expected ROI, analyze impact on key business metrics, evaluate cost-benefit including operational overhead, project long-term value. Make recommendation on full rollout, iteration, or rollback."
|
||||
- Output: Business impact report, ROI analysis, recommendation document
|
||||
|
||||
### 16. Post-Launch Optimization
|
||||
- Use Task tool with subagent_type="data-scientist"
|
||||
- Context: Launch results and user feedback
|
||||
- Prompt: "Identify optimization opportunities for: $ARGUMENTS based on data. Analyze user behavior patterns in treatment group, identify friction points in user journey, suggest improvements based on data, plan follow-up experiments. Use cohort analysis for long-term impact."
|
||||
- Output: Optimization recommendations, follow-up experiment plans
|
||||
|
||||
## Configuration Options
|
||||
|
||||
```yaml
|
||||
experiment_config:
|
||||
min_sample_size: 10000
|
||||
confidence_level: 0.95
|
||||
runtime_days: 14
|
||||
traffic_allocation: "gradual" # gradual, fixed, or adaptive
|
||||
|
||||
analytics_platforms:
|
||||
- amplitude
|
||||
- segment
|
||||
- mixpanel
|
||||
|
||||
feature_flags:
|
||||
provider: "launchdarkly" # launchdarkly, split, optimizely, unleash
|
||||
|
||||
statistical_methods:
|
||||
- frequentist
|
||||
- bayesian
|
||||
|
||||
monitoring:
|
||||
- real_time_metrics: true
|
||||
- anomaly_detection: true
|
||||
- automatic_rollback: true
|
||||
```
|
||||
|
||||
## Success Criteria
|
||||
|
||||
- **Data Coverage**: 100% of user interactions tracked with proper event schema
|
||||
- **Experiment Validity**: Proper randomization, sufficient statistical power, no sample ratio mismatch
|
||||
- **Statistical Rigor**: Clear significance testing, proper confidence intervals, multiple testing corrections
|
||||
- **Business Impact**: Measurable improvement in target metrics without degrading guardrail metrics
|
||||
- **Technical Performance**: No degradation in p95 latency, error rates below 0.1%
|
||||
- **Decision Speed**: Clear go/no-go decision within planned experiment runtime
|
||||
- **Learning Outcomes**: Documented insights for future feature development
|
||||
|
||||
## Coordination Notes
|
||||
- Data flow and requirements cascade from data scientists to engineers
|
||||
- ML models must integrate seamlessly with backend services
|
||||
- Performance considerations apply to both data processing and model serving
|
||||
- Maintain data lineage and versioning throughout the pipeline
|
||||
|
||||
Data-driven feature to build: $ARGUMENTS
|
||||
- Data scientists and business analysts collaborate on hypothesis formation
|
||||
- Engineers implement with analytics as first-class requirement, not afterthought
|
||||
- Feature flags enable safe experimentation without full deployments
|
||||
- Real-time monitoring allows for quick iteration and rollback if needed
|
||||
- Statistical rigor balanced with business practicality and speed to market
|
||||
- Continuous learning loop feeds back into next feature development cycle
|
||||
|
||||
Feature to develop with data-driven approach: $ARGUMENTS
|
||||
Reference in New Issue
Block a user