docs/llms.txt: single-file language reference for LLMs (#403)#432
Merged
Conversation
LLMs generate Python/TS fluently and EigenScript badly — they fall into exactly the spread/scope traps the write-eigenscript skill exists to prevent. For a low-training-data language, the artifact that makes it AI-legible may shape a stranger's first hour more than the REPL: the whole language in one file, plus a mechanical validate-what-you-generated loop. docs/llms.txt distills the surface a model actually needs — the `of`/one-element spread rule (`f of [x]` does not spread), the outward-mutating scope model (`local` in helpers), reserved/soft keywords, the observer idioms, values/strings — and documents the generation-validation ladder explicitly: `--lint --json` (parse/lint) → run → `--test` (the parse→compile→sandbox grading iLambdaAi already uses). Linked from the README; a doc-drift check stamps it to the current version so it can't silently fall behind SPEC. Every code snippet was run before shipping — which caught a wrong idiom in the draft: `1/0` warns and saturates rather than throwing, so the try/catch example raises with `throw of` explicitly (and now says so). Suite 2508/2508. Closes #403 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
LLMs generate Python/TS fluently and EigenScript badly — they fall into exactly the spread/scope traps the
write-eigenscriptskill exists to prevent. For a low-training-data language, the artifact that makes it AI-legible may shape a stranger's first hour more than the REPL.docs/llms.txtdistills the whole surface a model needs into one file:of/ one-element-spread rule (f of [x]does not spread — the Initialize EigenScript repository with official README and project structure #1 silent-wrong trap),ismutates the caller's binding;localin helpers),loop while not converged,report_value), values/strings,eigenscript --lint --json(parse/lint) → run →--test— the parse→compile→sandbox grading iLambdaAi already uses.Kept honest
llms.txtto the current version so it can't silently fall behind SPEC.1/0warns and saturates rather than throwing, so the try/catch example now raises withthrow ofexplicitly (and says so). An LLM reference that teaches a wrong idiom is worse than none.Scope note
Per-file
eigs.jsonlint allow-lists (the other half of #399) and this single-file reference both serve the "mechanically validate generated code" goal. Suite 2508/2508.Closes #403
🤖 Generated with Claude Code