Skip to content

docs: specify the gate statement in the ProseScript grammar - #155

Open
devanonyme42 wants to merge 1 commit into
openprose:mainfrom
devanonyme42:docs/gate-grammar
Open

docs: specify the gate statement in the ProseScript grammar#155
devanonyme42 wants to merge 1 commit into
openprose:mainfrom
devanonyme42:docs/gate-grammar

Conversation

@devanonyme42

Copy link
Copy Markdown
Contributor

Resolves #147

Problem

prose.md documents gate() as a first class VM primitive and the bundled session-to-prose extractor mandates emitting gate points, but the ProseScript grammar has no production for it. The only specification anywhere is the comparison table in the runtime delegation section, which describes the VM protocol as await gate(payload). As #147 reports, a generator and an independent reviewer produced three different surface forms in a single run because there was nothing to lint against.

Change

prosescript.md gains gate_stmt ::= ["let" target "="] gate_expr NEWLINE? with gate_expr ::= "gate" expression, the statement alternation entry, a Gates section in the style of the surrounding sections (intro, example, forms table, validation table), and a mention of gates in the execution model's phase 3 list. prose.md gains one line after the gate vs runtime delegation table pointing to the new grammar section.

Why the statement form and not await gate(...)

ProseScript has no await keyword anywhere in the grammar. The three existing primitives that yield to an external actor (call, session, resume) are all statement forms with an optional let binding, and the VM awaits implicitly. A gate is the same class of primitive, so the grammar follows that precedent. The new section states explicitly that await gate(payload) in the comparison table is the VM protocol description of the same interaction, so the two documents no longer read as conflicting. If a different surface form is intended, happy to adjust.

Checks

pnpm test:skill (411 passed, includes the skill meta conformance suite that asserts on the grammar productions), pnpm test:examples (10 passed) and pnpm --filter @openprose/reactor-cli test:offline (210 passed, 1 skipped) are green after the change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs gap: gate() is a load-bearing VM primitive but is absent from the ProseScript grammar (only spec is a comparison table in prose.md)

1 participant