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

@astralarkitekt/tau-tongue

v3.9.1

Published

Tau-Tongue is a symbolic narrative algebra for meaning-making and storytelling, designed to help users construct and explore narratives through a structured framework.

Downloads

514

Readme

@astralarkitekt/tau-tongue

A symbolic narrative algebra for meaning-making and storytelling.

Version TypeScript


What Is Tau-Tongue?

Tau-Tongue is a deterministic symbolic pipeline that transforms any text into structured narrative data. It converts input text to numbers via Pythagorean numerology, reduces those numbers to digital roots, generates symbolic equations from a 256-operator algebra, decomposes those equations into braids, derives a crucible (thematic core), identifies antagonistic forces, locates inflection points, and produces a full narrative interpretation.

It is not AI. There is no neural network. It is pure algebraic structure — and yet the outputs land with an uncanny resonance because the mathematics of reduction naturally surfaces archetypal patterns in language.

As of v3.6.9, the entire pipeline is config-injectable. Supply a TauTongueConfig object and every layer — from digital root reduction through narrative interpretation — operates within your custom symbolic system.

The constraint doesn't change. The vocabulary does.

Learn more about how to use Tau-Tongue on the Astral Architecture blog!

Tau-Tongue & Braidcraft: My secret sauce to writing better faster

Website in the works!


Quick Start

npm install @astralarkitekt/tau-tongue
import { TauTongueInterpreter } from '@astralarkitekt/tau-tongue';

const interpreter = new TauTongueInterpreter();
const result = interpreter.interpret('Once upon a time');

console.log(result.archetype);           // "The Dreamweaver"
console.log(result.resonance);           // "SOURCE"
console.log(result.symbolicEquation);    // "∂(1, [∇(3,4),⊗(1,3,9,2,4,4,6), ...])"
console.log(result.crucible);            // "≳(8) - A mythic potential (≳) acting upon The Mechanist"
console.log(result.narrativeInterpretation);

The TauTongueResult object contains everything: digital root, archetype, resonance, symbolic equation, braid breakdown, crucible, antagonist, inflection points, archetypal matrix, VDS (Variant Density Score), and narrative interpretation.


Custom Symbolic Systems

The headline feature of v3. Pass a TauTongueConfig to the constructor and the entire pipeline adapts:

import { TauTongueInterpreter, SceneFunction } from '@astralarkitekt/tau-tongue';

const jungian = new TauTongueInterpreter({
  archetypeMap: {
    1: 'The Hero',
    2: 'The Shadow',
    3: 'The Anima',
    // ... up to 12
  },
  archetypeDescriptions: {
    'The Hero': 'The conscious ego embarking on the journey...',
    'The Shadow': 'The repressed darkness...',
    // ...
  },
  resonanceMap: {
    1: 'QUEST',
    2: 'REPRESSION',
    3: 'INTUITION',
    // ...
  },
  resonanceDescriptions: {
    'QUEST': 'The call to adventure...',
    // ...
  },
  archetypeFunctionMap: {
    1: SceneFunction.ACTION,
    2: SceneFunction.FLASHBACK,
    // ...
  },
  typalNumbers: [10, 11, 12],
});

const result = jungian.interpret('What does the shadow want?');
console.log(result.archetype); // A Jungian archetype, not BraidCraft

TauTongueConfig

Every field is optional. Omitted fields fall back to the BraidCraft defaults.

| Field | Type | Description | |-------|------|-------------| | archetypeMap | Record<number, string> | Digital root → archetype name. Keys define valid reduction endpoints. | | archetypeDescriptions | Record<string, string> | Archetype name → prose description. | | resonanceMap | Record<number, string> | Digital root → resonance label (e.g. "QUEST"). | | resonanceDescriptions | Record<string, string> | Resonance label → prose description. | | archetypeFunctionMap | Record<number, SceneFunction> | Digital root → narrative scene function (used by TauSpine). | | symbolMap | Record<string, SymbolDefinition> | Custom operator algebra — symbol → definition. | | typalNumbers | number[] | Numbers that halt digital-root reduction (default: [11, 22]). |

Typal Numbers

A typal number is any multi-digit number you want to preserve as a valid reduction endpoint instead of summing it down to a single digit. In the default BraidCraft system, 11 and 22 are typal. In a Norse system you might use [24] for the Elder Futhark count. In a Jungian system, [10, 11, 12].

Single-digit numbers (1–9) don't need to be listed — they're natural endpoints by definition.

Config-Aware Numerology Mapping

New in v3.8.0. When a custom archetypeMap is provided, the interpreter automatically builds a config-derived A-Z mapping by cycling the alphabet over the sorted root set. This means multi-digit values like 10, 11, 12 appear natively in the numeroCipher, braids, interference wave, and archetypal matrix — no post-processing required.

For example, a Jungian config with archetype keys [1–12] produces:

A=1  B=2  C=3  D=4  E=5  F=6  G=7  H=8  I=9  J=10  K=11  L=12
M=1  N=2  O=3  P=4  Q=5  R=6  S=7  T=8  U=9  V=10  W=11  X=12
Y=1  Z=2

