summaryrefslogtreecommitdiff
path: root/plugins/code-modernization/assets
diff options
context:
space:
mode:
authorMorgan Lunt <morganl@anthropic.com>2026-09-15 15:15:41 -0700
committerMorgan Lunt <morganl@anthropic.com>2026-09-15 15:15:41 -0700
commit27ccae218634dbe03a234f8902982d12bf6ba52a (patch)
tree1e9f627ce0798341868726447fbef7d46da8f20b /plugins/code-modernization/assets
parentb5439c41ae9864833eb73d5efd088af8e3be13fe (diff)
code-modernization: named arguments and namespaced command namesmorganl/code-modernization-named-args
Positional placeholders are zero-based ($0 is the first argument), but every command used $1 for the first one, so arguments arrived shifted: modernize-preflight carddemo java-spring analyzed legacy/java-spring. Each command now declares its arguments in frontmatter (for example `arguments: system module target_stack`) and uses the names. A missing optional argument now expands to an empty string instead of a literal placeholder. Plugin commands resolve only by their namespaced name, so the README, command cross-references, agents, workflow descriptions and the topology viewer now say /code-modernization:modernize-*. The extract-rules workflow is renamed modernize-extract-rules-mine. It shared the command's name, so invoking the command could start the workflow directly and skip the command's instructions. Commands launch workflows by script path, so nothing else changes.
Diffstat (limited to 'plugins/code-modernization/assets')
-rw-r--r--plugins/code-modernization/assets/topology-viewer.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/code-modernization/assets/topology-viewer.html b/plugins/code-modernization/assets/topology-viewer.html
index e2d2253a..24e2e6dc 100644
--- a/plugins/code-modernization/assets/topology-viewer.html
+++ b/plugins/code-modernization/assets/topology-viewer.html
@@ -93,7 +93,7 @@
<aside id="sidebar" class="panel"></aside>
<div id="hint">scroll to zoom · drag to pan · click a node · double-click to zoom in · Esc to reset</div>
<div id="err" class="panel"><p>No topology data found in this file.<br>
-Re-run <code>/modernize-map</code> to regenerate it.</p></div>
+Re-run <code>/code-modernization:modernize-map</code> to regenerate it.</p></div>
<script>
/* Inlined d3 v7 subset (d3-hierarchy, d3-zoom, d3-selection, d3-interpolate, d3-ease) - ISC License, Copyright Mike Bostock. Bundled and minified; exposed as window.d3. */
@@ -110,12 +110,12 @@ function fail(html) {
// the file is fully self-contained and works offline / air-gapped.
const d3 = window.d3;
-// Injected by /modernize-map: the contents of topology.json replace the
+// Injected by /code-modernization:modernize-map: the contents of topology.json replace the
// null after the marker comment. Schema documented in the command file.
const DATA = /*__TOPOLOGY_DATA__*/ null;
if (!DATA || !DATA.root) {
- fail("No topology data found in this file.<br>Re-run <code>/modernize-map</code> to regenerate it.");
+ fail("No topology data found in this file.<br>Re-run <code>/code-modernization:modernize-map</code> to regenerate it.");
throw new Error("no data");
}