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

@manzoid2/test-intent-map

v0.1.1

Published

Extract test metadata from any codebase and generate an interactive intent-map report with Claude Code

Downloads

47

Readme

@manzoid2/test-intent-map

Extract test metadata from any codebase and generate an interactive intent-map report with Claude Code.

Two-part architecture: the tool does the mechanical extraction (test discovery, source inference, line ranges), Claude Code does the intelligence (classifying each test by intent type, describing what it exercises, identifying failure modes). The output is an interactive HTML report with type filtering.

Install

npm install -g @manzoid2/test-intent-map

Requires Node.js >= 18. No other system dependencies.

Setup (required)

Add the following to your global Claude Code instructions (~/.claude/CLAUDE.md):

## test-intent-map
Globally installed CLI (`npm i -g @manzoid2/test-intent-map`) for test suite analysis.
Run `test-intent-map` with no arguments to get the full analysis prompt — then follow those instructions.

This tells Claude Code the tool exists and how to use it. Without this, Claude won't know to invoke it.

Usage

Open Claude Code in any repo and tell it to run test-intent-map. Claude will:

  1. Run test-intent-map with no args to get the analysis prompt
  2. Follow the prompt: run the tool with --json to extract test metadata
  3. Read each test and its inferred source files
  4. Classify every test by intent type (one of 8 categories)
  5. Do a straggler check for tests the regex may have missed
  6. Generate an interactive HTML report with filtering

CLI reference

test-intent-map                        # Print the Claude Code analysis prompt
test-intent-map <path>                 # Extract test metadata, print summary
test-intent-map <path> --json <out>    # Also write JSON to file
test-intent-map --help                 # Show help

Standalone extraction

You can run the extraction step directly for a quick preview:

test-intent-map ~/code/myproject --json /tmp/census.json

Prints a summary to stdout and writes structured JSON to the specified file.

Supported Languages

| Language | Test patterns | Source inference | |----------|--------------|-----------------| | Python (pytest) | test_*.py, *_test.py, class Test*, def test_* | Import scanning, path convention, mock targets | | TypeScript/JavaScript (Jest, Vitest, Mocha) | *.test.ts, *.spec.ts, describe(), it(), test() | Co-located files, __tests__/ convention, import scanning | | Go | *_test.go, func Test* | Same-package convention |

Adding a new language: implement the LanguageProfile interface (3 methods: isTestFile, extractTests, inferSources) and add it to the LANGUAGES array in census.ts.

Test Type Taxonomy

Claude classifies each test into one of 8 intent types:

| Type | What it checks | |------|---------------| | Wiring | Dependencies are connected correctly | | Resilience | System handles bad/missing/edge input | | Control Flow | Branching and conditional logic | | Data Transform | Input→output mapping correctness | | State Mgmt | State changes correctly over time | | Contract | Interface/schema compliance | | Log Presence | Logging and observability behavior | | Side Effect | External side effects occur correctly |

JSON Schema

See examples/sample-output.json for the full schema. Key fields:

  • tests[]: Every test with testFile, className, methodName, line, endLine, inferredSources
  • testFiles[]: Each test file with group (directory-based), inferredSources with confidence levels
  • github: Auto-detected from .git/config for constructing link URLs
  • languages: Which languages were detected in the test suite

HTML Report

The templates/report.html is a self-contained interactive template. Claude replaces the DATA_PLACEHOLDER with classified test data. Features:

  • Color-coded type pills with click-to-filter (multi-select)
  • Group header rows (by directory)
  • GitHub links to test and source files
  • Sticky header, hover highlights

License

MIT