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

@afixt/ai-prefilter

v0.1.2

Published

Deterministic pre-filter layer for AI-assisted accessibility tests. Reduces LLM cost by answering what can be answered deterministically and routing only ambiguous cases to the AI proxy.

Readme

@afixt/ai-prefilter

Deterministic pre-filter layer for AI-assisted accessibility tests. Sits between the test runner and the platform AI proxy, classifying aiRequest payloads into:

  • Decided verdicts — answered deterministically with no LLM call.
  • Residual aiRequest — the subset that still needs the model.

Purpose

AI-assisted accessibility tests (see AFixt/afixt-tests issues labeled AI) emit aiRequest objects describing what they need evaluated. Routing every request to a vision or text LLM is expensive. This package applies cheap deterministic analysis first and only escalates ambiguous cases.

Built to serve the Project Revenant platform invariant: AI/LLM calls route through the platform's AI proxy. This package does not call LLMs itself — it reduces the work the proxy receives.

Status

Phase 5 of the Revenant ROADMAP — AI-Assisted Detection. Prefilters implemented:

  • Contrast (CSS-02) — deterministic WCAG 1.4.11 evaluation
  • OCR (NON-TEXT-CONTENT-05/06/19) — Tesseract-based text-in-image detection
  • Language detection (LANG-02) — franc-based language-mismatch detection

Install

npm install @afixt/ai-prefilter

Quick start

import {
  dispatch,
  createRegistry,
  contrastPrefilter,
  memoryCache,
} from '@afixt/ai-prefilter';

const registry = createRegistry();
registry.register('CSS-02', contrastPrefilter);

const result = await dispatch(aiRequest, {
  registry,
  cache: memoryCache(),
});

// result.verdicts          → elements decided deterministically
// result.residualAiRequest → what (if anything) still needs the model

Development

This project follows the monorepo standards in the parent CLAUDE.md:

  • TDD — write tests first, in batches of 2–3, verified to pass incrementally.
  • Git Flow — feature branches from develop, PR to develop, release branches to main.
  • Git hooks — Husky pre-commit (lint-staged + tsc-files + trufflehog) and pre-push (npm run check:all). Never bypass.
  • Coverage — ≥80% on new code.

Setup

First clone requires both Node deps and a few external binaries (semgrep, osv-scanner, trufflehog, lychee). The bootstrap script installs everything:

bash scripts/bootstrap.sh

If you skip the script the Node side still works; CI enforces the external scanners regardless, and pre-commit prints a warning when trufflehog is missing rather than blocking.

Scripts

npm run dev             # tsup --watch
npm run build           # tsup → dist/ (dual CJS + ESM)
npm test                # vitest run
npm run test:watch
npm run test:coverage

npm run typecheck
npm run lint            # eslint (strict-type-checked + quality plugins)
npm run lint:fix
npm run format          # prettier --write .
npm run format:check
npm run markdownlint

npm run dupes           # jscpd duplicate-code detection
npm run links           # lychee link check
npm run docs:api        # TypeDoc → docs/api/
npm run size            # size-limit budget check
npm run license:check   # production-dep license allowlist
npm run license:report  # CSV report → reports/licenses.csv

npm run security:audit  # npm audit --omit=dev --audit-level=high
npm run security:osv    # google/osv-scanner against package-lock.json
npm run security:semgrep
npm run security:secrets  # trufflehog (verified-only)
npm run security        # all four security scans in parallel

npm run check           # lint + typecheck + markdownlint (fast)
npm run check:all       # check + test + build + size + dupes + license + audit

The check:all script is what the pre-push hook runs and what CI mirrors, so "passes locally" means "passes in CI".

Architecture Decisions

See docs/adr/ for the decisions that shaped this package's tooling stack, rule tunings, and library-vs-app scope exclusions.

License

MIT