Skip to content

feat(migrate): register transformation rules with versions - #68

Merged
eiserv merged 2 commits into
mainfrom
feat/rule-registry
Nov 1, 2026
Merged

eiserv merged 2 commits into
mainfrom
feat/rule-registry

Conversation

@eiserv

@eiserv eiserv commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Summary

Last M6 increment under D-104. M6 is implemented once this reaches main.

  • Registry. migrate::rules::RULES lists every transformation rule of migrate with its version, operation kind, and summary.
  • Plan-time checks. An operation with an unregistered rule or a rule of another kind is an internal error, and so are two operations for one source file, because a source file must reach exactly one rule.
  • Plan documents. Each operation records ruleVersion, so a rule change makes older plans stale.
  • CLI. frameshift rules lists the registered rules after the assessment predicates, and explain and rules show accept their full identifiers.

Decision worth a look

Rule selection in migrate v0 is one classification function, so exclusivity holds by construction and the plan-time check is its fail-closed proof. The declarative preconditions and the feature ID index of ARCHITECTURE.md section 12 add nothing until several rules can match one occurrence, so they stay planned and are not simulated by metadata without an effect. D-104 records when to revisit this.

Test plan

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --offline --locked -- -D warnings
  • cargo test --workspace --offline --locked
  • pwsh -NoProfile -File .github/scripts/check.ps1
  • The registry is sorted and unique, every identifier passes RuleId's grammar, and every fixture's plan passes the checks

🤖 Generated with Claude Code

eiserv and others added 2 commits November 1, 2026 20:56
Planning now rejects an operation with an unregistered rule or a rule of another
kind, and two operations for one source file. Plan documents record each rule's
version, and rules and explain cover the registered rules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@eiserv
eiserv merged commit 519ce78 into main Nov 1, 2026
22 checks passed
@eiserv
eiserv deleted the feat/rule-registry branch November 1, 2026 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant