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

@modularcloud/xspec

v0.1.2

Published

Requirement traceability for specifications written in MDX: typed spec modules, reference validation, dependency policy, coverage, impact analysis, and staged reviews.

Readme

xspec

Requirement traceability for specifications written in MDX.

xspec turns your spec documents into a typed, queryable dependency graph. Mark requirement sections with <S> tags; xspec compiles each document into a strongly typed TypeScript module, links requirements to the code that implements and tests them, and uses the resulting project-wide graph to validate references, enforce dependency policy, measure coverage, analyze the impact of changes, and drive staged reviews.

{/* specs/AUTH.mdx */}
<S id="auth">
Authentication.

<S id="auth.login" tags="happy-path">
Users sign in with an email address and a password.
</S>
</S>
// src/auth.ts
import AUTH from "../specs/AUTH.xspec"

export function login(email: string, password: string): boolean {
  AUTH.auth.login   // type-checked reference: this code implements that requirement
  return email.includes("@") && password.length > 0
}
xspec build                 # typed modules + Markdown + project graph
xspec check                 # validate everything; exit 1 on any finding
xspec coverage tested --check   # gate CI on requirement coverage
xspec impact --base main    # what does this change touch?

Why

  • References that can't rot. Requirement references in code are real TypeScript — hover shows the requirement text, go-to-definition jumps into the .mdx, and a renamed or deleted requirement is a compile error, not silent drift.
  • A graph, not a convention. Sections, declared dependencies (d), text embeddings ({text(...)}), and code references form one project-wide graph you can query, gate, and diff.
  • Coverage as reachability. Named profiles ask precise questions — "is every product requirement referenced by a test?" — and --check turns them into CI gates.
  • Impact you can trust. Hash-based change detection attributes every downstream effect to the edit that caused it; xspec rename/xspec move record identity mappings in a journal, so refactoring produces zero spurious impact.
  • Reviews with memory. Changes, audits, and coverage gaps become durable, staged checklists that unlock bottom-up and flag resolutions invalidated by later edits.
  • Deterministic by construction. Every output and generated file is byte-identical for identical input: no timestamps, no randomness, no network. Exit codes mean things (0 success, 1 findings, 2 usage/config errors). Every command speaks --json.

Getting started

Requires Node.js ≥ 22. Not yet published to npm — run from a checkout:

git clone https://github.com/modularcloud/xspec.git
cd xspec && npm ci && npm run build
npm link    # puts `xspec` on your PATH

Then follow docs/getting-started.md to set up a project in minutes.

Documentation

Usage guides live in docs/:

| | | |---|---| | Getting started | Install → first project → first coverage report | | Writing specs | The .mdx syntax: sections, IDs, d, text(), tags | | Configuration | xspec.config.ts: groups, Markdown, coverage profiles, policy | | TypeScript integration | Generated modules, markers, text(), compiler setup | | CLI reference | Every command, flag, exit code, and convention | | Coverage | Profiles, boundaries, modes, CI gating | | Impact analysis | Hashes, change categories, baselines, impacted code | | Reviews | Staged review sessions and strategies | | Renaming & moving | Identity-preserving refactoring and the journal | | Workspace files | What xspec writes and what to commit |

The authoritative behavioral specification is specs/SPEC.md; the docs are the guide, the spec is the law.

Development

This repository is built and maintained through Spec-Driven Generation (SDG): the specification is the master artifact, and the spec, tests, and implementation are generated and kept in lockstep by the process defined in specs/PROCESS.md (with Claude Code bindings in specs/CLAUDE-PROCESS.md and scaffolding under .claude/). Humans steer by editing goals and answering questions — not by hand-writing code — so issues and ideas are welcome as problem statements rather than patches.

Build and test instructions (for CI and process runs) are in AGENTS.md: npm ci, npm run build, npm test. The test harness under test/ is a separate program that drives the built xspec executable as a subprocess; certification fixtures keep the harness itself honest.

License

MIT