Documentation
¶
Overview ¶
Command construct_invocation migrates the authored .memql tree from the legacy call forms to the kind-prefixed construct-invocation forms introduced in Story 2 (#2324) of epic #2322. It is the executable backend for Story 3 (#2326): the tree-wide invocation migration.
It is deterministic, idempotent and re-runnable. Running it a second time against an already-migrated tree produces ZERO further edits.
Forms migrated (see docs / the Story 3 brief for the full contract):
FORM A (expression position) name({ k: v }) -> kind name(k: v)
name({}) -> kind name()
name() -> kind name() (registry calls get a kind prefix even without an object wrapper)
FORM B (automation step, already kind-prefixed, block args)
logic foo { k: v } -> logic foo(k: v)
FORM C (automation step, bare construct name, block args)
createDatabase { k: v } -> mutation createDatabase(k: v)
spec/trait stringly call spec("name") -> spec name
embedded @handler query="..." string content is migrated through the same FORM A rules
NOT migrated (out of scope, owned by Story 4): the versioned action step form action("id@ver") { args { ... } } is left untouched.
Names that are language primitives (the parser's CallableBuiltins / Accessors / KeywordFuncs / Directives / RelationshipWrappers / Retired sets, plus engine helpers and control flow) and any call preceded by `.` (a collection/lambda method) are never prefixed. A called name that is neither in the construct registry nor a known primitive is left bare and LOGGED as a warning for review.