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

@getmikk/intent-engine

v1.8.0

Published

> Parse developer intent, detect constraint conflicts, and find functions by meaning.

Downloads

1,012

Readme

@getmikk/intent-engine

Parse developer intent, detect constraint conflicts, and find functions by meaning.

npm License: Apache-2.0

Two capabilities in one package: a pre-flight pipeline that catches architectural conflicts before code is written, and a semantic search engine that finds functions by natural-language description using local vector embeddings.

Part of Mikk — live architectural context for your AI agent.


Pre-flight Pipeline

Takes a plain-English prompt describing a refactor or new feature, and returns a structured verdict before any code is written.

Usage

mikk intent "Move user validation into a shared utils module"
mikk intent "Extract auth logic into middleware" --json

Or programmatically:

import { PreflightPipeline } from '@getmikk/intent-engine'

const pipeline = new PreflightPipeline(contract, lock)
const result = await pipeline.run("Add rate limiting to all API routes")

console.log(result.approved)     // true | false
console.log(result.conflicts)    // constraint violations found
console.log(result.suggestions)  // implementation suggestions with affected files

What it returns

{
  intents: [
    {
      action: 'add' | 'move' | 'extract' | 'refactor' | 'remove' | ...,
      target: { type: 'function' | 'module' | 'file', name: string, moduleId?: string },
      confidence: number  // 0-1
    }
  ],
  conflicts: {
    hasConflicts: boolean,
    conflicts: [
      {
        type: string,
        severity: 'error' | 'warning',
        message: string,
        suggestedFix: string
      }
    ]
  },
  suggestions: [
    {
      intent: Intent,
      implementation: string,
      affectedFiles: string[],
      newFiles: string[],
      estimatedImpact: number
    }
  ],
  approved: boolean
}

Constraint checks

The pipeline checks against all 6 declared constraint types: no-import, must-use, no-call, layer, naming, max-files. If the proposed change would violate any of them, it surfaces as a conflict with a suggested fix.


Semantic Search

Find functions by natural-language description using local vector embeddings. No external API — runs entirely on-device.

Setup

npm install @xenova/transformers

The model (Xenova/all-MiniLM-L6-v2, ~22MB) downloads once to ~/.cache/huggingface.

Usage

Exposed via the MCP tool mikk_semantic_search, or directly:

import { SemanticSearcher } from '@getmikk/intent-engine'

const searcher = new SemanticSearcher(projectRoot)

// Build (or load from cache) embeddings for the lock
await searcher.index(lock)

// Find the 10 most semantically similar functions
const results = await searcher.search('validate a JWT token', lock, 10)
// Returns: [{ name, file, moduleId, purpose, lines, score }]

How it works

  1. For each function in the lock, concatenates: function name + purpose string (if present) + param names + return type
  2. Generates embeddings in batches of 64 using the pipeline
  3. Caches to .mikk/embeddings.json — fingerprinted by function count + first 20 sorted IDs
  4. Cache is valid until the lock changes; recomputes only what changed
  5. At search time, embeds the query and ranks all functions by cosine similarity

All vectors are unit-normalized at generation time so similarity is a simple dot product.

Check availability

const available = await SemanticSearcher.isAvailable()
// true if @xenova/transformers is installed and importable

The MCP server calls isAvailable() before registering the tool — if the package is missing, the tool is not exposed and the response explains how to install it.