Some checks failed
CI / lint-and-test (push) Has been cancelled
- package.json: remove @tensorflow/tfjs and @tensorflow/tfjs-node. Monster's TF code was already stripped; the deps were stale and kept pulling a heavy native binary back into every install. - .gitignore: ignore .repo-mem/ regenerable indexes and per-session .claude/*.lock runtime files. - CLAUDE.md: prepend READ-FIRST pointer to .claude/rules/repo-mem.md; collapse the 'three outputs' bullet to a pointer at node-architecture. - .claude/rules/telemetry.md: drop Port 0/1/2 duplication; reference node-architecture.md. - .claude/rules/testing.md: stop requiring a separate test/edge tier and the basic/integration/edge example flow trio. Reflects what nodes actually do. - .claude/rules/repo-mem.md (new): when-to-call-which guide for the per-repo memory MCP, anti-patterns, refresh model. - .mcp.json (new): wire repo-mem stdio server. - docs/DEVELOPER_GUIDE.md (new): step-by-step guide for adding a new EVOLV node under the three-layer pattern. - Bump nodes/pumpingStation to 6ab585b (docs + simulations refresh, spill-flow path renames consistent with d8490aa). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2.2 KiB
2.2 KiB
EVOLV - Claude Code Project Guide
READ FIRST, BEFORE ANY OTHER WORK:
.claude/rules/repo-mem.md— this repo has an MCP server (repo-mem) exposing a substrate-trainedrepo_searchand a persistent fix-trace store. Use those instead of grep for concept queries, and record completed fixes viarepo_record_fix. Triggers, anti-patterns, and refresh model are in that rule.
What This Is
Node-RED custom nodes package for wastewater treatment plant automation. Developed by Waterschap Brabantse Delta R&D team. Follows ISA-88 (S88) batch control standard.
Architecture
Each node follows a three-layer pattern:
- Node-RED wrapper (
<name>.js) - registers the node type, sets up HTTP endpoints - Node adapter (
src/nodeClass.js) - bridges Node-RED API with domain logic, handles config loading, tick loops, events - Domain logic (
src/specificClass.js) - pure business logic, no Node-RED dependencies
Key Shared Library: nodes/generalFunctions/
logger- structured logging (use this, NOT console.log)MeasurementContainer- chainable measurement storage (type/variant/position)configManager- loads JSON configs fromsrc/configs/MenuManager- dynamic UI dropdownsoutputUtils- formats messages for InfluxDB and process outputschildRegistrationUtils- parent-child node relationshipscoolprop- thermodynamic property calculations
Conventions
- Nodes register under category
'EVOLV'in Node-RED - S88 color scheme: Area=#0f52a5, ProcessCell=#0c99d9, Unit=#50a8d9, Equipment=#86bbdd, ControlModule=#a9daee
- Config JSON files in
generalFunctions/src/configs/define defaults, types, enums per node - Tick loop runs at 1000ms intervals for time-based updates
- Output ports + 3-tier architecture: see
.claude/rules/node-architecture.md - Multi-tab demo flows: see
.claude/rules/node-red-flow-layout.mdfor the tab/link-channel/spacing rule set used byexamples/
Development Notes
- No build step required - pure Node.js
- Install:
npm installin root - Submodule URLs were rewritten from
gitea.centraal.wbd-rd.nltogitea.wbd-rd.nlfor external access - Dependencies: mathjs, generalFunctions (git submodule)