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 prosemeterimport { 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 profilesThe 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-baselineExit 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/mcpPoint 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@prosemeterProfiles
A profile tunes scoring for a kind of document: a target reading grade, per-dimension weights, and rule severities. Seven ship built in.
| profile | grade band | threshold | |
|---|---|---|---|
| plain | 8–12 | 70 | Neutral defaults for general prose. All dimensions at their default weight. |
| readme | 8–12 | 75 | Project READMEs: structure weighted up, clichés harsh. |
| api-docs | 8–13 | 72 | API reference docs: terminology consistency weighted up, passive voice tolerated, high code ratio expected. |
| blog | 7–10 | 70 | Blog posts: sentence variety and clarity weighted up, structure relaxed. |
| marketing | 6–9 | 72 | Marketing copy: brevity and simplicity harsh, directness harsh, lexical diversity relaxed. |
| academic | 12–16 | 68 | Academic writing: passive voice and hedging tolerated, grade band high. Both dimensions weighted down. |
| chat | 7–12 | 75 | Agent 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.3.2 · this table is generated from the engine's own profile definitions.