diff options
| author | Morgan Lunt <morganl@anthropic.com> | 2026-06-08 15:36:03 -0700 |
|---|---|---|
| committer | Morgan Lunt <morganl@anthropic.com> | 2026-06-09 08:48:04 -0700 |
| commit | bec8d7c93ae523e1cb3204eb061c801eaff017e5 (patch) | |
| tree | 30237fd1d035f173e18c8f513a4cb5f6b9af75fc /plugins/code-modernization/README.md | |
| parent | 874596818685794ad06efcf5db115acaf938da68 (diff) | |
code-modernization: vendor d3, viewer robustness, status command, pipeline fixes
Viewer (assets/topology-viewer.html):
- inline a minified d3 subset (hierarchy/pack, zoom, selection,
interpolateZoom, ease; ISC license) instead of loading from a CDN —
the page is now fully self-contained and works on air-gapped networks
- handle duplicate node ids (unique-suffix; edges bind to the first
occurrence) and store parent references directly, fixing
level-of-detail and selection corruption with messy generated data
- share one reveal rule between drawing, edge culling, and hit-testing
so edges no longer draw into collapsed containers
- pre-bucket edges by kind and keep a per-node adjacency map; the
hover/selection pass no longer scans every edge each frame
- cancel in-flight fly-to animations when a new one starts; clamp
fly-to zoom to the zoom extent; derive max zoom from the smallest
leaf so deep estates stay reachable
- render dead-end candidates (new deadEnds field) with a dashed
outline and a sidebar badge
- clicking a node during a flow walkthrough exits the walkthrough;
search results clear on selection and Escape; surrogate-safe label
truncation; clearer stats line; explicit empty-topology message
Commands:
- new /modernize-status: read-only progress report — artifact inventory
with timestamps, staleness flags, secrets-hygiene checks, next step
- map: deadEnds in the topology schema; datastore names must be logical
identifiers with credentials stripped from URLs/DSNs
- brief: read topology.json + .mmd files (not the interactive HTML);
staleness check against inputs; effort unit aligned to person-months
- transform: secret-safe characterization-test prompt; diff -y fallback
when delta is missing; credential-safe diff selection
- reimagine: target vision is everything after the first argument (was
silently truncated to one word); masking rules in spec/scaffold/
handoff prompts
- brief/transform/reimagine: human-approval gates phrased as explicit
stop-and-wait instead of 'enter plan mode'
- preflight: delta in the tool table; brief added to the verdict list
- README: preflight/status in the workflow; legacy/ deny list also
covers Write; plugin + marketplace descriptions updated
Diffstat (limited to 'plugins/code-modernization/README.md')
| -rw-r--r-- | plugins/code-modernization/README.md | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/plugins/code-modernization/README.md b/plugins/code-modernization/README.md index ce505250..2aa3f047 100644 --- a/plugins/code-modernization/README.md +++ b/plugins/code-modernization/README.md @@ -54,6 +54,9 @@ Greenfield rebuild from extracted intent rather than a structural port. Mines a ### `/modernize-transform <system-dir> <module> <target-stack>` Surgical, single-module strangler-fig rewrite. Plans first (HITL gate), then writes characterization tests via `test-engineer`, then an idiomatic target implementation under `modernized/<system>/<module>/`, proves equivalence by running the tests, and produces `TRANSFORMATION_NOTES.md` mapping legacy → modern with deliberate deviations called out. Reviewed by `architecture-critic`. +### `/modernize-status <system-dir>` +Read-only progress report: artifact inventory with timestamps per workflow stage, staleness flags (e.g. a brief older than the assessment it was built from), secrets-hygiene checks (quarantine file gitignored and never committed), and the single most useful next command. Run it anytime you come back to a modernization after a break. + ### `/modernize-harden <system-dir>` Security hardening pass on the **legacy** system: OWASP/CWE scan, dependency CVEs, secrets, injection. Spawns `security-auditor`. Produces `analysis/<system>/SECURITY_FINDINGS.md` ranked Critical / High / Medium / Low and a reviewed `analysis/<system>/security_remediation.patch` with minimal fixes for the Critical/High findings. The patch is reviewed by a second `security-auditor` pass before you see it. **Never edits `legacy/`** — you review and apply the patch yourself when ready, then re-run to verify. Useful as a pre-modernization step when the legacy system will keep running in production during the migration. @@ -89,17 +92,21 @@ This plugin ships commands and agents, but modernization projects benefit from a "Edit(modernized/**)" ], "deny": [ - "Edit(legacy/**)" + "Edit(legacy/**)", + "Write(legacy/**)" ] } } ``` -Adjust `legacy/` and `modernized/` to match your actual layout. The key invariants: `Edit` under `legacy/` is denied, and writes are scoped to `analysis/` (for documents) and `modernized/` (for the new code). Every command in this plugin respects this — `/modernize-harden` writes a patch to `analysis/` rather than editing `legacy/` in place. +Adjust `legacy/` and `modernized/` to match your actual layout. The key invariants: `Edit`/`Write` under `legacy/` are denied, and writes are scoped to `analysis/` (for documents) and `modernized/` (for the new code). Note this guards the file tools — shell commands that mutate files (`sed -i`, `git apply`) still go through the normal Bash permission prompt, so review those prompts with the same invariant in mind. Every command in this plugin respects this — `/modernize-harden` writes a patch to `analysis/` rather than editing `legacy/` in place. ## Typical Workflow ```bash +# 0. Check the environment is ready (tools, toolchain, source completeness) +/modernize-preflight billing + # 1. Inventory the legacy system (or sweep a portfolio of them) /modernize-assess billing @@ -120,6 +127,9 @@ Adjust `legacy/` and `modernized/` to match your actual layout. The key invarian # 6. Security-harden the legacy system that's still in production /modernize-harden billing + +# Anytime: where am I, what's stale, what's next +/modernize-status billing ``` ## License |
