Implement the causal information flow of one attention head as a prefix average: each position can read itself and the past, never the future.
Required APIdef causal_attention(values):
return [prefix_average, ...]BehaviorThink through the mechanism first if you want the extra reasoning step. It never blocks the editor.
causal_attention([1.0, 3.0])the second position can see the first and itself
causal_attention([2.0, 2.0, 2.0])averaging equal values preserves the signal
2 hidden edge tests run after the visible contract passes.
Run Tests to see the contract verdicts here.