From 34b7d0a0c5f17902d427ed883ff417c05f58a60d Mon Sep 17 00:00:00 2001 From: JarbasAi Date: Sun, 24 May 2026 20:29:01 +0100 Subject: [PATCH] INTENT-2 v3: HTML-comment carve-out, CommonMark fence note, prose de-OVOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit §4.4 .prompt: - Author-only comments via HTML-style stripped before the prompt reaches the model. Multi-line allowed, no nesting. Unmatched ` is +**stripped** before the file is handed to a language model. Comments may +span multiple lines; nesting is not supported. A `` in the same file is malformed — loaders **MUST** report it and +**SHOULD** treat the whole file as literal text (skipping comment +processing) rather than rendering a half-stripped prompt. Comments are +author-only notes (titling, attribution, reviewer cues) that never reach +the model. + +**Role.** The localized prompt a skill feeds to a language model. Like every +other resource it is shipped per language under `locale//` and resolved +through the override precedence of §2.1, so a prompt can be translated, +adjusted per region, or overridden by a user. + +**Substitution.** The one special construct is the **`{name}`** substitution +point. A slot **name** consists of lowercase ASCII letters, digits, and +underscores, and MUST NOT begin with a digit. At render time a caller supplies +values keyed by name; an occurrence of `{name}` is replaced by the +caller-supplied value **only when all three hold**: + +1. it forms a complete, well-formed `{name}` (a `{` not followed by a valid + name and a closing `}` is literal text — so `{}`, `{ }`, and JSON such as + `{"key": 1}` pass through untouched); +2. the caller supplied a value for that name; +3. it does **not** lie inside a fenced code block — text between a pair of + ```` ``` ```` fences (CommonMark fenced code block) is literal, so a + `{name}` shown as an example inside a code block is never substituted. + Fence detection follows CommonMark: a line whose first non-whitespace + content is three or more backticks opens or closes a fence; an open + fence with no closing fence in the file extends to end-of-file. + Implementations **MAY** use simpler heuristics (counting triple + backticks) so long as the well-formed cases of §4.4 render identically; + pathological inputs (nested fences, indented fences) are + implementation-defined. + +**Slots are optional.** A `{name}` for which the caller supplied no value is +left **as literal text** — an unfilled slot is not an error. This is the +deliberate opposite of `.dialog` (§4.2), where the caller MUST fill every slot +and an unfilled one MUST NOT be rendered. A prompt is free-form text that may +legitimately contain brace characters the author never intended as slots, so +substitution is conservative: it touches only the names the caller explicitly +provides. + +**Loads as.** The single whole-file string, with substitution applied per the +rules above. + +The full content of a file `weather_report.prompt`, rendered with the caller +value `{"query": "weather in Lisbon"}` (a `#` line is ordinary prompt text +here — it is **not** stripped): + +```` +# Weather assistant + +You are a concise weather assistant. Answer the user's question. + +User asked: {query} + +Reply as JSON shaped like {"summary": "...", "temp_c": 0}. The {response} +placeholder shown in the code block below is illustrative only: + +``` +{"summary": "{response}", "temp_c": 18} +``` +```` + +`{query}` is substituted; the `# Weather assistant` heading is kept, the +literal JSON braces are left untouched, and the `{response}` inside the fenced +block is not substituted. A `{tone}` slot the caller passed no value for would +likewise stay literal. + + --- ## 5. Authoring a conformant loader