Goal: Combine AI safety, hardware deploy, tasks, and mission replay in one complete workflow.
Examples:
examples/end_to_end/safe_patrol/examples/end_to_end/replay_mission.sdexamples/showcase/killer_demo.sdexamples/end_to_end/safe_patrol/ is a full project:
safe_patrol/
spanda.toml
src/main.sd
It demonstrates:
deploysafety.validate() gateverify { } blockspanda check examples/end_to_end/safe_patrol/src/main.sd
spanda verify examples/end_to_end/safe_patrol/src/main.sd --target RoverV1
spanda run examples/end_to_end/safe_patrol/src/main.sd
Mission traces capture scheduler events and robot state for regression and incident review:
# Record
spanda sim examples/end_to_end/replay_mission.sd --record
# Inspect
spanda replay replay_mission.trace
# Re-run source and verify frame parity
spanda replay replay_mission.trace --deterministic
# Play back recorded state without re-executing logic
spanda replay replay_mission.trace --playback --from T+00:01
See replay.md. Golden traces can be committed under examples/ per .gitignore
rules.
Twin blocks mirror physical state for simulation and divergence detection:
twin Shadow {
replay true;
mirror pose;
}
Used in replay_mission.sd and showcase demos. Full guide:
examples/showcase/digital_twin_demo.sd.
You have completed Spanda 101 when you can:
safety.validate()spanda verifyspanda.toml and tests| Path | Resource |
|---|---|
| Flagship demo | killer-demo.md |
| Real-time contracts | realtime.md |
| Fleet simulation | examples/communication/multi_robot_fleet.sd |
| Language deep dive | spanda-language.md |
| API lookup | spanda-reference.md |
Full catalog: examples/end_to_end/README.md
| Scenario | Command |
|---|---|
| Warehouse delivery | spanda verify examples/end_to_end/warehouse_delivery/src/main.sd --target RoverV1 |
| Pick-and-place cell | spanda run examples/end_to_end/pick_and_place_cell/src/main.sd |
| Fleet coordination | spanda fleet run examples/end_to_end/fleet_coordination.sd |
| Incident response | spanda verify examples/end_to_end/incident_response.sd --simulate |
| Real-time patrol | spanda run examples/end_to_end/realtime_patrol.sd --trace-realtime |
Build a my_patrol package that:
stop_ifsafety.validate()deploy to RoverV1 and passes spanda verify--deterministicCompare your solution to examples/end_to_end/safe_patrol/.
Congratulations — you have finished Spanda 101.
Return to the curriculum index or explore all examples.