Feature examples — full coverage index
Runnable .sd programs mapped to Spanda capabilities. Use this when you need one file per feature or want to see what the language supports.
Learning paths: examples/README.md · Spanda 101 · Spanda for Dummies · Tutorials index
spanda check examples/features/dyn_trait_object.sd
spanda run examples/features/enum_payload.sd
Feature
Example
Minimal robot
basics/01_minimal_robot.sd
Physical units
types/units.sd, basics/02_sensors_and_safety.sd
if / match / loops
basics/03_control_flow.sd
Result / Option
basics/04_result_and_option.sd
Modules / export
modules/path_planning.sd, modules/navigation.sd
Traits + impl
basics/05_traits_and_impl.sd
dyn Trait objects
features/dyn_trait_object.sd
Generic structs
features/generic_struct.sd
Generic module fn
features/generic_module_fn.sd
Struct literals
features/struct_literals.sd
Enum payloads
features/enum_payload.sd
serialize / deserialize
basics/06_serialize_telemetry.sd
test blocks
basics/07_in_language_tests.sd
async / await
basics/08_async_await.sd
Behavior requires / ensures
basics/09_behavior_contracts.sd
State machines + enter
basics/10_state_machine.sd
observe / fusion
basics/11_observe_and_fusion.sd, types/fusion.sd, robotics/sensor_fusion.sd
state_estimator / weighted fusion
showcase/assurance/rover.sd, assurance/rover_assurance.sd — state-estimation.md
anomaly_detector / learned backend
anomaly/learned_navigation.sd, anomaly/navigation_anomaly.sd — anomaly-detection.md
Mission assurance (full suite)
showcase/assurance/rover.sd — spanda demo assurance — mission-assurance.md
world_model + fusion hook
world_model_observe.sd , world_model_belief.sd
expect_compile_error tests
basics/12_compile_fail_tests.sd
Triggers, verify, assurance, fleet (options)
Guide: platform-feature-examples.md
Feature
Example
Lidar avoidance
lidar_avoidance.sd
Safety zones
features/safety_zones.sd , patrol_with_zones.sd
max_speed / stop_if
basics/02_sensors_and_safety.sd
Differential drive
differential_drive.sd
Arm / gripper
robotic_arm_pick_place.sd, vision_pick_place.sd
Drone
drone_patrol.sd, drone_altitude_hold.sd
Humanoid
humanoid_assistant.sd
Warehouse / logistics
warehouse_logistics.sd, showcase/warehouse_robot.sd
Outdoor / rover nav
outdoor_navigation.sd, showcase/rover_navigation.sd
Tasks, triggers, concurrency
Platform differentiators (v0.6+)
Declarative policy blocks and distributed autonomy — minimal files here, options variants, and
stitched workflows under workflows/ .
Stitched workflows: workflows/README.md · flagship showcases below.
Showcase / CLI
Path
Distributed decisions
showcase/distributed_decisions/ · spanda decision *
Self-healing
showcase/self_healing/ · spanda heal / recover
Mission continuity
showcase/continuity/ · spanda continuity / takeover
Mission assurance
showcase/assurance/rover.sd · spanda demo assurance
Differentiation analytics
showcase/differentiation/ · spanda demo differentiation
Feature
Example
deadline / jitter
realtime/deadline_tasks.sd
Latency pipeline
realtime/latency_budget.sd
Watchdogs
realtime/watchdog.sd
Operating mode
realtime/degraded_mode.sd
recover from
realtime/recovery.sd
Mission trace / replay
end_to_end/replay_mission.sd, realtime/deterministic_replay.sd
mission { duration }
features/mission_duration.sd
Feature
Example
Pub/sub + QoS
communication/basic_publish_subscribe.sd
Topic QoS + deadline
features/topic_qos.sd
Services
communication/service_calls.sd
Actions
communication/actions.sd
Agent-to-agent
communication/agent_to_agent.sd
Multi-robot fleet
communication/multi_robot_fleet.sd
Live MQTT (Mosquitto)
communication/mqtt_live.sd
Digital twin sync
communication/digital_twin_sync.sd
Human interaction
communication/human_interaction.sd
ROS2 bridge surface
ros2_bridge.sd
Feature
Example
Twin mirror + replay
digital_twin.sd, showcase/digital_twin_demo.sd
Twin types
types/digital_twin.sd
Feature
Example
Literals + .matches()
regex/basic_regex.sd
Command triggers
regex/command_trigger.sd
Log filters
regex/log_filter.sd
Subscribe filters
regex/message_filter.sd
validate rules
regex/validation.sd
Feature
Example
Capabilities + signed topics
std/security.sd
Remote-signed kill switch
security/remote_signed_kill_switch.sd
Secure comm demos
security/secure_robot_to_robot.sd
Audit records
std/audit_log.sd
Device identity
std/device_identity.sd
Provenance
std/provenance.sd
Feature
Example
Python extern
ffi_python_extern.sd
C++ extern
ffi_cpp_extern.sd
FFI bridge overview
ffi_bridge.sd
ROS2 adapter package
packages/ros2_adapter_package/
Feature
Example
Package manifest
packages/basic_project/ — packages README
Path dependencies
packages/local_dependency/
Nav2 / SLAM / ROS2 adapters
packages/nav2_adapter_package/, packages/ros2_adapter_package/
Official registry packages
packages/registry/ (repo) — official-packages.md
Standard library
std/*.sd (robotics, spatial, time, ai, …)
Type snippets
types/*.sd
Key examples are guarded in tests/golden/manifest.json. Run:
npm test -- tests/golden/rust.test.ts
Add examples/features/<feature>.sd with header comment + spanda check command
Add a row to this README
Optional: add to tests/golden/manifest.json
Update feature-status.md if stability tier changed