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

@weaveintel/prompts

v0.1.1

Published

Prompt management — versioned templates, variable substitution, instruction bundles, A/B experiments, scoped resolution

Readme

@weaveintel/prompts

Versioned prompt templates with safe variable substitution, reusable fragments, output contracts, and A/B experiments.

Why it exists

A prompt is really a document that many people edit and ship to production — and like any shipped document, an unreviewed change can quietly break things downstream. Think of it like a recipe card kept in a binder: each card has a version, blanks you fill in ("2 cups of {{flour}}"), and shared notes you paste in from other cards. prompts gives you that binder — templates you can fill in without accidentally leaving a blank, older versions you can roll back to, and checks that the finished dish matches the order before it leaves the kitchen.

When to reach for it

Reach for it when prompts are first-class assets: you need to substitute variables safely, lint a template before rendering, compose named sections (RTCE, critique, judge), enforce an output contract, or run an A/B experiment between prompt versions. If you just need a one-off string, plain template literals are fine — you don't need this. If you want the type definitions for prompt records rather than the engine, those live in @weaveintel/core.

How to use it

import { createSafeTemplate, extractVariables } from '@weaveintel/prompts';

const tmpl = createSafeTemplate('Summarize {{topic}} for a {{audience}} reader.');

console.log(extractVariables(tmpl)); // ['topic', 'audience']

const rendered = tmpl.render({ topic: 'tax law', audience: 'lay' });
console.log(rendered); // "Summarize tax law for a lay reader."

What's in the box

  • TemplatescreateTemplate, createSafeTemplate, extractVariables, renderWithOptions, renderStructuredPromptMessages.
  • Registry & resolutionInMemoryPromptRegistry, PromptResolver, resolvePromptRecordForExecution.
  • Compositionframeworks (FRAMEWORK_RTCE, FRAMEWORK_JUDGE, renderFramework) and fragments (resolveFragments, {{>key}} includes).
  • Quality gateslintPromptTemplate, validateContract (JSON/markdown/code/length contracts).
  • ExperimentsInMemoryExperimentStore, weightedSelect.
  • Provider adaptersopenAIAdapter, anthropicAdapter, resolveAdapter.
  • Evaluation & optimizationevaluatePromptDatasetForRecord, runPromptOptimization.
  • TranslationbuildTranslatePrompt, protectNonTranslatable, verifyTranslation.

Single entry point: @weaveintel/prompts.

License

MIT.