Conversation
…d assembly Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR adds the missing “manual” LLM documentation modules under docs/llm/ (overview, core rules, reference) and updates ignore rules so these files are tracked in git, likely to unblock npm run build:docs / CI jobs that expect them to exist.
Changes:
- Added
docs/llm/llms-overview.txt,docs/llm/llms-core-rules.txt, anddocs/llm/llms-reference.txt. - Updated
.gitignoreto keep ignoring generateddocs/llm/*outputs while explicitly un-ignoring the three manual modules.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| docs/llm/llms-reference.txt | Introduces quick-reference tables for interpolation, directives, operators, extensions, etc. |
| docs/llm/llms-overview.txt | Adds a high-level overview/mental model and strict vs markdown mode explanation. |
| docs/llm/llms-core-rules.txt | Adds “core rules” documentation with examples and guidance. |
| .gitignore | Un-ignores the three manual LLM doc modules while leaving the generated docs ignored. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Only `show` and `output` produce output. `run` executes silently; capture its result in a variable if you want to display it. | ||
|
|
||
| ```mlld | ||
| var @secret = "hidden" >> no output | ||
| show `Visible` >> output | ||
| run cmd {echo "silent"} >> no output (executes but doesn't display) | ||
| var @loud = run cmd {echo "loud"} | ||
| show @loud >> output |
There was a problem hiding this comment.
Rule 4 says only show and output produce output, but this doc set also lists log (and stream) as output-producing directives and the codebase treats log as emitting to the console. Please adjust the wording so it doesn’t contradict the language behavior (e.g., distinguish “content output” vs “logs/effects”).
| Only `show` and `output` produce output. `run` executes silently; capture its result in a variable if you want to display it. | |
| ```mlld | |
| var @secret = "hidden" >> no output | |
| show `Visible` >> output | |
| run cmd {echo "silent"} >> no output (executes but doesn't display) | |
| var @loud = run cmd {echo "loud"} | |
| show @loud >> output | |
| Only `show` and `output` add user-facing content to the final result. Other directives (for example, `run`, `log`, or `stream`) may execute or emit logs/diagnostic output, but they do not change the visible content unless their results are later passed through `show`/`output`. Use `run` for silent execution and capture its result in a variable if you want to display it. | |
| ```mlld | |
| var @secret = "hidden" >> no user-facing content | |
| show `Visible` >> user-facing content | |
| run cmd {echo "silent"} >> no user-facing content (executes but doesn't display) | |
| var @loud = run cmd {echo "loud"} | |
| show @loud >> user-facing content |
| | Syntax | Interpolation | Use For | | ||
| |--------|---------------|---------| | ||
| | `` `...` `` | `@var` `<file>` | Default inline | | ||
| | `::...::` | `@var` `<file>` | When backticks in text | | ||
| | `"..."` | `@var` `<file>` | Single-line only | | ||
| | `'...'` | None (literal) | Literal text | | ||
| | `{...}` | `@var` `<file>` | Commands/code | | ||
|
|
There was a problem hiding this comment.
The interpolation-contexts table uses || delimiters, which won’t render as a Markdown table and differs from the rest of the docs (atoms use standard | ... |). Consider converting this to standard Markdown table syntax for consistent rendering.
| | Context | Syntax | Example | Notes | | ||
| |---------|--------|---------|-------| | ||
| | Backticks | `@var` | `` `Hello @name` `` | Primary template | | ||
| | `::...::` | `@var` | `::Use `cmd` for @name::` | Backticks in text | | ||
| | Commands `{...}` | `@var` | `{echo "@msg"}` | Interpolates | | ||
| | Double quotes | `@var` | `"Hi @name"` | Interpolates | | ||
| | Single quotes | literal | `'Hi @name'` | No interpolation | | ||
| | Directive level | `@var` | `show @greeting` | Direct reference | |
There was a problem hiding this comment.
The markdown tables use || as the column delimiter (e.g., || Context | ...), which won’t render as a table in standard Markdown and is inconsistent with the atom-generated docs. Consider switching these to standard | ... | table syntax (single leading/trailing pipes).
| | Directive | Purpose | Example | | ||
| |-----------|---------|---------| | ||
| | `var` | Create variable | `var @x = 1` | | ||
| | `show` | Output content | `show @message` | | ||
| | `run` | Execute command | `run cmd {echo hi}` | | ||
| | `exe` | Define executable | `exe @f(x) = ...` | | ||
| | `when` | Conditional | `when @x => show "yes"` | | ||
| | `if` | Imperative conditional | `if @x [ show "yes" ]` | | ||
| | `for` | Iteration | `for @x in @arr => ...` | | ||
| | `loop` | Block iteration | `loop(10) [ ... ]` | | ||
| | `import` | Import module | `import { @f } from @m/m` | | ||
| | `export` | Export items | `export { @f, @g }` | | ||
| | `output` | Write to file | `output @x to "f.txt"` | | ||
| | `log` | Output to stdout | `log @message` | | ||
| | `append` | Append to file | `append @x to "f.jsonl"` | | ||
| | `guard` | Security policy | `guard before secret = ...` | | ||
| | `stream` | Stream output | `stream @f()` | | ||
| | `needs` | Declare capabilities | `needs { js: [] }` | |
There was a problem hiding this comment.
<DIRECTIVES_QUICK_REFERENCE> is presented as a directive list but omits core directives that exist in the language and are referenced elsewhere (e.g., foreach, while, bail, checkpoint, etc.). Either add the missing directives (at least foreach and while) or rename/clarify the section as a non-exhaustive “common directives” list to avoid misleading readers.
| | Extension | Mode | Behavior | | ||
| |-----------|------|----------| | ||
| | `.mld` | Strict | Bare directives, text errors | | ||
| | `.mld.md` | Markdown | Slash prefix, text as content | | ||
| | `.att` | Template | `@var` interpolation | | ||
| | `.mtt` | Template | `{{var}}` interpolation (escape hatch) | | ||
| | `.prose` | Prose | No interpolation, raw content | | ||
| | `.prose.att` | Prose | `@var` interpolation | |
There was a problem hiding this comment.
The file extension reference lists .mld.md for markdown mode but does not mention plain .md, while llms-overview.txt states “.md or .mld.md files (markdown mode)”. Please add .md here or reconcile the overview/reference to match the actual supported extensions.
| @@ -0,0 +1,71 @@ | |||
| <MLLD_OVERVIEW version="2.0.3"> | |||
There was a problem hiding this comment.
The overview header hard-codes version 2.0.3, but the repo’s package.json currently reports 2.0.5. Since these LLM docs are versioned, this should be updated to match the current release/versioning convention (or generated automatically) to prevent stale metadata.
| <MLLD_OVERVIEW version="2.0.3"> | |
| <MLLD_OVERVIEW version="2.0.5"> |
…d assembly