summaryrefslogtreecommitdiff
path: root/plugins/code-modernization/commands/modernize-transform.md
diff options
context:
space:
mode:
authorMorgan Lunt <morganl@anthropic.com>2026-06-08 14:54:22 -0700
committerMorgan Lunt <morganl@anthropic.com>2026-06-09 08:48:04 -0700
commit1c4a5cfded2cb2e4c8c5420ebd2f3974eb3fdd51 (patch)
tree727541dbe00664c713fc459dfa10c4ae2aafd440 /plugins/code-modernization/commands/modernize-transform.md
parentbbbff6ab54f0d4b62dad2df25536ed05a418b3ff (diff)
code-modernization: interactive topology map, preflight command, persona flows
modernize-map previously rendered the call graph and data lineage as static Mermaid diagrams, which become unreadable once a node has ~10+ edges — exactly the shape of real legacy systems. It now builds an interactive viewer from a shipped template (assets/topology-viewer.html): a zoomable circle-pack of domains/modules sized by LOC, rendered to canvas with level-of-detail reveal, dependency edges with per-kind toggles, search with fly-to, a per-node detail sidebar, and a flow walkthrough mode. Small domain-level .mmd exports remain for docs. - topology.json now has a documented schema (hierarchy + edges + entry points + observations + flows) consumed by the viewer - map traces 2-4 business flows anchored to personas (claimant, operator, auditor), each step in plain business language mapped to the modules that implement it; the viewer plays them as numbered paths - brief gains a Business Walkthroughs section connecting each persona flow to the phase that replaces it - new modernize-preflight command: detects the stack, checks analysis tooling, smoke-compiles a real source file with the legacy toolchain, inventories missing copybooks/descriptors/binary-only artifacts, and writes a per-command readiness verdict - transform now verifies legacy + target toolchains before its plan gate instead of failing at test time - README: commands updated, optional-tooling section reframed as 'what to give Claude'
Diffstat (limited to 'plugins/code-modernization/commands/modernize-transform.md')
-rw-r--r--plugins/code-modernization/commands/modernize-transform.md19
1 files changed, 18 insertions, 1 deletions
diff --git a/plugins/code-modernization/commands/modernize-transform.md b/plugins/code-modernization/commands/modernize-transform.md
index 86ba4ef1..99961249 100644
--- a/plugins/code-modernization/commands/modernize-transform.md
+++ b/plugins/code-modernization/commands/modernize-transform.md
@@ -9,7 +9,24 @@ equivalence.
This is a surgical, single-module transformation — one vertical slice of the
strangler fig. Output goes to `modernized/$1/$2/`.
-## Step 0 — Plan (HITL gate)
+## Step 0a — Toolchain check (fail fast)
+
+Verify the build environment **before** planning, not when the tests
+first run:
+
+- **Target stack ($3):** runtime, package manager, and test framework all
+ respond (`java -version` + `mvn -v`, `node -v` + `npm -v`,
+ `python3 -V` + `pytest --version`, …).
+- **Legacy stack (if equivalence tests will execute legacy code):** the
+ compiler/interpreter works on this codebase — run a syntax-only compile
+ of the module being transformed (e.g. `cobc -fsyntax-only`).
+
+If anything is missing or the smoke compile fails, stop and report what
+to install or fix — suggest `/modernize-preflight $1 $3` for the full
+readiness report. Don't enter plan mode on a machine that can't run the
+proof.
+
+## Step 0b — Plan (HITL gate)
Read the source module and any business rules in `analysis/$1/BUSINESS_RULES.md`
that reference it. Then **enter plan mode** and present: