Use when adding the Explainer DAG to any Effortless project — a generated, embedded visualization of the rulebook's calculated-field DAG that lets users click any cell/field and see exactly how it was derived (raw inputs → lookups → calcs → aggregations), with RuleSpeak prose baked in at transpile time. Works in React, Vue, plain HTML, Flask/Jinja, HTMX, etc. via the portable `rulebook-to-explainer-dag` transpiler (vanilla JS + CSS, no React dependency).
Triggers: "add the explainer dag", "wire up the explainer", "install the effortless explainer dag", "show the DAG in the UI", "rulebook-to-explainer-dag", "explain a calculated field visually", "make calculated fields clickable", "data-er-dag", "explainer DAG".
**Scope (load gate):** Loads **on demand only** — when the user explicitly wants in-app field provenance / DAG visualization. **Not** part of the default demo/POC bootstrap (that uses `rulebook-to-rulespeak` via effortless-rulespeak). Effortless projects with a web UI (any stack). Does not require Airt
Installation
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Use when adding the Explainer DAG to any Effortless project — a generated, embedded visualization of the rulebook's calculated-field DAG that lets users click any cell/field and see exactly how it was derived (raw inputs → lookups → calcs → aggregations), with RuleSpeak prose baked in at transpile time. Works in React, Vue, plain HTML, Flask/Jinja, HTMX, etc. via the portable `rulebook-to-explainer-dag` transpiler (vanilla JS + CSS, no React dependency).
Triggers: "add the explainer dag", "wire up the explainer", "install the effortless explainer dag", "show the DAG in the UI", "rulebook-to-explainer-dag", "explain a calculated field visually", "make calculated fields clickable", "data-er-dag", "explainer DAG".
**Scope (load gate):** Loads **on demand only** — when the user explicitly wants in-app field provenance / DAG visualization. **Not** part of the default demo/POC bootstrap (that uses `rulebook-to-rulespeak` via effortless-rulespeak). Effortless projects with a web UI (any stack). Does not require Airtable. **This is the ONLY skill for explainer DAG work.** Do not load `effortless-react-explainer-dag` (deprecated — wrong transpiler, wrong integration model).
audience
customer
Effortless Explainer DAG — one-prompt integration playbook
On-demand, not default. Demo/POC apps install rulebook-to-rulespeak
instead (see effortless-rulespeak). Load this skill only when the user
asks for clickable in-app field provenance or DAG pages.
Portable inference visualizer generated from effortless-rulebook.json.
Users hover a derived cell for RuleSpeak + upstream chips, double-click
(or follow a link) for the full field DAG page. Purely additive — mark
cells with data-er-dag, mount scripts + routes, done.
Deprecated:rulebook-to-react-explainer-dag and <DagCell> are
superseded. Remove that transpiler from effortless.json if present.
Use rulebook-to-explainer-dag + data-er-dag instead.
Agent hard rules — do NOT roll your own
Read this section before writing any app code. The transpiler output is the
UI; the host only serves files and pastes one snippet.
Do:
effortless -install rulebook-to-explainer-dag (registers transpiler in effortless.json)
effortless build or ./start.sh build — hosted transpiler only
Serve /rulebook-explainer-dag/* as static files from generated output
Copy integrate/snippet.html into the host layout (link + scripts + init)
Route /dag/* to the tool's own pages/*.htmlor use mode: "modal"
Mark derived display cells: data-er-dag="Table.Field" (PascalCase)
After dynamic DOM updates (HTMX, React lists): one call to enhanceCells()
Do NOT create or document any of the following:
Forbidden
Why
Local transpiler dev server (port 30071, run-local-tool.sh)
Custom Jinja/HTML shell wrapping DAG pages (dag_shell.html)
Tool ships self-contained pages/*.html + dag.css
CSS overrides for .dag-cell, .dag-hovercard, etc.
Use generated dag.css only
Patch scripts for generated explainer-dag.js
Fix the transpiler version; don't patch in app repos
Reimplementing hover cards, toggles, or DAG page renderers
All live in explainer-dag.js
Before writing host code: open the generated
rulebook-explainer-dag/integrate/snippet.html and
integrate/README.md. If your plan deviates from those files, stop.
Host code budget: static mount + snippet paste + routes (if path mode) +
data-er-dag markers + (optional) one inline enhanceCells hook. ~30 lines
max outside the generated folder.
One-prompt execution order
Do these steps in order without pausing to redesign. Adapt paths
(web/public, rulebook filename) to the project; keep the sequence.
Install transpiler + add ProjectTranspilers entry → run build
Serve generated static assets from the web root
Load the five JS/CSS files + call EffortlessExplainer.init()
Add DAG routes (or hash/modal equivalent)
Mount the ƒ-glyph toggle in the shell/header
Mark every derived display cell with data-er-dag="Table.Field"
Re-run enhanceCells() after React/Vue renders dynamic lists
Smoke-test: toggle, hover, double-click, upstream navigation, back
1. Transpiler
Name:rulebook-to-explainer-dag (pure JS; no React codegen)
Install (once per project, from repo root or any subdir):
effortless -install rulebook-to-explainer-dag
Add to effortless.json — append after postgres transpilers /
init-db.sh (codegen only, no DB side-effects):
Add <div id="effortless-explainer-outlet"></div> on your DAG page shell;
renderFromHash() runs automatically when the outlet exists.
Path + server routes (Flask, Rails, Express templates)
Serve pages/index.html, pages/table.html, pages/field.html at
/dag, /dag/:table, /dag/:table/:field, or one template with
<div id="effortless-explainer-outlet"> + mode: "path".