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
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Use it when hardcoded `if/else` logic is too rigid, but a heavyweight workflow o
- AI-readable docs: [`docs/ai-coding-assistants.md`](docs/ai-coding-assistants.md), [`docs/public/llms.txt`](docs/public/llms.txt), and the official [`neuron-js` AI skill](docs/public/skills/neuron-js/SKILL.md)
- Comparison and migration guides: [`docs/comparisons/`](docs/comparisons/) for json-rules-engine, JsonLogic, node-rules, and if/else migrations
- Workflow automation recipes: [`docs/integrations/`](docs/integrations/) for n8n deterministic routing and LangGraph decision nodes
- Proof assets: [`docs/benchmarks/methodology.md`](docs/benchmarks/methodology.md) for the benchmark contract and [`docs/benchmarks/assets/generated/explainability-trace-diagram.md`](docs/benchmarks/assets/generated/explainability-trace-diagram.md) for the inspectable trace diagram

---

Expand All @@ -40,6 +41,19 @@ Use `neuron-js` when:

Do not use `neuron-js` when a simple hardcoded condition is clearer and rarely changes, when arbitrary user code execution is required, or when you need a full BPMN/process orchestration platform.

## Public proof assets

Neuron-JS proof material is published as methodology and inspectability artifacts first. Benchmark result claims remain blocked until the benchmark harness emits real measured output with `claims_allowed: true`.

<p align="center">
<img src="docs/benchmarks/assets/generated/explainability-trace-diagram.svg" alt="Neuron-JS diagram showing rule JSON and business input flowing through schema validation, developer registry, deterministic Synapse evaluation, result output, explanation trace, and audit-ready decision." width="760">
</p>

- 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)

---

