Installs: 0
Used in: 1 repos
Updated: 1d ago
$
npx ai-builder add command lancejames221b/workflowsInstalls to .claude/commands/workflows.md
# workflows - Command Workflows & Patterns ## Purpose Comprehensive workflow system that provides step-by-step guidance for common operational patterns, showing how hAIveMind commands work together to accomplish complex tasks efficiently and reliably. ## When to Use - **Complex Operations**: Multi-step procedures requiring coordination across multiple agents - **Incident Response**: Structured approach to handling system outages and emergencies - **Daily Operations**: Routine maintenance and monitoring workflows - **Security Procedures**: Systematic security assessment and response workflows - **Deployment Management**: Coordinated deployment and rollback procedures - **Knowledge Transfer**: Learning operational best practices from collective experience ## Syntax ``` workflows [workflow_type] ``` ## Parameters - **workflow_type** (optional): Specific workflow category to display - `incident_response` - Emergency incident handling procedures - `daily_maintenance` - Regular system health and maintenance routines - `security_audit` - Comprehensive security assessment workflows - `deployment` - Application deployment and rollback procedures - `monitoring_setup` - Proactive monitoring and alerting configuration - `knowledge_management` - Information capture and sharing workflows ## Intelligent Workflow Features ### Context-Aware Recommendations - **Incident Detection**: Automatically suggests incident response workflows during active issues - **Project Type Adaptation**: Workflows adapted for Python, Node.js, Rust, Go projects - **Agent Availability**: Adjusts workflows based on currently available specialist agents - **Historical Success**: Prioritizes workflows with highest success rates - **Time-Sensitive Operations**: Highlights urgent workflows during critical situations ### Success Metrics and Analytics - **Completion Rates**: Shows workflow success percentages based on historical data - **Time Estimates**: Realistic time estimates based on actual execution data - **Bottleneck Identification**: Identifies common failure points and provides alternatives - **Performance Optimization**: Suggests workflow improvements based on collective experience - **Effectiveness Tracking**: Monitors which workflows lead to successful outcomes ## Real-World Examples ### Show All Available Workflows ``` workflows ``` **Result**: Complete catalog of available workflows with success rates, time estimates, and context-aware recommendations ### Incident Response Workflow ``` workflows incident_response ``` **Result**: Step-by-step incident handling procedures with decision trees and escalation paths ### Daily Maintenance Routine ``` workflows daily_maintenance ``` **Result**: Structured daily operational checklist with health monitoring and preventive maintenance ### Security Audit Workflow ``` workflows security_audit ``` **Result**: Comprehensive security assessment procedures with compliance verification ## Expected Output ### Complete Workflow Catalog ``` š hAIveMind Command Workflows & Patterns - 2025-01-24 14:30:00 š Available Workflows (6 total): šØ Incident Response Workflow ā³ Handle system incidents and outages with coordinated team response ā³ Estimated Time: 15-30 minutes ā³ Success Rate: 94% (47 successful completions) ā³ Last Used: 2 hours ago (database connectivity incident) š§ Daily Maintenance Routine ā³ Regular health checks and preventive maintenance procedures ā³ Estimated Time: 5-10 minutes ā³ Success Rate: 98% (156 successful completions) ā³ Recommended: Every morning at 9:00 AM š”ļø Security Audit Workflow ā³ Comprehensive security assessment and vulnerability management ā³ Estimated Time: 30-60 minutes ā³ Success Rate: 91% (23 successful completions) ā³ Recommended: Weekly on Fridays š Deployment Workflow ā³ Coordinated application deployment with rollback procedures ā³ Estimated Time: 10-25 minutes ā³ Success Rate: 96% (89 successful completions) ā³ Last Used: Yesterday (API v2.1.3 deployment) š Monitoring Setup Workflow ā³ Proactive monitoring and alerting configuration ā³ Estimated Time: 20-45 minutes ā³ Success Rate: 89% (34 successful completions) ā³ Recommended: After infrastructure changes š§ Knowledge Management Workflow ā³ Information capture, documentation, and sharing procedures ā³ Estimated Time: 5-15 minutes ā³ Success Rate: 97% (78 successful completions) ā³ Recommended: After resolving issues or learning new procedures šÆ Context Recommendations (Based on Current Situation): ā³ Active incident detected: Start with 'Incident Response Workflow' ā³ Python project: Include deployment workflow considerations ā³ Recent security queries: Consider 'Security Audit Workflow' ā³ Morning routine: 'Daily Maintenance Routine' recommended š Popular Command Patterns (Last 30 Days): 1. hv-status ā hv-query ā hv-delegate (used 23 times, 96% success) 2. hv-broadcast ā hv-delegate ā hv-status (used 18 times, 94% success) 3. remember ā hv-broadcast ā hv-query (used 15 times, 100% success) 4. hv-query ā recall ā remember (used 12 times, 92% success) š” Workflow Optimization Tips: ā³ Workflows with >95% success rate are considered highly reliable ā³ Time estimates based on median completion times across all agents ā³ Success rates improve with practice - repeat workflows become faster ā³ Custom workflows can be created by documenting successful command sequences ``` ### Incident Response Workflow Detail ``` šØ Incident Response Workflow - Emergency System Recovery š Overview: ā³ Purpose: Systematic approach to handling system incidents and outages ā³ Success Rate: 94% (47 completions) ā³ Average Duration: 22 minutes ā³ Last Updated: Based on collective experience from 156 incidents š Workflow Steps: Step 1: š Initial Assessment (2-3 minutes) Command: hv-status --detailed Purpose: Assess collective health and identify scope of issue Success Criteria: ā Agent availability confirmed, ā Issue scope identified Expected Output: ⢠Agent response times and availability ⢠System resource utilization ⢠Active alerts and warnings ⢠Network connectivity status Decision Point: If >50% agents unresponsive ā Escalate to critical Step 2: š¢ Team Notification (1-2 minutes) Command: hv-broadcast "[incident description]" incident critical Purpose: Alert all agents and activate incident response team Success Criteria: ā All available agents notified, ā Response team activated Message Template: "System incident detected: [brief description] - investigating" Parameters: ⢠Use 'critical' severity for customer-impacting issues ⢠Use 'warning' severity for internal/performance issues ⢠Include affected systems and initial impact assessment Step 3: šÆ Task Delegation (3-5 minutes) Command: hv-delegate "[specific investigation task]" [specialist_type] Purpose: Assign specific investigation and remediation tasks Success Criteria: ā Tasks assigned to appropriate specialists, ā Investigation begun Common Delegations: ⢠"Investigate database connection issues" ā database_ops ⢠"Check load balancer health and routing" ā infrastructure_management ⢠"Analyze application error logs" ā development ⢠"Monitor network connectivity" ā monitoring Parallel Execution: Delegate multiple tasks simultaneously for faster resolution Step 4: š Knowledge Search (2-4 minutes) Command: hv-query "[incident keywords] similar issues resolution" Purpose: Find similar past incidents and proven solutions Success Criteria: ā Relevant past incidents found, ā Solution patterns identified Search Strategies: ⢠Include error messages or symptoms ⢠Search for component names (database, load balancer, etc.) ⢠Look for time-based patterns (morning issues, deployment-related) ⢠Review recent changes that might be related Step 5: š§ Solution Implementation (5-15 minutes) Commands: Varies based on investigation findings Purpose: Execute remediation based on investigation results Success Criteria: ā Root cause identified, ā Solution implemented, ā Service restored Common Solutions: ⢠Service restarts: hv-delegate "Restart [service]" infrastructure_management ⢠Configuration rollbacks: hv-delegate "Rollback [config]" deployment ⢠Resource scaling: hv-delegate "Scale [resource]" infrastructure_management ⢠Database maintenance: hv-delegate "Clear [database issue]" database_ops Step 6: ā Verification and Communication (2-3 minutes) Commands: hv-status ā hv-broadcast Purpose: Verify resolution and communicate status to team Success Criteria: ā System health restored, ā Team notified of resolution Verification Checklist: ⢠All agents responding normally ⢠System metrics within normal ranges ⢠No active alerts or warnings ⢠Customer-facing services operational Resolution Message: "Incident resolved: [brief solution] - monitoring for stability" Step 7: š Documentation and Learning (3-5 minutes) Command: remember "[incident summary and resolution]" incidents Purpose: Document incident for future reference and learning Success Criteria: ā Incident documented, ā Solution preserved for collective knowledge Documentation Template: ⢠Root Cause: [technical cause] ⢠Impact: [affected systems and duration] ⢠Resolution: [steps taken to resolve] ⢠Prevention: [measures to prevent recurrence] ⢠Timeline: [key timestamps] šÆ Success Factors: ā Quick initial assessment prevents issue escalation ā Parallel task delegation reduces resolution time ā Knowledge search prevents reinventing solutions ā Clear communication keeps team coordinated ā Documentation prevents future similar incidents ā ļø Common Pitfalls: ā Skipping initial assessment leads to misdirected efforts ā Broadcasting too frequently creates noise and confusion ā Not delegating tasks results in single-point bottlenecks ā Forgetting documentation loses valuable learning opportunities š Performance Metrics: ⢠Median Resolution Time: 18 minutes ⢠90th Percentile: 35 minutes ⢠Customer Impact Reduction: 67% vs. ad-hoc response ⢠Team Satisfaction: 4.2/5 (based on post-incident surveys) š Related Workflows: ⢠Security Incident Response (for security-related issues) ⢠Deployment Rollback (for deployment-related incidents) ⢠Performance Investigation (for performance degradation) ``` ### Daily Maintenance Routine ``` š§ Daily Maintenance Routine - Proactive System Health š Overview: ā³ Purpose: Regular health checks and preventive maintenance ā³ Success Rate: 98% (156 completions) ā³ Average Duration: 7 minutes ā³ Recommended Schedule: Every morning at 9:00 AM š Workflow Steps: Step 1: š”ļø System Health Check (2-3 minutes) Command: hv-status Purpose: Get overview of collective health and identify any issues Success Criteria: ā All critical agents responding, ā No critical alerts Health Indicators to Monitor: ⢠Agent response times (should be <400ms) ⢠Memory usage (should be <60%) ⢠Network connectivity (should be >90% agents reachable) ⢠Active incidents (should be 0 critical incidents) Action Triggers: ⢠>3 agents offline ā Investigate connectivity ⢠Memory usage >80% ā Schedule cleanup ⢠Response times >800ms ā Check system resources Step 2: š Configuration Sync (1-2 minutes) Command: hv-sync Purpose: Ensure all agents have current configurations and commands Success Criteria: ā All configurations synchronized, ā No sync conflicts Sync Verification: ⢠Command versions match across agents ⢠Configuration files are current ⢠No pending updates or conflicts ⢠Agent registrations are up to date Step 3: š Recent Activity Review (2-3 minutes) Command: recall "important findings last 24 hours" incidents Purpose: Review recent incidents, solutions, and important discoveries Success Criteria: ā Recent incidents reviewed, ā Lessons learned identified Review Focus Areas: ⢠Unresolved incidents or ongoing issues ⢠Successful problem resolutions to share ⢠Performance trends or degradation patterns ⢠Security events or vulnerability reports Follow-up Actions: ⢠Share important findings: hv-broadcast ⢠Delegate follow-up tasks: hv-delegate ⢠Document patterns: remember Step 4: šÆ Proactive Issue Detection (1-2 minutes) Command: hv-query "potential issues trending warnings" Purpose: Identify potential issues before they become critical Success Criteria: ā Trending issues identified, ā Preventive actions planned Proactive Monitoring: ⢠Resource utilization trends ⢠Error rate increases ⢠Performance degradation patterns ⢠Security vulnerability reports Prevention Actions: ⢠Schedule maintenance: hv-delegate ⢠Update monitoring thresholds ⢠Plan capacity upgrades ⢠Apply security patches ā Daily Maintenance Checklist: ā” System health verified (all agents responding) ā” Configurations synchronized across collective ā” Recent incidents reviewed and documented ā” Proactive issues identified and addressed ā” Team notified of any important findings ā” Preventive actions scheduled as needed š Maintenance Metrics: ⢠Issues Prevented: 23 potential incidents caught early this month ⢠System Uptime: 99.7% (improved from 98.2% before routine) ⢠Mean Time to Detection: Reduced by 45% ⢠Team Satisfaction: 4.6/5 (routine provides confidence and clarity) šÆ Optimization Tips: ā³ Run at consistent time daily for trend analysis ā³ Automate routine checks where possible ā³ Document patterns for continuous improvement ā³ Share findings with team for collective awareness ``` ## Advanced Workflow Features ### Workflow Customization - **Adaptive Steps**: Workflows adjust based on current system state and available agents - **Conditional Logic**: Decision trees guide workflow execution based on intermediate results - **Parallel Execution**: Multiple workflow steps can run simultaneously for efficiency - **Rollback Procedures**: Each workflow includes rollback steps for failed operations - **Success Validation**: Built-in verification steps ensure workflow objectives are met ### Learning and Improvement - **Success Analytics**: Tracks which workflow variations lead to best outcomes - **Bottleneck Analysis**: Identifies common failure points and suggests optimizations - **Time Optimization**: Learns from execution times to provide better estimates - **Pattern Recognition**: Identifies successful command sequences for new workflow creation - **Collective Intelligence**: Workflows improve based on collective usage across all agents ## Performance Considerations - **Execution Time**: Workflows optimized for parallel execution where possible - **Resource Usage**: Considers agent availability and system load during execution - **Network Efficiency**: Minimizes network calls through intelligent command batching - **Cache Utilization**: Frequently used workflows cached for faster access - **Monitoring Impact**: Workflow execution monitored for performance optimization ## Related Commands - **Before starting workflow**: Use `hv-status` to verify system readiness - **During workflow**: Use individual commands as specified in workflow steps - **For customization**: Use `examples` to see variations of workflow commands - **For validation**: Use `help validate` to check command parameters - **After completion**: Use `remember` to document workflow outcomes and improvements ## Troubleshooting Workflows ### Workflow Execution Failures ``` ā Workflow step failed or timed out š” Troubleshooting Steps: 1. Check agent availability: hv-status 2. Verify network connectivity: ping [agent-machines] 3. Review command parameters for errors 4. Check system resources: top, free -m 5. Retry individual failed step 6. Use alternative workflow path if available ``` ### Incomplete Workflow Results ``` ā ļø Workflow completed but objectives not met š” Analysis Steps: 1. Review workflow success criteria 2. Check intermediate step results 3. Verify agent responses and confirmations 4. Look for environmental changes during execution 5. Consider workflow customization for current situation ``` ### Workflow Performance Issues ``` š Workflow taking longer than expected š” Optimization Steps: 1. Check agent response times: hv-status 2. Identify bottleneck steps in workflow 3. Consider parallel execution of independent steps 4. Review system resource utilization 5. Use workflow analytics to identify optimization opportunities ``` ## Best Practices for Using Workflows - **Understand Prerequisites**: Ensure system meets workflow requirements before starting - **Follow Steps Sequentially**: Don't skip steps unless workflow explicitly allows it - **Monitor Progress**: Check intermediate results to catch issues early - **Document Variations**: Record successful workflow modifications for future use - **Share Improvements**: Use `remember` to document workflow enhancements - **Practice Regularly**: Regular workflow execution improves speed and reliability --- **Operational Excellence**: Workflows represent collective operational wisdom, providing proven patterns for complex tasks while continuously improving through collective experience and analytics.
Quick Install
$
npx ai-builder add command lancejames221b/workflowsDetails
- Type
- command
- Author
- lancejames221b
- Slug
- lancejames221b/workflows
- Created
- 4d ago