Skip to content

Adopt engine v7: paren-based wrapped-state naming in Path format + docs #83

@mellonis

Description

@mellonis

Tracking the consumer-side adoption of engine v7's paren-based wrapped-state naming in @post-machine-js/machine. Gated on turing-machine-js#168 merging and shipping in engine v7.

Why

PostMachine's Path format embeds > as the engine's wrapper separator — see paths like 'foo>10~30' in the README's naming-convention section. Engine v7 changes the wrapper format from flat bare>override to nested bare(override). Once engine v7 publishes, PostMachine paths need to adopt the new format to stay consistent with what state.name / MachineState.arrivalPath carry.

Scope

Code (parser + formatter):

  • Path parser/formatter — whichever module owns parsePath(s) / formatPath(p). Adopt (...) for wrapper composition. The ~ continuation separator and :: subroutine scope separator are unaffected.
  • Anywhere PostMachine builds paths internally using the wrapper convention — audit MachineState extension code.

Docs:

  • packages/machine/README.md — naming-convention section's > separator description, all example paths.
  • CLAUDE.md — engine-naming-convention references.

Tests:

  • Any path-format assertion using > for wrappers (e.g., 'rightToBlank>1~2' shape) — flip to 'rightToBlank(1~2)'.
  • states.md / Mermaid samples in test fixtures.

Out of scope (frozen historical record)

  • packages/machine/CHANGELOG.md — v6.x entries documented the old format; leave as-is.
  • docs/superpowers/specs/, docs/superpowers/plans/ — frozen planning artifacts; existing notes about wrapper naming stay correct in their historical context.

Coordination

Migration for consumers (when v7 ships)

Any code that pattern-matches state.name or MachineState.arrivalPath for wrapper composites needs to switch from >-split to paren-aware parsing. Most users don't introspect paths beyond top-level scope/index — impact is concentrated in tooling and tests, not application code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    v7Targets v7 release (composition-representation overhaul)

    Projects

    Status
    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions