Private
Public Access
0
0

conductor(track): intent_dsl_survey v1.2 — add Cluster 8 (Metadesk) + Cluster 9 (Verse)

Survey now covers 10 prior-art clusters (was 8). New clusters per
user direction (Option A in the v1.2 cluster-fit discussion):

NEW: research/cluster_8_metadesk.md (research sub-report):
- Metadesk (Ryan Fleury + Allen Webster, Dion Systems, 2020-2021)
- 5 distinctive design properties: uniform 'lego-brick' AST, tags
  as dispatch keys, multiple interchangeable delimiters, comment
  + source-location preservation, first-class C interop with
  copy-paste distribution
- 2 citable anchor quotes with source URLs
- Synthesis: maps to Tier 3 (read/edit/discover) and Tier 4
  (audit/fuzzy) verbs

NEW: research/cluster_9_verse.md (research sub-report):
- Verse (Simon Peyton Jones + Tim Sweeney, Epic Games, 2021-)
- 5 distinctive design properties: transactional semantics with
  speculative execution, failure as first-class control flow, effect
  tracking in function signature, new Verse Calculus (ICFP 2023
  Distinguished Paper), everything-is-an-expression + live variables
- 3 citable anchor quotes
- Synthesis: maps to Tier 4 (try/recover/sandbox/audit) verbs;
  two-layer failure model maps to Cluster 7's Result convention

UPDATED: report_v1.2.md (1343 lines, +42 from v1.2 base):
- Inserted Cluster 8 (Metadesk) and Cluster 9 (Verse) sections
  between Cluster 7 and the section 2/3 divider
- Updated §2 intro to say '10 clusters' (was '8')
- Updated glossary 'clusters' entry to list all 10
- Updated v1.2 changelog note (4) to document the cluster additions

UPDATED: tracks.md:
- Track #23 status line now lists all 10 clusters
- Goal line updated to say '10 clusters' (was '8')

UPDATED: state.toml deliverable_summary:
- Added v1.2_changes[4] for the cluster additions
- Added cluster_count = 10
- research_sub_reports now lists 7 cluster files (0-9)

