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

@forgrit/design-intelligence

v0.1.0

Published

Embedding-based retrieval, hybrid scoring, RAG pipeline, and intelligence primitives for @forgrit/design-engine. Optional local LLM and ONNX runtime.

Downloads

168

Readme

@forgrit/design-intelligence

Embedding-based retrieval, hybrid scoring, RAG pipeline, and intelligence primitives for @forgrit/design-engine. The ML/LLM layer that turns design intent into ranked recipe selection.

npm version license: MIT

Status: early-access (v0.x). Pre-1.0 releases may include breaking changes in minor bumps until the API stabilizes at v1.0.0.

Node 20+. Hard deps: zod + @forgrit/design-engine@^0.1.2. Optional peer dep: onnxruntime-node (only if you want real MiniLM embeddings; package works without it via TF-IDF fallback).


What's in the box

Layered intelligence primitives for design-recipe selection:

TF-IDF + Validation

  • TfidfEngine, tokenize — text-similarity retrieval
  • ResponsiveIntentValidator — constraint-penalty checks for responsive design intent

Embedding + Retrieval

  • MiniLMEmbedder — MiniLM-L6 embeddings via optional onnxruntime-node peer
  • RecipeEmbeddingCache — persistent embedding cache for design recipes
  • DualRetriever — hybrid retrieval combining TF-IDF + embeddings
  • reciprocalRankFusion — RRF score combination for ranked lists

Scoring

  • HybridRecipeScorer + HybridRecipeSelector — weighted multi-signal recipe ranking
  • HybridScoringConfigSchema — Zod-validated config + getDefaultConfig / getFallbackConfig

Repair + LLM

  • SchemaRepairer — heal partial/broken Zod-shaped JSON from LLMs
  • LocalLLMRuntime — local node-llama-cpp runtime adapter (optional)
  • Planner — design-intent planning via LLM with confidence scoring
  • ConfidencePolicy — disagreement stats + fallback decisions

Versioning + Models

  • ManifestStore, buildManifest, diffManifests — versioned intelligence pipelines
  • ModelManager, MODEL_REGISTRY — model lifecycle + health

Memory + Critic

  • IntentMemory — design intent profile persistence
  • DesignCritic — dimensional critique + suggested-swap output

Training + Eval

  • FineTuningDatasetBuilder + QLoRATrainer — training pipeline primitives
  • Stage2EvalRunner, Stage3GraduationRunner, Stage4GraduationRunner — evaluation graduation gates
  • STAGE2_EXTENDED_PROMPTS, STAGE3_EXTENDED_PROMPTS — extended eval datasets

RAG + Review + Monitoring + Improvement + A/B

  • RAGPipeline — full RAG with re-ranking
  • HumanReviewSampler — human-review batch sampling
  • ProductionMonitor — alerts + latency tracking
  • ContinuousImprovementPipeline — closed-loop signal-to-config improvement
  • ABFramework — A/B trial orchestration + reporting

What it's NOT

  • Not a standalone design engine. Depends on @forgrit/design-engine for recipe data, semantics dictionary, and rule-based intelligence.
  • Not a model server. The LLM runtime is in-process via optional node-llama-cpp.
  • Not a hosted vector DB. Embeddings cache to local files; bring your own scale-out store.

Install

npm install @forgrit/design-intelligence @forgrit/design-engine
# or
pnpm add @forgrit/design-intelligence @forgrit/design-engine

For real embedding inference (optional):

npm install onnxruntime-node

For local LLM runtime (optional):

npm install node-llama-cpp

Quick start

import { TfidfEngine, tokenize } from '@forgrit/design-intelligence';
import { DESIGN_RECIPES } from '@forgrit/design-engine';

// 1. Build a TF-IDF index over the design recipes
const engine = new TfidfEngine();
for (const recipe of DESIGN_RECIPES) {
  engine.addDocument(recipe.id, recipe.description ?? recipe.id);
}

// 2. Query
const results = engine.search('admin dashboard with charts', { topK: 5 });
console.log(results); // [{ id, score }, ...]

Versioning

0.1.x is early-access. The public API may evolve before 1.0.0 locks semver.

License

MIT — see LICENSE.

Links

  • npm: https://www.npmjs.com/package/@forgrit/design-intelligence
  • Source: https://github.com/forgrit-ai/forgrit/tree/main/packages/design-intelligence
  • Issues: https://github.com/forgrit-ai/forgrit/issues
  • ForGrit: https://forgrit.ai

Sibling packages