Files
EVOLV/CLAUDE.md
znetsixe 18f68aa5da bump machineGroupControl: governance + unit-self-describing demand (26e92b5)
MGC submodule lands the 2026-05-14 governance review fixes plus rolled-up
session work: _output-manifest.md per the new output-coverage rule,
computeEqualFlowDistribution extracted as a pure function (testable without
MGC), groupEfficiency degenerate-case fix, unit-self-describing set.demand,
eta = (Q*dP)/P formula correction, and dashboard fan-out hardening
(auto-init, NCog normalization, Q-H trim, null-trap closure). Suite 108/108.

Superproject adds:
- .claude/rules/output-coverage.md: every-output-every-state testing rule
  prompted by the eta-null crash earlier in the session.
- CLAUDE.md: pointer to the new rule under Conventions.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 22:32:39 +02:00

2.4 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-trained repo_search and a persistent fix-trace store. Use those instead of grep for concept queries, and record completed fixes via repo_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:

  1. Node-RED wrapper (<name>.js) - registers the node type, sets up HTTP endpoints
  2. Node adapter (src/nodeClass.js) - bridges Node-RED API with domain logic, handles config loading, tick loops, events
  3. 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 from src/configs/
  • MenuManager - dynamic UI dropdowns
  • outputUtils - formats messages for InfluxDB and process outputs
  • childRegistrationUtils - parent-child node relationships
  • coolprop - 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.md for the tab/link-channel/spacing rule set used by examples/
  • Output coverage (every output, every state, every layer): see .claude/rules/output-coverage.md — manifest + populated/degraded tests are mandatory for any change that touches Port 0/1/2 keys, function-node fan-outs, telemetry fields, or dashboard widget sources

Development Notes

  • No build step required - pure Node.js
  • Install: npm install in root
  • Submodule URLs were rewritten from gitea.centraal.wbd-rd.nl to gitea.wbd-rd.nl for external access
  • Dependencies: mathjs, generalFunctions (git submodule)