summaryrefslogtreecommitdiff
path: root/plugins/code-modernization/commands/modernize-map.md
diff options
context:
space:
mode:
authorMorgan Lunt <morganl@anthropic.com>2026-06-08 15:36:03 -0700
committerMorgan Lunt <morganl@anthropic.com>2026-06-09 08:48:04 -0700
commitbec8d7c93ae523e1cb3204eb061c801eaff017e5 (patch)
tree30237fd1d035f173e18c8f513a4cb5f6b9af75fc /plugins/code-modernization/commands/modernize-map.md
parent874596818685794ad06efcf5db115acaf938da68 (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/commands/modernize-map.md')
-rw-r--r--plugins/code-modernization/commands/modernize-map.md24
1 files changed, 18 insertions, 6 deletions
diff --git a/plugins/code-modernization/commands/modernize-map.md b/plugins/code-modernization/commands/modernize-map.md
index 21eb58e2..53668ca6 100644
--- a/plugins/code-modernization/commands/modernize-map.md
+++ b/plugins/code-modernization/commands/modernize-map.md
@@ -78,6 +78,7 @@ summary (cap at ~200 lines for very large estates).
{ "source": "<id>", "target": "<id>", "kind": "call" }
],
"entryPoints": ["<id>", "..."],
+ "deadEnds": ["<id>", "..."],
"observations": ["<architect observation>", "..."],
"flows": [
{ "name": "<business flow>", "persona": "<who experiences it>",
@@ -94,9 +95,20 @@ summary (cap at ~200 lines for very large estates).
`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.
+- `deadEnds`: the dead-end candidates from the extraction, rendered with
+ a dashed outline in the viewer. Apply the suppression rules above —
+ anything that could be the target of an unresolved dynamic call does
+ NOT belong here; record that uncertainty in `observations` instead.
+- **Datastore ids and names must be logical identifiers** — DD name,
+ dataset name, table/schema name, at most host:port. If the resolved
+ config value is a URL or DSN, strip userinfo and credential query
+ params before it goes anywhere in topology.json: the file gets
+ committed and the viewer displays names verbatim. Never copy raw
+ config values into `observations`.
- `observations`: 3–7 architect observations — tight coupling clusters,
single points of failure, service-extraction candidates, data stores
- with too many writers.
+ with too many writers, dispatch targets the extraction could not
+ resolve.
- `flows` is the **persona walkthrough** section — see below.
## Persona flows
@@ -140,11 +152,11 @@ print(f"wrote {out_dir}/TOPOLOGY.html")
EOF
```
-The viewer loads d3 (version-pinned) from a CDN, so opening it needs
-one-time network access; the rest is self-contained and the page shows an
-explicit error if the CDN is unreachable. If the `python3` invocation
-fails to find the template, `${CLAUDE_PLUGIN_ROOT}` was not substituted —
-report that rather than hand-writing a viewer.
+The viewer is fully self-contained (the d3 subset it needs is inlined in
+the template) — it works offline and on air-gapped networks. If the
+`python3` invocation fails to find the template,
+`${CLAUDE_PLUGIN_ROOT}` was not substituted — report that rather than
+hand-writing a viewer.
Mermaid stays for **small, exportable** diagrams. Generate standalone
`.mmd` files for reuse in docs and PRs — but keep each under ~40 edges;