sandhi.arc
Pearson fit of the fortune line against the six arcs (Reagan et al. 2016); best shape and every score.
sandhi.beat.add
Insert a beat after the beat with id `after` (default: at the end). Returns the new id and position.
after: string?, spine?, label: string?, text: string?, fortune: integer?, joint?
sandhi.beat.move
Move a beat to a 1-based position.
id: string, position: integer
sandhi.beat.remove
Remove a beat. Threads that point at it lose that plant or payoff, and tidbits placed there are unplaced. Undo restores them.
id: string
sandhi.beat.update
Change fields of one beat: label, spine, joint (into this beat), text, fortune, tags, marks, driver, avastha, kis, drafts. Arrays replace whole. Undo reverses it.
id: string, patch: object
sandhi.chapter.start
Start a chapter at a beat: the name goes on that beat and on the beats after it, up to the next beat that already starts or belongs to another chapter. An empty name ends the chapter there (the same beats lose their…
beat: string, name: string
sandhi.checks
The checks on the current labels (SPEC §2): each with class, beat position, message and the next step. A clean story returns count 0.
sandhi.coverage
For each of the 13 principles, the beat positions tagged with it.
sandhi.journal
The last n tool calls (default 20, max 200): tool, class, door, ms, time. The trajectory across sessions.
n: integer?
sandhi.learn.get
How stories work: the 13 principles (line, what each source says and who pushes back, the beats of this story that serve it), the six fortune shapes, and the sources. principle narrows it to one.
principle: string?
sandhi.read.cancel
Stop the read that is running. Its model call is aborted; nothing is staged.
sandhi.read.discard
Drop the staged proposal. The story is unchanged; the proposal cannot be brought back.
sandhi.read.get
The staged proposal: the proposed story (schema sandhi:1) and the read report.
sandhi.read.paragraphs
Stage prose split one beat per paragraph, with no model and every label left to the writer, as a proposal like a read (read.get shows it; the writer accepts it in the page). The story does not change.
text: string
sandhi.read.run
Read a story (prose) with the chosen rung and stage a proposed structure; the story does not change. Beats are the writer's own text cut at the model's exact quotes; quotes not found in the text are dropped. Long…
text: string, rung?, strategy?
sandhi.reader.models
The model ids the chosen rung offers: a local server's list, or your provider's list fetched with your key.
sandhi.reader.select
Choose the rung ("machine", "device", "provider"), the provider (openrouter, openai, anthropic, gemini, groq, mistral, deepseek, together, custom), the local server, and the model id for the chosen rung. A custom…
rung?, provider?, server?, model: string?
sandhi.reader.status
The AI ladder, closest first: a model server on this machine, Gemini Nano in Chrome, your provider with your key. Which rungs can read, the chosen rung and where its words go, the provider and model, key fingerprints…
probe: boolean?
sandhi.redo
Redo the last undone change.
sandhi.status
One read of the whole situation: title, counts, check counts by class, closest arc, unsaved state, undo depth, last call. Start here.
sandhi.story.demo
Replace the story with "The whistle", the ten-beat demo from the explainer. Undo brings the old story back.
sandhi.story.get
The full story as JSON (schema sandhi:1): beats, threads, notes. The only read that grows with the story.
sandhi.story.load
Replace the story with the given JSON (schema sandhi:1). It is validated first; on failure the story is unchanged. Undo reverses it.
story: object
sandhi.story.new
Replace the story with a blank Story Spine of five beats. Undo brings the old story back.
sandhi.story.paste
Replace the story with pasted prose, one beat per paragraph, every label left to the writer. No model, nothing guessed. Undo brings the old story back.
text: string
sandhi.story.recent
The last three stories a replace pushed aside (newest first): k, title, when, beat count. Pass k to get that story in full; story.load brings it back (undoable).
k: integer?
sandhi.story.save
Download the story as <title>.sandhi.json. Nothing is uploaded.
sandhi.story.sketch
Set the shape the writer wants the fortune to follow: points [{t, v}] with t from 0 (the first beat) to 1 (the last) and v from -5 to 5, resampled to 25 values; an empty list clears it. The chart draws it under the…
points: array
sandhi.story.start
Start a new story from Story Spine lines, in order: lines [{stage, text}] with stage once, everyday, oneday, because, until or since; plus title, logline and belief. The stage words set the joints (one day: but…
title: string?, logline: string?, belief: string?, lines: array?
sandhi.story.update
Set the title, logline, belief, or per-principle notes ("In this story"). An empty note removes it. Undo reverses it.
title: string?, logline: string?, belief: string?, notes: object?
sandhi.thread.add
Add a plant-and-payoff thread (Chekhov's gun, the bīja): a label, the beat that plants it, the beats that pay it off.
label: string, plant?, payoffs: array?
sandhi.thread.remove
Remove a thread. Undo restores it.
id: string
sandhi.thread.update
Change a thread's label, plant beat, payoff beats (payoffs replace whole), or open: true to leave it open on purpose (a planted thread with no payoff is then not flagged).
id: string, patch: object
sandhi.tidbit.add
Keep a tidbit: a real-life observation that could give the story life (a curious train stop; meat kept too long gets freezer burn). It waits unplaced until the writer weaves it into beats. Undo removes it.
text: string, note: string?, placed: array?
sandhi.tidbit.remove
Remove a tidbit. Undo restores it.
id: string
sandhi.tidbit.update
Change a tidbit's text, note, or the beats it is placed in (placed replaces whole; [] unplaces it).
id: string, patch: object
sandhi.undo
Undo the last story change (100 steps).
sandhi.view.focus
Focus the page on one principle (dims other beats, opens its panel), or "all" to clear.
principle
sandhi.write.depth
Ask the chosen reader how to give one thin beat depth: 2 to 4 suggestions, each a tidbit to look for or use, a plant, or a question, never prose. Nothing enters the story. It uses the reader the writer chose.
beat: string
sandhi.write.dismiss
Drop the current suggestion. Nothing was kept from it.
sandhi.write.get
The current suggestion (questions, options or joint verdicts), or no_proposal.
sandhi.write.interview
Ask the chosen reader for one question aimed at the weakest place in the story (empty beats, the checks, thin beats, principles no beat serves), with where the answer belongs: a beat's text, a tidbit or a note. The…
sandhi.write.joints
Ask the chosen reader to judge every joint the writer labelled therefore or but: holds, slack (and then fits better) or unsure, with a reason and a question. Advice only; no joint is relabelled. It uses the reader the…
sandhi.write.options
Ask the chosen reader what could happen at one beat: the obvious option, named and set aside, then 3 to 5 others, each one line with its joint, fortune, principle and why; at least one where things get worse.…
beat: string
sandhi.write.place
Ask the chosen reader where each unplaced tidbit fits: a beat, whether it lives there as action, character or setting, how in one line, and why. Proposals only; placing one is tidbit.update {placed}. It uses the…
sandhi.write.plot
Ask the chosen reader how the structure changes around a new plot element: up to 6 changes, each a new empty beat (its stage, joint, fortune and a one-line label) or a relabel of an existing beat's stage, joint or…
element: string
sandhi.write.questions
Ask the chosen reader 2 to 4 questions about one beat, each from a principle the beat does least for. Questions only; nothing enters the story. The result replaces any earlier suggestion (write.get). It uses the…
beat: string
sandhi.write.shape
Ask the chosen reader how to bring the beats that sit 2 or more from the writer's sketched fortune line toward it: one line per beat, with why. Proposals only; no fortune or text changes. Needs a sketch…