Skip to content

refactor: organise src into one folder per pipeline stage - #82

Merged
emaarco merged 1 commit into
mainfrom
emaarco/bpmn-cli-architecture-evaluation
Oct 21, 2026
Merged

emaarco merged 1 commit into
mainfrom
emaarco/bpmn-cli-architecture-evaluation

Conversation

@emaarco

@emaarco emaarco commented Oct 21, 2026

Copy link
Copy Markdown
Member

Summary

src/ had 27 loose files at its root, and several folders held modules that belonged elsewhere: format ops and the renderer lived in diagram/, the clean engine's types in layout/, and C7/C8 defaults in ops/. The folder names did not say where code lives or where new code should go.

This PR gives each pipeline stage its own folder: shared/, model/, ids/, xml/, platform/profiles/, ops/, diagram/, layout/ (clean/, incremental.ts), format/, render/, validate/, query/, pipeline/, report/. Only the three entries index.ts, api.ts and cli.ts stay at the root.

  • It moves 43 files and changes no logic. Git detects every move as a rename (96–100 % similar), so blame and log --follow keep working.
  • Imports and path references follow the moves: code comments, tests, the iso check, the fuzzer, docs/, CONTRIBUTING.md and the PR template. HANDOVER.md, CHANGELOG.md and the October audit are history and keep their old paths.
  • The public API is unchanged: src/index.ts and src/node/index.ts export the same names.
  • CONTRIBUTING.md now has a table of the folders and a rule for where new code goes.

Import-direction violations remain (e.g. ops/set.ts → layout/index.ts). This PR doesn't add the architecture test that would fix and enforce them.

Checklist

  • npm run typecheck passes
  • npm run gate passes (from an empty dist/: 2317 tests, iso check, regress budget, fuzz 0 errors)
  • src/report/guide.ts and the matching page in docs/ are updated (only if a command, option or output changed)
  • PR title is a changelog-worthy Conventional-Commit summary

Linked issue

None.

Move the 27 root files and the misplaced diagram/, layout/, ops/ and
platform/ modules into shared/, model/, ids/, xml/, platform/profiles/,
ops/, diagram/, layout/, format/, render/, validate/, query/, pipeline/
and report/. Pure moves: imports and path references follow, no logic
changes. CONTRIBUTING documents the folders and where new code goes.
@emaarco
emaarco enabled auto-merge (squash) October 21, 2026 15:44
@emaarco
emaarco merged commit ea83258 into main Oct 21, 2026
8 checks passed
@emaarco
emaarco deleted the emaarco/bpmn-cli-architecture-evaluation branch October 21, 2026 16:06
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