diff options
Diffstat (limited to 'plugins/code-modernization/commands')
8 files changed, 16 insertions, 14 deletions
diff --git a/plugins/code-modernization/commands/modernize-assess.md b/plugins/code-modernization/commands/modernize-assess.md index c9fc9b07..7f280347 100644 --- a/plugins/code-modernization/commands/modernize-assess.md +++ b/plugins/code-modernization/commands/modernize-assess.md @@ -9,7 +9,7 @@ directory that follows. Otherwise run **Single-system mode** on `$system`, the first token. Flags go after it (`<system> --show-secrets`): a flag in first place would be read as the system name. -The code is `legacy/$system`, often a symlink to where it really lives: say where it points (`readlink legacy/$system`) in one line before you start. +The code is `legacy/$system`, often a symlink to where it really lives: say where it points (`readlink legacy/$system`) in one line before you start. Run every subagent in the foreground and wait for its result: never end your turn while one is still running. --- diff --git a/plugins/code-modernization/commands/modernize-brief.md b/plugins/code-modernization/commands/modernize-brief.md index f74204dc..5e567540 100644 --- a/plugins/code-modernization/commands/modernize-brief.md +++ b/plugins/code-modernization/commands/modernize-brief.md @@ -23,8 +23,9 @@ in `analysis/$system/` first. If any is missing, say so and stop: they come from An uplift's phase order is decided by its version deltas, above all by whether the existing tests can even run on the target runtime; phasing without the catalog is planning blind. If it is missing, produce it first (`/code-modernization:modernize-uplift $system <source> $target_stack` - through its delta-catalog step, or the **version-delta-analyst** agent), then return. Do not - guess at deltas. + through its delta-catalog step, or the **version-delta-analyst** agent) and **wait for its result**: + never end your turn while an agent is still running, and never write the brief before the catalog + exists. Do not guess at deltas. **Staleness.** If an input is newer than an existing `MODERNIZATION_BRIEF.md`, regenerating is justified. If the brief is newer than every input and the user re-ran this anyway, ask what @@ -94,8 +95,8 @@ persona, what happens in business language, which legacy modules implement it, a replaces each. This is the section non-technical approvers read. With no flows, derive 2–3 from the entry points and mark them as needing SME confirmation. -**5. Behavior Contract.** The **P0 rules** from `BUSINESS_RULES.md` (money, regulatory, data -integrity) that MUST be proven equivalent before any phase ships: they become the regression suite. +**5. Behavior Contract.** The **P0 rules** from `BUSINESS_RULES.md` (the ones the system's core purpose +depends on, or that are costly if wrong) that MUST be proven equivalent before any phase ships: they become the regression suite. Flag any P0 rule below High confidence as a blocker needing SME confirmation before its phase starts. **6. Validation Strategy.** Which combination applies, per phase: characterization tests, contract diff --git a/plugins/code-modernization/commands/modernize-extract-rules.md b/plugins/code-modernization/commands/modernize-extract-rules.md index 89e27188..7c405d57 100644 --- a/plugins/code-modernization/commands/modernize-extract-rules.md +++ b/plugins/code-modernization/commands/modernize-extract-rules.md @@ -10,7 +10,7 @@ engineers about to retire. If a module pattern was given (`$module_pattern`), fo there; otherwise cover the whole system. Prioritize calculation, validation, eligibility and state-transition logic over plumbing. -The code is `legacy/$system`, often a symlink to where it really lives: say where it points (`readlink legacy/$system`) in one line before you start. +The code is `legacy/$system`, often a symlink to where it really lives: say where it points (`readlink legacy/$system`) in one line before you start. Run every subagent in the foreground and wait for its result: never end your turn while one is still running. ## Method A — Workflow (preferred when the Workflow tool is available) @@ -121,7 +121,7 @@ them, location) in this format: ### RULE-NNN: <plain-English name> **Category:** Calculation | Validation | Lifecycle | Policy **Priority:** P0 | P1 | P2 -**Source:** `path/to/file.ext:line-line` (path relative to legacy/$system) +**Source:** `path/to/file.ext:line-line` (ONE range, path relative to legacy/$system) **Plain English:** One sentence a business analyst would recognize. **Specification:** Given <precondition> @@ -134,8 +134,9 @@ them, location) in this format: ``` Headings are exactly `### RULE-NNN: <name>`, numbered in sequence: later commands find rules by -that pattern. **P0** if the rule moves money, enforces a regulatory requirement or guards data -integrity (P0 below High confidence needs an SME); **P2** for display and convenience; else +that pattern. **P0** if the system's core purpose depends on the rule or a wrong result is costly or irreversible +(it moves money, enforces a legal or regulatory requirement, guards data integrity, security or safety, +or is the central calculation or decision the system exists to perform; P0 below High confidence needs an SME); **P2** for display and convenience; else **P1**. The brief's behavior contract is built from the P0 rules. Start the file with a summary table (ID, name, category, priority, source, confidence) and end it with a **Rules requiring SME confirmation** section listing each Medium and Low rule with its question. diff --git a/plugins/code-modernization/commands/modernize-harden.md b/plugins/code-modernization/commands/modernize-harden.md index b9e3c17f..bab2716c 100644 --- a/plugins/code-modernization/commands/modernize-harden.md +++ b/plugins/code-modernization/commands/modernize-harden.md @@ -7,7 +7,7 @@ arguments: system Run a **security hardening pass** on the legacy system: find vulnerabilities, rank them, and produce a reviewable patch for the critical ones. `$system` is the first argument; flags go after it (`<system> --show-secrets`), since a flag in first place would be read as the system name. -The code is `legacy/$system`, often a symlink to where it really lives: say where it points (`readlink legacy/$system`) in one line before you start. +The code is `legacy/$system`, often a symlink to where it really lives: say where it points (`readlink legacy/$system`) in one line before you start. Run every subagent in the foreground and wait for its result: never end your turn while one is still running. This command never edits `legacy/$system`: it writes findings and a proposed patch to `analysis/$system/`, and the user reviews and applies (or not). diff --git a/plugins/code-modernization/commands/modernize-map.md b/plugins/code-modernization/commands/modernize-map.md index ac546e90..2ea7ec95 100644 --- a/plugins/code-modernization/commands/modernize-map.md +++ b/plugins/code-modernization/commands/modernize-map.md @@ -8,7 +8,7 @@ Build a **dependency and topology map** of the system and render it as an interactive page. The assessment found the domains; this goes one level down: how do the *pieces* connect? It is the map an engineer needs before touching anything. -The code is `legacy/$system`, often a symlink to where it really lives: say where it points (`readlink legacy/$system`) in one line before you start. +The code is `legacy/$system`, often a symlink to where it really lives: say where it points (`readlink legacy/$system`) in one line before you start. Run every subagent in the foreground and wait for its result: never end your turn while one is still running. ## Start from what already exists diff --git a/plugins/code-modernization/commands/modernize-reimagine.md b/plugins/code-modernization/commands/modernize-reimagine.md index acd91f22..65f324f0 100644 --- a/plugins/code-modernization/commands/modernize-reimagine.md +++ b/plugins/code-modernization/commands/modernize-reimagine.md @@ -6,7 +6,7 @@ arguments: system The first token of `$ARGUMENTS` is the system name (`$system`); **everything after it is the target vision**, usually several words, so do not truncate it. Below, `<vision>` means that whole remainder. -The code is `legacy/$system`, often a symlink to where it really lives: say where it points (`readlink legacy/$system`) in one line before you start. +The code is `legacy/$system`, often a symlink to where it really lives: say where it points (`readlink legacy/$system`) in one line before you start. Run every subagent in the foreground and wait for its result: never end your turn while one is still running. **Reimagine** the system as: <vision>. This is not a port but a rebuild from extracted intent: the legacy system is the *specification source*, not the structural template. The command orchestrates a team of diff --git a/plugins/code-modernization/commands/modernize-transform.md b/plugins/code-modernization/commands/modernize-transform.md index c9ef517c..2ef8b946 100644 --- a/plugins/code-modernization/commands/modernize-transform.md +++ b/plugins/code-modernization/commands/modernize-transform.md @@ -8,7 +8,7 @@ Transform module **`$module`** of `$system` into **$target_stack**, with proof o equivalence. This is one vertical slice of the strangler fig; output goes to `modernized/$system/$module/`. -The code is `legacy/$system`, often a symlink to where it really lives: say where it points (`readlink legacy/$system`) in one line before you start. **If `$module` or `$target_stack` is empty**, read +The code is `legacy/$system`, often a symlink to where it really lives: say where it points (`readlink legacy/$system`) in one line before you start. Run every subagent in the foreground and wait for its result: never end your turn while one is still running. **If `$module` or `$target_stack` is empty**, read `analysis/$system/MODERNIZATION_BRIEF.md`: take the target stack it names, and the first module of the earliest phase whose `Command:` is `transform` that has no `modernized/$system/<module>/TRANSFORMATION_NOTES.md` yet. Say which you picked. diff --git a/plugins/code-modernization/commands/modernize-uplift.md b/plugins/code-modernization/commands/modernize-uplift.md index 57fe2cc8..2e976a4a 100644 --- a/plugins/code-modernization/commands/modernize-uplift.md +++ b/plugins/code-modernization/commands/modernize-uplift.md @@ -5,7 +5,7 @@ arguments: system source_version target_version project_pattern --- Uplift `$system` from **legacy/$system_version** to **$target_version**: same stack, newer version. -The code is `legacy/$system`, often a symlink to where it really lives: say where it points (`readlink legacy/$system`) in one line before you start. +The code is `legacy/$system`, often a symlink to where it really lives: say where it points (`readlink legacy/$system`) in one line before you start. Run every subagent in the foreground and wait for its result: never end your turn while one is still running. This is **not** `transform`, which extracts intent and rewrites idiomatically. Here the code is good and only needs to run on a newer runtime. **Preserve structure and make the smallest diffs that compile |
