mirror of
https://github.com/anthropics/claude-plugins-official.git
synced 2026-06-13 22:26:03 -03:00
code-modernization: legacy toolchain is advisory, not a transform blocker
Legacy code often cannot build locally by nature — CICS/IMS programs have no local translator and the real runtime may be a mainframe the user doesn't have. Stopping transform on a failed legacy smoke compile would block exactly those systems. - transform Step 0a: the target toolchain remains required (its tests cannot run without it); a failed or impossible legacy compile no longer stops the run — the equivalence strategy switches to recorded traces / golden-master fixtures, and that downgrade is stated in the plan and in TRANSFORMATION_NOTES.md so reviewers know the strength of the proof - preflight: a red legacy toolchain now yields Ready-with-gaps for transform/reimagine instead of Not-ready
This commit is contained in:
parent
a7e1f99070
commit
ecc5139c30
@ -87,8 +87,11 @@ followed by a **Ready / Ready-with-gaps / Not ready** verdict per command:
|
||||
- `assess` + `map` + `extract-rules` — need Checks 1–2 green-ish and
|
||||
Check 4's missing-include count low
|
||||
- `brief` — needs only the three discovery artifacts; no tooling
|
||||
- `transform` + `reimagine` — additionally need Check 3 green for both
|
||||
legacy and target stacks
|
||||
- `transform` + `reimagine` — additionally need Check 3 green for the
|
||||
**target** stack. A red legacy toolchain downgrades these to
|
||||
Ready-with-gaps, not Not-ready: equivalence testing falls back to
|
||||
recorded traces / golden-master fixtures instead of dual execution
|
||||
(common and expected for CICS/IMS code that has no local runtime)
|
||||
- `harden` — needs Check 2 plus any stack-specific SAST tooling found
|
||||
|
||||
Print the table in the session too, and end with the single most
|
||||
|
||||
@ -9,22 +9,31 @@ equivalence.
|
||||
This is a surgical, single-module transformation — one vertical slice of the
|
||||
strangler fig. Output goes to `modernized/$1/$2/`.
|
||||
|
||||
## Step 0a — Toolchain check (fail fast)
|
||||
## Step 0a — Toolchain check (fail fast on target, adapt on legacy)
|
||||
|
||||
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.
|
||||
- **Target stack ($3) — required.** Runtime, package manager, and test
|
||||
framework all respond (`java -version` + `mvn -v`, `node -v` + `npm -v`,
|
||||
`python3 -V` + `pytest --version`, …). If any are missing, stop and
|
||||
report what to install — the new code and its tests cannot run without
|
||||
them, so a plan gate now would just defer the failure an hour. Suggest
|
||||
`/modernize-preflight $1 $3` for the full readiness report.
|
||||
- **Legacy stack — advisory, never a blocker.** Try a syntax-only compile
|
||||
of the module being transformed (e.g. `cobc -fsyntax-only`). Legacy
|
||||
code often *cannot* build locally by nature, not by misconfiguration —
|
||||
CICS/IMS programs have no local translator, and the real runtime may be
|
||||
a mainframe you don't have. A failed or impossible legacy compile does
|
||||
**not** stop the transform; it changes the equivalence strategy:
|
||||
- dual-execution proof is off the table — characterization tests
|
||||
assert against **recorded traces / golden-master fixtures** (real
|
||||
production outputs, captured reports/screens, SME-confirmed
|
||||
examples) instead of live legacy runs
|
||||
- say so explicitly in the Step 0b plan and later in
|
||||
TRANSFORMATION_NOTES.md ("equivalence is trace-based; legacy was not
|
||||
executable in this environment"), so reviewers know the strength of
|
||||
the proof they're approving
|
||||
|
||||
## Step 0b — Plan (HITL gate)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user