Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,9 @@ Measured throughput, cold-start, bundle-size, validation, and explanation overhe

### Methodology and inspectability

- Benchmark methodology and result contract: [`docs/benchmarks/methodology.md`](docs/benchmarks/methodology.md)
- Explainability proof metadata and alt text: [`docs/benchmarks/assets/generated/explainability-trace-diagram.md`](docs/benchmarks/assets/generated/explainability-trace-diagram.md)
- Visual proof system and publication guardrails: [`docs/benchmarks/visual-proof-system.md`](docs/benchmarks/visual-proof-system.md)
- Playground README demo capture spec: [`docs/playground/readme-demo-capture.md`](docs/playground/readme-demo-capture.md)
- Benchmark methodology (how each metric is measured): [`docs/benchmarks/methodology.md`](docs/benchmarks/methodology.md)
- AI-rule safety (why AI-drafted rules need validation): [`docs/benchmarks/ai-rule-safety.md`](docs/benchmarks/ai-rule-safety.md)
- Proof overview and explainability diagram: [`docs/benchmarks/`](docs/benchmarks/)

---

Expand Down Expand Up @@ -184,7 +183,7 @@ Available adoption assets:

- Runnable examples: [`examples/`](examples/) including n8n and LangGraph workflow automation recipes
- JSON Schemas, validation, and explain output: [`docs/schemas-validation-explainability.md`](docs/schemas-validation-explainability.md)
- Benchmark methodology, visual proof, and playground capture specifications: [`docs/benchmarks/`](docs/benchmarks/) and [`docs/playground/readme-demo-capture.md`](docs/playground/readme-demo-capture.md)
- Measured benchmarks, methodology, and AI-rule-safety proof: [`docs/benchmarks/`](docs/benchmarks/)
- Comparison and migration guides: [`docs/comparisons/`](docs/comparisons/) for choosing and migrating from json-rules-engine, JsonLogic, node-rules, and hand-written if/else
- AI-readable docs: [`docs/ai-coding-assistants.md`](docs/ai-coding-assistants.md), [`docs/public/llms.txt`](docs/public/llms.txt), [`docs/public/llms-full.txt`](docs/public/llms-full.txt), and [`docs/public/skills/neuron-js/SKILL.md`](docs/public/skills/neuron-js/SKILL.md)

Expand Down
12 changes: 4 additions & 8 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,12 @@ export default defineConfig({
]
},
{
text: 'Proof Assets',
text: 'Benchmarks & Proof',
items: [
{ text: 'Benchmarks & Visual Proof', link: '/benchmarks/' },
{ text: 'Overview', link: '/benchmarks/' },
{ text: 'Benchmark Results', link: '/benchmarks/results' },
{ text: 'Benchmark Methodology', link: '/benchmarks/methodology' },
{ text: 'Visual Proof System', link: '/benchmarks/visual-proof-system' },
{ text: 'Benchmark Visual Pack', link: '/benchmarks/benchmark-visual-pack' },
{ text: 'Playground Capture Spec', link: '/playground/readme-demo-capture' },
{ text: 'Prompt Kit', link: '/benchmarks/prompt-kit' },
{ text: 'Asset Folder', link: '/benchmarks/assets/' }
{ text: 'Methodology', link: '/benchmarks/methodology' },
{ text: 'AI-Rule Safety', link: '/benchmarks/ai-rule-safety' }
]
},
{
Expand Down
49 changes: 49 additions & 0 deletions docs/benchmarks/ai-rule-safety.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# AI-rule safety

LLMs are great at *drafting* JSON business rules — and that's exactly the risk. A
plausible-looking rule can still encode the wrong field, the wrong threshold, or the wrong
action. Neuron-JS exists so AI-drafted rules become **safe to run**: schema-validated,
constrained to a developer-owned vocabulary, reviewable like code, and explainable after the
fact.

> AI drafts. Neuron-JS verifies.

## 1. AI can draft rules

A plausible JSON rule can still encode the wrong assumption, field, or action — it is not
production-ready on its own.

![A developer inspects an amber LLM-generated JSON rule card. A small rose warning marker highlights a risky business assumption, with text saying the draft is not production-ready.](./assets/generated/ai-rule-safety-carousel-1.svg)

## 2. Validate before runtime

Schema-first checks (`validateScript`) reject malformed scripts before they ever execute, and
return the exact JSON path to fix.

![A JSON rule passes through a schema validation gate. One invalid path is blocked in rose with an exact JSON path, while a corrected rule exits with an emerald pass marker.](./assets/generated/ai-rule-safety-carousel-2.svg)

## 3. Constrain what can run

A developer-owned registry defines the approved actions, conditions, parameters, and rules.
Anything outside that vocabulary simply cannot execute — no arbitrary code.

![A validated rule enters a developer-owned registry boundary. Approved action and condition tiles connect in cyan, while an unapproved action is blocked outside the boundary.](./assets/generated/ai-rule-safety-carousel-3.svg)

## 4. Review like code

Generated rules are serializable data, so they go through the same governance as code: tests,
owner approval, and rollback — never automatic AI approval.

![A generated rule card sits beside a review checklist showing tests, owner approval, and rollback snapshot. The visual emphasizes governance before production use.](./assets/generated/ai-rule-safety-carousel-4.svg)

## 5. Then execute deterministically

Synapse runs the approved rule path deterministically, and the explanation trace shows why the
decision matched or failed — ready for audit, logs, or a support ticket.

![An approved JSON rule flows into a Synapse execution node. A result card and violet explanation trace rows show why the rule matched and what action ran, with the caption "AI drafts. Neuron-JS verifies."](./assets/generated/ai-rule-safety-carousel-5.svg)

## In short

`Validate → constrain → test → approve → execute → explain.` Deterministic workflow logic with
auditability is the guardrail that makes AI-assisted business rules safe to ship.
68 changes: 0 additions & 68 deletions docs/benchmarks/assets/README.md

This file was deleted.

36 changes: 0 additions & 36 deletions docs/benchmarks/assets/asset-manifest.md

This file was deleted.

46 changes: 0 additions & 46 deletions docs/benchmarks/assets/generated/ai-rule-safety-carousel.md

This file was deleted.

46 changes: 0 additions & 46 deletions docs/benchmarks/assets/generated/explainability-trace-diagram.html

This file was deleted.

37 changes: 0 additions & 37 deletions docs/benchmarks/assets/generated/explainability-trace-diagram.md

This file was deleted.

30 changes: 0 additions & 30 deletions docs/benchmarks/assets/generated/methodology-card.md

This file was deleted.

Loading