src.ai.decisions.hybrid_framework module#

Hybrid Decision Framework for Marcus AI.

Merges rule-based safety constraints with AI intelligence to make optimal task assignment decisions while never compromising safety.

class src.ai.decisions.hybrid_framework.AIEngine[source]#

Bases: object

Mock AI engine interface for hybrid framework.

async analyze_assignment_optimality(task, context)[source]#

Analyze assignment optimality using AI.

Parameters:
Return type:

AIOptimizationResult

Returns:

AI optimization result

class src.ai.decisions.hybrid_framework.HybridDecisionFramework[source]#

Bases: object

Hybrid decision framework that merges rule-based safety with AI optimization.

Core principle: Rules provide mandatory safety constraints that AI cannot override. AI provides optimization and enhancement when rules allow the assignment.

__init__()[source]#
Return type:

None

async make_assignment_decision(task, context)[source]#

Make hybrid assignment decision combining rules with AI optimization.

Parameters:
Return type:

AssignmentDecision

Returns:

Assignment decision with reasoning and AI enhancements

async evaluate_assignment_quality(task, agent_id, assignment_outcome)[source]#

Evaluate the quality of a completed assignment for learning.

Parameters:
Return type:

Dict[str, Any]

Returns:

Assignment quality evaluation

async get_framework_stats()[source]#

Get framework performance statistics.

Return type:

Dict[str, Any]

async adjust_weights(rule_weight, ai_weight)[source]#

Adjust confidence weights (with safety constraints).

Parameters:
Return type:

bool

Returns:

True if weights were adjusted, False if rejected for safety