feat(syntax)!: action-model syntax — map … onto … verb + @ fold modifier #7

Merged
toph merged 5 commits from v0.6-action-syntax into main 2026-06-29 15:25:54 +00:00
Owner

Plan A of the action-model pivot (Slice 1). Beloch shifts from a crease-pattern construction language to an action model: a program is an imperative sequence of folding actions on a stateful sheet, with the flat crease pattern and mountain/valley becoming derived outputs. See ADR decisions/0011-action-model.md and the full design in docs/superpowers/specs/2026-06-29-action-model-folding-design.md.

This PR is the syntax layer only — no fold execution yet:

  • Unifies the superposition axioms under map … onto …, type-dispatched on the operands: map .a onto .b (axiom 2, was fold .a to .b) and map --l1 onto --l2 toward .p (axiom 5, was bisect …). through and perp keep their own verbs.
  • Parses the @ fold modifier — @axiom [moving .p] [mountain] — into an AST fold_spec (default direction valley). A bare axiom stays a precrease (flat line, identical behaviour to today).
  • Evaluation rejects any @ statement with folding (@) is not yet implemented. The folded-state runtime (foldedForm output, derived mountain/valley, layer model) lands in a separate later plan (Plan B), which needs its own algorithm-design pass.

Breaking: fold/bisect/to are gone from the surface. All examples and the spec are migrated; ADR 0011 added. 56/56 tests green.

Plan A of the action-model pivot (Slice 1). Beloch shifts from a crease-pattern *construction* language to an **action model**: a program is an imperative sequence of folding actions on a stateful sheet, with the flat crease pattern and mountain/valley becoming *derived* outputs. See ADR `decisions/0011-action-model.md` and the full design in `docs/superpowers/specs/2026-06-29-action-model-folding-design.md`. This PR is the **syntax layer only** — no fold execution yet: - Unifies the superposition axioms under `map … onto …`, type-dispatched on the operands: `map .a onto .b` (axiom 2, was `fold .a to .b`) and `map --l1 onto --l2 toward .p` (axiom 5, was `bisect …`). `through` and `perp` keep their own verbs. - Parses the `@` fold modifier — `@axiom [moving .p] [mountain]` — into an AST `fold_spec` (default direction valley). A bare axiom stays a *precrease* (flat line, identical behaviour to today). - Evaluation rejects any `@` statement with `folding (@) is not yet implemented`. The folded-state runtime (`foldedForm` output, derived mountain/valley, layer model) lands in a separate later plan (Plan B), which needs its own algorithm-design pass. Breaking: `fold`/`bisect`/`to` are gone from the surface. All examples and the spec are migrated; ADR 0011 added. 56/56 tests green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
toph merged commit b3fa4b9bf9 into main 2026-06-29 15:25:54 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
toph/beloch!7
No description provided.