When no custom archetypeMap is provided, the traditional Pythagorean mapping (cycling 1–9) is used unchanged. Default-config behaviour is fully preserved.

Fracticulation

New in v3.8.0. Fracticulation generates variant braids via cipher-cycle evolution. Each braid in a result can branch into up to 3 variants based on its Variant Density Score (VDS) — a measure of pressure density derived from the braid's digit composition.

const result = interpreter.interpret('Once upon a time');
const fracticulated = await interpreter.fracticulatize(result);

// Each braid now has a .variants array and .vds score
fracticulated.braid.forEach(b => {
  console.log(b.equation, b.vds?.variantCount, b.variants?.length);
});

VDS is also computed automatically by interpret() and available on result.vds.


API Reference

Core: TauTongueInterpreter

const interpreter = new TauTongueInterpreter(config?: TauTongueConfig);

| Method | Returns | Description | |--------|---------|-------------| | interpret(input) | TauTongueResult | Full pipeline: text → digital root → equation → braid → crucible → narrative. | | getCrucible(equation, digitalSum, resonance, archetype) | string | Extract the crucible operator and description from a symbolic equation. | | getCrucibleFunction(equation) | string | New in 3.9.0. Extract just the crucible operator/function from a symbolic equation. | | getMicroCrucible(braidFunction) | string | Get a micro-crucible from a single braid function. | | getAntagonist(equation) | TauTongueAntagonist | Extract the antagonist (longest braid) from the symbolic equation. | | analyzeInterference(result) | InflectionPoint[] | Locate inflection points between braid functions and the interference wave. | | getInterferenceWave(result) | number[] | Calculate the Braid Interference Wave. | | extractArchetypalMatrix(equation) | ArchetypalMatrix | Analyze the archetypal distribution of a symbolic equation. | | extractNarrativePalette(braid) | NarrativePalette | Analyze the distribution of scene functions across the braid. | | calculateVDS(result) | VDSResult | Calculate Variant Density Scores for all braids. | | fracticulatize(result) | Promise<TauTongueResult> | Generate braid variants via cipher-cycle fracticulation. | | getFunctionDescription(func) | string | Get a prose description for a symbolic function string. | | getSymbol(symbol) | SymbolDefinition \| undefined | Look up a symbol definition from the configured symbol map. | | getSymbols() | string[] | Get all symbol keys from the configured symbol map. | | render(canvas, result, options?) | void | Render the tau spiral visualization on an HTML canvas. |

Standalone Fracticulation Helpers (New in 3.9.0)

You can now use these helpers directly without instantiating the interpreter:

import { fracticulateBraid, fracticulatize } from '@astralarkitekt/tau-tongue';

const braidVariants = await fracticulateBraid('∇(3,4,5)', 3, 7);
// Returns up to 3 braid variants for the given equation and resonance

const result = interpreter.interpret('Once upon a time');
const enriched = await fracticulatize(result);
// Returns a TauTongueResult with .variants arrays on eligible braids

Legacy Interpreters (v1 & v2)

The pre-config-injection interpreters are available under aliased exports for backward compatibility or comparison:

import { TauTongueInterpreterV1, TauTongueInterpreterV2 } from '@astralarkitekt/tau-tongue';
import type { TauTongueResultV1, TauTongueResultV2 } from '@astralarkitekt/tau-tongue';

const v2 = new TauTongueInterpreterV2();
const result = v2.interpret('some text'); // Uses hardcoded BraidCraft defaults

These are frozen at their original implementations — no config injection, no TauTongueConfig. Use the primary TauTongueInterpreter (v3) for new work.

Narrative Structure: TauSpine

TauSpine extends TauTongueInterpreter and generates recursive narrative trees from interpreted results.

import { createTauSpine, SpineFormat } from '@astralarkitekt/tau-tongue';

const spine = await createTauSpine('Once upon a time', SpineFormat.NOVEL);
console.log(spine.spine);  // TauSpineNode[]
console.log(spine.stats);  // { totalNodes, maxDepth, generationTime }

// Or with a custom config:
const spine = await createTauSpine('Once upon a time', SpineFormat.NOVEL, jungianConfig);

SpineFormat determines the narrative scope:

| Format | Value | Description | |--------|-------|-------------| | SHORT | 6 | Short story | | NOVELETTE | 7 | Novelette | | NOVELLA | 8 | Novella | | NOVEL | 9 | Novel | | EPIC | 11 | Epic | | SAGA | 22 | Saga |

Spine results can be flattened to a simple scene list via spine.flatten(), and scene paths formatted with getPath(scene).

Pythagorean Utilities

Low-level functions for numerological reduction. These accept an optional PythagoreanConfig (derived automatically when using TauTongueInterpreter).

