Priority
Two speeds of resolution. Some decisions must be instant. Some should be thoughtful. Same language, same wiring syntax, different temporal urgency.
Reflex
Reflex is spinal. Interrupt speed. Overrides everything. The signal hits the gate and the action fires within microseconds. Like a spinal reflex — the signal doesn't go to the brain.
Use cases: firewall packet filtering, emergency brake, safety interlocks, smoke alarm, thermal cutoff.
// thermal spike — cut power. No thinking. Now.
thermal -> gate(> 95C) -> emergency_shutdown
priority: reflex
// collision avoidance
sonar -> gate(< 5cm) -> emergency_stop
priority: reflexDeliberate
Deliberate is cortical. Takes time. Considers context. Aggregates information. Makes nuanced decisions. This is the default priority.
Use cases: path planning, trend analysis, optimization, migration decisions, load balancing.
// thermal trending up — consider migration
thermal -> failure_horizon(85C) -> gentle_migrate
priority: deliberate
// complex navigation with vision
sonar -> |
| -> navigate -> motors
camera -> eyes -> |
priority: deliberateBoth Speeds Together
A system can have both reflex and deliberate chains running simultaneously. The reflex overrides the deliberation when it fires. Just like biology.
// reflex — don't think, stop
sonar -> gate(< 5cm) -> emergency_stop
priority: reflex
// deliberate — think, plan, move wisely
sonar -> |
| -> navigate -> motors
camera -> |
priority: deliberate
// the robot stops instantly when something is 5cm away
// but its navigation takes the deliberate path
// reflex overrides deliberation when it firesProgram-Level Priority
An entire program can run at reflex speed. Place the priority declaration at the top of the .zp file.
// entire program runs at reflex speed
priority: reflex
// all chains in this file resolve at interrupt speed
packet -> gate(src: blocklist) -> drop
packet -> gate(dst: internal) -> accept
packet -> gate(not: known) -> log -> drop