githubnext/chopinPublic

Let's compose rich plans together

Let the planner reach for a diagram or a formula

Both already worked. Math is in the dialect's node list with a Lexical
node behind it and KaTeX in front, a `mermaid` fence draws an SVG, and
the slash menu offers a human either one in a keystroke. The agent,
which writes most of the plan, got the bare word "math" in a list of
node names and no delimiters at all.

Guessing wrong costs nothing visible, which is what makes it worth an
instruction rather than a footnote. `\(r = n/t\)` is not rejected — it
parses as prose, and markdown eats the backslashes on the way out, so it
is saved as `(r = n/t)` and reads like a sentence somebody meant to
write. `\[…\]` survives half-escaped, which is no better for being
different.

The paragraph they were named in is the allowlist, so naming them there
said only that they would not be refused. Callout and Tabs each get a
clause on when they earn their place; a diagram and a formula had none,
under a standing instruction that prose is the default. They have one
now, placed before the components so that damper still reads as being
about components.

The counter-example is written `\\(` in the source. A template literal
turns `\(` into `(`, so the obvious spelling would have produced an
instruction about parentheses — silently, and in a prompt that nothing
tests.

The markdown half of that section is still hand-written prose restating
`NODES`, `LINK_PROTOCOLS` and `IMAGE_PROTOCOLS`, with nothing tying it
to them. It is now the only part of the dialect description that can
drift without anything noticing.
KCKrzysztof Cieslak authored
f31239dPatch
Parent31bbb85
1 file changed+16-3
StackedSplit
apps/server/src/agent/planner.ts+16 −3