Files
EVOLV/tools/wiki-gen
znetsixe efbc0d7273 feat(commands): unify command envelope across all nodes — msg.origin + unit shorthand
Platform-wide command-message contract:
- Document the envelope in .claude/refactor/CONTRACTS.md §4: unit shorthand +
  derived measure, always-convert (incl. numeric strings), msg.origin
  provenance (parent|GUI|fysical, default parent) + gated mode arbitration.
- wiki-gen: normalise descriptors through createRegistry().list() so the Unit
  column resolves both the unit: shorthand and legacy units:{} shapes.
- Bump submodule pointers: generalFunctions (registry), rotatingMachine, valve,
  valveGroupControl, machineGroupControl (msg.origin), diffuser, pumpingStation,
  monster (unit shorthand + handler dedup), dashboardAPI (wiki sync).
- Log decision in OPEN_QUESTIONS.md (2026-05-29).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-29 18:41:56 +02:00
..

@evolv/wiki-gen

Generate the AUTOGEN sections of per-node wikis from the source of truth (nodes/<n>/src/commands/index.js).

What it generates

Replaces content between these markers:

<!-- BEGIN AUTOGEN: topic-contract — populate via wiki-gen tool (TODO) -->
... wiki-gen overwrites this block ...
<!-- END AUTOGEN: topic-contract -->

The 9 wikis uplifted in 2026-05 carry these markers in wiki/Reference-Contracts.md (and some in wiki/Home.md); wiki-gen keeps them in sync with the registry.

Usage

# regenerate every node
node tools/wiki-gen/bin/wiki-gen.js

# one node
node tools/wiki-gen/bin/wiki-gen.js nodes/rotatingMachine

# CI check: fail if any AUTOGEN block is out of date
node tools/wiki-gen/bin/wiki-gen.js --check

What it writes

For each registry descriptor:

Column Source
Canonical topic descriptor.topic
Aliases descriptor.aliases (deprecation candidates)
Payload descriptor.payloadSchema
Unit descriptor.units.measure + descriptor.units.default (or )
Effect descriptor.description

Out of scope (for now)

  • The data-model AUTOGEN block (sample of getOutput()) — requires instantiating the domain class, which depends on generalFunctions. The 9 wikis carry hand-written placeholders inside those markers; upgrading to runtime sampling is a follow-up.

Run after touching src/commands/index.js in any node, or as a CI gate.