mirror of
https://github.com/wshobson/agents.git
synced 2026-03-18 17:47:16 +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,80 +1,124 @@
|
||||
---
|
||||
model: sonnet
|
||||
---
|
||||
Orchestrate comprehensive multi-dimensional code review using specialized review agents
|
||||
|
||||
Perform a comprehensive review using multiple specialized agents with explicit Task tool invocations:
|
||||
[Extended thinking: This workflow performs an exhaustive code review by orchestrating multiple specialized agents in sequential phases. Each phase builds upon previous findings to create a comprehensive review that covers code quality, security, performance, testing, documentation, and best practices. The workflow integrates modern AI-assisted review tools, static analysis, security scanning, and automated quality metrics. Results are consolidated into actionable feedback with clear prioritization and remediation guidance. The phased approach ensures thorough coverage while maintaining efficiency through parallel agent execution where appropriate.]
|
||||
|
||||
[Extended thinking: This workflow performs a thorough multi-perspective review by orchestrating specialized review agents. Each agent examines different aspects and the results are consolidated into a unified action plan. Includes TDD compliance verification when enabled.]
|
||||
## Review Configuration Options
|
||||
|
||||
## Review Configuration
|
||||
- **--security-focus**: Prioritize security vulnerabilities and OWASP compliance
|
||||
- **--performance-critical**: Emphasize performance bottlenecks and scalability issues
|
||||
- **--tdd-review**: Include TDD compliance and test-first verification
|
||||
- **--ai-assisted**: Enable AI-powered review tools (Copilot, Codium, Bito)
|
||||
- **--strict-mode**: Fail review on any critical issues found
|
||||
- **--metrics-report**: Generate detailed quality metrics dashboard
|
||||
- **--framework [name]**: Apply framework-specific best practices (React, Spring, Django, etc.)
|
||||
|
||||
- **Standard Review**: Traditional comprehensive review (default)
|
||||
- **TDD-Enhanced Review**: Includes TDD compliance and test-first verification
|
||||
- Enable with **--tdd-review** flag
|
||||
- Verifies red-green-refactor cycle adherence
|
||||
- Checks test-first implementation patterns
|
||||
## Phase 1: Code Quality & Architecture Review
|
||||
|
||||
Execute parallel reviews using Task tool with specialized agents:
|
||||
Use Task tool to orchestrate quality and architecture agents in parallel:
|
||||
|
||||
## 1. Code Quality Review
|
||||
### 1A. Code Quality Analysis
|
||||
- Use Task tool with subagent_type="code-reviewer"
|
||||
- Prompt: "Review code quality and maintainability for: $ARGUMENTS. Check for code smells, readability, documentation, and adherence to best practices."
|
||||
- Focus: Clean code principles, SOLID, DRY, naming conventions
|
||||
- Prompt: "Perform comprehensive code quality review for: $ARGUMENTS. Analyze code complexity, maintainability index, technical debt, code duplication, naming conventions, and adherence to Clean Code principles. Integrate with SonarQube, CodeQL, and Semgrep for static analysis. Check for code smells, anti-patterns, and violations of SOLID principles. Generate cyclomatic complexity metrics and identify refactoring opportunities."
|
||||
- Expected output: Quality metrics, code smell inventory, refactoring recommendations
|
||||
- Context: Initial codebase analysis, no dependencies on other phases
|
||||
|
||||
## 2. Security Audit
|
||||
### 1B. Architecture & Design Review
|
||||
- Use Task tool with subagent_type="architect-review"
|
||||
- Prompt: "Review architectural design patterns and structural integrity in: $ARGUMENTS. Evaluate microservices boundaries, API design, database schema, dependency management, and adherence to Domain-Driven Design principles. Check for circular dependencies, inappropriate coupling, missing abstractions, and architectural drift. Verify compliance with enterprise architecture standards and cloud-native patterns."
|
||||
- Expected output: Architecture assessment, design pattern analysis, structural recommendations
|
||||
- Context: Runs parallel with code quality analysis
|
||||
|
||||
## Phase 2: Security & Performance Review
|
||||
|
||||
Use Task tool with security and performance agents, incorporating Phase 1 findings:
|
||||
|
||||
### 2A. Security Vulnerability Assessment
|
||||
- Use Task tool with subagent_type="security-auditor"
|
||||
- Prompt: "Perform security audit on: $ARGUMENTS. Check for vulnerabilities, OWASP compliance, authentication issues, and data protection."
|
||||
- Focus: Injection risks, authentication, authorization, data encryption
|
||||
- Prompt: "Execute comprehensive security audit on: $ARGUMENTS. Perform OWASP Top 10 analysis, dependency vulnerability scanning with Snyk/Trivy, secrets detection with GitLeaks, input validation review, authentication/authorization assessment, and cryptographic implementation review. Include findings from Phase 1 architecture review: {phase1_architecture_context}. Check for SQL injection, XSS, CSRF, insecure deserialization, and configuration security issues."
|
||||
- Expected output: Vulnerability report, CVE list, security risk matrix, remediation steps
|
||||
- Context: Incorporates architectural vulnerabilities identified in Phase 1B
|
||||
|
||||
## 3. Architecture Review
|
||||
- Use Task tool with subagent_type="architect-reviewer"
|
||||
- Prompt: "Review architectural design and patterns in: $ARGUMENTS. Evaluate scalability, maintainability, and adherence to architectural principles."
|
||||
- Focus: Service boundaries, coupling, cohesion, design patterns
|
||||
|
||||
## 4. Performance Analysis
|
||||
### 2B. Performance & Scalability Analysis
|
||||
- Use Task tool with subagent_type="performance-engineer"
|
||||
- Prompt: "Analyze performance characteristics of: $ARGUMENTS. Identify bottlenecks, resource usage, and optimization opportunities."
|
||||
- Focus: Response times, memory usage, database queries, caching
|
||||
- Prompt: "Conduct performance analysis and scalability assessment for: $ARGUMENTS. Profile code for CPU/memory hotspots, analyze database query performance, review caching strategies, identify N+1 problems, assess connection pooling, and evaluate asynchronous processing patterns. Consider architectural findings from Phase 1: {phase1_architecture_context}. Check for memory leaks, resource contention, and bottlenecks under load."
|
||||
- Expected output: Performance metrics, bottleneck analysis, optimization recommendations
|
||||
- Context: Uses architecture insights to identify systemic performance issues
|
||||
|
||||
## 5. Test Coverage Assessment
|
||||
## Phase 3: Testing & Documentation Review
|
||||
|
||||
Use Task tool for test and documentation quality assessment:
|
||||
|
||||
### 3A. Test Coverage & Quality Analysis
|
||||
- Use Task tool with subagent_type="test-automator"
|
||||
- Prompt: "Evaluate test coverage and quality for: $ARGUMENTS. Assess unit tests, integration tests, and identify gaps in test coverage."
|
||||
- Focus: Coverage metrics, test quality, edge cases, test maintainability
|
||||
- Prompt: "Evaluate testing strategy and implementation for: $ARGUMENTS. Analyze unit test coverage, integration test completeness, end-to-end test scenarios, test pyramid adherence, and test maintainability. Review test quality metrics including assertion density, test isolation, mock usage, and flakiness. Consider security and performance test requirements from Phase 2: {phase2_security_context}, {phase2_performance_context}. Verify TDD practices if --tdd-review flag is set."
|
||||
- Expected output: Coverage report, test quality metrics, testing gap analysis
|
||||
- Context: Incorporates security and performance testing requirements from Phase 2
|
||||
|
||||
## 6. TDD Compliance Review (When --tdd-review is enabled)
|
||||
- Use Task tool with subagent_type="tdd-orchestrator"
|
||||
- Prompt: "Verify TDD compliance for: $ARGUMENTS. Check for test-first development patterns, red-green-refactor cycles, and test-driven design."
|
||||
- Focus on TDD metrics:
|
||||
- **Test-First Verification**: Were tests written before implementation?
|
||||
- **Red-Green-Refactor Cycles**: Evidence of proper TDD cycles
|
||||
- **Test Coverage Trends**: Coverage growth patterns during development
|
||||
- **Test Granularity**: Appropriate test size and scope
|
||||
- **Refactoring Evidence**: Code improvements with test safety net
|
||||
- **Test Quality**: Tests that drive design, not just verify behavior
|
||||
### 3B. Documentation & API Specification Review
|
||||
- Use Task tool with subagent_type="docs-architect"
|
||||
- Prompt: "Review documentation completeness and quality for: $ARGUMENTS. Assess inline code documentation, API documentation (OpenAPI/Swagger), architecture decision records (ADRs), README completeness, deployment guides, and runbooks. Verify documentation reflects actual implementation based on all previous phase findings: {phase1_context}, {phase2_context}. Check for outdated documentation, missing examples, and unclear explanations."
|
||||
- Expected output: Documentation coverage report, inconsistency list, improvement recommendations
|
||||
- Context: Cross-references all previous findings to ensure documentation accuracy
|
||||
|
||||
## Consolidated Report Structure
|
||||
Compile all feedback into a unified report:
|
||||
- **Critical Issues** (must fix): Security vulnerabilities, broken functionality, architectural flaws
|
||||
- **Recommendations** (should fix): Performance bottlenecks, code quality issues, missing tests
|
||||
- **Suggestions** (nice to have): Refactoring opportunities, documentation improvements
|
||||
- **Positive Feedback** (what's done well): Good practices to maintain and replicate
|
||||
## Phase 4: Best Practices & Standards Compliance
|
||||
|
||||
### TDD-Specific Metrics (When --tdd-review is enabled)
|
||||
Additional TDD compliance report section:
|
||||
- **TDD Adherence Score**: Percentage of code developed using TDD methodology
|
||||
- **Test-First Evidence**: Commits showing tests before implementation
|
||||
- **Cycle Completeness**: Percentage of complete red-green-refactor cycles
|
||||
- **Test Design Quality**: How well tests drive the design
|
||||
- **Coverage Delta Analysis**: Coverage changes correlated with feature additions
|
||||
- **Refactoring Frequency**: Evidence of continuous improvement
|
||||
- **Test Execution Time**: Performance of test suite
|
||||
- **Test Stability**: Flakiness and reliability metrics
|
||||
Use Task tool to verify framework-specific and industry best practices:
|
||||
|
||||
## Review Options
|
||||
### 4A. Framework & Language Best Practices
|
||||
- Use Task tool with subagent_type="framework-specialist"
|
||||
- Prompt: "Verify adherence to framework and language best practices for: $ARGUMENTS. Check modern JavaScript/TypeScript patterns, React hooks best practices, Python PEP compliance, Java enterprise patterns, Go idiomatic code, or framework-specific conventions (based on --framework flag). Review package management, build configuration, environment handling, and deployment practices. Include all quality issues from previous phases: {all_previous_contexts}."
|
||||
- Expected output: Best practices compliance report, modernization recommendations
|
||||
- Context: Synthesizes all previous findings for framework-specific guidance
|
||||
|
||||
- **--tdd-review**: Enable TDD compliance checking
|
||||
- **--strict-tdd**: Fail review if TDD practices not followed
|
||||
- **--tdd-metrics**: Generate detailed TDD metrics report
|
||||
- **--test-first-only**: Only review code with test-first evidence
|
||||
### 4B. CI/CD & DevOps Practices Review
|
||||
- Use Task tool with subagent_type="devops-engineer"
|
||||
- Prompt: "Review CI/CD pipeline and DevOps practices for: $ARGUMENTS. Evaluate build automation, test automation integration, deployment strategies (blue-green, canary), infrastructure as code, monitoring/observability setup, and incident response procedures. Assess pipeline security, artifact management, and rollback capabilities. Consider all issues identified in previous phases that impact deployment: {all_critical_issues}."
|
||||
- Expected output: Pipeline assessment, DevOps maturity evaluation, automation recommendations
|
||||
- Context: Focuses on operationalizing fixes for all identified issues
|
||||
|
||||
Target: $ARGUMENTS
|
||||
## Consolidated Report Generation
|
||||
|
||||
Compile all phase outputs into comprehensive review report:
|
||||
|
||||
### Critical Issues (P0 - Must Fix Immediately)
|
||||
- Security vulnerabilities with CVSS > 7.0
|
||||
- Data loss or corruption risks
|
||||
- Authentication/authorization bypasses
|
||||
- Production stability threats
|
||||
- Compliance violations (GDPR, PCI DSS, SOC2)
|
||||
|
||||
### High Priority (P1 - Fix Before Next Release)
|
||||
- Performance bottlenecks impacting user experience
|
||||
- Missing critical test coverage
|
||||
- Architectural anti-patterns causing technical debt
|
||||
- Outdated dependencies with known vulnerabilities
|
||||
- Code quality issues affecting maintainability
|
||||
|
||||
### Medium Priority (P2 - Plan for Next Sprint)
|
||||
- Non-critical performance optimizations
|
||||
- Documentation gaps and inconsistencies
|
||||
- Code refactoring opportunities
|
||||
- Test quality improvements
|
||||
- DevOps automation enhancements
|
||||
|
||||
### Low Priority (P3 - Track in Backlog)
|
||||
- Style guide violations
|
||||
- Minor code smell issues
|
||||
- Nice-to-have documentation updates
|
||||
- Cosmetic improvements
|
||||
|
||||
## Success Criteria
|
||||
|
||||
Review is considered successful when:
|
||||
- All critical security vulnerabilities are identified and documented
|
||||
- Performance bottlenecks are profiled with remediation paths
|
||||
- Test coverage gaps are mapped with priority recommendations
|
||||
- Architecture risks are assessed with mitigation strategies
|
||||
- Documentation reflects actual implementation state
|
||||
- Framework best practices compliance is verified
|
||||
- CI/CD pipeline supports safe deployment of reviewed code
|
||||
- Clear, actionable feedback is provided for all findings
|
||||
- Metrics dashboard shows improvement trends
|
||||
- Team has clear prioritized action plan for remediation
|
||||
|
||||
Target: $ARGUMENTS
|
||||
Reference in New Issue
Block a user