summaryrefslogtreecommitdiff
path: root/plugins/code-modernization/README.md
diff options
context:
space:
mode:
authorClaude <noreply@anthropic.com>2026-09-03 01:26:52 +0000
committerClaude <noreply@anthropic.com>2026-09-03 01:26:52 +0000
commitd2eaddd423ec8b9326de696f6883b3e8eb0b3b31 (patch)
treec8ac8bce332a66aa88782c514b03978c675cc5d5 /plugins/code-modernization/README.md
parent0120fb83da5d7cdaa52dd11979690f2dc5f76052 (diff)
code-modernization: shard extract-rules by module and document workflow resumeclaude/extract-rules-module-sharding
extract-rules.js gains a module mode: when the caller passes `modules` (built from the map stage's topology.json, or from the directory tree), it runs one focused extractor per module in ordered batches, refereeing each batch's fresh rules before the next batch starts, instead of pointing three whole-estate lens agents at legacy/<system> every round. Batches are ordered parallel() barriers so agent spawn order is a pure function of the args and prior results, which keeps resumeFromRunId replays cache-hitting. Lens mode is unchanged for callers without a module list (identical prompts and return fields). The script now guards the runtime's per-run agent cap and the token budget before every fan-out and degrades to a partial catalog with named gaps (skippedModules, failedModules, unverifiedRules, skippedPhases, re-passable rerunModules) instead of failing with no result; referee-less rules are returned rather than dropped, and a wrong-citation redirect can no longer confirm the same rule twice. The command doc now builds the module list from topology.json (inline script), sizes the run honestly, records the Run ID, and spells out the interrupted-run path: resume a stopped/failed run with resumeFromRunId, follow up a completed-with-failures run with just the affected shards, and read journal.jsonl before declaring anything lost.
Diffstat (limited to 'plugins/code-modernization/README.md')
-rw-r--r--plugins/code-modernization/README.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/code-modernization/README.md b/plugins/code-modernization/README.md
index 2a148875..976a2d32 100644
--- a/plugins/code-modernization/README.md
+++ b/plugins/code-modernization/README.md
@@ -54,7 +54,7 @@ Run in order, but each is standalone — stop, review, resume.
- **`/modernize-map <system-dir>`** — Dependency and topology map: call graph, data lineage, entry points, and 2–4 business flows each traced for a persona (the claimant, the auditor). Produces `topology.json` and an **interactive zoomable `TOPOLOGY.html`** (circle-pack sized by LOC, edge toggles, search, and a persona-flow walkthrough), plus small `.mmd` diagrams for docs.
-- **`/modernize-extract-rules <system-dir> [module-pattern]`** — Mine the business rules — calculations, validations, eligibility, state transitions — into Given/When/Then "Rule Cards" with `file:line` citations and confidence ratings. Produces `BUSINESS_RULES.md` + `DATA_OBJECTS.md`.
+- **`/modernize-extract-rules <system-dir> [module-pattern]`** — Mine the business rules — calculations, validations, eligibility, state transitions — into Given/When/Then "Rule Cards" with `file:line` citations and confidence ratings. On anything but a tiny system, extraction is sharded per module — from `map`'s `topology.json` when it exists, else from the directory tree — so each extractor reads one focused slice instead of the whole estate, which is what keeps it tractable on large systems. Produces `BUSINESS_RULES.md` + `DATA_OBJECTS.md`.
- **`/modernize-brief <system-dir> [target-stack]`** — Synthesize discovery into a phased **Modernization Brief**: target architecture, phase plan, persona walkthroughs, behavior contract, and an approval block. Reads the discovery artifacts and **stops if any are missing**. Enters plan mode as a human-in-the-loop approval gate. For a same-stack uplift it also requires the **delta catalog**, since an uplift's phase order is decided by its version deltas. The execution commands read the brief and treat each phase's entry criteria as gates, so editing the brief steers execution.
@@ -116,7 +116,7 @@ Commands degrade gracefully, but these improve the output (run `/modernize-prefl
## Dynamic workflow orchestration
-On Claude Code builds with the Workflow tool, five commands (`extract-rules`, `harden`, `assess --portfolio`, `reimagine`, `uplift`) run as scripted multi-agent orchestrations that fan out more agents for deeper coverage — looping until findings stabilize, and adversarially verifying each finding before it's written. `uplift`'s migration fan-out runs in dependency-aware escalating batches behind a per-batch **circuit breaker**, so a playbook that stops working is caught within a handful of agents and the spend stops until it is revised. They fall back to direct subagent fan-out on older builds automatically; no configuration needed. Invoking the slash command is the opt-in.
+On Claude Code builds with the Workflow tool, five commands (`extract-rules`, `harden`, `assess --portfolio`, `reimagine`, `uplift`) run as scripted multi-agent orchestrations that fan out more agents for deeper coverage — looping until findings stabilize, and adversarially verifying each finding before it's written. `uplift`'s migration fan-out runs in dependency-aware escalating batches behind a per-batch **circuit breaker**, so a playbook that stops working is caught within a handful of agents and the spend stops until it is revised. A stopped or failed `extract-rules` (or `assess --portfolio`) run is **resumable**: the command re-invokes the workflow with the same args plus `resumeFromRunId`, and every agent that finished before the stop replays from the run's journal instead of re-running — `extract-rules` shards by module in ordered batches precisely so a resume re-runs little more than the batch that was in flight; shards whose agents failed outright are reported and re-run on their own in a follow-up invocation. They fall back to direct subagent fan-out on older builds automatically; no configuration needed. Invoking the slash command is the opt-in.
## License