A reference for an LLM assistant: doc/klammertext_for_llm.md
If you use a language model to help write Klammertext, give it this file. It is a dense reference written for a model rather than a person -- not a tutorial, and it motivates nothing. Two things make it different from the other documents here. It tells the model NOT TO GUESS. Its first section maps questions to commands, because "kdesc" prints the live state of the machine's data structures: what klammers exist, what arguments each takes, what the argument types accept. The file says outright that the parameter list kdesc prints is authoritative and that the file is not, so a model checks rather than infers. "kdiag --process --check doc.kt" verifies a document without rendering it, and "kdiag --type" settles how a fragment is being parsed. Its second section is a table of WRONG ASSUMPTIONS. A model that has not seen Klammertext pattern-matches it to LaTeX, Markdown or Lisp and produces confidently wrong syntax, so each row names the likely wrong guess and corrects it -- braces against the bar separator, bracketed options against ":name value", "%" against "#", backslash escapes against "^", and @document's body belonging in its ":text" option rather than in a positional argument. The rest is the syntax proper: the three "@" tiers, argument forms, a complete worked document, the klammers most used when authoring, how to define one, and the behaviour that otherwise costs a debugging session. The README points at it. Assembled from dev commit 6c2ff7b8fce3.
This commit is contained in:
12
README.md
12
README.md
@@ -25,6 +25,16 @@ the three commands — `ktext`, `kdesc`, `kdiag` (into `bin/`). See the
|
||||
source-install guide for prerequisites (TeX Live for PDF output, Python, and so
|
||||
on).
|
||||
|
||||
## Working with an AI assistant
|
||||
|
||||
If you use a language model to help write Klammertext, give it
|
||||
[`doc/klammertext_for_llm.md`](doc/klammertext_for_llm.md). It is a dense
|
||||
reference written for a model rather than a person: the syntax, the things a
|
||||
model is most likely to assume wrongly about it (Klammertext is not LaTeX,
|
||||
Markdown, or Lisp, and reads oddly if you expect any of them), and how to ask
|
||||
the `kdesc` and `kdiag` commands for the current state of the machine instead
|
||||
of guessing.
|
||||
|
||||
## Editor support
|
||||
|
||||
Editing support for Emacs, Sublime Text, Vim, and Visual Studio Code —
|
||||
@@ -41,7 +51,7 @@ are regenerated on each release — patches cannot be merged directly.
|
||||
Report problems (or send patches) to the author; accepted changes are
|
||||
applied to the development tree and appear in a following snapshot.
|
||||
|
||||
This snapshot was assembled from development commit `6c8ee6c22fca`.
|
||||
This snapshot was assembled from development commit `6c2ff7b8fce3`.
|
||||
|
||||
## License
|
||||
|
||||
|
||||
Reference in New Issue
Block a user