100%

spec-sync

Goal

Spec + grammar reflect while…do under the approved-proposal gate.

Implementation Sketch

grammar.ebnf already carries while_expr; sync the 16-control-flow.md clause + ori-syntax.md row; run /sync-spec + /sync-grammar.

Delivered State Note — verify-first reconciliation

Plan-wide deliverables substantially landed at HEAD (compiler_repo commit b9939de7d): E0860/E0861 diagnostics + error docs (ori_diagnostic/src/errors/E0860.md, E0861.md); negative #compile_fail pins (tests/spec/expressions/while.ori:135,141,213); spec clause 16-control-flow.md:137 §16.2.4 While loop + 14-expressions.md:896 §14.12 While Expression; fmt golden fixture tests/fmt/patterns/while/basic.ori. Execute the work items below as verify-against-HEAD checks (confirm the artifacts exist and are in sync) — the whole plan takes a verify-first reconciliation walk, not fresh execution.

Verification surface — asserted-landed artifacts confirmed in-sync

The spec-sync verification ALSO confirms the remaining artifacts the Delivered State Note names are present + synced at HEAD, not left as bare claims: spec clauses 16-control-flow.md §16.2.4 + 14-expressions.md §14.12 (verified by w-af6552c6); reader-facing error docs ori_diagnostic/src/errors/E0860.md + E0861.md; the fmt golden fixture tests/fmt/patterns/while/basic.ori. Each is verified-against-HEAD by read-and-compare (confirm present + in sync), consistent with the verify-first reconciliation walk — /sync-spec / /sync-grammar are mutating commands (no --check mode), invoked only if the compare surfaces error-doc / spec drift; any corrective edit is authorized by the approved while-loop-proposal.md (spec proposal-gate satisfied per .claude/rules/spec.md).

Spec References

while-loop-proposal.md Grammar Changes; spec/16-control-flow.md; spec.md proposal gate.

Work Items

  • Verify grammar.ebnf:541 carries while_expr (present) and that expression includes it (line 370, present). Confirm while is in the reserved-keyword clause (7.3.1). Cross-reference (verify-surface, not a cure here): grammar.ebnf:400 block_ending_expression = for_do_expr | while_do_expr | loop_expr | if_expr references the while_do_expr / for_do_expr nonterminals, dangling/undefined at HEAD — that defect is open finding HYG-01-005, owned by walking-skeleton (s-114d5c42). This section does NOT fix :400 (HYG-01-005 owns it); it acknowledges the adjacent known defect so the grammar-verification surface is not read as asserting whole-grammar self-consistency for every while-touching rule.
  • Verify spec clauses 16-control-flow.md §16.2.4 + 14-expressions.md §14.12 document while...do (sugar over loop, void type, E0860/E0861, no yield, labels) at HEAD under the approved-proposal gate (mission_ref proposal authorizes any corrective spec edit). Verification is read-and-compare against HEAD (the clauses are already in sync per audit GROUNDEDNESS) — /sync-spec and /sync-grammar are mutating role: tool commands (allowed-tools: Read, Grep, Glob, Edit, Write; no dry-run / --check mode), so invoke them ONLY if the read-and-compare surfaces drift, and likewise edit .claude/rules/ori-syntax.md while-row ONLY on confirmed drift. Any such corrective spec/grammar edit is authorized by the approved while-loop-proposal.md (spec proposal-gate satisfied per .claude/rules/spec.md).