skills/advanced/risk-managed-analysis/SKILL.md
# Risk-Managed Analysis - Probabilistic Trust and Operational Assurance ## Core Capability Systematic analysis of probabilistic trust models for AI systems where cryptographic guarantees are unnecessary or impossible. Develops "good enough" assurance frameworks within defined risk budgets, avoiding both overconfident security theater and unnecessarily defeatist conclusions. ## Key Functions ### 1. Risk Budget Analysis - Quantify acceptable failure rates based on business context and consequen
npx skillsauth add pauljbernard/headelf skills/advanced/risk-managed-analysisInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Systematic analysis of probabilistic trust models for AI systems where cryptographic guarantees are unnecessary or impossible. Develops "good enough" assurance frameworks within defined risk budgets, avoiding both overconfident security theater and unnecessarily defeatist conclusions.
Business Context → Acceptable Failure Rate → Assurance Level
├── Internal Tooling
│ ├── Risk Budget: $10K-100K annual impact
│ ├── Acceptable Failure: 1-5% of outputs requiring human correction
│ ├── Assurance Level: Statistical monitoring + lightweight validation
│ └── Example: Code completion tools, documentation generation
├── Customer-Facing Applications
│ ├── Risk Budget: $100K-1M annual impact
│ ├── Acceptable Failure: 0.1-1% of outputs causing customer issues
│ ├── Assurance Level: Multi-model validation + human oversight workflows
│ └── Example: Customer service chatbots, content recommendation
├── Business-Critical Systems
│ ├── Risk Budget: $1M-10M annual impact
│ ├── Acceptable Failure: 0.01-0.1% causing significant business disruption
│ ├── Assurance Level: Formal testing + real-time monitoring + rollback systems
│ └── Example: Financial analysis, supply chain optimization
└── Safety-Critical Systems
├── Risk Budget: >$10M or human safety impact
├── Acceptable Failure: <0.01% causing safety incidents
├── Assurance Level: Hardware attestation + formal verification + human authority
└── Example: Medical diagnostics, autonomous vehicle control
Approach: Deploy N diverse AI models, require M-of-N agreement
Statistical Framework:
├── Model Selection Criteria:
│ ├── Architectural diversity (transformer, CNN, RNN, symbolic)
│ ├── Training data diversity (different sources, time periods)
│ ├── Vendor diversity (OpenAI, Anthropic, Google, open source)
│ └── Version diversity (different model generations)
├── Consensus Thresholds:
│ ├── High confidence: ≥80% agreement across all models
│ ├── Medium confidence: ≥60% agreement with explanation variance <20%
│ ├── Low confidence: <60% agreement → escalate to human review
│ └── No consensus: Conflicting outputs → mandatory human decision
├── Statistical Validation:
│ ├── Track consensus accuracy over time with empirical feedback
│ ├── Adjust confidence thresholds based on observed error rates
│ ├── Identify input patterns where consensus fails systematically
│ └── Implement early warning systems for consensus degradation
└── Expected Performance:
├── 3-model consensus: 85-95% accuracy improvement over single model
├── 5-model consensus: 90-98% accuracy with diminishing returns
├── Cost: 3-5x single model inference cost
└── Latency: 1.2-2x single model latency (parallel execution)
Implementation: Variable assurance based on prediction confidence
├── High Confidence Predictions (90%+ model certainty):
│ ├── Automated execution with lightweight logging
│ ├── Post-execution statistical sampling for validation
│ ├── Expected accuracy: 95-99% based on confidence calibration
│ └── Human review: <1% of decisions
├── Medium Confidence Predictions (70-90% model certainty):
│ ├── Automated execution with enhanced monitoring
│ ├── Real-time anomaly detection and pattern matching
│ ├── Expected accuracy: 85-95% with active correction
│ └── Human review: 5-10% of decisions (triggered by anomalies)
├── Low Confidence Predictions (50-70% model certainty):
│ ├── Human-in-the-loop validation before execution
│ ├── AI provides analysis and recommendations, human decides
│ ├── Expected accuracy: 90-95% due to human oversight
│ └── Human review: 100% of decisions
└── No Confidence Predictions (<50% model certainty):
├── Escalate to expert human analysis
├── AI provides raw information, human performs analysis
├── Track patterns where AI confidence is systematically low
└── Improve models based on expert decision patterns
Monitoring Framework:
├── Prediction Accuracy Tracking:
│ ├── Compare AI predictions to ground truth outcomes
│ ├── Track accuracy by confidence level, input type, time period
│ ├── Maintain rolling windows: 24hr, 7day, 30day, 90day
│ └── Alert when accuracy drops below risk budget thresholds
├── Confidence Calibration:
│ ├── Measure: P(correct | confidence=X) for all confidence levels X
│ ├── Calibration quality: How well predicted confidence matches actual accuracy
│ ├── Recalibrate confidence thresholds based on empirical performance
│ └── Detect and correct overconfident or underconfident model behavior
├── Drift Detection:
│ ├── Monitor input distribution changes over time
│ ├── Track performance degradation on specific input types
│ ├── Early warning system for model performance degradation
│ └── Automated model retraining triggers based on drift severity
└── Attack Detection:
├── Statistical anomaly detection for adversarial inputs
├── Pattern recognition for systematic manipulation attempts
├── Consensus breakdown patterns indicating coordinated attacks
└── Human escalation for suspected security incidents
Continuous Improvement Cycle:
├── Ground Truth Collection:
│ ├── User feedback on AI decisions (thumbs up/down, corrections)
│ ├── Business outcome tracking (did the decision achieve intended result?)
│ ├── Expert review of edge cases and failures
│ └── A/B testing of different trust threshold configurations
├── Model Performance Analysis:
│ ├── Identify systematic failure patterns
│ ├── Calculate ROI of different assurance levels
│ ├── Benchmark against human performance on same tasks
│ └── Cost analysis: prevention vs correction vs failure costs
├── Trust Model Updates:
│ ├── Adjust confidence thresholds based on empirical performance
│ ├── Update consensus requirements based on architectural transferability data
│ ├── Refine risk budgets based on observed business impact
│ └── Evolve monitoring systems based on new attack patterns
└── Business Impact Measurement:
├── Quantify business value generated by AI systems
├── Calculate cost savings from reduced human review burden
├── Measure customer satisfaction impact
└── Track competitive advantage from faster/better decisions
Use Case: AI-assisted software development
Risk Categories:
├── Syntax Errors (Low Risk):
│ ├── Impact: Development velocity reduction, compile-time detection
│ ├── Acceptable Rate: 5-10% of generated code requires syntax fixes
│ ├── Mitigation: Automated syntax checking, IDE integration
│ └── Cost: Low - caught by existing development tools
├── Logic Errors (Medium Risk):
│ ├── Impact: Runtime bugs, incorrect functionality, debugging time
│ ├── Acceptable Rate: 1-2% of generated code contains logic errors
│ ├── Mitigation: Unit testing, code review, staged deployment
│ └── Cost: Medium - caught by testing and review processes
├── Security Vulnerabilities (High Risk):
│ ├── Impact: Data breaches, system compromise, compliance violations
│ ├── Acceptable Rate: 0.1% of generated code contains exploitable vulnerabilities
│ ├── Mitigation: Security scanning, expert review, principle of least privilege
│ └── Cost: High - requires specialized security analysis
└── Business Logic Errors (Variable Risk):
├── Impact: Incorrect business decisions, financial loss, customer impact
├── Acceptable Rate: Context-dependent (0.01% for financial, 1% for internal tools)
├── Mitigation: Business logic validation, domain expert review
└── Cost: Variable - depends on business context and error severity
Assurance Level → Code Type → Validation Strategy
├── Basic (Statistical Monitoring):
│ ├── Internal scripts, documentation, test code
│ ├── Validation: Automated syntax check + statistical sampling
│ ├── Human Review: 1% random sampling + error-triggered review
│ └── Expected Quality: 95% correct with fast feedback loops
├── Standard (Multi-Model + Review):
│ ├── Application code, API implementations, database schemas
│ ├── Validation: 2-3 model consensus + automated testing + peer review
│ ├── Human Review: 100% code review + 10% expert security review
│ └── Expected Quality: 98% correct with structured review processes
├── Enhanced (Formal + Expert):
│ ├── Security-critical code, financial calculations, data handling
│ ├── Validation: Formal verification + security scanning + expert review
│ ├── Human Review: 100% security expert review + business logic validation
│ └── Expected Quality: 99%+ correct with comprehensive validation
└── Critical (Human Authority):
├── Authentication, authorization, encryption, compliance
├── Validation: AI provides analysis, human implements and validates
├── Human Review: 100% expert implementation with AI assistance only
└── Expected Quality: Human-level correctness with AI efficiency gains
Decision Type → Risk Assessment → AI Role → Human Authority
├── Operational Decisions:
│ ├── Risk: Low-medium business impact, reversible
│ ├── Examples: Inventory ordering, schedule optimization, routine analysis
│ ├── AI Role: Primary decision maker with human oversight
│ ├── Human Authority: Exception handling, strategic adjustments
│ └── Success Metric: 90%+ decisions improve business outcomes
├── Tactical Decisions:
│ ├── Risk: Medium business impact, partially reversible
│ ├── Examples: Marketing campaigns, vendor selection, process changes
│ ├── AI Role: Analysis and recommendation provider
│ ├── Human Authority: Final decision maker with AI support
│ └── Success Metric: AI recommendations chosen 70%+ of time
├── Strategic Decisions:
│ ├── Risk: High business impact, difficult to reverse
│ ├── Examples: Market entry, major technology adoption, org restructuring
│ ├── AI Role: Information synthesis and scenario analysis
│ ├── Human Authority: Complete decision authority with AI intelligence
│ └── Success Metric: Decisions supported by comprehensive AI analysis
└── Governance Decisions:
├── Risk: Existential business impact, irreversible
├── Examples: M&A, regulatory compliance, crisis response
├── AI Role: Research and analysis support only
├── Human Authority: Executive decision with board oversight
└── Success Metric: AI provides complete relevant information
Attack Cost Analysis:
├── Model Manipulation:
│ ├── Single Model Attack: $1K-10K (adversarial examples, prompt injection)
│ ├── Multi-Model Attack: $10K-100K (requires diverse attack vectors)
│ ├── Statistical Attack: $100K+ (requires sustained campaign to shift baselines)
│ └── Defense ROI: Multi-model consensus cost-effective for >$100K risk budgets
├── Consensus Breaking:
│ ├── Architectural Exploit: Target shared vulnerabilities across model types
│ ├── Training Data Poisoning: Compromise shared data sources (supply chain)
│ ├── Coordinated Attack: Simultaneous multi-vector attack on consensus system
│ └── Defense: Architectural diversity + data source diversity + anomaly detection
├── Trust Calibration Manipulation:
│ ├── Confidence Manipulation: Systematic feedback to miscalibrate confidence
│ ├── Drift Injection: Gradually shift model behavior below detection thresholds
│ ├── Statistical Gaming: Exploit feedback mechanisms to improve adversarial success
│ └── Defense: Multi-channel ground truth validation + expert oversight
└── Human Factor Exploitation:
├── Authority Confusion: Manipulate human understanding of AI capabilities
├── Workload Exploitation: Overwhelm human oversight with high-volume decisions
├── Trust Exploitation: Build confidence then exploit in critical moments
└── Defense: Training, rotation, independent validation processes
Threat Detection → Response → Recovery
├── Statistical Anomalies:
│ ├── Detection: Consensus breakdown rates, confidence calibration drift
│ ├── Response: Increase human oversight, activate backup validation systems
│ ├── Recovery: Investigate root cause, update models, recalibrate thresholds
│ └── Prevention: Enhanced monitoring, red team exercises
├── Coordinated Attacks:
│ ├── Detection: Multiple model failures, systematic pattern recognition
│ ├── Response: Emergency fallback to human decision making
│ ├── Recovery: Full system audit, model retraining, security review
│ └── Prevention: Architectural diversity, supply chain security
├── Trust Exploitation:
│ ├── Detection: Business outcome monitoring, expert spot checks
│ ├── Response: Immediate confidence threshold adjustment
│ ├── Recovery: Historical decision audit, affected system remediation
│ └── Prevention: Multi-channel validation, regular calibration updates
└── Human Factor Compromise:
├── Detection: Decision pattern analysis, expert performance monitoring
├── Response: Rotate personnel, increase oversight, reduce authority
├── Recovery: Decision audit, process improvement, training update
└── Prevention: Regular training, clear authority limits, decision logging
This risk-managed analysis framework provides the missing middle ground between overconfident security theater and unnecessarily defeatist conclusions, enabling practical AI deployment within defined risk budgets rather than requiring impossible cryptographic guarantees for semantic correctness.
tools
# Security Tools and Frameworks Expertise ## Description Expert-level knowledge of cybersecurity tools, frameworks, and platforms including SIEM systems, vulnerability scanners, penetration testing tools, security orchestration platforms, identity and access management systems, and security automation frameworks with implementation strategies and optimization techniques. ## When to Use - Designing comprehensive security architectures for enterprise systems - Implementing security automation an
tools
# Monitoring and Observability Tools Expertise ## Description Expert-level knowledge of monitoring, observability, and APM (Application Performance Monitoring) tools including Prometheus, Grafana, Jaeger, OpenTelemetry, Elasticsearch, Datadog, New Relic, and cloud-native observability platforms with internal architectures, optimization techniques, and implementation strategies. ## When to Use - Designing comprehensive observability strategies for distributed systems - Implementing monitoring s
tools
# Machine Learning and AI Frameworks Expertise ## Description Expert-level knowledge of machine learning and AI frameworks including TensorFlow, PyTorch, Scikit-learn, Hugging Face, MLflow, Kubeflow, Apache Spark ML, cloud ML platforms, and MLOps tools with optimization techniques, deployment strategies, and production implementation patterns. ## When to Use - Designing and implementing machine learning pipelines and infrastructure - Selecting optimal ML frameworks for specific use cases and r
development
# Message Queue and Streaming Technology Expertise ## Description Expert-level knowledge of message queue systems, event streaming platforms, and asynchronous communication architectures including internal implementations, optimization techniques, failure scenarios, and selection criteria. ## When to Use - Designing high-throughput, low-latency messaging systems - Implementing event-driven architectures and microservices communication - Building real-time data streaming and processing pipeline