Repository navigation
refactor!: drop the learned id style, new ids follow element-id-naming - #118
Merged
emaarco merged 3 commits intoOct 28, 2026
Merged
Conversation
New ids no longer come from a style learned from the file's existing ids. They follow the conventions element-id-naming declares in the .bpmnlintrc, else the plugin's defaults (camelCase), so generated ids pass the rule out of the box. Types the rule does not check take bpmn-cli's own prefix (message_, laneSet_, dataObjectItem_...); a named process is its name (orderToCash), an unnamed one Process_1. Only flows in the current form follow their ends; kebab-case is supported. - bump @miragon/bpmnlint-plugin-rules 0.14.0 -> 0.19.0 and read the conventions through its ElementIdConvention API - remove LearnedStyle, Tally, the learned flow forms and tools/speaking-ids.mjs - remove MutationResult.conventions, ConventionsReport, conventionsLines and the `conventions:` output line - `bpmn show --conventions` sources are now lint / default / bpmn-cli - rework docs/bpmnlint.md "Id conventions" into a guide on getting matching ids BREAKING CHANGE: files without a .bpmnlintrc get element-id-naming's default ids even where their existing ids look different; idConventionsFromLint needs the naming namespace of @miragon/bpmnlint-plugin-rules 0.19 or later; MutationResult.conventions and the conventionsLines export are removed.
The backing data object and data store have their own prefixes now (dataObjectItem_, dataStoreItem_), so they no longer share an id with their reference. Where a .bpmnlintrc declares the same prefix for both, the usual collision suffix applies.
…and eval The examples, the regenerated pictures, the guide and help texts, the plugin README and the evals use the ids the CLI now generates (userTask_checkInvoice, flow_checkInvoiceToBookInvoice, orderHandling). The speaking-new-ids grader of edit-hand-drawn-model checks the new convention.
emaarco
marked this pull request as ready for review
October 28, 2026 10:14
emaarco
enabled auto-merge (squash)
October 28, 2026 10:15
emaarco
deleted the
emaarco/refactor-drop-the-learned-id-style-new-ids-follo
branch
October 28, 2026 10:16
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.
Why
bpmn-cli learned an id style from each file's existing ids. New ids were hard to predict, and they often failed
@miragon/rules/element-id-namingas soon as a project turned the rule on.What
.bpmnlintrcdeclares, else the rule's defaults (userTask_checkInvoice,flow_checkInvoiceToBookInvoice).ElementIdConventionAPI instead of a copy of its logic.message_,dataObjectItem_); a named process is its name (orderToCash).docs/bpmnlint.mdexplains how to get matching ids; all examples, shots and evals use the new ids.Verification
npm run gateandnpm run docs:buildare green after rebasing onmain.Breaking changes
.bpmnlintrcgets the default ids, whatever its existing ids look like; existing ids are never renamed.idConventionsFromLintneeds the plugin'snamingnamespace from 0.19 on;MutationResult.conventionsandconventionsLinesare removed.Closes #115