| Function | Description | |----------|-------------| | convertToNumbers(text) | Convert text to a string of Pythagorean digit values. | | calculateDigitalRoot(numStr, config?) | Reduce a number string to its digital root, respecting typal numbers. | | cipherCycle(numeroCipher, resonance, config?) | Generate a cipher cycle string (async). | | extractBraidDigits(equation) | Extract braid digits from a symbolic equation string. | | integerStringFromBase36(bs) | Convert a base-36 string to its integer representation. |

Symbol Algebra

import { DEFAULT_SYMBOL_MAP } from '@astralarkitekt/tau-tongue';
import type { SymbolDefinition } from '@astralarkitekt/tau-tongue';

Each SymbolDefinition contains:

| Field | Type | Description | |-------|------|-------------| | name | string | Display name (e.g. "Partial Derivative") | | mathMeaning | string | Formal mathematical meaning | | metaphoricalMeaning | string | Narrative meaning used in interpretation |

Phoneme Generation

import { generatePhonemeticNames } from '@astralarkitekt/tau-tongue';

const names = generatePhonemeticNames('12345', 0, 10);
// Returns 10 phonemic word variations derived from the numerocipher

Default Constants

All BraidCraft defaults are available as named exports:

  • DEFAULT_ARCHETYPE_MAP
  • DEFAULT_ARCHETYPE_DESCRIPTIONS
  • DEFAULT_RESONANCE_MAP
  • DEFAULT_RESONANCE_DESCRIPTIONS
  • DEFAULT_ARCHETYPE_FUNCTION_MAP
  • DEFAULT_SYMBOL_MAP
  • DEFAULT_TYPAL_NUMBERS

Types

All TypeScript types are exported:

import type {
  TauTongueConfig,
  TauTongueResult,
  TauTongueAntagonist,
  BraidInterpretation,
  InflectionPoint,
  NarrativePalette,
  RenderOptions,
  PythagoreanConfig,
  SymbolDefinition,
  TauSpineNode,
  TauSpineResult,
  FlattenedTauSpineResult,
  FlattenedScene,
  ArchetypalMatrix,
  ArchetypalEntry,
  VDSResult,
  BraidVariantScore,
  BraidVariant,
  FormatData,
  UnitSpec,
} from '@astralarkitekt/tau-tongue';

Demo Gallery

Live demos at tools.astralarchitecture.com/tau-tongue:

| Demo | Description | |------|-------------| | Interpreter | Full result workbench — digital root, archetype, equation, braid, crucible, narrative. | | Spine Generator | Recursive TauSpine tree visualization from input text. | | TauFracticulate | Fracticulation explorer — VDS scoring, braid variants, cipher-cycle evolution. | | TauSigils | Ethereal continuous-line sigil drawings from braid structure. | | TauGlyphs | Colored node graphs showing structural braid relationships. | | TauAlchemy | Animated alchemical seal geometry driven by braid data. | | TauAstrolabe | Alchemical system (v3 config) — celestial orbit visualization. | | TauAether | Norse Runic system (v3 config) — organic aether energy fields. | | Jung-Tongue | Jungian chatbot — 12 archetypes, session persistence, voice input. |


Project Structure

src/
  index.ts                          # Public API re-exports
  pythagoreanUtils.ts               # Numerological reduction utilities
  phonemeCipher.ts                  # Phonemic name generation
  tau-tongue/
    TauTongueInterpreter_v3.ts      # Core interpreter — config-injectable (v3)
    TauTongueInterpreter_v2.ts      # Legacy interpreter (v2, pre-config)
    TauTongueInterpreter_v1.ts      # Legacy interpreter (v1)
    TauSpine.ts                     # Recursive narrative structure generator
    TauTongueSymbolMap.ts           # 256-operator symbol algebra
    TauTongueRenderer.ts            # Canvas spiral renderer
    TauTongueFictionTypeMap.ts      # Fiction type classification
    TauTomeCoverRenderer.ts         # Book cover generation
    symbol-map.json                 # Symbol definitions data
    archetype-fiction-type-map.json  # Archetype → fiction type mapping
    story-unit-specs.json           # Narrative unit specifications
demos/
  interpreter.html                  # Full result workbench
  spine-generator.html              # TauSpine tree visualizer
  TauFracticulate.html              # Fracticulation / VDS explorer
  TauSigils.html                    # Sigil art renderer
  TauGlyphs.html                    # Glyph graph renderer
  TauAlchemy.html                   # Alchemical seal geometry
  TauAstrolabe.html                 # Alchemical config demo (v3)
  TauAether.html                    # Norse Runic config demo (v3)
  JungTongue.html                   # Jungian chatbot demo
  jung-tongue-config.js             # Jungian symbolic system config
simulations/
  fracticulate.ts                   # VDS distribution simulation (10k epochs)
  jung-interference-test.ts         # Multi-digit config verification tests

Development

git clone https://github.com/astralarkitekt/tau-tongue.git
cd tau-tongue
npm install
npm run build          # Compiles TypeScript to dist/

Demos load from ../dist/index.js as ES modules — open any HTML file in demos/ after building.


Author

Astral Arkitekt[email protected]

Built with deterministic algebra, insomnia, and an unreasonable amount of love. I mean coffee.