Serializable JSON Rules
Store, version, transmit, and audit business logic as data instead of burying decisions in brittle if/else branches.
SOURCE_RELEASE :: v0.5.2
AI-friendly TypeScript rules engine for serializable JSON business rules and deterministic workflow decisions.
Use Neuron-JS when hardcoded conditions are too rigid, but a full workflow platform is too heavy. Define approved rules as data, validate them, execute them predictably, and explain the result.
RULE_ENGINE_SURFACE
Store, version, transmit, and audit business logic as data instead of burying decisions in brittle if/else branches.
JSON Schemas and validation helpers let teams and AI agents reject malformed generated rules before execution.
Run the same pricing, eligibility, routing, policy, or feature-targeting contract in Node.js or the browser.
REGISTRY_ENGINE_PATTERN
Neuron owns the approved vocabulary: actions, conditions, parameters, rules, and lifecycle hooks. Your application decides what generated or stored JSON is allowed to do.
Synapse executes the serializable script against a runtime context, then returns a result that can be summarized, validated, and explained for logs, tests, or human review.
// pricing-rules.script.json
{
"id": "pricing-decision",
"rules": [
{ "type": "simple_rule", "conditions": [ ... ], "actions": [ ... ] }
]
}
VALIDATE: validateScript(script)
EXECUTE: new Synapse(new Neuron()).execute(...)
EXPLAIN: explainExecution(...)
0.5.x_ADOPTION_SURFACE
AI_READABLE_DOCS
The public docs expose runnable examples, schema contracts, validation and explainability guidance, `llms.txt`, `llms-full.txt`, and an official skill so coding agents can use Neuron-JS without inventing APIs.