@quantumai/quantum-cli-core
Version:
Quantum CLI Core - Multi-LLM Collaboration System
651 lines • 19.8 kB
JavaScript
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
export const UNCERTAINTY_PATTERNS = [
// High uncertainty indicators (0.8-1.0)
{
pattern: /\b(I'm not sure|not certain|can't be sure|uncertain|unsure)\b/i,
weight: 0.9,
category: 'uncertainty',
},
{
pattern: /\b(unclear|ambiguous|difficult to say|hard to determine)\b/i,
weight: 0.8,
category: 'uncertainty',
},
{
pattern: /\b(not definitive|no guarantee|cannot guarantee|not guaranteed)\b/i,
weight: 0.8,
category: 'uncertainty',
},
{
pattern: /\b(speculation|speculative|hypothetical|theoretical)\b/i,
weight: 0.8,
category: 'uncertainty',
},
{
pattern: /\b(potentially|conceivably|feasibly|theoretically)\b/i,
weight: 0.8,
category: 'uncertainty',
},
// Medium uncertainty indicators (0.6-0.7)
{
pattern: /\b(I think|I believe|I assume|I suspect|I imagine)\b/i,
weight: 0.7,
category: 'uncertainty',
},
{
pattern: /\b(maybe|possibly|perhaps|conceivably|potentially)\b/i,
weight: 0.7,
category: 'uncertainty',
},
{
pattern: /\b(depends on|varies based on|conditional on|subject to)\b/i,
weight: 0.6,
category: 'uncertainty',
},
{
pattern: /\b(might|may|could possibly|could potentially)\b/i,
weight: 0.6,
category: 'uncertainty',
},
{
pattern: /\b(appears to be|seems to be|looks like|suggests that)\b/i,
weight: 0.6,
category: 'uncertainty',
},
// Lower uncertainty indicators (0.4-0.5)
{
pattern: /\b(could be|might be|probably|likely|presumably)\b/i,
weight: 0.5,
category: 'uncertainty',
},
{
pattern: /\b(typically|usually|generally|commonly|normally)\b/i,
weight: 0.4,
category: 'uncertainty',
},
{
pattern: /\b(in most cases|often|frequently|tend to)\b/i,
weight: 0.4,
category: 'uncertainty',
},
{
pattern: /\b(should be|would be|expected to be|anticipated to)\b/i,
weight: 0.5,
category: 'uncertainty',
},
{
pattern: /\b(reasonably certain|fairly confident|relatively sure)\b/i,
weight: 0.4,
category: 'uncertainty',
},
// Conditional and qualifying patterns
{
pattern: /\b(if|unless|provided that|assuming that|given that)\b/i,
weight: 0.5,
category: 'uncertainty',
},
{
pattern: /\b(however|but|although|nevertheless|nonetheless)\b/i,
weight: 0.3,
category: 'uncertainty',
},
{
pattern: /\b(somewhat|rather|quite|fairly|moderately)\b/i,
weight: 0.3,
category: 'uncertainty',
},
{
pattern: /\b(to some extent|to a degree|partially|partly)\b/i,
weight: 0.4,
category: 'uncertainty',
},
{
pattern: /\b(roughly|approximately|around|about|estimate)\b/i,
weight: 0.4,
category: 'uncertainty',
},
// Question-like uncertainty
{
pattern: /\?.*\?/,
weight: 0.6,
category: 'uncertainty',
},
{
pattern: /\b(wonder if|question whether|doubt that|unsure if)\b/i,
weight: 0.7,
category: 'uncertainty',
},
{
pattern: /\b(not sure if|unclear whether|uncertain about)\b/i,
weight: 0.8,
category: 'uncertainty',
},
// Evidence-based uncertainty
{
pattern: /\b(limited evidence|insufficient data|unclear documentation)\b/i,
weight: 0.7,
category: 'uncertainty',
},
{
pattern: /\b(may vary|could change|subject to change|depends on version)\b/i,
weight: 0.6,
category: 'uncertainty',
},
{
pattern: /\b(needs verification|requires confirmation|should be tested)\b/i,
weight: 0.8,
category: 'uncertainty',
},
// Alternative suggestions (indicating uncertainty about best approach)
{
pattern: /\b(alternatively|another option|you could also|consider)\b/i,
weight: 0.5,
category: 'uncertainty',
},
{
pattern: /\b(best guess|educated guess|rough estimate)\b/i,
weight: 0.7,
category: 'uncertainty',
},
{
pattern: /\b(hard to say|difficult to predict|unpredictable)\b/i,
weight: 0.8,
category: 'uncertainty',
},
// Disclaimers and caveats
{
pattern: /\b(disclaimer|caveat|note that|keep in mind|be aware)\b/i,
weight: 0.4,
category: 'uncertainty',
},
{
pattern: /\b(may not work|might not be|could fail|potential issues)\b/i,
weight: 0.6,
category: 'uncertainty',
},
{
pattern: /\b(use at your own risk|proceed with caution|be careful)\b/i,
weight: 0.7,
category: 'uncertainty',
},
// Temporal uncertainty
{
pattern: /\b(as of now|currently|at this time|for now|temporarily)\b/i,
weight: 0.3,
category: 'uncertainty',
},
{
pattern: /\b(may change|could evolve|subject to updates|ongoing development)\b/i,
weight: 0.5,
category: 'uncertainty',
},
// Context-dependent patterns
{
pattern: /\b(depending on|based on|according to|varies with)\b/i,
weight: 0.5,
category: 'uncertainty',
},
{
pattern: /\b(in some cases|sometimes|occasionally|under certain conditions)\b/i,
weight: 0.4,
category: 'uncertainty',
},
// Meta-uncertainty (uncertainty about uncertainty)
{
pattern: /\b(not entirely sure|somewhat uncertain|degree of uncertainty)\b/i,
weight: 0.6,
category: 'uncertainty',
},
{
pattern: /\b(confidence level|reliability|accuracy may vary)\b/i,
weight: 0.5,
category: 'uncertainty',
},
// Probability expressions
{
pattern: /\b(low probability|high probability|chance that|odds are)\b/i,
weight: 0.5,
category: 'uncertainty',
},
{
pattern: /\b(unlikely|improbable|doubtful|questionable)\b/i,
weight: 0.6,
category: 'uncertainty',
},
// Incomplete information
{
pattern: /\b(incomplete|partial|limited information|missing details)\b/i,
weight: 0.7,
category: 'uncertainty',
},
{
pattern: /\b(more research needed|further investigation|additional testing)\b/i,
weight: 0.8,
category: 'uncertainty',
},
// Approximation and estimation
{
pattern: /\b(ballpark|order of magnitude|rough calculation|estimate)\b/i,
weight: 0.4,
category: 'uncertainty',
},
{
pattern: /\b(give or take|plus or minus|more or less|thereabouts)\b/i,
weight: 0.4,
category: 'uncertainty',
},
// Risk and safety uncertainty
{
pattern: /\b(risky|uncertain outcome|unpredictable results|unknown consequences)\b/i,
weight: 0.7,
category: 'uncertainty',
},
{
pattern: /\b(proceed cautiously|test thoroughly|verify before use)\b/i,
weight: 0.6,
category: 'uncertainty',
},
// Implementation uncertainty
{
pattern: /\b(implementation may vary|approach depends|multiple solutions)\b/i,
weight: 0.6,
category: 'uncertainty',
},
{
pattern: /\b(environment specific|configuration dependent|setup varies)\b/i,
weight: 0.5,
category: 'uncertainty',
},
// Experience-based uncertainty
{
pattern: /\b(in my experience|from what I've seen|typically works)\b/i,
weight: 0.4,
category: 'uncertainty',
},
{
pattern: /\b(anecdotal|personal observation|limited sample)\b/i,
weight: 0.6,
category: 'uncertainty',
},
];
export const COMPLEXITY_PATTERNS = [
// High complexity indicators (0.8-1.0)
{
pattern: /\b(complex problem|intricate solution|sophisticated approach|elaborate system)\b/i,
weight: 0.9,
category: 'complexity',
},
{
pattern: /\b(multiple layers|multi-step process|cascading effects|interdependencies)\b/i,
weight: 0.9,
category: 'complexity',
},
{
pattern: /\b(architectural considerations|system-wide impact|cross-cutting concerns)\b/i,
weight: 0.8,
category: 'complexity',
},
{
pattern: /\b(edge cases|corner cases|special scenarios|exceptional conditions)\b/i,
weight: 0.8,
category: 'complexity',
},
{
pattern: /\b(performance implications|scalability concerns|resource constraints)\b/i,
weight: 0.8,
category: 'complexity',
},
// Medium-high complexity (0.7-0.8)
{
pattern: /\b(multiple approaches|several ways|various options|alternative strategies)\b/i,
weight: 0.8,
category: 'complexity',
},
{
pattern: /\b(trade-offs|pros and cons|benefits and drawbacks|advantages and disadvantages)\b/i,
weight: 0.7,
category: 'complexity',
},
{
pattern: /\b(intricate|sophisticated|elaborate|nuanced|multifaceted)\b/i,
weight: 0.7,
category: 'complexity',
},
{
pattern: /\b(careful consideration|thorough analysis|detailed evaluation)\b/i,
weight: 0.7,
category: 'complexity',
},
{
pattern: /\b(integration challenges|compatibility issues|version conflicts)\b/i,
weight: 0.7,
category: 'complexity',
},
// Medium complexity (0.5-0.7)
{
pattern: /\b(considerations|factors to weigh|variables to consider|aspects to evaluate)\b/i,
weight: 0.6,
category: 'complexity',
},
{
pattern: /\b(configuration options|settings to adjust|parameters to tune)\b/i,
weight: 0.6,
category: 'complexity',
},
{
pattern: /\b(step-by-step|sequential process|ordered workflow|systematic approach)\b/i,
weight: 0.5,
category: 'complexity',
},
{
pattern: /\b(multiple components|various parts|different modules|separate pieces)\b/i,
weight: 0.6,
category: 'complexity',
},
{
pattern: /\b(environment specific|platform dependent|context sensitive)\b/i,
weight: 0.6,
category: 'complexity',
},
// Technical complexity
{
pattern: /\b(algorithm complexity|computational complexity|time complexity|space complexity)\b/i,
weight: 0.8,
category: 'complexity',
},
{
pattern: /\b(concurrent|parallel|asynchronous|multithreaded|distributed)\b/i,
weight: 0.7,
category: 'complexity',
},
{
pattern: /\b(microservices|service mesh|event-driven|message queues)\b/i,
weight: 0.7,
category: 'complexity',
},
{
pattern: /\b(state management|data consistency|transaction handling|concurrency control)\b/i,
weight: 0.8,
category: 'complexity',
},
{
pattern: /\b(caching strategy|load balancing|fault tolerance|circuit breaker)\b/i,
weight: 0.7,
category: 'complexity',
},
// Decision complexity
{
pattern: /\b(decision tree|branching logic|conditional paths|multiple scenarios)\b/i,
weight: 0.6,
category: 'complexity',
},
{
pattern: /\b(weighing options|comparing alternatives|evaluating choices)\b/i,
weight: 0.6,
category: 'complexity',
},
{
pattern: /\b(risk assessment|impact analysis|cost-benefit analysis)\b/i,
weight: 0.7,
category: 'complexity',
},
// Implementation complexity
{
pattern: /\b(implementation details|technical specifics|low-level concerns)\b/i,
weight: 0.6,
category: 'complexity',
},
{
pattern: /\b(refactoring required|significant changes|major overhaul)\b/i,
weight: 0.7,
category: 'complexity',
},
{
pattern: /\b(backwards compatibility|migration path|legacy support)\b/i,
weight: 0.7,
category: 'complexity',
},
{
pattern: /\b(testing strategy|validation approach|verification methods)\b/i,
weight: 0.6,
category: 'complexity',
},
// Scale and scope complexity
{
pattern: /\b(large-scale|enterprise-level|production-grade|mission-critical)\b/i,
weight: 0.7,
category: 'complexity',
},
{
pattern: /\b(cross-team coordination|stakeholder alignment|organizational impact)\b/i,
weight: 0.6,
category: 'complexity',
},
{
pattern: /\b(phased approach|iterative development|incremental rollout)\b/i,
weight: 0.5,
category: 'complexity',
},
// Debugging and troubleshooting complexity
{
pattern: /\b(debugging complexity|troubleshooting challenges|diagnostic difficulties)\b/i,
weight: 0.7,
category: 'complexity',
},
{
pattern: /\b(hard to debug|difficult to trace|obscure errors|intermittent issues)\b/i,
weight: 0.8,
category: 'complexity',
},
{
pattern: /\b(monitoring requirements|observability needs|logging strategies)\b/i,
weight: 0.6,
category: 'complexity',
},
];
export const CRITICAL_KEYWORDS = [
// Maximum criticality (1.0) - Production and Security
{
pattern: /\b(production|prod|live environment|production server|production database)\b/i,
weight: 1.0,
category: 'critical',
},
{
pattern: /\b(security|vulnerability|exploit|breach|attack|malicious|unauthorized)\b/i,
weight: 1.0,
category: 'critical',
},
{
pattern: /\b(authentication|authorization|access control|permissions|credentials)\b/i,
weight: 1.0,
category: 'critical',
},
{
pattern: /\b(encryption|cryptography|private key|secret key|password|token)\b/i,
weight: 1.0,
category: 'critical',
},
{
pattern: /\b(data loss|data corruption|data breach|data leak|sensitive data)\b/i,
weight: 1.0,
category: 'critical',
},
// High criticality (0.9) - System integrity and safety
{
pattern: /\b(critical|mission critical|business critical|essential|vital)\b/i,
weight: 0.9,
category: 'critical',
},
{
pattern: /\b(database|data store|persistent storage|backup|recovery)\b/i,
weight: 0.9,
category: 'critical',
},
{
pattern: /\b(system failure|crash|outage|downtime|service interruption)\b/i,
weight: 0.9,
category: 'critical',
},
{
pattern: /\b(financial|payment|transaction|billing|monetary|revenue)\b/i,
weight: 0.9,
category: 'critical',
},
{
pattern: /\b(compliance|regulation|legal|audit|policy|governance)\b/i,
weight: 0.9,
category: 'critical',
},
// Medium-high criticality (0.8) - Important operations
{
pattern: /\b(deployment|release|rollout|migration|upgrade)\b/i,
weight: 0.8,
category: 'critical',
},
{
pattern: /\b(performance critical|latency sensitive|real-time|high throughput)\b/i,
weight: 0.8,
category: 'critical',
},
{
pattern: /\b(user data|personal information|PII|customer data|user records)\b/i,
weight: 0.8,
category: 'critical',
},
{
pattern: /\b(API keys|secrets|configuration|environment variables|connection strings)\b/i,
weight: 0.8,
category: 'critical',
},
{
pattern: /\b(infrastructure|networking|load balancer|proxy|gateway)\b/i,
weight: 0.8,
category: 'critical',
},
// Medium criticality (0.7) - Important but manageable
{
pattern: /\b(important to note|significant|notable|considerable|substantial)\b/i,
weight: 0.7,
category: 'critical',
},
{
pattern: /\b(testing|quality assurance|validation|verification|error handling)\b/i,
weight: 0.7,
category: 'critical',
},
{
pattern: /\b(monitoring|alerting|logging|observability|diagnostics)\b/i,
weight: 0.7,
category: 'critical',
},
{
pattern: /\b(scaling|capacity|resource usage|memory|CPU|disk space)\b/i,
weight: 0.7,
category: 'critical',
},
{
pattern: /\b(integration|third-party|external service|dependency|vendor)\b/i,
weight: 0.7,
category: 'critical',
},
// Domain-specific critical terms
{
pattern: /\b(healthcare|medical|patient|health record|clinical|HIPAA)\b/i,
weight: 1.0,
category: 'critical',
},
{
pattern: /\b(financial services|banking|credit card|PCI DSS|SOX|GDPR)\b/i,
weight: 1.0,
category: 'critical',
},
{
pattern: /\b(government|classified|confidential|top secret|national security)\b/i,
weight: 1.0,
category: 'critical',
},
{
pattern: /\b(nuclear|aviation|automotive|medical device|safety critical)\b/i,
weight: 1.0,
category: 'critical',
},
// Infrastructure and DevOps critical terms
{
pattern: /\b(kubernetes|docker|container|orchestration|cluster|node)\b/i,
weight: 0.7,
category: 'critical',
},
{
pattern: /\b(cloud|AWS|Azure|GCP|serverless|lambda|function)\b/i,
weight: 0.6,
category: 'critical',
},
{
pattern: /\b(CI\/CD|pipeline|build|deploy|artifact|release candidate)\b/i,
weight: 0.7,
category: 'critical',
},
{
pattern: /\b(firewall|VPN|SSL|TLS|certificate|PKI|identity provider)\b/i,
weight: 0.8,
category: 'critical',
},
// Data and storage critical terms
{
pattern: /\b(SQL injection|XSS|CSRF|buffer overflow|race condition)\b/i,
weight: 1.0,
category: 'critical',
},
{
pattern: /\b(disaster recovery|backup strategy|failover|redundancy|high availability)\b/i,
weight: 0.8,
category: 'critical',
},
{
pattern: /\b(data retention|archival|purge|delete|permanent removal)\b/i,
weight: 0.8,
category: 'critical',
},
{
pattern: /\b(replication|synchronization|consistency|ACID|transaction isolation)\b/i,
weight: 0.7,
category: 'critical',
},
// Business impact critical terms
{
pattern: /\b(SLA|SLO|uptime|availability|service level|business impact)\b/i,
weight: 0.8,
category: 'critical',
},
{
pattern: /\b(customer facing|public API|end user|client application)\b/i,
weight: 0.7,
category: 'critical',
},
{
pattern: /\b(revenue impact|cost implications|budget|resource allocation)\b/i,
weight: 0.7,
category: 'critical',
},
// Development practices critical terms
{
pattern: /\b(code review|peer review|security review|architecture review)\b/i,
weight: 0.6,
category: 'critical',
},
{
pattern: /\b(technical debt|refactoring|legacy code|deprecated|end of life)\b/i,
weight: 0.6,
category: 'critical',
},
{
pattern: /\b(breaking change|backwards compatibility|API versioning|migration path)\b/i,
weight: 0.7,
category: 'critical',
},
];
//# sourceMappingURL=patterns.js.map