Accept optional kind: field in detection patterns (#54)#70
Merged
Conversation
Extends bin/validate-patterns to recognize a `kind:` field on every pattern entry, with enum validation against four allowed values: `breaking`, `deprecation`, `migration`, `optional`. The validator rejects unknown values (typo guard) but does not require the field yet — existing pattern files keep validating clean. Documents the four values and assignment rubric in CLAUDE.md, alongside the existing priority rubric. priority and kind are orthogonal: a HIGH deprecation (silently wrong) and a HIGH breaking (won't boot) are both "fix first" but for different reasons. First step of the issue #53 rollout. Subsequent classification PRs will add `kind:` per pattern, version-by-version. After all 12 pattern files are classified, the validator will be tightened to require kind. Refs #53, closes #54
JuanVqz
commented
May 4, 2026
| TOP_LEVEL_KEYS = %w[version description breaking_changes].freeze | ||
| PATTERN_KEYS = %w[name pattern exclude search_paths explanation fix variable_name].freeze | ||
| PRIORITY_KEYS = %w[high_priority medium_priority low_priority].freeze | ||
| KIND_VALUES = %w[breaking deprecation migration optional].freeze |
Member
Author
There was a problem hiding this comment.
the kind keyword is going to be required after the transition is finished.
This was referenced May 4, 2026
Member
Author
|
Code-reviewed end-to-end with Claude. Ready for human review. |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First step of the issue #53 rollout: extend
bin/validate-patternsto recognize a newkind:field on every detection pattern entry, with enum validation against four allowed values (breaking,deprecation,migration,optional). Document the rubric for assigningkind:inCLAUDE.mdalongside the existing priority rubric.The field is optional during the rollout — every existing pattern file still validates clean — and the validator already rejects unknown values to guard against typos. After all 12 pattern files have been classified (sub-issues #55 through #66), #67 flips the validator to require
kind:.Why
priority(HIGH/MEDIUM/LOW) describes urgency.kinddescribes what the change is. They're orthogonal: a HIGHdeprecation(silently wrong, likeDIRTY_TRACKING_AFTER_SAVE) and a HIGHbreaking(won't boot) are both "fix first" but for different reasons. Surfacingkindin detection output later (#69) lets users distinguish "fix before bump" (breaking) from "fix when ready" (deprecation/migration/optional). Today, every pattern is grouped underbreaking_changes:regardless of what it actually is — a misnomer that loses signal. Background: #43 review thread and the audit in #53.Changes
bin/validate-patterns: addKIND_VALUESenum, validatekindper entry when present.CLAUDE.md: update tooling notes to mention thekind:enum check; add## Assigning kind:section with semantics + decision rubric for the four values.rails-upgrade/CHANGELOG.md: Unreleased entry.Test plan
bin/validate-patternspasses on all 12 existing pattern files (nokind:set anywhere yet)kind: "breaking"validates cleankind: "bogus"fails with:invalid kind: "bogus" (allowed: breaking, deprecation, migration, optional)Linked issues
kind:field to detection patterns; renamebreaking_changes:→upgrade_findings:#53 (parent — schema-cleanup tracking)