## ✨ Features
Expand Down Expand Up @@ -160,6 +174,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)
- 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
2 changes: 2 additions & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ export default defineConfig({
{ text: 'Benchmarks & Visual Proof', link: '/benchmarks/' },
{ text: 'Benchmarks', 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/' }
]
Expand Down
12 changes: 11 additions & 1 deletion docs/benchmarks/assets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ docs/benchmarks/assets/
readme-proof-strip.md
storyboard/
playground-readme-gif.md
ai-rule-safety-carousel.md
generated/
benchmark-chart-throughput.svg
benchmark-chart-cold-start.svg
Expand All @@ -29,7 +30,7 @@ docs/benchmarks/assets/
## Folder rules

- `source-data/` stores benchmark input data and schemas only. Generated assets must cite these files when they include measurements.
- `prompts/` stores frozen prompts copied or split from `docs/benchmarks/prompt-kit.md` for repeatable generation.
- `prompts/` stores frozen prompts copied or split from `docs/benchmarks/prompt-kit.md` for repeatable generation. The benchmark chart prompt set lives at `prompts/benchmark-chart-prompts.md`; the methodology card prompt lives at `prompts/methodology-infographic.md`.
- `storyboard/` stores GIF/clip scripts, frame lists, and capture notes.
- `generated/` stores exported SVG/PNG/GIF/MP4 assets.

Expand All @@ -40,6 +41,15 @@ docs/benchmarks/assets/
- Real benchmark files must include `node_version`, `package_version`, `commit_sha`, `warmup_iterations`, and `measured_iterations`.
- Any generated benchmark chart must name its source data file in adjacent metadata or in the SVG metadata block.

## Generated assets

Current generated proof assets:

- `generated/methodology-card.svg`: 16:9 methodology card explaining no-fabricated-benchmark rules without performance numbers.
- `generated/explainability-trace-diagram.svg`: 16:9 SVG diagram showing business input -> schema validation -> registry -> rule evaluation -> match/fail trace -> deterministic decision.
- `generated/explainability-trace-diagram.html`: browser preview wrapper with caption and alt text.
- `generated/explainability-trace-diagram.md`: source grounding, caption, alt text, integrity notes, and export notes.

## Accessibility rules

Every final asset needs:
Expand Down
27 changes: 27 additions & 0 deletions docs/benchmarks/assets/asset-manifest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Benchmark visual asset manifest

Status: structure-only draft prompts. Final performance charts are blocked until measured benchmark output exists.

## Draft prompt assets

| Asset | Path | Claim status | Source dependency |
| --- | --- | --- | --- |
| Throughput chart prompt | `prompts/benchmark-chart-prompts.md#throughput-comparison-chart` | No numeric claim | actual benchmark output required |
| Cold-start chart prompt | `prompts/benchmark-chart-prompts.md#cold-start-comparison-chart` | No numeric claim | actual benchmark output required |
| Bundle-size chart prompt | `prompts/benchmark-chart-prompts.md#bundle-size-comparison-chart` | No numeric claim | actual benchmark output required |
| Validation-overhead chart prompt | `prompts/benchmark-chart-prompts.md#validation-overhead-chart` | No numeric claim | actual benchmark output required |
| Explanation-overhead chart prompt | `prompts/benchmark-chart-prompts.md#explanation-overhead-chart` | No numeric claim | actual benchmark output required |
| Methodology card prompt | `prompts/methodology-infographic.md` | Methodology only, no performance claim | `docs/benchmarks/methodology.md` |

## Intended generated output paths

- `generated/benchmark-chart-throughput.svg`
- `generated/benchmark-chart-cold-start.svg`
- `generated/benchmark-chart-bundle-size.svg`
- `generated/benchmark-chart-validation-overhead.svg`
- `generated/benchmark-chart-explanation-overhead.svg`
- `generated/methodology-card.svg`

## Publication blocker

Do not publish generated benchmark charts until the source file satisfies `result_kind: "actual_benchmark"`, `is_placeholder: false`, and `claims_allowed: true`.
46 changes: 46 additions & 0 deletions docs/benchmarks/assets/generated/explainability-trace-diagram.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Neuron-JS explainability trace diagram</title>
<style>
:root { color-scheme: dark; }
body {
margin: 0;
padding: 32px;
background: #020617;
color: #e5e7eb;
font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
main { max-width: 1600px; margin: 0 auto; }
figure { margin: 0; }
.frame {
border: 1px solid #1e293b;
border-radius: 24px;
overflow: hidden;
background: #020617;
}
img { display: block; width: 100%; height: auto; }
figcaption { margin-top: 16px; color: #94a3b8; font-size: 16px; line-height: 1.55; }
.meta {
margin-top: 10px;
color: #64748b;
font-family: "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;
font-size: 13px;
line-height: 1.5;
}
</style>
</head>
<body>
<main>
<figure>
<div class="frame">
<img src="./explainability-trace-diagram.svg" alt="Diagram showing business input and rule JSON flowing through schema validation, developer registry, deterministic Synapse evaluation, result output, match/fail explanation trace, and audit-ready decision; a dashed branch shows validation errors returning to a repair loop.">
</div>
<figcaption><strong>Caption:</strong> Neuron-JS turns serializable business-rule JSON into deterministic decisions by validating inputs, constraining execution through a developer-owned registry, and exposing a match/fail explanation trace for review.</figcaption>
<p class="meta"><strong>Source note:</strong> docs/schemas-validation-explainability.md and docs/benchmarks/visual-proof-system.md. No benchmark or performance claims are made.</p>
</figure>
</main>
</body>
</html>
37 changes: 37 additions & 0 deletions docs/benchmarks/assets/generated/explainability-trace-diagram.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Explainability trace diagram metadata

Asset: `explainability-trace-diagram`

Files:

- `docs/benchmarks/assets/generated/explainability-trace-diagram.svg`
- `docs/benchmarks/assets/generated/explainability-trace-diagram.html`

Caption:

Neuron-JS turns serializable business-rule JSON into deterministic decisions by validating inputs, constraining execution through a developer-owned registry, and exposing a match/fail explanation trace for review.

Alt text:

Diagram showing business input and rule JSON flowing through schema validation, developer registry, deterministic Synapse evaluation, result output, match/fail explanation trace, and audit-ready decision; a dashed branch shows validation errors returning to a repair loop.

Source grounding:

- `chaos-vault/50-research/neuron-js-growth-plan.md`, NJS-GROWTH-07 lines 294-318: proof assets objective and README visual proof baseline.
- `chaos-vault/50-research/neuron-js-marketing-assets-benchmark.md`, lines 87-100 and 160-174: honest benchmark proof, playground, trace panel, README GIF pattern.
- `chaos-vault/50-research/neuron-js-social-demand-gap.md`, lines 184-210: target pains and wedge around schema validation, deterministic guardrails, and explanation traces.
- `docs/benchmarks/visual-proof-system.md`: palette, typography, diagram rules, brand guardrails, and canonical trace flow.
- `docs/benchmarks/prompt-kit.md`: explainability trace diagram prompt, labels, branches, and negative constraints.
- `docs/schemas-validation-explainability.md`: validation, deterministic execution, normalized output, and explanation trace contracts.

Integrity notes:

- This asset contains no benchmark numbers, winner claims, speed claims, or unsupported performance claims.
- The diagram does not show arbitrary code execution or unsafe business-user publication.
- The registry is visible as the control boundary for approved actions, conditions, parameters, and rules.

Export notes:

- SVG canvas: 1600 x 900, 16:9.
- The SVG is directly embeddable in docs/README and can be exported to PNG with any SVG-capable browser or renderer.
- The HTML file previews the SVG with caption and alt text.
Loading