From ff5feaeb7f113d22ef58e91beae96a7813d23862 Mon Sep 17 00:00:00 2001 From: Morgan Lunt Date: Mon, 8 Jun 2026 14:43:53 -0700 Subject: code-modernization: never write discovered credential values into findings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Legacy systems often contain live credentials, and assessment/findings files get committed and shared. Previously the security-auditor agent reported hardcoded secrets verbatim into ASSESSMENT.md and SECURITY_FINDINGS.md. - security-auditor: mandatory secret-handling rules — mask all credential values (file:line + 2-4 char preview), redact secrets from echoed tool output, recommend rotation for anything that looks live - assess/harden: gitignore-verified SECRETS.local.md quarantine file for the per-credential inventory; findings files get masked entries and a pointer only - new --show-secrets flag opts into raw values in the quarantine file (and only there) - README: document the behavior and advise users of earlier versions to check for already-committed findings and rotate --- plugins/code-modernization/README.md | 4 +++ .../code-modernization/agents/security-auditor.md | 25 +++++++++++++++- .../commands/modernize-assess.md | 23 +++++++++++++-- .../commands/modernize-harden.md | 34 ++++++++++++++++++++-- 4 files changed, 81 insertions(+), 5 deletions(-) (limited to 'plugins/code-modernization') diff --git a/plugins/code-modernization/README.md b/plugins/code-modernization/README.md index 8678d696..9c1903b7 100644 --- a/plugins/code-modernization/README.md +++ b/plugins/code-modernization/README.md @@ -24,6 +24,10 @@ mkdir -p legacy && ln -s /path/to/your/legacy/codebase legacy/billing `/modernize-assess` works best with [`scc`](https://github.com/boyter/scc) (LOC + complexity + COCOMO) or [`cloc`](https://github.com/AlDanial/cloc), and falls back to `find`/`wc` if neither is installed. Portfolio mode also benefits from [`lizard`](https://github.com/terryyin/lizard) (cyclomatic complexity). The commands degrade gracefully without them, but the metrics will be coarser. +## Secret handling + +Legacy systems routinely contain live credentials, and assessment artifacts get committed and shared. `/modernize-assess` and `/modernize-harden` therefore **never write discovered credential values into findings files** — findings cite `file:line` with a masked preview (`AKIA****`). When credentials are found, a per-credential inventory (type, location, blast radius, rotation recommendation) is written to `analysis//SECRETS.local.md`, which the commands gitignore before writing. Pass `--show-secrets` to include raw values in that quarantine file (and only there). If you ran an earlier version of this plugin on a real system, check whether `analysis/` artifacts containing credentials were committed or shared, and rotate anything that was. + ## Commands The commands are designed to be run in order, but each produces a standalone artifact so you can stop, review, and resume. diff --git a/plugins/code-modernization/agents/security-auditor.md b/plugins/code-modernization/agents/security-auditor.md index f1b291db..4f34a340 100644 --- a/plugins/code-modernization/agents/security-auditor.md +++ b/plugins/code-modernization/agents/security-auditor.md @@ -39,7 +39,30 @@ terminal/screen items don't apply to a SPA. Work through what's relevant: Use available SAST where it helps (npm audit, pip-audit, grep for known-bad patterns) but **read the code** — tools miss logic flaws. Show tool output -verbatim, then add your manual findings. +verbatim — except secret values, which you redact (see below) — then add +your manual findings. + +## Secret handling (mandatory) + +Legacy codebases routinely contain live production credentials, and your +findings get pasted into decks, tickets, and committed markdown. Copying a +secret into a report multiplies the exposure you were hired to find. + +When you discover a hardcoded credential, API key, token, connection +string, or private key: + +- **Never write the secret's value into any output** — no finding table, + no report, no quoted code excerpt, no echoed tool output. Mask it to the + first 2–4 identifying characters plus `****` (`AKIA****`, + `postgres://app_user:****@db-prod…`). If a scanner prints a secret, + redact it before including the excerpt. +- Cite `file:line`. The source file is the canonical location — anyone who + legitimately needs the value can open it there. +- State what the credential appears to grant access to (database, queue, + cloud account, third-party API) and whether it looks like a production + or test credential. +- Recommend rotation for anything that looks live — exposure in source + means it is already compromised, independent of any modernization plan. ## Reporting standard diff --git a/plugins/code-modernization/commands/modernize-assess.md b/plugins/code-modernization/commands/modernize-assess.md index 188c2d43..fba8b8cc 100644 --- a/plugins/code-modernization/commands/modernize-assess.md +++ b/plugins/code-modernization/commands/modernize-assess.md @@ -1,6 +1,6 @@ --- description: Full discovery & portfolio analysis of a legacy system — inventory, complexity, debt, effort estimation -argument-hint: | --portfolio +argument-hint: [--show-secrets] | --portfolio --- **Mode select.** If `$ARGUMENTS` starts with `--portfolio`, run **Portfolio @@ -113,7 +113,9 @@ Spawn three subagents **in parallel**: 3. **security-auditor** — "Scan legacy/$1 for security vulnerabilities: injection, auth weaknesses, hardcoded secrets, vulnerable dependencies, missing input validation. Return findings in CWE-tagged table form with - file:line evidence and severity." + file:line evidence and severity. Mask every discovered credential value + per your secret-handling rules — file:line plus a 2–4 character masked + preview, never the value itself." Wait for all three. Synthesize their findings. @@ -141,6 +143,23 @@ need explained. ## Step 6 — Write the assessment +**Secrets quarantine first.** The assessment gets shared and committed — +discovered credential values must never appear in it. If the +security-auditor found any hardcoded credentials: + +1. Ensure `analysis/.gitignore` exists and contains the line + `SECRETS.local.md` (create or append as needed). If the project is a + git repo, verify with `git check-ignore -q analysis/$1/SECRETS.local.md` + before writing any findings. +2. Write `analysis/$1/SECRETS.local.md`: one row per credential — masked + preview, `file:line`, credential type, what it grants access to, + production/test guess, rotation recommendation. Only if the user passed + `--show-secrets`, add the raw value column here — this file only, never + ASSESSMENT.md. +3. In ASSESSMENT.md, the Security Findings section lists credential + findings with masked values only, plus a one-line pointer: + "Credential inventory in SECRETS.local.md (gitignored; not for sharing)." + Create `analysis/$1/ASSESSMENT.md` with these sections: - **Executive Summary** (3-4 sentences: what it is, how big, how risky, headline recommendation) - **System Inventory** (the scc table + tech fingerprint) diff --git a/plugins/code-modernization/commands/modernize-harden.md b/plugins/code-modernization/commands/modernize-harden.md index b8f7a72c..ce3a784b 100644 --- a/plugins/code-modernization/commands/modernize-harden.md +++ b/plugins/code-modernization/commands/modernize-harden.md @@ -1,6 +1,6 @@ --- description: Security vulnerability scan with a reviewable remediation patch — OWASP, CWE, CVE, secrets, injection -argument-hint: +argument-hint: [--show-secrets] --- Run a **security hardening pass** on `legacy/$1`: find vulnerabilities, rank @@ -9,6 +9,25 @@ them, and produce a reviewable patch for the critical ones. This command never edits `legacy/` — it writes findings and a proposed patch to `analysis/$1/`. The user reviews and applies (or not). +## Step 0 — Secrets quarantine setup + +Findings files get shared, committed, and pasted into decks — discovered +credential values must never land in them. Before any scanning: + +1. Ensure `analysis/.gitignore` exists and contains the line + `SECRETS.local.md`. Create the file or append the line if missing. +2. If the project is a git repo, verify with + `git check-ignore -q analysis/$1/SECRETS.local.md` — if that exits + non-zero, fix the ignore rule before proceeding. Do not write any + findings until this check passes (skip the check only if there is no + git repo). + +All secret values in every artifact this command produces are **masked** +(`AKIA****`, `password=****`) and cited by `file:line`. The one exception: +if the user passed `--show-secrets`, raw values may appear in +`analysis/$1/SECRETS.local.md` (gitignored above) and nowhere else — +never in SECURITY_FINDINGS.md or the patch commentary. + ## Scan Spawn the **security-auditor** subagent: @@ -20,7 +39,9 @@ hardcoded secrets, vulnerable dependency versions, missing input validation, path traversal. For each finding return: CWE ID, severity (Critical/High/Med/Low), file:line, one-sentence exploit scenario, and recommended fix. Run any available SAST tooling (npm audit, pip-audit, -OWASP dependency-check) and include its raw output." +OWASP dependency-check) and include its raw output. Mask every discovered +credential value per your secret-handling rules — file:line plus a 2–4 +character masked preview, never the value itself." ## Triage @@ -29,6 +50,15 @@ Write `analysis/$1/SECURITY_FINDINGS.md`: - Findings table sorted by severity - Dependency CVE table (package, installed version, CVE, fixed version) +If any hardcoded credentials were found, also write +`analysis/$1/SECRETS.local.md` (the gitignored quarantine file from Step 0): +one row per credential — masked preview, `file:line`, credential type, what +it appears to grant access to, production/test guess, and a rotation +recommendation. With `--show-secrets`, append the raw value column here — +this file only. SECURITY_FINDINGS.md gets a one-line pointer: +"N hardcoded credentials found — inventory in SECRETS.local.md (gitignored; +not for sharing)." + ## Remediate For each **Critical** and **High** finding, draft a minimal, targeted fix. -- cgit From 9d49c4b13586656cb127fc69d380fc64b9f703b1 Mon Sep 17 00:00:00 2001 From: Morgan Lunt Date: Mon, 8 Jun 2026 15:28:35 -0700 Subject: code-modernization: close remaining credential-leak paths A red-team pass found four ways credential values still reached shareable artifacts after the initial redaction: - the remediation patch: a diff removing a hardcoded secret carries the raw value on its '-' lines by construction. harden now splits output: non-credential hunks in the shareable security_remediation.patch, credential hunks in a gitignored security_remediation.local.patch with comment-only placeholders in the shareable file - the other four agents had no secret-handling rules. legacy-analyst (hardcoded-config evidence in tech-debt findings), business-rules-extractor (credentials recorded as rule parameters), test-engineer (legacy literals becoming committed test fixtures), and architecture-critic (quoted code in notes files) now all mask values and cite file:line; assess's tech-debt prompt and ASSESSMENT.md masking now cover every section, not just Security Findings - non-git projects: a .gitignore protects nothing under SVN/Mercurial. Both commands now refuse --show-secrets without git and write the quarantine file to ~/.modernize// outside the project tree - the patch-apply instruction was wrong in both documented layouts (symlinked legacy/ broke relative paths). Patches are now written with project-root-relative paths and applied from the project root Also: --show-secrets is now position-independent in both commands, and the README documents the full model. --- plugins/code-modernization/README.md | 2 +- .../agents/architecture-critic.md | 6 ++ .../agents/business-rules-extractor.md | 9 +++ .../code-modernization/agents/legacy-analyst.md | 9 +++ plugins/code-modernization/agents/test-engineer.md | 9 +++ .../commands/modernize-assess.md | 24 +++++-- .../commands/modernize-extract-rules.md | 2 +- .../commands/modernize-harden.md | 76 +++++++++++++++------- 8 files changed, 104 insertions(+), 33 deletions(-) (limited to 'plugins/code-modernization') diff --git a/plugins/code-modernization/README.md b/plugins/code-modernization/README.md index 9c1903b7..12a89322 100644 --- a/plugins/code-modernization/README.md +++ b/plugins/code-modernization/README.md @@ -26,7 +26,7 @@ mkdir -p legacy && ln -s /path/to/your/legacy/codebase legacy/billing ## Secret handling -Legacy systems routinely contain live credentials, and assessment artifacts get committed and shared. `/modernize-assess` and `/modernize-harden` therefore **never write discovered credential values into findings files** — findings cite `file:line` with a masked preview (`AKIA****`). When credentials are found, a per-credential inventory (type, location, blast radius, rotation recommendation) is written to `analysis//SECRETS.local.md`, which the commands gitignore before writing. Pass `--show-secrets` to include raw values in that quarantine file (and only there). If you ran an earlier version of this plugin on a real system, check whether `analysis/` artifacts containing credentials were committed or shared, and rotate anything that was. +Legacy systems routinely contain live credentials, and assessment artifacts get committed and shared. **Every agent in this plugin masks credential values** — findings, rule-card parameters, architecture notes, and test fixtures cite `file:line` with a masked preview (`AKIA****`), never the value. When credentials are found, a per-credential inventory (type, location, blast radius, rotation recommendation) is written to `analysis//SECRETS.local.md`, which the commands gitignore before writing; on non-git projects the quarantine file goes to `~/.modernize//` instead. `/modernize-harden` splits its remediation diff so credential-removal hunks (which necessarily contain the raw value) land in a gitignored `security_remediation.local.patch`, never the shareable patch. Pass `--show-secrets` to include raw values in the quarantine file (and only there). If you ran an earlier version of this plugin on a real system, check whether `analysis/` artifacts containing credentials were committed or shared, and rotate anything that was. ## Commands diff --git a/plugins/code-modernization/agents/architecture-critic.md b/plugins/code-modernization/agents/architecture-critic.md index 08ba03b1..cf45ec6a 100644 --- a/plugins/code-modernization/agents/architecture-critic.md +++ b/plugins/code-modernization/agents/architecture-critic.md @@ -29,6 +29,12 @@ For **transformed code**: - Does the test suite actually pin behavior, or just exercise code paths? - What would the on-call engineer need at 3am that isn't here? +## Secret handling (mandatory) + +When a finding quotes code containing a credential, key, token, or +connection string, mask the value (`'Pr0d****'`) and cite `file:line` — +findings get appended verbatim to committed notes files. + ## Output Findings ranked **Blocker / High / Medium / Nit**. Each with: what, where, diff --git a/plugins/code-modernization/agents/business-rules-extractor.md b/plugins/code-modernization/agents/business-rules-extractor.md index 31eca621..c0d0bb21 100644 --- a/plugins/code-modernization/agents/business-rules-extractor.md +++ b/plugins/code-modernization/agents/business-rules-extractor.md @@ -40,6 +40,15 @@ of the technology, skip it. from structure/names), **Low** (ambiguous; needs SME). 6. If confidence < High, write the exact question an SME must answer. +## Secret handling (mandatory) + +Rule parameters sometimes *are* credentials — hardcoded passwords in auth +checks, API keys in partner-service calls, connection strings in batch +routines. Record the **rule**, never the **value**: write the parameter as +`` with at most a 2–4 character +preview. Rule cards flow into briefs and steering decks; a raw credential +in a parameter list is a leak. + ## Output format One "Rule Card" per rule (see the format in the `/modernize-extract-rules` diff --git a/plugins/code-modernization/agents/legacy-analyst.md b/plugins/code-modernization/agents/legacy-analyst.md index b22e5736..a6fd5e6c 100644 --- a/plugins/code-modernization/agents/legacy-analyst.md +++ b/plugins/code-modernization/agents/legacy-analyst.md @@ -32,6 +32,15 @@ and explain it in terms a modern engineer can act on. - **Note what's missing.** Unhandled error paths, TODO comments, commented-out blocks, magic numbers — these are signals about history and risk. +## Secret handling (mandatory) + +Legacy code is full of live credentials, and your findings get copied into +shareable reports. When the evidence for a finding — hardcoded config, +dead code, debt, an interface payload — includes a credential, API key, +token, connection string, or private key, **never reproduce the value**. +Cite `file:line` with a masked preview (`VALUE 'Pr0d****'`, +`password=****`). The finding is the practice, not the value. + ## Output format Default to structured markdown: tables for inventories, Mermaid for graphs, diff --git a/plugins/code-modernization/agents/test-engineer.md b/plugins/code-modernization/agents/test-engineer.md index 9f49e883..07057ad0 100644 --- a/plugins/code-modernization/agents/test-engineer.md +++ b/plugins/code-modernization/agents/test-engineer.md @@ -28,6 +28,15 @@ someone thinks it should do) so that a rewrite can be proven equivalent. `@Disabled("pending RULE-NNN")` / `@pytest.mark.skip` / `it.todo()` — never deleted. +## Secret handling (mandatory) + +Never copy credential-like literals — passwords, API keys, tokens, +connection strings — from legacy code into test fixtures. Tests live in +the deliverable codebase and get committed. Substitute clearly-fake values +of the same shape and length and note the substitution in a comment. +Anything a test genuinely needs live (e.g. a real database connection for +a dual-run harness) is read from an environment variable, never inlined. + ## Output Idiomatic tests for the requested target stack (JUnit 5 / pytest / Vitest / diff --git a/plugins/code-modernization/commands/modernize-assess.md b/plugins/code-modernization/commands/modernize-assess.md index fba8b8cc..b098f02a 100644 --- a/plugins/code-modernization/commands/modernize-assess.md +++ b/plugins/code-modernization/commands/modernize-assess.md @@ -5,7 +5,9 @@ argument-hint: [--show-secrets] | --portfolio **Mode select.** If `$ARGUMENTS` starts with `--portfolio`, run **Portfolio mode** against the directory that follows. Otherwise run **Single-system -mode** against `legacy/$1`. +mode** against the system dir. Parse flags positionally-independently: +`--show-secrets` may appear before or after the system dir — the system +dir is the first non-flag token. --- @@ -108,7 +110,9 @@ Spawn three subagents **in parallel**: 2. **legacy-analyst** — "Identify technical debt in legacy/$1: dead code, deprecated APIs, copy-paste duplication, god objects/programs, missing error handling, hardcoded config. Return the top 10 findings ranked by - remediation value, each with file:line evidence." + remediation value, each with file:line evidence. If evidence contains a + credential value, mask it per your secret-handling rules — never quote + it." 3. **security-auditor** — "Scan legacy/$1 for security vulnerabilities: injection, auth weaknesses, hardcoded secrets, vulnerable dependencies, @@ -150,14 +154,20 @@ security-auditor found any hardcoded credentials: 1. Ensure `analysis/.gitignore` exists and contains the line `SECRETS.local.md` (create or append as needed). If the project is a git repo, verify with `git check-ignore -q analysis/$1/SECRETS.local.md` - before writing any findings. -2. Write `analysis/$1/SECRETS.local.md`: one row per credential — masked - preview, `file:line`, credential type, what it grants access to, + — do not write any findings until the check passes. If there is **no + git repo** (check for `.svn`/`.hg`/`CVS` too — a `.gitignore` protects + nothing under another VCS): refuse `--show-secrets` and write + `SECRETS.local.md` to `~/.modernize/$1/` instead of the project tree, + telling the user where it went and why. +2. Write `SECRETS.local.md`: one row per credential — masked preview, + `file:line`, credential type, what it grants access to, production/test guess, rotation recommendation. Only if the user passed `--show-secrets`, add the raw value column here — this file only, never ASSESSMENT.md. -3. In ASSESSMENT.md, the Security Findings section lists credential - findings with masked values only, plus a one-line pointer: +3. Masking applies to **every section of ASSESSMENT.md**, whichever agent + produced the finding — the Technical Debt section quotes hardcoded + config; those quotes follow the same masking rule as Security Findings. + The Security Findings section adds a one-line pointer: "Credential inventory in SECRETS.local.md (gitignored; not for sharing)." Create `analysis/$1/ASSESSMENT.md` with these sections: diff --git a/plugins/code-modernization/commands/modernize-extract-rules.md b/plugins/code-modernization/commands/modernize-extract-rules.md index 1fe7979c..e842867c 100644 --- a/plugins/code-modernization/commands/modernize-extract-rules.md +++ b/plugins/code-modernization/commands/modernize-extract-rules.md @@ -46,7 +46,7 @@ Merge the three result sets. Deduplicate. For each distinct rule, write a When Then [And ] -**Parameters:** +**Parameters:** `> **Edge cases handled:** **Suspected defect:** **Confidence:** High | Medium | Low — diff --git a/plugins/code-modernization/commands/modernize-harden.md b/plugins/code-modernization/commands/modernize-harden.md index ce3a784b..64e36f3f 100644 --- a/plugins/code-modernization/commands/modernize-harden.md +++ b/plugins/code-modernization/commands/modernize-harden.md @@ -3,8 +3,11 @@ description: Security vulnerability scan with a reviewable remediation patch — argument-hint: [--show-secrets] --- -Run a **security hardening pass** on `legacy/$1`: find vulnerabilities, rank -them, and produce a reviewable patch for the critical ones. +Run a **security hardening pass** on the legacy system: find +vulnerabilities, rank them, and produce a reviewable patch for the +critical ones. Parse arguments flag-independently: the system dir +(referred to as `$1` below) is the first non-flag token in `$ARGUMENTS`; +`--show-secrets` may appear anywhere. This command never edits `legacy/` — it writes findings and a proposed patch to `analysis/$1/`. The user reviews and applies (or not). @@ -14,19 +17,25 @@ to `analysis/$1/`. The user reviews and applies (or not). Findings files get shared, committed, and pasted into decks — discovered credential values must never land in them. Before any scanning: -1. Ensure `analysis/.gitignore` exists and contains the line - `SECRETS.local.md`. Create the file or append the line if missing. +1. Ensure `analysis/.gitignore` exists and contains the lines + `SECRETS.local.md` and `*.local.patch`. Create the file or append the + missing lines. 2. If the project is a git repo, verify with `git check-ignore -q analysis/$1/SECRETS.local.md` — if that exits non-zero, fix the ignore rule before proceeding. Do not write any - findings until this check passes (skip the check only if there is no - git repo). - -All secret values in every artifact this command produces are **masked** -(`AKIA****`, `password=****`) and cited by `file:line`. The one exception: -if the user passed `--show-secrets`, raw values may appear in -`analysis/$1/SECRETS.local.md` (gitignored above) and nowhere else — -never in SECURITY_FINDINGS.md or the patch commentary. + findings until this check passes. +3. **If there is no git repo** (check for `.svn`/`.hg`/`CVS` too — a + `.gitignore` protects nothing under another VCS): refuse + `--show-secrets`, and write `SECRETS.local.md` and any `.local.patch` + file to `~/.modernize/$1/` instead of the project tree, telling the + user where they went and why. + +All secret values in every shareable artifact this command produces are +**masked** (`AKIA****`, `password=****`) and cited by `file:line`. Raw +values may appear in exactly two places, both gitignored: the +`*.local.patch` remediation hunks (unavoidably — see Remediate) and, only +with `--show-secrets`, `SECRETS.local.md`. Never in SECURITY_FINDINGS.md +or patch commentary. ## Scan @@ -62,23 +71,38 @@ not for sharing)." ## Remediate For each **Critical** and **High** finding, draft a minimal, targeted fix. -Do **not** edit `legacy/` — write all fixes as a single unified diff to -`analysis/$1/security_remediation.patch`, with a comment line above each -hunk citing the finding ID it addresses (`# SEC-001: parameterize the query`). +Do **not** edit `legacy/` — write fixes as unified diffs with **paths +relative to the project root** (`legacy/$1/...`), applied from the project +root, with a comment line above each hunk citing the finding ID it +addresses (`# SEC-001: parameterize the query`). + +**Credential findings split into two files.** A diff that removes a +hardcoded secret necessarily contains the raw value on its `-` and +context lines — that cannot go in the shareable patch: + +- `analysis/$1/security_remediation.patch` (shareable) — every + non-credential hunk, plus for each credential finding a comment-only + placeholder: `# SEC-NNN: credential remediation — hunk in + security_remediation.local.patch (gitignored; not for sharing)`. +- `analysis/$1/security_remediation.local.patch` (gitignored in Step 0) — + the real, applyable hunks for credential findings only. Add a **Remediation Log** section to SECURITY_FINDINGS.md mapping each -finding ID → one-line summary of the proposed fix and the patch hunk that -implements it. +finding ID → one-line summary of the proposed fix and which patch file +carries the hunk. ## Verify -Spawn the **security-auditor** again to **review the patch** against the -original code: +Spawn the **security-auditor** again to **review both patches** against +the original code: -"Review analysis/$1/security_remediation.patch against legacy/$1. For each +"Review analysis/$1/security_remediation.patch and +analysis/$1/security_remediation.local.patch against legacy/$1. For each hunk: does it fully remediate the cited finding? Does it introduce new -vulnerabilities or change behavior beyond the fix? Return one verdict per -hunk: RESOLVES / PARTIAL / INTRODUCES-RISK, with a one-line reason." +vulnerabilities or change behavior beyond the fix? Confirm no raw +credential values appear anywhere in the shareable patch. Return one +verdict per hunk: RESOLVES / PARTIAL / INTRODUCES-RISK, with a one-line +reason." Add a **Patch Review** section to SECURITY_FINDINGS.md with the verdicts. If any hunk is PARTIAL or INTRODUCES-RISK, revise the patch and re-review. @@ -87,8 +111,12 @@ If any hunk is PARTIAL or INTRODUCES-RISK, revise the patch and re-review. Tell the user the artifacts are ready: - `analysis/$1/SECURITY_FINDINGS.md` — findings, remediation log, patch review -- `analysis/$1/security_remediation.patch` — review, then apply if appropriate - with `git -C legacy/$1 apply ../../analysis/$1/security_remediation.patch` +- `analysis/$1/security_remediation.patch` — review, then apply **from the + project root**: `git apply analysis/$1/security_remediation.patch` + (if `legacy/$1` is a symlink, use `git apply --unsafe-paths` or apply + with `patch -p0` from the project root) +- `analysis/$1/security_remediation.local.patch` — the credential fixes; + apply the same way, and rotate the affected credentials regardless - Re-run `/modernize-harden $1` after applying to confirm resolution Suggest: `glow -p analysis/$1/SECURITY_FINDINGS.md` -- cgit From 4f49895abd8e59eb019780b87531d3ffd3f38765 Mon Sep 17 00:00:00 2001 From: Morgan Lunt Date: Mon, 8 Jun 2026 16:42:03 -0700 Subject: code-modernization: assess writes the full quarantine ignore set assess only added SECRETS.local.md to analysis/.gitignore, leaving *.local.patch uncovered until harden's own Step 0 ran. Both patterns are now written by whichever command runs first. --- plugins/code-modernization/commands/modernize-assess.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'plugins/code-modernization') diff --git a/plugins/code-modernization/commands/modernize-assess.md b/plugins/code-modernization/commands/modernize-assess.md index b098f02a..692bb643 100644 --- a/plugins/code-modernization/commands/modernize-assess.md +++ b/plugins/code-modernization/commands/modernize-assess.md @@ -151,8 +151,10 @@ need explained. discovered credential values must never appear in it. If the security-auditor found any hardcoded credentials: -1. Ensure `analysis/.gitignore` exists and contains the line - `SECRETS.local.md` (create or append as needed). If the project is a +1. Ensure `analysis/.gitignore` exists and contains the lines + `SECRETS.local.md` and `*.local.patch` (create or append as needed — + the patch pattern is used by `/modernize-harden`; writing both now + means the ignore set is complete from first contact). If the project is a git repo, verify with `git check-ignore -q analysis/$1/SECRETS.local.md` — do not write any findings until the check passes. If there is **no git repo** (check for `.svn`/`.hg`/`CVS` too — a `.gitignore` protects -- cgit From 1c4a5cfded2cb2e4c8c5420ebd2f3974eb3fdd51 Mon Sep 17 00:00:00 2001 From: Morgan Lunt Date: Mon, 8 Jun 2026 14:54:22 -0700 Subject: code-modernization: interactive topology map, preflight command, persona flows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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' --- plugins/code-modernization/README.md | 18 +- .../code-modernization/assets/topology-viewer.html | 454 +++++++++++++++++++++ .../code-modernization/commands/modernize-brief.md | 17 +- .../code-modernization/commands/modernize-map.md | 132 ++++-- .../commands/modernize-preflight.md | 93 +++++ .../commands/modernize-transform.md | 19 +- 6 files changed, 686 insertions(+), 47 deletions(-) create mode 100644 plugins/code-modernization/assets/topology-viewer.html create mode 100644 plugins/code-modernization/commands/modernize-preflight.md (limited to 'plugins/code-modernization') diff --git a/plugins/code-modernization/README.md b/plugins/code-modernization/README.md index 8678d696..ce505250 100644 --- a/plugins/code-modernization/README.md +++ b/plugins/code-modernization/README.md @@ -7,7 +7,7 @@ A structured workflow and set of specialist agents for modernizing legacy codeba Legacy modernization fails most often not because the target technology is wrong, but because teams skip steps: they transform code before understanding it, reimagine architecture before extracting business rules, or ship without a harness that would catch behavior drift. This plugin enforces a sequence: ``` -assess → map → extract-rules → brief → reimagine | transform → harden +preflight → assess → map → extract-rules → brief → reimagine | transform → harden ``` The discovery commands (`assess`, `map`, `extract-rules`) build artifacts under `analysis//`. The `brief` command synthesizes them into an approval gate. The build commands (`reimagine`, `transform`) write new code under `modernized/`. The `harden` command audits the legacy system and produces a reviewable remediation patch. Each step has a dedicated slash command, and specialist agents (legacy analyst, business rules extractor, architecture critic, security auditor, test engineer) are invoked from within those commands — or directly — to keep the work honest. @@ -20,25 +20,33 @@ Commands take a `` argument and assume the system being modernized l mkdir -p legacy && ln -s /path/to/your/legacy/codebase legacy/billing ``` -## Optional tooling +## What to give Claude -`/modernize-assess` works best with [`scc`](https://github.com/boyter/scc) (LOC + complexity + COCOMO) or [`cloc`](https://github.com/AlDanial/cloc), and falls back to `find`/`wc` if neither is installed. Portfolio mode also benefits from [`lizard`](https://github.com/terryyin/lizard) (cyclomatic complexity). The commands degrade gracefully without them, but the metrics will be coarser. +The commands degrade gracefully, but each of these makes the output meaningfully better — run `/modernize-preflight ` to check all of them at once and get a readiness report: + +- **Analysis tools**: [`scc`](https://github.com/boyter/scc) (LOC + complexity + COCOMO) or [`cloc`](https://github.com/AlDanial/cloc); [`lizard`](https://github.com/terryyin/lizard) for portfolio mode. Without them, metrics fall back to `find`/`wc` and get coarser. +- **A working build toolchain** for the legacy stack (e.g. GnuCOBOL for COBOL) — required before `/modernize-transform` can prove behavioral equivalence, and verified by preflight with a real smoke compile against your code. +- **The whole system in the tree**: deployment descriptors (JCL, CICS definitions, route configs), copybooks/includes, and DDL/schemas. Entry-point detection and data lineage in `/modernize-map` are guesswork without them. +- **Production telemetry** (optional): an observability MCP server or batch job logs enable the runtime overlay in `/modernize-assess` and timing annotations on critical paths. ## Commands The commands are designed to be run in order, but each produces a standalone artifact so you can stop, review, and resume. +### `/modernize-preflight [target-stack]` +Environment readiness check, meant to run first: detects the legacy stack, checks analysis tooling, **smoke-compiles a real source file** with the legacy toolchain (the errors this surfaces — missing copybooks, wrong dialect flags — are the ones that otherwise appear mid-transform), inventories missing includes / deployment descriptors / binary-only artifacts, and probes for telemetry. Produces `analysis//PREFLIGHT.md` with a per-command Ready / Ready-with-gaps / Not-ready verdict. + ### `/modernize-assess ` — or — `/modernize-assess --portfolio ` Inventory the legacy codebase: languages, line counts, complexity, build system, integrations, technical debt, security posture, documentation gaps, and a COCOMO-derived effort estimate. Produces `analysis//ASSESSMENT.md` and `analysis//ARCHITECTURE.mmd`. Spawns `legacy-analyst` (×2) and `security-auditor` in parallel for deep reads. With `--portfolio`, sweeps every subdirectory of a parent directory and writes a sequencing heat-map to `analysis/portfolio.html`. ### `/modernize-map ` -Build a dependency and topology map of the **legacy** system: program/module call graph, data lineage (programs ↔ data stores), entry points, dead-end candidates, and one traced critical-path business flow. Writes a re-runnable extraction script and produces `analysis//topology.json` (machine-readable), `analysis//TOPOLOGY.html` (rendered Mermaid + architect observations), and standalone `call-graph.mmd`, `data-lineage.mmd`, and `critical-path.mmd`. +Build a dependency and topology map of the **legacy** system: program/module call graph, data lineage (programs ↔ data stores), entry points, dead-end candidates, and 2–4 traced business flows each anchored to a persona (the claimant, the operator, the auditor — not the maintainer). Writes a re-runnable extraction script and produces `analysis//topology.json` plus `analysis//TOPOLOGY.html` — an **interactive zoomable map** (circle-pack of domains/modules sized by LOC, dependency edges with per-kind toggles, search, click-for-details sidebar, and a walkthrough mode that plays each persona flow as a numbered path with a plain-language narrative). Built from a template shipped with the plugin, so it works on systems far too dense for a static diagram. Small domain-level `call-graph.mmd`, `data-lineage.mmd`, and `critical-path.mmd` are still exported for docs and PRs. ### `/modernize-extract-rules [module-pattern]` Mine the business rules embedded in the legacy code — calculations, validations, eligibility, state transitions, policies — into Given/When/Then "Rule Cards" with `file:line` citations and confidence ratings. Spawns three `business-rules-extractor` agents in parallel (calculations, validations, lifecycle). Produces `analysis//BUSINESS_RULES.md` and `analysis//DATA_OBJECTS.md`. ### `/modernize-brief [target-stack]` -Synthesize the discovery artifacts into a phased **Modernization Brief** — the single document a steering committee approves and engineering executes: target architecture, strangler-fig phase plan with entry/exit criteria, behavior contract, validation strategy, open questions, and an approval block. Reads `ASSESSMENT.md`, `TOPOLOGY.html`, and `BUSINESS_RULES.md` and **stops if any are missing** — run the discovery commands first. Produces `analysis//MODERNIZATION_BRIEF.md` and enters plan mode as a human-in-the-loop gate. +Synthesize the discovery artifacts into a phased **Modernization Brief** — the single document a steering committee approves and engineering executes: target architecture, strangler-fig phase plan with entry/exit criteria, persona-based business walkthroughs (the section non-technical approvers actually read), behavior contract, validation strategy, open questions, and an approval block. Reads `ASSESSMENT.md`, `TOPOLOGY.html`, and `BUSINESS_RULES.md` and **stops if any are missing** — run the discovery commands first. Produces `analysis//MODERNIZATION_BRIEF.md` and enters plan mode as a human-in-the-loop gate. ### `/modernize-reimagine ` Greenfield rebuild from extracted intent rather than a structural port. Mines a spec (`analysis//AI_NATIVE_SPEC.md`), designs a target architecture and has it adversarially reviewed (`analysis//REIMAGINED_ARCHITECTURE.md`), then **scaffolds services with executable acceptance tests** under `modernized/-reimagined/` and writes a `CLAUDE.md` knowledge handoff for the new system. Two human-in-the-loop checkpoints. Spawns `business-rules-extractor`, `legacy-analyst` (×2), `architecture-critic`, and general-purpose scaffolding agents. diff --git a/plugins/code-modernization/assets/topology-viewer.html b/plugins/code-modernization/assets/topology-viewer.html new file mode 100644 index 00000000..4a71bf18 --- /dev/null +++ b/plugins/code-modernization/assets/topology-viewer.html @@ -0,0 +1,454 @@ + + + + + +System topology + + + + + +
+
+

System topology

+
+
+
+ +
+
+
+ + +
+ + +
scroll to zoom · drag to pan · click a node · double-click to zoom in · Esc to reset
+

No topology data found in this file.
+Re-run /modernize-map to regenerate it.

+ + + + diff --git a/plugins/code-modernization/commands/modernize-brief.md b/plugins/code-modernization/commands/modernize-brief.md index 28eeb624..3e9f07e7 100644 --- a/plugins/code-modernization/commands/modernize-brief.md +++ b/plugins/code-modernization/commands/modernize-brief.md @@ -36,23 +36,32 @@ fewest-dependencies first. For each phase: Render the phases as a Mermaid `gantt` chart. -### 4. Behavior Contract +### 4. Business Walkthroughs +For each persona flow in `analysis/$1/topology.json` (`flows` — produced +by `/modernize-map`), a short narrative table: persona, what happens in +business language, which legacy modules implement it today, and which +phase from §3 replaces each. This is the section non-technical approvers +actually read — it connects "Phase 2" to "what happens when a customer +files a claim". If topology.json has no flows, derive 2–3 walkthroughs +from the entry points and say they need SME confirmation. + +### 5. Behavior Contract List the **P0 rules** from BUSINESS_RULES.md (the ones tagged `Priority: P0` — money, regulatory, data integrity) that MUST be proven equivalent before any phase ships. These become the regression suite. Flag any P0 rule with Confidence < High as a blocker requiring SME confirmation before its phase starts. -### 5. Validation Strategy +### 6. Validation Strategy State which combination applies: characterization tests, contract tests, parallel-run / dual-execution diff, property-based tests, manual UAT. Justify per phase. -### 6. Open Questions +### 7. Open Questions Anything requiring human/SME decision before Phase 1 starts. Each as a checkbox the approver must tick. -### 7. Approval Block +### 8. Approval Block ``` Approved by: ________________ Date: __________ Approval covers: Phase 1 only | Full plan diff --git a/plugins/code-modernization/commands/modernize-map.md b/plugins/code-modernization/commands/modernize-map.md index 406b74c0..5f210a5d 100644 --- a/plugins/code-modernization/commands/modernize-map.md +++ b/plugins/code-modernization/commands/modernize-map.md @@ -55,50 +55,108 @@ re-run and audited. Have it write a machine-readable `analysis/$1/topology.json` and print a human summary. Run it; show the summary (cap at ~200 lines for very large estates). -## Render - -From the extracted data, generate **three Mermaid diagrams** and write them -to `analysis/$1/TOPOLOGY.html` as a self-contained page that renders in any -browser. - -The HTML page must use: dark `#1e1e1e` background, `#d4d4d4` text, -`#cc785c` for `

`/accents, `system-ui` font, all CSS **inline** (no -external stylesheets). Load Mermaid from a CDN in ``: - -```html - +`topology.json` must follow this schema — it feeds the interactive viewer: + +```json +{ + "system": "", + "root": { + "id": "sys", "name": "", "kind": "system", + "children": [ + { "id": "dom:", "name": "", "kind": "domain", + "children": [ + { "id": "", "name": "", "kind": "module", + "language": "cobol", "loc": 1234, "file": "src/MODULE.cbl" } + ] }, + { "id": "dom:data", "name": "Data stores", "kind": "domain", + "children": [ + { "id": "ds:", "name": "", "kind": "datastore" } + ] } + ] + }, + "edges": [ + { "source": "", "target": "", "kind": "call" } + ], + "entryPoints": ["", "..."], + "observations": ["", "..."], + "flows": [ + { "name": "", "persona": "", + "description": "", + "steps": [ + { "label": "", "nodes": ["", ""] } + ] } + ] +} ``` -Each diagram goes in a `
...
` block. Do **not** -wrap diagrams in markdown ` ``` ` fences inside the HTML. +- Group leaf modules under `domain` containers (use the domains from + `/modernize-assess` if available). Leaf kinds: `module`, `datastore`, + `job`, `screen`. `loc` drives circle size — include it for modules. +- Edge kinds: `call` (direct), `dispatch` (dynamic/router), `read`, + `write`. Every edge endpoint must be a leaf id that exists in the tree. +- `observations`: 3–7 architect observations — tight coupling clusters, + single points of failure, service-extraction candidates, data stores + with too many writers. +- `flows` is the **persona walkthrough** section — see below. + +## Persona flows + +Trace **2–4 end-to-end business flows**, each anchored to a persona — +the people who experience the system, not the people who maintain it +(e.g. for a benefits system: the claimant, the caseworker, the auditor; +for billing: the customer, the billing operator). For each flow: + +- `name` + one-sentence `description` in plain business language — + something a steering committee member relates to ("a claimant files a + weekly claim"), not a data-flow label ("CLM batch ingest"). +- `steps`: 3–8 steps, each with a business-language `label` and the + `nodes` (programs + data stores) that implement that step, in + execution order. + +This is the bridge between the technical map and non-technical +stakeholders: the same diagram answers "which program does X" for +engineers and "what happens when someone files a claim" for everyone else. -1. **`graph TD` — Module call graph.** Cluster by domain (use `subgraph`). - Highlight entry points in a distinct style. Cap at ~40 nodes — if larger, - show domain-level with one expanded domain. - -2. **`graph LR` — Data lineage.** Programs → data stores. - Mark read vs write edges. +## Render -3. **`flowchart TD` — Critical path.** Trace ONE end-to-end business flow - (e.g., "monthly billing run" or "process payment") through every program - and data store it touches, in execution order. If production telemetry is - available (see `/modernize-assess` Step 4), annotate each step with its - p50/p99 wall-clock. +`analysis/$1/TOPOLOGY.html` is an **interactive map**: a zoomable +circle-pack of the whole system (domains as containers, modules sized by +LOC) with dependency edges, search, per-node detail sidebar, edge-kind +toggles, and a flow-walkthrough mode that plays each persona flow as a +numbered path. Build it from the template that ships with this plugin — +do not hand-write the viewer: + +```bash +python3 - "$CLAUDE_PLUGIN_ROOT/assets/topology-viewer.html" analysis/$1 <<'EOF' +import json, sys +tpl_path, out_dir = sys.argv[1], sys.argv[2] +tpl = open(tpl_path).read() +data = json.dumps(json.load(open(f"{out_dir}/topology.json"))) +html = tpl.replace("/*__TOPOLOGY_DATA__*/ null", "/*__TOPOLOGY_DATA__*/ " + data) +open(f"{out_dir}/TOPOLOGY.html", "w").write(html) +print(f"wrote {out_dir}/TOPOLOGY.html ({len(html):,} bytes)") +EOF +``` -Also export the three diagrams as standalone `.mmd` files for re-use: -`analysis/$1/call-graph.mmd`, `analysis/$1/data-lineage.mmd`, -`analysis/$1/critical-path.mmd`. +The viewer loads d3 from a CDN, so opening it needs network access; the +rest is self-contained. If the data injection marker is missing from the +output, the template was not found — check `$CLAUDE_PLUGIN_ROOT`. -## Annotate +Mermaid stays for **small, exportable** diagrams. Generate standalone +`.mmd` files for reuse in docs and PRs — but keep each under ~40 edges; +collapse to domain level if the full graph is bigger (dense Mermaid +becomes unreadable, which is exactly what the interactive map is for): -Below each `
` block in TOPOLOGY.html, add a `
    ` -with 3-5 **architect observations**: tight coupling clusters, single -points of failure, candidates for service extraction, data stores -touched by too many writers. +- `analysis/$1/call-graph.mmd` — domain-level `graph TD`, entry points + highlighted +- `analysis/$1/data-lineage.mmd` — `graph LR`, programs → data stores, + read vs write marked +- `analysis/$1/critical-path.mmd` — `flowchart TD` of the primary flow + from `flows`, annotated with p50/p99 wall-clock if telemetry is + available (see `/modernize-assess` Step 4) ## Present -Tell the user to open `analysis/$1/TOPOLOGY.html` in a browser. +Tell the user to open `analysis/$1/TOPOLOGY.html` in a browser, and to +try: search for a module, click it to see its connections, and pick a +persona flow from the walkthrough dropdown. diff --git a/plugins/code-modernization/commands/modernize-preflight.md b/plugins/code-modernization/commands/modernize-preflight.md new file mode 100644 index 00000000..aa04dd36 --- /dev/null +++ b/plugins/code-modernization/commands/modernize-preflight.md @@ -0,0 +1,93 @@ +--- +description: Environment readiness check — analysis tools, build toolchain, source completeness, telemetry access +argument-hint: [target-stack] +--- + +Check whether this environment is ready to analyze — and eventually +transform — `legacy/$1`, and tell the user exactly what to fix before the +other commands run into it. Modernization sessions fail late and +confusingly when this isn't done: assessment metrics silently degrade +without analysis tools, characterization tests can't run without a build +toolchain, and dependency maps come out wrong when half the source isn't +in the tree. + +Run every check even when an early one fails — the point is one complete +readiness report, not the first error. + +## Check 1 — Detect the stack + +Fingerprint `legacy/$1` from file extensions and manifests: languages, +build system, deployment/config descriptors. This drives which checks +below apply. Report what was detected and the rough file split. + +## Check 2 — Analysis tooling + +For each, check availability (`command -v`) and report version, what it's +used for, and what degrades without it: + +| Tool | Used by | Without it | +|---|---|---| +| `scc` (or `cloc`) | assess | LOC/complexity fall back to `find`+`wc`; COCOMO estimate gets coarser | +| `lizard` | assess --portfolio | complexity estimated from decision-keyword counts | +| `glow` | all | markdown artifacts render as plain text | + +Include the platform's install one-liner for anything missing +(`brew install scc`, `apt install cloc`, `pip install lizard`, …). + +## Check 3 — Build toolchain (smoke test, not just presence) + +Identify the compiler/interpreter for the detected legacy stack — e.g. +GnuCOBOL (`cobc`) for COBOL, JDK + Maven/Gradle for Java, `cc`/`make` for +C, `dotnet` for .NET. Then **prove it works on this codebase**: pick one +representative source file and run a syntax-only compile +(`cobc -fsyntax-only`, `javac`, `gcc -fsyntax-only`, …). + +A failed smoke test is the most valuable output of this command — report +the actual error and diagnose it: missing copybook/include path, missing +dialect flag (`-std=ibm` etc.), fixed vs free format, missing dependency +jar. These are the errors that otherwise surface mid-`/modernize-transform` +with much less context. + +If the user passed a `[target-stack]`, do the same for it: runtime, +package manager, test framework (`mvn -v`, `npm -v`, `pytest --version`, …). + +## Check 4 — Source completeness + +The dependency map is only as good as what's in the tree. Check for the +detected stack's equivalents of: + +- **Referenced-but-missing includes** — copybooks (`COPY X` with no + `X.cpy`), headers, imports that resolve nowhere. Count and list the top + missing names. +- **Deployment/config descriptors** — JCL for batch COBOL, CICS CSD + definitions, `web.xml`/route configs, cron/scheduler definitions. + Without these, entry-point detection and the code↔storage join in + `/modernize-map` are guesswork. +- **Data definitions** — DDL, schemas, copybook record layouts, ORM + mappings. +- **Binary-only artifacts** — load modules, jars, DLLs with no matching + source. These become unmappable black boxes; flag them now. + +## Check 5 — Optional context + +- **Production telemetry** — is an observability/APM MCP server connected, + or are batch job logs / runtime exports available? (Enables the runtime + overlay in `/modernize-assess` Step 4 and timing annotations in + `/modernize-map`.) +- **Version control history** — is `legacy/$1` under git with meaningful + history? (Change-frequency data sharpens risk ranking.) + +## Report + +Write `analysis/$1/PREFLIGHT.md`: a status table — one row per check, +status ✅ / ⚠️ / ❌, what was found, and the fix for anything not green — +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 +- `transform` + `reimagine` — additionally need Check 3 green for both + legacy and target stacks +- `harden` — needs Check 2 plus any stack-specific SAST tooling found + +Print the table in the session too, and end with the single most +important fix if anything is red. 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: -- cgit From 874596818685794ad06efcf5db115acaf938da68 Mon Sep 17 00:00:00 2001 From: Morgan Lunt Date: Mon, 8 Jun 2026 15:03:49 -0700 Subject: code-modernization: harden topology viewer and template injection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes from an adversarial review of the new viewer: - pin d3 to 7.9.0 and load it via dynamic import with an explicit error panel when the CDN is unreachable (previously a blocked CDN produced a silent dark page — a real concern for restricted networks) - coerce ids/names/loc at intake: a single missing name or non-numeric loc previously threw inside the render loop or propagated NaN through the pack layout, blanking the canvas with no error - normalize flows/steps/edges defensively (null entries, missing steps, numeric ids vs string lookups) - mirror the level-of-detail reveal rule in the hit test so clicks can't select nodes that aren't drawn - scope the Escape shortcut so clearing the search box doesn't reset the viewport; set zoom clickDistance(4) so trackpad jitter doesn't swallow selection clicks - round canvas backing-store size (fractional devicePixelRatio caused a reallocation every frame on 125%/150% display scaling) - modernize-map: use braced ${CLAUDE_PLUGIN_ROOT} so substitution actually happens, assert the injection marker exists in the template, and correct the documented failure mode --- .../code-modernization/assets/topology-viewer.html | 69 +++++++++++++++++----- .../code-modernization/commands/modernize-map.md | 18 +++--- 2 files changed, 65 insertions(+), 22 deletions(-) (limited to 'plugins/code-modernization') diff --git a/plugins/code-modernization/assets/topology-viewer.html b/plugins/code-modernization/assets/topology-viewer.html index 4a71bf18..0d78f86c 100644 --- a/plugins/code-modernization/assets/topology-viewer.html +++ b/plugins/code-modernization/assets/topology-viewer.html @@ -92,14 +92,32 @@ Re-run /modernize-map to regenerate it.

    executed on open. Escape < > & in the injected data and add a CSP to the template. - Second-order injection: citation/identifier fields (source / cwe / source_site / correctedSource) were interpolated UNFENCED into the verifier prompts that are supposed to be the trust anchor. Fence them in extract-rules, harden-scan, uplift-deltas. uplift design (audit of the new feature): - Working-copy model: copy the WHOLE solution to modernized/ once and edit in place (relative project refs survive; result is a reviewable git diff) — the incremental per-project copy broke multi-project builds. - Dual-run honesty: reframed as 'if both runtimes run here' (net48 needs Windows; JUnit/pytest don't multi-target); dummy-test gate now binds a real SUT under both targets; per-stack harness notes. - Tooling honesty: present/runnable/actually-ran distinction; never fold in a tool that couldn't run; apiport/2to3 demoted; py2->3 removed from 'preserve' examples. - Delta classes: name the high-blast-radius landmines (JPMS strong encapsulation, .NET trimming/AOT, ICU globalization, hosting/runtime-config, analyzer/nullable) in the finder briefs + agent. - Rewrite-vs-uplift signal: weigh by touched sites (siteCount), not delta-card count; judgment-share demoted to secondary. Docs/consistency: brief reads topology.json (not TOPOLOGY.html); README 'five commands'; credential-masking claim split (analysts mask+cite vs code-writers substitute fakes); read-only/write-scope claims softened to match enforcement (Bash retained -> discipline, not tool-lock); reimagine nested blockers/pendingRuleIds; status splits transform vs reimagine markers; portfolio enumeration basenames; plugin.json description updated. Co-Authored-By: Claude Fable 5 --- .../code-modernization/.claude-plugin/plugin.json | 2 +- plugins/code-modernization/README.md | 37 +++--- .../agents/version-delta-analyst.md | 82 ++++++++---- .../code-modernization/assets/topology-viewer.html | 4 + .../commands/modernize-assess.md | 2 +- .../code-modernization/commands/modernize-map.md | 6 + .../commands/modernize-reimagine.md | 8 +- .../commands/modernize-status.md | 3 +- .../commands/modernize-uplift.md | 141 +++++++++++++++------ .../code-modernization/workflows/extract-rules.js | 6 +- .../code-modernization/workflows/harden-scan.js | 6 +- .../code-modernization/workflows/uplift-deltas.js | 35 +++-- 12 files changed, 236 insertions(+), 96 deletions(-) (limited to 'plugins/code-modernization') diff --git a/plugins/code-modernization/.claude-plugin/plugin.json b/plugins/code-modernization/.claude-plugin/plugin.json index 9bc35ac2..431fe9b3 100644 --- a/plugins/code-modernization/.claude-plugin/plugin.json +++ b/plugins/code-modernization/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "code-modernization", - "description": "Modernize legacy codebases (COBOL, legacy Java/C++, monolith web apps) with a structured preflight / assess / map / extract-rules / brief / reimagine / transform / harden workflow, an interactive topology viewer, and specialist review agents", + "description": "Modernize legacy codebases (COBOL, legacy Java/C++/.NET, monolith web apps) with a structured preflight / assess / map / extract-rules / brief / (reimagine | transform | uplift) / harden / status workflow. Cross-stack rewrites, greenfield reimagining, and same-stack version uplifts (e.g. .NET Framework → .NET 8); an interactive topology viewer; specialist agents; and optional dynamic-workflow orchestration with adversarial verification.", "author": { "name": "Anthropic", "email": "support@anthropic.com" diff --git a/plugins/code-modernization/README.md b/plugins/code-modernization/README.md index a56aaa34..2a1e1803 100644 --- a/plugins/code-modernization/README.md +++ b/plugins/code-modernization/README.md @@ -12,7 +12,7 @@ preflight → assess → map → extract-rules → brief → reimagine | transfo The three build paths are different *methods*, chosen by the brief's recommended pattern: **`transform`** (cross-stack rewrite from extracted intent), **`reimagine`** (greenfield rebuild), and **`uplift`** (same-stack version bump — e.g. .NET Framework → .NET 8 — that preserves the code and fixes only the version deltas). -The discovery commands (`assess`, `map`, `extract-rules`) build artifacts under `analysis//`. The `brief` command synthesizes them into an approval gate. The build commands (`reimagine`, `transform`, `uplift`) write new code under `modernized/`. The `harden` command audits the legacy system and produces a reviewable remediation patch. Each step has a dedicated slash command, and specialist agents (legacy analyst, business rules extractor, architecture critic, security auditor, test engineer) are invoked from within those commands — or directly — to keep the work honest. +The discovery commands (`assess`, `map`, `extract-rules`) build artifacts under `analysis//`. The `brief` command synthesizes them into an approval gate. The build commands (`reimagine`, `transform`, `uplift`) write new code under `modernized/`. The `harden` command audits the legacy system and produces a reviewable remediation patch. Each step has a dedicated slash command, and specialist agents (such as legacy analyst, business rules extractor, architecture critic, security auditor, test engineer, version delta analyst, scaffolder) are invoked from within those commands — or directly — to keep the work honest. ## Expected layout @@ -27,13 +27,13 @@ mkdir -p legacy && ln -s /path/to/your/legacy/codebase legacy/billing The commands degrade gracefully, but each of these makes the output meaningfully better — run `/modernize-preflight ` to check all of them at once and get a readiness report: - **Analysis tools**: [`scc`](https://github.com/boyter/scc) (LOC + complexity + COCOMO) or [`cloc`](https://github.com/AlDanial/cloc); [`lizard`](https://github.com/terryyin/lizard) for portfolio mode. Without them, metrics fall back to `find`/`wc` and get coarser. -- **A working build toolchain** for the legacy stack (e.g. GnuCOBOL for COBOL) — required before `/modernize-transform` can prove behavioral equivalence, and verified by preflight with a real smoke compile against your code. +- **A working build toolchain** for the legacy stack (e.g. GnuCOBOL for COBOL) — it enables `/modernize-transform`'s *strongest* equivalence proof (live dual execution), and is verified by preflight with a real smoke compile. It is not strictly required: when the legacy stack can't build locally (common for CICS/IMS, or .NET Framework on Linux), equivalence falls back to recorded-trace / golden-master tests, and preflight reports Ready-with-gaps rather than blocking. - **The whole system in the tree**: deployment descriptors (JCL, CICS definitions, route configs), copybooks/includes, and DDL/schemas. Entry-point detection and data lineage in `/modernize-map` are guesswork without them. - **Production telemetry** (optional): an observability MCP server or batch job logs enable the runtime overlay in `/modernize-assess` and timing annotations on critical paths. ## Dynamic workflow orchestration -On Claude Code builds that ship the **Workflow tool**, four commands upgrade +On Claude Code builds that ship the **Workflow tool**, five commands upgrade from "spawn a few agents and merge by hand" to scripted orchestration (`workflows/*.js` in this plugin). The commands detect the tool and fall back to direct subagent fan-out on older builds — no configuration needed. @@ -50,10 +50,14 @@ These fan out more agents than the fallback path (tens, on a large estate) — the commands state the expected count before launching. Invoking the slash command is the opt-in. -A structural security property comes with the conversion: workflow extraction -agents return **schema-validated data**, and only the orchestrating session -writes artifacts. Analysis agents never touch disk. See the next two sections -for why that matters. +A useful property comes with the conversion: workflow extraction agents return +**schema-validated data**, and the orchestrating session is what writes the +artifacts — so analysis output flows through a typed boundary, not a +free-form file write. Note this is a *workflow-shape* property, not a tool-lock: +the analysis agents still carry `Bash` (they need `grep`/`scc`/`npm audit`), +so "read-only" is enforced by their system prompt + the data-only return value, +not by removing write tools. The real injection boundary is the fence and the +typed return — see the next two sections. ## Untrusted code & prompt injection @@ -64,22 +68,25 @@ steering what lands in `BUSINESS_RULES.md` or `SECURITY_FINDINGS.md` — which downstream commands treat as trusted. Defenses, in layers: every agent's system prompt pins file content as data-never-instructions and reports instruction-shaped text as a finding (`injectionFlags` in workflow results — -surfaced prominently when non-empty); analysis agents are read-only, with -artifact writes happening only in the orchestrating session; citation +surfaced prominently when non-empty); analysis agents are instructed read-only +and return typed data, with artifact writes happening in the orchestrating +session (prompt- and shape-enforced — they retain `Bash` for `grep`/`scc`, so +this is discipline, not a tool lock); citation referees refute any rule or finding supported by comments rather than executable code; agent-produced text is **fenced as untrusted data** when it flows into a downstream agent's prompt (referees re-derive claims from the cited code rather than trusting the finder's description — second-order injection); workflow inputs that become filesystem paths are validated against a strict name pattern; the one write-capable workflow agent -(`scaffolder`) runs with an explicit minimal tool list and a write scope of -exactly its own service directory; and `/modernize-brief` remains a human +(`scaffolder`) is told to write only within its own service directory (enforce +this with the workspace `settings.json` below — the instruction alone is not a +sandbox); and `/modernize-brief` remains a human approval gate before anything is executed against. Treat discovery artifacts from code you don't trust with the same skepticism as the code itself. ## Secret handling -Legacy systems routinely contain live credentials, and assessment artifacts get committed and shared. **Every agent in this plugin masks credential values** — findings, rule-card parameters, architecture notes, and test fixtures cite `file:line` with a masked preview (`AKIA****`), never the value. When credentials are found, a per-credential inventory (type, location, blast radius, rotation recommendation) is written to `analysis//SECRETS.local.md`, which the commands gitignore before writing; on non-git projects the quarantine file goes to `~/.modernize//` instead. `/modernize-harden` splits its remediation diff so credential-removal hunks (which necessarily contain the raw value) land in a gitignored `security_remediation.local.patch`, never the shareable patch. Pass `--show-secrets` to include raw values in the quarantine file (and only there). If you ran an earlier version of this plugin on a real system, check whether `analysis/` artifacts containing credentials were committed or shared, and rotate anything that was. +Legacy systems routinely contain live credentials, and assessment artifacts get committed and shared. **Every agent in this plugin keeps credential values out of shared artifacts.** The analysis agents mask-and-cite — `file:line` with a masked preview (`AKIA****`), never the value — in findings, rule-card parameters, and architecture notes. The code-writing agents (`test-engineer`, `scaffolder`) never carry a legacy credential into a fixture at all: they substitute fake same-shape values and env-var placeholders. When credentials are found, a per-credential inventory (type, location, blast radius, rotation recommendation) is written to `analysis//SECRETS.local.md`, which the commands gitignore before writing; on non-git projects the quarantine file goes to `~/.modernize//` instead. `/modernize-harden` splits its remediation diff so credential-removal hunks (which necessarily contain the raw value) land in a gitignored `security_remediation.local.patch`, never the shareable patch. Pass `--show-secrets` to include raw values in the quarantine file (and only there). If you ran an earlier version of this plugin on a real system, check whether `analysis/` artifacts containing credentials were committed or shared, and rotate anything that was. ## Commands @@ -103,10 +110,10 @@ Build a dependency and topology map of the **legacy** system: program/module cal Mine the business rules embedded in the legacy code — calculations, validations, eligibility, state transitions, policies — into Given/When/Then "Rule Cards" with `file:line` citations and confidence ratings. Spawns three `business-rules-extractor` agents in parallel (calculations, validations, lifecycle). Produces `analysis//BUSINESS_RULES.md` and `analysis//DATA_OBJECTS.md`. ### `/modernize-brief [target-stack]` -Synthesize the discovery artifacts into a phased **Modernization Brief** — the single document a steering committee approves and engineering executes: target architecture, strangler-fig phase plan with entry/exit criteria, persona-based business walkthroughs (the section non-technical approvers actually read), behavior contract, validation strategy, open questions, and an approval block. Reads `ASSESSMENT.md`, `TOPOLOGY.html`, and `BUSINESS_RULES.md` and **stops if any are missing** — run the discovery commands first. Produces `analysis//MODERNIZATION_BRIEF.md` and enters plan mode as a human-in-the-loop gate. +Synthesize the discovery artifacts into a phased **Modernization Brief** — the single document a steering committee approves and engineering executes: target architecture, strangler-fig phase plan with entry/exit criteria, persona-based business walkthroughs (the section non-technical approvers actually read), behavior contract, validation strategy, open questions, and an approval block. Reads `ASSESSMENT.md`, `topology.json` (not the `TOPOLOGY.html` viewer — the brief parses the JSON, whose `flows` drive the persona walkthroughs), and `BUSINESS_RULES.md`, and **stops if any are missing** — run the discovery commands first. Produces `analysis//MODERNIZATION_BRIEF.md` and enters plan mode as a human-in-the-loop gate. ### `/modernize-reimagine ` -Greenfield rebuild from extracted intent rather than a structural port. Mines a spec (`analysis//AI_NATIVE_SPEC.md`), designs a target architecture and has it adversarially reviewed (`analysis//REIMAGINED_ARCHITECTURE.md`), then **scaffolds services with executable acceptance tests** under `modernized/-reimagined/` and writes a `CLAUDE.md` knowledge handoff for the new system. Two human-in-the-loop checkpoints. Spawns `business-rules-extractor`, `legacy-analyst` (×2), `architecture-critic`, and general-purpose scaffolding agents. +Greenfield rebuild from extracted intent rather than a structural port. Mines a spec (`analysis//AI_NATIVE_SPEC.md`), designs a target architecture and has it adversarially reviewed (`analysis//REIMAGINED_ARCHITECTURE.md`), then **scaffolds services with executable acceptance tests** under `modernized/-reimagined/` and writes a `CLAUDE.md` knowledge handoff for the new system. Two human-in-the-loop checkpoints. Spawns `business-rules-extractor`, `legacy-analyst` (×2), `architecture-critic`, and the `scaffolder` agent (Phase E). ### `/modernize-transform ` Surgical, single-module strangler-fig rewrite. Plans first (HITL gate), then writes characterization tests via `test-engineer`, then an idiomatic target implementation under `modernized///`, proves equivalence by running the tests, and produces `TRANSFORMATION_NOTES.md` mapping legacy → modern with deliberate deviations called out. Reviewed by `architecture-critic`. @@ -128,7 +135,7 @@ Security hardening pass on the **legacy** system: OWASP/CWE scan, dependency CVE - **`security-auditor`** — Reviews code for auth, input validation, secret handling, and dependency CVEs. Tuned for the kinds of issues that appear when translating security primitives across stacks (e.g., session handling from servlet to stateless JWT). Used by `assess` and `harden`. - **`test-engineer`** — Writes characterization, contract, and equivalence tests that pin legacy behavior so transformation can be proven correct. Flags tests that exercise code paths without asserting outcomes. Used by `transform` and `uplift`. - **`version-delta-analyst`** — For **same-stack uplifts**: finds the breaking/behavioral changes between two versions of one stack that actually bite a given codebase, and drives the ecosystem migration tool. Produces a delta catalog (API-removed / silent-behavioral / project-system / dependency), preserving the code rather than redesigning it. Used by `uplift`. -- **`scaffolder`** — Builds one service of a reimagined system from the approved architecture and spec: skeleton, domain model, API stubs, executable acceptance tests. Write scope is exactly its own `modernized/...//` directory; treats the spec's imperative-sounding content as data, since the spec derives from untrusted legacy code. Used by `reimagine` (Phase E). +- **`scaffolder`** — Builds one service of a reimagined system from the approved architecture and spec: skeleton, domain model, API stubs, executable acceptance tests. Instructed to write only within its own `modernized/...//` directory (enforce with the workspace `settings.json` below); treats the spec's imperative-sounding content as data, since the spec derives from untrusted legacy code. Used by `reimagine` (Phase E). ## Installation diff --git a/plugins/code-modernization/agents/version-delta-analyst.md b/plugins/code-modernization/agents/version-delta-analyst.md index 91aa5f33..0a2fde4f 100644 --- a/plugins/code-modernization/agents/version-delta-analyst.md +++ b/plugins/code-modernization/agents/version-delta-analyst.md @@ -1,6 +1,6 @@ --- name: version-delta-analyst -description: Identifies the breaking changes between two versions of the SAME stack (e.g. .NET Framework 4.8 → .NET 8, Spring Boot 2 → 3, Python 2 → 3) that actually bite a given codebase, and drives the ecosystem's migration tooling. Use for same-stack uplifts, where code is preserved and tweaked — not rewritten from intent. +description: Identifies the breaking changes between two versions of the SAME stack (e.g. .NET Framework 4.8 → .NET 8, Java 8 → 17/21, Spring Boot 2 → 3) that actually bite a given codebase, and drives the ecosystem's migration tooling. Use for same-stack uplifts, where code is preserved and tweaked — not rewritten from intent. (Note: some "same-stack" bumps are really rewrites — Python 2 → 3 with pervasive str/bytes, AngularJS → Angular — where minimal-diff fails; flag those for /modernize-transform.) tools: Read, Glob, Grep, Bash --- @@ -26,38 +26,70 @@ delta for this migration; report only what bites *here*, with `file:line`. ## Lean on the ecosystem's tooling — do not reinvent it -Mature, well-tested migration tools already exist for most stacks. **Detect and -run the right one, then own the residue** (the judgment calls and silent -behavioral changes it can't make). Examples: - -- **.NET**: `dotnet tool` → `upgrade-assistant`; the .NET **Portability Analyzer** (`apiport`); `try-convert` (project-system → SDK-style). -- **Java / Spring**: **OpenRewrite** recipes (Spring Boot 2→3, Jakarta EE, JUnit 4→5); `jdeprscan`; `jdeps`. -- **Python**: `pyupgrade`, `2to3`, `python-modernize`. -- **JS/TS / Angular**: `ng update`, framework codemods, `npx @angular/cli`. -- **Node**: package-specific codemods, `npx` codemod runners. - -Run the tool if it's installed, capture its raw output, and fold its findings -into the catalog. Where no tool exists or the tool punts, that residue is -exactly your value-add. **Never present a hand-built catalog as complete if a -standard tool for this stack exists and was not run** — say it wasn't available -and what coverage was lost. +Mature, well-tested migration tools already exist for most stacks. **Detect the +right one, run it if it can run here, then own the residue** (the judgment calls +and silent behavioral changes it can't make). + +Distinguish three states and report which applies — **present**, **runnable +here**, **actually ran**. Most of these tools need a working restore + build +(and often network) to load the project; a read-only/offline sandbox usually +has none of that, so "installed" ≠ "produced findings". **Never fold a tool's +findings into the catalog unless it actually ran** — instead record "coverage +lost: needs restore+network, unavailable here". + +- **.NET**: `dotnet upgrade-assistant` (loads + restores the project; also + *applies* in place). `try-convert` (project-system → SDK-style). The + **Portability Analyzer** (`apiport`) analyzes *compiled assemblies*, not + source, and is Windows-centric/archived — optional, not primary, and useless + on a source tree in a Linux sandbox. +- **Java / Spring**: **OpenRewrite** — `mvn rewrite:dryRun` is genuinely + headless and emits a patch (the most reliable of these; lean on it). + `jdeprscan`, `jdeps` for the analysis side. +- **Python**: `pyupgrade` (source-level, runnable). `2to3` is deprecated and + removed in Python 3.13; `python-modernize` is abandoned — do not rely on them. +- **JS/TS / Angular**: `ng update` (edits in place, needs a clean git tree + + `node_modules`; no real report-only mode). + +Where no tool exists, the tool punts, or it can't run here, that residue is +exactly your value-add — but say so explicitly rather than implying full +coverage. ## Delta categories (cover each) -- **API removed / changed** — types, methods, signatures gone or altered in the - target (e.g. .NET `AppDomain`, Remoting, WCF server, `System.Web`/WebForms, - `BinaryFormatter`; Jakarta `javax.*` → `jakarta.*`). +The catalog uses four top-level buckets, but the highest-blast-radius landmines +hide *inside* them — name them explicitly when you find them, don't let them +disappear into a one-liner: + +- **API removed / changed** — types, methods, signatures gone or altered (e.g. + .NET `AppDomain`, Remoting, WCF server, `System.Web`/WebForms, + `BinaryFormatter`; Jakarta `javax.*` → `jakarta.*`, removed JDK APIs). **Also + in this bucket: reflection & strong-encapsulation breakage** — Java 17 JPMS + strong encapsulation (`--illegal-access` gone → `InaccessibleObjectException` + at runtime for `setAccessible`/deep reflection; bites old Jackson/Hibernate/ + Spring); .NET trimming/AOT/single-file breaking `Type.GetType(string)`, DI, + and serializers. These fail *at runtime on the code path*, so flag them + test-before-touch. - **Silent behavioral** — compiles and runs, *different result*. The dangerous - class, because nothing fails loudly: default culture/encoding, TLS defaults, - serialization formats, `DateTime`/timezone handling, floating-point, async - context, collection ordering. Flag every one of these as **test-before-touch**. + class, nothing fails loudly. Call out **globalization/locale** specifically: + .NET 5+ switched to **ICU** (vs NLS), silently changing `string.Compare`, + casing, sort order, and `DateTime` parsing — the canonical Framework→.NET + trap. Plus: default encoding, TLS defaults, serialization formats, + `DateTime`/timezone, floating-point, async context, collection ordering. + Flag every one as **test-before-touch**. - **Project-system / build** — `packages.config` → `PackageReference`, - non-SDK → SDK-style `.csproj`, `app.config`/`web.config` → - `appsettings.json`, target-framework monikers, build props. + non-SDK → SDK-style `.csproj`, target-framework monikers, build props. **Also: + the hosting / runtime-config model** — `Global.asax`/IIS → `Program.cs`/ + Kestrel; `web.config`/`ConfigurationManager.AppSettings` → `appsettings.json`/ + `IConfiguration` (not just a file-format move — it's an access-pattern API + delta touching every config read). And **analyzer/compiler tightening** that + produces *new build failures*: nullable reference types, warnings-as-errors, + implicit usings, blocked internal JDK APIs under `--release`. - **Dependency** — packages with no target-version support, packages needing a major bump that carries its *own* breaking changes (e.g. EF6 → EF Core), or packages with no equivalent on the target. **Dependency deltas are where - same-stack migrations most often stall — never under-report them.** + same-stack migrations most often stall — never under-report them**, and note + that a mid-graph major bump (EF6→EF Core, `javax`→`jakarta`) forces a + coordinated cut across all consumers, not a leaf-by-leaf fix. ## Delta Card format diff --git a/plugins/code-modernization/assets/topology-viewer.html b/plugins/code-modernization/assets/topology-viewer.html index 70575d5b..e2d2253a 100644 --- a/plugins/code-modernization/assets/topology-viewer.html +++ b/plugins/code-modernization/assets/topology-viewer.html @@ -3,6 +3,10 @@ + + System topology