P1-04: E1 cascade logic (Level 1→5) not implemented — all principles dumped flat to LLM #10

Closed
opened 2026-06-16 13:57:01 +00:00 by Artur · 0 comments
Owner

Severity: P1 (High)
File: principles.md (defines cascade) vs decider/*.py (code ignores it)

Problem

The principles.md defines a beautiful 5-level decision cascade under E1: Engineering Judgment:

  • Level 1: Physical Constraints (physics/math dictates answer)
  • Level 2: Risk Asymmetry (one failure mode catastrophically worse)
  • Level 3: Cost Trajectory (which option's marginal cost curve is steeper)
  • Level 4: Reversibility (can you undo this in 1h/1d/1w?)
  • Level 5: Precedent (has this decision been made before?)

Critical rule: "Stop at the first level that resolves."

The code completely ignores this cascade. It dumps ALL principles into a flat system prompt and asks the LLM to produce a single JSON output. This means:

  1. The LLM can cherry-pick any principle arbitrarily
  2. The cascade optimization (stop early, save tokens, save cost) is lost
  3. The "Level 1 → physics dictates the answer" check should be a hard rule, not LLM-suggestible

Fix

Implement actual level-by-level evaluation in core.py:

def decide_with_cascade(self, situation, context):
    # Level 1: Physical Constraints — rule-based, no LLM
    if self._has_physical_constraint(situation):
        return self._apply_physics(situation)
    
    # Level 2: Risk Asymmetry — quick LLM check, cheap model
    risk = self._evaluate_risk_asymmetry(situation, context)
    if risk is not None:
        return risk
    
    # Level 3: Cost Trajectory
    ...
    
    # Level 4: Reversibility — determine urgency
    ...
    
    # Level 5: Precedent DB lookup
    ...
    
    # Fall through to full matrix/ensemble for truly novel situations
    return self.decide(situation, context, mode="matrix")

Level 1 should be purely rule-based (no LLM dependency at all).

**Severity**: P1 (High) **File**: `principles.md` (defines cascade) vs `decider/*.py` (code ignores it) ## Problem The `principles.md` defines a beautiful 5-level decision cascade under **E1: Engineering Judgment**: - Level 1: Physical Constraints (physics/math dictates answer) - Level 2: Risk Asymmetry (one failure mode catastrophically worse) - Level 3: Cost Trajectory (which option's marginal cost curve is steeper) - Level 4: Reversibility (can you undo this in 1h/1d/1w?) - Level 5: Precedent (has this decision been made before?) **Critical rule**: "Stop at the first level that resolves." The code completely ignores this cascade. It dumps ALL principles into a flat system prompt and asks the LLM to produce a single JSON output. This means: 1. The LLM can cherry-pick any principle arbitrarily 2. The cascade optimization (stop early, save tokens, save cost) is lost 3. The "Level 1 → physics dictates the answer" check should be a hard rule, not LLM-suggestible ## Fix Implement actual level-by-level evaluation in `core.py`: ```python def decide_with_cascade(self, situation, context): # Level 1: Physical Constraints — rule-based, no LLM if self._has_physical_constraint(situation): return self._apply_physics(situation) # Level 2: Risk Asymmetry — quick LLM check, cheap model risk = self._evaluate_risk_asymmetry(situation, context) if risk is not None: return risk # Level 3: Cost Trajectory ... # Level 4: Reversibility — determine urgency ... # Level 5: Precedent DB lookup ... # Fall through to full matrix/ensemble for truly novel situations return self.decide(situation, context, mode="matrix") ``` Level 1 should be purely rule-based (no LLM dependency at all).
Artur closed this issue 2026-06-16 14:17:26 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
glow-all/decider#10
No description provided.