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

@maskweaver/verify

v0.1.0

Published

Verification system for code quality checks

Readme

@maskweaver/verify

Complete verification system for automated code quality checks using tiered AI reviewers.

Overview

The verify package implements a multi-tier code review system that automatically escalates issues to more capable reviewers:

  1. dummy-flash: Fast, cheap initial review (syntax errors, obvious bugs)
  2. dummy-human: Standard review (logic, best practices, security)
  3. dummy-premium: Deep expert review (architecture, performance, compliance)

Installation

pnpm add @maskweaver/verify

Quick Start

import { quickVerify } from '@maskweaver/verify';

// Quick verification
const result = await quickVerify(`
function processPayment(amount) {
  // Missing validation!
  return charge(amount);
}
`, {
  reviewer: 'dummy-flash',
  context: 'Payment processing function',
});

console.log(result.summary);
console.log(result.issues);

Configuration

import { createVerifier } from '@maskweaver/verify';

const verifier = createVerifier({
  mode: 'auto',           // auto | manual | off
  reviewer: 'dummy-flash', // Starting reviewer tier
  
  escalation: {
    onWarn: 'dummy-human',    // Escalate warnings to human
    onFail: 'dummy-premium',  // Escalate failures to premium
  },
  
  budget: {
    maxPerSessionUSD: 1.0,  // Session spending limit
    maxPerCheckUSD: 0.1,     // Per-check spending limit
  },
  
  triggers: {
    onWrite: true,           // Auto-verify on file write
    onTestFail: true,        // Auto-verify on test failure
    onCriticalFile: true,    // Auto-verify critical files
  },
  
  criticalFiles: [          // Custom critical file patterns
    '**/payment/**',
    '**/auth/**',
    '**/.env',
  ],
});

Usage

Basic Verification

const response = await verifier.verify({
  trigger: 'onRequest',
  content: sourceCode,
  context: 'User authentication module',
  filePath: 'src/auth/login.ts',
});

if (response.result === 'fail') {
  console.error('Critical issues found:', response.issues);
} else if (response.result === 'warn') {
  console.warn('Warnings:', response.suggestions);
}

Check Critical Files

import { isCriticalFile, getCriticalityLevel } from '@maskweaver/verify';

if (isCriticalFile('src/payment/stripe.ts')) {
  console.log('This is a critical file - using premium reviewer');
}

const level = getCriticalityLevel('.env');
// Returns: "critical" | "sensitive" | "normal"

Budget Tracking

const budget = verifier.getBudgetState();

console.log(`Spent: $${budget.sessionTotal.toFixed(4)}`);
console.log(`Remaining: $${(budget.sessionLimit - budget.sessionTotal).toFixed(4)}`);

if (budget.exceeded) {
  console.warn('Budget limit reached!');
}

Custom Prompts

import { getPromptForReviewer, fillPrompt } from '@maskweaver/verify';

const prompt = getPromptForReviewer('dummy-premium');
const filled = fillPrompt(prompt, sourceCode, 'Security-critical module');

Escalation Flow

1. Code Change Detected
   ↓
2. Check if Critical File?
   Yes → Start with dummy-human or dummy-premium
   No  → Start with dummy-flash
   ↓
3. Run Review
   ↓
4. Analyze Result
   ├─ PASS → Done ✓
   ├─ WARN → Escalate to dummy-human
   └─ FAIL → Escalate to dummy-premium
   ↓
5. Final Review
   └─ Return Results

Cost Rates

| Reviewer | Cost per 1K tokens | Typical Use Case | |----------------|--------------------|-----------------------------| | dummy-flash | $0.0001 | Quick syntax checks | | dummy-human | $0.0030 | Standard code review | | dummy-premium | $0.0150 | Deep security/arch analysis |

Critical File Patterns

Default patterns that trigger enhanced review:

  • Auth: **/auth/**, **/authentication/**, **/login/**
  • Payment: **/payment/**, **/billing/**, **/checkout/**
  • Security: **/security/**, **/crypto/**, **/encryption/**
  • Secrets: **/.env, **/credentials.*, **/secrets.*
  • Infrastructure: **/deploy/**, **/infrastructure/**
  • Admin: **/admin/**, **/superuser/**

API Reference

Core Functions

  • createVerifier(config) - Create a verifier instance
  • quickVerify(content, options?) - One-off verification

Critical Files

  • isCriticalFile(path, patterns?) - Check if file is critical
  • getCriticalityLevel(path) - Get criticality: critical | sensitive | normal
  • getMatchedPatterns(path, patterns?) - Get matched patterns

Escalation

  • shouldEscalate(result, config) - Check if escalation needed
  • getNextReviewer(current, reason, config) - Get next tier
  • getEscalationPath(from, config) - Get full escalation path
  • canEscalate(reviewer) - Check if further escalation possible

Budget

  • createBudgetTracker(config) - Create budget tracker
  • budgetTracker.estimateCost(content, context, reviewer) - Estimate cost
  • budgetTracker.canProceed(cost) - Check if within budget
  • budgetTracker.recordCost(cost) - Record actual cost
  • budgetTracker.getState() - Get current budget state

TypeScript Types

type VerifyMode = "auto" | "manual" | "off";
type ReviewerTier = "dummy-flash" | "dummy-human" | "dummy-premium";
type VerifyTrigger = "onWrite" | "onTestFail" | "onRequest" | "onCriticalFile";
type VerifyResult = "pass" | "warn" | "fail";

interface VerifyResponse {
  result: VerifyResult;
  reviewer: ReviewerTier;
  summary: string;
  issues?: VerifyIssue[];
  suggestions?: string[];
  cost: number;
  escalated: boolean;
}

interface VerifyIssue {
  severity: "error" | "warning" | "info";
  message: string;
  line?: number;
  suggestion?: string;
}

License

MIT