Quality score
LPM.dev Registry stores a quality report for each published version. The report gives the version a score out of 100 in four categories: Docs, API, Provenance and Health. Each check says how to earn its points.
A quality score is not a security verdict. It does not approve a Free, Pool, or Marketplace release.
Score tiers
| Tier | Score |
|---|---|
| Excellent | 90 to 100 |
| Good | 70 to 89 |
| Fair | 50 to 69 |
| Needs Work | 0 to 49 |
Where the checks run
Most checks read only the package archive. The LPM CLI runs these archive checks. LPM.dev Registry runs them with the LPM CLI on every uploaded archive, and lpm publish runs the same code on the archive before it uploads it. The two agree when your LPM CLI is the version LPM.dev Registry runs.
LPM.dev Registry runs the checks that need its own data:
- Agent Skills that passed the security scan
- trusted publishing and signed provenance
- a
repositoryin package.json that matches the repository that published the version - a verified domain of the package's owner, which for an organization package is the organization
LPM.dev Registry ignores a quality report that a publish request carries.
Before upload
Run the archive checks without publishing:
lpm publish --check
--check lists every check by category, with how to earn the points it lost. The checks that need LPM.dev Registry data show as checked after the publish.
To stop a publish when the archive checks earn too little, add --min-score:
lpm publish --min-score 60
The threshold applies to the archive points as a share of the points the archive checks are worth. The LPM CLI quality reference and publishing reference describe the commands and their output.
After upload
A new version shows Scoring… until its checks finish: the archive checks, the Swift manifest check of a Swift package, and the Agent Skills security scan when the version has skills. LPM.dev Registry never stores a partial score or partial category totals. Search and the package directory keep the previous version's score until the new one is complete. In your own package lists, a version still being scored shows no score.
If the archive checks cannot run, for example because the archive cannot be read, the version shows Score unavailable. Your package's settings page says why, and lpm quality shows its archive checks as not checked.
A version scored before these rules shows Scored under earlier rules until LPM.dev Registry scores it again.
When a score changes
A score changes only when the evidence about the version changes:
- a check of the version finishes
- an Agent Skills security scan approves or flags the skills
- LPM.dev Registry verifies the version's provenance again
- the owner's verified domain appears or goes away
- LPM.dev Registry scores its versions under new rules
The age of a version never changes its score. The package page shows the time since the last release beside the score, as a fact.
The README
The README checks, the package page and its Markdown version, the package metadata that package managers read, the package's LLM context, and AI chat all use the README at the root of the archive. LPM.dev Registry ignores README text that the publish request sends.
If the archive has several READMEs, LPM.dev Registry picks one the way the LPM CLI does:
- It matches the name in any case, so
readme.mdcounts asREADME.md. - It tries
README.md,README,README.txt,README.markdown, then any otherREADME.*file, in that order. - It skips a README that is not UTF-8 text and tries the next one.
LPM.dev Registry reads the first 1,000,000 bytes of a README and ignores the rest.
JavaScript checks
Docs (32 points)
| Check | Points | What earns them |
|---|---|---|
| README | 6 | A root README with at least 300 characters of prose, not counting code blocks, images, badges, HTML or link targets. Code blocks inside an HTML comment do not count anywhere. |
| Install command | 3 | A README code block that installs this exact package with lpm install, npm install, pnpm add, yarn add or bun add. For a source package, one with lpm.config.json, lpm add counts too. |
| Usage example | 5 | 2 points for a js or ts README code block that imports the package by its name. All 5 when every name it imports is in the package's export list. |
| API docs | 10 | The share of exported symbols, from the type declarations or else the ESM entry, with a doc comment of at least 20 characters that is not just the name. 80% earns 10 points, 50% earns 6, 20% earns 3. |
| Changelog | 3 | A root CHANGELOG, CHANGES or HISTORY file that names this version. |
| Agent Skills | 5 | At least one Agent Skill that passed the security scan, even if the scan flagged others. |
API (26 points)
| Check | Points | What earns them |
|---|---|---|
| Entry points exist | 5 | Every path in main, module, types, typings, bin and exports names a file in the package. A types path can name a JavaScript file. TypeScript then reads the declarations beside it. |
| Type declarations | 10 | Declarations for every exports entry under import and require, through a types condition or beside each .js: TypeScript source, or .d.ts (.d.mts for .mjs, .d.cts for .cjs). If a more specific subpath maps to null, its entry does not count. Some entries earn 5 points, all earn 10. |
| ESM entry | 4 | The import entry is an ES module: .mjs, or .js with ESM syntax that Node.js loads as a module. |
| Exports map | 4 | exports exists, every target exists, and each condition object lists types first and default last. |
| Side effects declared | 2 | sideEffects is false or a list of files. |
| Node.js engines | 1 | engines.node is a valid range. |
Provenance (12 points)
| Check | Points | What earns them |
|---|---|---|
| Trusted publishing | 5 | The version was published with trusted publishing (OIDC). |
| Signed provenance | 2 | The version has a verified Sigstore provenance bundle. |
| Repository matches provenance | 2 | package.json repository names the repository that published the version. |
| Owner's verified domain | 3 | The package's owner has a verified domain. |
Health (30 points)
| Check | Points | What earns them |
|---|---|---|
| License | 5 | A current SPDX expression, a LicenseRef-*, or SEE LICENSE IN <file> with that file in the package. Proprietary terms earn the same as MIT. UNLICENSED earns nothing; use SEE LICENSE IN for proprietary terms. |
| License file | 2 | A root LICENSE, LICENCE or COPYING file. |
| Description | 2 | A description of 20 to 280 characters that is more than the package name. |
| Keywords | 1 | At least one keyword. |
| Repository | 3 | A repository URL that npm can open. |
| Lean install | 6 | Few direct dependencies, counting dependencies, optionalDependencies and peers that are not optional. None earns 6 points; up to 2 earn 5, 5 earn 4, 10 earn 3, 20 earn 2, 40 earn 1. |
| No install scripts | 5 | No preinstall, install or postinstall script, and no root binding.gyp, which makes npm run node-gyp at install. |
| Clean archive | 6 | No .env files (.env.example, .env.sample and .env.template are fine), .git/, coverage/, OS or editor files, nested .tgz archives, or node_modules outside bundleDependencies, and under 10 MB unpacked. |
Swift checks
Swift packages have the same Docs and Provenance checks, with these differences: the install command is .package(id: "lpmdev.owner_name", ...) or lpm install, the usage example is a swift code block that imports one of the package's library modules and uses its public API, and API docs count the declarations that code outside the package can reach, outside test targets, with a doc comment directly above: public and open declarations, the members of a public extension or public protocol, and the cases of a public enum. A public member of a type that is not public does not count.
The checks that read Package.swift use the manifest that LPM.dev Registry evaluated when it prepared the release, not the file's text. When the package has version-specific manifests, they read the Package@swift-….swift that LPM.dev Registry's Swift picks, as SwiftPM does.
API (30 points)
| Check | Points | What earns them |
|---|---|---|
| Public API | 4 | At least one public or open declaration code outside the package can reach. Members of a public extension or public protocol, and the cases of a public enum, count too. |
| Platforms | 5 | Platforms with minimum versions in Package.swift. |
| Swift 6 | 6 | 3 points for swift-tools-version 5.9 or later. All 6 for the Swift 6 language mode on every target. |
| Versioned dependencies | 5 | Every dependency has a version requirement, not a branch, a revision or a local path. |
| No unsafe flags | 4 | No target uses unsafeFlags, which SwiftPM refuses in a versioned dependency. |
| Tests | 6 | A test target whose sources include a Swift file that declares an XCTestCase subclass or a @Test function. |
Health (26 points)
| Check | Points | What earns them |
|---|---|---|
| License, license file, description, keywords, repository | 13 | The same rules as JavaScript, from the package's package.json. |
| Lean dependencies | 7 | Few dependencies in Package.swift. None earns 7 points; 1 earns 6, 2 earn 5, up to 4 earn 4, 6 earn 3, 10 earn 2, 20 earn 1. |
| Clean archive | 6 | No .build/, .swiftpm/, xcuserdata, DerivedData or .git/ in the package. |
Security review is separate
Some checks touch on security, such as lifecycle scripts and a clean archive. These checks do not replace the publication review.
Private versions do not need the publication review. Every Free, Pool, and Marketplace version must pass the publication review before consumers can get it. The quality score does not change this.
AI analysis is separate
After a public version passes the publication review, LPM.dev Registry can generate summaries, capabilities, an error handling review, and other AI metadata. Package pages and discovery use this metadata. It adds no points to the quality score.
To read a published report, run lpm quality:
lpm quality @lpm.dev/acme.ui-kit