summaryrefslogtreecommitdiff
path: root/plugins/code-modernization/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/code-modernization/README.md')
-rw-r--r--plugins/code-modernization/README.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/code-modernization/README.md b/plugins/code-modernization/README.md
index 9688c499..3c02a578 100644
--- a/plugins/code-modernization/README.md
+++ b/plugins/code-modernization/README.md
@@ -37,7 +37,7 @@ Each step stands alone, so you can stop and review after any of them.
| 1 | `modernize-preflight <name> [target-stack] [--source <path>]` | Is the environment ready? Asks five questions only a person can answer (is this the whole system or a slice, can it build and test here, is there custom build tooling, has anyone tried before, is anything off limits), proves a build works on this code, and finds missing source. |
| 2 | `modernize-assess <name>` | What am I dealing with: inventory, complexity, debt, security, and a recommended pattern. |
| 3 | `modernize-map <name>` | The structure: dependencies, data flow, entry points and business flows, as an interactive map. |
-| 4 | `modernize-extract-rules <name>` | The business rules as testable Given/When/Then cards with `file:line` citations, each re-checked by a second agent. |
+| 4 | `modernize-extract-rules <name> [module-pattern] [--depth standard\|thorough]` | The business rules as testable Given/When/Then cards with `file:line` citations, each re-checked by a second agent. Asks for a depth first: Standard, or Thorough (one rule per decision, at a higher cost). |
| 4b | `modernize-review <name>` | A person confirms or corrects the rules that look wrong. Your answers reach the plan and the build. With the live pane on, `/modernize-review-pane` does the same one card at a time. |
| 5 | `modernize-brief <name> [target-stack]` | The phased plan a steering committee approves. **Nothing is built until you approve it.** |
| 6 | `uplift`, `transform` or `reimagine` | The build (see below). |
@@ -93,7 +93,7 @@ The commands were run for real, headlessly, on public codebases while the plugin
## What to expect
-Steps run as agents working for you, and the heavy ones run many at once. Rough times on systems of tens of thousands of lines: preflight 3 to 4 minutes, assess 5 to 8, map 5 to 15, extract-rules 5 to 15, brief about 5. Building one module takes 15 to 30 minutes, an uplift pilot about 15. The heaviest step, `extract-rules`, started 50 to 200 agents in these runs, and every fan-out step says how many it will start; `extract-rules` asks before a big run. On systems in the millions of lines, work one module or unit at a time. The size index in `assess` is a relative measure for ranking systems, never a schedule or a cost.
+Steps run as agents working for you, and the heavy ones run many at once. Rough times on systems of tens of thousands of lines: preflight 3 to 4 minutes, assess 5 to 8, map 5 to 15, brief about 5. Building one module takes 15 to 30 minutes, an uplift pilot about 15. Every fan-out step says how many agents it will start. The heaviest, `extract-rules`, grows with the rules it finds, because each rule gets a referee: as an estimate 15 to 55 agents per 1,000 lines at Standard depth and 20 to 190 at Thorough (low for plumbing, high for dense business logic; short dense files need more per line), at about 16k tokens each and 8 agents a minute. It shows both, and stops at the number of agents you approve. On systems in the millions of lines, work one module or unit at a time. The size index in `assess` is a relative measure for ranking systems, never a schedule or a cost.
## Words you will see
@@ -209,9 +209,9 @@ A pane beside the transcript that shows the map of your code, how far each part
## Good to know
-- **A model does the extraction, so two runs can find different rules.** Treat `BUSINESS_RULES.md` as reviewed output, not a deterministic build artifact. Rules are cut one per business decision, not one per branch, with no target count (dense code yields many), and headings are always `### RULE-NNN: <name>`.
-- **Large runs are resumable.** On Claude Code builds with the Workflow tool, `extract-rules`, `harden`, `assess --portfolio`, `reimagine` and `uplift` run as scripted multi-agent jobs that verify findings adversarially. `extract-rules` shards by module and asks before a big run; a stopped run resumes in the same session with its run ID, and finished agents replay from the journal. Older builds fall back to plain subagents automatically.
-- **Scripting it (`claude -p`).** Long steps run as background workflows, and a headless session stops waiting for background work after 10 minutes. Set `CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS=0` so `extract-rules`, `harden` and the other fan-out steps can finish, and answer a step's approval gate by resuming the session with `--resume`.
+- **A model does the extraction, so two runs can find different rules.** Treat `BUSINESS_RULES.md` as reviewed output, not a deterministic build artifact. Rules are cut one per business decision, not one per branch. At Standard depth, the default, a rule covers about 40 to 80 lines, so on dense code it holds several decisions; `--depth thorough` has no target count and gives each decision its own rule. Headings are always `### RULE-NNN: <name>`.
+- **Large runs are resumable.** On Claude Code builds with the Workflow tool, `extract-rules`, `harden`, `assess --portfolio`, `reimagine` and `uplift` run as scripted multi-agent jobs that verify findings adversarially. `extract-rules` shards by module and asks for a depth and a number of agents; a stopped run resumes in the same session with its run ID, and finished agents replay from the journal. Older builds fall back to plain subagents automatically.
+- **Scripting it (`claude -p`).** Long steps run as background workflows, and a headless session stops waiting for background work after 10 minutes. Set `CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS=0` so `extract-rules`, `harden` and the other fan-out steps can finish, and answer a step's approval gate by resuming the session with `--resume`. Headless, `extract-rules` runs Standard unless you pass `--depth thorough`, and starts nothing without an answer when the job is large (more than 12 shards or an estimate above 200 agents).
- **Adapting it.** Commands, agents and workflows are markdown and JavaScript under Apache 2.0: fork them to change the prompts or steps for your stack.
- **Agents.** `legacy-analyst`, `business-rules-extractor`, `architecture-critic`, `security-auditor`, `test-engineer`, `version-delta-analyst`, `uplift-migrator` and `scaffolder` are invoked by the commands (or directly). The last two write only inside their own unit's directory.
- **Related.** [code-migration-kit-with-claude-code](https://github.com/anthropics/code-migration-kit-with-claude-code) is a separate public kit of prompts, templates and scripts for large-scale language migrations. This plugin is the guided, command-driven workflow from discovery through plan, build and proof; use either or both.