Skip to main content
command official · Anthropic

modernize-review — Claude Code command: what it does, how to install

modernize-review prompts a human to confirm or reject business rules extracted from legacy code and logs the verdicts. It prevents migration plans from codifying unintended defects.

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin install code-modernization@claude-plugins-official
Open on GitHub

What modernize-review does

The command loads extracted rules from analysis/$system/BUSINESS_RULES.md alongside any existing reviews in RULE_REVIEWS.json. You specify the target scope via arguments: flagged rules with suspected defects or low confidence by default, all P0 rules, or every rule. The original BUSINESS_RULES.md file is never modified.

Questions appear in batches of up to four using the AskUserQuestion UI tool instead of chat text. Each item displays its rule specification and code citations. Reviewers can confirm the rule, reject it, or enter custom clarification notes. In headless mode without the prompt tool, the command refuses to guess and leaves rules unreviewed.

All answers merge into analysis/$system/RULE_REVIEWS.json and render into a sorted Markdown table. If python3 is present, it refreshes the summary report before directing the user to run the brief command.

What it helps with

  • review ambiguous business rules before legacy modernization
  • flag intended behavior versus accidental legacy defects
  • record human decisions in structured RULE_REVIEWS.json
  • generate a Markdown audit table of approved and rejected rules

Example prompts for the agent

  • /code-modernization:modernize-review billing flagged
  • /code-modernization:modernize-review crm p0
  • /code-modernization:modernize-review auth all

How to install modernize-review

1Plugin marketplace

/plugin install code-modernization@claude-plugins-official

2Manually: put the files in place

.claude/commands/modernize-review.md

Call it with /modernize-review. For all projects use ~/.claude/commands/

Questions about modernize-review

How to install modernize-review in Claude Code?

Install the parent plugin by running /plugin install code-modernization@claude-plugins-official.

What does modernize-review do?

It presents suspected business rules to a domain expert, records decisions into RULE_REVIEWS.json, and updates a summary table. It ensures downstream migration steps do not treat unwanted code quirks as intentional policy.

Can modernize-review run without user interaction?

In a headless run lacking the AskUserQuestion tool or pre-typed verdicts, it does not guess. The command leaves every rule unreviewed and reports the status.

Source text

modernize-review.md · Apache-2.0
---
description: Confirm or correct the business rules that need a person's judgement; the plan and the build read your answers
arguments: system scope
---

Ask a person to decide the business rules in `analysis/$system/BUSINESS_RULES.md` that depend on judgement, and record each answer so the plan and the build honor it. Agents mined the rules and a second agent checked every citation, but only someone who knows the business can say whether a rule is *right*: whether a truncation is intended or a defect, whether a threshold is still the policy. This command asks in a pop-up and never edits `BUSINESS_RULES.md`.

## 1 — Choose the rules

Read `BUSINESS_RULES.md` (each card has `### RULE-NNN`, Priority, Confidence, and sometimes a suspected defect or an SME question) and, if it exists, `analysis/$system/RULE_REVIEWS.json`; rules already decided are skipped, and you say how many. `$scope` picks the rest:

- **flagged** (the default): P0 rules that have a suspected defect, an SME question or less than High confidence, plus any rule the brief's open questions name.
- **p0**: every P0 rule. **all**: every rule.

Say how many rules will be asked (about a minute per ten). If none is left, say so and give the next command.

## 2 — Ask

Use the AskUserQuestion tool, never chat text, up to four rules per call. One question per rule: its id as the header; the title, the plain-English statement, its Given/When/Then in one line, the cited lines (`file:line`) and the suspected defect or SME question if it has one as the question; and three options: **Right** (the rule is correct and wanted), **Wrong, or not wanted** (it misdescribes the code, or the code does this today but should not), **Not sure** (needs a discussion). The person can type a note instead of choosing: what is right, or the question that needs answering. Keep it, in their words. Stop when they say to. Verdicts the person already typed in the request (`RULE-004 wrong: it truncates on purpose`) are recorded as given, with no pop-up for those rules. Without the tool and without typed verdicts (a headless run) do not guess: leave every rule unreviewed and say so.

## 3 — Record

Merge the answers into `analysis/$system/RULE_REVIEWS.json`, the same file the live progress pane's review deck (`/modernize-review-pane`) writes:

```json
{ "system": "<name>", "version": 1, "reviews": {
    "RULE-004": { "verdict": "confirmed", "at": "<ISO time>", "title": "<the rule's title>", "note": "<their words, optional>" } } }
```

`verdict` is `confirmed` (Right), `wrong` (Wrong, or not wanted) or `discuss` (Not sure). Change an earlier entry only when a new answer replaces it. Write `analysis/$system/RULE_REVIEWS.md` from it: a short paragraph, then a table `Rule | Verdict | When | Title | Note`, sorted by rule number. Refresh the report (`python3 "${CLAUDE_PLUGIN_ROOT}/scripts/build_report.py" $system`, a convenience: if it fails or `python3` is missing, say so in one line and carry on).

## 4 — What happens next

Tell the person, in three lines: rules marked wrong or needing discussion are not settled; `brief` lists them as open questions and never builds a Behavior Contract on them; `transform` and `reimagine` will not pin a wrong rule as the oracle and stop on a P0 rule still under discussion. Then the next command: `/code-modernization:modernize-brief $system` (run it again if the brief exists and any rule changed), or the brief's next build command when the plan is already approved.

© Anthropic · Apache-2.0 · anthropics/claude-plugins-official

Similar slash commands

All slash commands for Code review and refactoring →

From the same set123

The whole set →
commit-push-pr Creates a feature branch if needed, commits staged and unstaged edits, pushes to origin, and opens a pull request via GitHub CLI. ★ 44,635repo stars clean_gone Finds local Git branches marked [gone], removes their associated worktrees, then deletes the branches. Use it to clear local branches whose remote copies are gone. ★ 44,635repo stars modernize This command guides a legacy-code modernization: it finds the system, records the goal and constraints, then gives the next command. Use it before the build work starts. ★ 44,635repo stars modernize-uplift Uplifts existing code to a newer runtime version within the same stack while preserving business logic and proving behavioral equivalence through tests. ★ 44,635repo stars modernize-reimagine A slash command from the code-modernization plugin that rebuilds a legacy system on a new architecture from extracted intent, with two human checkpoints. ★ 44,635repo stars modernize-map Builds an interactive dependency and topology map of a legacy codebase, showing entry points and data flows. Helps map connections between modules before refactoring. ★ 44,635repo stars modernize-harden Scans a legacy system for vulnerabilities and drafts patches for Critical and High findings. It leaves the source code untouched. ★ 44,635repo stars modernize-assess Assesses a legacy system for code size, complexity, technical debt, and security risks. Use it before planning a modernization effort for one system or a portfolio. ★ 44,635repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor