Narrative Walks

Narrative Walks turns a published graph snapshot into enumerated paths through concepts, pages, or paragraph-level nodes. It reads `SOURCE graph` from the lineup (via Frame integration), indexes nodes and typed relations, and computes either (a) **all walks** (all directed simple paths, including single-node walks) or (b) **basis walks** (maximal source→sink paths under the chosen edge-type filter). Use this page to confirm that some upstream producer is publishing under topic `graph`, to inspect available edge types, and to export walk sets as FedWiki plain text for downstream work (claim templates, topic maps, reading paths, or comparative “side road” analysis).

Provider frame

https://wiki.ralfbarkow.ch/assets/pages/narrative-walks/graph-source.html HEIGHT 60 SOURCE graph

Narrative Walks frame

https://wiki.ralfbarkow.ch/assets/pages/narrative-walks/narrative-walks.html HEIGHT 500

How it works (overview) 1. Provide a graph snapshot A producer (plugin or frame) publishes graph source data under topic `graph`. The snapshot is JSONL containing a `{nodes:[...], rels:[...]}` payload. 2. Index nodes and relations Nodes are identified by array index; node labels default to `node.type` (falling back to `id`/index). Relations are directed edges with an optional `type`. 3. Compute walks Two modes are supported: * All walks: enumerate directed simple paths up to a max-length cap (cycle-safe via “no node revisits”). * Basis walks: enumerate maximal paths (typically source→sink) under the same edge filter. 4. Export Exports a FedWiki-ready, plain-text section listing the computed walks, suitable for copy/paste into analysis pages. Minimal example A directed chain with eight nodes (N1→N2→…→N8) contains 36 distinct directed paths (every contiguous forward segment). More generally, a directed chain of length *n* contains *n·(n+1)/2* walks in “all walks” mode.

Local files (development)

pages/narrative-walks

`assets/pages/narrative-walks/` * `graph-source.html` (example producer) * `narrative-walks.html` (UI frame)

pages/narrative-walks/src

`assets/pages/narrative-walks/src/` * `frame.js` (Frame integration wrapper) * `graph-producer.js` (example publisher) * `narrative-walks.js` (walk engine)