Primacode
Intake
Type fragments as they occur to you. Intake coalesces them on a pause, classifies each one, and routes it.
Live Built and working today on the surface this card describes.
What it does
You type half-formed things as you think of them; intake waits for a pause, classifies each fragment, and decides what it is for: open a new quest, correct an instruction that has not started, add a constraint to work already running, or record a musing and act on nothing.
The raw text of a fragment is immutable and authoritative. Whatever the classifier makes of it, the words you typed travel verbatim.
It is on by default. Shipping the central idea behind a flag meant it was off for everyone who did not know to look for it.
That was safe to do because the two risky parts are handled. A classifier outage degrades visibly: a failed classification becomes a new quest you can see and correct, never a dropped fragment. And correction is cheap: one key re-files a misclassified fragment, including re-delivering it to a thread that is already running.
A fragment carrying a pasted file or an editor selection bypasses intake entirely, because intake's whole interface is a string and the rest would be discarded.
Inputs and outputs
| Input | One fragment of text, as typed. |
|---|---|
| Classification | One of new_task, correction, constraint or thinking_aloud, with a confidence and a rationale. |
| Output | A signal delivered to a storyline, as injected, queued, restart or recorded. |
| Refusal | An empty or duplicate fragment is refused, and falls through to the ordinary path rather than vanishing. |
| Re-file | One key on a fragment in the pane, which re-classifies it and re-delivers it. |
Configuration
PRIMACODE_INTAKE | 0 opts out completely. The off path is the unmodified upstream prompt, not a degraded mode. |
|---|---|
PRIMACODE_STEER_CUT | Off by default. On, an interjection can cut the model call in flight rather than waiting for the turn to end. |
| Classifier transport | Non-streaming. Streaming a two-hundred-token verdict buys nothing. |
Limits
- Steering cuts at exactly two points: after a tool result, where the output is already recorded and nothing is discarded; and mid-text once at least forty characters have arrived, where the cut truncates a sentence and keeps everything before it. Everywhere else refuses, because a wrong cut costs a corrupted transcript and a missed one costs a turn of latency.
- One cut per turn. Intake coalesces on a pause, so three fragments typed in eight seconds can produce three steers, and without a limit each would cut a freshly issued call and pay for a prefill that makes no progress.
- Steering has never been watched against a real provider. That is why it is off, and it is the one default here expected to change.
- A steer amends the turn. Stopping is a different command and a different path.
Example
the four things a fragment can be
new_task start something new
correction change an instruction that has not started executing
constraint add a requirement to work that is already running
thinking_aloud record it, act on nothing Source of truth
philosophers_stone/platform/primacode.md § Intake (on by default, the classifier fallback, the three traps found by using it)philosophers_stone/platform/primacode.md § Streaming and mid-flight steering (the two cut points, one cut per turn, the flag and why it is off)primacode/packages/primacode/src/intake/types.ts (the four labels, the delivery kinds, the immutable raw fragment)