File size: 929 Bytes
a8b4b87 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | """Solar chakra (manipura) — will / decisive action kernel.
Computes a will scalar = clamp(intent * agency - friction, 0, 1).
Verdict is `act` at or above 0.5, `defer` between 0.2 and 0.5, `block`
below 0.2.
"""
from __future__ import annotations
from typing import Any, Mapping
STUBBED = False
NAME = "solar"
def evaluate(envelope: Mapping[str, Any]) -> dict[str, Any]:
signals = envelope.get("signals", {}) or {}
intent = float(signals.get("intent", 0.0))
agency = float(signals.get("agency", 0.0))
friction = float(signals.get("friction", 0.0))
will = max(0.0, min(1.0, intent * agency - friction))
if will >= 0.5:
verdict = "act"
elif will >= 0.2:
verdict = "defer"
else:
verdict = "block"
return {
"chakra": NAME,
"will": will,
"verdict": verdict,
"inputs": {"intent": intent, "agency": agency, "friction": friction},
}
|