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

fluently-scorer

v0.3.2

Published

Zero-dependency scoring and validation engine for human-AI collaboration frameworks. Validates knowledge cycles, ranks them by similarity, and evaluates framework compliance. Bundles the AI Fluency 4D Framework; any framework with named dimensions can be

Downloads

336

Readme

fluently-scorer

Shared scoring and validation engine for human-AI collaboration frameworks. Validates knowledge cycles against their framework schema, ranks them by similarity, and evaluates compliance. Framework-agnostic: works with any framework that defines named dimensions.

Bundles the AI Fluency 4D Framework as the default. Any framework registered in the knowledge base is automatically supported.

Used internally by both fluently-cli and fluently-mcp-server. Import it directly to build on top of the Fluently knowledge base in your own tools.

npm version License: MIT Node ≥ 20


Install

npm install fluently-scorer

Requires Node.js 20+. Pure local computation — no network calls, no credentials.


API

loadKnowledgeEntries(knowledgeDir)

Load and Zod-validate every .yaml file in a directory. Throws if any file fails schema validation — keeps CI strict about malformed entries.

import { loadKnowledgeEntries } from 'fluently-scorer';

const entries = loadKnowledgeEntries('./knowledge');
// → KnowledgeEntry[]  (Zod-validated)

console.log(entries[0].title);   // "Code Review Triage"
console.log(entries[0].domain);  // "coding"
console.log(entries[0].tags);    // ["code-review", "triage", "automation"]

scoreTask(input, knowledgeDir)

Score a task against all loaded cycles and return the top 3 matches ordered by similarity.

import { scoreTask } from 'fluently-scorer';
import type { TaskInput } from 'fluently-scorer';

const input: TaskInput = {
    description:       'AI reviews PRs for style issues, humans approve before merge',
    delegation_intent: 'augmented',   // "automated" | "augmented" | "supervised"
};

const results = scoreTask(input, './knowledge');

results.forEach(({ entry, dimensionScores }) => {
    console.log(entry.title);
    console.log(dimensionScores);
    // Dimension keys match the registered framework — e.g. for the 4D Framework:
    // { delegation: 80, description: 90, discernment: 70, diligence: 75 }
});

delegation_intent values:

| Value | Meaning | |-------|---------| | "automated" | AI decides without human review | | "augmented" | Human and AI collaborate | | "supervised" | Human decides, AI assists |


checkPrivacy(text, options?)

Scan text for tokens that may indicate private data (names, emails, keys, etc.). Useful as a pre-flight check before sending content to an AI provider.

import { checkPrivacy } from 'fluently-scorer';
import type { PrivacyCheckOptions } from 'fluently-scorer';

const result = checkPrivacy('Contact [email protected] about the API_KEY leak', {
    flagEmails: true,
    flagKeys:   true,
});

console.log(result.issues);
// [
//   { type: 'email', value: '[email protected]', ... },
//   { type: 'key',   value: 'API_KEY',              ... },
// ]

Schema validation (fluently-scorer/schema)

import { knowledgeEntrySchema, domainEnum, dimensionSchema } from 'fluently-scorer/schema';

// Validate a raw YAML object
const entry = knowledgeEntrySchema.parse(rawYaml);

// Check valid domains
domainEnum.options;
// ["coding", "writing", "research", "customer-support", "education", "legal", "healthcare", "general"]

// Validate a single dimension block
const dim = dimensionSchema.parse({
    description: '...',
    example:     '...',
    antipattern: '...',
});

TypeScript types

import type { TaskInput, KnowledgeEntry, PrivacyCheckResult, PrivacyIssue, PrivacyCheckOptions } from 'fluently-scorer';

| Type | Description | |------|-------------| | TaskInput | Input to scoreTaskdescription + delegation_intent | | KnowledgeEntry | Zod-inferred type of a validated YAML entry | | PrivacyCheckResult | Return type of checkPrivacy | | PrivacyIssue | Individual flagged token with type, value, position | | PrivacyCheckOptions | Options for checkPrivacy |


Design

No network calls. The scorer reads YAML files from disk and scores with binary cosine similarity — no API keys, no external dependencies beyond js-yaml and zod.

No false-precision scores. Numeric dimension scores reflect keyword overlap, not AI quality. They are signals for ranking, not ground truth assessments.

Strict schema. Every entry must pass the Zod schema before it is accepted. This runs in CI on every PR so the knowledge base never contains malformed cycles.


Links


License

MIT