Goal: Use declarative policy blocks for failure recovery, mission handoff, and platform resilience — without scattering imperative glue code through behaviors.
Examples:
examples/features/recovery_policy.sd — minimalexamples/features/recovery_policy_options.sd
— all on branchesexamples/features/continuity_policy_options.sd
— triggers and fleet handoffexamples/features/cognitive_policies_options.sd
— homeostasis + attentionexamples/workflows/gps_loss_full_stack.sd —
stitched workflowOptions reference: platform-feature-examples.md · Workflows: workflows/README.md
Guides: self-healing.md · mission-continuity.md · cognitive-resilience-architecture.md
Map sensor or subsystem failures to safe operating modes:
recovery_policy RoverRecovery {
on gps.failed {
switch_to visual_odometry;
reduce_speed 0.5 m/s;
enter degraded_mode;
}
}
CLI: spanda heal, spanda recover, spanda sim --inject-failure.
When a robot fails mid-mission, define how work continues on a successor:
continuity_policy PatrolContinuity {
on robot.failed {
resume from checkpoint;
reassign mission;
}
}
CLI: spanda continuity, spanda takeover, spanda succession.
Optional blocks that tie programs to the platform homeostasis and attention subsystems:
@policy(kind: "homeostasis")
PlatformStability {
metric cpu_pct;
metric memory_pct;
metric battery_pct;
}
@policy(kind: "attention")
MissionFocus {
rule suppress_low_priority;
rule boost_critical_health;
}
CLI: spanda homeostasis check, spanda reflex list, Control Center Cognitive & Resilience
tab.
spanda check examples/features/recovery_policy_options.sd
spanda heal examples/features/recovery_policy.sd
spanda recover examples/features/recovery_policy.sd --failure gps
spanda continuity examples/features/continuity_policy_options.sd \
--failed RoverAlpha --progress 72 --trigger robot_failed
spanda homeostasis check --json
spanda check examples/workflows/gps_loss_full_stack.sd
spanda demo self-healing
spanda demo continuity
on lidar.failed branch to your recovery_policy that enters safe_mode.continuity_policy that transfers state to a named successor../scripts/cognitive_resilience_smoke.sh and inspect homeostasis output.| Next step | Resource |
|---|---|
| Platform options + workflows | platform-feature-examples.md · workflows/README.md |
| Full showcase index | examples/showcase/README.md |
| Feature lookup | examples/features/README.md |
| Mission assurance | mission-assurance.md + spanda demo assurance |
| Language reference | spanda-language.md |