npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@medicine-wheel/narrative-cluster

v0.4.13

Published

Narrative Cluster Processor — turn witnessed perceptual events / rushes into thematic clusters, narrative beats, and a Film Edit Brief (EDL markers)

Readme

@medicine-wheel/narrative-cluster

Turn witnessed production events into cinematic clusters, narrative beats, and a Film Edit Brief.

This package receives the output of @medicine-wheel/perception-layer and gives it an edit-facing structure: grouped rushes, Medicine Wheel-aligned beats, EDL-style markers, and narrative annotations. It is intentionally deterministic so a real transcript can become a testable vertical slice.

Why it exists

Episode 066 named a film-production path where agents help transform raw material into story without erasing relationship. Episode 067 sharpened the distinction between the Jerry thread of runtime observability and the Nicolas Renaud thread of Research is Ceremony. This package sits between perception and editing: it clusters witnessed events while preserving relational moments as first-class material.

Install

npm install @medicine-wheel/narrative-cluster

API

import {
  clusterEvents,
  clustersToBeats,
  generateEditBrief,
} from '@medicine-wheel/narrative-cluster';

const clusters = clusterEvents(
  events.map((event) => ({
    type: event.type,
    text: event.text,
    index: event.index,
    source: event.source,
  })),
);

const beats = clustersToBeats(clusters);
const brief = generateEditBrief(clusters, {
  title: 'Episode 066 rushes',
});

Main concepts

  • NarrativeCluster: a group of related events with a kind, theme, direction, and source events.
  • NarrativeBeat: a Medicine Wheel-aligned beat for downstream narrative engines.
  • EditBrief: ordered markers plus a CMX3600-style EDL text block.
  • EditMarker: deterministic timecode and annotation for an editable unit.

Cluster kinds

  • shot-sequence → usually East / vision
  • sound-environment → usually South / growth
  • relational-moment → usually West / reflection

Verification

The real vertical slice is covered by:

cd /workspace/repos/jgwill/medicine-wheel
npm run build:packages
npm test -- --run tests/film-production-vertical-slice.test.ts

That test uses the real Episode 066 transcript and proves:

  1. perceptual events → narrative clusters,
  2. clusters → Medicine Wheel-aligned beats,
  3. clusters → Film Edit Brief / EDL markers,
  4. storyteller and ceremony gates can complete the production loop.

Related issues

  • #85 — Episode 068 vertical slice
  • #87 — narrative cluster, storyteller gate, and production ceremony gates
  • #84 — Episode 068 plan-review audio steering context