Kina.ai

Specification

ADR: StoryLM-0 `T_max` padded scratch

Context

Sections 19–21 left “preallocated T_max buffers and a write index” open because an in-place write would invent mutability that Phase 0 does not define. AGENTS.md step 4 lists T_max scratch after the prefill handoff.

concat, broadcast, and slice are already specified. The missing piece is the decision to encode a fixed-shape buffer as pad-with-zeros + slice-prefix, not as scatter-assign.

Decision

Specify T_max scratch as the existing composition in 22-tmax-scratch.md: concat of the live cache with a broadcast-zero tail, then slice of the live prefix before the next static-S decode. No new operator. Do not add an in-place write, a write index, or Phase 2 state. This instance uses Section 21’s prompt and T_max = 5.

Consequences