prosemeter

Use it

One engine, four ways in. The library is the whole thing; the other three are thin wrappers that exist so an agent or a CI job does not have to be one.

Library

pnpm add prosemeter
import { score, compareBaseline, checkConvergence } from "prosemeter"

const result = score(draft, { profile: "readme" })

result.map((current) => {
  const delta = compareBaseline(current, previous)
  const verdict = checkConvergence([62, 71, 74, 74.5], { threshold: 80 })
  return { delta, verdict }
})

score returns an Either, so parse and configuration errors stay explicit rather than throwing. A ScoreResult carries the composite, the per-dimension scores, and the findings.

The root export is free of Node built-ins — it is what this page's demo runs. Baseline persistence touches the filesystem, so it lives on its own subpath:

import { loadBaseline, saveBaseline } from "prosemeter/baseline"

Command line

npx prosemeter score README.md --profile readme
npx prosemeter score "docs/**/*.md" --threshold 75   # exits 1 below the threshold
npx prosemeter score draft.md --json                 # machine-readable ScoreResult
npx prosemeter profiles

The agent loop in one command — score, store, and report the convergence verdict against the previous run:

npx prosemeter score draft.md --profile readme --baseline --save-baseline

Exit codes: 0 pass · 1 below threshold · 2 bad input or config.

MCP server

Five tools over stdio: score_text, score_file, compare_baseline,check_convergence, and list_profiles. Every tool description teaches the loop, so an agent learns how they fit together rather than calling one in isolation.

npx @prosemeter/mcp

Point any MCP client at that binary.

Claude Code plugin

The server bundled with a skill. The server gives an agent the ability to score; the skill is what tells it to read per-dimension findings rather than the composite, and when to stop revising.

/plugin marketplace add jordanburke/prosemeter
/plugin install prosemeter@prosemeter

Profiles

A profile tunes scoring for a kind of document: a target reading grade, per-dimension weights, and rule severities. Seven ship built in.

The floor is a floor, not a target. No single dimension can fail one — zeroing the heaviest-weighted dimension on an otherwise perfect document still lands above every floor here. Only several dimensions failing together will trip it, so it catches catastrophic prose and nothing finer.

profilegrade bandfloor
plain8–1270Neutral defaults for general prose. All dimensions at their default weight.
readme8–1275Project READMEs: structure weighted up, clichés harsh.
api-docs8–1372API reference docs: terminology consistency weighted up, passive voice tolerated, high code ratio expected.
blog7–1070Blog posts: sentence variety and clarity weighted up, structure relaxed.
marketing6–972Marketing copy: brevity and simplicity harsh, directness harsh, lexical diversity relaxed.
academic12–1668Academic writing: passive voice and hedging tolerated, grade band high. Both dimensions weighted down.
chat7–1275Agent chat replies: jargon and wordiness harsh, document structure disabled.

Override any of it with a prosemeter.config.json, or pass dimensionOptions through the library.The demo switches profiles live. Load the passive-voice document and move it fromreadme to api-docs: the dimension score does not budge, but the weight does, and the composite rises. That is what a profile changes.

prosemeter 0.5.1 · this table is generated from the engine's own profile definitions.