Skip to content

feat!: add flow-zigzag layout rule - #28

Draft
emaarco wants to merge 1 commit into
mainfrom
emaarco/zigzag-flow-rule
Draft

feat!: add flow-zigzag layout rule#28
emaarco wants to merge 1 commit into
mainfrom
emaarco/zigzag-flow-rule

Conversation

@emaarco

@emaarco emaarco commented Aug 21, 2026

Copy link
Copy Markdown
Member

Adds the flow-zigzag layout rule: reports a sequence flow that reverses on itself and keeps bending instead of reaching its target directly.

Decides purely on DI coordinates, scoped per BPMNPlane:

  • A monotone flow (never doubling back on either axis — straight, L, Z, staircase) is always fine, however many bends.
  • A flow that reverses gets a small wrap-bend budget (maxWrapBends, default 3); beyond it, report. Self-loops are skipped.

The monotonicity check judges each segment by its dominant axis, so a near-orthogonal rung's minor-axis drift is not mistaken for a reversal (avoids a false positive on a slightly imperfect staircase).

Ships error in plugin:@miragon/rules/all and non-blocking warn in both recommended layers → feat! (can raise a consumer's all build to red).

Note: flow-orthogonal was split out of the original combined change into its own draft PR (#31), so this branch now contains only flow-zigzag.

Closes #32

@emaarco
emaarco force-pushed the emaarco/zigzag-flow-rule branch from 1364307 to da674ac Compare August 22, 2026 09:44
@emaarco emaarco changed the title feat!: add flow-orthogonal and flow-zigzag layout rules feat!: add flow-zigzag layout rule Aug 22, 2026
Reports a sequence flow that reverses on itself and keeps bending instead
of reaching its target directly. Decides purely on DI coordinates, scoped
per BPMNPlane: a monotone flow (never doubling back on either axis) is
always fine, a reversing flow gets a small wrap-bend budget (maxWrapBends,
default 3).

The monotonicity check judges each segment by its dominant axis, so a
near-orthogonal rung's minor-axis drift is not mistaken for a reversal.

Ships error in `all` and non-blocking warn in both recommended layers.

Closes #32
@emaarco
emaarco force-pushed the emaarco/zigzag-flow-rule branch from da674ac to 200a872 Compare August 22, 2026 10:02
@emaarco emaarco changed the title feat!: add flow-zigzag layout rule draft: feat!: add flow-zigzag layout rule Aug 22, 2026
@emaarco emaarco changed the title draft: feat!: add flow-zigzag layout rule feat!: add flow-zigzag layout rule Aug 22, 2026
@emaarco
emaarco marked this pull request as draft August 22, 2026 10:34
@emaarco

emaarco commented Aug 22, 2026

Copy link
Copy Markdown
Member Author

on purpose in draft status. currently a WIP - with some edge cases that i still want to discover

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.

[Feat]: Rule reporting winding (zigzag) sequence flows

1 participant