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

@heady-ai/sacred-geometry-sdk

v4.0.0

Published

Sacred Geometry framework for autonomous multi-agent orchestration — Golden Ratio (φ) capacity allocation, Base-13 tier classification, Octree-indexed 3D vector memory, and Fibonacci-weighted template selection.

Readme

@heady-ai/sacred-geometry-sdk

Sacred Geometry framework for autonomous multi-agent orchestration — Golden Ratio (φ) capacity allocation, Base-13 tier classification, Octree-indexed 3D vector memory, and Fibonacci-weighted template selection.

Version License

Installation

npm install @heady-ai/sacred-geometry-sdk

Quick Start

const sg = require('@heady-ai/sacred-geometry-sdk');

// ── Golden Ratio Constants ──
console.log(sg.PHI);        // 1.6180339887498948
console.log(sg.PHI_INV);    // 0.6180339887498949
console.log(sg.BASE);       // 13

// ── Capacity Planning ──
const planner = new sg.CapacityPlanner('medium');
const alloc = planner.allocate('agent-A', 'agent-B', 1000);
// → { primary: { budget: 618 }, secondary: { budget: 382 }, ratio: "61.8% / 38.2%" }

const retry = planner.retryDelay(3);
// → 4236ms (1000 × φ³)

// ── 3D Spatial Embedding ──
const embedder = new sg.SpatialEmbedder();
const vec = embedder.embed({
    content: 'deploy heady-systems to production',
    domain: 'deployment',
    depth: 2
});
// → { x: 0.236..., y: 0.987..., z: 0.381... }

// ── Octree Memory Index ──
const tree = new sg.OctreeManager();
tree.insert(vec);
const nearby = tree.queryRadius({ x: 0.2, y: 0.9, z: 0.4 }, 0.1);

// ── Template Selection ──
const engine = new sg.TemplateEngine();
engine.loadTemplates(myRegistry);
const best = engine.select('autonomous-deploy', 3);

Modules

Principles (sg.principles)

Core mathematical foundation. ALL system parameters derive from three roots:

| Constant | Value | Usage | |----------|-------|-------| | φ (PHI) | 1.618... | Capacity, retry timing, load splits, UI proportions | | Base-13 | 13 | Tier classification, quality scoring, thresholds | | Log-42 | 42 | Logarithmic scaling for normalization |

Functions: phiScale, goldenSplit, phiBackoff, phiThresholds, phiHarmonics, toBase13, fromBase13, log42, toTier, capacityParams, designTokens, goldenColor, phiTiming

Spatial Embedder (sg.SpatialEmbedder)

Maps any data payload to 3D coordinates:

| Axis | Dimension | Encoding | |------|-----------|----------| | X | Semantic Domain | Golden angle distribution of content categories | | Y | Temporal State | Normalized timestamp [0,1] | | Z | Hierarchy Level | φ^(-depth) normalization |

Octree Manager (sg.OctreeManager)

O(log n) spatial memory index with Base-13 subdivision:

const tree = new sg.OctreeManager({ maxItemsPerNode: 13, maxDepth: 13 });
tree.insert({ x: 0.5, y: 0.5, z: 0.5, id: 'memory-1' });
tree.queryRange({ minX: 0, minY: 0, minZ: 0, maxX: 0.6, maxY: 0.6, maxZ: 0.6 });
tree.queryRadius({ x: 0.5, y: 0.5, z: 0.5 }, 0.1);
tree.nearest({ x: 0.5, y: 0.5, z: 0.5 }, 5); // k-NN

Memory: 12 bytes per vector (3 × float32) — 250× reduction vs traditional embeddings.

Template Engine (sg.TemplateEngine)

Fibonacci-weighted 6-dimensional template scoring:

const engine = new sg.TemplateEngine({
    weights: { skills: 0.20, workflows: 0.20, nodes: 0.10,
               headyswarmTasks: 0.25, bees: 0.15, situations: 0.10 }
});
engine.loadTemplates(registry);
const best = engine.select('incident-response', 3);
const coverage = engine.coverageReport(['incident-response', 'autonomous-deploy']);

Capacity Planner (sg.CapacityPlanner)

φ-derived resource allocation:

const planner = new sg.CapacityPlanner('enterprise'); // 13⁴ = 28561 base
planner.allocate('primary', 'secondary', 10000); // 61.8% / 38.2% split
planner.retryDelay(5);         // φ⁵ × 1000 = 11090ms
planner.alertThresholds(5);    // [61.8%, 85.4%, 94.4%, 97.8%, 99.2%]
planner.scaleForLevel(3);      // scale down capacity by φ³
planner.classify(0.85);        // → { tier: 11, label: 'critical', base13: 'B' }

Mathematical Foundation

See whitepaper: Sacred Geometry in Multi-Agent AI Coordination

License

© 2026 Heady™Systems Inc.. All rights reserved. Proprietary — see LICENSE for terms.