From 9b4ca763bfde0e5c7ea4ae0dd38034bede66a34b Mon Sep 17 00:00:00 2001 From: JarbasAi Date: Fri, 26 Jun 2026 18:38:21 +0100 Subject: [PATCH 1/2] =?UTF-8?q?INTENT-1=20=C2=A73.4:=20a=20named=20slot=20?= =?UTF-8?q?may=20be=20written=20{name}=20or=20{{name}}?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The two forms are exactly equivalent; a conformant tool folds {{name}} to {name}. The slot-name charset and no-whitespace rules apply to both. The double-brace spelling is a slot, not a brace-escaping form — the grammar still provides no way to write a literal brace, and none is needed (§2). Co-Authored-By: Claude Opus 4.8 --- CHANGELOG.md | 5 +++++ intent-1.md | 32 ++++++++++++++++++++++++-------- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8585e84..5b2d621 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,11 @@ tool does not recognize the token and cannot expand the template. - §3.6 — new malformed forms: a reference to an undefined vocabulary, and a cyclic reference chain; `<` and `>` join the unbalanced-metacharacter rule. - §7 — the Expander conformance role MUST resolve inline vocabulary references. +- §3.4, §3 — a named slot MAY be written either `{name}` or `{{name}}`; the two + forms are exactly equivalent, with a conformant tool folding `{{name}}` to + `{name}`. The slot-name charset and whitespace rules apply to both. The + double-brace spelling is a slot, not a brace-escaping form; the grammar still + provides no escape. ### 1 diff --git a/intent-1.md b/intent-1.md index af38b52..70440c4 100644 --- a/intent-1.md +++ b/intent-1.md @@ -107,11 +107,13 @@ A template is literal text interspersed with the tokens below. | Literal word | `word` | — | Matched or spoken verbatim. | | Alternatives | `(a\|b\|c)` | expansion | A choice of branches (§3.2). | | Optional | `[x]` | expansion | An optional segment; equivalent to `(x\|)`. | -| Named slot | `{name}` | slot | A placeholder filled with a value (§5). | +| Named slot | `{name}` or `{{name}}` | slot | A placeholder filled with a value; the two forms are equivalent (§3.4, §5). | | Vocabulary reference | `` | expansion | Expands to a named vocabulary (§3.7). | -There is no slot-typing syntax, no digit token, no legacy wildcard, and no -brace-escaping form. +There is no slot-typing syntax, no digit token, and no legacy wildcard. A +named slot has two equivalent spellings, `{name}` and `{{name}}` (§3.4); the +double-brace spelling is a slot, not a brace-escaping form — the grammar +provides no way to write a literal brace, and none is needed (§2). ### 3.1 Literal words @@ -150,17 +152,31 @@ turn on [the] lights ### 3.4 Named slots `{ }` A curly-brace token is a **named slot** — a placeholder that is not written out -but *filled* with a value. The same `{name}` syntax is used everywhere a slot +but *filled* with a value. The same slot syntax is used everywhere a slot appears; only *who fills it and when* differs by file type (§5.1). -A slot **name** MUST consist only of lowercase ASCII letters, digits, and -underscores (`a`–`z`, `0`–`9`, `_`), MUST NOT begin with a digit, and MUST NOT -contain whitespace inside the braces. A slot MAY appear anywhere -a literal word may, including inside an alternative or optional group: +A named slot MAY be written in **either** of two equivalent forms: + +- single-brace — `{name}`; +- double-brace — `{{name}}`. + +The two forms are **exactly equivalent**: a conformant tool folds `{{name}}` +to `{name}` and treats them identically thereafter. They denote the same slot, +fill the same way, and obey the same rules; there is no behavioural difference +between them. The double-brace form is a slot, **not** an escape: `{{` … `}}` +never produces a literal brace, and the grammar provides no brace-escaping form +(§2 makes brace characters impossible as literal input, so none is needed). + +A slot **name** — the text inside the braces in either form — MUST consist only +of lowercase ASCII letters, digits, and underscores (`a`–`z`, `0`–`9`, `_`), +MUST NOT begin with a digit, and MUST NOT contain whitespace inside the braces. +These rules apply identically to `{name}` and `{{name}}`. A slot MAY appear +anywhere a literal word may, including inside an alternative or optional group: ``` (buy|sell) {item} it is currently {temperature} degrees +(buy|sell) {{item}} ``` Slots are used only by `.intent` and `.dialog` files (§1.1). From 2818aba8bcefbfead3ba7a7092529ad50d5a8919 Mon Sep 17 00:00:00 2001 From: JarbasAi Date: Fri, 26 Jun 2026 18:51:22 +0100 Subject: [PATCH 2/2] docs: correct INTENT-1 README class to 2 (matches header + CHANGELOG) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 24c655e..e010d99 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ pre-spec status quo, `2` for one that is not backwards compatible. | ID | Document | Version | Status | |----|----------|---------|--------| -| OVOS-INTENT-1 | [Sentence Template Grammar](intent-1.md) | 1 | Draft | +| OVOS-INTENT-1 | [Sentence Template Grammar](intent-1.md) | 2 | Draft | | OVOS-INTENT-2 | [Locale Resource Formats](intent-2.md) | 1 | Draft | | OVOS-INTENT-3 | [Intent Definition](intent-3.md) | 1 | Draft | | OVOS-INTENT-4 | [Intent and Entity Registration](intent-4.md) | 2 | Draft |