// Feature: @policy(kind: "homeostasis") — platform stability metrics in source
//
//   spanda check examples/features/homeostasis_policy.sd
//   spanda homeostasis check --json
//
// Prefer @policy + `import std.policies.homeostasis` (package spanda-policies).
// Legacy `homeostasis_policy` keywords were removed (breaking).
// Docs: docs/cognitive-resilience-architecture.md
// Smoke: ./scripts/cognitive_resilience_smoke.sh

import std.policies.homeostasis;

@policy(kind: "homeostasis")
PlatformStability {
    metric cpu_pct;
    metric memory_pct;
    metric battery_pct;
}

robot Rover {
    sensor lidar: Lidar;
    actuator wheels: DifferentialDrive;
    safety { max_speed = 1.0 m/s; }
    behavior patrol() {
        loop every 100ms { }
    }
}
