summaryrefslogtreecommitdiff
path: root/plugins/code-modernization/commands/modernize-map.md
diff options
context:
space:
mode:
authorMorgan Lunt <morganl@anthropic.com>2026-05-11 16:17:59 -0700
committerMorgan Lunt <morganl@anthropic.com>2026-05-11 16:17:59 -0700
commit718818146e93eeef3a94a3dac9ffa087558115cc (patch)
treed3b225c1334bf3a91c6a609c8eb6258b243a150a /plugins/code-modernization/commands/modernize-map.md
parentbdca23e8e46f8832d0030c05804ae207786ae37f (diff)
Fix code-modernization plugin: align README with commands, fix pipeline gaps
- modernize-brief: read TOPOLOGY.html (what modernize-map actually produces) instead of nonexistent TOPOLOGY.md, and tell the user which command produces each missing input. - README: rewrite the Commands section to match actual command behavior — correct output filenames, ordering (brief is the synthesis/approval gate after discovery, not the first step), agent attributions, and required args. Add a workspace-layout note and an explicit callout that modernize-harden edits legacy/, which conflicts with the recommended deny rule. Reconcile the Overview and Typical Workflow sequences. - modernize-assess: generalize the production-runtime overlay step so it no longer assumes a specific MCP server/tool; mark it optional. Fix app/jcl/ -> legacy/$1/jcl/ for layout consistency. - modernize-map: make TOPOLOGY.html self-contained (load Mermaid from a CDN) so it renders in any browser; drop assumptions about an external artifact renderer. Generalize the telemetry annotation note. - business-rules-extractor agent: fix command cross-reference to the actual command name. - plugin.json: include the brief step in the workflow description.
Diffstat (limited to 'plugins/code-modernization/commands/modernize-map.md')
-rw-r--r--plugins/code-modernization/commands/modernize-map.md26
1 files changed, 17 insertions, 9 deletions
diff --git a/plugins/code-modernization/commands/modernize-map.md b/plugins/code-modernization/commands/modernize-map.md
index bd149cb5..6fb55b75 100644
--- a/plugins/code-modernization/commands/modernize-map.md
+++ b/plugins/code-modernization/commands/modernize-map.md
@@ -28,14 +28,22 @@ re-run and audited. Run it. Show the raw output.
## Render
From the extracted data, generate **three Mermaid diagrams** and write them
-to `analysis/$1/TOPOLOGY.html` so the artifact pane renders them live.
+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 `<h2>`/accents, `system-ui` font, all CSS **inline** (no
-external stylesheets). Each diagram goes in a
-`<pre class="mermaid">...</pre>` block — the artifact server loads
-mermaid.js and renders client-side. Do **not** wrap diagrams in
-markdown ` ``` ` fences inside the HTML.
+external stylesheets). Load Mermaid from a CDN in `<head>`:
+
+```html
+<script type="module">
+ import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs';
+ mermaid.initialize({ startOnLoad: true, theme: 'dark' });
+</script>
+```
+
+Each diagram goes in a `<pre class="mermaid">...</pre>` block. Do **not**
+wrap diagrams in markdown ` ``` ` fences inside the HTML.
1. **`graph TD` — Module call graph.** Cluster by domain (use `subgraph`).
Highlight entry points in a distinct style. Cap at ~40 nodes — if larger,
@@ -46,9 +54,9 @@ markdown ` ``` ` fences inside the HTML.
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 the `observability`
- MCP server is connected, annotate each batch step with its p50/p99
- wall-clock from `get_batch_runtimes`.
+ 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.
Also export the three diagrams as standalone `.mmd` files for re-use:
`analysis/$1/call-graph.mmd`, `analysis/$1/data-lineage.mmd`,
@@ -63,4 +71,4 @@ touched by too many writers.
## Present
-Tell the user to open `analysis/$1/TOPOLOGY.html` in the artifact pane.
+Tell the user to open `analysis/$1/TOPOLOGY.html` in a browser.