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

avp-assay

v0.4.0

Published

Assay — the reference JS/React implementation of AVP (Acceptance Verification Protocol). Deterministic behavior verification for AI-built web features: tap the vein and confirm it's remediated.

Readme

avp-assay

The reference JS/React implementation of AVP (the Acceptance Verification Protocol) — deterministic behavior verification for AI-built web features. You declare what a feature must do (the archetype + criteria); Assay runs it against a real substrate (rendered React, an HTTP backend, the laid-out DOM) and returns an actionable verdict + fail-closed aggregate outcome. Empty or unresolved proof is inconclusive, not green. The runtime sibling of the static doctor; standalone, like a test runner.

It runs inside your existing Vitest suite — the canonical *.assay.test.* suffix is both Assay-filterable and Vitest-discoverable. The assay bin is a thin face over vitest run (it is a wrapper, not a runner of its own).

Entry points

| Import | What it is | Needs (peer) | |---|---|---| | avp-assay | The authoring API: the DSL, archetypes, runVerification, composeVerdicts, formatVerdict. | — | | avp-assay/react | The React substrate — render + probe + the MSW seam. | react, react-dom, @testing-library/react, @testing-library/user-event, msw, jsdom | | avp-assay/react/vitest | defineVerification — the Vitest binding for the React adapter. | vitest | | avp-assay/http | The HTTP substrate — verify a real backend over the wire. | — | | avp-assay/design | The design substrate — jsdom + computed style (tokens, themes, contrast, a11y). | jsdom | | avp-assay/design/browser | The GEOMETRY tier — real layout in your installed Chrome/Edge (overflow, responsive, RTL, tap targets, layout shift…). | puppeteer-core | | avp-assay/judge | claudeJudge — the reference model-oracle judge. | @anthropic-ai/sdk |

Every substrate library is an optional peer — install only what the adapters you use need (the react line above for the DOM tier; nothing extra for /http). The package is ESM-only and needs Node ≥ 20 — it rides an ESM-first substrate (Vitest, MSW 2) by design.

npm install -D avp-assay vitest
// features/todo/todo.assay.test.ts — co-located with the feature, run by `npx assay verify`
import { actionEffect } from "avp-assay";
import { defineVerification } from "avp-assay/react/vitest";
import { addTodoSubject } from "./todo.subject"; // the seams: how to mount, which endpoint, which control

defineVerification(actionEffect, addTodoSubject);

Authoring your own criteria (off-catalog)

The shipped catalog covers universal invariants, each grounded in a real escape. For a domain rule specific to your product — say, "every bank integration must expose the same account protocol" — you author your own criterion with the same public DSL and run it through the same engine. Custom criteria live in your repo and never enter the package's accuracy benchmark (see ADR 0002).

import { archetype, criterion, mechanical, runVerification, AvpFail } from "avp-assay";

// 1 — author the criterion (reads like any catalog archetype)
const accountProtocol = archetype("account-protocol-conformance", "0.1.0", () => {
  criterion(
    "exposes-canonical-account-protocol",
    "Every bank provider returns { id, currency, integer balanceMinor }.",
    { substrate: "http" },
    mechanical(async ({ act, expect }) => { await act(); expect.everyProviderIsCanonical(); }),
  );
});

// 2 — bind it to a substrate with your own probe, then run it
const verdict = await runVerification("all-banks", accountProtocol, { probe: () => myProbe(subject) });

Want it on the same Vitest host (gating + formatted verdict) as the catalog? Pass the hooks per-call — no global registration:

verify(accountProtocol, subject, { hooks: (s) => ({ probe: () => myProbe(s) }) });          // React
verifyHttp(accountProtocol, subject, { hooks: (s) => ({ probe: () => myProbe(s) }) });        // HTTP
defineVerification(accountProtocol, subject, { hooks: (s) => ({ probe: () => myProbe(s) }) });// Vitest

A full worked example, calibrated caos→verde (the verifier passes a compliant fleet and catches a bank that breaks the protocol), lives in test/custom-criterion.test.ts.

MIT © Lucas Tinoco