From c932382022dd9cf03d8046ecdd16cbd392c16b1c Mon Sep 17 00:00:00 2001 From: znetsixe Date: Fri, 29 May 2026 19:04:59 +0200 Subject: [PATCH] docs(rules): examples are hand-authored one-offs, not generated MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - node-red-flow-layout §7: drop the "generate flows from a Python builder — it's the source of truth" mandate. Per-node examples are hand-authored one-offs validated by flow-lint; no per-node generator. Scripting layout stays an option only for a large, owned production dashboard. - Bump pumpingStation (generator removed). Co-Authored-By: Claude Opus 4.8 (1M context) --- .claude/rules/node-red-flow-layout.md | 9 +++++++-- nodes/pumpingStation | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.claude/rules/node-red-flow-layout.md b/.claude/rules/node-red-flow-layout.md index b80ba3d..01e147d 100644 --- a/.claude/rules/node-red-flow-layout.md +++ b/.claude/rules/node-red-flow-layout.md @@ -203,8 +203,13 @@ If you only fill the top-level fields, `payload_type=json` is silently treated a ✅ Do: -- Generate flows from a Python builder (`build_flow.py`) — it's the source of truth. -- Use deterministic IDs (`pump_a`, `meas_pump_a_u`, `lin_demand_to_mgc`) — reproducible diffs across regenerations. +- **Hand-author per-node `examples/` flows — they are one-offs, not generated.** + The JSON is the source of truth; edit it directly and validate with `flow-lint`. + Do **not** add a per-node flow generator: it rots out of sync, silently emits + lint-failing flows, and costs more to maintain than the one-off it produces. + (Scripting layout *may* still pay off for a large, frequently-rebuilt production + dashboard — but that is an explicit, owned tool, never a per-node example.) +- Use stable, readable IDs (`pump_a`, `meas_pump_a_u`, `lin_demand_to_mgc`) so diffs stay legible. - Tag every channel name with `cmd:` / `evt:` / `setup:`. - Comment every section, even short ones. - Verify trends with a `ui-chart` of synthetic data first, before plumbing real data through. diff --git a/nodes/pumpingStation b/nodes/pumpingStation index 089a7fa..177a37e 160000 --- a/nodes/pumpingStation +++ b/nodes/pumpingStation @@ -1 +1 @@ -Subproject commit 089a7fa2c44799b675af9f7546f9423b79b9c371 +Subproject commit 177a37e15ce58db0b736cd19de15bf96a45f9260