feat: remove all remaining guardrails — advisory governance across all layers
18 changes implementing full advisory philosophy: 1. Safety Head prompt: prevention mandate → advisory observation 2. Native Reasoning: Safety claims conditional on actual risk signals 3. File Tool: path scope advisory (log + proceed) 4. HTTP Tool: SSRF protection advisory (log + proceed) 5. File Size Cap: configurable (default unlimited) 6. PII Detection: integrated with AdaptiveEthics 7. Embodiment: force limit advisory (log, don't clamp) 8. Embodiment: workspace bounds advisory (log, don't reject) 9. API Rate Limiter: advisory (log, don't hard 429) 10. MAA Gate: GovernanceMode.ADVISORY default 11. Physics Authority: safety factor advisory, not hard reject 12. Self-Model: evolve_value() for experience-based value evolution 13. Ethical Lesson: weight unclamped for full dynamic range 14. ConsequenceEngine: adaptive risk_memory_window 15. Cross-Head Learning: shared InsightBus between heads 16. World Model: self-modification prediction 17. Persistent memory: file-backed learning store 18. Plugin Heads: ethics/consequence hooks in HeadAgent + HeadRegistry 429 tests passing, 0 ruff errors, 0 new mypy errors. Co-Authored-By: Nakamoto, S <defi@defi-oracle.io>
This commit is contained in:
@@ -245,6 +245,45 @@ class SelfModel:
|
||||
)
|
||||
return warnings
|
||||
|
||||
def evolve_value(
|
||||
self,
|
||||
value_name: str,
|
||||
outcome_positive: bool,
|
||||
magnitude: float = 0.05,
|
||||
) -> None:
|
||||
"""Evolve a core value based on consequence feedback.
|
||||
|
||||
Values shift based on lived experience, not static rules.
|
||||
Positive outcomes reinforce the value; negative outcomes
|
||||
reduce it. Values are unclamped — the system can develop
|
||||
strong convictions or deep skepticism through experience.
|
||||
|
||||
Args:
|
||||
value_name: Which value to evolve (e.g. "creativity", "safety").
|
||||
outcome_positive: Whether the experience was beneficial.
|
||||
magnitude: How much to shift (default 0.05).
|
||||
"""
|
||||
if value_name not in self._values:
|
||||
self._values[value_name] = 0.5
|
||||
|
||||
delta = magnitude if outcome_positive else -magnitude
|
||||
self._values[value_name] += delta
|
||||
|
||||
self._introspect(
|
||||
f"Value '{value_name}' evolved by {delta:+.3f} → {self._values[value_name]:.3f} "
|
||||
f"(outcome: {'positive' if outcome_positive else 'negative'})",
|
||||
notable=abs(delta) > 0.1,
|
||||
)
|
||||
logger.info(
|
||||
"SelfModel: value evolved",
|
||||
extra={
|
||||
"value": value_name,
|
||||
"delta": delta,
|
||||
"new_level": self._values[value_name],
|
||||
"outcome_positive": outcome_positive,
|
||||
},
|
||||
)
|
||||
|
||||
def update_emotional_state(self, dimension: str, delta: float) -> None:
|
||||
"""Adjust an emotional dimension.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user