From 553d3bbb7b0e8f66078e7170b06df6ba53419552 Mon Sep 17 00:00:00 2001 From: Marco Schaeck Date: Thu, 20 Aug 2026 19:36:32 +0200 Subject: [PATCH] build(bpmn): move bpmnlint tooling from tools/ to repo root Relocate package.json, package-lock.json, .bpmnlintrc and .npmrc from the tools/ folder to the repository root and delete tools/. Update the lint:bpmn glob and hooks:install command to root-relative paths, and adjust all references (pre-commit hook, CI workflow, conductor settings, docs, skills). --- tools/.bpmnlintrc => .bpmnlintrc | 0 .claude/skills/verify-model-visually/SKILL.md | 4 ++-- .conductor/settings.toml | 4 ++-- .githooks/pre-commit | 4 ++-- .github/workflows/pre-merge.yml | 6 +++--- tools/.npmrc => .npmrc | 0 AGENTS.md | 4 ++-- CONTRIBUTING.md | 4 ++-- README.md | 2 +- tools/package-lock.json => package-lock.json | 0 tools/package.json => package.json | 6 +++--- 11 files changed, 17 insertions(+), 17 deletions(-) rename tools/.bpmnlintrc => .bpmnlintrc (100%) rename tools/.npmrc => .npmrc (100%) rename tools/package-lock.json => package-lock.json (100%) rename tools/package.json => package.json (60%) diff --git a/tools/.bpmnlintrc b/.bpmnlintrc similarity index 100% rename from tools/.bpmnlintrc rename to .bpmnlintrc diff --git a/.claude/skills/verify-model-visually/SKILL.md b/.claude/skills/verify-model-visually/SKILL.md index 9b6e9c7..af69d19 100644 --- a/.claude/skills/verify-model-visually/SKILL.md +++ b/.claude/skills/verify-model-visually/SKILL.md @@ -36,12 +36,12 @@ finding — call it out. 2. **Run the deterministic linter first (geometry net):** ```bash - npm --prefix tools run lint:bpmn + npm run lint:bpmn ``` It globs every production model. Clean = silent, exit 0; non-zero = real geometry problems — **capture each finding** (every line names the element/flow + rule) but don't stop; still do the - visual pass. Missing binary → `npm --prefix tools ci` once, then re-run. bpmnlint also runs in the + visual pass. Missing binary → `npm ci` once, then re-run. bpmnlint also runs in the pre-commit hook and the `build` job of `.github/workflows/pre-merge.yml`; **skip this step only when geometry was already gated upstream this run** (CI's lint step or the pre-commit hook) and note that. diff --git a/.conductor/settings.toml b/.conductor/settings.toml index 68fdaa6..f39631f 100644 --- a/.conductor/settings.toml +++ b/.conductor/settings.toml @@ -12,8 +12,8 @@ run_mode = "nonconcurrent" # One-time setup per workspace: install BPMN tooling + git hooks, and the frontend deps. setup = """ -npm --prefix tools ci -npm --prefix tools run hooks:install +npm ci +npm run hooks:install npm --prefix frontend ci """ diff --git a/.githooks/pre-commit b/.githooks/pre-commit index 279ff0d..0364fd3 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Repo-wide pre-commit hook. Install once with: npm --prefix tools run hooks:install +# Repo-wide pre-commit hook. Install once with: npm run hooks:install # # It is the single git hooks path for the repo (frontend does NOT use husky, so the two hook # systems can't fight over core.hooksPath). It runs two cheap, high-value checks on what you staged: @@ -13,7 +13,7 @@ staged="$(git diff --cached --name-only --diff-filter=ACMR)" # 1) BPMN models if echo "$staged" | grep -q '\.bpmn$'; then echo "pre-commit: linting BPMN models" - npm --prefix "$root/tools" run --silent lint:bpmn + npm --prefix "$root" run --silent lint:bpmn fi # 2) Frontend staged files diff --git a/.github/workflows/pre-merge.yml b/.github/workflows/pre-merge.yml index d8e0096..539d1ba 100644 --- a/.github/workflows/pre-merge.yml +++ b/.github/workflows/pre-merge.yml @@ -21,12 +21,12 @@ jobs: with: node-version-file: frontend/.nvmrc cache: npm - cache-dependency-path: tools/package-lock.json + cache-dependency-path: package-lock.json - name: Lint BPMN (bpmnlint) run: | - npm --prefix tools ci - npm --prefix tools run lint:bpmn + npm ci + npm run lint:bpmn - name: Set up JDK 21 uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v4 diff --git a/tools/.npmrc b/.npmrc similarity index 100% rename from tools/.npmrc rename to .npmrc diff --git a/AGENTS.md b/AGENTS.md index 5a9d68d..a4626f1 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -49,7 +49,7 @@ npm --prefix frontend run dev # UI on :5173 (proxies /api | Regenerate the API client | `npm --prefix frontend run api:generate` (check: `api:check`) | | API scenarios (running stack) | `cd bruno && npx --yes @usebruno/cli run . --env local -r` | | Browser e2e (running stack) | `npm --prefix frontend run e2e` | -| BPMN lint | `npm --prefix tools run lint:bpmn` | +| BPMN lint | `npm run lint:bpmn` | | Backend OCI image · full-stack run | `./gradlew :service:app:bootBuildImage` · `docker compose -f stack/docker-compose.full.yml up` — [ADR-0014](docs/adr/0014-build-and-deployment-approach.md), CONTRIBUTING "Run it in containers" | ## Architecture — the rules are machine-enforced @@ -79,7 +79,7 @@ codebase "process" means the BPMN model, so the step rail is `widgets/leasing-pr - `bpmn-to-code` generates typed process constants from the models at build time; a custom model test requires every service task to use a delegate expression (`#{beanName}`). -- `bpmnlint` runs on staged `.bpmn` via `.githooks/pre-commit` (install: `npm --prefix tools run hooks:install`). +- `bpmnlint` runs on staged `.bpmn` via `.githooks/pre-commit` (install: `npm run hooks:install`). ## Testing diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d3dafe7..40be89d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,7 +8,7 @@ welcome — bug reports, feature ideas, docs, and code. ```bash git clone git@github.com:miragon-blueprints/fullstack-example.git cd fullstack-example -npm --prefix tools ci && npm --prefix tools run hooks:install # BPMN lint + git hooks +npm ci && npm run hooks:install # BPMN lint + git hooks npm --prefix frontend ci # frontend dependencies ``` @@ -114,7 +114,7 @@ npm --prefix frontend run api:generate # regenerate the typed client from opena npm --prefix frontend run e2e # Playwright specs (chromium) # BPMN -npm --prefix tools run lint:bpmn # bpmnlint the .bpmn models +npm run lint:bpmn # bpmnlint the .bpmn models ``` ## Ground rules diff --git a/README.md b/README.md index 93422a3..db8f3f5 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ fullstack-example/ ├── openapi/openapi.json # GENERATED by a test, COMMITTED, drift-gated in CI ├── frontend/ # React + FSD (npm-only; e2e/ Playwright specs) ├── bruno/ # API scenario collections -├── tools/ # bpmnlint + git-hook installer +├── package.json # bpmnlint + git-hook installer tooling ├── stack/ # docker-compose.yml (dev DB) · docker-compose.full.yml (full stack) ├── docs/{README.md, adr/, assets/} # ADRs + diagrams ├── .claude/{skills/, agents/} # 8 skills, 2 subagents diff --git a/tools/package-lock.json b/package-lock.json similarity index 100% rename from tools/package-lock.json rename to package-lock.json diff --git a/tools/package.json b/package.json similarity index 60% rename from tools/package.json rename to package.json index a6b568f..adc8c42 100644 --- a/tools/package.json +++ b/package.json @@ -2,10 +2,10 @@ "name": "fullstack-example-tooling", "version": "1.0.0", "private": true, - "description": "Dev tooling for the fullstack bike-leasing blueprint: BPMN linting (bpmnlint) and git hook installation. Run from the repo root via `npm --prefix tools run