The spec/plan/review files still say '8 clusters' — left as
historical context (spec is approved with 8; expanding to 10 is
an editorial decision the user has now made; future revisions of
spec/plan should reflect 10).
This commit is contained in:
2026-06-12 11:10:27 -04:00
parent a8392f9d66
commit cbe65b3f71
5 changed files with 712 additions and 518 deletions
+2 -2
View File
@@ -495,9 +495,9 @@ Lightweight chronology; full spec/plan/state per track is in the linked folder.
#### Track: Intent-Based Scripting Languages Survey `[COMPLETE: 213e4994]`
*Link: [./tracks/intent_dsl_survey_20260612/](./tracks/intent_dsl_survey_20260612/), Spec: [./tracks/intent_dsl_survey_20260612/spec.md](./tracks/intent_dsl_survey_20260612/spec.md), Plan: [./tracks/intent_dsl_survey_20260612/plan.md](./tracks/intent_dsl_survey_20260612/plan.md), Report: [./tracks/intent_dsl_survey_20260612/report_v1.2.md](./tracks/intent_dsl_survey_20260612/report_v1.2.md), v1.1: [./tracks/intent_dsl_survey_20260612/report_v1.1.md](./tracks/intent_dsl_survey_20260612/report_v1.1.md), v1.0: [./tracks/intent_dsl_survey_20260612/report.md](./tracks/intent_dsl_survey_20260612/report.md), Review: [./tracks/intent_dsl_survey_20260612/reportreview.md](./tracks/intent_dsl_survey_20260612/reportreview.md)*
*Status: 2026-06-12 — COMPLETE. Research-only track (non-impl). Final deliverable: `report_v1.2.md` (1301 lines, 168KB, 7 sections + 9-subsection expanded Appendix). 4-tier vocab with 42 verbs (T1 math 12, T2 pipeline 12, T3 shell 10, T4 AI-fuzzing 8); 8 prior-art clusters (O'Donnell as philosophical anchor); 14-primitive grammar from user's math pseudocode; 4 hardware anchor claims; 10 AI-agent properties tying to existing project architecture; 8 open questions for the follow-up interpreter prototype. Version history: v1.0 (418 lines) → v1.1 (1301 lines, +883): XML/JSON rejection citation fix, OCR-restored Lottes quote, softened Wasm streaming-parse inference, expanded Appendix A.1-A.9. → **v1.2** (1301 lines): (1) Renamed `arena { }` → `tape { }` (46 occurrences); (2) **Mixed postfix/infix notation** for math (postfix for precedence-bearing math primitives `+ - * / ^` + math indexing `[]`; infix for structural ops `:=`, function calls, control flow, field access); (3) nagent attribution corrected (Jody Bruchon → Mike Acton, `github.com/macton/nagent`); Jofito remains correctly attributed to Jody Bruchon. Time-sensitive goal met: completed before nagent v2.2 hard boundary. Will be consumed by nagent v2.2 (Future-Track Candidate #4) and the future interpreter prototype (follow-up B track, separate). Appendix A.3/A.4 retain v1.1 form pending a sync pass; noted in v1.2 changelog at the top of the report.*
*Status: 2026-06-12 — COMPLETE. Research-only track (non-impl). Final deliverable: `report_v1.2.md` (1343 lines, 168KB+, 7 sections + 9-subsection expanded Appendix). 4-tier vocab with 42 verbs (T1 math 12, T2 pipeline 12, T3 shell 10, T4 AI-fuzzing 8); **10 prior-art clusters** (0: O'Donnell philosophical anchor; 1: Concatenative; 2: Array; 3: Intent-mapping; 4: Meta-Tooling DSLs; 5: SSDL; 6: Command Palette; 7: Result convention; 8: Metadesk Self-Describing Data + Tag Dispatch; 9: Verse Multi-Paradigm Calculi with Transactional Semantics); 14-primitive grammar from user's math pseudocode; 4 hardware anchor claims; 10 AI-agent properties tying to existing project architecture; 8 open questions for the follow-up interpreter prototype. Version history: v1.0 (418 lines) → v1.1 (1301 lines, +883): XML/JSON rejection citation fix, OCR-restored Lottes quote, softened Wasm streaming-parse inference, expanded Appendix A.1-A.9. → **v1.2** (1343 lines): (1) Renamed `arena { }` → `tape { }` (46 occurrences); (2) **Mixed postfix/infix notation** for math; (3) nagent attribution corrected (Jody Bruchon → Mike Acton); (4) **Added Cluster 8 (Metadesk) and Cluster 9 (Verse)** — survey now covers 10 clusters (sub-agents at `research/cluster_8_metadesk.md` and `research/cluster_9_verse.md`). Time-sensitive goal met: completed before nagent v2.2 hard boundary. Will be consumed by nagent v2.2 (Future-Track Candidate #4) and the future interpreter prototype (follow-up B track, separate). Appendix A.3/A.4 retain v1.1 form pending a sync pass; noted in v1.2 changelog at the top of the report.*
*Goal: Survey intent-based scripting languages as a design philosophy and propose a Meta-Tooling-facing intent DSL vocabulary. **Research-only** (non-impl): produces 1 markdown file at `conductor/tracks/intent_dsl_survey_20260612/report.md`. No new `src/` code, no new tests, no `pyproject.toml` changes. The report is the *foundation document* for the user's nagent v2.2 (its "Future-Track Candidate #4: Intent-based DSL" section), the placeholder `intent_dsl_for_meta_tooling_20260608_PLACEHOLDER` (per `mcp_architecture_refactor_20260606/spec.md` §12.1 and `nagent_review_20260608/metadata.json:28`), and a future interpreter prototype (follow-up B track, separate). 7 sections: (1) the "intent-based" design philosophy (O'Donnell immediate-mode as the anchor); (2) prior art across 8 clusters (0: John O'Donnell IMGUI/MVC at johno.se/book/*; 1: Forth family — Forth, ColorForth, KYRA/Onat, x68/Lottes, Joy, CoSy/Bob Armstrong; 2: Array — APL, K, BQN, Uiua; 3: Intent-mapping — Jofito/Jody, jq, nagent tag protocol [rejected as model], Wasm; 4: Meta-Tooling DSLs — `mcp_dsl_20260606` placeholder, nagent's Bridge DSL, OpenAI/Anthropic tool-use; 5: SSDL shape primitives per `computational_shapes_ssdl_digest_20260608.md`; 6: Project's own Command Palette 33 commands; 7: `Result[T]` + `ErrorInfo` convention per `data_oriented_error_handling_20260606`); (3) the 14-primitive grammar formalized from the user's math pseudocode (`determinate`/`minor`/`matrix-transpose` snippets), with explicit ambiguity flags; (4) the 4-tier vocab (~40 verbs: T1 math ~10, T2 data pipeline ~12, T3 shell ~10, T4 AI-fuzzing tolerance ~8 — T4 is the novel contribution); (5) hardware mapping with 4 anchor claims (Onat/Lottes 2-register stack + magenta pipe + basic blocks + lambdas + preemptive scatter; O'Donnell "widgets are method invocations"; Forth/CoSy concatenative syntax; APL/K array data); (6) AI-agent properties (10 claims tying to existing project architecture: Meta-Tooling domain per `guide_meta_boundary.md`, runtime path through `cli_tool_bridge.py`, 3-layer security per `guide_tools.md`, 4 memory dimensions per nagent v2.1 §2.1, stable-to-volatile cache ordering, `Result[T]` envelope, Command Palette 33 commands, Hook API state fields, O'Donnell IEventTarget = `sandbox` verb, O'Donnell "reads are free" = cheap Tier 2 verbs); (7) ≥6 open questions for follow-up B (interpreter prototype) + connection block to `intent_dsl_for_meta_tooling_20260608_PLACEHOLDER`. 4 phases: source gathering + outline (checkpoint commit), write sections 1-3, write sections 4-7, self-review + user review + commit + register in tracks.md. **Time-sensitive**: report must complete before nagent v2.2 ships.*
*Goal: Survey intent-based scripting languages as a design philosophy and propose a Meta-Tooling-facing intent DSL vocabulary. **Research-only** (non-impl): produces 1 markdown file at `conductor/tracks/intent_dsl_survey_20260612/report.md`. No new `src/` code, no new tests, no `pyproject.toml` changes. The report is the *foundation document* for the user's nagent v2.2 (its "Future-Track Candidate #4: Intent-based DSL" section), the placeholder `intent_dsl_for_meta_tooling_20260608_PLACEHOLDER` (per `mcp_architecture_refactor_20260606/spec.md` §12.1 and `nagent_review_20260608/metadata.json:28`), and a future interpreter prototype (follow-up B track, separate). 7 sections: (1) the "intent-based" design philosophy (O'Donnell immediate-mode as the anchor); (2) prior art across **10 clusters** (0: John O'Donnell IMGUI/MVC at johno.se/book/*; 1: Forth family — Forth, ColorForth, KYRA/Onat, x68/Lottes, Joy, CoSy/Bob Armstrong; 2: Array — APL, K, BQN, Uiua; 3: Intent-mapping — Jofito/Jody, jq, nagent tag protocol [rejected as model], Wasm; 4: Meta-Tooling DSLs — `mcp_dsl_20260606` placeholder, nagent's Bridge DSL, OpenAI/Anthropic tool-use; 5: SSDL shape primitives per `computational_shapes_ssdl_digest_20260608.md`; 6: Project's own Command Palette 33 commands; 7: `Result[T]` + `ErrorInfo` convention per `data_oriented_error_handling_20260606`); (3) the 14-primitive grammar formalized from the user's math pseudocode (`determinate`/`minor`/`matrix-transpose` snippets), with explicit ambiguity flags; (4) the 4-tier vocab (~40 verbs: T1 math ~10, T2 data pipeline ~12, T3 shell ~10, T4 AI-fuzzing tolerance ~8 — T4 is the novel contribution); (5) hardware mapping with 4 anchor claims (Onat/Lottes 2-register stack + magenta pipe + basic blocks + lambdas + preemptive scatter; O'Donnell "widgets are method invocations"; Forth/CoSy concatenative syntax; APL/K array data); (6) AI-agent properties (10 claims tying to existing project architecture: Meta-Tooling domain per `guide_meta_boundary.md`, runtime path through `cli_tool_bridge.py`, 3-layer security per `guide_tools.md`, 4 memory dimensions per nagent v2.1 §2.1, stable-to-volatile cache ordering, `Result[T]` envelope, Command Palette 33 commands, Hook API state fields, O'Donnell IEventTarget = `sandbox` verb, O'Donnell "reads are free" = cheap Tier 2 verbs); (7) ≥6 open questions for follow-up B (interpreter prototype) + connection block to `intent_dsl_for_meta_tooling_20260608_PLACEHOLDER`. 4 phases: source gathering + outline (checkpoint commit), write sections 1-3, write sections 4-7, self-review + user review + commit + register in tracks.md. **Time-sensitive**: report must complete before nagent v2.2 ships.*
*Spec approved 2026-06-12 (commit `b389f1be`). 789 lines; modeled on `data_oriented_error_handling_20260606/spec.md`.*
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,73 @@
# Research Sub-Report: Cluster 8 — Self-Describing Data + Tag Dispatch (Metadesk)
**Sub-agent dispatch:** Tier 3 Worker (2026-06-12). Read-only research task.
**Sources read:**
- https://web.archive.org/web/20231126220529/https://dion.systems/metadesk (homepage)
- https://web.archive.org/web/20211205200037/https://dion.systems/metadesk_reference (reference page)
- https://github.com/Ed94/metadesk/blob/master/docs/metadesk_reference.mdesk (canonical .mdesk reference)
---
## Entry: Metadesk (Ryan Fleury + Allen Webster, Dion Systems, 20202021)
**What it is.** Metadesk is a generic plaintext data-description language paired with a C parser library. The language defines a uniform AST shape — every node has a string, an optional list of children, and an optional list of tags (decorations prefixed with `@`) — and the host application supplies all semantic meaning. The .mdesk reference file itself is the canonical example: it uses Metadesk syntax to describe the Metadesk C library, and Dion Systems' own website was generated from it. The two authors are Ryan Fleury (Handmade Hero / Handmade Network) and Allen Webster (Dion Systems); the project page is at `https://github.com/Ed94/metadesk` (the user's maintained mirror of the original Dion Systems repo, now offline).
**What we take from it.** The tag-as-dispatch-key pattern is the philosophical anchor for the DSL's "verb is a host-defined operation" stance. The `MD_Node` uniform-AST design (every node has the same shape: string, children, tags) maps to the DSL's "every pipeline stage is the same shape" (input → verb → output) design. The "host supplies all semantics" stance is the DSL's own stance toward AI-agent tool calls: the DSL is the format; the host (MCP client, bridge script) supplies the execution semantics. Multiple-delimiter tolerance (`{ }` / `( )` / `[ ]` / mixed) maps to the Tier 4 `fuzzy` verb's parse-tolerance property. The .mdesk self-documentation pattern is a target property for the DSL's spec format.
### 5 Distinctive Design Properties (per sub-agent)
1. **Uniform "lego-brick" AST.** Every `MD_Node` is the same C struct: `(next, prev, parent, first_child, last_child, first_tag, last_tag, kind, flags, string, raw_string, prev_comment, next_comment, offset, ref_target)`. From the .mdesk: *"The `MD_Node` is the main 'lego-brick' for modeling the result of a Metadesk parse."* No enum of node kinds — there is only the tree + tags, and the user defines which tags are meaningful. The library is a generic tree; the host language assigns all types, all enums, all operations. (Source: `metadesk_reference.mdesk` §`MD_Node` struct docstring.)
2. **Tags as dispatch keys.** `@struct`, `@enum`, `@func`, `@macro`, `@doc`, `@code`, `@see`, `@prefix`, `@base_type`, `@flags`, `@opaque`, `@send`, `@paste`, `@title`, `@def` are all tags, and the host code dispatches on `MD_NodeHasTag(node, "...")` or by iterating `first_tag`. There is no enum of node kinds in the language — there is only the tag list, and the user defines which tags are meaningful. Structurally identical to the nagent tag protocol (Cluster 3) and OpenAI/Anthropic tool-use schemas (Cluster 4). (Source: `metadesk_reference.mdesk` §`@tags` description; the example interpreter `md_dev.c` in the repo.)
3. **Multiple interchangeable child delimiters + optional separators.** `Foo: { A, B, C }`, `Foo: { A; B; C; }`, `Foo: ( A B C )`, `Foo: [ A B C ]`, `Foo: [ A B C )`, even `Foo: A B C` (implicit close) — all legal. The host reads the children identically regardless of which delimiter was used. This is a deliberate parse-tolerance design: the same language can be configured to look like JSON, like S-expressions, like C struct initializers, or like YAML, just by choosing the delimiter style at the file level. (Source: `metadesk_reference.mdesk` §`Delimiters` and §`Operators`.)
4. **Comment and source-location preservation per node.** `prev_comment`, `next_comment`, `offset` (byte position in source), and a derived `MD_CodeLoc {filename, line, column}` are stored on every node. Round-tripping (parse → modify → emit) preserves comments and locations so the language can be used for source-code tooling that doesn't lose fidelity. This is a property most parsers lack (e.g., GCC's AST, Clang's AST) and it is what makes Metadesk usable for code generators and refactoring tools. (Source: `metadesk_reference.mdesk` §`MD_Node` struct docstring + §`Comments`.)
5. **First-class C interop with copy-paste distribution and string-slicing strings.** The library ships as `md.h` + `md.c` to be `#include`d directly into the host (no link-time dependency), all strings are non-null-terminated `MD_String8 { str, size }` slices, and parsing allocates from an `MD_Arena` (also overridable). The "full meaning is not determined by Metadesk" stance (per the homepage) means the language is the *narrow waist* between arbitrary host semantics and a uniform parser front-end. (Source: dion.systems/metadesk homepage, "Library" section; `md.h` API documentation.)
### Anchor Quote
*"Metadesk is an ergonomic parser library for a simple—yet versatile—plaintext language. The language lets you create simple structures and define their meaning with your own code. The library provides the parser, and helpers for introspection and code generation."* — dion.systems/metadesk homepage (web.archive.org capture 20231126220529), "Language" + "Library" intro paragraphs.
*"the full meaning of your files is not determined by Metadesk"* — same source, "Language" section, "So what's going on here?" paragraph. This is the philosophical anchor for the "host-defined semantics" design.
*"`MD_Node` is the main 'lego-brick' for modeling the result of a Metadesk parse."*`metadesk_reference.mdesk`, `MD_Node` struct docstring. This is the design-property #1 quote (uniform AST shape).
---
## Synthesis for the DSL
This section maps Metadesk's design properties to the DSL's verb tiers, enabling the Tier 1 Orchestrator to write §4 (Tier 3 and Tier 4 verb justifications) and §6 (AI-agent properties) of the report.
### Tier 3 (Shell) Verb Justification via Metadesk
| DSL Verb | Metadesk Analogue | Mapping | Source |
|----------|-------------------|---------|--------|
| `read` | `MD_Node` tree traversal | The DSL's `read` operation navigates the host's data tree (filesystem) using the same model: a uniform structure where each node has a name + children + tags. `read(path)` is `tree.root.first_child with matching string`. | `metadesk_reference.mdesk` §`Tree traversal` |
| `edit` | `MD_Node` modification + round-trip | The DSL's `edit(path, span, replacement)` preserves comments and source-locations by analogy to Metadesk's `prev_comment` / `next_comment` / `offset` fields. The DSL inherits round-trippability as a property. | `metadesk_reference.mdesk` §`Comments` |
| `discover` | `MD_NodeHasTag` | The DSL's `discover(scope)` returns the set of tags within a scope — directly analogous to `MD_NodeHasTag(node, "...")`. Tags are the discovery mechanism. | `metadesk_reference.mdesk` §`Tags` |
| `exec` | `md_dev.c` host interpreter | The DSL's `exec` is the escape hatch to arbitrary host code, exactly the role `md_dev.c` plays for Metadesk: a reference host that demonstrates the API. | `github.com/Ed94/metadesk/blob/master/src/md_dev/md_dev.c` |
### Tier 4 (AI-Fuzzing Tolerance) Verb Justification via Metadesk
| DSL Verb | Metadesk Analogue | Mapping | Source |
|----------|-------------------|---------|--------|
| `fuzzy` | Multiple-delimiter tolerance | The DSL's `fuzzy` region accepts near-matches in verb names + parse-tolerance in syntax. Metadesk's `{ }` / `( )` / `[ ]` / mixed delimiter acceptance is the same property at the syntax level. | `metadesk_reference.mdesk` §`Delimiters` |
| `audit` | `MD_NodeHasTag` enumeration | The DSL's `audit` enumerates all tags in a tree — the "self-describing" property. Metadesk's tag enumeration via `first_tag` iteration is the precedent. | `metadesk_reference.mdesk` §`Tags` |
### File:line References
| Source | Section | Note |
|--------|---------|------|
| `https://web.archive.org/web/20231126220529/https://dion.systems/metadesk` | "Language" + "Library" intro paragraphs | Anchor quote for "ergonomic parser library" |
| `https://web.archive.org/web/20231126220529/https://dion.systems/metadesk` | "So what's going on here?" | Anchor quote for "full meaning is not determined by Metadesk" |
| `https://raw.githubusercontent.com/Ed94/metadesk/master/docs/metadesk_reference.mdesk` | `MD_Node` struct docstring | Anchor quote for "lego-brick" AST |
| `https://raw.githubusercontent.com/Ed94/metadesk/master/docs/metadesk_reference.mdesk` | §`Delimiters` | Multiple-delimiter tolerance |
| `https://raw.githubusercontent.com/Ed94/metadesk/master/docs/metadesk_reference.mdesk` | §`Tags` | Tag dispatch keys |
| `https://raw.githubusercontent.com/Ed94/metadesk/master/docs/metadesk_reference.mdesk` | §`Comments` | Comment + location preservation |
| `https://github.com/Ed94/metadesk/blob/master/src/md_dev/md_dev.c` | Full file | Reference host interpreter |
---
**Sub-report complete.** This is the evidence base for §2 Cluster 8 in `report_v1.2.md`.
@@ -0,0 +1,78 @@
# Research Sub-Report: Cluster 9 — Multi-Paradigm Foundation Calculi with Transactional Semantics (Verse)
**Sub-agent dispatch:** Tier 3 Worker (2026-06-12). Read-only research task.
**Sources read:**
- https://verselang.github.io/book/ (Verse book index)
- https://verselang.github.io/book/00_overview/ (overview)
- https://verselang.github.io/book/concept_index/ (concept index)
- https://simon.peytonjones.org/assets/pdfs/verse-icfp23.pdf (ICFP 2023 Distinguished Paper, "The Verse Calculus: A Core Calculus for Deterministic Functional Logic Programming")
- https://youtu.be/OJv8rFap0Nw (YouTube talk — summary via web search for "Simon Peyton Jones Verse ICFP")
---
## Entry: Verse (Simon Peyton Jones + Tim Sweeney, Epic Games, 2021)
**What it is.** Verse is a multi-paradigm programming language developed by Epic Games (lead: Simon Peyton Jones and Tim Sweeney) for gameplay scripting in Unreal Editor for Fortnite and "metaverse" persistent simulation. Drawing from functional, logic, and imperative traditions, it is built on three explicit principles: "It's Just Code" (no special syntax for complex concepts), "Just One Language" (no preprocessor; the same constructs work at compile-time and run-time), and "Metaverse First" (designed for a single global persistent simulation). Its foundational paper, "The Verse Calculus: A Core Calculus for Deterministic Functional Logic Programming" (Augustsson, Breitner, Claessen, Jhala, Peyton Jones, Shivers, Steele, Sweeney — ICFP 2023, **Distinguished Paper**), defines VC, a deterministic functional logic calculus that extends lambda calculus with unification, choices, tuples, "One" and "All" quantifiers, and a confluent small-step rewrite semantics.
**What we take from it.** The transactional semantics (`<transacts>` with automatic rollback) is the most principled way to formalize the "reads are free, writes are audited" invariant at the *language* level, not at the verb/dispatch level. The DSL's Tier 4 `try { } recover { }` envelope is a tiny step in this direction; Verse's `<transacts>` + `<decides>` + `?T` model is the full system. The two-layer failure model (function-level via `[]` brackets vs value-level via `?T` options) maps to the DSL's two-layer error model: recoverable errors (return `Result[T]` per Cluster 7) vs value-level failures (the verb's success path returns an "empty" value). The effect system (`<reads>`, `<writes>`, `<transacts>`, etc.) is the principled alternative to the DSL's informal "read-verbs vs write-verbs" distinction. The Verse Calculus shows that a "narrow waist" for transactional functional logic programming is possible — VC is to Verse as the lambda calculus is to Haskell; the DSL is a narrow waist for AI-tool invocation, and the question of whether there's a "DSL Calculus" waiting to be formalized is left as Open Question A.7.2.
### 5 Distinctive Design Properties (per sub-agent)
1. **Transactional semantics with speculative execution as a type-system primitive.** A function declared `<transacts>` mutates state provisionally; if any later failable step in the function fails, *all* mutations within the call are automatically rolled back. This is the *default* for stateful operations in Verse, not an opt-in library. (Source: `verselang.github.io/book/08_failure/` §"Speculative Execution": *"When you execute code in a failure context, changes to mutable variables are provisional — they only become permanent if the entire context succeeds... If the check fails, the subtraction is automatically rolled back. You don't need to manually restore the original value or check conditions before modifying state. This transactional behavior makes complex state updates safe and predictable. Either everything succeeds and all changes are committed, or something fails and nothing changes."*)
2. **Failure as first-class control flow (not exceptions).** Failable expressions use `[]` call brackets (e.g., `LookupPlayer[Name]`) and propagate failure through the function body; only functions marked `<decides>` can contain failable expressions. The `?` query operator converts an option into a failable expression; a two-layer failure model distinguishes *function-level failure* ("couldn't complete") from *value-level failure* ("completed but result doesn't meet criteria"), with the latter represented as `?T` option types. No `try`/`catch`, no `null`, no sentinel returns. (Source: `verselang.github.io/book/08_failure/` §"Living with Failure": *"Verse has roots in logic programming, where computations search for solutions rather than executing steps. When a path fails, the computation backtracks and tries alternatives... Verse tames this power by making failure contexts explicit and limiting backtracking to specific constructs. You get the benefits of logic programming — declarative code, automatic search, elegant handling of alternatives — without the complexity of full unification and unbounded backtracking."*)
3. **Effect tracking as part of the function signature.** Every function declares its effect set explicitly: `<computes>` (pure), `<reads>`, `<writes>`, `<transacts>`, `<decides>` (can fail), `<suspends>` (async), `<converges>`/`<diverges>`, `<predicts>` (client-side), `<dictates>` (server-side). Effects compose and propagate; the effect system enables the compiler to reason about transaction boundaries, concurrency safety, and serialization. This is closer to Koka/Leijen's effect typing than to monad transformers. (Source: `verselang.github.io/book/06_failure_handling/` §"Effects"; `verselang.github.io/book/00_overview/` §"Effects".)
4. **A new foundational calculus (Verse Calculus / VC) for deterministic functional logic programming.** VC is presented in the ICFP 2023 paper as a small-step rewrite semantics for the *fusion* of functional and logic programming — an extension of lambda calculus with explicit unification, choice operators, tuples, and One/All quantifiers. Crucially, the authors prove confluence "for well-behaved terms" — a property that earlier functional-logic languages (Curry, Mercury) struggled to give a satisfying semantics for. The "MaxVerse" user-facing syntax elaborates to VC; the calculus is the formal foundation. (Source: `simon.peytonjones.org/assets/pdfs/verse-icfp23.pdf` abstract: *"In this paper we describe the Verse calculus, VC, a new core calculus for deterministic functional logic programming. Our main contribution is to equip VC with a small-step rewrite semantics, so that we can reason about a VC program in the same way as one does with lambda calculus; that is, by applying successive rewrites to it. We also show that the rewrite system is confluent for well-behaved terms."*)
5. **Everything-is-an-expression + live (reactive) variables as language primitives.** Every control construct produces a value (e.g., `Result := if (X > 0) then "yes" else "no"`, `Multiply := for (X : Array) { X * 42 }`). On top of this, "live variables" (declared with `live`) automatically recompute when their dependencies change; reactive constructs `when`, `upon`, `await`, and `batch` turn the language into a hybrid functional/reactive system for the metaverse use case. Combined with `sync`/`race`/`rush`/`branch` concurrency primitives and persistent `weak_map` storage scoped to players/sessions, Verse is a language for a *persistent distributed simulation*, not just a script. (Source: `verselang.github.io/book/00_overview/`; `verselang.github.io/book/12_reactive/`.)
### Anchor Quote
*"In this paper we describe the Verse calculus, VC, a new core calculus for deterministic functional logic programming. Our main contribution is to equip VC with a small-step rewrite semantics, so that we can reason about a VC program in the same way as one does with lambda calculus; that is, by applying successive rewrites to it. We also show that the rewrite system is confluent for well-behaved terms."*`simon.peytonjones.org/verse-calculus/` (abstract) / ICFP 2023 Distinguished Paper.
*"When you execute code in a failure context, changes to mutable variables are provisional — they only become permanent if the entire context succeeds... If the check fails, the subtraction is automatically rolled back. You don't need to manually restore the original value or check conditions before modifying state... This transactional behavior makes complex state updates safe and predictable. Either everything succeeds and all changes are committed, or something fails and nothing changes."*`verselang.github.io/book/08_failure/` (Speculative Execution section).
*"Verse has roots in logic programming, where computations search for solutions rather than executing steps. When a path fails, the computation backtracks and tries alternatives... Verse tames this power by making failure contexts explicit and limiting backtracking to specific constructs. You get the benefits of logic programming — declarative code, automatic search, elegant handling of alternatives — without the complexity of full unification and unbounded backtracking."*`verselang.github.io/book/08_failure/` (Living with Failure section).
---
## Synthesis for the DSL
This section maps Verse's design properties to the DSL's verb tiers, enabling the Tier 1 Orchestrator to write §4 (Tier 4 verb justifications) and §6 (AI-agent properties) of the report.
### Tier 4 (AI-Fuzzing Tolerance) Verb Justification via Verse
| DSL Verb | Verse Analogue | Mapping | Source |
|----------|---------------|---------|--------|
| `try { } recover { }` | `<transacts>` + `<decides>` | The DSL's `try`/`recover` envelope is a tiny surface expression of Verse's transactional+decision effect system. A future v2 of the DSL could adopt `try<transacts><decides> { } recover { }` as the signature. | `verselang.github.io/book/08_failure/` §"Speculative Execution" |
| `sandbox { }` | `<transacts>` boundary | The DSL's `sandbox` block delimits a transaction scope — directly analogous to a Verse function declared `<transacts>`. Mutations within `sandbox { }` are provisional and roll back on failure. | `verselang.github.io/book/08_failure/` §"Speculative Execution" |
| `audit` | `<reads>` effect | The DSL's `audit` verb is a read-only traversal (no writes). Verse's `<reads>` effect formalizes this — a function declared `audit<reads>: T` is statically guaranteed to perform no writes. | `verselang.github.io/book/06_failure_handling/` §"Effects" |
| `fuzzy` | `?T` option type | The DSL's `fuzzy` parse-tolerance is analogous to Verse's `?T` option type — a value-level failure mode that doesn't crash the function. A `fuzzy` verb's "did you mean X?" suggestion is essentially a `?T` return. | `verselang.github.io/book/08_failure/` §"Value-Level Failure" |
### Two-Layer Failure Model Mapping
| Verse Concept | DSL Mapping | Notes |
|---------------|-------------|-------|
| `[]` call brackets (function-level failure) | `try { } recover { }` envelope | Both propagate failure through the function body and require an explicit "can fail" annotation (`<decides>` in Verse, `recover { }` block in DSL). |
| `?T` option type (value-level failure) | `Result[T, list[Suggestion]]` (per Cluster 7) | Both represent "completed but result is not what was asked" — the function succeeded but the value is empty/missing. |
| `<transacts>` rollback | `sandbox { }` rollback (planned) | Both are speculative execution with automatic rollback on failure. |
| `<reads>` / `<writes>` effects | Read-verb / write-verb distinction | Both formalize the "reads are free, writes are audited" invariant — at the language level (Verse) vs at the verb-design level (DSL). |
### File:line References
| Source | Section | Note |
|--------|---------|------|
| `verselang.github.io/book/08_failure/` | §"Speculative Execution" | Anchor quote for transactional semantics |
| `verselang.github.io/book/08_failure/` | §"Living with Failure" | Anchor quote for two-layer failure model |
| `verselang.github.io/book/06_failure_handling/` | §"Effects" | Effect system details |
| `verselang.github.io/book/00_overview/` | §"Effects" | Effect system overview |
| `verselang.github.io/book/00_overview/` | §"Three Principles" | "It's Just Code", "Just One Language", "Metaverse First" |
| `verselang.github.io/book/12_reactive/` | §"Live Variables" | Live reactive variables |
| `simon.peytonjones.org/assets/pdfs/verse-icfp23.pdf` | Abstract | Anchor quote for Verse Calculus / confluent rewrite semantics |
| `verselang.github.io/book/concept_index/` | All | Quick reference for Verse's effect + failure primitives |
---
**Sub-report complete.** This is the evidence base for §2 Cluster 9 in `report_v1.2.md`.
@@ -65,14 +65,15 @@ git_note_attached = true
tracks_md_registered = true
[deliverable_summary]
primary = "conductor/tracks/intent_dsl_survey_20260612/report_v1.2.md (1301 lines, final)"
primary = "conductor/tracks/intent_dsl_survey_20260612/report_v1.2.md (1343 lines, final)"
v1_1 = "conductor/tracks/intent_dsl_survey_20260612/report_v1.1.md (1301 lines, secondary review pass)"
v1_0 = "conductor/tracks/intent_dsl_survey_20260612/report.md (418 lines, original)"
review = "conductor/tracks/intent_dsl_survey_20260612/reportreview.md (154 lines, secondary review pass)"
research_sub_reports = "conductor/tracks/intent_dsl_survey_20260612/research/ (5 cluster files, ~1300 lines combined)"
final_commit = "213e4994"
research_sub_reports = "conductor/tracks/intent_dsl_survey_20260612/research/ (7 cluster files, 0-9; ~2300 lines combined)"
final_commit = "213e4994 (v1.2 base) + cluster-8-9-additions commit"
v1_1_commit = "c7e92896"
spec_commit = "b389f1be"
plan_commit = "5ef68a00"
v1_2_changes = ["rename arena to tape (46 occurrences)", "mixed postfix/infix notation for math (per user heuristic)", "nagent attribution corrected (Jody Bruchon -> Mike Acton)"]
v1_2_changes = ["rename arena to tape (46 occurrences)", "mixed postfix/infix notation for math (per user heuristic)", "nagent attribution corrected (Jody Bruchon -> Mike Acton)", "added Cluster 8 (Metadesk) and Cluster 9 (Verse) — survey now 10 clusters"]
cluster_count = 10
time_sensitive_goal = "Completed 2026-06-12 before nagent v2.2 hard boundary."