rustcrates.git / rete / CLAUDE.md

For agents, on top of README.md, which they read first.

  • No I/O, no async, no host vocabulary. Nothing here may name Jev, a model, a fact of any one host, worker or a runtime. A host's facts live in its own Domain; the tests use a domain of their own for that reason.
  • The network is the only decider. decide evaluates the joins that a drawing draws. Do not add a second path that decides from facts directly: the picture would stop being the thing that runs.
  • Rule order is priority, in code and in a file. Loaded rules go after compiled-in ones, so a user's rule cannot outrank the host's.
  • Loading refuses by default. Domain::parse_* returning Err is how a host keeps an effect, end or note out of users' hands. Never loosen the defaults, and never let a loaded rule name something the domain did not put in its vocabulary.
  • A trace is names, ids and counts. A Record must never carry a value's content; the domain's value_name is a name of a kind of value, not the value.
  • A change to decide must keep lmjtfy's tests passing unchanged (packages/rules there), since its behaviour is this function's.