modernize-transform
Transform module $module of $system into $target_stack, with proof of behavioral
equivalence. This is one vertical slice of the strangler fig; output goes to
modernized/$system/$module/.
The code is legacy/$system, often a symlink to where it really lives: say where it points (readlink legacy/$system) in one line before you start. If legacy/$system does not exist, stop and say so: nothing can run without the code, so the fix is /code-modernization:modernize $system --source <path to the code>. Run every subagent in the foreground and wait for its result: never end your turn while one is still running. Stop any server or other process you started (a legacy app on a local port, a watcher) before you finish, and say you did. If $module or $target_stack is empty, read
analysis/$system/MODERNIZATION_BRIEF.md: take the target stack it names, and the first module of
the earliest phase whose Command: is transform that has no
modernized/$system/<module>/TRANSFORMATION_NOTES.md yet (with no brief, the target in INTENT.md). Say which you picked.
Step 0 — Toolchain, then the plan (human gate)
Target stack (required). The runtime, package manager and test framework must respond
(java -version and mvn -v, node -v and npm -v, python3 -V and pytest --version). If not,
stop and say what to install: a plan gate now would only defer the failure an hour. Point to
/code-modernization:modernize-preflight $system $target_stack.