commandby lancejames221b
Examples
Show contextual examples for hAIveMind commands with real-world scenarios
Installs: 0
Used in: 1 repos
Updated: 1d ago
$
npx ai-builder add command lancejames221b/examplesInstalls to .claude/commands/examples.md
# examples - Contextual Command Examples ## Purpose Intelligent example system that shows relevant, real-world usage scenarios for hAIveMind commands, automatically adapted to your current project type, active incidents, and usage patterns. ## When to Use - **Learning Commands**: See practical examples of how commands work in real situations - **Troubleshooting**: Find examples similar to your current problem - **Best Practices**: Discover optimal usage patterns from successful implementations - **Context Adaptation**: Get examples relevant to your specific environment - **Workflow Planning**: See how commands fit into larger operational workflows - **Parameter Guidance**: Understand proper parameter usage through examples ## Syntax ``` examples [command] [context] ``` ## Parameters - **command** (optional): Specific command to show examples for - Examples: `hv-broadcast`, `hv-delegate`, `remember`, `recall` - **context** (optional): Situation or domain to find relevant examples - Examples: `incident`, `security`, `deployment`, `monitoring`, `python`, `nodejs` ## Intelligent Example Features ### Context-Aware Selection - **Project Type Detection**: Shows examples relevant to Python, Node.js, Rust, Go projects - **Incident Response**: Prioritizes emergency response examples during active incidents - **Usage History**: Adapts examples based on your recent command patterns - **Success Patterns**: Highlights examples from successful past operations - **Complexity Matching**: Shows examples appropriate to your experience level ### Real-World Scenarios - **Production Incidents**: Actual incident response workflows and resolutions - **Security Events**: Real security vulnerability handling and patch deployment - **Infrastructure Changes**: Live infrastructure updates and configuration changes - **Performance Issues**: Database optimization, memory leak fixes, scaling operations - **Deployment Workflows**: CI/CD pipeline integration and rollback procedures ## Real-World Examples ### Command-Specific Examples ``` examples hv-broadcast ``` **Result**: Comprehensive examples of hv-broadcast usage across different scenarios (security alerts, infrastructure changes, incident updates) ### Context-Based Examples ``` examples incident ``` **Result**: All commands relevant to incident response with step-by-step examples and expected outcomes ### Current Context Examples ``` examples ``` **Result**: Examples automatically selected based on your current project type, recent commands, and active incidents ### Security Context Examples ``` examples security ``` **Result**: Security-focused examples including vulnerability reporting, patch deployment, and incident response ### Project-Specific Examples ``` examples python ``` **Result**: Examples tailored to Python development workflows, deployment patterns, and common infrastructure needs ## Expected Output ### Command-Specific Examples ``` š” Command Examples: hv-broadcast š Query: command=hv-broadcast, context=auto-detected š Showing: 8 examples (12 total available) šÆ Context Info: ā³ Project Type: Python ā³ Recent Commands: hv-query, hv-status, remember ā³ Active Incidents: 1 (database connectivity) š Examples (Ranked by Relevance): 1. šØ Critical Security Alert Command: hv-broadcast "SQL injection vulnerability patched in auth service" security critical Expected Result: ā All 12 agents notified, security team activated, patch verification initiated Context: Production security incident requiring immediate team coordination 2. š§ Infrastructure Update Notification Command: hv-broadcast "Database connection pool increased to 50 connections" infrastructure info Expected Result: ā Monitoring agents update thresholds, application teams adjust expectations Context: Proactive infrastructure scaling to prevent connection exhaustion 3. š Performance Issue Resolution Command: hv-broadcast "Memory leak in Python scraper service fixed via connection cleanup" infrastructure warning Expected Result: ā All scraper agents implement fix, monitoring agents add memory tracking Context: Performance degradation resolved through code optimization 4. š Deployment Completion Command: hv-broadcast "API v2.1.3 deployed successfully across all environments" deployment info Expected Result: ā Testing teams notified, monitoring agents update version tracking Context: Successful production deployment requiring team awareness 5. š Incident Status Update Command: hv-broadcast "Database connectivity restored, investigating root cause" incident warning Expected Result: ā All agents aware of status change, investigation team coordinated Context: Active incident resolution with ongoing investigation 6. š”ļø Security Patch Deployment Command: hv-broadcast "OpenSSL security patches applied to all web servers" security info Expected Result: ā Security team confirms coverage, compliance team updates records Context: Routine security maintenance with compliance requirements 7. š Monitoring Threshold Update Command: hv-broadcast "CPU alert threshold raised to 85% after infrastructure upgrade" monitoring info Expected Result: ā All monitoring agents update alerting rules, false positives reduced Context: Monitoring optimization following infrastructure improvements 8. š Runbook Update Command: hv-broadcast "New database failover procedure documented and tested" runbook info Expected Result: ā All database specialists access updated procedures, training scheduled Context: Operational procedure improvement for better incident response š” Pro Tips: ā³ Use 'critical' severity sparingly - reserve for system-wide emergencies ā³ Include specific system names and impact scope in messages ā³ Follow up with hv-delegate for specific remediation tasks ā³ Use hv-status to verify broadcast reached all intended agents š Related Examples: ⢠examples hv-delegate - Task assignment after broadcasting ⢠examples incident - Complete incident response workflows ⢠examples security - Security-focused communication patterns ``` ### Context-Based Examples ``` š” Context Examples: Incident Response š Query: context=incident, auto-adapted to current situation š Showing: 10 examples (15 total available) šÆ Current Context: ā³ Active Incidents: 1 (database connectivity issues) ā³ Project Type: Python application ā³ Recent Activity: Database troubleshooting, performance monitoring š Incident Response Examples: 1. šØ Initial Incident Detection and Alert Workflow: hv-status ā hv-broadcast ā hv-delegate Step 1: hv-status --detailed Result: Identifies 3 database agents offline, high response times Step 2: hv-broadcast "Database connectivity issues detected, investigating" incident critical Result: All 12 agents notified, incident response team activated Step 3: hv-delegate "Investigate database connection pool exhaustion" database_ops Result: Database specialists assigned, investigation begins 2. š§ Service Degradation Response Command Sequence: hv-query ā remember ā hv-broadcast Step 1: hv-query "similar database connection issues last 30 days" Result: Found 3 similar incidents with documented solutions Step 2: remember "Database connection pool at 95% capacity, needs scaling" infrastructure Result: Issue documented for trend analysis Step 3: hv-broadcast "Database connection pool scaling in progress" incident warning Result: Team updated on remediation status 3. šÆ Incident Resolution and Documentation Final Workflow: hv-broadcast ā remember ā hv-delegate Step 1: hv-broadcast "Database connectivity restored via connection pool restart" incident info Result: All agents notified of resolution Step 2: remember "Root cause: connection pool memory leak, fixed via restart + monitoring" incidents Result: Solution documented for future reference Step 3: hv-delegate "Implement connection pool monitoring alerts" monitoring Result: Prevention measures assigned to monitoring team 4. š Multi-System Incident Coordination Complex Scenario: Load balancer + database + application issues Commands Used: ⢠hv-status --network (check connectivity) ⢠hv-broadcast "Multi-system outage detected" incident critical ⢠hv-delegate "Check load balancer health" infrastructure_management ⢠hv-delegate "Investigate database locks" database_ops ⢠hv-delegate "Review application error logs" development ⢠hv-query "multi-system outage procedures" ⢠remember "Cascading failure: LB timeout ā DB locks ā app errors" incidents 5. š Emergency Rollback Procedure Deployment Gone Wrong: Step 1: hv-broadcast "Deployment v2.1.4 causing 500 errors, initiating rollback" deployment critical Step 2: hv-delegate "Execute rollback to v2.1.3" deployment Step 3: hv-status --detailed (verify rollback success) Step 4: hv-broadcast "Rollback completed, service restored" deployment info Step 5: remember "v2.1.4 rollback due to database migration issue" deployments š” Incident Response Best Practices: ā³ Always start with hv-status to assess scope ā³ Use 'critical' severity for customer-impacting issues ā³ Delegate specific tasks to appropriate specialists ā³ Document resolution immediately while details are fresh ā³ Follow up with prevention measures and monitoring š Related Workflows: ⢠examples security - Security incident procedures ⢠examples monitoring - Proactive issue detection ⢠workflows - Complete incident response templates ``` ### Auto-Context Examples ``` š” Smart Context Examples š Auto-detected context based on your current situation: š Showing: 6 examples (20 total available) šÆ Context Analysis: ā³ Project: Python application with database components ā³ Recent Commands: hv-query (database issues), hv-status, remember ā³ Active Concerns: Database performance, connection management ā³ Suggested Focus: Database optimization and monitoring š Contextual Examples: 1. š Python Application Database Optimization Scenario: High database connection usage in Python app Command: remember "Python connection pooling configured with SQLAlchemy, max_overflow=20" infrastructure Context: Documenting database configuration for team reference Follow-up: hv-broadcast "Database connection optimization implemented" infrastructure info 2. š Database Performance Monitoring Scenario: Setting up proactive database monitoring Command: hv-delegate "Implement database connection pool monitoring" monitoring Context: Preventing connection exhaustion issues Follow-up: hv-query "database monitoring best practices" 3. š Troubleshooting Database Issues Scenario: Investigating slow database queries Workflow: ⢠hv-query "slow database query optimization techniques" ⢠hv-delegate "Analyze slow query logs" database_ops ⢠remember "Query optimization reduced response time by 60%" infrastructure 4. šØ Database Incident Response Scenario: Database connection pool exhaustion Emergency Workflow: ⢠hv-status --detailed (check database agent availability) ⢠hv-broadcast "Database connection pool at capacity" incident warning ⢠hv-delegate "Restart database connection pool" database_ops ⢠remember "Connection pool restart resolved issue temporarily" incidents 5. š§ Python Deployment with Database Migration Scenario: Deploying Python app with database schema changes Deployment Sequence: ⢠hv-broadcast "Starting deployment with database migration" deployment info ⢠hv-delegate "Execute database migration scripts" database_ops ⢠hv-status (verify migration success) ⢠hv-broadcast "Deployment completed successfully" deployment info 6. š Performance Trend Analysis Scenario: Analyzing database performance over time Analysis Workflow: ⢠recall "database performance metrics last 30 days" infrastructure ⢠hv-query "database performance trends and patterns" ⢠remember "Database response time increased 15% over month" monitoring ⢠hv-delegate "Investigate database performance degradation" database_ops š” Smart Suggestions Based on Your Activity: ā³ Your recent hv-query suggests you're troubleshooting - consider hv-delegate next ā³ Database focus detected - examples prioritize database operations ā³ Python project context - examples include Python-specific considerations ā³ Recent remember usage - examples show documentation patterns šÆ Recommended Next Steps: 1. Use hv-delegate to assign database investigation tasks 2. Set up monitoring with database specialists 3. Document findings with remember for future reference 4. Share solutions with hv-broadcast when resolved ``` ## Advanced Example Features ### Learning and Adaptation - **Success Tracking**: Prioritizes examples from successful past operations - **Failure Analysis**: Shows examples of what to avoid based on past failures - **Pattern Recognition**: Identifies common usage patterns and suggests similar examples - **Effectiveness Scoring**: Ranks examples by how often they lead to successful outcomes - **Collective Intelligence**: Learns from examples across all agents in the collective ### Integration with hAIveMind - **Memory Integration**: Examples drawn from actual stored memories and experiences - **Cross-Agent Learning**: Examples include successful patterns from other agents - **Real-Time Adaptation**: Examples update based on current collective status - **Performance Analytics**: Tracks which examples are most helpful - **Continuous Improvement**: Example relevance improves based on user feedback ## Performance Considerations - **Response Time**: < 300ms for example retrieval and ranking - **Relevance Scoring**: AI-powered ranking based on context similarity - **Cache Efficiency**: Frequently accessed examples cached for performance - **Memory Usage**: Example content optimized for quick loading - **Network Impact**: Minimal - examples served from local cache when possible ## Related Commands - **After viewing examples**: Execute the commands shown in examples - **For detailed help**: Use `help <command>` for comprehensive documentation - **For workflows**: Use `workflows` to see complete operational procedures - **For suggestions**: Use `suggest` for AI-powered command recommendations - **For validation**: Use `help validate <command>` before executing examples ## Troubleshooting Examples System ### No Relevant Examples Found ``` ā No examples found for your query š” Troubleshooting: 1. Try broader context terms (e.g., 'incident' instead of 'database-incident') 2. Use command names without prefixes (e.g., 'broadcast' instead of 'hv-broadcast') 3. Check available contexts: examples (shows all available) 4. Examples build over time - use commands to generate more examples ``` ### Examples Seem Outdated ``` ā ļø Examples don't match current system state š” Resolution: 1. Examples reflect actual usage - outdated examples indicate system changes 2. Use current commands to generate fresh examples 3. Check system updates: hv-sync 4. Report issues: remember "Examples system needs update for [context]" infrastructure ``` ### Missing Context Detection ``` ā Examples not adapting to current situation š” Possible Causes: 1. Context detection requires recent command usage 2. New installation - context builds over time 3. Use help system more to improve context detection 4. Manually specify context: examples [context] ``` ## Best Practices for Using Examples - **Start General**: Use `examples` without parameters to see context-aware suggestions - **Be Specific**: Use `examples <command>` for focused command examples - **Use Context**: Specify context for domain-specific examples - **Follow Patterns**: Examples show proven successful patterns - follow them closely - **Adapt to Situation**: Use examples as templates, adapt parameters to your specific needs - **Provide Feedback**: Success/failure of examples improves future recommendations --- **Contextual Intelligence**: The examples system learns from actual usage patterns and adapts to your specific environment, making examples increasingly relevant and useful over time.
Quick Install
$
npx ai-builder add command lancejames221b/examplesDetails
- Type
- command
- Author
- lancejames221b
- Slug
- lancejames221b/examples
- Created
- 4d ago