save_algorithm
Create or replace an algorithm storyboard from a JSON spec, with animated array frames or calculation rows, pseudocode, and interactive parameters. Saves to your project session.
Instructions
Create or replace an algorithm storyboard from a JSON spec. spec = { id (slug), tag?, name, title?, sub?, workflow?{sheet,label}, layout?{ width (overall page px, 700-2400), height (stage min-height px, 240-1600), sidebarWidth (pseudocode/narration column px, 260-720) } for bigger storyboards, kind ("array"|"calc"), code (pseudocode lines[]), params? [{ key, label, sym?, value, unit?, min, max, step, hint? }], and EITHER steps[] (explicit frames) OR builtin (one of: binary-search, bubble-sort, euclid-gcd) + data + questions?[{ step, text }] }. A frame (kind "array") = { array[], cls{index:state}, ptr{label:index}, note, line, verdict{ok?,text}, question? } where state ∈ idle|active|compare|lo|hi|mid|eliminated|found|sorted. A row (kind "calc") = { label, result?, unit?, expr?, sub?, kind?(input|result), bad?, line, note, question? }. Persists to this session's project.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | Yes |